@teambit/compositions 1.0.425 → 1.0.427

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.
@@ -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.compositions/compositions@1.0.425" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.compositions/compositions@1.0.427" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["teambit.compositions/compositions-preview"]=o():e["teambit.compositions/compositions-preview"]=o()}(self,(()=>(()=>{"use strict";var e={98020:(e,o,t)=>{var n={id:"teambit.compositions/aspect-docs/compositions@0.0.168",homepage:"https://bit.cloud/teambit/compositions/aspect-docs/compositions",exported:!0};Object.defineProperty(o,"__esModule",{value:!0}),o.default=f,a(t(41594));var i=t(5016),s=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(null,arguments)}function p(e,o){if(null==e)return{};var t,n,i=m(e,o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[n],o.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function m(e,o){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(o.includes(n))continue;t[n]=e[n]}return t}a.__bit_component=n,r.__bit_component=n,p.__bit_component=n,m.__bit_component=n;var c=function(e){return function(o){return console.warn("Component "+e+" was not imported, exported, or provided by MDXProvider as global scope"),(0,i.mdx)("div",o)}};c.__bit_component=n;var l=c("CompositionCard"),d=c("Button"),u={},h="wrapper";function f(e){var o=e.components,t=p(e,s);return(0,i.mdx)(h,r({},u,t,{components:o,mdxType:"MDXLayout"}),(0,i.mdx)("p",null,"The Compositions aspect renders component 'compositions' in isolation and displays them in the Workspace UI and Scope UI.\n'Compositions' are, essentially, small apps that exhibit and test a component in different contexts and variations."),(0,i.mdx)("p",null,'The Compositions aspect is an essential tool to authoring independent components as it renders component instances in "controlled environments", isolated and un-affected by code that was not purposefully included.\nThis sterile environment provides an accurate understanding of their look and behavior, for manual and automated testings.'),(0,i.mdx)("p",null,"Moreover, a component's composition is a way to demonstrate the component for other developers looking to use it, and non-developers, such as designers and product managers, looking to inspect it."),(0,i.mdx)("h4",null,"Features"),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Create component examples with zero configuration:")," Write your compositions the same way you write your components.\nPlace your examples in the component's ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.*")," file to have them rendered in the Workspace UI with no additional configurations."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"See your components render in all relevant contexts:")," - Render components in the visual context of related and dependant components to learn how changes impact other components during development."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Hot-reloading in workspace UI:")," - See various instances of a component render live to reflect most recent changes. Get immediate feedbacks to changes in your component's code."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Compositions as visual documentation:")," - Compositions play an essential part in a component documentation. They demonstrate potential behaviors and use cases for that component. Compositions are another step in promoting components' discoverability, both in your local workspace and in remote scopes."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Compositions as test samples for your CI")," - Use your compositions as samples for automated integration and unit tests, to track and view the impact of changes on all affected components in your different scopes."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Developer-Designers collaboration")," - Make visual compositions accessible to designers (and everyone else) to include them in the development and release process of web applications, in a visual way."),(0,i.mdx)("h2",null,"Quickstart & configurations"),(0,i.mdx)("p",null,"Compositions require no configuration. Any ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.*")," or ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.composition.*")," file will be loaded and displayed in the workspace UI.\nAny tagged version of a component will have its composition included in its build artifacts, to be used as part of the component's preview."),(0,i.mdx)("p",null,"To add your own file pattern for compositions (to be automatically loaded and displayed by the Compositions aspect):"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-json"},'// In the workspace configuration file\n{\n "teambit.compositions/compositions": {\n "compositionFilePattern": ["**.my-pattern.tsx", "**.my-pattern-2.jsx"]\n }\n}\n')),(0,i.mdx)("h2",null,"Creating compositions"),(0,i.mdx)("blockquote",null,(0,i.mdx)("p",{parentName:"blockquote"},"This document uses React code as snippets.")),(0,i.mdx)("p",null,"Writing a composition does not require any configuration. Import the component to the component's ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.tsx")," file, use it to build a composition and export the new component (a.k.a, the composition) with a named export."),(0,i.mdx)("p",null,"The name of the export will be converted from PascalCase/camelCase and used for the composition name (e.g, ",(0,i.mdx)("inlineCode",{parentName:"p"},'"CompositionName" --\x3e "Composition name"'),")."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"For example"),", we'll create two compositions, 'Primary button' and 'Secondary button', each of which demonstrates a different variant or usage of that component.\nBoth compositions will be in themed (i.e, displayed in a specific context)."),(0,i.mdx)("p",null,"First, we'll create a new composition file in the component's directory:"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-bash"},"touch path/to/component/directory/<component-name>.compositions.tsx\n")),(0,i.mdx)("p",null,"Then, we'll import the component and use it to create the compositions:"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-jsx{}[button.compositions.jsx]"},"import React from 'react';\nimport { IrisTheme } from '@my-organization/design-system/iris-theme';\nimport { Button } from './button';\n\nexport const PrimaryButton = () => {\n return (\n <IrisTheme>\n <Button importance=\"cta\" style={{ width: 120 }}>\n Primary\n </Button>\n </IrisTheme>\n );\n};\n\nexport const SecondaryButton = () => {\n return (\n <IrisTheme>\n <Button importance=\"ghost\" style={{ width: 120 }}>\n Secondary\n </Button>\n </IrisTheme>\n );\n};\n")),(0,i.mdx)("div",{style:{width:450,display:"flex",justifyContent:"space-between"}},(0,i.mdx)(l,{Composition:function(){return(0,i.mdx)(d,{importance:"cta",style:{width:120},mdxType:"Button"},"Primary")},name:"Primary",mdxType:"CompositionCard"}),(0,i.mdx)(l,{Composition:function(){return(0,i.mdx)(d,{importance:"ghost",style:{width:120},mdxType:"Button"},"Secondary")},name:"Secondary",mdxType:"CompositionCard"})),(0,i.mdx)("h2",null,"Loading compositions"),(0,i.mdx)("p",null,"The Environment in use will automatically detect the composition file for each component and use it to load its compositions to the workspace UI."),(0,i.mdx)("h2",null,"Viewing component compositions"),(0,i.mdx)("p",null,"To explore compositions in your Workspace UI, start the local development server for your workspace (",(0,i.mdx)("inlineCode",{parentName:"p"},"bit start"),"),\nbrowse to a specific component and select the ",(0,i.mdx)("strong",{parentName:"p"},"compositions")," tab.\nThere, you will see the full list of compositions available for that component, along with additional component meta-data."),(0,i.mdx)("h2",null,"Using compositions for automated testings"),(0,i.mdx)("p",null,"Component compositions can be used in automated testing as well as manual examinations. To do that, simply import the compositions in your test file to run the appropriate tests."),(0,i.mdx)("p",null,"For example, the below snapshot test checks the 'Button' component when the 'variant' prop is set to 'primary'.\nIn addition to simple unit tests, compositions play an important role in integration test as they provide feedback as to how a change to the component may affect potential usages."),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-jsx"},"import React from 'react';\nimport testRenderer from 'react-test-renderer';\nimport { PrimaryButton } from './button.compositions.tsx';\n\ndescribe('Button', () => {\n it('renders correctly as \"primary\"', () => {\n const component = testRenderer.create(<PrimaryButton>test primary variant</PrimaryButton>);\n const tree = component.toJSON();\n expect(tree).toMatchSnapshot();\n });\n});\n")),(0,i.mdx)("h2",null,"Setting providers for all your compositions"),(0,i.mdx)("p",null,"Extend the React environment to customize its list of providers with your own composition providers.\nThe extended environment will then wrap every composition with these providers to make sure your themes or mock data are accessible to all of them,\nwithout you having to repeat that task ever again."),(0,i.mdx)("h2",null,"Compositions and storybook"),(0,i.mdx)("p",null,"Storybook displays individual components in different states and variations.\nIt is designed to help in authoring and displaying standalone components, each of which is usually part of a design system.\nIn contrast, 'Compositions' is mainly about examining how an independent component looks and behaves when used with other components.\nThese component integrations serve as a way to examine compositions that are likely to be part of real applications, using manual and automated testing."),(0,i.mdx)("p",null,"If you're looking for a Storybook-like solution, you can find that either in the Storybook extension (currently in development) or by using 'Compositions' for that use-case as well."))}f.__bit_component=n,f.isMDXComponent=!0},73180:(e,o,t)=>{Object.defineProperty(o,"s",{enumerable:!0,get:function(){return n.default}});var n=i(t(98020));function i(e){return e&&e.__esModule?e:{default:e}}i.__bit_component={id:"teambit.compositions/aspect-docs/compositions@0.0.168",homepage:"https://bit.cloud/teambit/compositions/aspect-docs/compositions",exported:!0}},68583:(e,o,t)=>{var n={id:"teambit.compositions/compositions@1.0.425",homepage:"https://bit.cloud/teambit/compositions/compositions",exported:!0};function i(){const e=s(t(41594));return i=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Logo=void 0,i.__bit_component=n,s.__bit_component=n;const a=()=>i().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},i().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/compositions.svg"}));a.__bit_component=n,o.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},o={};function t(n){var i=o[n];if(void 0!==i)return i.exports;var s=o[n]={exports:{}};return e[n](s,s.exports,t),s.exports}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{compositions:()=>h,compositions_metadata:()=>y,overview:()=>f});var i={};t.r(i),t.d(i,{default:()=>u});var s=t(68583),a=(t(41594),t(5016));const r=TeambitMdxUiMdxScopeContext;var p=t(73180),m=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c.apply(null,arguments)}var l={},d="wrapper";function u(e){var o=e.components,t=function(e,o){if(null==e)return{};var t,n,i=function(e,o){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(o.includes(n))continue;t[n]=e[n]}return t}(e,o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[n],o.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,m);return(0,a.mdx)(d,c({},l,t,{components:o,mdxType:"MDXLayout"}),(0,a.mdx)(r.MDXScopeProvider,{components:{Compositions:p.s},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.s,{mdxType:"Compositions"})))}u.isMDXComponent=!0;const h=[s],f=[i],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["teambit.compositions/compositions-preview"]=o():e["teambit.compositions/compositions-preview"]=o()}(self,(()=>(()=>{"use strict";var e={20:(e,o,t)=>{var n={id:"teambit.compositions/aspect-docs/compositions@0.0.168",homepage:"https://bit.cloud/teambit/compositions/aspect-docs/compositions",exported:!0};Object.defineProperty(o,"__esModule",{value:!0}),o.default=f,a(t(594));var i=t(16),s=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(null,arguments)}function p(e,o){if(null==e)return{};var t,n,i=m(e,o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[n],o.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function m(e,o){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(o.includes(n))continue;t[n]=e[n]}return t}a.__bit_component=n,r.__bit_component=n,p.__bit_component=n,m.__bit_component=n;var c=function(e){return function(o){return console.warn("Component "+e+" was not imported, exported, or provided by MDXProvider as global scope"),(0,i.mdx)("div",o)}};c.__bit_component=n;var l=c("CompositionCard"),d=c("Button"),u={},h="wrapper";function f(e){var o=e.components,t=p(e,s);return(0,i.mdx)(h,r({},u,t,{components:o,mdxType:"MDXLayout"}),(0,i.mdx)("p",null,"The Compositions aspect renders component 'compositions' in isolation and displays them in the Workspace UI and Scope UI.\n'Compositions' are, essentially, small apps that exhibit and test a component in different contexts and variations."),(0,i.mdx)("p",null,'The Compositions aspect is an essential tool to authoring independent components as it renders component instances in "controlled environments", isolated and un-affected by code that was not purposefully included.\nThis sterile environment provides an accurate understanding of their look and behavior, for manual and automated testings.'),(0,i.mdx)("p",null,"Moreover, a component's composition is a way to demonstrate the component for other developers looking to use it, and non-developers, such as designers and product managers, looking to inspect it."),(0,i.mdx)("h4",null,"Features"),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Create component examples with zero configuration:")," Write your compositions the same way you write your components.\nPlace your examples in the component's ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.*")," file to have them rendered in the Workspace UI with no additional configurations."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"See your components render in all relevant contexts:")," - Render components in the visual context of related and dependant components to learn how changes impact other components during development."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Hot-reloading in workspace UI:")," - See various instances of a component render live to reflect most recent changes. Get immediate feedbacks to changes in your component's code."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Compositions as visual documentation:")," - Compositions play an essential part in a component documentation. They demonstrate potential behaviors and use cases for that component. Compositions are another step in promoting components' discoverability, both in your local workspace and in remote scopes."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Compositions as test samples for your CI")," - Use your compositions as samples for automated integration and unit tests, to track and view the impact of changes on all affected components in your different scopes."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"Developer-Designers collaboration")," - Make visual compositions accessible to designers (and everyone else) to include them in the development and release process of web applications, in a visual way."),(0,i.mdx)("h2",null,"Quickstart & configurations"),(0,i.mdx)("p",null,"Compositions require no configuration. Any ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.*")," or ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.composition.*")," file will be loaded and displayed in the workspace UI.\nAny tagged version of a component will have its composition included in its build artifacts, to be used as part of the component's preview."),(0,i.mdx)("p",null,"To add your own file pattern for compositions (to be automatically loaded and displayed by the Compositions aspect):"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-json"},'// In the workspace configuration file\n{\n "teambit.compositions/compositions": {\n "compositionFilePattern": ["**.my-pattern.tsx", "**.my-pattern-2.jsx"]\n }\n}\n')),(0,i.mdx)("h2",null,"Creating compositions"),(0,i.mdx)("blockquote",null,(0,i.mdx)("p",{parentName:"blockquote"},"This document uses React code as snippets.")),(0,i.mdx)("p",null,"Writing a composition does not require any configuration. Import the component to the component's ",(0,i.mdx)("inlineCode",{parentName:"p"},"*.compositions.tsx")," file, use it to build a composition and export the new component (a.k.a, the composition) with a named export."),(0,i.mdx)("p",null,"The name of the export will be converted from PascalCase/camelCase and used for the composition name (e.g, ",(0,i.mdx)("inlineCode",{parentName:"p"},'"CompositionName" --\x3e "Composition name"'),")."),(0,i.mdx)("p",null,(0,i.mdx)("strong",{parentName:"p"},"For example"),", we'll create two compositions, 'Primary button' and 'Secondary button', each of which demonstrates a different variant or usage of that component.\nBoth compositions will be in themed (i.e, displayed in a specific context)."),(0,i.mdx)("p",null,"First, we'll create a new composition file in the component's directory:"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-bash"},"touch path/to/component/directory/<component-name>.compositions.tsx\n")),(0,i.mdx)("p",null,"Then, we'll import the component and use it to create the compositions:"),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-jsx{}[button.compositions.jsx]"},"import React from 'react';\nimport { IrisTheme } from '@my-organization/design-system/iris-theme';\nimport { Button } from './button';\n\nexport const PrimaryButton = () => {\n return (\n <IrisTheme>\n <Button importance=\"cta\" style={{ width: 120 }}>\n Primary\n </Button>\n </IrisTheme>\n );\n};\n\nexport const SecondaryButton = () => {\n return (\n <IrisTheme>\n <Button importance=\"ghost\" style={{ width: 120 }}>\n Secondary\n </Button>\n </IrisTheme>\n );\n};\n")),(0,i.mdx)("div",{style:{width:450,display:"flex",justifyContent:"space-between"}},(0,i.mdx)(l,{Composition:function(){return(0,i.mdx)(d,{importance:"cta",style:{width:120},mdxType:"Button"},"Primary")},name:"Primary",mdxType:"CompositionCard"}),(0,i.mdx)(l,{Composition:function(){return(0,i.mdx)(d,{importance:"ghost",style:{width:120},mdxType:"Button"},"Secondary")},name:"Secondary",mdxType:"CompositionCard"})),(0,i.mdx)("h2",null,"Loading compositions"),(0,i.mdx)("p",null,"The Environment in use will automatically detect the composition file for each component and use it to load its compositions to the workspace UI."),(0,i.mdx)("h2",null,"Viewing component compositions"),(0,i.mdx)("p",null,"To explore compositions in your Workspace UI, start the local development server for your workspace (",(0,i.mdx)("inlineCode",{parentName:"p"},"bit start"),"),\nbrowse to a specific component and select the ",(0,i.mdx)("strong",{parentName:"p"},"compositions")," tab.\nThere, you will see the full list of compositions available for that component, along with additional component meta-data."),(0,i.mdx)("h2",null,"Using compositions for automated testings"),(0,i.mdx)("p",null,"Component compositions can be used in automated testing as well as manual examinations. To do that, simply import the compositions in your test file to run the appropriate tests."),(0,i.mdx)("p",null,"For example, the below snapshot test checks the 'Button' component when the 'variant' prop is set to 'primary'.\nIn addition to simple unit tests, compositions play an important role in integration test as they provide feedback as to how a change to the component may affect potential usages."),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-jsx"},"import React from 'react';\nimport testRenderer from 'react-test-renderer';\nimport { PrimaryButton } from './button.compositions.tsx';\n\ndescribe('Button', () => {\n it('renders correctly as \"primary\"', () => {\n const component = testRenderer.create(<PrimaryButton>test primary variant</PrimaryButton>);\n const tree = component.toJSON();\n expect(tree).toMatchSnapshot();\n });\n});\n")),(0,i.mdx)("h2",null,"Setting providers for all your compositions"),(0,i.mdx)("p",null,"Extend the React environment to customize its list of providers with your own composition providers.\nThe extended environment will then wrap every composition with these providers to make sure your themes or mock data are accessible to all of them,\nwithout you having to repeat that task ever again."),(0,i.mdx)("h2",null,"Compositions and storybook"),(0,i.mdx)("p",null,"Storybook displays individual components in different states and variations.\nIt is designed to help in authoring and displaying standalone components, each of which is usually part of a design system.\nIn contrast, 'Compositions' is mainly about examining how an independent component looks and behaves when used with other components.\nThese component integrations serve as a way to examine compositions that are likely to be part of real applications, using manual and automated testing."),(0,i.mdx)("p",null,"If you're looking for a Storybook-like solution, you can find that either in the Storybook extension (currently in development) or by using 'Compositions' for that use-case as well."))}f.__bit_component=n,f.isMDXComponent=!0},180:(e,o,t)=>{Object.defineProperty(o,"s",{enumerable:!0,get:function(){return n.default}});var n=i(t(20));function i(e){return e&&e.__esModule?e:{default:e}}i.__bit_component={id:"teambit.compositions/aspect-docs/compositions@0.0.168",homepage:"https://bit.cloud/teambit/compositions/aspect-docs/compositions",exported:!0}},929:(e,o,t)=>{var n={id:"teambit.compositions/compositions@1.0.427",homepage:"https://bit.cloud/teambit/compositions/compositions",exported:!0};function i(){const e=s(t(594));return i=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Logo=void 0,i.__bit_component=n,s.__bit_component=n;const a=()=>i().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},i().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/compositions.svg"}));a.__bit_component=n,o.Logo=a},16:e=>{e.exports=MdxJsReact},594:e=>{e.exports=React}},o={};function t(n){var i=o[n];if(void 0!==i)return i.exports;var s=o[n]={exports:{}};return e[n](s,s.exports,t),s.exports}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{compositions:()=>h,compositions_metadata:()=>y,overview:()=>f});var i={};t.r(i),t.d(i,{default:()=>u});var s=t(929),a=(t(594),t(16));const r=TeambitMdxUiMdxScopeContext;var p=t(180),m=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c.apply(null,arguments)}var l={},d="wrapper";function u(e){var o=e.components,t=function(e,o){if(null==e)return{};var t,n,i=function(e,o){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(o.includes(n))continue;t[n]=e[n]}return t}(e,o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[n],o.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,m);return(0,a.mdx)(d,c({},l,t,{components:o,mdxType:"MDXLayout"}),(0,a.mdx)(r.MDXScopeProvider,{components:{Compositions:p.s},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.s,{mdxType:"Compositions"})))}u.isMDXComponent=!0;const h=[s],f=[i],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
@@ -362,7 +362,7 @@
362
362
  "componentId": {
363
363
  "scope": "teambit.component",
364
364
  "name": "sources",
365
- "version": "0.0.33"
365
+ "version": "0.0.34"
366
366
  }
367
367
  }
368
368
  }
@@ -1004,16 +1004,16 @@
1004
1004
  "__schema": "ParameterSchema",
1005
1005
  "location": {
1006
1006
  "filePath": "compositions.ui.runtime.tsx",
1007
- "line": 17,
1008
- "character": 15
1007
+ "line": 18,
1008
+ "character": 5
1009
1009
  },
1010
1010
  "name": "menuBarWidgetSlot",
1011
1011
  "type": {
1012
1012
  "__schema": "TypeRefSchema",
1013
1013
  "location": {
1014
1014
  "filePath": "compositions.ui.runtime.tsx",
1015
- "line": 17,
1016
- "character": 42
1015
+ "line": 18,
1016
+ "character": 32
1017
1017
  },
1018
1018
  "name": "CompositionsMenuSlot"
1019
1019
  },
@@ -1024,16 +1024,16 @@
1024
1024
  "__schema": "ParameterSchema",
1025
1025
  "location": {
1026
1026
  "filePath": "compositions.ui.runtime.tsx",
1027
- "line": 17,
1028
- "character": 64
1027
+ "line": 19,
1028
+ "character": 5
1029
1029
  },
1030
1030
  "name": "emptyStateSlot",
1031
1031
  "type": {
1032
1032
  "__schema": "TypeRefSchema",
1033
1033
  "location": {
1034
1034
  "filePath": "compositions.ui.runtime.tsx",
1035
- "line": 17,
1036
- "character": 88
1035
+ "line": 19,
1036
+ "character": 29
1037
1037
  },
1038
1038
  "name": "EmptyStateSlot"
1039
1039
  },
@@ -1056,14 +1056,14 @@
1056
1056
  "__schema": "FunctionLikeSchema",
1057
1057
  "location": {
1058
1058
  "filePath": "compositions.ui.runtime.tsx",
1059
- "line": 21,
1059
+ "line": 24,
1060
1060
  "character": 3
1061
1061
  },
1062
1062
  "doc": {
1063
1063
  "__schema": "DocSchema",
1064
1064
  "location": {
1065
1065
  "filePath": "compositions.ui.runtime.tsx",
1066
- "line": 18,
1066
+ "line": 21,
1067
1067
  "character": 3
1068
1068
  },
1069
1069
  "raw": "/**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */",
@@ -1077,7 +1077,7 @@
1077
1077
  "__schema": "ParameterSchema",
1078
1078
  "location": {
1079
1079
  "filePath": "compositions.ui.runtime.tsx",
1080
- "line": 21,
1080
+ "line": 24,
1081
1081
  "character": 22
1082
1082
  },
1083
1083
  "name": "emptyStateComponent",
@@ -1085,7 +1085,7 @@
1085
1085
  "__schema": "TypeRefSchema",
1086
1086
  "location": {
1087
1087
  "filePath": "compositions.ui.runtime.tsx",
1088
- "line": 21,
1088
+ "line": 24,
1089
1089
  "character": 43
1090
1090
  },
1091
1091
  "name": "ComponentType",
@@ -1099,7 +1099,7 @@
1099
1099
  "__schema": "TypeRefSchema",
1100
1100
  "location": {
1101
1101
  "filePath": "compositions.ui.runtime.tsx",
1102
- "line": 21,
1102
+ "line": 24,
1103
1103
  "character": 3
1104
1104
  },
1105
1105
  "name": "CompositionsUI"
@@ -1110,7 +1110,7 @@
1110
1110
  "__schema": "FunctionLikeSchema",
1111
1111
  "location": {
1112
1112
  "filePath": "compositions.ui.runtime.tsx",
1113
- "line": 26,
1113
+ "line": 29,
1114
1114
  "character": 3
1115
1115
  },
1116
1116
  "signature": "(method) CompositionsUI.registerMenuWidget(...widget: MenuBarWidget[]): void",
@@ -1120,7 +1120,7 @@
1120
1120
  "__schema": "ParameterSchema",
1121
1121
  "location": {
1122
1122
  "filePath": "compositions.ui.runtime.tsx",
1123
- "line": 26,
1123
+ "line": 29,
1124
1124
  "character": 22
1125
1125
  },
1126
1126
  "name": "widget",
@@ -1128,14 +1128,14 @@
1128
1128
  "__schema": "TypeArraySchema",
1129
1129
  "location": {
1130
1130
  "filePath": "compositions.ui.runtime.tsx",
1131
- "line": 26,
1131
+ "line": 29,
1132
1132
  "character": 33
1133
1133
  },
1134
1134
  "type": {
1135
1135
  "__schema": "TypeRefSchema",
1136
1136
  "location": {
1137
1137
  "filePath": "compositions.ui.runtime.tsx",
1138
- "line": 26,
1138
+ "line": 29,
1139
1139
  "character": 33
1140
1140
  },
1141
1141
  "name": "MenuBarWidget",
@@ -1150,7 +1150,7 @@
1150
1150
  "__schema": "InferenceTypeSchema",
1151
1151
  "location": {
1152
1152
  "filePath": "compositions.ui.runtime.tsx",
1153
- "line": 26,
1153
+ "line": 29,
1154
1154
  "character": 3
1155
1155
  },
1156
1156
  "type": "void"
@@ -1161,7 +1161,7 @@
1161
1161
  "__schema": "VariableLikeSchema",
1162
1162
  "location": {
1163
1163
  "filePath": "compositions.ui.runtime.tsx",
1164
- "line": 30,
1164
+ "line": 33,
1165
1165
  "character": 3
1166
1166
  },
1167
1167
  "signature": "(property) CompositionsUI.getCompositionsCompare: () => React.JSX.Element",
@@ -1170,7 +1170,7 @@
1170
1170
  "__schema": "InferenceTypeSchema",
1171
1171
  "location": {
1172
1172
  "filePath": "compositions.ui.runtime.tsx",
1173
- "line": 30,
1173
+ "line": 33,
1174
1174
  "character": 3
1175
1175
  },
1176
1176
  "type": "() => React.JSX.Element"
@@ -1182,7 +1182,7 @@
1182
1182
  "__schema": "VariableLikeSchema",
1183
1183
  "location": {
1184
1184
  "filePath": "compositions.ui.runtime.tsx",
1185
- "line": 41,
1185
+ "line": 44,
1186
1186
  "character": 3
1187
1187
  },
1188
1188
  "signature": "(property) CompositionsUI.dependencies: Aspect[]",
@@ -1191,7 +1191,7 @@
1191
1191
  "__schema": "InferenceTypeSchema",
1192
1192
  "location": {
1193
1193
  "filePath": "compositions.ui.runtime.tsx",
1194
- "line": 41,
1194
+ "line": 44,
1195
1195
  "character": 3
1196
1196
  },
1197
1197
  "type": "Aspect[]"
@@ -1203,7 +1203,7 @@
1203
1203
  "__schema": "VariableLikeSchema",
1204
1204
  "location": {
1205
1205
  "filePath": "compositions.ui.runtime.tsx",
1206
- "line": 42,
1206
+ "line": 45,
1207
1207
  "character": 3
1208
1208
  },
1209
1209
  "signature": "(property) CompositionsUI.runtime: RuntimeDefinition",
@@ -1212,7 +1212,7 @@
1212
1212
  "__schema": "InferenceTypeSchema",
1213
1213
  "location": {
1214
1214
  "filePath": "compositions.ui.runtime.tsx",
1215
- "line": 42,
1215
+ "line": 45,
1216
1216
  "character": 3
1217
1217
  },
1218
1218
  "type": "RuntimeDefinition"
@@ -1224,7 +1224,7 @@
1224
1224
  "__schema": "VariableLikeSchema",
1225
1225
  "location": {
1226
1226
  "filePath": "compositions.ui.runtime.tsx",
1227
- "line": 43,
1227
+ "line": 46,
1228
1228
  "character": 3
1229
1229
  },
1230
1230
  "signature": "(property) CompositionsUI.slots: ((registerFn: () => string) => SlotRegistry<ReactNode>)[]",
@@ -1233,7 +1233,7 @@
1233
1233
  "__schema": "InferenceTypeSchema",
1234
1234
  "location": {
1235
1235
  "filePath": "compositions.ui.runtime.tsx",
1236
- "line": 43,
1236
+ "line": 46,
1237
1237
  "character": 3
1238
1238
  },
1239
1239
  "type": "((registerFn: () => string) => SlotRegistry<ReactNode>)[]"
@@ -1245,7 +1245,7 @@
1245
1245
  "__schema": "FunctionLikeSchema",
1246
1246
  "location": {
1247
1247
  "filePath": "compositions.ui.runtime.tsx",
1248
- "line": 45,
1248
+ "line": 48,
1249
1249
  "character": 3
1250
1250
  },
1251
1251
  "signature": "(method) CompositionsUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], config: {}, [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]): Promise<CompositionsUI>",
@@ -1255,7 +1255,7 @@
1255
1255
  "__schema": "ParameterSchema",
1256
1256
  "location": {
1257
1257
  "filePath": "compositions.ui.runtime.tsx",
1258
- "line": 46,
1258
+ "line": 49,
1259
1259
  "character": 5
1260
1260
  },
1261
1261
  "name": "[ component, componentCompare ]",
@@ -1263,7 +1263,7 @@
1263
1263
  "__schema": "TupleTypeSchema",
1264
1264
  "location": {
1265
1265
  "filePath": "compositions.ui.runtime.tsx",
1266
- "line": 46,
1266
+ "line": 49,
1267
1267
  "character": 36
1268
1268
  },
1269
1269
  "elements": [
@@ -1271,7 +1271,7 @@
1271
1271
  "__schema": "TypeRefSchema",
1272
1272
  "location": {
1273
1273
  "filePath": "compositions.ui.runtime.tsx",
1274
- "line": 46,
1274
+ "line": 49,
1275
1275
  "character": 37
1276
1276
  },
1277
1277
  "name": "ComponentUI",
@@ -1284,7 +1284,7 @@
1284
1284
  "__schema": "TypeRefSchema",
1285
1285
  "location": {
1286
1286
  "filePath": "compositions.ui.runtime.tsx",
1287
- "line": 46,
1287
+ "line": 49,
1288
1288
  "character": 50
1289
1289
  },
1290
1290
  "name": "ComponentCompareUI",
@@ -1302,7 +1302,7 @@
1302
1302
  "__schema": "ParameterSchema",
1303
1303
  "location": {
1304
1304
  "filePath": "compositions.ui.runtime.tsx",
1305
- "line": 47,
1305
+ "line": 50,
1306
1306
  "character": 5
1307
1307
  },
1308
1308
  "name": "config",
@@ -1310,7 +1310,7 @@
1310
1310
  "__schema": "TypeLiteralSchema",
1311
1311
  "location": {
1312
1312
  "filePath": "compositions.ui.runtime.tsx",
1313
- "line": 47,
1313
+ "line": 50,
1314
1314
  "character": 13
1315
1315
  },
1316
1316
  "members": []
@@ -1322,7 +1322,7 @@
1322
1322
  "__schema": "ParameterSchema",
1323
1323
  "location": {
1324
1324
  "filePath": "compositions.ui.runtime.tsx",
1325
- "line": 48,
1325
+ "line": 51,
1326
1326
  "character": 5
1327
1327
  },
1328
1328
  "name": "[ compositionMenuSlot, emptyStateSlot ]",
@@ -1330,7 +1330,7 @@
1330
1330
  "__schema": "TupleTypeSchema",
1331
1331
  "location": {
1332
1332
  "filePath": "compositions.ui.runtime.tsx",
1333
- "line": 48,
1333
+ "line": 51,
1334
1334
  "character": 44
1335
1335
  },
1336
1336
  "elements": [
@@ -1338,7 +1338,7 @@
1338
1338
  "__schema": "TypeRefSchema",
1339
1339
  "location": {
1340
1340
  "filePath": "compositions.ui.runtime.tsx",
1341
- "line": 48,
1341
+ "line": 51,
1342
1342
  "character": 45
1343
1343
  },
1344
1344
  "name": "CompositionsMenuSlot"
@@ -1347,7 +1347,7 @@
1347
1347
  "__schema": "TypeRefSchema",
1348
1348
  "location": {
1349
1349
  "filePath": "compositions.ui.runtime.tsx",
1350
- "line": 48,
1350
+ "line": 51,
1351
1351
  "character": 67
1352
1352
  },
1353
1353
  "name": "EmptyStateSlot"
@@ -1362,7 +1362,7 @@
1362
1362
  "__schema": "InferenceTypeSchema",
1363
1363
  "location": {
1364
1364
  "filePath": "compositions.ui.runtime.tsx",
1365
- "line": 45,
1365
+ "line": 48,
1366
1366
  "character": 3
1367
1367
  },
1368
1368
  "type": "Promise<CompositionsUI>"
@@ -3129,7 +3129,7 @@
3129
3129
  "componentId": {
3130
3130
  "scope": "teambit.component",
3131
3131
  "name": "sources",
3132
- "version": "0.0.33"
3132
+ "version": "0.0.34"
3133
3133
  }
3134
3134
  }
3135
3135
  }
@@ -3863,16 +3863,16 @@
3863
3863
  "__schema": "ParameterSchema",
3864
3864
  "location": {
3865
3865
  "filePath": "compositions.ui.runtime.tsx",
3866
- "line": 17,
3867
- "character": 15
3866
+ "line": 18,
3867
+ "character": 5
3868
3868
  },
3869
3869
  "name": "menuBarWidgetSlot",
3870
3870
  "type": {
3871
3871
  "__schema": "TypeRefSchema",
3872
3872
  "location": {
3873
3873
  "filePath": "compositions.ui.runtime.tsx",
3874
- "line": 17,
3875
- "character": 42
3874
+ "line": 18,
3875
+ "character": 32
3876
3876
  },
3877
3877
  "name": "CompositionsMenuSlot"
3878
3878
  },
@@ -3883,16 +3883,16 @@
3883
3883
  "__schema": "ParameterSchema",
3884
3884
  "location": {
3885
3885
  "filePath": "compositions.ui.runtime.tsx",
3886
- "line": 17,
3887
- "character": 64
3886
+ "line": 19,
3887
+ "character": 5
3888
3888
  },
3889
3889
  "name": "emptyStateSlot",
3890
3890
  "type": {
3891
3891
  "__schema": "TypeRefSchema",
3892
3892
  "location": {
3893
3893
  "filePath": "compositions.ui.runtime.tsx",
3894
- "line": 17,
3895
- "character": 88
3894
+ "line": 19,
3895
+ "character": 29
3896
3896
  },
3897
3897
  "name": "EmptyStateSlot"
3898
3898
  },
@@ -3915,14 +3915,14 @@
3915
3915
  "__schema": "FunctionLikeSchema",
3916
3916
  "location": {
3917
3917
  "filePath": "compositions.ui.runtime.tsx",
3918
- "line": 21,
3918
+ "line": 24,
3919
3919
  "character": 3
3920
3920
  },
3921
3921
  "doc": {
3922
3922
  "__schema": "DocSchema",
3923
3923
  "location": {
3924
3924
  "filePath": "compositions.ui.runtime.tsx",
3925
- "line": 18,
3925
+ "line": 21,
3926
3926
  "character": 3
3927
3927
  },
3928
3928
  "raw": "/**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */",
@@ -3936,7 +3936,7 @@
3936
3936
  "__schema": "ParameterSchema",
3937
3937
  "location": {
3938
3938
  "filePath": "compositions.ui.runtime.tsx",
3939
- "line": 21,
3939
+ "line": 24,
3940
3940
  "character": 22
3941
3941
  },
3942
3942
  "name": "emptyStateComponent",
@@ -3944,7 +3944,7 @@
3944
3944
  "__schema": "TypeRefSchema",
3945
3945
  "location": {
3946
3946
  "filePath": "compositions.ui.runtime.tsx",
3947
- "line": 21,
3947
+ "line": 24,
3948
3948
  "character": 43
3949
3949
  },
3950
3950
  "name": "ComponentType",
@@ -3958,7 +3958,7 @@
3958
3958
  "__schema": "TypeRefSchema",
3959
3959
  "location": {
3960
3960
  "filePath": "compositions.ui.runtime.tsx",
3961
- "line": 21,
3961
+ "line": 24,
3962
3962
  "character": 3
3963
3963
  },
3964
3964
  "name": "CompositionsUI"
@@ -3969,7 +3969,7 @@
3969
3969
  "__schema": "FunctionLikeSchema",
3970
3970
  "location": {
3971
3971
  "filePath": "compositions.ui.runtime.tsx",
3972
- "line": 26,
3972
+ "line": 29,
3973
3973
  "character": 3
3974
3974
  },
3975
3975
  "signature": "(method) CompositionsUI.registerMenuWidget(...widget: MenuBarWidget[]): void",
@@ -3979,7 +3979,7 @@
3979
3979
  "__schema": "ParameterSchema",
3980
3980
  "location": {
3981
3981
  "filePath": "compositions.ui.runtime.tsx",
3982
- "line": 26,
3982
+ "line": 29,
3983
3983
  "character": 22
3984
3984
  },
3985
3985
  "name": "widget",
@@ -3987,14 +3987,14 @@
3987
3987
  "__schema": "TypeArraySchema",
3988
3988
  "location": {
3989
3989
  "filePath": "compositions.ui.runtime.tsx",
3990
- "line": 26,
3990
+ "line": 29,
3991
3991
  "character": 33
3992
3992
  },
3993
3993
  "type": {
3994
3994
  "__schema": "TypeRefSchema",
3995
3995
  "location": {
3996
3996
  "filePath": "compositions.ui.runtime.tsx",
3997
- "line": 26,
3997
+ "line": 29,
3998
3998
  "character": 33
3999
3999
  },
4000
4000
  "name": "MenuBarWidget",
@@ -4009,7 +4009,7 @@
4009
4009
  "__schema": "InferenceTypeSchema",
4010
4010
  "location": {
4011
4011
  "filePath": "compositions.ui.runtime.tsx",
4012
- "line": 26,
4012
+ "line": 29,
4013
4013
  "character": 3
4014
4014
  },
4015
4015
  "type": "void"
@@ -4020,7 +4020,7 @@
4020
4020
  "__schema": "VariableLikeSchema",
4021
4021
  "location": {
4022
4022
  "filePath": "compositions.ui.runtime.tsx",
4023
- "line": 30,
4023
+ "line": 33,
4024
4024
  "character": 3
4025
4025
  },
4026
4026
  "signature": "(property) CompositionsUI.getCompositionsCompare: () => React.JSX.Element",
@@ -4029,7 +4029,7 @@
4029
4029
  "__schema": "InferenceTypeSchema",
4030
4030
  "location": {
4031
4031
  "filePath": "compositions.ui.runtime.tsx",
4032
- "line": 30,
4032
+ "line": 33,
4033
4033
  "character": 3
4034
4034
  },
4035
4035
  "type": "() => React.JSX.Element"
@@ -4041,7 +4041,7 @@
4041
4041
  "__schema": "VariableLikeSchema",
4042
4042
  "location": {
4043
4043
  "filePath": "compositions.ui.runtime.tsx",
4044
- "line": 41,
4044
+ "line": 44,
4045
4045
  "character": 3
4046
4046
  },
4047
4047
  "signature": "(property) CompositionsUI.dependencies: Aspect[]",
@@ -4050,7 +4050,7 @@
4050
4050
  "__schema": "InferenceTypeSchema",
4051
4051
  "location": {
4052
4052
  "filePath": "compositions.ui.runtime.tsx",
4053
- "line": 41,
4053
+ "line": 44,
4054
4054
  "character": 3
4055
4055
  },
4056
4056
  "type": "Aspect[]"
@@ -4062,7 +4062,7 @@
4062
4062
  "__schema": "VariableLikeSchema",
4063
4063
  "location": {
4064
4064
  "filePath": "compositions.ui.runtime.tsx",
4065
- "line": 42,
4065
+ "line": 45,
4066
4066
  "character": 3
4067
4067
  },
4068
4068
  "signature": "(property) CompositionsUI.runtime: RuntimeDefinition",
@@ -4071,7 +4071,7 @@
4071
4071
  "__schema": "InferenceTypeSchema",
4072
4072
  "location": {
4073
4073
  "filePath": "compositions.ui.runtime.tsx",
4074
- "line": 42,
4074
+ "line": 45,
4075
4075
  "character": 3
4076
4076
  },
4077
4077
  "type": "RuntimeDefinition"
@@ -4083,7 +4083,7 @@
4083
4083
  "__schema": "VariableLikeSchema",
4084
4084
  "location": {
4085
4085
  "filePath": "compositions.ui.runtime.tsx",
4086
- "line": 43,
4086
+ "line": 46,
4087
4087
  "character": 3
4088
4088
  },
4089
4089
  "signature": "(property) CompositionsUI.slots: ((registerFn: () => string) => SlotRegistry<ReactNode>)[]",
@@ -4092,7 +4092,7 @@
4092
4092
  "__schema": "InferenceTypeSchema",
4093
4093
  "location": {
4094
4094
  "filePath": "compositions.ui.runtime.tsx",
4095
- "line": 43,
4095
+ "line": 46,
4096
4096
  "character": 3
4097
4097
  },
4098
4098
  "type": "((registerFn: () => string) => SlotRegistry<ReactNode>)[]"
@@ -4104,7 +4104,7 @@
4104
4104
  "__schema": "FunctionLikeSchema",
4105
4105
  "location": {
4106
4106
  "filePath": "compositions.ui.runtime.tsx",
4107
- "line": 45,
4107
+ "line": 48,
4108
4108
  "character": 3
4109
4109
  },
4110
4110
  "signature": "(method) CompositionsUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], config: {}, [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]): Promise<CompositionsUI>",
@@ -4114,7 +4114,7 @@
4114
4114
  "__schema": "ParameterSchema",
4115
4115
  "location": {
4116
4116
  "filePath": "compositions.ui.runtime.tsx",
4117
- "line": 46,
4117
+ "line": 49,
4118
4118
  "character": 5
4119
4119
  },
4120
4120
  "name": "[ component, componentCompare ]",
@@ -4122,7 +4122,7 @@
4122
4122
  "__schema": "TupleTypeSchema",
4123
4123
  "location": {
4124
4124
  "filePath": "compositions.ui.runtime.tsx",
4125
- "line": 46,
4125
+ "line": 49,
4126
4126
  "character": 36
4127
4127
  },
4128
4128
  "elements": [
@@ -4130,7 +4130,7 @@
4130
4130
  "__schema": "TypeRefSchema",
4131
4131
  "location": {
4132
4132
  "filePath": "compositions.ui.runtime.tsx",
4133
- "line": 46,
4133
+ "line": 49,
4134
4134
  "character": 37
4135
4135
  },
4136
4136
  "name": "ComponentUI",
@@ -4143,7 +4143,7 @@
4143
4143
  "__schema": "TypeRefSchema",
4144
4144
  "location": {
4145
4145
  "filePath": "compositions.ui.runtime.tsx",
4146
- "line": 46,
4146
+ "line": 49,
4147
4147
  "character": 50
4148
4148
  },
4149
4149
  "name": "ComponentCompareUI",
@@ -4161,7 +4161,7 @@
4161
4161
  "__schema": "ParameterSchema",
4162
4162
  "location": {
4163
4163
  "filePath": "compositions.ui.runtime.tsx",
4164
- "line": 47,
4164
+ "line": 50,
4165
4165
  "character": 5
4166
4166
  },
4167
4167
  "name": "config",
@@ -4169,7 +4169,7 @@
4169
4169
  "__schema": "TypeLiteralSchema",
4170
4170
  "location": {
4171
4171
  "filePath": "compositions.ui.runtime.tsx",
4172
- "line": 47,
4172
+ "line": 50,
4173
4173
  "character": 13
4174
4174
  },
4175
4175
  "members": []
@@ -4181,7 +4181,7 @@
4181
4181
  "__schema": "ParameterSchema",
4182
4182
  "location": {
4183
4183
  "filePath": "compositions.ui.runtime.tsx",
4184
- "line": 48,
4184
+ "line": 51,
4185
4185
  "character": 5
4186
4186
  },
4187
4187
  "name": "[ compositionMenuSlot, emptyStateSlot ]",
@@ -4189,7 +4189,7 @@
4189
4189
  "__schema": "TupleTypeSchema",
4190
4190
  "location": {
4191
4191
  "filePath": "compositions.ui.runtime.tsx",
4192
- "line": 48,
4192
+ "line": 51,
4193
4193
  "character": 44
4194
4194
  },
4195
4195
  "elements": [
@@ -4197,7 +4197,7 @@
4197
4197
  "__schema": "TypeRefSchema",
4198
4198
  "location": {
4199
4199
  "filePath": "compositions.ui.runtime.tsx",
4200
- "line": 48,
4200
+ "line": 51,
4201
4201
  "character": 45
4202
4202
  },
4203
4203
  "name": "CompositionsMenuSlot"
@@ -4206,7 +4206,7 @@
4206
4206
  "__schema": "TypeRefSchema",
4207
4207
  "location": {
4208
4208
  "filePath": "compositions.ui.runtime.tsx",
4209
- "line": 48,
4209
+ "line": 51,
4210
4210
  "character": 67
4211
4211
  },
4212
4212
  "name": "EmptyStateSlot"
@@ -4221,7 +4221,7 @@
4221
4221
  "__schema": "InferenceTypeSchema",
4222
4222
  "location": {
4223
4223
  "filePath": "compositions.ui.runtime.tsx",
4224
- "line": 45,
4224
+ "line": 48,
4225
4225
  "character": 3
4226
4226
  },
4227
4227
  "type": "Promise<CompositionsUI>"
@@ -4239,7 +4239,7 @@
4239
4239
  "__schema": "UnImplementedSchema",
4240
4240
  "location": {
4241
4241
  "filePath": "compositions.ui.runtime.tsx",
4242
- "line": 65,
4242
+ "line": 68,
4243
4243
  "character": 16
4244
4244
  },
4245
4245
  "name": "CompositionsUI",
@@ -4251,7 +4251,7 @@
4251
4251
  "__schema": "UnImplementedSchema",
4252
4252
  "location": {
4253
4253
  "filePath": "compositions.ui.runtime.tsx",
4254
- "line": 67,
4254
+ "line": 70,
4255
4255
  "character": 1
4256
4256
  },
4257
4257
  "name": "CompositionsAspect.addRuntime(CompositionsUI);",
@@ -5738,7 +5738,7 @@
5738
5738
  "componentId": {
5739
5739
  "scope": "teambit.preview",
5740
5740
  "name": "ui/component-preview",
5741
- "version": "1.0.15"
5741
+ "version": "1.0.16"
5742
5742
  }
5743
5743
  }
5744
5744
  ]
@@ -5842,7 +5842,7 @@
5842
5842
  "componentId": {
5843
5843
  "scope": "teambit.compositions",
5844
5844
  "name": "compositions",
5845
- "version": "1.0.425"
5845
+ "version": "1.0.427"
5846
5846
  },
5847
5847
  "taggedModuleExports": []
5848
5848
  }
@@ -14,7 +14,10 @@ export type CompositionsMenuSlot = SlotRegistry<MenuBarWidget[]>;
14
14
  export type EmptyStateSlot = SlotRegistry<ComponentType>;
15
15
 
16
16
  export class CompositionsUI {
17
- constructor(private menuBarWidgetSlot: CompositionsMenuSlot, private emptyStateSlot: EmptyStateSlot) {}
17
+ constructor(
18
+ private menuBarWidgetSlot: CompositionsMenuSlot,
19
+ private emptyStateSlot: EmptyStateSlot
20
+ ) {}
18
21
  /**
19
22
  * register a new tester empty state. this allows to register a different empty state from each environment for example.
20
23
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_component","_scope","_devFiles","_envs","_graphql","_preview","_schema","_toolboxPath","_workspace","_path","_composition","_compositions","_compositions2","_compositions3","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompositionsMain","constructor","compositionFilePattern","previewFilePattern","preview","workspace","schema","devFiles","envs","getPreviewFiles","components","ComponentMap","as","component","compositionFiles","state","filesystem","byGlob","previewFiles","Set","map","file","relative","files","filter","has","isCompositionFile","filePath","includePatterns","excludePatterns","splitPatterns","matchPatterns","getCompositions","entry","get","CompositionsAspect","id","compositions","Composition","fromArray","readCompositions","maybeFiles","byComponent","computeCompositions","flat","getCompositionFilePattern","getComponentDevPatterns","env","calculateEnv","skipWarnings","inInstallContext","componentEnvCompositionsDevPatterns","getCompositionsDevPatterns","componentPatterns","concat","name","pattern","getDevPatternToRegister","bind","onComponentLoad","loadOpts","loadCompositions","undefined","composition","toObject","pathArray","path","split","length","modulePath","join","componentDir","exports","parseModule","contents","toString","exportModel","displayName","staticProperties","identifier","provider","graphql","scope","config","compositionPreviewFilePattern","registerDevPattern","register","compositionsSchema","registerDefinition","CompositionPreviewDefinition","registerOnComponentLoad","registerOnCompAspectReCalc","MainRuntime","PreviewAspect","GraphqlAspect","WorkspaceAspect","SchemaAspect","DevFilesAspect","EnvsAspect","ScopeAspect","addRuntime"],"sources":["compositions.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { AspectData, Component, ComponentMap, IComponent } from '@teambit/component';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { DevFilesAspect, DevFilesMain } from '@teambit/dev-files';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentLoadOptions } from '@teambit/legacy/dist/consumer/component/component-loader';\nimport { AbstractVinyl } from '@teambit/component.sources';\nimport { PreviewAspect, PreviewMain } from '@teambit/preview';\nimport { SchemaAspect, SchemaMain } from '@teambit/schema';\nimport { matchPatterns, splitPatterns } from '@teambit/toolbox.path.match-patterns';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { join } from 'path';\nimport { Composition } from './composition';\nimport { CompositionsAspect } from './compositions.aspect';\nimport { compositionsSchema } from './compositions.graphql';\nimport { CompositionPreviewDefinition } from './compositions.preview-definition';\n\nexport type CompositionsConfig = {\n /**\n * glob pattern to detect composition files. This includes all related files, like styles and jsons.\n * @example ['/*.composition?(s).*']\n */\n compositionFilePattern: string[];\n /**\n * glob pattern to select Preview files. this will only include files matched by compositionFilePattern.\n * @example ['*.{t,j}s', '*.{t,j}sx']\n */\n compositionPreviewFilePattern: string[];\n};\n\n/**\n * the component documentation extension.\n */\nexport class CompositionsMain {\n constructor(\n /**\n * Glob pattern to select all composition files\n */\n private compositionFilePattern: string[],\n\n /**\n * Glob pattern to select composition preview files\n */\n private previewFilePattern: string[],\n\n /**\n * envs extension.\n */\n private preview: PreviewMain,\n\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * schema extension.\n */\n private schema: SchemaMain,\n\n private devFiles: DevFilesMain,\n\n private envs: EnvsMain\n ) {}\n\n /**\n * returns an array of doc file paths for a set of components.\n */\n getPreviewFiles(components: Component[]): ComponentMap<AbstractVinyl[]> {\n return ComponentMap.as<AbstractVinyl[]>(components, (component) => {\n // this includes non executables, like `button.compositions.module.scss` or `presets.compositions.json`\n const compositionFiles = component.state.filesystem.byGlob(this.compositionFilePattern);\n\n // select only relevant preview files (.tsx, etc)\n const previewFiles = new Set(\n component.state.filesystem.byGlob(this.previewFilePattern).map((file) => file.relative)\n );\n const files = compositionFiles.filter((file) => previewFiles.has(file.relative));\n\n return files;\n });\n }\n\n /**\n * checks if a file matches the composition file pattern.\n */\n isCompositionFile(filePath: string): boolean {\n const { includePatterns, excludePatterns } = splitPatterns(this.compositionFilePattern);\n return matchPatterns(filePath, includePatterns, excludePatterns);\n }\n\n /**\n * get component compositions.\n */\n getCompositions(component: IComponent): Composition[] {\n const entry = component.get(CompositionsAspect.id);\n if (!entry) return [];\n const compositions = entry.data.compositions;\n if (!compositions) return [];\n\n return Composition.fromArray(compositions);\n }\n\n /**\n * read composition from the component source code.\n */\n readCompositions(component: Component): Composition[] {\n const maybeFiles = this.getPreviewFiles([component]).byComponent(component);\n\n if (!maybeFiles) return [];\n const [, files] = maybeFiles;\n return files.map((file) => this.computeCompositions(component, file)).flat();\n }\n\n getCompositionFilePattern() {\n return this.compositionFilePattern;\n }\n\n getComponentDevPatterns(component: Component) {\n const env = this.envs.calculateEnv(component, { skipWarnings: !!this.workspace?.inInstallContext }).env;\n const componentEnvCompositionsDevPatterns: string[] = env.getCompositionsDevPatterns\n ? env.getCompositionsDevPatterns(component)\n : [];\n const componentPatterns = componentEnvCompositionsDevPatterns.concat(this.getCompositionFilePattern());\n return { name: 'compositions', pattern: componentPatterns };\n }\n\n getDevPatternToRegister() {\n return this.getComponentDevPatterns.bind(this);\n }\n\n async onComponentLoad(component: Component, loadOpts?: ComponentLoadOptions): Promise<AspectData | undefined> {\n if (loadOpts?.loadCompositions === false) return undefined;\n const compositions = this.readCompositions(component);\n return {\n compositions: compositions.map((composition) => composition.toObject()),\n };\n }\n\n private computeCompositions(component: Component, file: AbstractVinyl): Composition[] {\n // :TODO hacked for a specific file extension now until david will take care in the compiler.\n const pathArray = file.path.split('.');\n pathArray[pathArray.length - 1] = 'js';\n\n const modulePath = this.workspace ? join(this.workspace.componentDir(component.id), file.relative) : file.relative;\n const exports = this.schema.parseModule(modulePath, file.contents.toString());\n return exports.map((exportModel) => {\n const displayName = exportModel.staticProperties?.get('compositionName');\n\n return new Composition(\n exportModel.identifier,\n file.relative,\n typeof displayName === 'string' ? displayName : undefined\n );\n });\n }\n\n static defaultConfig: CompositionsConfig = {\n compositionFilePattern: ['**/*.composition?(s).*'],\n compositionPreviewFilePattern: ['**/*.{t,j}s?(x)'],\n };\n\n static runtime = MainRuntime;\n static dependencies = [\n PreviewAspect,\n GraphqlAspect,\n WorkspaceAspect,\n SchemaAspect,\n DevFilesAspect,\n EnvsAspect,\n ScopeAspect,\n ];\n\n static async provider(\n [preview, graphql, workspace, schema, devFiles, envs, scope]: [\n PreviewMain,\n GraphqlMain,\n Workspace,\n SchemaMain,\n DevFilesMain,\n EnvsMain,\n ScopeMain\n ],\n config: CompositionsConfig\n ) {\n const compositions = new CompositionsMain(\n config.compositionFilePattern,\n config.compositionPreviewFilePattern,\n preview,\n workspace,\n schema,\n devFiles,\n envs\n );\n\n // TODO: use the docs implementation to allow component specific pattern\n devFiles.registerDevPattern(compositions.getDevPatternToRegister());\n\n graphql.register(compositionsSchema(compositions));\n preview.registerDefinition(new CompositionPreviewDefinition(compositions));\n\n if (workspace) {\n workspace.registerOnComponentLoad(compositions.onComponentLoad.bind(compositions));\n }\n if (scope) {\n scope.registerOnCompAspectReCalc(compositions.onComponentLoad.bind(compositions));\n }\n\n return compositions;\n }\n}\n\nCompositionsA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B;AACF;AAACmC,OAAA,CAAAxE,gBAAA,GAAAA,gBAAA;AAAAnB,eAAA,CAjLYmB,gBAAgB,mBA4HgB;EACzCE,sBAAsB,EAAE,CAAC,wBAAwB,CAAC;EAClDkF,6BAA6B,EAAE,CAAC,iBAAiB;AACnD,CAAC;AAAAvG,eAAA,CA/HUmB,gBAAgB,aAiIV4F,kBAAW;AAAA/G,eAAA,CAjIjBmB,gBAAgB,kBAkIL,CACpB6F,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,kBAAU,EACVC,oBAAW,CACZ;AAyCHhE,kCAAkB,CAACiE,UAAU,CAACpG,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_component","_scope","_devFiles","_envs","_graphql","_preview","_schema","_toolboxPath","_workspace","_path","_composition","_compositions","_compositions2","_compositions3","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompositionsMain","constructor","compositionFilePattern","previewFilePattern","preview","workspace","schema","devFiles","envs","getPreviewFiles","components","ComponentMap","as","component","compositionFiles","state","filesystem","byGlob","previewFiles","Set","map","file","relative","files","filter","has","isCompositionFile","filePath","includePatterns","excludePatterns","splitPatterns","matchPatterns","getCompositions","entry","get","CompositionsAspect","id","compositions","Composition","fromArray","readCompositions","maybeFiles","byComponent","computeCompositions","flat","getCompositionFilePattern","getComponentDevPatterns","env","calculateEnv","skipWarnings","inInstallContext","componentEnvCompositionsDevPatterns","getCompositionsDevPatterns","componentPatterns","concat","name","pattern","getDevPatternToRegister","bind","onComponentLoad","loadOpts","loadCompositions","undefined","composition","toObject","pathArray","path","split","length","modulePath","join","componentDir","exports","parseModule","contents","toString","exportModel","displayName","staticProperties","identifier","provider","graphql","scope","config","compositionPreviewFilePattern","registerDevPattern","register","compositionsSchema","registerDefinition","CompositionPreviewDefinition","registerOnComponentLoad","registerOnCompAspectReCalc","MainRuntime","PreviewAspect","GraphqlAspect","WorkspaceAspect","SchemaAspect","DevFilesAspect","EnvsAspect","ScopeAspect","addRuntime"],"sources":["compositions.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { AspectData, Component, ComponentMap, IComponent } from '@teambit/component';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { DevFilesAspect, DevFilesMain } from '@teambit/dev-files';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ComponentLoadOptions } from '@teambit/legacy/dist/consumer/component/component-loader';\nimport { AbstractVinyl } from '@teambit/component.sources';\nimport { PreviewAspect, PreviewMain } from '@teambit/preview';\nimport { SchemaAspect, SchemaMain } from '@teambit/schema';\nimport { matchPatterns, splitPatterns } from '@teambit/toolbox.path.match-patterns';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { join } from 'path';\nimport { Composition } from './composition';\nimport { CompositionsAspect } from './compositions.aspect';\nimport { compositionsSchema } from './compositions.graphql';\nimport { CompositionPreviewDefinition } from './compositions.preview-definition';\n\nexport type CompositionsConfig = {\n /**\n * glob pattern to detect composition files. This includes all related files, like styles and jsons.\n * @example ['/*.composition?(s).*']\n */\n compositionFilePattern: string[];\n /**\n * glob pattern to select Preview files. this will only include files matched by compositionFilePattern.\n * @example ['*.{t,j}s', '*.{t,j}sx']\n */\n compositionPreviewFilePattern: string[];\n};\n\n/**\n * the component documentation extension.\n */\nexport class CompositionsMain {\n constructor(\n /**\n * Glob pattern to select all composition files\n */\n private compositionFilePattern: string[],\n\n /**\n * Glob pattern to select composition preview files\n */\n private previewFilePattern: string[],\n\n /**\n * envs extension.\n */\n private preview: PreviewMain,\n\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * schema extension.\n */\n private schema: SchemaMain,\n\n private devFiles: DevFilesMain,\n\n private envs: EnvsMain\n ) {}\n\n /**\n * returns an array of doc file paths for a set of components.\n */\n getPreviewFiles(components: Component[]): ComponentMap<AbstractVinyl[]> {\n return ComponentMap.as<AbstractVinyl[]>(components, (component) => {\n // this includes non executables, like `button.compositions.module.scss` or `presets.compositions.json`\n const compositionFiles = component.state.filesystem.byGlob(this.compositionFilePattern);\n\n // select only relevant preview files (.tsx, etc)\n const previewFiles = new Set(\n component.state.filesystem.byGlob(this.previewFilePattern).map((file) => file.relative)\n );\n const files = compositionFiles.filter((file) => previewFiles.has(file.relative));\n\n return files;\n });\n }\n\n /**\n * checks if a file matches the composition file pattern.\n */\n isCompositionFile(filePath: string): boolean {\n const { includePatterns, excludePatterns } = splitPatterns(this.compositionFilePattern);\n return matchPatterns(filePath, includePatterns, excludePatterns);\n }\n\n /**\n * get component compositions.\n */\n getCompositions(component: IComponent): Composition[] {\n const entry = component.get(CompositionsAspect.id);\n if (!entry) return [];\n const compositions = entry.data.compositions;\n if (!compositions) return [];\n\n return Composition.fromArray(compositions);\n }\n\n /**\n * read composition from the component source code.\n */\n readCompositions(component: Component): Composition[] {\n const maybeFiles = this.getPreviewFiles([component]).byComponent(component);\n\n if (!maybeFiles) return [];\n const [, files] = maybeFiles;\n return files.map((file) => this.computeCompositions(component, file)).flat();\n }\n\n getCompositionFilePattern() {\n return this.compositionFilePattern;\n }\n\n getComponentDevPatterns(component: Component) {\n const env = this.envs.calculateEnv(component, { skipWarnings: !!this.workspace?.inInstallContext }).env;\n const componentEnvCompositionsDevPatterns: string[] = env.getCompositionsDevPatterns\n ? env.getCompositionsDevPatterns(component)\n : [];\n const componentPatterns = componentEnvCompositionsDevPatterns.concat(this.getCompositionFilePattern());\n return { name: 'compositions', pattern: componentPatterns };\n }\n\n getDevPatternToRegister() {\n return this.getComponentDevPatterns.bind(this);\n }\n\n async onComponentLoad(component: Component, loadOpts?: ComponentLoadOptions): Promise<AspectData | undefined> {\n if (loadOpts?.loadCompositions === false) return undefined;\n const compositions = this.readCompositions(component);\n return {\n compositions: compositions.map((composition) => composition.toObject()),\n };\n }\n\n private computeCompositions(component: Component, file: AbstractVinyl): Composition[] {\n // :TODO hacked for a specific file extension now until david will take care in the compiler.\n const pathArray = file.path.split('.');\n pathArray[pathArray.length - 1] = 'js';\n\n const modulePath = this.workspace ? join(this.workspace.componentDir(component.id), file.relative) : file.relative;\n const exports = this.schema.parseModule(modulePath, file.contents.toString());\n return exports.map((exportModel) => {\n const displayName = exportModel.staticProperties?.get('compositionName');\n\n return new Composition(\n exportModel.identifier,\n file.relative,\n typeof displayName === 'string' ? displayName : undefined\n );\n });\n }\n\n static defaultConfig: CompositionsConfig = {\n compositionFilePattern: ['**/*.composition?(s).*'],\n compositionPreviewFilePattern: ['**/*.{t,j}s?(x)'],\n };\n\n static runtime = MainRuntime;\n static dependencies = [\n PreviewAspect,\n GraphqlAspect,\n WorkspaceAspect,\n SchemaAspect,\n DevFilesAspect,\n EnvsAspect,\n ScopeAspect,\n ];\n\n static async provider(\n [preview, graphql, workspace, schema, devFiles, envs, scope]: [\n PreviewMain,\n GraphqlMain,\n Workspace,\n SchemaMain,\n DevFilesMain,\n EnvsMain,\n ScopeMain,\n ],\n config: CompositionsConfig\n ) {\n const compositions = new CompositionsMain(\n config.compositionFilePattern,\n config.compositionPreviewFilePattern,\n preview,\n workspace,\n schema,\n devFiles,\n envs\n );\n\n // TODO: use the docs implementation to allow component specific pattern\n devFiles.registerDevPattern(compositions.getDevPatternToRegister());\n\n graphql.register(compositionsSchema(compositions));\n preview.registerDefinition(new CompositionPreviewDefinition(compositions));\n\n if (workspace) {\n workspace.registerOnComponentLoad(compositions.onComponentLoad.bind(compositions));\n }\n if (scope) {\n scope.registerOnCompAspectReCalc(compositions.onComponentLoad.bind(compositions));\n }\n\n return compositions;\n }\n}\n\nCompositionsAspect.addRuntime(CompositionsMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,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E,CAAC,iBAAiB;AACnD,CAAC;AAAAvG,eAAA,CA/HUmB,gBAAgB,aAiIV4F,kBAAW;AAAA/G,eAAA,CAjIjBmB,gBAAgB,kBAkIL,CACpB6F,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,kBAAU,EACVC,oBAAW,CACZ;AAyCHhE,kCAAkB,CAACiE,UAAU,CAACpG,gBAAgB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_harmony","_component","_ui","_compositionsUi","_compositionsUi2","_componentCompare","_composition","_compositions","_compositions2","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_defineProperty","_toPropertyKey","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","CompositionsUI","constructor","menuBarWidgetSlot","emptyStateSlot","createElement","CompositionCompare","emptyState","PreviewView","compositionProps","CompositionContent","fullContentHeight","forceHeight","registerEmptyState","emptyStateComponent","register","registerMenuWidget","widget","provider","component","componentCompare","config","compositionMenuSlot","compositions","section","CompositionsSection","compositionCompare","CompositionCompareSection","registerRoute","route","registerNavigation","navigationLink","order","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","_default","CompositionsAspect","addRuntime"],"sources":["compositions.ui.runtime.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { ComponentType } from 'react';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CompositionCompareSection } from '@teambit/compositions.ui.composition-compare-section';\nimport { CompositionCompare } from '@teambit/compositions.ui.composition-compare';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CompositionsSection } from './composition.section';\nimport { CompositionsAspect } from './compositions.aspect';\nimport { CompositionContent, MenuBarWidget } from './compositions';\n\nexport type CompositionsMenuSlot = SlotRegistry<MenuBarWidget[]>;\nexport type EmptyStateSlot = SlotRegistry<ComponentType>;\n\nexport class CompositionsUI {\n constructor(private menuBarWidgetSlot: CompositionsMenuSlot, private emptyStateSlot: EmptyStateSlot) {}\n /**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */\n registerEmptyState(emptyStateComponent: ComponentType) {\n this.emptyStateSlot.register(emptyStateComponent);\n return this;\n }\n\n registerMenuWidget(...widget: MenuBarWidget[]) {\n this.menuBarWidgetSlot.register(widget);\n }\n\n getCompositionsCompare = () => {\n return (\n <CompositionCompare\n emptyState={this.emptyStateSlot}\n PreviewView={(compositionProps) => {\n return <CompositionContent {...compositionProps} fullContentHeight forceHeight={'100%'} />;\n }}\n />\n );\n };\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n static runtime = UIRuntime;\n static slots = [Slot.withType<ReactNode>(), Slot.withType<ComponentType>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n config: {},\n [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]\n ) {\n const compositions = new CompositionsUI(compositionMenuSlot, emptyStateSlot);\n const section = new CompositionsSection(\n compositions,\n { menuBarWidgetSlot: compositions.menuBarWidgetSlot },\n emptyStateSlot\n );\n const compositionCompare = new CompositionCompareSection(compositions);\n component.registerRoute(section.route);\n component.registerNavigation(section.navigationLink, section.order);\n componentCompare.registerNavigation(compositionCompare);\n componentCompare.registerRoutes([compositionCompare.route]);\n return compositions;\n }\n}\n\nexport default CompositionsUI;\n\nCompositionsAspect.addRuntime(CompositionsUI);\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,Y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B,CAACa,cAAc,CAAC,CAACP,kBAAkB,CAACG,KAAK,CAAC,CAAC;IAC3D,OAAON,YAAY;EACrB;AACF;AAACW,OAAA,CAAAjC,cAAA,GAAAA,cAAA;AAAAd,eAAA,CA/CYc,cAAc,kBAyBH,CAACkC,4BAAe,EAAEC,0CAAsB,CAAC;AAAAjD,eAAA,CAzBpDc,cAAc,aA0BRoC,eAAS;AAAAlD,eAAA,CA1Bfc,cAAc,WA2BV,CAACqC,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAgB,CAAC,CAAC;AAAA,IAAAC,QAAA,GAAAN,OAAA,CAAA5D,OAAA,GAsB9D2B,cAAc;AAE7BwC,kCAAkB,CAACC,UAAU,CAACzC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_harmony","_component","_ui","_compositionsUi","_compositionsUi2","_componentCompare","_composition","_compositions","_compositions2","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_defineProperty","_toPropertyKey","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","CompositionsUI","constructor","menuBarWidgetSlot","emptyStateSlot","createElement","CompositionCompare","emptyState","PreviewView","compositionProps","CompositionContent","fullContentHeight","forceHeight","registerEmptyState","emptyStateComponent","register","registerMenuWidget","widget","provider","component","componentCompare","config","compositionMenuSlot","compositions","section","CompositionsSection","compositionCompare","CompositionCompareSection","registerRoute","route","registerNavigation","navigationLink","order","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","_default","CompositionsAspect","addRuntime"],"sources":["compositions.ui.runtime.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { ComponentType } from 'react';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CompositionCompareSection } from '@teambit/compositions.ui.composition-compare-section';\nimport { CompositionCompare } from '@teambit/compositions.ui.composition-compare';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CompositionsSection } from './composition.section';\nimport { CompositionsAspect } from './compositions.aspect';\nimport { CompositionContent, MenuBarWidget } from './compositions';\n\nexport type CompositionsMenuSlot = SlotRegistry<MenuBarWidget[]>;\nexport type EmptyStateSlot = SlotRegistry<ComponentType>;\n\nexport class CompositionsUI {\n constructor(\n private menuBarWidgetSlot: CompositionsMenuSlot,\n private emptyStateSlot: EmptyStateSlot\n ) {}\n /**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */\n registerEmptyState(emptyStateComponent: ComponentType) {\n this.emptyStateSlot.register(emptyStateComponent);\n return this;\n }\n\n registerMenuWidget(...widget: MenuBarWidget[]) {\n this.menuBarWidgetSlot.register(widget);\n }\n\n getCompositionsCompare = () => {\n return (\n <CompositionCompare\n emptyState={this.emptyStateSlot}\n PreviewView={(compositionProps) => {\n return <CompositionContent {...compositionProps} fullContentHeight forceHeight={'100%'} />;\n }}\n />\n );\n };\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n static runtime = UIRuntime;\n static slots = [Slot.withType<ReactNode>(), Slot.withType<ComponentType>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n config: {},\n [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]\n ) {\n const compositions = new CompositionsUI(compositionMenuSlot, emptyStateSlot);\n const section = new CompositionsSection(\n compositions,\n { menuBarWidgetSlot: compositions.menuBarWidgetSlot },\n emptyStateSlot\n );\n const compositionCompare = new CompositionCompareSection(compositions);\n component.registerRoute(section.route);\n component.registerNavigation(section.navigationLink, section.order);\n componentCompare.registerNavigation(compositionCompare);\n componentCompare.registerRoutes([compositionCompare.route]);\n return compositions;\n }\n}\n\nexport default CompositionsUI;\n\nCompositionsAspect.addRuntime(CompositionsUI);\n"],"mappings":";;;;;;AACA,S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S,CAACS,aAAa,CAACJ,OAAO,CAACK,KAAK,CAAC;IACtCV,SAAS,CAACW,kBAAkB,CAACN,OAAO,CAACO,cAAc,EAAEP,OAAO,CAACQ,KAAK,CAAC;IACnEZ,gBAAgB,CAACU,kBAAkB,CAACJ,kBAAkB,CAAC;IACvDN,gBAAgB,CAACa,cAAc,CAAC,CAACP,kBAAkB,CAACG,KAAK,CAAC,CAAC;IAC3D,OAAON,YAAY;EACrB;AACF;AAACW,OAAA,CAAAjC,cAAA,GAAAA,cAAA;AAAAd,eAAA,CAlDYc,cAAc,kBA4BH,CAACkC,4BAAe,EAAEC,0CAAsB,CAAC;AAAAjD,eAAA,CA5BpDc,cAAc,aA6BRoC,eAAS;AAAAlD,eAAA,CA7Bfc,cAAc,WA8BV,CAACqC,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAgB,CAAC,CAAC;AAAA,IAAAC,QAAA,GAAAN,OAAA,CAAA5D,OAAA,GAsB9D2B,cAAc;AAE7BwC,kCAAkB,CAACC,UAAU,CAACzC,cAAc,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.425/dist/compositions.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.425/dist/compositions.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.427/dist/compositions.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.427/dist/compositions.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -17,7 +17,9 @@
17
17
  opacity: 1;
18
18
  color: var(--bit-text-color-light, #6c707c);
19
19
  //TODO - fix hover effect and timing of icon
20
- transition: visibility 200ms, opacity 100ms ease-in-out;
20
+ transition:
21
+ visibility 200ms,
22
+ opacity 100ms ease-in-out;
21
23
  .icon {
22
24
  &:hover {
23
25
  color: var(--bit-text-color-heavy);
@@ -59,7 +61,9 @@
59
61
  opacity: 0;
60
62
  visibility: hidden;
61
63
  font-size: 13px;
62
- transition: visibility 200ms, opacity 100ms ease-in-out;
64
+ transition:
65
+ visibility 200ms,
66
+ opacity 100ms ease-in-out;
63
67
  }
64
68
  .codeLink {
65
69
  cursor: pointer;
@@ -120,7 +124,9 @@
120
124
  background-color: var(--bit-accent-color, #6c5ce7);
121
125
  height: 3px;
122
126
  border-radius: 10px;
123
- transition: background-color 300ms, height 300ms;
127
+ transition:
128
+ background-color 300ms,
129
+ height 300ms;
124
130
  }
125
131
  }
126
132
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/compositions",
3
- "version": "1.0.425",
3
+ "version": "1.0.427",
4
4
  "homepage": "https://bit.cloud/teambit/compositions/compositions",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compositions",
8
8
  "name": "compositions",
9
- "version": "1.0.425"
9
+ "version": "1.0.427"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -34,25 +34,25 @@
34
34
  "@teambit/compositions.ui.composition-compare": "0.0.255",
35
35
  "@teambit/evangelist.elements.icon": "1.0.2",
36
36
  "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.502",
37
- "@teambit/component": "1.0.425",
37
+ "@teambit/component": "1.0.427",
38
38
  "@teambit/compositions.model.composition-id": "0.0.502",
39
- "@teambit/graphql": "1.0.425",
40
- "@teambit/cli": "0.0.1002",
41
- "@teambit/component.sources": "0.0.33",
42
- "@teambit/dev-files": "1.0.425",
43
- "@teambit/envs": "1.0.425",
44
- "@teambit/preview": "1.0.425",
45
- "@teambit/schema": "1.0.425",
46
- "@teambit/scope": "1.0.425",
39
+ "@teambit/graphql": "1.0.427",
40
+ "@teambit/cli": "0.0.1004",
41
+ "@teambit/component.sources": "0.0.34",
42
+ "@teambit/dev-files": "1.0.427",
43
+ "@teambit/envs": "1.0.427",
44
+ "@teambit/preview": "1.0.427",
45
+ "@teambit/schema": "1.0.427",
46
+ "@teambit/scope": "1.0.427",
47
47
  "@teambit/toolbox.path.match-patterns": "0.0.15",
48
- "@teambit/workspace": "1.0.425",
48
+ "@teambit/workspace": "1.0.427",
49
49
  "@teambit/design.ui.tooltip": "0.0.371",
50
50
  "@teambit/docs.ui.queries.get-docs": "0.0.508",
51
- "@teambit/panels": "0.0.1004",
52
- "@teambit/preview.ui.component-preview": "1.0.15",
53
- "@teambit/ui-foundation.ui.buttons.collapser": "0.0.223",
54
- "@teambit/component-compare": "1.0.425",
55
- "@teambit/ui": "1.0.425"
51
+ "@teambit/panels": "0.0.1006",
52
+ "@teambit/preview.ui.component-preview": "1.0.16",
53
+ "@teambit/ui-foundation.ui.buttons.collapser": "0.0.224",
54
+ "@teambit/component-compare": "1.0.427",
55
+ "@teambit/ui": "1.0.427"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/lodash": "4.14.165",
@@ -17,7 +17,9 @@
17
17
  opacity: 1;
18
18
  color: var(--bit-text-color-light, #6c707c);
19
19
  //TODO - fix hover effect and timing of icon
20
- transition: visibility 200ms, opacity 100ms ease-in-out;
20
+ transition:
21
+ visibility 200ms,
22
+ opacity 100ms ease-in-out;
21
23
  .icon {
22
24
  &:hover {
23
25
  color: var(--bit-text-color-heavy);
@@ -59,7 +61,9 @@
59
61
  opacity: 0;
60
62
  visibility: hidden;
61
63
  font-size: 13px;
62
- transition: visibility 200ms, opacity 100ms ease-in-out;
64
+ transition:
65
+ visibility 200ms,
66
+ opacity 100ms ease-in-out;
63
67
  }
64
68
  .codeLink {
65
69
  cursor: pointer;
@@ -120,7 +124,9 @@
120
124
  background-color: var(--bit-accent-color, #6c5ce7);
121
125
  height: 3px;
122
126
  border-radius: 10px;
123
- transition: background-color 300ms, height 300ms;
127
+ transition:
128
+ background-color 300ms,
129
+ height 300ms;
124
130
  }
125
131
  }
126
132
  }