@teambit/compositions 0.0.951 → 0.0.952
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composition.section.tsx +2 -2
- package/compositions.module.scss +0 -1
- package/compositions.tsx +44 -13
- package/compositions.ui.runtime.tsx +1 -4
- package/dist/composition.section.js +2 -2
- package/dist/composition.section.js.map +1 -1
- package/dist/compositions.js +43 -13
- package/dist/compositions.js.map +1 -1
- package/dist/compositions.module.scss +0 -1
- package/dist/compositions.ui.runtime.js +1 -4
- package/dist/compositions.ui.runtime.js.map +1 -1
- package/dist/{preview-1672802758290.js → preview-1672889151191.js} +2 -2
- package/package-tar/teambit-compositions-0.0.952.tgz +0 -0
- package/package.json +18 -17
- package/package-tar/teambit-compositions-0.0.951.tgz +0 -0
package/composition.section.tsx
CHANGED
|
@@ -17,11 +17,11 @@ export class CompositionsSection implements Section {
|
|
|
17
17
|
|
|
18
18
|
navigationLink = {
|
|
19
19
|
href: '~compositions',
|
|
20
|
-
children: '
|
|
20
|
+
children: 'Preview',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
route = {
|
|
24
|
-
path: '~compositions',
|
|
24
|
+
path: '~compositions/*',
|
|
25
25
|
element: <Compositions menuBarWidgets={this.options.menuBarWidgetSlot} emptyState={this.emptyStateSlot} />,
|
|
26
26
|
};
|
|
27
27
|
|
package/compositions.module.scss
CHANGED
package/compositions.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';
|
|
2
|
+
import { useParams } from 'react-router-dom';
|
|
2
3
|
import head from 'lodash.head';
|
|
3
4
|
import queryString from 'query-string';
|
|
4
5
|
import { ThemeContext } from '@teambit/documenter.theme.theme-context';
|
|
@@ -18,7 +19,7 @@ import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
|
|
|
18
19
|
import { Separator } from '@teambit/design.ui.separator';
|
|
19
20
|
import { H1 } from '@teambit/documenter.ui.heading';
|
|
20
21
|
import { AlertCard } from '@teambit/design.ui.alert-card';
|
|
21
|
-
import { Link } from '@teambit/base-react.navigation.link';
|
|
22
|
+
import { Link, useNavigate, useLocation } from '@teambit/base-react.navigation.link';
|
|
22
23
|
import { OptionButton } from '@teambit/design.ui.input.option-button';
|
|
23
24
|
import { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';
|
|
24
25
|
import { EmptyStateSlot } from './compositions.ui.runtime';
|
|
@@ -36,20 +37,29 @@ export type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptySta
|
|
|
36
37
|
|
|
37
38
|
export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
|
|
38
39
|
const component = useContext(ComponentContext);
|
|
39
|
-
const [
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
// const [searchParams, setSearchParams] = useSearchParams();
|
|
41
|
+
const params = useParams();
|
|
42
|
+
const navigate = useNavigate();
|
|
43
|
+
const location = useLocation();
|
|
44
|
+
const currentCompositionName = params['*'];
|
|
45
|
+
// console.log(routes);
|
|
46
|
+
const currentComposition =
|
|
47
|
+
component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||
|
|
48
|
+
head(component.compositions);
|
|
49
|
+
// const [selected, selectComposition] = useState(head(component.compositions));
|
|
50
|
+
const selectedRef = useRef(currentComposition);
|
|
51
|
+
selectedRef.current = currentComposition;
|
|
42
52
|
|
|
43
53
|
const properties = useDocs(component.id);
|
|
44
54
|
|
|
45
55
|
// reset selected composition when component changes.
|
|
46
56
|
// this does trigger renderer, but perf seems to be ok
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
// useEffect(() => {
|
|
58
|
+
// const prevId = selectedRef.current?.identifier;
|
|
59
|
+
// const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
}, [component]);
|
|
61
|
+
// navigate(next.displayName.toLowerCase().replaceAll(' ', '-'));
|
|
62
|
+
// }, [component]);
|
|
53
63
|
const isMobile = useIsMobile();
|
|
54
64
|
const showSidebar = !isMobile && component.compositions.length > 0;
|
|
55
65
|
const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);
|
|
@@ -58,7 +68,9 @@ export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
|
|
|
58
68
|
|
|
59
69
|
const compositionUrl = toPreviewUrl(component, 'compositions');
|
|
60
70
|
const isScaling = component?.preview?.isScaling;
|
|
61
|
-
const compositionIdentifierParam = isScaling
|
|
71
|
+
const compositionIdentifierParam = isScaling
|
|
72
|
+
? `name=${currentComposition?.identifier}`
|
|
73
|
+
: currentComposition?.identifier;
|
|
62
74
|
const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);
|
|
63
75
|
|
|
64
76
|
const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});
|
|
@@ -78,7 +90,7 @@ export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
|
|
|
78
90
|
<CompositionContent
|
|
79
91
|
emptyState={emptyState}
|
|
80
92
|
component={component}
|
|
81
|
-
selected={
|
|
93
|
+
selected={currentComposition}
|
|
82
94
|
queryParams={queryParams}
|
|
83
95
|
/>
|
|
84
96
|
</Pane>
|
|
@@ -102,10 +114,29 @@ export function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {
|
|
|
102
114
|
<TabPanel className={styles.tabContent}>
|
|
103
115
|
<CompositionsPanel
|
|
104
116
|
isScaling={isScaling}
|
|
105
|
-
onSelectComposition={
|
|
117
|
+
onSelectComposition={(composition) => {
|
|
118
|
+
if (!currentComposition || !location) return;
|
|
119
|
+
if (location.pathname.includes(currentComposition.identifier.toLowerCase())) {
|
|
120
|
+
navigate(composition.identifier.toLowerCase());
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const path = location.pathname.replace(
|
|
125
|
+
currentComposition.identifier.toLowerCase(),
|
|
126
|
+
composition.identifier.toLowerCase()
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
if (!path) return;
|
|
130
|
+
if(!path.includes(composition.identifier.toLowerCase())) {
|
|
131
|
+
const nextPath = location.pathname.concat(`/${composition.identifier.toLowerCase()}`)
|
|
132
|
+
navigate(nextPath)
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
navigate(path);
|
|
136
|
+
}}
|
|
106
137
|
url={compositionUrl}
|
|
107
138
|
compositions={component.compositions}
|
|
108
|
-
active={
|
|
139
|
+
active={currentComposition}
|
|
109
140
|
className={styles.compost}
|
|
110
141
|
/>
|
|
111
142
|
</TabPanel>
|
|
@@ -49,10 +49,7 @@ export class CompositionsUI {
|
|
|
49
49
|
const compositionCompare = new CompositionCompareSection(compositions);
|
|
50
50
|
component.registerRoute(section.route);
|
|
51
51
|
component.registerNavigation(section.navigationLink, section.order);
|
|
52
|
-
componentCompare.registerNavigation(
|
|
53
|
-
props: compositionCompare.navigationLink,
|
|
54
|
-
order: compositionCompare.navigationLink.order,
|
|
55
|
-
});
|
|
52
|
+
componentCompare.registerNavigation(compositionCompare);
|
|
56
53
|
componentCompare.registerRoutes([compositionCompare.route]);
|
|
57
54
|
return compositions;
|
|
58
55
|
}
|
|
@@ -37,10 +37,10 @@ class CompositionsSection {
|
|
|
37
37
|
this.emptyStateSlot = emptyStateSlot;
|
|
38
38
|
(0, _defineProperty2().default)(this, "navigationLink", {
|
|
39
39
|
href: '~compositions',
|
|
40
|
-
children: '
|
|
40
|
+
children: 'Preview'
|
|
41
41
|
});
|
|
42
42
|
(0, _defineProperty2().default)(this, "route", {
|
|
43
|
-
path: '~compositions',
|
|
43
|
+
path: '~compositions/*',
|
|
44
44
|
element: /*#__PURE__*/_react().default.createElement(_compositions().Compositions, {
|
|
45
45
|
menuBarWidgets: this.options.menuBarWidgetSlot,
|
|
46
46
|
emptyState: this.emptyStateSlot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CompositionsSection","constructor","compositions","options","emptyStateSlot","href","children","path","element","menuBarWidgetSlot"],"sources":["composition.section.tsx"],"sourcesContent":["import { Section } from '@teambit/component';\nimport React from 'react';\nimport { Compositions } from './compositions';\nimport type { CompositionsUI, CompositionsMenuSlot, EmptyStateSlot } from './compositions.ui.runtime';\n\ntype Options = { menuBarWidgetSlot: CompositionsMenuSlot };\n\nexport class CompositionsSection implements Section {\n constructor(\n /**\n * simulations ui extension.\n */\n private compositions: CompositionsUI,\n private options: Options,\n private emptyStateSlot: EmptyStateSlot\n ) {}\n\n navigationLink = {\n href: '~compositions',\n children: '
|
|
1
|
+
{"version":3,"names":["CompositionsSection","constructor","compositions","options","emptyStateSlot","href","children","path","element","menuBarWidgetSlot"],"sources":["composition.section.tsx"],"sourcesContent":["import { Section } from '@teambit/component';\nimport React from 'react';\nimport { Compositions } from './compositions';\nimport type { CompositionsUI, CompositionsMenuSlot, EmptyStateSlot } from './compositions.ui.runtime';\n\ntype Options = { menuBarWidgetSlot: CompositionsMenuSlot };\n\nexport class CompositionsSection implements Section {\n constructor(\n /**\n * simulations ui extension.\n */\n private compositions: CompositionsUI,\n private options: Options,\n private emptyStateSlot: EmptyStateSlot\n ) {}\n\n navigationLink = {\n href: '~compositions',\n children: 'Preview',\n };\n\n route = {\n path: '~compositions/*',\n element: <Compositions menuBarWidgets={this.options.menuBarWidgetSlot} emptyState={this.emptyStateSlot} />,\n };\n\n order = 20;\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,mBAAmB,CAAoB;EAClDC,WAAW;EACT;AACJ;AACA;EACYC,YAA4B,EAC5BC,OAAgB,EAChBC,cAA8B,EACtC;IAAA,KAHQF,YAA4B,GAA5BA,YAA4B;IAAA,KAC5BC,OAAgB,GAAhBA,OAAgB;IAAA,KAChBC,cAA8B,GAA9BA,cAA8B;IAAA,wDAGvB;MACfC,IAAI,EAAE,eAAe;MACrBC,QAAQ,EAAE;IACZ,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,iBAAiB;MACvBC,OAAO,eAAE,+BAAC,4BAAY;QAAC,cAAc,EAAE,IAAI,CAACL,OAAO,CAACM,iBAAkB;QAAC,UAAU,EAAE,IAAI,CAACL;MAAe;IACzG,CAAC;IAAA,+CAEO,EAAE;EAZP;AAaL;AAAC"}
|
package/dist/compositions.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
require("core-js/modules/es.array.iterator.js");
|
|
5
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
6
|
+
require("core-js/modules/es.string.replace.js");
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
@@ -14,6 +16,13 @@ function _react() {
|
|
|
14
16
|
};
|
|
15
17
|
return data;
|
|
16
18
|
}
|
|
19
|
+
function _reactRouterDom() {
|
|
20
|
+
const data = require("react-router-dom");
|
|
21
|
+
_reactRouterDom = function () {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
17
26
|
function _lodash() {
|
|
18
27
|
const data = _interopRequireDefault(require("lodash.head"));
|
|
19
28
|
_lodash = function () {
|
|
@@ -197,26 +206,33 @@ function Compositions({
|
|
|
197
206
|
}) {
|
|
198
207
|
var _component$preview;
|
|
199
208
|
const component = (0, _react().useContext)(_component().ComponentContext);
|
|
200
|
-
const [
|
|
201
|
-
const
|
|
202
|
-
|
|
209
|
+
// const [searchParams, setSearchParams] = useSearchParams();
|
|
210
|
+
const params = (0, _reactRouterDom().useParams)();
|
|
211
|
+
const navigate = (0, _baseReactNavigation().useNavigate)();
|
|
212
|
+
const location = (0, _baseReactNavigation().useLocation)();
|
|
213
|
+
const currentCompositionName = params['*'];
|
|
214
|
+
// console.log(routes);
|
|
215
|
+
const currentComposition = component.compositions.find(composition => composition.identifier.toLowerCase() === currentCompositionName) || (0, _lodash().default)(component.compositions);
|
|
216
|
+
// const [selected, selectComposition] = useState(head(component.compositions));
|
|
217
|
+
const selectedRef = (0, _react().useRef)(currentComposition);
|
|
218
|
+
selectedRef.current = currentComposition;
|
|
203
219
|
const properties = (0, _docsUiQueries().useDocs)(component.id);
|
|
204
220
|
|
|
205
221
|
// reset selected composition when component changes.
|
|
206
222
|
// this does trigger renderer, but perf seems to be ok
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}, [component]);
|
|
223
|
+
// useEffect(() => {
|
|
224
|
+
// const prevId = selectedRef.current?.identifier;
|
|
225
|
+
// const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];
|
|
226
|
+
|
|
227
|
+
// navigate(next.displayName.toLowerCase().replaceAll(' ', '-'));
|
|
228
|
+
// }, [component]);
|
|
213
229
|
const isMobile = (0, _uiFoundationUiHooks().useIsMobile)();
|
|
214
230
|
const showSidebar = !isMobile && component.compositions.length > 0;
|
|
215
231
|
const [isSidebarOpen, setSidebarOpenness] = (0, _react().useState)(showSidebar);
|
|
216
232
|
const sidebarOpenness = isSidebarOpen ? _baseUiSurfacesSplitPane().Layout.row : _baseUiSurfacesSplitPane().Layout.left;
|
|
217
233
|
const compositionUrl = (0, _previewUi().toPreviewUrl)(component, 'compositions');
|
|
218
234
|
const isScaling = component === null || component === void 0 ? void 0 : (_component$preview = component.preview) === null || _component$preview === void 0 ? void 0 : _component$preview.isScaling;
|
|
219
|
-
const compositionIdentifierParam = isScaling ? `name=${
|
|
235
|
+
const compositionIdentifierParam = isScaling ? `name=${currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.identifier}` : currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.identifier;
|
|
220
236
|
const currentCompositionFullUrl = (0, _previewUi().toPreviewUrl)(component, 'compositions', compositionIdentifierParam);
|
|
221
237
|
const [compositionParams, setCompositionParams] = (0, _react().useState)({});
|
|
222
238
|
const queryParams = (0, _react().useMemo)(() => _queryString().default.stringify(compositionParams), [compositionParams]);
|
|
@@ -244,7 +260,7 @@ function Compositions({
|
|
|
244
260
|
}))), /*#__PURE__*/_react().default.createElement(CompositionContent, {
|
|
245
261
|
emptyState: emptyState,
|
|
246
262
|
component: component,
|
|
247
|
-
selected:
|
|
263
|
+
selected: currentComposition,
|
|
248
264
|
queryParams: queryParams
|
|
249
265
|
})), /*#__PURE__*/_react().default.createElement(_baseUiSurfacesSplitPane2().HoverSplitter, {
|
|
250
266
|
className: _compositionsModule().default.splitter
|
|
@@ -266,10 +282,24 @@ function Compositions({
|
|
|
266
282
|
className: _compositionsModule().default.tabContent
|
|
267
283
|
}, /*#__PURE__*/_react().default.createElement(_compositionsPanel().CompositionsPanel, {
|
|
268
284
|
isScaling: isScaling,
|
|
269
|
-
onSelectComposition:
|
|
285
|
+
onSelectComposition: composition => {
|
|
286
|
+
if (!currentComposition || !location) return;
|
|
287
|
+
if (location.pathname.includes(currentComposition.identifier.toLowerCase())) {
|
|
288
|
+
navigate(composition.identifier.toLowerCase());
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const path = location.pathname.replace(currentComposition.identifier.toLowerCase(), composition.identifier.toLowerCase());
|
|
292
|
+
if (!path) return;
|
|
293
|
+
if (!path.includes(composition.identifier.toLowerCase())) {
|
|
294
|
+
const nextPath = location.pathname.concat(`/${composition.identifier.toLowerCase()}`);
|
|
295
|
+
navigate(nextPath);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
navigate(path);
|
|
299
|
+
},
|
|
270
300
|
url: compositionUrl,
|
|
271
301
|
compositions: component.compositions,
|
|
272
|
-
active:
|
|
302
|
+
active: currentComposition,
|
|
273
303
|
className: _compositionsModule().default.compost
|
|
274
304
|
})), /*#__PURE__*/_react().default.createElement(_panels().TabPanel, {
|
|
275
305
|
className: _compositionsModule().default.tabContent
|
package/dist/compositions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Compositions","menuBarWidgets","emptyState","component","useContext","ComponentContext","selected","selectComposition","useState","head","compositions","selectedRef","useRef","current","properties","useDocs","id","useEffect","prevId","identifier","next","find","c","isMobile","useIsMobile","showSidebar","length","isSidebarOpen","setSidebarOpenness","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","queryParams","useMemo","queryString","stringify","styles","compositionsPage","menuBar","openInNewTab","splitter","e","stopPropagation","x","collapser","right","tabsContainer","tabs","tabContent","compost","CompositionContent","env","environment","EmptyStateTemplate","get","host","noCompositionsPage","title","separator","buildStatus","buildStatusMessage","compositionsIframe"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\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 } 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';\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 [selected, selectComposition] = useState(head(component.compositions));\n const selectedRef = useRef(selected);\n selectedRef.current = selected;\n\n const properties = useDocs(component.id);\n\n // reset selected composition when component changes.\n // this does trigger renderer, but perf seems to be ok\n useEffect(() => {\n const prevId = selectedRef.current?.identifier;\n const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];\n\n selectComposition(next);\n }, [component]);\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 compositionIdentifierParam = isScaling ? `name=${selected?.identifier}` : selected?.identifier;\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});\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 emptyState={emptyState}\n component={component}\n selected={selected}\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 onSelectComposition={selectComposition}\n url={compositionUrl}\n compositions={component.compositions}\n active={selected}\n className={styles.compost}\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};\n\nexport function CompositionContent({ component, selected, queryParams, emptyState }: 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/docs/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 />\n );\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;I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K,EAAC;IAC4D,gBAElE,+BAAC,kBAAS,qBACR,+BAAC,kBAAkB,OAAG,CACZ,CACF,CACR,CACF;EAEV;EAEA,IAAI,CAAAhE,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEiE,WAAW,MAAK,SAAS,IAAI,CAAAjE,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE6D,IAAI,MAAK,qBAAqB,EACnF,oBACE,+BAAC,qCAAiB;IAAC,SAAS,EAAEnB,6BAAM,CAACwB,kBAAmB;IAAC,MAAM,EAAC,YAAY;IAAC,KAAK,EAAC;EAA2B,+BAE1F;EAExB,IAAI,CAAAlE,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEiE,WAAW,MAAK,QAAQ,IAAI,CAAAjE,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE6D,IAAI,MAAK,qBAAqB,EAClF,oBACE,+BAAC,qCAAiB;IAChB,SAAS,EAAEnB,6BAAM,CAACwB,kBAAmB;IACrC,MAAM,EAAC,SAAS;IAChB,KAAK,EAAC;EAAkC,EACrB;;EAGzB;EACA,IAAIlE,SAAS,CAACO,YAAY,CAACgB,MAAM,KAAK,CAAC,EAAE;IACvC,oBACE,+BAAC,oBAAQ;MACP,KAAK,EAAC,+CAA+C;MACrD,QAAQ,EAAC,kCAAkC;MAC3C,IAAI,EAAG;IAA+E,EACtF;EAEN;EAEA,oBACE,+BAAC,0BAAoB;IACnB,SAAS,EAAEmB,6BAAM,CAACyB;IAClB;IAAA;IACA,QAAQ,EAAE,IAAK;IACf,SAAS,EAAEnE,SAAU;IACrB,WAAW,EAAC,MAAM;IAClB,WAAW,EAAEG,QAAS;IACtB,iBAAiB;IACjB,MAAM,EAAE,IAAK;IACb,WAAW,EAAEmC;EAAY,EACzB;AAEN"}
|
|
1
|
+
{"version":3,"names":["Compositions","menuBarWidgets","emptyState","component","useContext","ComponentContext","params","useParams","navigate","useNavigate","location","useLocation","currentCompositionName","currentComposition","compositions","find","composition","identifier","toLowerCase","head","selectedRef","useRef","current","properties","useDocs","id","isMobile","useIsMobile","showSidebar","length","isSidebarOpen","setSidebarOpenness","useState","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","queryParams","useMemo","queryString","stringify","useEffect","styles","compositionsPage","menuBar","openInNewTab","splitter","e","stopPropagation","x","collapser","right","tabsContainer","tabs","tabContent","pathname","includes","path","replace","nextPath","concat","compost","CompositionContent","selected","env","environment","EmptyStateTemplate","get","host","noCompositionsPage","title","separator","buildStatus","buildStatusMessage","compositionsIframe"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\nimport { useParams } 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, 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';\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, setSearchParams] = useSearchParams();\n const params = useParams();\n const navigate = useNavigate();\n const location = useLocation();\n const currentCompositionName = params['*'];\n // console.log(routes);\n const currentComposition =\n component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||\n head(component.compositions);\n // const [selected, selectComposition] = useState(head(component.compositions));\n const selectedRef = useRef(currentComposition);\n selectedRef.current = currentComposition;\n\n const properties = useDocs(component.id);\n\n // reset selected composition when component changes.\n // this does trigger renderer, but perf seems to be ok\n // useEffect(() => {\n // const prevId = selectedRef.current?.identifier;\n // const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];\n\n // navigate(next.displayName.toLowerCase().replaceAll(' ', '-'));\n // }, [component]);\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 compositionIdentifierParam = isScaling\n ? `name=${currentComposition?.identifier}`\n : currentComposition?.identifier;\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});\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 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 onSelectComposition={(composition) => {\n if (!currentComposition || !location) return;\n if (location.pathname.includes(currentComposition.identifier.toLowerCase())) {\n navigate(composition.identifier.toLowerCase());\n return;\n }\n\n const path = location.pathname.replace(\n currentComposition.identifier.toLowerCase(),\n composition.identifier.toLowerCase()\n );\n\n if (!path) return;\n if(!path.includes(composition.identifier.toLowerCase())) {\n const nextPath = location.pathname.concat(`/${composition.identifier.toLowerCase()}`)\n navigate(nextPath)\n return;\n }\n navigate(path);\n }}\n url={compositionUrl}\n compositions={component.compositions}\n active={currentComposition}\n className={styles.compost}\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};\n\nexport function CompositionContent({ component, selected, queryParams, emptyState }: 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/docs/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 />\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EA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AAS,qBACR,+BAAC,kBAAkB,OAAG,CACZ,CACF,CACR,CACF;EAEV;EAEA,IAAI,CAAA5E,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE6E,WAAW,MAAK,SAAS,IAAI,CAAA7E,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEyE,IAAI,MAAK,qBAAqB,EACnF,oBACE,+BAAC,qCAAiB;IAAC,SAAS,EAAE1B,6BAAM,CAAC+B,kBAAmB;IAAC,MAAM,EAAC,YAAY;IAAC,KAAK,EAAC;EAA2B,+BAE1F;EAExB,IAAI,CAAA9E,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE6E,WAAW,MAAK,QAAQ,IAAI,CAAA7E,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEyE,IAAI,MAAK,qBAAqB,EAClF,oBACE,+BAAC,qCAAiB;IAChB,SAAS,EAAE1B,6BAAM,CAAC+B,kBAAmB;IACrC,MAAM,EAAC,SAAS;IAChB,KAAK,EAAC;EAAkC,EACrB;;EAGzB;EACA,IAAI9E,SAAS,CAACW,YAAY,CAACe,MAAM,KAAK,CAAC,EAAE;IACvC,oBACE,+BAAC,oBAAQ;MACP,KAAK,EAAC,+CAA+C;MACrD,QAAQ,EAAC,kCAAkC;MAC3C,IAAI,EAAG;IAA+E,EACtF;EAEN;EAEA,oBACE,+BAAC,0BAAoB;IACnB,SAAS,EAAEqB,6BAAM,CAACgC;IAClB;IAAA;IACA,QAAQ,EAAE,IAAK;IACf,SAAS,EAAE/E,SAAU;IACrB,WAAW,EAAC,MAAM;IAClB,WAAW,EAAEoE,QAAS;IACtB,iBAAiB;IACjB,MAAM,EAAE,IAAK;IACb,WAAW,EAAE1B;EAAY,EACzB;AAEN"}
|
|
@@ -105,10 +105,7 @@ class CompositionsUI {
|
|
|
105
105
|
const compositionCompare = new (_compositionsUi().CompositionCompareSection)(compositions);
|
|
106
106
|
component.registerRoute(section.route);
|
|
107
107
|
component.registerNavigation(section.navigationLink, section.order);
|
|
108
|
-
componentCompare.registerNavigation(
|
|
109
|
-
props: compositionCompare.navigationLink,
|
|
110
|
-
order: compositionCompare.navigationLink.order
|
|
111
|
-
});
|
|
108
|
+
componentCompare.registerNavigation(compositionCompare);
|
|
112
109
|
componentCompare.registerRoutes([compositionCompare.route]);
|
|
113
110
|
return compositions;
|
|
114
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CompositionsUI","constructor","menuBarWidgetSlot","emptyStateSlot","registerEmptyState","emptyStateComponent","register","registerMenuWidget","widget","provider","component","componentCompare","config","compositionMenuSlot","compositions","section","CompositionsSection","compositionCompare","CompositionCompareSection","registerRoute","route","registerNavigation","navigationLink","order","
|
|
1
|
+
{"version":3,"names":["CompositionsUI","constructor","menuBarWidgetSlot","emptyStateSlot","registerEmptyState","emptyStateComponent","register","registerMenuWidget","widget","provider","component","componentCompare","config","compositionMenuSlot","compositions","section","CompositionsSection","compositionCompare","CompositionCompareSection","registerRoute","route","registerNavigation","navigationLink","order","registerRoutes","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CompositionsAspect","addRuntime"],"sources":["compositions.ui.runtime.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport React, { ComponentType } from 'react';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CompositionCompareSection } from '@teambit/compositions.ui.composition-compare-section';\nimport { CompositionCompare } from '@teambit/compositions.ui.composition-compare';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CompositionsSection } from './composition.section';\nimport { CompositionsAspect } from './compositions.aspect';\nimport { MenuBarWidget } from './compositions';\n\nexport type CompositionsMenuSlot = SlotRegistry<MenuBarWidget[]>;\nexport type EmptyStateSlot = SlotRegistry<ComponentType>;\n\nexport class CompositionsUI {\n constructor(private menuBarWidgetSlot: CompositionsMenuSlot, private emptyStateSlot: EmptyStateSlot) {}\n /**\n * register a new tester empty state. this allows to register a different empty state from each environment for example.\n */\n registerEmptyState(emptyStateComponent: ComponentType) {\n this.emptyStateSlot.register(emptyStateComponent);\n return this;\n }\n\n registerMenuWidget(...widget: MenuBarWidget[]) {\n this.menuBarWidgetSlot.register(widget);\n }\n\n getCompositionsCompare = () => {\n return <CompositionCompare emptyState={this.emptyStateSlot} />;\n };\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n static runtime = UIRuntime;\n static slots = [Slot.withType<ReactNode>(), Slot.withType<ComponentType>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n config: {},\n [compositionMenuSlot, emptyStateSlot]: [CompositionsMenuSlot, EmptyStateSlot]\n ) {\n const compositions = new CompositionsUI(compositionMenuSlot, emptyStateSlot);\n const section = new CompositionsSection(\n compositions,\n { menuBarWidgetSlot: compositions.menuBarWidgetSlot },\n emptyStateSlot\n );\n const compositionCompare = new CompositionCompareSection(compositions);\n component.registerRoute(section.route);\n component.registerNavigation(section.navigationLink, section.order);\n componentCompare.registerNavigation(compositionCompare);\n componentCompare.registerRoutes([compositionCompare.route]);\n return compositions;\n }\n}\n\nexport default CompositionsUI;\n\nCompositionsAspect.addRuntime(CompositionsUI);\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMO,MAAMA,cAAc,CAAC;EAC1BC,WAAW,CAASC,iBAAuC,EAAUC,cAA8B,EAA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f3B,cAAc,WAoBV,CAAC4B,eAAI,CAACC,QAAQ,EAAa,EAAED,eAAI,CAACC,QAAQ,EAAiB,CAAC;AAAA,eAsB9D7B,cAAc;AAAA;AAE7B8B,kCAAkB,CAACC,UAAU,CAAC/B,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.952/dist/compositions.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.952/dist/compositions.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/compositions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.952",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/compositions/compositions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.compositions",
|
|
8
8
|
"name": "compositions",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.952"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@teambit/documenter.ui.heading": "4.1.1",
|
|
26
26
|
"@teambit/documenter.ui.property-table": "4.1.3",
|
|
27
27
|
"@teambit/evangelist.elements.icon": "1.0.2",
|
|
28
|
-
"@teambit/component": "0.0.
|
|
28
|
+
"@teambit/component": "0.0.952",
|
|
29
29
|
"@teambit/compositions.model.composition-id": "0.0.496",
|
|
30
|
-
"@teambit/graphql": "0.0.
|
|
31
|
-
"@teambit/cli": "0.0.
|
|
32
|
-
"@teambit/dev-files": "0.0.
|
|
33
|
-
"@teambit/envs": "0.0.
|
|
34
|
-
"@teambit/preview": "0.0.
|
|
35
|
-
"@teambit/schema": "0.0.
|
|
30
|
+
"@teambit/graphql": "0.0.952",
|
|
31
|
+
"@teambit/cli": "0.0.638",
|
|
32
|
+
"@teambit/dev-files": "0.0.952",
|
|
33
|
+
"@teambit/envs": "0.0.952",
|
|
34
|
+
"@teambit/preview": "0.0.952",
|
|
35
|
+
"@teambit/schema": "0.0.952",
|
|
36
36
|
"@teambit/toolbox.path.match-patterns": "0.0.9",
|
|
37
|
-
"@teambit/workspace": "0.0.
|
|
37
|
+
"@teambit/workspace": "0.0.952",
|
|
38
38
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.498",
|
|
39
39
|
"@teambit/component-id": "0.0.425",
|
|
40
40
|
"@teambit/compositions.ui.compositions-menu-bar": "0.0.172",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"@teambit/design.ui.surfaces.status-message-card": "0.0.17",
|
|
45
45
|
"@teambit/docs.ui.queries.get-docs": "0.0.498",
|
|
46
46
|
"@teambit/mdx.ui.mdx-layout": "0.0.512",
|
|
47
|
-
"@teambit/panels": "0.0.
|
|
48
|
-
"@teambit/preview.ui.component-preview": "0.0.
|
|
47
|
+
"@teambit/panels": "0.0.639",
|
|
48
|
+
"@teambit/preview.ui.component-preview": "0.0.510",
|
|
49
49
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.206",
|
|
50
50
|
"@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.188",
|
|
51
|
-
"@teambit/component-compare": "0.0.
|
|
52
|
-
"@teambit/compositions.ui.composition-compare-section": "0.0.
|
|
53
|
-
"@teambit/compositions.ui.composition-compare": "0.0.
|
|
54
|
-
"@teambit/ui": "0.0.
|
|
51
|
+
"@teambit/component-compare": "0.0.200",
|
|
52
|
+
"@teambit/compositions.ui.composition-compare-section": "0.0.2",
|
|
53
|
+
"@teambit/compositions.ui.composition-compare": "0.0.141",
|
|
54
|
+
"@teambit/ui": "0.0.952"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/react": "^17.0.8",
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
"@teambit/compositions.aspect-docs.compositions": "0.0.150"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"
|
|
68
|
+
"react-router-dom": "^6.0.0",
|
|
69
|
+
"@teambit/legacy": "1.0.419",
|
|
69
70
|
"react": "^16.8.0 || ^17.0.0",
|
|
70
71
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
71
72
|
},
|
|
Binary file
|