@teambit/scope 1.0.460 → 1.0.461
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/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_scope_scope-preview.js +1 -1
- package/artifacts/schema.json +334 -40
- package/dist/{preview-1731468215979.js → preview-1731554468308.js} +2 -2
- package/dist/staged-config.d.ts +4 -1
- package/dist/staged-config.js +24 -12
- package/dist/staged-config.js.map +1 -1
- package/package.json +20 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.scope/scope@1.0.
|
|
3
|
+
<testsuite name="teambit.scope/scope@1.0.461" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see teambit_scope_scope-preview.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.scope/scope-preview"]=t():e["teambit.scope/scope-preview"]=t()}(self,(()=>(()=>{var e={88443:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=r.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},69685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},78552:()=>{!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(e){}void 0!==HTMLElement.prototype.nativeFocus||e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)})}}()},41486:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNavigator=t.isBrowser=t.off=t.on=t.noop=void 0,t.noop=function(){},t.on=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)},t.off=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)},t.isBrowser="undefined"!=typeof window,t.isNavigator="undefined"!=typeof navigator},97364:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(41594);t.default=function(e){o.useEffect(e,[])}},7654:(e,t,n)=>{"use strict";var o=n(41594),r=n(41486),i=r.isBrowser?window:null,a=function(e){return!!e.addEventListener},s=function(e){return!!e.on};t.A=function(e,t,n,c){void 0===n&&(n=i),o.useEffect((function(){if(t&&n)return a(n)?r.on(n,e,t,c):s(n)&&n.on(e,t,c),function(){a(n)?r.off(n,e,t,c):s(n)&&n.off(e,t,c)}}),[e,t,n,JSON.stringify(c)])}},32818:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(67046),r=n(41594),i=o.__importDefault(n(47542));t.default=function(e){var t=r.useRef(0),n=r.useState(e),o=n[0],a=n[1],s=r.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[o,s]}},47542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(67046),r=n(41594),i=o.__importDefault(n(97364));t.default=function(e){var t=r.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},99801:(e,t,n)=>{"use strict";var o=n(67046),r=n(41594),i=o.__importDefault(n(32818)),a=n(41486);t.A=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isBrowser?window.innerWidth:e,height:a.isBrowser?window.innerHeight:t}),o=n[0],s=n[1];return r.useEffect((function(){if(a.isBrowser){var e=function(){s({width:window.innerWidth,height:window.innerHeight})};return a.on(window,"resize",e),function(){a.off(window,"resize",e)}}}),[]),o}},24269:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImage=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(10388));function c(e){var{alt:t,className:n,fullWidth:r}=e,c=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},c,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}c.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=c},17568:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(24269),t)},75608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>y});var o=n(41594),r=n.n(o),i=n(69685),a=n.n(i);n(78552);const s=ReactDom;var c=n(7654),l=n(99801),u=n(67046),p=function(e){return e+"ms"},f={getBoundingClientRect:function(){return{height:0,left:0,top:0,width:0}},style:{transform:null}},d=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom Image":n,a=e.onUnload,d=e.onLoad,m=e.overlayBgColorEnd,h=void 0===m?"rgba(255, 255, 255, 0.95)":m,y=e.overlayBgColorStart,v=void 0===y?"rgba(255, 255, 255, 0)":y,b=e.parentRef,g=e.portalEl,_=void 0===g?document.body:g,w=e.scrollableEl,x=void 0===w?window:w,O=e.transitionDuration,j=void 0===O?300:O,S=e.zoomMargin,P=void 0===S?0:S,E=e.zoomZindex,T=void 0===E?2147483647:E,k=(0,o.useRef)(null),I=(0,o.useState)(0)[1],M=(0,o.useState)(!1),D=M[0],C=M[1],A=(0,o.useState)(!1),N=A[0],z=A[1],B=(0,l.A)(),R=B.width,L=B.height,F=(0,o.useCallback)((function(e){e.preventDefault(),z(!0)}),[]),W=(0,o.useCallback)((function(e){"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),z(!0))}),[]),H=(0,o.useCallback)((function(){I((function(e){return e+1})),N||z(!0)}),[N]);(0,c.A)("keydown",W,document),(0,c.A)("scroll",H,x),(0,o.useEffect)((function(){C(!0),d(),k.current&&k.current.focus({preventScroll:!0})}),[d]),(0,o.useEffect)((function(){var e=N?setTimeout(a,j):null;return function(){e&&clearTimeout(e)}}),[N,a,j]);var X=b.current||f,U=X.getBoundingClientRect(),$=U.height,G=U.left,Z=U.top,J=U.width,K=function(e){var t=e.isLoaded,n=e.isUnloading,o=e.overlayBgColorEnd,r=e.zoomZindex,i={backgroundColor:e.overlayBgColorStart,transitionDuration:p(e.transitionDuration),zIndex:r};return t&&!n&&(i.backgroundColor=o),i}({isLoaded:D,isUnloading:N,overlayBgColorEnd:h,overlayBgColorStart:v,transitionDuration:j,zoomZindex:T}),V=function(e){var t=e.height,n=e.innerHeight,o=e.innerWidth,r=e.isLoaded,i=e.isUnloading,a=e.left,s=e.originalTransform,c=e.top,l=e.transitionDuration,f=e.width,d=e.zoomMargin,m=p(l);if(!r||i){var h=(0,u.__spreadArrays)(["scale(1)","translate(0, 0)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:h,WebkitTransform:h,transitionDuration:m,width:f}}var y=function(e){var t=e.zoomMargin,n=e.innerWidth/(e.width+t),o=e.innerHeight/(e.height+t);return Math.min(n,o)}({height:t,innerWidth:o,innerHeight:n,width:f,zoomMargin:d}),v=(o/2-(a+f/2))/y,b=(n/2-(c+t/2))/y,g=(0,u.__spreadArrays)(["scale("+y+")","translate("+v+"px, "+b+"px)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:g,WebkitTransform:g,transitionDuration:m,width:f}}({height:$,isLoaded:D,innerHeight:L,innerWidth:R,isUnloading:N,left:G,originalTransform:X.style.transform,top:Z,transitionDuration:j,width:J,zoomMargin:P});return(0,s.createPortal)(r().createElement("div",{"aria-modal":!0,"data-rmiz-overlay":!0,role:"dialog",style:K},r().createElement("div",{"data-rmiz-modal-content":!0,style:V},t),r().createElement("button",{"aria-label":i,"data-rmiz-btn-close":!0,onClick:F,ref:k})),_)}));const m=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom image":n,a=e.overlayBgColorEnd,s=void 0===a?"rgba(255, 255, 255, 0.95)":a,c=e.overlayBgColorStart,l=void 0===c?"rgba(255, 255, 255, 0)":c,u=e.portalEl,p=e.openText,f=void 0===p?"Zoom image":p,m=e.scrollableEl,h=e.transitionDuration,y=void 0===h?300:h,v=e.wrapElement,b=void 0===v?"div":v,g=e.wrapStyle,_=e.zoomMargin,w=void 0===_?0:_,x=e.zoomZindex,O=void 0===x?2147483647:x,j=(0,o.useState)(!1),S=j[0],P=j[1],E=(0,o.useState)(!1),T=E[0],k=E[1],I=(0,o.useRef)(null),M=(0,o.useRef)(null),D=(0,o.useCallback)((function(e){S||(e.preventDefault(),P(!0))}),[S]),C=(0,o.useCallback)((function(){k(!0)}),[]),A=(0,o.useCallback)((function(){P(!1),k(!1),M.current&&M.current.focus({preventScroll:!0})}),[]),N=S&&T?"hidden":"visible";return r().createElement(o.StrictMode,null,r().createElement(b,{"data-rmiz-wrap":N,ref:I,style:g},t,r().createElement("button",{"aria-label":f,"data-rmiz-btn-open":!0,onClick:D,ref:M}),"undefined"!=typeof window&&S&&r().createElement(d,{closeText:i,onLoad:C,onUnload:A,overlayBgColorEnd:s,overlayBgColorStart:l,parentRef:I,portalEl:u,scrollableEl:m,transitionDuration:y,zoomMargin:w,zoomZindex:O},t)))}));var h=n(17568);const y=e=>{var{center:t=!0,width:n,alt:o,src:i,className:s}=e,c=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["center","width","alt","src","className"]);return r().createElement("div",{style:{width:n||"100%"},className:a()(t&&"image_center__6-xCb",s)},r().createElement(m,null,r().createElement(h.BaseImage,Object.assign({fullWidth:!0,alt:o,src:i},c))))};y.__bit_component={id:"teambit.docs/ui/zoomable-image@1.95.0",homepage:"https://bit.dev/teambit/docs/ui/zoomable-image",exported:!0}},56794:(e,t,n)=>{"use strict";Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return o.default}});var o=r(n(18089));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0}},18089:(e,t,n)=>{"use strict";var o={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,p(n(41594));var r=n(5016),i=n(65682),a=p(n(78199)),s=p(n(37080)),c=p(n(50758)),l=n(75608),u=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,o,r=m(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o;var h={},y="wrapper";function v(e){var t=e.components,n=d(e,u);return(0,r.mdx)(y,f({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{scopeImage:a.default,scopeGraph:s.default,componentTypes:c.default,Image:l.Image},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Scope Overview"),(0,r.mdx)("p",null,"Scope is a server for hosting components. Scopes help teams to share and use each other's components as by preserving team autonomy through versioning, forking, storing dependencies, and collaborate on changes of independent components.\nScopes defines ownership on components, as a single team owns the components exported to scope."),(0,r.mdx)(l.Image,{width:"70%",src:a.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Full stack of functionality"),(0,r.mdx)("p",null,"Scopes host components of any kind, from React, Angular and Node modules, all the way to a frontend apps or microservices. For a scope they are all Bit Components.",(0,r.mdx)("br",{parentName:"p"}),"\n","For example, the ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev/teambit/mdx"},"MDX scope"),' contains all components relevant to handling MDX functionality in Bit. It exposes various types of components (or "APIs") to achieve this: Webpack loader, Node modules, React components and even a ',(0,r.mdx)("a",{parentName:"p",href:"/"},"Bit Aspect"),". This makes it easy for other teams to take leverage of MDX, not just as a feature but also as an API for their features."),(0,r.mdx)("p",null,"Scopes support various methods for using components, from adding as dependencies to runtime integrations, allowing the consumer to decide how whats the best solution for their use case."),(0,r.mdx)(l.Image,{width:"70%",src:c.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Team collaboration using components"),(0,r.mdx)("p",null,"Scopes provides visibility to components built by other teams, this is the first step towards better collaboration. Developers can find, use and depend on components by other teams. Instead of reinventing the wheel and rebuilding the same functionality, component visibility drives for collaboration. It is similar to how teams build with microservices and build team communication and collaboration by using each-other's APIs.",(0,r.mdx)("br",{parentName:"p"}),"\n","Moreover, developers can use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," and access to any component's source code and contribute change to collaborate on components."),(0,r.mdx)("p",null,"Bit keeps track on all these dependencies and flows, making team collaboration visible, easy to extend and optimize."),(0,r.mdx)(l.Image,{width:"70%",src:s.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Distributed and autonomous"),(0,r.mdx)("p",null,"Hosted scopes form a distributed network, where each scope is connected to the other scopes according to component dependencies. Each scope stores not only the components it hosts, but also the dependencies of those components.",(0,r.mdx)("br",{parentName:"p"}),"\n","When you export a component, the scope then does network calls to fetch the dependencies of the component from their respective scopes. This means that each scope becomes autonomous, as it contains all the dependencies needed to its components to run. In turn this makes teams more autonomous, as they can now build and use their components without having to worry about the dependencies."),(0,r.mdx)("p",null,"Scopes use standard HTTP for inner-scope communication, however, when building a network of scopes, you need to ensure scopes are able to connect to one another to fetch dependencies."),(0,r.mdx)("h2",null,"Source of truth"),(0,r.mdx)("p",null,"Scopes become the source of truth for components. Allowing different stakeholders to collaborate and work together from the same, or from different Workspaces.\nComponents can be maintained from multiple Workspaces in parallel, while Scopes are keeping them in sync, merging changes for all ends."),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," can be used to fetch component updates. Using ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," is similar to using ",(0,r.mdx)("inlineCode",{parentName:"p"},"git fetch")," where new objects are being fetched but not checked out in your workspace. "),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit import\n⡃⢐ fetching 143 components from 18 remotes. delta-only: 143, all-history: 0.\n- up to date teambit.community/ui/hero \n- up to date teambit.community/ui/homepage/sections/distribution \n- updated teambit.design/ui/layouts/sections/left-right \n- updated teambit.design/ui/layouts/sections/section-group \n- updated teambit.design/ui/layouts/sections/top-down \n")),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit export")," is used to share component changes with others. It pushes new objects from a local Workspace to a remote Scope, allowing others to keep in sync with the latest\ncomponent changes."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit export\nexported 8 components successfully to remote scope `community`\n"))))}v.__bit_component=o,v.isMDXComponent=!0},16492:(e,t,n)=>{"use strict";var o={id:"teambit.scope/scope@1.0.460",homepage:"https://bit.cloud/teambit/scope/scope",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/scope.svg"}));a.__bit_component=o,t.Logo=a},10388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__sELLz"}},50758:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/3a1072c009accd203fa8.png"},37080:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/ccf5ea377e3a1a72829d.png"},78199:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/aef2176d16de53259dad.png"},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React},65682:e=>{"use strict";e.exports=TeambitMdxUiMdxScopeContext},67046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>N,__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>j,__asyncValues:()=>P,__await:()=>O,__awaiter:()=>m,__classPrivateFieldGet:()=>D,__classPrivateFieldIn:()=>A,__classPrivateFieldSet:()=>C,__createBinding:()=>y,__decorate:()=>s,__disposeResources:()=>B,__esDecorate:()=>l,__exportStar:()=>v,__extends:()=>r,__generator:()=>h,__importDefault:()=>M,__importStar:()=>I,__makeTemplateObject:()=>E,__metadata:()=>d,__param:()=>c,__propKey:()=>p,__read:()=>g,__rest:()=>a,__rewriteRelativeImportExtension:()=>R,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>_,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>b,default:()=>L});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function s(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,o){t(n,o,e)}}function l(e,t,n,o,r,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?o.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,o.name):{}),f=!1,d=n.length-1;d>=0;d--){var m={};for(var h in o)m[h]="access"===h?{}:o[h];for(var h in o.access)m.access[h]=o.access[h];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[d])("accessor"===c?{get:p.get,set:p.set}:p[l],m);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(p.get=s),(s=a(y.set))&&(p.set=s),(s=a(y.init))&&r.unshift(s)}else(s=a(y))&&("field"===c?r.unshift(s):p[l]=s)}u&&Object.defineProperty(u,o.name,p),f=!0}function u(e,t,n){for(var o=arguments.length>2,r=0;r<t.length;r++)n=o?t[r].call(e,n):t[r].call(e);return o?n:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function h(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o}function x(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),i=[];return o=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),o[Symbol.asyncIterator]=function(){return this},o;function a(e,t){r[e]&&(o[e]=function(t){return new Promise((function(n,o){i.push([e,t,n,o])>1||s(e,t)}))},t&&(o[e]=t(o[e])))}function s(e,t){try{(n=r[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:O(e[o](t)),done:!1}:r?r(t):t}:r}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},k=function(e){return k=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},k(e)};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=k(e),o=0;o<n.length;o++)"default"!==n[o]&&y(t,e,n[o]);return T(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function D(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function C(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}function A(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],n&&(r=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");r&&(o=function(){try{r.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t}var z="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o};function B(e){function t(t){e.error=e.hasError?new z(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,o=0;return function r(){for(;n=e.stack.pop();)try{if(!n.async&&1===o)return o=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(r,(function(e){return t(e),r()}))}else o|=1}catch(e){t(e)}if(1===o)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function R(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,o,r,i){return n?t?".jsx":".js":!o||r&&i?o+r+"."+i.toLowerCase()+"js":e})):e}const L={__extends:r,__assign:i,__rest:a,__decorate:s,__param:c,__esDecorate:l,__runInitializers:u,__propKey:p,__setFunctionName:f,__metadata:d,__awaiter:m,__generator:h,__createBinding:y,__exportStar:v,__values:b,__read:g,__spread:_,__spreadArrays:w,__spreadArray:x,__await:O,__asyncGenerator:j,__asyncDelegator:S,__asyncValues:P,__makeTemplateObject:E,__importStar:I,__importDefault:M,__classPrivateFieldGet:D,__classPrivateFieldSet:C,__classPrivateFieldIn:A,__addDisposableResource:N,__disposeResources:B,__rewriteRelativeImportExtension:R}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var r=o.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(16492),r=(n(41594),n(5016)),i=n(65682),a=n(56794),s=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}var l={},u="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,s);return(0,r.mdx)(u,c({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{ScopeOverview:a.Ay},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.Ay,{mdxType:"ScopeOverview"})))}p.isMDXComponent=!0;const f=[t],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),o})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.scope/scope-preview"]=t():e["teambit.scope/scope-preview"]=t()}(self,(()=>(()=>{var e={88443:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=r.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},69685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},78552:()=>{!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(e){}void 0!==HTMLElement.prototype.nativeFocus||e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)})}}()},41486:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNavigator=t.isBrowser=t.off=t.on=t.noop=void 0,t.noop=function(){},t.on=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)},t.off=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)},t.isBrowser="undefined"!=typeof window,t.isNavigator="undefined"!=typeof navigator},97364:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(41594);t.default=function(e){o.useEffect(e,[])}},7654:(e,t,n)=>{"use strict";var o=n(41594),r=n(41486),i=r.isBrowser?window:null,a=function(e){return!!e.addEventListener},s=function(e){return!!e.on};t.A=function(e,t,n,c){void 0===n&&(n=i),o.useEffect((function(){if(t&&n)return a(n)?r.on(n,e,t,c):s(n)&&n.on(e,t,c),function(){a(n)?r.off(n,e,t,c):s(n)&&n.off(e,t,c)}}),[e,t,n,JSON.stringify(c)])}},32818:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(67046),r=n(41594),i=o.__importDefault(n(47542));t.default=function(e){var t=r.useRef(0),n=r.useState(e),o=n[0],a=n[1],s=r.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[o,s]}},47542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(67046),r=n(41594),i=o.__importDefault(n(97364));t.default=function(e){var t=r.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},99801:(e,t,n)=>{"use strict";var o=n(67046),r=n(41594),i=o.__importDefault(n(32818)),a=n(41486);t.A=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isBrowser?window.innerWidth:e,height:a.isBrowser?window.innerHeight:t}),o=n[0],s=n[1];return r.useEffect((function(){if(a.isBrowser){var e=function(){s({width:window.innerWidth,height:window.innerHeight})};return a.on(window,"resize",e),function(){a.off(window,"resize",e)}}}),[]),o}},24269:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImage=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(10388));function c(e){var{alt:t,className:n,fullWidth:r}=e,c=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},c,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}c.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=c},17568:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(24269),t)},75608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>y});var o=n(41594),r=n.n(o),i=n(69685),a=n.n(i);n(78552);const s=ReactDom;var c=n(7654),l=n(99801),u=n(67046),p=function(e){return e+"ms"},f={getBoundingClientRect:function(){return{height:0,left:0,top:0,width:0}},style:{transform:null}},d=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom Image":n,a=e.onUnload,d=e.onLoad,m=e.overlayBgColorEnd,h=void 0===m?"rgba(255, 255, 255, 0.95)":m,y=e.overlayBgColorStart,v=void 0===y?"rgba(255, 255, 255, 0)":y,b=e.parentRef,g=e.portalEl,_=void 0===g?document.body:g,w=e.scrollableEl,x=void 0===w?window:w,O=e.transitionDuration,j=void 0===O?300:O,S=e.zoomMargin,P=void 0===S?0:S,E=e.zoomZindex,T=void 0===E?2147483647:E,k=(0,o.useRef)(null),I=(0,o.useState)(0)[1],M=(0,o.useState)(!1),D=M[0],C=M[1],A=(0,o.useState)(!1),N=A[0],z=A[1],B=(0,l.A)(),R=B.width,L=B.height,F=(0,o.useCallback)((function(e){e.preventDefault(),z(!0)}),[]),W=(0,o.useCallback)((function(e){"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),z(!0))}),[]),H=(0,o.useCallback)((function(){I((function(e){return e+1})),N||z(!0)}),[N]);(0,c.A)("keydown",W,document),(0,c.A)("scroll",H,x),(0,o.useEffect)((function(){C(!0),d(),k.current&&k.current.focus({preventScroll:!0})}),[d]),(0,o.useEffect)((function(){var e=N?setTimeout(a,j):null;return function(){e&&clearTimeout(e)}}),[N,a,j]);var X=b.current||f,U=X.getBoundingClientRect(),$=U.height,G=U.left,Z=U.top,J=U.width,K=function(e){var t=e.isLoaded,n=e.isUnloading,o=e.overlayBgColorEnd,r=e.zoomZindex,i={backgroundColor:e.overlayBgColorStart,transitionDuration:p(e.transitionDuration),zIndex:r};return t&&!n&&(i.backgroundColor=o),i}({isLoaded:D,isUnloading:N,overlayBgColorEnd:h,overlayBgColorStart:v,transitionDuration:j,zoomZindex:T}),V=function(e){var t=e.height,n=e.innerHeight,o=e.innerWidth,r=e.isLoaded,i=e.isUnloading,a=e.left,s=e.originalTransform,c=e.top,l=e.transitionDuration,f=e.width,d=e.zoomMargin,m=p(l);if(!r||i){var h=(0,u.__spreadArrays)(["scale(1)","translate(0, 0)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:h,WebkitTransform:h,transitionDuration:m,width:f}}var y=function(e){var t=e.zoomMargin,n=e.innerWidth/(e.width+t),o=e.innerHeight/(e.height+t);return Math.min(n,o)}({height:t,innerWidth:o,innerHeight:n,width:f,zoomMargin:d}),v=(o/2-(a+f/2))/y,b=(n/2-(c+t/2))/y,g=(0,u.__spreadArrays)(["scale("+y+")","translate("+v+"px, "+b+"px)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:g,WebkitTransform:g,transitionDuration:m,width:f}}({height:$,isLoaded:D,innerHeight:L,innerWidth:R,isUnloading:N,left:G,originalTransform:X.style.transform,top:Z,transitionDuration:j,width:J,zoomMargin:P});return(0,s.createPortal)(r().createElement("div",{"aria-modal":!0,"data-rmiz-overlay":!0,role:"dialog",style:K},r().createElement("div",{"data-rmiz-modal-content":!0,style:V},t),r().createElement("button",{"aria-label":i,"data-rmiz-btn-close":!0,onClick:F,ref:k})),_)}));const m=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom image":n,a=e.overlayBgColorEnd,s=void 0===a?"rgba(255, 255, 255, 0.95)":a,c=e.overlayBgColorStart,l=void 0===c?"rgba(255, 255, 255, 0)":c,u=e.portalEl,p=e.openText,f=void 0===p?"Zoom image":p,m=e.scrollableEl,h=e.transitionDuration,y=void 0===h?300:h,v=e.wrapElement,b=void 0===v?"div":v,g=e.wrapStyle,_=e.zoomMargin,w=void 0===_?0:_,x=e.zoomZindex,O=void 0===x?2147483647:x,j=(0,o.useState)(!1),S=j[0],P=j[1],E=(0,o.useState)(!1),T=E[0],k=E[1],I=(0,o.useRef)(null),M=(0,o.useRef)(null),D=(0,o.useCallback)((function(e){S||(e.preventDefault(),P(!0))}),[S]),C=(0,o.useCallback)((function(){k(!0)}),[]),A=(0,o.useCallback)((function(){P(!1),k(!1),M.current&&M.current.focus({preventScroll:!0})}),[]),N=S&&T?"hidden":"visible";return r().createElement(o.StrictMode,null,r().createElement(b,{"data-rmiz-wrap":N,ref:I,style:g},t,r().createElement("button",{"aria-label":f,"data-rmiz-btn-open":!0,onClick:D,ref:M}),"undefined"!=typeof window&&S&&r().createElement(d,{closeText:i,onLoad:C,onUnload:A,overlayBgColorEnd:s,overlayBgColorStart:l,parentRef:I,portalEl:u,scrollableEl:m,transitionDuration:y,zoomMargin:w,zoomZindex:O},t)))}));var h=n(17568);const y=e=>{var{center:t=!0,width:n,alt:o,src:i,className:s}=e,c=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["center","width","alt","src","className"]);return r().createElement("div",{style:{width:n||"100%"},className:a()(t&&"image_center__6-xCb",s)},r().createElement(m,null,r().createElement(h.BaseImage,Object.assign({fullWidth:!0,alt:o,src:i},c))))};y.__bit_component={id:"teambit.docs/ui/zoomable-image@1.95.0",homepage:"https://bit.dev/teambit/docs/ui/zoomable-image",exported:!0}},56794:(e,t,n)=>{"use strict";Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return o.default}});var o=r(n(18089));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0}},18089:(e,t,n)=>{"use strict";var o={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,p(n(41594));var r=n(5016),i=n(65682),a=p(n(78199)),s=p(n(37080)),c=p(n(50758)),l=n(75608),u=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,o,r=m(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o;var h={},y="wrapper";function v(e){var t=e.components,n=d(e,u);return(0,r.mdx)(y,f({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{scopeImage:a.default,scopeGraph:s.default,componentTypes:c.default,Image:l.Image},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Scope Overview"),(0,r.mdx)("p",null,"Scope is a server for hosting components. Scopes help teams to share and use each other's components as by preserving team autonomy through versioning, forking, storing dependencies, and collaborate on changes of independent components.\nScopes defines ownership on components, as a single team owns the components exported to scope."),(0,r.mdx)(l.Image,{width:"70%",src:a.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Full stack of functionality"),(0,r.mdx)("p",null,"Scopes host components of any kind, from React, Angular and Node modules, all the way to a frontend apps or microservices. For a scope they are all Bit Components.",(0,r.mdx)("br",{parentName:"p"}),"\n","For example, the ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev/teambit/mdx"},"MDX scope"),' contains all components relevant to handling MDX functionality in Bit. It exposes various types of components (or "APIs") to achieve this: Webpack loader, Node modules, React components and even a ',(0,r.mdx)("a",{parentName:"p",href:"/"},"Bit Aspect"),". This makes it easy for other teams to take leverage of MDX, not just as a feature but also as an API for their features."),(0,r.mdx)("p",null,"Scopes support various methods for using components, from adding as dependencies to runtime integrations, allowing the consumer to decide how whats the best solution for their use case."),(0,r.mdx)(l.Image,{width:"70%",src:c.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Team collaboration using components"),(0,r.mdx)("p",null,"Scopes provides visibility to components built by other teams, this is the first step towards better collaboration. Developers can find, use and depend on components by other teams. Instead of reinventing the wheel and rebuilding the same functionality, component visibility drives for collaboration. It is similar to how teams build with microservices and build team communication and collaboration by using each-other's APIs.",(0,r.mdx)("br",{parentName:"p"}),"\n","Moreover, developers can use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," and access to any component's source code and contribute change to collaborate on components."),(0,r.mdx)("p",null,"Bit keeps track on all these dependencies and flows, making team collaboration visible, easy to extend and optimize."),(0,r.mdx)(l.Image,{width:"70%",src:s.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Distributed and autonomous"),(0,r.mdx)("p",null,"Hosted scopes form a distributed network, where each scope is connected to the other scopes according to component dependencies. Each scope stores not only the components it hosts, but also the dependencies of those components.",(0,r.mdx)("br",{parentName:"p"}),"\n","When you export a component, the scope then does network calls to fetch the dependencies of the component from their respective scopes. This means that each scope becomes autonomous, as it contains all the dependencies needed to its components to run. In turn this makes teams more autonomous, as they can now build and use their components without having to worry about the dependencies."),(0,r.mdx)("p",null,"Scopes use standard HTTP for inner-scope communication, however, when building a network of scopes, you need to ensure scopes are able to connect to one another to fetch dependencies."),(0,r.mdx)("h2",null,"Source of truth"),(0,r.mdx)("p",null,"Scopes become the source of truth for components. Allowing different stakeholders to collaborate and work together from the same, or from different Workspaces.\nComponents can be maintained from multiple Workspaces in parallel, while Scopes are keeping them in sync, merging changes for all ends."),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," can be used to fetch component updates. Using ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," is similar to using ",(0,r.mdx)("inlineCode",{parentName:"p"},"git fetch")," where new objects are being fetched but not checked out in your workspace. "),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit import\n⡃⢐ fetching 143 components from 18 remotes. delta-only: 143, all-history: 0.\n- up to date teambit.community/ui/hero \n- up to date teambit.community/ui/homepage/sections/distribution \n- updated teambit.design/ui/layouts/sections/left-right \n- updated teambit.design/ui/layouts/sections/section-group \n- updated teambit.design/ui/layouts/sections/top-down \n")),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit export")," is used to share component changes with others. It pushes new objects from a local Workspace to a remote Scope, allowing others to keep in sync with the latest\ncomponent changes."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit export\nexported 8 components successfully to remote scope `community`\n"))))}v.__bit_component=o,v.isMDXComponent=!0},93849:(e,t,n)=>{"use strict";var o={id:"teambit.scope/scope@1.0.461",homepage:"https://bit.cloud/teambit/scope/scope",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/scope.svg"}));a.__bit_component=o,t.Logo=a},10388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__sELLz"}},50758:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/3a1072c009accd203fa8.png"},37080:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/ccf5ea377e3a1a72829d.png"},78199:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/aef2176d16de53259dad.png"},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React},65682:e=>{"use strict";e.exports=TeambitMdxUiMdxScopeContext},67046:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>N,__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>j,__asyncValues:()=>P,__await:()=>O,__awaiter:()=>m,__classPrivateFieldGet:()=>D,__classPrivateFieldIn:()=>A,__classPrivateFieldSet:()=>C,__createBinding:()=>y,__decorate:()=>s,__disposeResources:()=>B,__esDecorate:()=>l,__exportStar:()=>v,__extends:()=>r,__generator:()=>h,__importDefault:()=>M,__importStar:()=>I,__makeTemplateObject:()=>E,__metadata:()=>d,__param:()=>c,__propKey:()=>p,__read:()=>g,__rest:()=>a,__rewriteRelativeImportExtension:()=>R,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>_,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>b,default:()=>L});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function s(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,o){t(n,o,e)}}function l(e,t,n,o,r,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?o.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,o.name):{}),f=!1,d=n.length-1;d>=0;d--){var m={};for(var h in o)m[h]="access"===h?{}:o[h];for(var h in o.access)m.access[h]=o.access[h];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[d])("accessor"===c?{get:p.get,set:p.set}:p[l],m);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(p.get=s),(s=a(y.set))&&(p.set=s),(s=a(y.init))&&r.unshift(s)}else(s=a(y))&&("field"===c?r.unshift(s):p[l]=s)}u&&Object.defineProperty(u,o.name,p),f=!0}function u(e,t,n){for(var o=arguments.length>2,r=0;r<t.length;r++)n=o?t[r].call(e,n):t[r].call(e);return o?n:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function h(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o}function x(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),i=[];return o=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),o[Symbol.asyncIterator]=function(){return this},o;function a(e,t){r[e]&&(o[e]=function(t){return new Promise((function(n,o){i.push([e,t,n,o])>1||s(e,t)}))},t&&(o[e]=t(o[e])))}function s(e,t){try{(n=r[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:O(e[o](t)),done:!1}:r?r(t):t}:r}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},k=function(e){return k=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},k(e)};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=k(e),o=0;o<n.length;o++)"default"!==n[o]&&y(t,e,n[o]);return T(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function D(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function C(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}function A(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],n&&(r=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");r&&(o=function(){try{r.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t}var z="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o};function B(e){function t(t){e.error=e.hasError?new z(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,o=0;return function r(){for(;n=e.stack.pop();)try{if(!n.async&&1===o)return o=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(r,(function(e){return t(e),r()}))}else o|=1}catch(e){t(e)}if(1===o)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function R(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,o,r,i){return n?t?".jsx":".js":!o||r&&i?o+r+"."+i.toLowerCase()+"js":e})):e}const L={__extends:r,__assign:i,__rest:a,__decorate:s,__param:c,__esDecorate:l,__runInitializers:u,__propKey:p,__setFunctionName:f,__metadata:d,__awaiter:m,__generator:h,__createBinding:y,__exportStar:v,__values:b,__read:g,__spread:_,__spreadArrays:w,__spreadArray:x,__await:O,__asyncGenerator:j,__asyncDelegator:S,__asyncValues:P,__makeTemplateObject:E,__importStar:I,__importDefault:M,__classPrivateFieldGet:D,__classPrivateFieldSet:C,__classPrivateFieldIn:A,__addDisposableResource:N,__disposeResources:B,__rewriteRelativeImportExtension:R}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var r=o.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(93849),r=(n(41594),n(5016)),i=n(65682),a=n(56794),s=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}var l={},u="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,s);return(0,r.mdx)(u,c({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{ScopeOverview:a.Ay},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.Ay,{mdxType:"ScopeOverview"})))}p.isMDXComponent=!0;const f=[t],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),o})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"_legacy": {
|
|
102
102
|
"scope": "teambit.scope",
|
|
103
103
|
"name": "scope",
|
|
104
|
-
"version": "1.0.
|
|
104
|
+
"version": "1.0.461"
|
|
105
105
|
},
|
|
106
106
|
"_scope": "teambit.scope"
|
|
107
107
|
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"_legacy": {
|
|
196
196
|
"scope": "teambit.scope",
|
|
197
197
|
"name": "scope",
|
|
198
|
-
"version": "1.0.
|
|
198
|
+
"version": "1.0.461"
|
|
199
199
|
},
|
|
200
200
|
"_scope": "teambit.scope"
|
|
201
201
|
}
|
|
@@ -8176,7 +8176,7 @@
|
|
|
8176
8176
|
"_legacy": {
|
|
8177
8177
|
"scope": "teambit.scope",
|
|
8178
8178
|
"name": "scope",
|
|
8179
|
-
"version": "1.0.
|
|
8179
|
+
"version": "1.0.461"
|
|
8180
8180
|
},
|
|
8181
8181
|
"_scope": "teambit.scope"
|
|
8182
8182
|
}
|
|
@@ -8581,6 +8581,73 @@
|
|
|
8581
8581
|
"line": 51,
|
|
8582
8582
|
"character": 3
|
|
8583
8583
|
},
|
|
8584
|
+
"signature": "(method) StagedConfig.getPerId(id: ComponentID): ComponentConfig | undefined",
|
|
8585
|
+
"name": "getPerId",
|
|
8586
|
+
"params": [
|
|
8587
|
+
{
|
|
8588
|
+
"__schema": "ParameterSchema",
|
|
8589
|
+
"location": {
|
|
8590
|
+
"filePath": "staged-config.ts",
|
|
8591
|
+
"line": 51,
|
|
8592
|
+
"character": 12
|
|
8593
|
+
},
|
|
8594
|
+
"name": "id",
|
|
8595
|
+
"type": {
|
|
8596
|
+
"__schema": "TypeRefSchema",
|
|
8597
|
+
"location": {
|
|
8598
|
+
"filePath": "staged-config.ts",
|
|
8599
|
+
"line": 51,
|
|
8600
|
+
"character": 16
|
|
8601
|
+
},
|
|
8602
|
+
"name": "ComponentID",
|
|
8603
|
+
"componentId": {
|
|
8604
|
+
"scope": "teambit.component",
|
|
8605
|
+
"name": "component-id",
|
|
8606
|
+
"version": "1.2.2"
|
|
8607
|
+
}
|
|
8608
|
+
},
|
|
8609
|
+
"isOptional": false,
|
|
8610
|
+
"isSpread": false
|
|
8611
|
+
}
|
|
8612
|
+
],
|
|
8613
|
+
"returnType": {
|
|
8614
|
+
"__schema": "TypeUnionSchema",
|
|
8615
|
+
"location": {
|
|
8616
|
+
"filePath": "staged-config.ts",
|
|
8617
|
+
"line": 51,
|
|
8618
|
+
"character": 30
|
|
8619
|
+
},
|
|
8620
|
+
"types": [
|
|
8621
|
+
{
|
|
8622
|
+
"__schema": "TypeRefSchema",
|
|
8623
|
+
"location": {
|
|
8624
|
+
"filePath": "staged-config.ts",
|
|
8625
|
+
"line": 51,
|
|
8626
|
+
"character": 30
|
|
8627
|
+
},
|
|
8628
|
+
"name": "ComponentConfig",
|
|
8629
|
+
"internalFilePath": "staged-config.ts"
|
|
8630
|
+
},
|
|
8631
|
+
{
|
|
8632
|
+
"__schema": "KeywordTypeSchema",
|
|
8633
|
+
"location": {
|
|
8634
|
+
"filePath": "staged-config.ts",
|
|
8635
|
+
"line": 51,
|
|
8636
|
+
"character": 48
|
|
8637
|
+
},
|
|
8638
|
+
"name": "undefined"
|
|
8639
|
+
}
|
|
8640
|
+
]
|
|
8641
|
+
},
|
|
8642
|
+
"modifiers": []
|
|
8643
|
+
},
|
|
8644
|
+
{
|
|
8645
|
+
"__schema": "FunctionLikeSchema",
|
|
8646
|
+
"location": {
|
|
8647
|
+
"filePath": "staged-config.ts",
|
|
8648
|
+
"line": 55,
|
|
8649
|
+
"character": 3
|
|
8650
|
+
},
|
|
8584
8651
|
"signature": "(method) StagedConfig.getAll(): ComponentConfig[]",
|
|
8585
8652
|
"name": "getAll",
|
|
8586
8653
|
"params": [],
|
|
@@ -8588,7 +8655,7 @@
|
|
|
8588
8655
|
"__schema": "InferenceTypeSchema",
|
|
8589
8656
|
"location": {
|
|
8590
8657
|
"filePath": "staged-config.ts",
|
|
8591
|
-
"line":
|
|
8658
|
+
"line": 55,
|
|
8592
8659
|
"character": 3
|
|
8593
8660
|
},
|
|
8594
8661
|
"type": "ComponentConfig[]"
|
|
@@ -8599,7 +8666,7 @@
|
|
|
8599
8666
|
"__schema": "FunctionLikeSchema",
|
|
8600
8667
|
"location": {
|
|
8601
8668
|
"filePath": "staged-config.ts",
|
|
8602
|
-
"line":
|
|
8669
|
+
"line": 59,
|
|
8603
8670
|
"character": 3
|
|
8604
8671
|
},
|
|
8605
8672
|
"signature": "(method) StagedConfig.isEmpty(): boolean",
|
|
@@ -8609,7 +8676,7 @@
|
|
|
8609
8676
|
"__schema": "InferenceTypeSchema",
|
|
8610
8677
|
"location": {
|
|
8611
8678
|
"filePath": "staged-config.ts",
|
|
8612
|
-
"line":
|
|
8679
|
+
"line": 59,
|
|
8613
8680
|
"character": 3
|
|
8614
8681
|
},
|
|
8615
8682
|
"type": "boolean"
|
|
@@ -8620,7 +8687,7 @@
|
|
|
8620
8687
|
"__schema": "FunctionLikeSchema",
|
|
8621
8688
|
"location": {
|
|
8622
8689
|
"filePath": "staged-config.ts",
|
|
8623
|
-
"line":
|
|
8690
|
+
"line": 63,
|
|
8624
8691
|
"character": 3
|
|
8625
8692
|
},
|
|
8626
8693
|
"signature": "(method) StagedConfig.deleteFile(): Promise<void>",
|
|
@@ -8630,7 +8697,7 @@
|
|
|
8630
8697
|
"__schema": "InferenceTypeSchema",
|
|
8631
8698
|
"location": {
|
|
8632
8699
|
"filePath": "staged-config.ts",
|
|
8633
|
-
"line":
|
|
8700
|
+
"line": 63,
|
|
8634
8701
|
"character": 3
|
|
8635
8702
|
},
|
|
8636
8703
|
"type": "Promise<void>"
|
|
@@ -8643,17 +8710,17 @@
|
|
|
8643
8710
|
"__schema": "FunctionLikeSchema",
|
|
8644
8711
|
"location": {
|
|
8645
8712
|
"filePath": "staged-config.ts",
|
|
8646
|
-
"line":
|
|
8713
|
+
"line": 69,
|
|
8647
8714
|
"character": 3
|
|
8648
8715
|
},
|
|
8649
|
-
"signature": "(method) StagedConfig.addComponentConfig(id: ComponentID, config: Config): void",
|
|
8716
|
+
"signature": "(method) StagedConfig.addComponentConfig(id: ComponentID, config: Config, componentMapObject: Record<string, any>): void",
|
|
8650
8717
|
"name": "addComponentConfig",
|
|
8651
8718
|
"params": [
|
|
8652
8719
|
{
|
|
8653
8720
|
"__schema": "ParameterSchema",
|
|
8654
8721
|
"location": {
|
|
8655
8722
|
"filePath": "staged-config.ts",
|
|
8656
|
-
"line":
|
|
8723
|
+
"line": 69,
|
|
8657
8724
|
"character": 22
|
|
8658
8725
|
},
|
|
8659
8726
|
"name": "id",
|
|
@@ -8661,7 +8728,7 @@
|
|
|
8661
8728
|
"__schema": "TypeRefSchema",
|
|
8662
8729
|
"location": {
|
|
8663
8730
|
"filePath": "staged-config.ts",
|
|
8664
|
-
"line":
|
|
8731
|
+
"line": 69,
|
|
8665
8732
|
"character": 26
|
|
8666
8733
|
},
|
|
8667
8734
|
"name": "ComponentID",
|
|
@@ -8678,7 +8745,7 @@
|
|
|
8678
8745
|
"__schema": "ParameterSchema",
|
|
8679
8746
|
"location": {
|
|
8680
8747
|
"filePath": "staged-config.ts",
|
|
8681
|
-
"line":
|
|
8748
|
+
"line": 69,
|
|
8682
8749
|
"character": 39
|
|
8683
8750
|
},
|
|
8684
8751
|
"name": "config",
|
|
@@ -8686,7 +8753,7 @@
|
|
|
8686
8753
|
"__schema": "TypeRefSchema",
|
|
8687
8754
|
"location": {
|
|
8688
8755
|
"filePath": "staged-config.ts",
|
|
8689
|
-
"line":
|
|
8756
|
+
"line": 69,
|
|
8690
8757
|
"character": 47
|
|
8691
8758
|
},
|
|
8692
8759
|
"name": "Config",
|
|
@@ -8694,13 +8761,53 @@
|
|
|
8694
8761
|
},
|
|
8695
8762
|
"isOptional": false,
|
|
8696
8763
|
"isSpread": false
|
|
8764
|
+
},
|
|
8765
|
+
{
|
|
8766
|
+
"__schema": "ParameterSchema",
|
|
8767
|
+
"location": {
|
|
8768
|
+
"filePath": "staged-config.ts",
|
|
8769
|
+
"line": 69,
|
|
8770
|
+
"character": 55
|
|
8771
|
+
},
|
|
8772
|
+
"name": "componentMapObject",
|
|
8773
|
+
"type": {
|
|
8774
|
+
"__schema": "TypeRefSchema",
|
|
8775
|
+
"location": {
|
|
8776
|
+
"filePath": "staged-config.ts",
|
|
8777
|
+
"line": 69,
|
|
8778
|
+
"character": 75
|
|
8779
|
+
},
|
|
8780
|
+
"name": "Record",
|
|
8781
|
+
"typeArgs": [
|
|
8782
|
+
{
|
|
8783
|
+
"__schema": "KeywordTypeSchema",
|
|
8784
|
+
"location": {
|
|
8785
|
+
"filePath": "staged-config.ts",
|
|
8786
|
+
"line": 69,
|
|
8787
|
+
"character": 82
|
|
8788
|
+
},
|
|
8789
|
+
"name": "string"
|
|
8790
|
+
},
|
|
8791
|
+
{
|
|
8792
|
+
"__schema": "KeywordTypeSchema",
|
|
8793
|
+
"location": {
|
|
8794
|
+
"filePath": "staged-config.ts",
|
|
8795
|
+
"line": 69,
|
|
8796
|
+
"character": 90
|
|
8797
|
+
},
|
|
8798
|
+
"name": "any"
|
|
8799
|
+
}
|
|
8800
|
+
]
|
|
8801
|
+
},
|
|
8802
|
+
"isOptional": false,
|
|
8803
|
+
"isSpread": false
|
|
8697
8804
|
}
|
|
8698
8805
|
],
|
|
8699
8806
|
"returnType": {
|
|
8700
8807
|
"__schema": "InferenceTypeSchema",
|
|
8701
8808
|
"location": {
|
|
8702
8809
|
"filePath": "staged-config.ts",
|
|
8703
|
-
"line":
|
|
8810
|
+
"line": 69,
|
|
8704
8811
|
"character": 3
|
|
8705
8812
|
},
|
|
8706
8813
|
"type": "void"
|
|
@@ -8711,7 +8818,7 @@
|
|
|
8711
8818
|
"__schema": "FunctionLikeSchema",
|
|
8712
8819
|
"location": {
|
|
8713
8820
|
"filePath": "staged-config.ts",
|
|
8714
|
-
"line":
|
|
8821
|
+
"line": 79,
|
|
8715
8822
|
"character": 3
|
|
8716
8823
|
},
|
|
8717
8824
|
"signature": "(method) StagedConfig.removeComponentConfig(id: ComponentID): void",
|
|
@@ -8721,7 +8828,7 @@
|
|
|
8721
8828
|
"__schema": "ParameterSchema",
|
|
8722
8829
|
"location": {
|
|
8723
8830
|
"filePath": "staged-config.ts",
|
|
8724
|
-
"line":
|
|
8831
|
+
"line": 79,
|
|
8725
8832
|
"character": 25
|
|
8726
8833
|
},
|
|
8727
8834
|
"name": "id",
|
|
@@ -8729,7 +8836,7 @@
|
|
|
8729
8836
|
"__schema": "TypeRefSchema",
|
|
8730
8837
|
"location": {
|
|
8731
8838
|
"filePath": "staged-config.ts",
|
|
8732
|
-
"line":
|
|
8839
|
+
"line": 79,
|
|
8733
8840
|
"character": 29
|
|
8734
8841
|
},
|
|
8735
8842
|
"name": "ComponentID",
|
|
@@ -8747,7 +8854,7 @@
|
|
|
8747
8854
|
"__schema": "InferenceTypeSchema",
|
|
8748
8855
|
"location": {
|
|
8749
8856
|
"filePath": "staged-config.ts",
|
|
8750
|
-
"line":
|
|
8857
|
+
"line": 79,
|
|
8751
8858
|
"character": 3
|
|
8752
8859
|
},
|
|
8753
8860
|
"type": "void"
|
|
@@ -11066,7 +11173,7 @@
|
|
|
11066
11173
|
"_legacy": {
|
|
11067
11174
|
"scope": "teambit.scope",
|
|
11068
11175
|
"name": "scope",
|
|
11069
|
-
"version": "1.0.
|
|
11176
|
+
"version": "1.0.461"
|
|
11070
11177
|
},
|
|
11071
11178
|
"_scope": "teambit.scope"
|
|
11072
11179
|
}
|
|
@@ -20180,7 +20287,7 @@
|
|
|
20180
20287
|
"_legacy": {
|
|
20181
20288
|
"scope": "teambit.scope",
|
|
20182
20289
|
"name": "scope",
|
|
20183
|
-
"version": "1.0.
|
|
20290
|
+
"version": "1.0.461"
|
|
20184
20291
|
},
|
|
20185
20292
|
"_scope": "teambit.scope"
|
|
20186
20293
|
}
|
|
@@ -21201,6 +21308,73 @@
|
|
|
21201
21308
|
"line": 51,
|
|
21202
21309
|
"character": 3
|
|
21203
21310
|
},
|
|
21311
|
+
"signature": "(method) StagedConfig.getPerId(id: ComponentID): ComponentConfig | undefined",
|
|
21312
|
+
"name": "getPerId",
|
|
21313
|
+
"params": [
|
|
21314
|
+
{
|
|
21315
|
+
"__schema": "ParameterSchema",
|
|
21316
|
+
"location": {
|
|
21317
|
+
"filePath": "staged-config.ts",
|
|
21318
|
+
"line": 51,
|
|
21319
|
+
"character": 12
|
|
21320
|
+
},
|
|
21321
|
+
"name": "id",
|
|
21322
|
+
"type": {
|
|
21323
|
+
"__schema": "TypeRefSchema",
|
|
21324
|
+
"location": {
|
|
21325
|
+
"filePath": "staged-config.ts",
|
|
21326
|
+
"line": 51,
|
|
21327
|
+
"character": 16
|
|
21328
|
+
},
|
|
21329
|
+
"name": "ComponentID",
|
|
21330
|
+
"componentId": {
|
|
21331
|
+
"scope": "teambit.component",
|
|
21332
|
+
"name": "component-id",
|
|
21333
|
+
"version": "1.2.2"
|
|
21334
|
+
}
|
|
21335
|
+
},
|
|
21336
|
+
"isOptional": false,
|
|
21337
|
+
"isSpread": false
|
|
21338
|
+
}
|
|
21339
|
+
],
|
|
21340
|
+
"returnType": {
|
|
21341
|
+
"__schema": "TypeUnionSchema",
|
|
21342
|
+
"location": {
|
|
21343
|
+
"filePath": "staged-config.ts",
|
|
21344
|
+
"line": 51,
|
|
21345
|
+
"character": 30
|
|
21346
|
+
},
|
|
21347
|
+
"types": [
|
|
21348
|
+
{
|
|
21349
|
+
"__schema": "TypeRefSchema",
|
|
21350
|
+
"location": {
|
|
21351
|
+
"filePath": "staged-config.ts",
|
|
21352
|
+
"line": 51,
|
|
21353
|
+
"character": 30
|
|
21354
|
+
},
|
|
21355
|
+
"name": "ComponentConfig",
|
|
21356
|
+
"internalFilePath": "staged-config.ts"
|
|
21357
|
+
},
|
|
21358
|
+
{
|
|
21359
|
+
"__schema": "KeywordTypeSchema",
|
|
21360
|
+
"location": {
|
|
21361
|
+
"filePath": "staged-config.ts",
|
|
21362
|
+
"line": 51,
|
|
21363
|
+
"character": 48
|
|
21364
|
+
},
|
|
21365
|
+
"name": "undefined"
|
|
21366
|
+
}
|
|
21367
|
+
]
|
|
21368
|
+
},
|
|
21369
|
+
"modifiers": []
|
|
21370
|
+
},
|
|
21371
|
+
{
|
|
21372
|
+
"__schema": "FunctionLikeSchema",
|
|
21373
|
+
"location": {
|
|
21374
|
+
"filePath": "staged-config.ts",
|
|
21375
|
+
"line": 55,
|
|
21376
|
+
"character": 3
|
|
21377
|
+
},
|
|
21204
21378
|
"signature": "(method) StagedConfig.getAll(): ComponentConfig[]",
|
|
21205
21379
|
"name": "getAll",
|
|
21206
21380
|
"params": [],
|
|
@@ -21208,7 +21382,7 @@
|
|
|
21208
21382
|
"__schema": "InferenceTypeSchema",
|
|
21209
21383
|
"location": {
|
|
21210
21384
|
"filePath": "staged-config.ts",
|
|
21211
|
-
"line":
|
|
21385
|
+
"line": 55,
|
|
21212
21386
|
"character": 3
|
|
21213
21387
|
},
|
|
21214
21388
|
"type": "ComponentConfig[]"
|
|
@@ -21219,7 +21393,7 @@
|
|
|
21219
21393
|
"__schema": "FunctionLikeSchema",
|
|
21220
21394
|
"location": {
|
|
21221
21395
|
"filePath": "staged-config.ts",
|
|
21222
|
-
"line":
|
|
21396
|
+
"line": 59,
|
|
21223
21397
|
"character": 3
|
|
21224
21398
|
},
|
|
21225
21399
|
"signature": "(method) StagedConfig.isEmpty(): boolean",
|
|
@@ -21229,7 +21403,7 @@
|
|
|
21229
21403
|
"__schema": "InferenceTypeSchema",
|
|
21230
21404
|
"location": {
|
|
21231
21405
|
"filePath": "staged-config.ts",
|
|
21232
|
-
"line":
|
|
21406
|
+
"line": 59,
|
|
21233
21407
|
"character": 3
|
|
21234
21408
|
},
|
|
21235
21409
|
"type": "boolean"
|
|
@@ -21240,7 +21414,7 @@
|
|
|
21240
21414
|
"__schema": "FunctionLikeSchema",
|
|
21241
21415
|
"location": {
|
|
21242
21416
|
"filePath": "staged-config.ts",
|
|
21243
|
-
"line":
|
|
21417
|
+
"line": 63,
|
|
21244
21418
|
"character": 3
|
|
21245
21419
|
},
|
|
21246
21420
|
"signature": "(method) StagedConfig.deleteFile(): Promise<void>",
|
|
@@ -21250,7 +21424,7 @@
|
|
|
21250
21424
|
"__schema": "InferenceTypeSchema",
|
|
21251
21425
|
"location": {
|
|
21252
21426
|
"filePath": "staged-config.ts",
|
|
21253
|
-
"line":
|
|
21427
|
+
"line": 63,
|
|
21254
21428
|
"character": 3
|
|
21255
21429
|
},
|
|
21256
21430
|
"type": "Promise<void>"
|
|
@@ -21263,17 +21437,17 @@
|
|
|
21263
21437
|
"__schema": "FunctionLikeSchema",
|
|
21264
21438
|
"location": {
|
|
21265
21439
|
"filePath": "staged-config.ts",
|
|
21266
|
-
"line":
|
|
21440
|
+
"line": 69,
|
|
21267
21441
|
"character": 3
|
|
21268
21442
|
},
|
|
21269
|
-
"signature": "(method) StagedConfig.addComponentConfig(id: ComponentID, config: Config): void",
|
|
21443
|
+
"signature": "(method) StagedConfig.addComponentConfig(id: ComponentID, config: Config, componentMapObject: Record<string, any>): void",
|
|
21270
21444
|
"name": "addComponentConfig",
|
|
21271
21445
|
"params": [
|
|
21272
21446
|
{
|
|
21273
21447
|
"__schema": "ParameterSchema",
|
|
21274
21448
|
"location": {
|
|
21275
21449
|
"filePath": "staged-config.ts",
|
|
21276
|
-
"line":
|
|
21450
|
+
"line": 69,
|
|
21277
21451
|
"character": 22
|
|
21278
21452
|
},
|
|
21279
21453
|
"name": "id",
|
|
@@ -21281,7 +21455,7 @@
|
|
|
21281
21455
|
"__schema": "TypeRefSchema",
|
|
21282
21456
|
"location": {
|
|
21283
21457
|
"filePath": "staged-config.ts",
|
|
21284
|
-
"line":
|
|
21458
|
+
"line": 69,
|
|
21285
21459
|
"character": 26
|
|
21286
21460
|
},
|
|
21287
21461
|
"name": "ComponentID",
|
|
@@ -21298,7 +21472,7 @@
|
|
|
21298
21472
|
"__schema": "ParameterSchema",
|
|
21299
21473
|
"location": {
|
|
21300
21474
|
"filePath": "staged-config.ts",
|
|
21301
|
-
"line":
|
|
21475
|
+
"line": 69,
|
|
21302
21476
|
"character": 39
|
|
21303
21477
|
},
|
|
21304
21478
|
"name": "config",
|
|
@@ -21306,7 +21480,7 @@
|
|
|
21306
21480
|
"__schema": "TypeRefSchema",
|
|
21307
21481
|
"location": {
|
|
21308
21482
|
"filePath": "staged-config.ts",
|
|
21309
|
-
"line":
|
|
21483
|
+
"line": 69,
|
|
21310
21484
|
"character": 47
|
|
21311
21485
|
},
|
|
21312
21486
|
"name": "Config",
|
|
@@ -21314,13 +21488,53 @@
|
|
|
21314
21488
|
},
|
|
21315
21489
|
"isOptional": false,
|
|
21316
21490
|
"isSpread": false
|
|
21491
|
+
},
|
|
21492
|
+
{
|
|
21493
|
+
"__schema": "ParameterSchema",
|
|
21494
|
+
"location": {
|
|
21495
|
+
"filePath": "staged-config.ts",
|
|
21496
|
+
"line": 69,
|
|
21497
|
+
"character": 55
|
|
21498
|
+
},
|
|
21499
|
+
"name": "componentMapObject",
|
|
21500
|
+
"type": {
|
|
21501
|
+
"__schema": "TypeRefSchema",
|
|
21502
|
+
"location": {
|
|
21503
|
+
"filePath": "staged-config.ts",
|
|
21504
|
+
"line": 69,
|
|
21505
|
+
"character": 75
|
|
21506
|
+
},
|
|
21507
|
+
"name": "Record",
|
|
21508
|
+
"typeArgs": [
|
|
21509
|
+
{
|
|
21510
|
+
"__schema": "KeywordTypeSchema",
|
|
21511
|
+
"location": {
|
|
21512
|
+
"filePath": "staged-config.ts",
|
|
21513
|
+
"line": 69,
|
|
21514
|
+
"character": 82
|
|
21515
|
+
},
|
|
21516
|
+
"name": "string"
|
|
21517
|
+
},
|
|
21518
|
+
{
|
|
21519
|
+
"__schema": "KeywordTypeSchema",
|
|
21520
|
+
"location": {
|
|
21521
|
+
"filePath": "staged-config.ts",
|
|
21522
|
+
"line": 69,
|
|
21523
|
+
"character": 90
|
|
21524
|
+
},
|
|
21525
|
+
"name": "any"
|
|
21526
|
+
}
|
|
21527
|
+
]
|
|
21528
|
+
},
|
|
21529
|
+
"isOptional": false,
|
|
21530
|
+
"isSpread": false
|
|
21317
21531
|
}
|
|
21318
21532
|
],
|
|
21319
21533
|
"returnType": {
|
|
21320
21534
|
"__schema": "InferenceTypeSchema",
|
|
21321
21535
|
"location": {
|
|
21322
21536
|
"filePath": "staged-config.ts",
|
|
21323
|
-
"line":
|
|
21537
|
+
"line": 69,
|
|
21324
21538
|
"character": 3
|
|
21325
21539
|
},
|
|
21326
21540
|
"type": "void"
|
|
@@ -21331,7 +21545,7 @@
|
|
|
21331
21545
|
"__schema": "FunctionLikeSchema",
|
|
21332
21546
|
"location": {
|
|
21333
21547
|
"filePath": "staged-config.ts",
|
|
21334
|
-
"line":
|
|
21548
|
+
"line": 79,
|
|
21335
21549
|
"character": 3
|
|
21336
21550
|
},
|
|
21337
21551
|
"signature": "(method) StagedConfig.removeComponentConfig(id: ComponentID): void",
|
|
@@ -21341,7 +21555,7 @@
|
|
|
21341
21555
|
"__schema": "ParameterSchema",
|
|
21342
21556
|
"location": {
|
|
21343
21557
|
"filePath": "staged-config.ts",
|
|
21344
|
-
"line":
|
|
21558
|
+
"line": 79,
|
|
21345
21559
|
"character": 25
|
|
21346
21560
|
},
|
|
21347
21561
|
"name": "id",
|
|
@@ -21349,7 +21563,7 @@
|
|
|
21349
21563
|
"__schema": "TypeRefSchema",
|
|
21350
21564
|
"location": {
|
|
21351
21565
|
"filePath": "staged-config.ts",
|
|
21352
|
-
"line":
|
|
21566
|
+
"line": 79,
|
|
21353
21567
|
"character": 29
|
|
21354
21568
|
},
|
|
21355
21569
|
"name": "ComponentID",
|
|
@@ -21367,7 +21581,7 @@
|
|
|
21367
21581
|
"__schema": "InferenceTypeSchema",
|
|
21368
21582
|
"location": {
|
|
21369
21583
|
"filePath": "staged-config.ts",
|
|
21370
|
-
"line":
|
|
21584
|
+
"line": 79,
|
|
21371
21585
|
"character": 3
|
|
21372
21586
|
},
|
|
21373
21587
|
"type": "void"
|
|
@@ -21477,7 +21691,7 @@
|
|
|
21477
21691
|
"line": 10,
|
|
21478
21692
|
"character": 1
|
|
21479
21693
|
},
|
|
21480
|
-
"signature": "type ComponentConfig = {\n id: ComponentID;\n config: Config;\n}",
|
|
21694
|
+
"signature": "type ComponentConfig = {\n id: ComponentID;\n config: Config;\n componentMapObject: Record<string, any>;\n}",
|
|
21481
21695
|
"name": "ComponentConfig",
|
|
21482
21696
|
"type": {
|
|
21483
21697
|
"__schema": "TypeLiteralSchema",
|
|
@@ -21532,6 +21746,46 @@
|
|
|
21532
21746
|
"internalFilePath": "staged-config.ts"
|
|
21533
21747
|
},
|
|
21534
21748
|
"isOptional": false
|
|
21749
|
+
},
|
|
21750
|
+
{
|
|
21751
|
+
"__schema": "VariableLikeSchema",
|
|
21752
|
+
"location": {
|
|
21753
|
+
"filePath": "staged-config.ts",
|
|
21754
|
+
"line": 10,
|
|
21755
|
+
"character": 59
|
|
21756
|
+
},
|
|
21757
|
+
"signature": "(property) componentMapObject: Record<string, any>",
|
|
21758
|
+
"name": "componentMapObject",
|
|
21759
|
+
"type": {
|
|
21760
|
+
"__schema": "TypeRefSchema",
|
|
21761
|
+
"location": {
|
|
21762
|
+
"filePath": "staged-config.ts",
|
|
21763
|
+
"line": 10,
|
|
21764
|
+
"character": 79
|
|
21765
|
+
},
|
|
21766
|
+
"name": "Record",
|
|
21767
|
+
"typeArgs": [
|
|
21768
|
+
{
|
|
21769
|
+
"__schema": "KeywordTypeSchema",
|
|
21770
|
+
"location": {
|
|
21771
|
+
"filePath": "staged-config.ts",
|
|
21772
|
+
"line": 10,
|
|
21773
|
+
"character": 86
|
|
21774
|
+
},
|
|
21775
|
+
"name": "string"
|
|
21776
|
+
},
|
|
21777
|
+
{
|
|
21778
|
+
"__schema": "KeywordTypeSchema",
|
|
21779
|
+
"location": {
|
|
21780
|
+
"filePath": "staged-config.ts",
|
|
21781
|
+
"line": 10,
|
|
21782
|
+
"character": 94
|
|
21783
|
+
},
|
|
21784
|
+
"name": "any"
|
|
21785
|
+
}
|
|
21786
|
+
]
|
|
21787
|
+
},
|
|
21788
|
+
"isOptional": false
|
|
21535
21789
|
}
|
|
21536
21790
|
]
|
|
21537
21791
|
}
|
|
@@ -21543,7 +21797,7 @@
|
|
|
21543
21797
|
"line": 11,
|
|
21544
21798
|
"character": 1
|
|
21545
21799
|
},
|
|
21546
|
-
"signature": "type ComponentConfigObj = {\n id: ComponentIdObj;\n config: Config;\n}",
|
|
21800
|
+
"signature": "type ComponentConfigObj = {\n id: ComponentIdObj;\n config: Config;\n componentMapObject: Record<string, any>;\n}",
|
|
21547
21801
|
"name": "ComponentConfigObj",
|
|
21548
21802
|
"type": {
|
|
21549
21803
|
"__schema": "TypeLiteralSchema",
|
|
@@ -21598,6 +21852,46 @@
|
|
|
21598
21852
|
"internalFilePath": "staged-config.ts"
|
|
21599
21853
|
},
|
|
21600
21854
|
"isOptional": false
|
|
21855
|
+
},
|
|
21856
|
+
{
|
|
21857
|
+
"__schema": "VariableLikeSchema",
|
|
21858
|
+
"location": {
|
|
21859
|
+
"filePath": "staged-config.ts",
|
|
21860
|
+
"line": 11,
|
|
21861
|
+
"character": 65
|
|
21862
|
+
},
|
|
21863
|
+
"signature": "(property) componentMapObject: Record<string, any>",
|
|
21864
|
+
"name": "componentMapObject",
|
|
21865
|
+
"type": {
|
|
21866
|
+
"__schema": "TypeRefSchema",
|
|
21867
|
+
"location": {
|
|
21868
|
+
"filePath": "staged-config.ts",
|
|
21869
|
+
"line": 11,
|
|
21870
|
+
"character": 85
|
|
21871
|
+
},
|
|
21872
|
+
"name": "Record",
|
|
21873
|
+
"typeArgs": [
|
|
21874
|
+
{
|
|
21875
|
+
"__schema": "KeywordTypeSchema",
|
|
21876
|
+
"location": {
|
|
21877
|
+
"filePath": "staged-config.ts",
|
|
21878
|
+
"line": 11,
|
|
21879
|
+
"character": 92
|
|
21880
|
+
},
|
|
21881
|
+
"name": "string"
|
|
21882
|
+
},
|
|
21883
|
+
{
|
|
21884
|
+
"__schema": "KeywordTypeSchema",
|
|
21885
|
+
"location": {
|
|
21886
|
+
"filePath": "staged-config.ts",
|
|
21887
|
+
"line": 11,
|
|
21888
|
+
"character": 100
|
|
21889
|
+
},
|
|
21890
|
+
"name": "any"
|
|
21891
|
+
}
|
|
21892
|
+
]
|
|
21893
|
+
},
|
|
21894
|
+
"isOptional": false
|
|
21601
21895
|
}
|
|
21602
21896
|
]
|
|
21603
21897
|
}
|
|
@@ -24144,7 +24438,7 @@
|
|
|
24144
24438
|
"componentId": {
|
|
24145
24439
|
"scope": "teambit.scope",
|
|
24146
24440
|
"name": "scope",
|
|
24147
|
-
"version": "1.0.
|
|
24441
|
+
"version": "1.0.461"
|
|
24148
24442
|
},
|
|
24149
24443
|
"taggedModuleExports": []
|
|
24150
24444
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.461/dist/scope.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_scope@1.0.461/dist/scope.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/staged-config.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ type Config = Record<string, any> | undefined;
|
|
|
5
5
|
type ComponentConfig = {
|
|
6
6
|
id: ComponentID;
|
|
7
7
|
config: Config;
|
|
8
|
+
componentMapObject: Record<string, any>;
|
|
8
9
|
};
|
|
9
10
|
type ComponentConfigObj = {
|
|
10
11
|
id: ComponentIdObj;
|
|
11
12
|
config: Config;
|
|
13
|
+
componentMapObject: Record<string, any>;
|
|
12
14
|
};
|
|
13
15
|
export declare class StagedConfig {
|
|
14
16
|
readonly filePath: string;
|
|
@@ -20,10 +22,11 @@ export declare class StagedConfig {
|
|
|
20
22
|
toObject(): ComponentConfigObj[];
|
|
21
23
|
write(): Promise<void>;
|
|
22
24
|
getConfigPerId(id: ComponentID): Config;
|
|
25
|
+
getPerId(id: ComponentID): ComponentConfig | undefined;
|
|
23
26
|
getAll(): ComponentConfig[];
|
|
24
27
|
isEmpty(): boolean;
|
|
25
28
|
deleteFile(): Promise<void>;
|
|
26
|
-
addComponentConfig(id: ComponentID, config: Config): void;
|
|
29
|
+
addComponentConfig(id: ComponentID, config: Config, componentMapObject: Record<string, any>): void;
|
|
27
30
|
removeComponentConfig(id: ComponentID): void;
|
|
28
31
|
}
|
|
29
32
|
export {};
|
package/dist/staged-config.js
CHANGED
|
@@ -32,7 +32,12 @@ function _laneId() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
+
const _excluded = ["id"];
|
|
35
36
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
37
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
38
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
39
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
40
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
41
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
37
42
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
38
43
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -50,9 +55,8 @@ class StagedConfig {
|
|
|
50
55
|
let componentsConfig = [];
|
|
51
56
|
try {
|
|
52
57
|
const fileContent = await _fsExtra().default.readJson(filePath);
|
|
53
|
-
componentsConfig = fileContent.map(item => ({
|
|
54
|
-
id: _componentId().ComponentID.fromObject(item.id)
|
|
55
|
-
config: item.config
|
|
58
|
+
componentsConfig = fileContent.map(item => _objectSpread(_objectSpread({}, item), {}, {
|
|
59
|
+
id: _componentId().ComponentID.fromObject(item.id)
|
|
56
60
|
}));
|
|
57
61
|
} catch (err) {
|
|
58
62
|
if (err.code === 'ENOENT') {
|
|
@@ -64,13 +68,15 @@ class StagedConfig {
|
|
|
64
68
|
return new StagedConfig(filePath, componentsConfig, logger);
|
|
65
69
|
}
|
|
66
70
|
toObject() {
|
|
67
|
-
return this.componentsConfig.map(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
return this.componentsConfig.map(_ref => {
|
|
72
|
+
let {
|
|
73
|
+
id
|
|
74
|
+
} = _ref,
|
|
75
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
|
+
return _objectSpread({
|
|
77
|
+
id: id.toObject()
|
|
78
|
+
}, rest);
|
|
79
|
+
});
|
|
74
80
|
}
|
|
75
81
|
async write() {
|
|
76
82
|
if (!this.hasChanged) return;
|
|
@@ -81,6 +87,11 @@ class StagedConfig {
|
|
|
81
87
|
ignoreVersion: true
|
|
82
88
|
}))?.config;
|
|
83
89
|
}
|
|
90
|
+
getPerId(id) {
|
|
91
|
+
return this.componentsConfig.find(c => c.id.isEqual(id, {
|
|
92
|
+
ignoreVersion: true
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
84
95
|
getAll() {
|
|
85
96
|
return this.componentsConfig;
|
|
86
97
|
}
|
|
@@ -92,7 +103,7 @@ class StagedConfig {
|
|
|
92
103
|
await _fsExtra().default.remove(this.filePath);
|
|
93
104
|
this.componentsConfig = [];
|
|
94
105
|
}
|
|
95
|
-
addComponentConfig(id, config) {
|
|
106
|
+
addComponentConfig(id, config, componentMapObject) {
|
|
96
107
|
const exists = this.componentsConfig.find(c => c.id.isEqual(id, {
|
|
97
108
|
ignoreVersion: true
|
|
98
109
|
}));
|
|
@@ -101,7 +112,8 @@ class StagedConfig {
|
|
|
101
112
|
} else {
|
|
102
113
|
this.componentsConfig.push({
|
|
103
114
|
id,
|
|
104
|
-
config
|
|
115
|
+
config,
|
|
116
|
+
componentMapObject
|
|
105
117
|
});
|
|
106
118
|
}
|
|
107
119
|
this.hasChanged = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_componentId","_laneId","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","STAGED_CONFIG_DIR","StagedConfig","constructor","filePath","componentsConfig","logger","load","scopePath","laneId","lanePath","path","join","scope","name","DEFAULT_LANE","fileContent","fs","readJson","map","item","id","ComponentID","fromObject","config","err","code","toObject","write","hasChanged","outputFile","JSON","stringify","getConfigPerId","find","c","isEqual","ignoreVersion","getAll","isEmpty","length","deleteFile","debug","remove","addComponentConfig","exists","push","removeComponentConfig","componentsConfigLengthBefore","filter","toString","exports"],"sources":["staged-config.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { ComponentID, ComponentIdObj } from '@teambit/component-id';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { Logger } from '@teambit/logger';\n\nconst STAGED_CONFIG_DIR = 'staged-config';\n\ntype Config = Record<string, any> | undefined;\ntype ComponentConfig = { id: ComponentID; config: Config };\ntype ComponentConfigObj = { id: ComponentIdObj; config: Config };\n\nexport class StagedConfig {\n hasChanged = false;\n constructor(\n readonly filePath: string,\n private componentsConfig: ComponentConfig[],\n private logger: Logger\n ) {}\n\n static async load(scopePath: string, logger: Logger, laneId?: LaneId): Promise<StagedConfig> {\n const lanePath = laneId ? path.join(laneId.scope, laneId.name) : DEFAULT_LANE;\n const filePath = path.join(scopePath, STAGED_CONFIG_DIR, `${lanePath}.json`);\n let componentsConfig: ComponentConfig[] = [];\n try {\n const fileContent = await fs.readJson(filePath);\n componentsConfig = fileContent.map((item) => ({ id: ComponentID.fromObject(item.id), config: item.config }));\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n componentsConfig = [];\n } else {\n throw err;\n }\n }\n return new StagedConfig(filePath, componentsConfig, logger);\n }\n\n toObject(): ComponentConfigObj[] {\n return this.componentsConfig.map(({ id, config }) => ({ id: id.toObject(), config }));\n }\n\n async write() {\n if (!this.hasChanged) return;\n await fs.outputFile(this.filePath, JSON.stringify(this.toObject(), null, 2));\n }\n\n getConfigPerId(id: ComponentID): Config {\n return this.componentsConfig.find((c) => c.id.isEqual(id, { ignoreVersion: true }))?.config;\n }\n\n getAll() {\n return this.componentsConfig;\n }\n\n isEmpty() {\n return this.componentsConfig.length === 0;\n }\n\n async deleteFile() {\n this.logger.debug(`staged-config, deleting ${this.filePath}`);\n await fs.remove(this.filePath);\n this.componentsConfig = [];\n }\n\n addComponentConfig(id: ComponentID, config: Config) {\n const exists = this.componentsConfig.find((c) => c.id.isEqual(id, { ignoreVersion: true }));\n if (exists) {\n exists.config = config;\n } else {\n this.componentsConfig.push({ id, config });\n }\n this.hasChanged = true;\n }\n\n removeComponentConfig(id: ComponentID) {\n const componentsConfigLengthBefore = this.componentsConfig.length;\n this.componentsConfig = this.componentsConfig.filter((c) => !c.id.isEqual(id, { ignoreVersion: true }));\n if (this.componentsConfig.length === componentsConfigLengthBefore) {\n this.logger.debug(`removeComponentConfig: unable to find ${id.toString()}`);\n } else {\n this.hasChanged = true;\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL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d,EAAE,CAACe,OAAO,CAACf,EAAE,EAAE;MAAEgB,aAAa,EAAE;IAAK,CAAC,CAAC,CAAC;IACvG,IAAI,IAAI,CAAChC,gBAAgB,CAACmC,MAAM,KAAKQ,4BAA4B,EAAE;MACjE,IAAI,CAAC1C,MAAM,CAACoC,KAAK,CAAC,yCAAyCrB,EAAE,CAAC6B,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC7E,CAAC,MAAM;MACL,IAAI,CAACrB,UAAU,GAAG,IAAI;IACxB;EACF;AACF;AAACsB,OAAA,CAAAjD,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_componentId","_laneId","_excluded","e","__esModule","default","_objectWithoutProperties","t","o","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","s","length","includes","propertyIsEnumerable","call","n","hasOwnProperty","ownKeys","keys","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","STAGED_CONFIG_DIR","StagedConfig","constructor","filePath","componentsConfig","logger","load","scopePath","laneId","lanePath","path","join","scope","name","DEFAULT_LANE","fileContent","fs","readJson","map","item","id","ComponentID","fromObject","err","code","toObject","_ref","rest","write","hasChanged","outputFile","JSON","stringify","getConfigPerId","find","c","isEqual","ignoreVersion","config","getPerId","getAll","isEmpty","deleteFile","debug","remove","addComponentConfig","componentMapObject","exists","removeComponentConfig","componentsConfigLengthBefore","toString","exports"],"sources":["staged-config.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { ComponentID, ComponentIdObj } from '@teambit/component-id';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { Logger } from '@teambit/logger';\n\nconst STAGED_CONFIG_DIR = 'staged-config';\n\ntype Config = Record<string, any> | undefined;\ntype ComponentConfig = { id: ComponentID; config: Config; componentMapObject: Record<string, any> };\ntype ComponentConfigObj = { id: ComponentIdObj; config: Config; componentMapObject: Record<string, any> };\n\nexport class StagedConfig {\n hasChanged = false;\n constructor(\n readonly filePath: string,\n private componentsConfig: ComponentConfig[],\n private logger: Logger\n ) {}\n\n static async load(scopePath: string, logger: Logger, laneId?: LaneId): Promise<StagedConfig> {\n const lanePath = laneId ? path.join(laneId.scope, laneId.name) : DEFAULT_LANE;\n const filePath = path.join(scopePath, STAGED_CONFIG_DIR, `${lanePath}.json`);\n let componentsConfig: ComponentConfig[] = [];\n try {\n const fileContent = await fs.readJson(filePath);\n componentsConfig = fileContent.map((item) => ({ ...item, id: ComponentID.fromObject(item.id) }));\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n componentsConfig = [];\n } else {\n throw err;\n }\n }\n return new StagedConfig(filePath, componentsConfig, logger);\n }\n\n toObject(): ComponentConfigObj[] {\n return this.componentsConfig.map(({ id, ...rest }) => ({ id: id.toObject(), ...rest }));\n }\n\n async write() {\n if (!this.hasChanged) return;\n await fs.outputFile(this.filePath, JSON.stringify(this.toObject(), null, 2));\n }\n\n getConfigPerId(id: ComponentID): Config {\n return this.componentsConfig.find((c) => c.id.isEqual(id, { ignoreVersion: true }))?.config;\n }\n\n getPerId(id: ComponentID): ComponentConfig | undefined {\n return this.componentsConfig.find((c) => c.id.isEqual(id, { ignoreVersion: true }));\n }\n\n getAll() {\n return this.componentsConfig;\n }\n\n isEmpty() {\n return this.componentsConfig.length === 0;\n }\n\n async deleteFile() {\n this.logger.debug(`staged-config, deleting ${this.filePath}`);\n await fs.remove(this.filePath);\n this.componentsConfig = [];\n }\n\n addComponentConfig(id: ComponentID, config: Config, componentMapObject: Record<string, any>) {\n const exists = this.componentsConfig.find((c) => c.id.isEqual(id, { ignoreVersion: true }));\n if (exists) {\n exists.config = config;\n } else {\n this.componentsConfig.push({ id, config, componentMapObject });\n }\n this.hasChanged = true;\n }\n\n removeComponentConfig(id: ComponentID) {\n const componentsConfigLengthBefore = this.componentsConfig.length;\n this.componentsConfig = this.componentsConfig.filter((c) => !c.id.isEqual(id, { ignoreVersion: true }));\n if (this.componentsConfig.length === componentsConfigLengthBefore) {\n this.logger.debug(`removeComponentConfig: unable to find ${id.toString()}`);\n } else {\n this.hasChanged = true;\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAwD,MAAAM,SAAA;AAAA,SAAAL,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,EAAAI,CAAA,gBAAAJ,CAAA,iBAAAK,CAAA,EAAAC,CAAA,EAAAC,CAAA,GAAAC,6BAAA,CAAAR,CAAA,EAAAI,CAAA,OAAAK,MAAA,CAAAC,qBAAA,QAAAC,CAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAV,CAAA,QAAAM,CAAA,MAAAA,CAAA,GAAAK,CAAA,CAAAC,MAAA,EAAAN,CAAA,IAAAD,CAAA,GAAAM,CAAA,CAAAL,CAAA,GAAAF,CAAA,CA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ACxB,CAAC,MAAM;MACL,IAAI,CAAClC,gBAAgB,CAACvB,IAAI,CAAC;QAAEuC,EAAE;QAAEkB,MAAM;QAAEQ;MAAmB,CAAC,CAAC;IAChE;IACA,IAAI,CAACjB,UAAU,GAAG,IAAI;EACxB;EAEAmB,qBAAqBA,CAAC5B,EAAe,EAAE;IACrC,MAAM6B,4BAA4B,GAAG,IAAI,CAAC7C,gBAAgB,CAAClC,MAAM;IACjE,IAAI,CAACkC,gBAAgB,GAAG,IAAI,CAACA,gBAAgB,CAAC1B,MAAM,CAAEyD,CAAC,IAAK,CAACA,CAAC,CAACf,EAAE,CAACgB,OAAO,CAAChB,EAAE,EAAE;MAAEiB,aAAa,EAAE;IAAK,CAAC,CAAC,CAAC;IACvG,IAAI,IAAI,CAACjC,gBAAgB,CAAClC,MAAM,KAAK+E,4BAA4B,EAAE;MACjE,IAAI,CAAC5C,MAAM,CAACsC,KAAK,CAAC,yCAAyCvB,EAAE,CAAC8B,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC7E,CAAC,MAAM;MACL,IAAI,CAACrB,UAAU,GAAG,IAAI;IACxB;EACF;AACF;AAACsB,OAAA,CAAAlD,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/scope",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.461",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/scope/scope",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "scope",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.461"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -48,40 +48,40 @@
|
|
|
48
48
|
"@teambit/scope.ui.empty-scope": "0.0.509",
|
|
49
49
|
"@teambit/scope.ui.scope-details": "0.0.526",
|
|
50
50
|
"@teambit/scopes.scope-id": "0.0.7",
|
|
51
|
-
"@teambit/cli": "0.0.
|
|
51
|
+
"@teambit/cli": "0.0.1038",
|
|
52
52
|
"@teambit/component.modules.component-url": "0.0.169",
|
|
53
53
|
"@teambit/scope.models.scope-model": "0.0.515",
|
|
54
54
|
"@teambit/scope.ui.hooks.scope-context": "0.0.509",
|
|
55
|
-
"@teambit/aspect-loader": "1.0.
|
|
56
|
-
"@teambit/compiler": "1.0.
|
|
57
|
-
"@teambit/component": "1.0.
|
|
58
|
-
"@teambit/dependency-resolver": "1.0.
|
|
59
|
-
"@teambit/envs": "1.0.
|
|
60
|
-
"@teambit/global-config": "0.0.
|
|
55
|
+
"@teambit/aspect-loader": "1.0.461",
|
|
56
|
+
"@teambit/compiler": "1.0.461",
|
|
57
|
+
"@teambit/component": "1.0.461",
|
|
58
|
+
"@teambit/dependency-resolver": "1.0.461",
|
|
59
|
+
"@teambit/envs": "1.0.461",
|
|
60
|
+
"@teambit/global-config": "0.0.1041",
|
|
61
61
|
"@teambit/harmony.modules.requireable-component": "0.0.498",
|
|
62
|
-
"@teambit/isolator": "1.0.
|
|
63
|
-
"@teambit/logger": "0.0.
|
|
62
|
+
"@teambit/isolator": "1.0.461",
|
|
63
|
+
"@teambit/logger": "0.0.1131",
|
|
64
64
|
"@teambit/harmony.modules.in-memory-cache": "0.0.2",
|
|
65
65
|
"@teambit/bit.get-bit-version": "0.0.1",
|
|
66
66
|
"@teambit/legacy-component-log": "0.0.404",
|
|
67
67
|
"@teambit/legacy.scope-api": "0.0.46",
|
|
68
|
-
"@teambit/builder": "1.0.
|
|
69
|
-
"@teambit/express": "0.0.
|
|
70
|
-
"@teambit/graph": "1.0.
|
|
71
|
-
"@teambit/graphql": "1.0.
|
|
72
|
-
"@teambit/ui": "1.0.
|
|
68
|
+
"@teambit/builder": "1.0.461",
|
|
69
|
+
"@teambit/express": "0.0.1137",
|
|
70
|
+
"@teambit/graph": "1.0.461",
|
|
71
|
+
"@teambit/graphql": "1.0.461",
|
|
72
|
+
"@teambit/ui": "1.0.461",
|
|
73
73
|
"@teambit/workspace.modules.match-pattern": "0.0.505",
|
|
74
74
|
"@teambit/component.ui.component-drawer": "0.0.418",
|
|
75
75
|
"@teambit/lanes.hooks.use-lane-components": "0.0.269",
|
|
76
76
|
"@teambit/lanes.hooks.use-lanes": "0.0.274",
|
|
77
77
|
"@teambit/ui-foundation.ui.side-bar": "0.0.888",
|
|
78
|
-
"@teambit/command-bar": "1.0.
|
|
79
|
-
"@teambit/component-tree": "1.0.
|
|
78
|
+
"@teambit/command-bar": "1.0.461",
|
|
79
|
+
"@teambit/component-tree": "1.0.461",
|
|
80
80
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.230",
|
|
81
81
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.228",
|
|
82
|
-
"@teambit/component.ui.component-filters.env-filter": "0.0.
|
|
82
|
+
"@teambit/component.ui.component-filters.env-filter": "0.0.241",
|
|
83
83
|
"@teambit/component.ui.component-filters.show-main-filter": "0.0.221",
|
|
84
|
-
"@teambit/sidebar": "1.0.
|
|
84
|
+
"@teambit/sidebar": "1.0.461",
|
|
85
85
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.512",
|
|
86
86
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.224",
|
|
87
87
|
"@teambit/component-descriptor": "0.0.426",
|