@teambit/compositions 1.0.310 → 1.0.312

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.310" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.compositions/compositions@1.0.312" 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={41341:(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.indexOf(t)>=0||{}.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.indexOf(n)>=0)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},31043:(e,o,t)=>{Object.defineProperty(o,"s",{enumerable:!0,get:function(){return n.default}});var n=i(t(41341));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}},22351:(e,o,t)=>{var n={id:"teambit.compositions/compositions@1.0.310",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(22351),a=(t(41594),t(5016));const r=TeambitMdxUiMdxScopeContext;var p=t(31043),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.indexOf(n)>=0)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.indexOf(t)>=0||{}.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={41341:(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.indexOf(t)>=0||{}.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.indexOf(n)>=0)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},31043:(e,o,t)=>{Object.defineProperty(o,"s",{enumerable:!0,get:function(){return n.default}});var n=i(t(41341));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}},4217:(e,o,t)=>{var n={id:"teambit.compositions/compositions@1.0.312",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(4217),a=(t(41594),t(5016));const r=TeambitMdxUiMdxScopeContext;var p=t(31043),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.indexOf(n)>=0)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.indexOf(t)>=0||{}.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})()));
@@ -71,7 +71,8 @@
71
71
  "character": 1
72
72
  },
73
73
  "raw": "/**\n * the component documentation extension.\n */",
74
- "comment": "the component documentation extension."
74
+ "comment": "the component documentation extension.",
75
+ "tags": []
75
76
  },
76
77
  "signature": "class CompositionsMain",
77
78
  "name": "CompositionsMain",
@@ -289,7 +290,8 @@
289
290
  "character": 3
290
291
  },
291
292
  "raw": "/**\n * returns an array of doc file paths for a set of components.\n */",
292
- "comment": "returns an array of doc file paths for a set of components."
293
+ "comment": "returns an array of doc file paths for a set of components.",
294
+ "tags": []
293
295
  },
294
296
  "signature": "(method) CompositionsMain.getPreviewFiles(components: Component[]): ComponentMap<AbstractVinyl[]>",
295
297
  "name": "getPreviewFiles",
@@ -377,7 +379,8 @@
377
379
  "character": 3
378
380
  },
379
381
  "raw": "/**\n * checks if a file matches the composition file pattern.\n */",
380
- "comment": "checks if a file matches the composition file pattern."
382
+ "comment": "checks if a file matches the composition file pattern.",
383
+ "tags": []
381
384
  },
382
385
  "signature": "(method) CompositionsMain.isCompositionFile(filePath: string): boolean",
383
386
  "name": "isCompositionFile",
@@ -429,7 +432,8 @@
429
432
  "character": 3
430
433
  },
431
434
  "raw": "/**\n * get component compositions.\n */",
432
- "comment": "get component compositions."
435
+ "comment": "get component compositions.",
436
+ "tags": []
433
437
  },
434
438
  "signature": "(method) CompositionsMain.getCompositions(component: IComponent): Composition[]",
435
439
  "name": "getCompositions",
@@ -493,7 +497,8 @@
493
497
  "character": 3
494
498
  },
495
499
  "raw": "/**\n * read composition from the component source code.\n */",
496
- "comment": "read composition from the component source code."
500
+ "comment": "read composition from the component source code.",
501
+ "tags": []
497
502
  },
498
503
  "signature": "(method) CompositionsMain.readCompositions(component: Component): Composition[]",
499
504
  "name": "readCompositions",
@@ -1055,7 +1060,8 @@
1055
1060
  "character": 3
1056
1061
  },
1057
1062
  "raw": "/**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */",
1058
- "comment": "register a new tester empty state. this allows to register a different empty state from each environment for example."
1063
+ "comment": "register a new tester empty state. this allows to register a different empty state from each environment for example.",
1064
+ "tags": []
1059
1065
  },
1060
1066
  "signature": "(method) CompositionsUI.registerEmptyState(emptyStateComponent: ComponentType): this",
1061
1067
  "name": "registerEmptyState",
@@ -1790,7 +1796,7 @@
1790
1796
  "__schema": "TypeSchema",
1791
1797
  "location": {
1792
1798
  "filePath": "compositions.tsx",
1793
- "line": 158,
1799
+ "line": 161,
1794
1800
  "character": 1
1795
1801
  },
1796
1802
  "signature": "type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition | undefined;\n queryParams?: string | string[] | undefined;\n emptyState?: EmptyStateSlot | undefined;\n} & {\n composition?: Composition | undefined;\n} & ComponentPreviewProps",
@@ -1799,7 +1805,7 @@
1799
1805
  "__schema": "TypeIntersectionSchema",
1800
1806
  "location": {
1801
1807
  "filePath": "compositions.tsx",
1802
- "line": 158,
1808
+ "line": 161,
1803
1809
  "character": 39
1804
1810
  },
1805
1811
  "types": [
@@ -1807,7 +1813,7 @@
1807
1813
  "__schema": "TypeLiteralSchema",
1808
1814
  "location": {
1809
1815
  "filePath": "compositions.tsx",
1810
- "line": 158,
1816
+ "line": 161,
1811
1817
  "character": 39
1812
1818
  },
1813
1819
  "members": [
@@ -1815,7 +1821,7 @@
1815
1821
  "__schema": "VariableLikeSchema",
1816
1822
  "location": {
1817
1823
  "filePath": "compositions.tsx",
1818
- "line": 159,
1824
+ "line": 162,
1819
1825
  "character": 3
1820
1826
  },
1821
1827
  "signature": "(property) component: ComponentModel",
@@ -1824,7 +1830,7 @@
1824
1830
  "__schema": "TypeRefSchema",
1825
1831
  "location": {
1826
1832
  "filePath": "compositions.tsx",
1827
- "line": 159,
1833
+ "line": 162,
1828
1834
  "character": 3
1829
1835
  },
1830
1836
  "name": "ComponentModel",
@@ -1839,7 +1845,7 @@
1839
1845
  "__schema": "VariableLikeSchema",
1840
1846
  "location": {
1841
1847
  "filePath": "compositions.tsx",
1842
- "line": 160,
1848
+ "line": 163,
1843
1849
  "character": 3
1844
1850
  },
1845
1851
  "signature": "(property) selected?: Composition | undefined",
@@ -1848,7 +1854,7 @@
1848
1854
  "__schema": "TypeRefSchema",
1849
1855
  "location": {
1850
1856
  "filePath": "compositions.tsx",
1851
- "line": 160,
1857
+ "line": 163,
1852
1858
  "character": 14
1853
1859
  },
1854
1860
  "name": "Composition"
@@ -1859,7 +1865,7 @@
1859
1865
  "__schema": "VariableLikeSchema",
1860
1866
  "location": {
1861
1867
  "filePath": "compositions.tsx",
1862
- "line": 161,
1868
+ "line": 164,
1863
1869
  "character": 3
1864
1870
  },
1865
1871
  "signature": "(property) queryParams?: string | string[] | undefined",
@@ -1868,7 +1874,7 @@
1868
1874
  "__schema": "TypeUnionSchema",
1869
1875
  "location": {
1870
1876
  "filePath": "compositions.tsx",
1871
- "line": 161,
1877
+ "line": 164,
1872
1878
  "character": 17
1873
1879
  },
1874
1880
  "types": [
@@ -1876,7 +1882,7 @@
1876
1882
  "__schema": "KeywordTypeSchema",
1877
1883
  "location": {
1878
1884
  "filePath": "compositions.tsx",
1879
- "line": 161,
1885
+ "line": 164,
1880
1886
  "character": 17
1881
1887
  },
1882
1888
  "name": "string"
@@ -1885,14 +1891,14 @@
1885
1891
  "__schema": "TypeArraySchema",
1886
1892
  "location": {
1887
1893
  "filePath": "compositions.tsx",
1888
- "line": 161,
1894
+ "line": 164,
1889
1895
  "character": 26
1890
1896
  },
1891
1897
  "type": {
1892
1898
  "__schema": "KeywordTypeSchema",
1893
1899
  "location": {
1894
1900
  "filePath": "compositions.tsx",
1895
- "line": 161,
1901
+ "line": 164,
1896
1902
  "character": 26
1897
1903
  },
1898
1904
  "name": "string"
@@ -1906,7 +1912,7 @@
1906
1912
  "__schema": "VariableLikeSchema",
1907
1913
  "location": {
1908
1914
  "filePath": "compositions.tsx",
1909
- "line": 162,
1915
+ "line": 165,
1910
1916
  "character": 3
1911
1917
  },
1912
1918
  "signature": "(property) emptyState?: EmptyStateSlot | undefined",
@@ -1915,7 +1921,7 @@
1915
1921
  "__schema": "TypeRefSchema",
1916
1922
  "location": {
1917
1923
  "filePath": "compositions.tsx",
1918
- "line": 162,
1924
+ "line": 165,
1919
1925
  "character": 16
1920
1926
  },
1921
1927
  "name": "EmptyStateSlot"
@@ -1928,7 +1934,7 @@
1928
1934
  "__schema": "TypeRefSchema",
1929
1935
  "location": {
1930
1936
  "filePath": "compositions.tsx",
1931
- "line": 163,
1937
+ "line": 166,
1932
1938
  "character": 5
1933
1939
  },
1934
1940
  "name": "ComponentCompositionProps",
@@ -1950,7 +1956,7 @@
1950
1956
  "__schema": "ReactSchema",
1951
1957
  "location": {
1952
1958
  "filePath": "compositions.tsx",
1953
- "line": 165,
1959
+ "line": 168,
1954
1960
  "character": 1
1955
1961
  },
1956
1962
  "signature": "function CompositionContent({ component, selected, queryParams, emptyState, ...componentCompositionProps }: CompositionContentProps): React.JSX.Element",
@@ -1959,7 +1965,7 @@
1959
1965
  "__schema": "ParameterSchema",
1960
1966
  "location": {
1961
1967
  "filePath": "compositions.tsx",
1962
- "line": 165,
1968
+ "line": 168,
1963
1969
  "character": 36
1964
1970
  },
1965
1971
  "name": "{ component, selected, queryParams, emptyState, ...componentCompositionProps }",
@@ -1967,7 +1973,7 @@
1967
1973
  "__schema": "TypeRefSchema",
1968
1974
  "location": {
1969
1975
  "filePath": "compositions.tsx",
1970
- "line": 171,
1976
+ "line": 174,
1971
1977
  "character": 4
1972
1978
  },
1973
1979
  "name": "CompositionContentProps"
@@ -1978,7 +1984,7 @@
1978
1984
  "__schema": "InferenceTypeSchema",
1979
1985
  "location": {
1980
1986
  "filePath": "compositions.tsx",
1981
- "line": 166,
1987
+ "line": 169,
1982
1988
  "character": 3
1983
1989
  },
1984
1990
  "name": "component",
@@ -1989,7 +1995,7 @@
1989
1995
  "__schema": "InferenceTypeSchema",
1990
1996
  "location": {
1991
1997
  "filePath": "compositions.tsx",
1992
- "line": 167,
1998
+ "line": 170,
1993
1999
  "character": 3
1994
2000
  },
1995
2001
  "name": "selected",
@@ -2000,7 +2006,7 @@
2000
2006
  "__schema": "InferenceTypeSchema",
2001
2007
  "location": {
2002
2008
  "filePath": "compositions.tsx",
2003
- "line": 168,
2009
+ "line": 171,
2004
2010
  "character": 3
2005
2011
  },
2006
2012
  "name": "queryParams",
@@ -2011,7 +2017,7 @@
2011
2017
  "__schema": "InferenceTypeSchema",
2012
2018
  "location": {
2013
2019
  "filePath": "compositions.tsx",
2014
- "line": 169,
2020
+ "line": 172,
2015
2021
  "character": 3
2016
2022
  },
2017
2023
  "name": "emptyState",
@@ -2022,7 +2028,7 @@
2022
2028
  "__schema": "InferenceTypeSchema",
2023
2029
  "location": {
2024
2030
  "filePath": "compositions.tsx",
2025
- "line": 170,
2031
+ "line": 173,
2026
2032
  "character": 6
2027
2033
  },
2028
2034
  "name": "componentCompositionProps",
@@ -2036,7 +2042,7 @@
2036
2042
  "__schema": "TypeRefSchema",
2037
2043
  "location": {
2038
2044
  "filePath": "compositions.tsx",
2039
- "line": 165,
2045
+ "line": 168,
2040
2046
  "character": 1
2041
2047
  },
2042
2048
  "name": "React.JSX.Element",
@@ -2261,7 +2267,8 @@
2261
2267
  "character": 3
2262
2268
  },
2263
2269
  "raw": "/** gets relevant information for this preview to render */",
2264
- "comment": "gets relevant information for this preview to render"
2270
+ "comment": "gets relevant information for this preview to render",
2271
+ "tags": []
2265
2272
  },
2266
2273
  "signature": "(method) CompositionsPreview.selectPreviewModel(componentFullName: string, previewModule: PreviewModule): any",
2267
2274
  "name": "selectPreviewModel",
@@ -2818,7 +2825,8 @@
2818
2825
  "character": 1
2819
2826
  },
2820
2827
  "raw": "/**\n * the component documentation extension.\n */",
2821
- "comment": "the component documentation extension."
2828
+ "comment": "the component documentation extension.",
2829
+ "tags": []
2822
2830
  },
2823
2831
  "signature": "class CompositionsMain",
2824
2832
  "name": "CompositionsMain",
@@ -3036,7 +3044,8 @@
3036
3044
  "character": 3
3037
3045
  },
3038
3046
  "raw": "/**\n * returns an array of doc file paths for a set of components.\n */",
3039
- "comment": "returns an array of doc file paths for a set of components."
3047
+ "comment": "returns an array of doc file paths for a set of components.",
3048
+ "tags": []
3040
3049
  },
3041
3050
  "signature": "(method) CompositionsMain.getPreviewFiles(components: Component[]): ComponentMap<AbstractVinyl[]>",
3042
3051
  "name": "getPreviewFiles",
@@ -3124,7 +3133,8 @@
3124
3133
  "character": 3
3125
3134
  },
3126
3135
  "raw": "/**\n * checks if a file matches the composition file pattern.\n */",
3127
- "comment": "checks if a file matches the composition file pattern."
3136
+ "comment": "checks if a file matches the composition file pattern.",
3137
+ "tags": []
3128
3138
  },
3129
3139
  "signature": "(method) CompositionsMain.isCompositionFile(filePath: string): boolean",
3130
3140
  "name": "isCompositionFile",
@@ -3176,7 +3186,8 @@
3176
3186
  "character": 3
3177
3187
  },
3178
3188
  "raw": "/**\n * get component compositions.\n */",
3179
- "comment": "get component compositions."
3189
+ "comment": "get component compositions.",
3190
+ "tags": []
3180
3191
  },
3181
3192
  "signature": "(method) CompositionsMain.getCompositions(component: IComponent): Composition[]",
3182
3193
  "name": "getCompositions",
@@ -3240,7 +3251,8 @@
3240
3251
  "character": 3
3241
3252
  },
3242
3253
  "raw": "/**\n * read composition from the component source code.\n */",
3243
- "comment": "read composition from the component source code."
3254
+ "comment": "read composition from the component source code.",
3255
+ "tags": []
3244
3256
  },
3245
3257
  "signature": "(method) CompositionsMain.readCompositions(component: Component): Composition[]",
3246
3258
  "name": "readCompositions",
@@ -3895,7 +3907,8 @@
3895
3907
  "character": 3
3896
3908
  },
3897
3909
  "raw": "/**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */",
3898
- "comment": "register a new tester empty state. this allows to register a different empty state from each environment for example."
3910
+ "comment": "register a new tester empty state. this allows to register a different empty state from each environment for example.",
3911
+ "tags": []
3899
3912
  },
3900
3913
  "signature": "(method) CompositionsUI.registerEmptyState(emptyStateComponent: ComponentType): this",
3901
3914
  "name": "registerEmptyState",
@@ -4657,7 +4670,7 @@
4657
4670
  "__schema": "TypeSchema",
4658
4671
  "location": {
4659
4672
  "filePath": "compositions.tsx",
4660
- "line": 36,
4673
+ "line": 37,
4661
4674
  "character": 1
4662
4675
  },
4663
4676
  "signature": "type MenuBarWidget = {\n location: 'start' | 'end';\n content: ReactNode;\n}",
@@ -4666,7 +4679,7 @@
4666
4679
  "__schema": "TypeLiteralSchema",
4667
4680
  "location": {
4668
4681
  "filePath": "compositions.tsx",
4669
- "line": 36,
4682
+ "line": 37,
4670
4683
  "character": 29
4671
4684
  },
4672
4685
  "members": [
@@ -4674,7 +4687,7 @@
4674
4687
  "__schema": "VariableLikeSchema",
4675
4688
  "location": {
4676
4689
  "filePath": "compositions.tsx",
4677
- "line": 37,
4690
+ "line": 38,
4678
4691
  "character": 3
4679
4692
  },
4680
4693
  "signature": "(property) location: \"end\" | \"start\"",
@@ -4683,7 +4696,7 @@
4683
4696
  "__schema": "TypeUnionSchema",
4684
4697
  "location": {
4685
4698
  "filePath": "compositions.tsx",
4686
- "line": 37,
4699
+ "line": 38,
4687
4700
  "character": 13
4688
4701
  },
4689
4702
  "types": [
@@ -4691,7 +4704,7 @@
4691
4704
  "__schema": "LiteralTypeSchema",
4692
4705
  "location": {
4693
4706
  "filePath": "compositions.tsx",
4694
- "line": 37,
4707
+ "line": 38,
4695
4708
  "character": 13
4696
4709
  },
4697
4710
  "name": "'start'"
@@ -4700,7 +4713,7 @@
4700
4713
  "__schema": "LiteralTypeSchema",
4701
4714
  "location": {
4702
4715
  "filePath": "compositions.tsx",
4703
- "line": 37,
4716
+ "line": 38,
4704
4717
  "character": 23
4705
4718
  },
4706
4719
  "name": "'end'"
@@ -4713,7 +4726,7 @@
4713
4726
  "__schema": "VariableLikeSchema",
4714
4727
  "location": {
4715
4728
  "filePath": "compositions.tsx",
4716
- "line": 38,
4729
+ "line": 39,
4717
4730
  "character": 3
4718
4731
  },
4719
4732
  "signature": "(property) content: React.ReactNode",
@@ -4722,7 +4735,7 @@
4722
4735
  "__schema": "TypeRefSchema",
4723
4736
  "location": {
4724
4737
  "filePath": "compositions.tsx",
4725
- "line": 38,
4738
+ "line": 39,
4726
4739
  "character": 12
4727
4740
  },
4728
4741
  "name": "ReactNode",
@@ -4737,7 +4750,7 @@
4737
4750
  "__schema": "TypeSchema",
4738
4751
  "location": {
4739
4752
  "filePath": "compositions.tsx",
4740
- "line": 40,
4753
+ "line": 41,
4741
4754
  "character": 1
4742
4755
  },
4743
4756
  "signature": "type CompositionsProp = {\n menuBarWidgets?: CompositionsMenuSlot | undefined;\n emptyState?: EmptyStateSlot | undefined;\n}",
@@ -4746,7 +4759,7 @@
4746
4759
  "__schema": "TypeLiteralSchema",
4747
4760
  "location": {
4748
4761
  "filePath": "compositions.tsx",
4749
- "line": 40,
4762
+ "line": 41,
4750
4763
  "character": 32
4751
4764
  },
4752
4765
  "members": [
@@ -4754,7 +4767,7 @@
4754
4767
  "__schema": "VariableLikeSchema",
4755
4768
  "location": {
4756
4769
  "filePath": "compositions.tsx",
4757
- "line": 40,
4770
+ "line": 41,
4758
4771
  "character": 34
4759
4772
  },
4760
4773
  "signature": "(property) menuBarWidgets?: CompositionsMenuSlot | undefined",
@@ -4763,7 +4776,7 @@
4763
4776
  "__schema": "TypeRefSchema",
4764
4777
  "location": {
4765
4778
  "filePath": "compositions.tsx",
4766
- "line": 40,
4779
+ "line": 41,
4767
4780
  "character": 51
4768
4781
  },
4769
4782
  "name": "CompositionsMenuSlot"
@@ -4774,7 +4787,7 @@
4774
4787
  "__schema": "VariableLikeSchema",
4775
4788
  "location": {
4776
4789
  "filePath": "compositions.tsx",
4777
- "line": 40,
4790
+ "line": 41,
4778
4791
  "character": 73
4779
4792
  },
4780
4793
  "signature": "(property) emptyState?: EmptyStateSlot | undefined",
@@ -4783,7 +4796,7 @@
4783
4796
  "__schema": "TypeRefSchema",
4784
4797
  "location": {
4785
4798
  "filePath": "compositions.tsx",
4786
- "line": 40,
4799
+ "line": 41,
4787
4800
  "character": 86
4788
4801
  },
4789
4802
  "name": "EmptyStateSlot"
@@ -4797,7 +4810,7 @@
4797
4810
  "__schema": "ReactSchema",
4798
4811
  "location": {
4799
4812
  "filePath": "compositions.tsx",
4800
- "line": 42,
4813
+ "line": 43,
4801
4814
  "character": 1
4802
4815
  },
4803
4816
  "signature": "function Compositions({ menuBarWidgets, emptyState }: CompositionsProp): React.JSX.Element",
@@ -4806,7 +4819,7 @@
4806
4819
  "__schema": "ParameterSchema",
4807
4820
  "location": {
4808
4821
  "filePath": "compositions.tsx",
4809
- "line": 42,
4822
+ "line": 43,
4810
4823
  "character": 30
4811
4824
  },
4812
4825
  "name": "{ menuBarWidgets, emptyState }",
@@ -4814,7 +4827,7 @@
4814
4827
  "__schema": "TypeRefSchema",
4815
4828
  "location": {
4816
4829
  "filePath": "compositions.tsx",
4817
- "line": 42,
4830
+ "line": 43,
4818
4831
  "character": 62
4819
4832
  },
4820
4833
  "name": "CompositionsProp",
@@ -4826,7 +4839,7 @@
4826
4839
  "__schema": "InferenceTypeSchema",
4827
4840
  "location": {
4828
4841
  "filePath": "compositions.tsx",
4829
- "line": 42,
4842
+ "line": 43,
4830
4843
  "character": 32
4831
4844
  },
4832
4845
  "name": "menuBarWidgets",
@@ -4837,7 +4850,7 @@
4837
4850
  "__schema": "InferenceTypeSchema",
4838
4851
  "location": {
4839
4852
  "filePath": "compositions.tsx",
4840
- "line": 42,
4853
+ "line": 43,
4841
4854
  "character": 48
4842
4855
  },
4843
4856
  "name": "emptyState",
@@ -4851,7 +4864,7 @@
4851
4864
  "__schema": "TypeRefSchema",
4852
4865
  "location": {
4853
4866
  "filePath": "compositions.tsx",
4854
- "line": 42,
4867
+ "line": 43,
4855
4868
  "character": 1
4856
4869
  },
4857
4870
  "name": "React.JSX.Element",
@@ -4865,7 +4878,7 @@
4865
4878
  "__schema": "TypeSchema",
4866
4879
  "location": {
4867
4880
  "filePath": "compositions.tsx",
4868
- "line": 158,
4881
+ "line": 161,
4869
4882
  "character": 1
4870
4883
  },
4871
4884
  "signature": "type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition | undefined;\n queryParams?: string | string[] | undefined;\n emptyState?: EmptyStateSlot | undefined;\n} & {\n composition?: Composition | undefined;\n} & ComponentPreviewProps",
@@ -4874,7 +4887,7 @@
4874
4887
  "__schema": "TypeIntersectionSchema",
4875
4888
  "location": {
4876
4889
  "filePath": "compositions.tsx",
4877
- "line": 158,
4890
+ "line": 161,
4878
4891
  "character": 39
4879
4892
  },
4880
4893
  "types": [
@@ -4882,7 +4895,7 @@
4882
4895
  "__schema": "TypeLiteralSchema",
4883
4896
  "location": {
4884
4897
  "filePath": "compositions.tsx",
4885
- "line": 158,
4898
+ "line": 161,
4886
4899
  "character": 39
4887
4900
  },
4888
4901
  "members": [
@@ -4890,7 +4903,7 @@
4890
4903
  "__schema": "VariableLikeSchema",
4891
4904
  "location": {
4892
4905
  "filePath": "compositions.tsx",
4893
- "line": 159,
4906
+ "line": 162,
4894
4907
  "character": 3
4895
4908
  },
4896
4909
  "signature": "(property) component: ComponentModel",
@@ -4899,7 +4912,7 @@
4899
4912
  "__schema": "TypeRefSchema",
4900
4913
  "location": {
4901
4914
  "filePath": "compositions.tsx",
4902
- "line": 159,
4915
+ "line": 162,
4903
4916
  "character": 3
4904
4917
  },
4905
4918
  "name": "ComponentModel",
@@ -4914,7 +4927,7 @@
4914
4927
  "__schema": "VariableLikeSchema",
4915
4928
  "location": {
4916
4929
  "filePath": "compositions.tsx",
4917
- "line": 160,
4930
+ "line": 163,
4918
4931
  "character": 3
4919
4932
  },
4920
4933
  "signature": "(property) selected?: Composition | undefined",
@@ -4923,7 +4936,7 @@
4923
4936
  "__schema": "TypeRefSchema",
4924
4937
  "location": {
4925
4938
  "filePath": "compositions.tsx",
4926
- "line": 160,
4939
+ "line": 163,
4927
4940
  "character": 14
4928
4941
  },
4929
4942
  "name": "Composition"
@@ -4934,7 +4947,7 @@
4934
4947
  "__schema": "VariableLikeSchema",
4935
4948
  "location": {
4936
4949
  "filePath": "compositions.tsx",
4937
- "line": 161,
4950
+ "line": 164,
4938
4951
  "character": 3
4939
4952
  },
4940
4953
  "signature": "(property) queryParams?: string | string[] | undefined",
@@ -4943,7 +4956,7 @@
4943
4956
  "__schema": "TypeUnionSchema",
4944
4957
  "location": {
4945
4958
  "filePath": "compositions.tsx",
4946
- "line": 161,
4959
+ "line": 164,
4947
4960
  "character": 17
4948
4961
  },
4949
4962
  "types": [
@@ -4951,7 +4964,7 @@
4951
4964
  "__schema": "KeywordTypeSchema",
4952
4965
  "location": {
4953
4966
  "filePath": "compositions.tsx",
4954
- "line": 161,
4967
+ "line": 164,
4955
4968
  "character": 17
4956
4969
  },
4957
4970
  "name": "string"
@@ -4960,14 +4973,14 @@
4960
4973
  "__schema": "TypeArraySchema",
4961
4974
  "location": {
4962
4975
  "filePath": "compositions.tsx",
4963
- "line": 161,
4976
+ "line": 164,
4964
4977
  "character": 26
4965
4978
  },
4966
4979
  "type": {
4967
4980
  "__schema": "KeywordTypeSchema",
4968
4981
  "location": {
4969
4982
  "filePath": "compositions.tsx",
4970
- "line": 161,
4983
+ "line": 164,
4971
4984
  "character": 26
4972
4985
  },
4973
4986
  "name": "string"
@@ -4981,7 +4994,7 @@
4981
4994
  "__schema": "VariableLikeSchema",
4982
4995
  "location": {
4983
4996
  "filePath": "compositions.tsx",
4984
- "line": 162,
4997
+ "line": 165,
4985
4998
  "character": 3
4986
4999
  },
4987
5000
  "signature": "(property) emptyState?: EmptyStateSlot | undefined",
@@ -4990,7 +5003,7 @@
4990
5003
  "__schema": "TypeRefSchema",
4991
5004
  "location": {
4992
5005
  "filePath": "compositions.tsx",
4993
- "line": 162,
5006
+ "line": 165,
4994
5007
  "character": 16
4995
5008
  },
4996
5009
  "name": "EmptyStateSlot"
@@ -5003,7 +5016,7 @@
5003
5016
  "__schema": "TypeRefSchema",
5004
5017
  "location": {
5005
5018
  "filePath": "compositions.tsx",
5006
- "line": 163,
5019
+ "line": 166,
5007
5020
  "character": 5
5008
5021
  },
5009
5022
  "name": "ComponentCompositionProps",
@@ -5016,7 +5029,7 @@
5016
5029
  "__schema": "ReactSchema",
5017
5030
  "location": {
5018
5031
  "filePath": "compositions.tsx",
5019
- "line": 165,
5032
+ "line": 168,
5020
5033
  "character": 1
5021
5034
  },
5022
5035
  "signature": "function CompositionContent({ component, selected, queryParams, emptyState, ...componentCompositionProps }: CompositionContentProps): React.JSX.Element",
@@ -5025,7 +5038,7 @@
5025
5038
  "__schema": "ParameterSchema",
5026
5039
  "location": {
5027
5040
  "filePath": "compositions.tsx",
5028
- "line": 165,
5041
+ "line": 168,
5029
5042
  "character": 36
5030
5043
  },
5031
5044
  "name": "{ component, selected, queryParams, emptyState, ...componentCompositionProps }",
@@ -5033,7 +5046,7 @@
5033
5046
  "__schema": "TypeRefSchema",
5034
5047
  "location": {
5035
5048
  "filePath": "compositions.tsx",
5036
- "line": 171,
5049
+ "line": 174,
5037
5050
  "character": 4
5038
5051
  },
5039
5052
  "name": "CompositionContentProps"
@@ -5044,7 +5057,7 @@
5044
5057
  "__schema": "InferenceTypeSchema",
5045
5058
  "location": {
5046
5059
  "filePath": "compositions.tsx",
5047
- "line": 166,
5060
+ "line": 169,
5048
5061
  "character": 3
5049
5062
  },
5050
5063
  "name": "component",
@@ -5055,7 +5068,7 @@
5055
5068
  "__schema": "InferenceTypeSchema",
5056
5069
  "location": {
5057
5070
  "filePath": "compositions.tsx",
5058
- "line": 167,
5071
+ "line": 170,
5059
5072
  "character": 3
5060
5073
  },
5061
5074
  "name": "selected",
@@ -5066,7 +5079,7 @@
5066
5079
  "__schema": "InferenceTypeSchema",
5067
5080
  "location": {
5068
5081
  "filePath": "compositions.tsx",
5069
- "line": 168,
5082
+ "line": 171,
5070
5083
  "character": 3
5071
5084
  },
5072
5085
  "name": "queryParams",
@@ -5077,7 +5090,7 @@
5077
5090
  "__schema": "InferenceTypeSchema",
5078
5091
  "location": {
5079
5092
  "filePath": "compositions.tsx",
5080
- "line": 169,
5093
+ "line": 172,
5081
5094
  "character": 3
5082
5095
  },
5083
5096
  "name": "emptyState",
@@ -5088,7 +5101,7 @@
5088
5101
  "__schema": "InferenceTypeSchema",
5089
5102
  "location": {
5090
5103
  "filePath": "compositions.tsx",
5091
- "line": 170,
5104
+ "line": 173,
5092
5105
  "character": 6
5093
5106
  },
5094
5107
  "name": "componentCompositionProps",
@@ -5102,7 +5115,7 @@
5102
5115
  "__schema": "TypeRefSchema",
5103
5116
  "location": {
5104
5117
  "filePath": "compositions.tsx",
5105
- "line": 165,
5118
+ "line": 168,
5106
5119
  "character": 1
5107
5120
  },
5108
5121
  "name": "React.JSX.Element",
@@ -5118,7 +5131,7 @@
5118
5131
  "__schema": "ModuleSchema",
5119
5132
  "location": {
5120
5133
  "filePath": "compositions.tsx",
5121
- "line": 34,
5134
+ "line": 35,
5122
5135
  "character": 1
5123
5136
  },
5124
5137
  "exports": [
@@ -5126,7 +5139,7 @@
5126
5139
  "__schema": "VariableLikeSchema",
5127
5140
  "location": {
5128
5141
  "filePath": "compositions.tsx",
5129
- "line": 34,
5142
+ "line": 35,
5130
5143
  "character": 7
5131
5144
  },
5132
5145
  "signature": "const Link: any",
@@ -5135,7 +5148,7 @@
5135
5148
  "__schema": "InferenceTypeSchema",
5136
5149
  "location": {
5137
5150
  "filePath": "compositions.tsx",
5138
- "line": 34,
5151
+ "line": 35,
5139
5152
  "character": 7
5140
5153
  },
5141
5154
  "type": "any"
@@ -5362,7 +5375,8 @@
5362
5375
  "character": 3
5363
5376
  },
5364
5377
  "raw": "/** gets relevant information for this preview to render */",
5365
- "comment": "gets relevant information for this preview to render"
5378
+ "comment": "gets relevant information for this preview to render",
5379
+ "tags": []
5366
5380
  },
5367
5381
  "signature": "(method) CompositionsPreview.selectPreviewModel(componentFullName: string, previewModule: PreviewModule): any",
5368
5382
  "name": "selectPreviewModel",
@@ -5676,7 +5690,8 @@
5676
5690
  "character": 3
5677
5691
  },
5678
5692
  "raw": "/**\n * composition to use for component rendering.\n */",
5679
- "comment": "composition to use for component rendering."
5693
+ "comment": "composition to use for component rendering.",
5694
+ "tags": []
5680
5695
  },
5681
5696
  "signature": "(property) composition?: Composition | undefined",
5682
5697
  "name": "composition",
@@ -5808,7 +5823,7 @@
5808
5823
  "componentId": {
5809
5824
  "scope": "teambit.compositions",
5810
5825
  "name": "compositions",
5811
- "version": "1.0.310"
5826
+ "version": "1.0.312"
5812
5827
  },
5813
5828
  "taggedModuleExports": []
5814
5829
  }
package/compositions.tsx CHANGED
@@ -22,6 +22,7 @@ import { AlertCard } from '@teambit/design.ui.alert-card';
22
22
  import { Link as BaseLink, useNavigate, useLocation } from '@teambit/base-react.navigation.link';
23
23
  import { OptionButton } from '@teambit/design.ui.input.option-button';
24
24
  import { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';
25
+ import { Tooltip } from '@teambit/design.ui.tooltip';
25
26
  import { EmptyStateSlot } from './compositions.ui.runtime';
26
27
  import { Composition } from './composition';
27
28
  import styles from './compositions.module.scss';
@@ -86,9 +87,11 @@ export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
86
87
  <SplitPane layout={sidebarOpenness} size="85%" className={styles.compositionsPage}>
87
88
  <Pane className={styles.left}>
88
89
  <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>
89
- <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>
90
- <OptionButton icon="open-tab" />
91
- </Link>
90
+ <Tooltip content={'Open in new tab'} placement="right">
91
+ <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>
92
+ <OptionButton icon="open-tab" />
93
+ </Link>
94
+ </Tooltip>
92
95
  </CompositionsMenuBar>
93
96
  <CompositionContent
94
97
  className={styles.compositionPanel}
@@ -173,6 +173,13 @@ function _designUiSurfaces() {
173
173
  };
174
174
  return data;
175
175
  }
176
+ function _designUi4() {
177
+ const data = require("@teambit/design.ui.tooltip");
178
+ _designUi4 = function () {
179
+ return data;
180
+ };
181
+ return data;
182
+ }
176
183
  function _compositionsModule() {
177
184
  const data = _interopRequireDefault(require("./compositions.module.scss"));
178
185
  _compositionsModule = function () {
@@ -247,13 +254,16 @@ function Compositions({
247
254
  }, /*#__PURE__*/_react().default.createElement(_compositionsUi().CompositionsMenuBar, {
248
255
  menuBarWidgets: menuBarWidgets,
249
256
  className: _compositionsModule().default.menuBar
257
+ }, /*#__PURE__*/_react().default.createElement(_designUi4().Tooltip, {
258
+ content: 'Open in new tab',
259
+ placement: "right"
250
260
  }, /*#__PURE__*/_react().default.createElement(Link, {
251
261
  external: true,
252
262
  href: currentCompositionFullUrl,
253
263
  className: _compositionsModule().default.openInNewTab
254
264
  }, /*#__PURE__*/_react().default.createElement(_designUiInput().OptionButton, {
255
265
  icon: "open-tab"
256
- }))), /*#__PURE__*/_react().default.createElement(CompositionContent, {
266
+ })))), /*#__PURE__*/_react().default.createElement(CompositionContent, {
257
267
  className: _compositionsModule().default.compositionPanel,
258
268
  emptyState: emptyState,
259
269
  component: component,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_reactRouterDom","_lodash","_interopRequireDefault","_queryString","_documenterTheme","_baseUiSurfacesSplitPane","_baseUiSurfacesSplitPane2","_component","_documenterUi","_panels","_docsUiQueries","_uiFoundationUiButtons","_designUi","_previewUi","_uiFoundationUiHooks","_compositionsUi","_compositionsUiHooks","_mdxUi","_designUi2","_documenterUi2","_designUi3","_baseReactNavigation","_designUiInput","_designUiSurfaces","_compositionsModule","_ui","_compositionsPanel","_excluded","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","o","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","Link","BaseLink","Compositions","menuBarWidgets","emptyState","component","useContext","ComponentContext","searchParams","useSearchParams","params","useParams","versionFromQueryParams","navigate","useNavigate","location","useLocation","currentCompositionName","currentComposition","compositions","find","composition","identifier","toLowerCase","head","selectedRef","useRef","current","properties","useDocs","id","isMobile","useIsMobile","showSidebar","isSidebarOpen","setSidebarOpenness","useState","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","includesEnvTemplates","includesEnvTemplate","useNameParam","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","fullscreen","queryParams","useMemo","queryString","stringify","useEffect","createElement","CompositionContextProvider","setQueryParams","SplitPane","layout","size","className","styles","compositionsPage","Pane","CompositionsMenuBar","menuBar","external","href","openInNewTab","OptionButton","icon","CompositionContent","compositionPanel","selected","HoverSplitter","splitter","Collapser","placement","isOpen","onMouseDown","stopPropagation","onClick","x","tooltipContent","collapser","right","ThemeContext","TabContainer","tabsContainer","TabList","tabs","Tab","TabPanel","tabContent","CompositionsPanel","onSelectComposition","selectedCompositionFromUrl","pathSegments","pathname","split","filter","push","urlParams","URLSearchParams","newPath","join","toString","url","active","PropTable","rows","showListView","_ref","componentCompositionProps","env","environment","EmptyStateTemplate","host","noCompositionsPage","H1","title","Separator","isPresentational","separator","AlertCard","level","MDXLayout","buildStatus","StatusMessageCard","buildStatusMessage","status","EmptyBox","linkText","link","ComponentComposition","compositionsIframe","viewport","forceHeight","fullContentHeight","pubsub"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport head from 'lodash.head';\nimport queryString from 'query-string';\nimport { ThemeContext } from '@teambit/documenter.theme.theme-context';\nimport { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';\nimport { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';\nimport { ComponentContext, ComponentModel } from '@teambit/component';\nimport { PropTable } from '@teambit/documenter.ui.property-table';\nimport { Tab, TabContainer, TabList, TabPanel } from '@teambit/panels';\nimport { useDocs } from '@teambit/docs.ui.queries.get-docs';\nimport { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { toPreviewUrl } from '@teambit/preview.ui.component-preview';\nimport { useIsMobile } from '@teambit/ui-foundation.ui.hooks.use-is-mobile';\nimport { CompositionsMenuBar } from '@teambit/compositions.ui.compositions-menu-bar';\nimport { CompositionContextProvider } from '@teambit/compositions.ui.hooks.use-composition';\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout';\nimport { Separator } from '@teambit/design.ui.separator';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { AlertCard } from '@teambit/design.ui.alert-card';\nimport { Link as BaseLink, useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { EmptyStateSlot } from './compositions.ui.runtime';\nimport { Composition } from './composition';\nimport styles from './compositions.module.scss';\nimport { ComponentComposition } from './ui';\nimport { CompositionsPanel } from './ui/compositions-panel/compositions-panel';\nimport type { CompositionsMenuSlot } from './compositions.ui.runtime';\nimport { ComponentCompositionProps } from './ui/composition-preview';\n\n// @todo - this will be fixed as part of the @teambit/base-react.navigation.link upgrade to latest\nconst Link = BaseLink as any;\n\nexport type MenuBarWidget = {\n location: 'start' | 'end';\n content: ReactNode;\n};\nexport type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptyState?: EmptyStateSlot };\n\nexport function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {\n const component = useContext(ComponentContext);\n const [searchParams] = useSearchParams();\n const params = useParams();\n const versionFromQueryParams = searchParams.get('version');\n const navigate = useNavigate();\n const location = useLocation();\n const currentCompositionName = params['*'];\n const currentComposition =\n component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||\n head(component.compositions);\n\n const selectedRef = useRef(currentComposition);\n selectedRef.current = currentComposition;\n\n const properties = useDocs(component.id);\n\n const isMobile = useIsMobile();\n const showSidebar = !isMobile && component.compositions.length > 0;\n const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);\n\n const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.left;\n\n const compositionUrl = toPreviewUrl(component, 'compositions');\n const isScaling = component?.preview?.isScaling;\n const includesEnvTemplates = component?.preview?.includesEnvTemplate;\n const useNameParam = component?.preview?.useNameParam;\n const compositionIdentifierParam =\n useNameParam || (isScaling && includesEnvTemplates === false)\n ? `name=${currentComposition?.identifier}`\n : currentComposition?.identifier;\n\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({\n fullscreen: true,\n });\n\n const queryParams = useMemo(() => queryString.stringify(compositionParams), [compositionParams]);\n\n // collapse sidebar when empty, reopen when not\n useEffect(() => setSidebarOpenness(showSidebar), [showSidebar]);\n return (\n <CompositionContextProvider queryParams={compositionParams} setQueryParams={setCompositionParams}>\n <SplitPane layout={sidebarOpenness} size=\"85%\" className={styles.compositionsPage}>\n <Pane className={styles.left}>\n <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>\n <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>\n <OptionButton icon=\"open-tab\" />\n </Link>\n </CompositionsMenuBar>\n <CompositionContent\n className={styles.compositionPanel}\n emptyState={emptyState}\n component={component}\n selected={currentComposition}\n queryParams={queryParams}\n />\n </Pane>\n <HoverSplitter className={styles.splitter}>\n <Collapser\n placement=\"left\"\n isOpen={isSidebarOpen}\n onMouseDown={(e) => e.stopPropagation()} // avoid split-pane drag\n onClick={() => setSidebarOpenness((x) => !x)}\n tooltipContent={`${isSidebarOpen ? 'Hide' : 'Show'} side compositions`}\n className={styles.collapser}\n />\n </HoverSplitter>\n <Pane className={styles.right}>\n <ThemeContext>\n <TabContainer className={styles.tabsContainer}>\n <TabList className={styles.tabs}>\n <Tab>compositions</Tab>\n <Tab>properties</Tab>\n </TabList>\n <TabPanel className={styles.tabContent}>\n <CompositionsPanel\n isScaling={isScaling}\n useNameParam={useNameParam}\n includesEnvTemplate={component.preview?.includesEnvTemplate}\n onSelectComposition={(composition) => {\n if (!currentComposition || !location) return;\n const selectedCompositionFromUrl = params['*'];\n\n const pathSegments = location.pathname.split('/').filter((x) => x);\n\n if (!selectedCompositionFromUrl) {\n pathSegments.push(composition.identifier.toLowerCase());\n } else {\n pathSegments[pathSegments.length - 1] = composition.identifier.toLowerCase();\n }\n\n const urlParams = new URLSearchParams();\n if (versionFromQueryParams) {\n urlParams.set('version', versionFromQueryParams);\n }\n const newPath = pathSegments.join('/');\n navigate(`/${newPath}?${urlParams.toString()}`);\n }}\n url={compositionUrl}\n compositions={component.compositions}\n active={currentComposition}\n />\n </TabPanel>\n <TabPanel className={styles.tabContent}>\n {properties && properties.length > 0 ? <PropTable rows={properties} showListView /> : <div />}\n </TabPanel>\n </TabContainer>\n </ThemeContext>\n </Pane>\n </SplitPane>\n </CompositionContextProvider>\n );\n}\n\nexport type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition;\n queryParams?: string | string[];\n emptyState?: EmptyStateSlot;\n} & ComponentCompositionProps;\n\nexport function CompositionContent({\n component,\n selected,\n queryParams,\n emptyState,\n ...componentCompositionProps\n}: CompositionContentProps) {\n const env = component.environment?.id;\n const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;\n\n if (component.compositions.length === 0 && component.host === 'teambit.workspace/workspace' && EmptyStateTemplate) {\n return (\n <div className={styles.noCompositionsPage}>\n <div>\n <H1 className={styles.title}>Compositions</H1>\n <Separator isPresentational className={styles.separator} />\n <AlertCard\n level=\"info\"\n title=\"There are no\n compositions for this Component. Learn how to add compositions:\"\n >\n <MDXLayout>\n <EmptyStateTemplate />\n </MDXLayout>\n </AlertCard>\n </div>\n </div>\n );\n }\n\n if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard className={styles.buildStatusMessage} status=\"PROCESSING\" title=\"component preview pending\">\n this might take some time\n </StatusMessageCard>\n );\n if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard\n className={styles.buildStatusMessage}\n status=\"FAILURE\"\n title=\"failed to get component preview \"\n ></StatusMessageCard>\n );\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n if (component.compositions.length === 0) {\n return (\n <EmptyBox\n title=\"There are no compositions for this component.\"\n linkText=\"Learn how to create compositions\"\n link={`https://bit.dev/reference/dev-services-overview/compositions/compositions-overview`}\n />\n );\n }\n\n return (\n <ComponentComposition\n className={styles.compositionsIframe}\n // TODO: Oded to add control for viewport.\n viewport={null}\n component={component}\n forceHeight=\"100%\"\n composition={selected}\n fullContentHeight\n pubsub={true}\n queryParams={queryParams}\n {...componentCompositionProps}\n />\n );\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SA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AAS;IACtBiE,iBAAiB;IACjBC,MAAM,EAAE,IAAK;IACb1F,WAAW,EAAEA;EAAY,GACrBgE,yBAAyB,CAC9B,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireWildcard","require","_reactRouterDom","_lodash","_interopRequireDefault","_queryString","_documenterTheme","_baseUiSurfacesSplitPane","_baseUiSurfacesSplitPane2","_component","_documenterUi","_panels","_docsUiQueries","_uiFoundationUiButtons","_designUi","_previewUi","_uiFoundationUiHooks","_compositionsUi","_compositionsUiHooks","_mdxUi","_designUi2","_documenterUi2","_designUi3","_baseReactNavigation","_designUiInput","_designUiSurfaces","_designUi4","_compositionsModule","_ui","_compositionsPanel","_excluded","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","o","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","Link","BaseLink","Compositions","menuBarWidgets","emptyState","component","useContext","ComponentContext","searchParams","useSearchParams","params","useParams","versionFromQueryParams","navigate","useNavigate","location","useLocation","currentCompositionName","currentComposition","compositions","find","composition","identifier","toLowerCase","head","selectedRef","useRef","current","properties","useDocs","id","isMobile","useIsMobile","showSidebar","isSidebarOpen","setSidebarOpenness","useState","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","includesEnvTemplates","includesEnvTemplate","useNameParam","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","fullscreen","queryParams","useMemo","queryString","stringify","useEffect","createElement","CompositionContextProvider","setQueryParams","SplitPane","layout","size","className","styles","compositionsPage","Pane","CompositionsMenuBar","menuBar","Tooltip","content","placement","external","href","openInNewTab","OptionButton","icon","CompositionContent","compositionPanel","selected","HoverSplitter","splitter","Collapser","isOpen","onMouseDown","stopPropagation","onClick","x","tooltipContent","collapser","right","ThemeContext","TabContainer","tabsContainer","TabList","tabs","Tab","TabPanel","tabContent","CompositionsPanel","onSelectComposition","selectedCompositionFromUrl","pathSegments","pathname","split","filter","push","urlParams","URLSearchParams","newPath","join","toString","url","active","PropTable","rows","showListView","_ref","componentCompositionProps","env","environment","EmptyStateTemplate","host","noCompositionsPage","H1","title","Separator","isPresentational","separator","AlertCard","level","MDXLayout","buildStatus","StatusMessageCard","buildStatusMessage","status","EmptyBox","linkText","link","ComponentComposition","compositionsIframe","viewport","forceHeight","fullContentHeight","pubsub"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport head from 'lodash.head';\nimport queryString from 'query-string';\nimport { ThemeContext } from '@teambit/documenter.theme.theme-context';\nimport { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';\nimport { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';\nimport { ComponentContext, ComponentModel } from '@teambit/component';\nimport { PropTable } from '@teambit/documenter.ui.property-table';\nimport { Tab, TabContainer, TabList, TabPanel } from '@teambit/panels';\nimport { useDocs } from '@teambit/docs.ui.queries.get-docs';\nimport { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { toPreviewUrl } from '@teambit/preview.ui.component-preview';\nimport { useIsMobile } from '@teambit/ui-foundation.ui.hooks.use-is-mobile';\nimport { CompositionsMenuBar } from '@teambit/compositions.ui.compositions-menu-bar';\nimport { CompositionContextProvider } from '@teambit/compositions.ui.hooks.use-composition';\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout';\nimport { Separator } from '@teambit/design.ui.separator';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { AlertCard } from '@teambit/design.ui.alert-card';\nimport { Link as BaseLink, useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { Tooltip } from '@teambit/design.ui.tooltip';\nimport { EmptyStateSlot } from './compositions.ui.runtime';\nimport { Composition } from './composition';\nimport styles from './compositions.module.scss';\nimport { ComponentComposition } from './ui';\nimport { CompositionsPanel } from './ui/compositions-panel/compositions-panel';\nimport type { CompositionsMenuSlot } from './compositions.ui.runtime';\nimport { ComponentCompositionProps } from './ui/composition-preview';\n\n// @todo - this will be fixed as part of the @teambit/base-react.navigation.link upgrade to latest\nconst Link = BaseLink as any;\n\nexport type MenuBarWidget = {\n location: 'start' | 'end';\n content: ReactNode;\n};\nexport type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptyState?: EmptyStateSlot };\n\nexport function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {\n const component = useContext(ComponentContext);\n const [searchParams] = useSearchParams();\n const params = useParams();\n const versionFromQueryParams = searchParams.get('version');\n const navigate = useNavigate();\n const location = useLocation();\n const currentCompositionName = params['*'];\n const currentComposition =\n component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||\n head(component.compositions);\n\n const selectedRef = useRef(currentComposition);\n selectedRef.current = currentComposition;\n\n const properties = useDocs(component.id);\n\n const isMobile = useIsMobile();\n const showSidebar = !isMobile && component.compositions.length > 0;\n const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);\n\n const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.left;\n\n const compositionUrl = toPreviewUrl(component, 'compositions');\n const isScaling = component?.preview?.isScaling;\n const includesEnvTemplates = component?.preview?.includesEnvTemplate;\n const useNameParam = component?.preview?.useNameParam;\n const compositionIdentifierParam =\n useNameParam || (isScaling && includesEnvTemplates === false)\n ? `name=${currentComposition?.identifier}`\n : currentComposition?.identifier;\n\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({\n fullscreen: true,\n });\n\n const queryParams = useMemo(() => queryString.stringify(compositionParams), [compositionParams]);\n\n // collapse sidebar when empty, reopen when not\n useEffect(() => setSidebarOpenness(showSidebar), [showSidebar]);\n return (\n <CompositionContextProvider queryParams={compositionParams} setQueryParams={setCompositionParams}>\n <SplitPane layout={sidebarOpenness} size=\"85%\" className={styles.compositionsPage}>\n <Pane className={styles.left}>\n <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>\n <Tooltip content={'Open in new tab'} placement=\"right\">\n <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>\n <OptionButton icon=\"open-tab\" />\n </Link>\n </Tooltip>\n </CompositionsMenuBar>\n <CompositionContent\n className={styles.compositionPanel}\n emptyState={emptyState}\n component={component}\n selected={currentComposition}\n queryParams={queryParams}\n />\n </Pane>\n <HoverSplitter className={styles.splitter}>\n <Collapser\n placement=\"left\"\n isOpen={isSidebarOpen}\n onMouseDown={(e) => e.stopPropagation()} // avoid split-pane drag\n onClick={() => setSidebarOpenness((x) => !x)}\n tooltipContent={`${isSidebarOpen ? 'Hide' : 'Show'} side compositions`}\n className={styles.collapser}\n />\n </HoverSplitter>\n <Pane className={styles.right}>\n <ThemeContext>\n <TabContainer className={styles.tabsContainer}>\n <TabList className={styles.tabs}>\n <Tab>compositions</Tab>\n <Tab>properties</Tab>\n </TabList>\n <TabPanel className={styles.tabContent}>\n <CompositionsPanel\n isScaling={isScaling}\n useNameParam={useNameParam}\n includesEnvTemplate={component.preview?.includesEnvTemplate}\n onSelectComposition={(composition) => {\n if (!currentComposition || !location) return;\n const selectedCompositionFromUrl = params['*'];\n\n const pathSegments = location.pathname.split('/').filter((x) => x);\n\n if (!selectedCompositionFromUrl) {\n pathSegments.push(composition.identifier.toLowerCase());\n } else {\n pathSegments[pathSegments.length - 1] = composition.identifier.toLowerCase();\n }\n\n const urlParams = new URLSearchParams();\n if (versionFromQueryParams) {\n urlParams.set('version', versionFromQueryParams);\n }\n const newPath = pathSegments.join('/');\n navigate(`/${newPath}?${urlParams.toString()}`);\n }}\n url={compositionUrl}\n compositions={component.compositions}\n active={currentComposition}\n />\n </TabPanel>\n <TabPanel className={styles.tabContent}>\n {properties && properties.length > 0 ? <PropTable rows={properties} showListView /> : <div />}\n </TabPanel>\n </TabContainer>\n </ThemeContext>\n </Pane>\n </SplitPane>\n </CompositionContextProvider>\n );\n}\n\nexport type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition;\n queryParams?: string | string[];\n emptyState?: EmptyStateSlot;\n} & ComponentCompositionProps;\n\nexport function CompositionContent({\n component,\n selected,\n queryParams,\n emptyState,\n ...componentCompositionProps\n}: CompositionContentProps) {\n const env = component.environment?.id;\n const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;\n\n if (component.compositions.length === 0 && component.host === 'teambit.workspace/workspace' && EmptyStateTemplate) {\n return (\n <div className={styles.noCompositionsPage}>\n <div>\n <H1 className={styles.title}>Compositions</H1>\n <Separator isPresentational className={styles.separator} />\n <AlertCard\n level=\"info\"\n title=\"There are no\n compositions for this Component. Learn how to add compositions:\"\n >\n <MDXLayout>\n <EmptyStateTemplate />\n </MDXLayout>\n </AlertCard>\n </div>\n </div>\n );\n }\n\n if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard className={styles.buildStatusMessage} status=\"PROCESSING\" title=\"component preview pending\">\n this might take some time\n </StatusMessageCard>\n );\n if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard\n className={styles.buildStatusMessage}\n status=\"FAILURE\"\n title=\"failed to get component preview \"\n ></StatusMessageCard>\n );\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n if (component.compositions.length === 0) {\n return (\n <EmptyBox\n title=\"There are no compositions for this component.\"\n linkText=\"Learn how to create compositions\"\n link={`https://bit.dev/reference/dev-services-overview/compositions/compositions-overview`}\n />\n );\n }\n\n return (\n <ComponentComposition\n className={styles.compositionsIframe}\n // TODO: Oded to add control for viewport.\n viewport={null}\n component={component}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aAAA,CAAChG,iBAAA,GAAA4K,iBAAiB;IAACtE,SAAS,EAAEC,6BAAM,CAACsE,kBAAmB;IAACC,MAAM,EAAC,YAAY;IAACV,KAAK,EAAC;EAA2B,GAAC,2BAE5F,CAAC;EAExB,IAAIzH,SAAS,EAAEgI,WAAW,KAAK,QAAQ,IAAIhI,SAAS,EAAEsH,IAAI,KAAK,qBAAqB,EAClF,oBACE5L,MAAA,GAAAmC,OAAA,CAAAwF,aAAA,CAAChG,iBAAA,GAAA4K,iBAAiB;IAChBtE,SAAS,EAAEC,6BAAM,CAACsE,kBAAmB;IACrCC,MAAM,EAAC,SAAS;IAChBV,KAAK,EAAC;EAAkC,CACtB,CAAC;;EAGzB;EACA,IAAIzH,SAAS,CAACc,YAAY,CAAC3B,MAAM,KAAK,CAAC,EAAE;IACvC,oBACEzD,MAAA,GAAAmC,OAAA,CAAAwF,aAAA,CAAC3G,SAAA,GAAA0L,QAAQ;MACPX,KAAK,EAAC,+CAA+C;MACrDY,QAAQ,EAAC,kCAAkC;MAC3CC,IAAI,EAAE;IAAqF,CAC5F,CAAC;EAEN;EAEA,oBACE5M,MAAA,GAAAmC,OAAA,CAAAwF,aAAA,CAAC7F,GAAA,GAAA+K,oBAAoB,EAAAxJ,QAAA;IACnB4E,SAAS,EAAEC,6BAAM,CAAC4E;IAClB;IAAA;IACAC,QAAQ,EAAE,IAAK;IACfzI,SAAS,EAAEA,SAAU;IACrB0I,WAAW,EAAC,MAAM;IAClB1H,WAAW,EAAE2D,QAAS;IACtBgE,iBAAiB;IACjBC,MAAM,EAAE,IAAK;IACb5F,WAAW,EAAEA;EAAY,GACrBkE,yBAAyB,CAC9B,CAAC;AAEN","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.310/dist/compositions.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.310/dist/compositions.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.312/dist/compositions.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compositions_compositions@1.0.312/dist/compositions.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -39,6 +39,13 @@ function _uiFoundationUi() {
39
39
  };
40
40
  return data;
41
41
  }
42
+ function _designUi() {
43
+ const data = require("@teambit/design.ui.tooltip");
44
+ _designUi = function () {
45
+ return data;
46
+ };
47
+ return data;
48
+ }
42
49
  function _baseReactNavigation() {
43
50
  const data = require("@teambit/base-react.navigation.link");
44
51
  _baseReactNavigation = function () {
@@ -110,7 +117,10 @@ function CompositionsPanel(_ref) {
110
117
  icon: "Code",
111
118
  tooltipContent: "Code",
112
119
  onClick: onCompositionCodeClicked(composition)
113
- }), /*#__PURE__*/_react().default.createElement("a", {
120
+ }), /*#__PURE__*/_react().default.createElement(_designUi().Tooltip, {
121
+ content: "Open in new tab",
122
+ placement: "bottom"
123
+ }, /*#__PURE__*/_react().default.createElement("a", {
114
124
  className: _compositionsPanelModule().default.panelLink,
115
125
  target: "_blank",
116
126
  rel: "noopener noreferrer",
@@ -118,7 +128,7 @@ function CompositionsPanel(_ref) {
118
128
  }, /*#__PURE__*/_react().default.createElement(_evangelistElements().Icon, {
119
129
  className: _compositionsPanelModule().default.icon,
120
130
  of: "open-tab"
121
- }))));
131
+ })))));
122
132
  }));
123
133
  }
124
134
 
@@ -1 +1 @@
1
- {"version":3,"names":["_evangelistElements","data","require","_classnames","_interopRequireDefault","_reactRouterDom","_react","_interopRequireWildcard","_uiFoundationUi","_baseReactNavigation","_compositionsPanelModule","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","o","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","CompositionsPanel","_ref","url","compositions","isScaling","onSelectComposition","onSelect","active","includesEnvTemplate","useNameParam","className","rest","shouldAddNameParam","handleSelect","useCallback","selected","location","useLocation","searchParams","useSearchParams","versionFromQueryParams","navigate","useNavigate","onCompositionCodeClicked","composition","preventDefault","queryParams","URLSearchParams","basePath","pathname","split","filepath","toString","identifier","createElement","classNames","map","href","key","styles","linkWrapper","panelLink","onClick","box","name","displayName","right","MenuWidgetIcon","codeLink","icon","tooltipContent","target","rel","Icon","of"],"sources":["compositions-panel.tsx"],"sourcesContent":["import { Icon } from '@teambit/evangelist.elements.icon';\nimport classNames from 'classnames';\nimport { useSearchParams } from 'react-router-dom';\nimport React, { useCallback } from 'react';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport { useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { Composition } from '../../composition';\nimport styles from './compositions-panel.module.scss';\n\nexport type CompositionsPanelProps = {\n /**\n * list of compositions\n */\n compositions: Composition[];\n /**\n * select composition to display\n */\n onSelectComposition: (composition: Composition) => void;\n /**\n * the currently active composition\n */\n active?: Composition;\n /**\n * the url to the base composition. doesntc contain the current composition params\n */\n url: string;\n /**\n * checks if a component is using the new preview api. if false, doesnt scale to support new preview\n */\n isScaling?: boolean;\n\n includesEnvTemplate?: boolean;\n\n useNameParam?: boolean;\n} & React.HTMLAttributes<HTMLUListElement>;\n\nexport function CompositionsPanel({\n url,\n compositions,\n isScaling,\n onSelectComposition: onSelect,\n active,\n includesEnvTemplate,\n useNameParam,\n className,\n ...rest\n}: CompositionsPanelProps) {\n const shouldAddNameParam = useNameParam || (isScaling && includesEnvTemplate === false);\n\n const handleSelect = useCallback(\n (selected: Composition) => {\n onSelect && onSelect(selected);\n },\n [onSelect]\n );\n\n const location = useLocation();\n const [searchParams] = useSearchParams();\n const versionFromQueryParams = searchParams.get('version');\n const navigate = useNavigate();\n\n const onCompositionCodeClicked = useCallback(\n (composition: Composition) => (e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n const queryParams = new URLSearchParams();\n if (versionFromQueryParams) {\n queryParams.set('version', versionFromQueryParams);\n }\n const basePath = location?.pathname.split('/~compositions')[0];\n navigate(`${basePath}/~code/${composition.filepath}?${queryParams.toString()}#search=${composition.identifier}`);\n },\n [location?.pathname, versionFromQueryParams]\n );\n\n return (\n <ul {...rest} className={classNames(className)}>\n {compositions.map((composition) => {\n const href = shouldAddNameParam ? `${url}&name=${composition.identifier}` : `${url}&${composition.identifier}`;\n return (\n <li\n key={composition.identifier}\n className={classNames(styles.linkWrapper, composition === active && styles.active)}\n >\n <a className={styles.panelLink} onClick={() => handleSelect(composition)}>\n <span className={styles.box}></span>\n <span className={styles.name}>{composition.displayName}</span>\n </a>\n <div className={styles.right}>\n <MenuWidgetIcon\n className={styles.codeLink}\n icon=\"Code\"\n tooltipContent=\"Code\"\n onClick={onCompositionCodeClicked(composition)}\n />\n <a className={styles.panelLink} target=\"_blank\" rel=\"noopener noreferrer\" href={href}>\n <Icon className={styles.icon} of=\"open-tab\" />\n </a>\n </div>\n </li>\n );\n })}\n </ul>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,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CAAM,CAACI;IAAI,CAAO,CAAC,eACpCjF,MAAA,GAAAY,OAAA,CAAA4D,aAAA;MAAMxB,SAAS,EAAE6B,kCAAM,CAACK;IAAK,GAAEpB,WAAW,CAACqB,WAAkB,CAC5D,CAAC,eACJnF,MAAA,GAAAY,OAAA,CAAA4D,aAAA;MAAKxB,SAAS,EAAE6B,kCAAM,CAACO;IAAM,gBAC3BpF,MAAA,GAAAY,OAAA,CAAA4D,aAAA,CAACtE,eAAA,GAAAmF,cAAc;MACbrC,SAAS,EAAE6B,kCAAM,CAACS,QAAS;MAC3BC,IAAI,EAAC,MAAM;MACXC,cAAc,EAAC,MAAM;MACrBR,OAAO,EAAEnB,wBAAwB,CAACC,WAAW;IAAE,CAChD,CAAC,eACF9D,MAAA,GAAAY,OAAA,CAAA4D,aAAA;MAAGxB,SAAS,EAAE6B,kCAAM,CAACE,SAAU;MAACU,MAAM,EAAC,QAAQ;MAACC,GAAG,EAAC,qBAAqB;MAACf,IAAI,EAAEA;IAAK,gBACnF3E,MAAA,GAAAY,OAAA,CAAA4D,aAAA,CAAC9E,mBAAA,GAAAiG,IAAI;MAAC3C,SAAS,EAAE6B,kCAAM,CAACU,IAAK;MAACK,EAAE,EAAC;IAAU,CAAE,CAC5C,CACA,CACH,CAAC;EAET,CAAC,CACC,CAAC;AAET","ignoreList":[]}
1
+ {"version":3,"names":["_evangelistElements","data","require","_classnames","_interopRequireDefault","_reactRouterDom","_react","_interopRequireWildcard","_uiFoundationUi","_designUi","_baseReactNavigation","_compositionsPanelModule","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","o","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","CompositionsPanel","_ref","url","compositions","isScaling","onSelectComposition","onSelect","active","includesEnvTemplate","useNameParam","className","rest","shouldAddNameParam","handleSelect","useCallback","selected","location","useLocation","searchParams","useSearchParams","versionFromQueryParams","navigate","useNavigate","onCompositionCodeClicked","composition","preventDefault","queryParams","URLSearchParams","basePath","pathname","split","filepath","toString","identifier","createElement","classNames","map","href","key","styles","linkWrapper","panelLink","onClick","box","name","displayName","right","MenuWidgetIcon","codeLink","icon","tooltipContent","Tooltip","content","placement","target","rel","Icon","of"],"sources":["compositions-panel.tsx"],"sourcesContent":["import { Icon } from '@teambit/evangelist.elements.icon';\nimport classNames from 'classnames';\nimport { useSearchParams } from 'react-router-dom';\nimport React, { useCallback } from 'react';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport { Tooltip } from '@teambit/design.ui.tooltip';\nimport { useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { Composition } from '../../composition';\nimport styles from './compositions-panel.module.scss';\n\nexport type CompositionsPanelProps = {\n /**\n * list of compositions\n */\n compositions: Composition[];\n /**\n * select composition to display\n */\n onSelectComposition: (composition: Composition) => void;\n /**\n * the currently active composition\n */\n active?: Composition;\n /**\n * the url to the base composition. doesntc contain the current composition params\n */\n url: string;\n /**\n * checks if a component is using the new preview api. if false, doesnt scale to support new preview\n */\n isScaling?: boolean;\n\n includesEnvTemplate?: boolean;\n\n useNameParam?: boolean;\n} & React.HTMLAttributes<HTMLUListElement>;\n\nexport function CompositionsPanel({\n url,\n compositions,\n isScaling,\n onSelectComposition: onSelect,\n active,\n includesEnvTemplate,\n useNameParam,\n className,\n ...rest\n}: CompositionsPanelProps) {\n const shouldAddNameParam = useNameParam || (isScaling && includesEnvTemplate === false);\n\n const handleSelect = useCallback(\n (selected: Composition) => {\n onSelect && onSelect(selected);\n },\n [onSelect]\n );\n\n const location = useLocation();\n const [searchParams] = useSearchParams();\n const versionFromQueryParams = searchParams.get('version');\n const navigate = useNavigate();\n\n const onCompositionCodeClicked = useCallback(\n (composition: Composition) => (e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n const queryParams = new URLSearchParams();\n if (versionFromQueryParams) {\n queryParams.set('version', versionFromQueryParams);\n }\n const basePath = location?.pathname.split('/~compositions')[0];\n navigate(`${basePath}/~code/${composition.filepath}?${queryParams.toString()}#search=${composition.identifier}`);\n },\n [location?.pathname, versionFromQueryParams]\n );\n\n return (\n <ul {...rest} className={classNames(className)}>\n {compositions.map((composition) => {\n const href = shouldAddNameParam ? `${url}&name=${composition.identifier}` : `${url}&${composition.identifier}`;\n return (\n <li\n key={composition.identifier}\n className={classNames(styles.linkWrapper, composition === active && styles.active)}\n >\n <a className={styles.panelLink} onClick={() => handleSelect(composition)}>\n <span className={styles.box}></span>\n <span className={styles.name}>{composition.displayName}</span>\n </a>\n <div className={styles.right}>\n <MenuWidgetIcon\n className={styles.codeLink}\n icon=\"Code\"\n tooltipContent=\"Code\"\n onClick={onCompositionCodeClicked(composition)}\n />\n <Tooltip content=\"Open in new tab\" placement=\"bottom\">\n <a className={styles.panelLink} target=\"_blank\" rel=\"noopener noreferrer\" href={href}>\n <Icon className={styles.icon} of=\"open-tab\" />\n </a>\n </Tooltip>\n </div>\n </li>\n );\n })}\n </ul>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAM,uBAAA,CAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL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D,MAAA,GAAAa,OAAA,CAAA4D,aAAA;MAAMxB,SAAS,EAAE6B,kCAAM,CAACI;IAAI,CAAO,CAAC,eACpClF,MAAA,GAAAa,OAAA,CAAA4D,aAAA;MAAMxB,SAAS,EAAE6B,kCAAM,CAACK;IAAK,GAAEpB,WAAW,CAACqB,WAAkB,CAC5D,CAAC,eACJpF,MAAA,GAAAa,OAAA,CAAA4D,aAAA;MAAKxB,SAAS,EAAE6B,kCAAM,CAACO;IAAM,gBAC3BrF,MAAA,GAAAa,OAAA,CAAA4D,aAAA,CAACvE,eAAA,GAAAoF,cAAc;MACbrC,SAAS,EAAE6B,kCAAM,CAACS,QAAS;MAC3BC,IAAI,EAAC,MAAM;MACXC,cAAc,EAAC,MAAM;MACrBR,OAAO,EAAEnB,wBAAwB,CAACC,WAAW;IAAE,CAChD,CAAC,eACF/D,MAAA,GAAAa,OAAA,CAAA4D,aAAA,CAACtE,SAAA,GAAAuF,OAAO;MAACC,OAAO,EAAC,iBAAiB;MAACC,SAAS,EAAC;IAAQ,gBACnD5F,MAAA,GAAAa,OAAA,CAAA4D,aAAA;MAAGxB,SAAS,EAAE6B,kCAAM,CAACE,SAAU;MAACa,MAAM,EAAC,QAAQ;MAACC,GAAG,EAAC,qBAAqB;MAAClB,IAAI,EAAEA;IAAK,gBACnF5E,MAAA,GAAAa,OAAA,CAAA4D,aAAA,CAAC/E,mBAAA,GAAAqG,IAAI;MAAC9C,SAAS,EAAE6B,kCAAM,CAACU,IAAK;MAACQ,EAAE,EAAC;IAAU,CAAE,CAC5C,CACI,CACN,CACH,CAAC;EAET,CAAC,CACC,CAAC;AAET","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/compositions",
3
- "version": "1.0.310",
3
+ "version": "1.0.312",
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.310"
9
+ "version": "1.0.312"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -34,23 +34,24 @@
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.310",
37
+ "@teambit/component": "1.0.312",
38
38
  "@teambit/compositions.model.composition-id": "0.0.502",
39
- "@teambit/graphql": "1.0.310",
40
- "@teambit/cli": "0.0.887",
41
- "@teambit/dev-files": "1.0.310",
42
- "@teambit/envs": "1.0.310",
43
- "@teambit/preview": "1.0.310",
44
- "@teambit/schema": "1.0.310",
45
- "@teambit/scope": "1.0.310",
39
+ "@teambit/graphql": "1.0.312",
40
+ "@teambit/cli": "0.0.889",
41
+ "@teambit/dev-files": "1.0.312",
42
+ "@teambit/envs": "1.0.312",
43
+ "@teambit/preview": "1.0.312",
44
+ "@teambit/schema": "1.0.312",
45
+ "@teambit/scope": "1.0.312",
46
46
  "@teambit/toolbox.path.match-patterns": "0.0.15",
47
- "@teambit/workspace": "1.0.310",
47
+ "@teambit/workspace": "1.0.312",
48
+ "@teambit/design.ui.tooltip": "0.0.369",
48
49
  "@teambit/docs.ui.queries.get-docs": "0.0.508",
49
- "@teambit/panels": "0.0.889",
50
+ "@teambit/panels": "0.0.891",
50
51
  "@teambit/preview.ui.component-preview": "1.0.12",
51
52
  "@teambit/ui-foundation.ui.buttons.collapser": "0.0.222",
52
- "@teambit/component-compare": "1.0.310",
53
- "@teambit/ui": "1.0.310"
53
+ "@teambit/component-compare": "1.0.312",
54
+ "@teambit/ui": "1.0.312"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@types/lodash": "4.14.165",
@@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
  import { useSearchParams } from 'react-router-dom';
4
4
  import React, { useCallback } from 'react';
5
5
  import { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';
6
+ import { Tooltip } from '@teambit/design.ui.tooltip';
6
7
  import { useNavigate, useLocation } from '@teambit/base-react.navigation.link';
7
8
  import { Composition } from '../../composition';
8
9
  import styles from './compositions-panel.module.scss';
@@ -92,9 +93,11 @@ export function CompositionsPanel({
92
93
  tooltipContent="Code"
93
94
  onClick={onCompositionCodeClicked(composition)}
94
95
  />
95
- <a className={styles.panelLink} target="_blank" rel="noopener noreferrer" href={href}>
96
- <Icon className={styles.icon} of="open-tab" />
97
- </a>
96
+ <Tooltip content="Open in new tab" placement="bottom">
97
+ <a className={styles.panelLink} target="_blank" rel="noopener noreferrer" href={href}>
98
+ <Icon className={styles.icon} of="open-tab" />
99
+ </a>
100
+ </Tooltip>
98
101
  </div>
99
102
  </li>
100
103
  );