@ohos-ports/teambit-api-reference 0.0.0-stage → 1.0.1264-beta.0
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/api-compare.module.scss +8 -0
- package/api-compare.section.tsx +33 -0
- package/api-compare.tsx +84 -0
- package/api-reference.ui.runtime.tsx +102 -0
- package/dist/api-compare.d.ts +13 -0
- package/dist/api-compare.js +98 -0
- package/dist/api-compare.js.map +1 -0
- package/dist/api-compare.module.scss +8 -0
- package/dist/api-compare.section.d.ts +23 -0
- package/dist/api-compare.section.js +50 -0
- package/dist/api-compare.section.js.map +1 -0
- package/dist/api-reference.aspect.d.ts +3 -0
- package/dist/api-reference.aspect.js +19 -0
- package/dist/api-reference.aspect.js.map +1 -0
- package/dist/api-reference.ui.runtime.d.ts +33 -0
- package/dist/api-reference.ui.runtime.js +189 -0
- package/dist/api-reference.ui.runtime.js.map +1 -0
- package/dist/default-node-renderers.d.ts +6 -0
- package/dist/default-node-renderers.js +132 -0
- package/dist/default-node-renderers.js.map +1 -0
- package/dist/esm.mjs +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1793216382803.js +7 -0
- package/esm.mjs +7 -0
- package/package.json +128 -4
- package/patches/@teambit__api-reference.models.api-node-renderer@0.0.55.patch +13 -0
- package/patches/@teambit__api-reference.overview.renderers.grouped-schema-nodes-overview-summary@0.0.79.patch +13 -0
- package/patches/@teambit__api-reference.renderers.api-node-details@0.0.0-e1c2f07a871dea42601d34ca5302f456e1f7e2bd.patch +13 -0
- package/patches/@teambit__api-reference.renderers.api-node-details@0.0.89.patch +13 -0
- package/patches/@teambit__api-reference.renderers.class@0.0.92.patch +13 -0
- package/patches/@teambit__api-reference.renderers.decorator@0.0.46.patch +12 -0
- package/patches/@teambit__api-reference.renderers.function@0.0.93.patch +13 -0
- package/patches/@teambit__api-reference.renderers.grouped-schema-nodes-summary@0.0.88.patch +13 -0
- package/patches/@teambit__api-reference.renderers.inference-type@0.0.68.patch +12 -0
- package/patches/@teambit__api-reference.renderers.parameter@0.0.74.patch +13 -0
- package/patches/@teambit__api-reference.renderers.schema-node-member-summary@0.0.0-c23b933f1924d438c3df2482134e80c3364441b8.patch +39 -0
- package/patches/@teambit__api-reference.renderers.schema-node-member-summary@0.0.88.patch +39 -0
- package/patches/@teambit__api-reference.renderers.schema-nodes-index@0.0.0-307cb8a493f9a8f2646075f4f3f694170b80f926.patch +13 -0
- package/patches/@teambit__api-reference.renderers.tuple-type@0.0.36.patch +12 -0
- package/patches/@teambit__api-reference.renderers.type-array@0.0.57.patch +12 -0
- package/patches/@teambit__api-reference.renderers.type-intersection@0.0.57.patch +13 -0
- package/patches/@teambit__api-reference.renderers.type-ref@0.0.105.patch +13 -0
- package/patches/@teambit__api-reference.renderers.type-union@0.0.57.patch +13 -0
- package/patches/@teambit__base-ui.layout.grid-component@1.0.2.patch +26 -0
- package/patches/@teambit__base-ui.routing.compare-url@1.0.2.patch +19 -0
- package/patches/@teambit__base-ui.theme.dark-theme@1.0.2.patch +26 -0
- package/patches/@teambit__code.ui.diff-viewer@0.0.6.patch +13 -0
- package/patches/@teambit__design.ui.surfaces.menu.item@0.0.354.patch +13 -0
- package/patches/@teambit__design.ui.tooltip@0.0.383.patch +19 -0
- package/patches/@teambit__docs.ui.hooks.use-element-on-fold@1.96.5.patch +45 -0
- package/patches/@teambit__documenter.ui.heading@4.1.8.patch +35 -0
- package/patches/@teambit__documenter.ui.table-column@4.0.4.patch +21 -0
- package/patches/@teambit__documenter.ui.table-heading-column@4.0.8.patch +21 -0
- package/patches/@teambit__documenter.ui.table-heading-row@4.0.11.patch +22 -0
- package/patches/@teambit__documenter.ui.table-row@4.1.17.patch +26 -0
- package/patches/@teambit__ui-foundation.ui.react-router.use-query@0.0.505.patch +9 -0
- package/patches/react-syntax-highlighter@15.6.6.patch +6064 -0
- package/patches/use-debounce@7.0.1.patch +33 -0
- package/types/asset.d.ts +41 -0
- package/types/style.d.ts +46 -0
- package/README.md +0 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Section } from '@teambit/component';
|
|
3
|
+
import type { TabItem } from '@teambit/component.ui.component-compare.models.component-compare-props';
|
|
4
|
+
import type { ChangeType } from '@teambit/component.ui.component-compare.models.component-compare-change-type';
|
|
5
|
+
import type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';
|
|
6
|
+
import { APICompare } from './api-compare';
|
|
7
|
+
|
|
8
|
+
// Use string cast since the external ChangeType enum doesn't have API yet
|
|
9
|
+
const ChangeTypeAPI = 'API' as unknown as ChangeType;
|
|
10
|
+
|
|
11
|
+
export class APICompareSection implements TabItem, Section {
|
|
12
|
+
route: { path: string; element: React.ReactNode };
|
|
13
|
+
|
|
14
|
+
constructor(getInsights?: () => ApiDiffInsight[]) {
|
|
15
|
+
// built in the constructor (not a field initializer) so the element captures the
|
|
16
|
+
// getter regardless of class-field initialization order.
|
|
17
|
+
this.route = {
|
|
18
|
+
path: 'api/*',
|
|
19
|
+
element: <APICompare getInsights={getInsights} />,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
navigationLink = {
|
|
24
|
+
href: 'api',
|
|
25
|
+
children: 'API',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
props = this.navigationLink;
|
|
29
|
+
|
|
30
|
+
order = 15;
|
|
31
|
+
changeType = ChangeTypeAPI;
|
|
32
|
+
id = 'api';
|
|
33
|
+
}
|
package/api-compare.tsx
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useComponentCompare } from '@teambit/component.ui.component-compare.context';
|
|
3
|
+
import {
|
|
4
|
+
ComponentApiDiffSection,
|
|
5
|
+
ApiDiffSlimRow,
|
|
6
|
+
ApiDiffInsightProvider,
|
|
7
|
+
useApiDiff,
|
|
8
|
+
} from '@teambit/semantics.ui.api-diff-view';
|
|
9
|
+
import type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';
|
|
10
|
+
import styles from './api-compare.module.scss';
|
|
11
|
+
|
|
12
|
+
// single source of truth for the API diff model lives in api-diff-view.
|
|
13
|
+
export type { APIDiffResult, APIDiffChange, APIDiffDetail } from '@teambit/semantics.ui.api-diff-view';
|
|
14
|
+
|
|
15
|
+
export type APICompareProps = {
|
|
16
|
+
/** resolved lazily at render time — slot registrations can land after the section is constructed */
|
|
17
|
+
getInsights?: () => ApiDiffInsight[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* the API tab of the single-component compare page. thin host around the same
|
|
22
|
+
* `ComponentApiDiffSection` the lane-compare API view uses — one implementation, two hosts.
|
|
23
|
+
* data comes from the compare context (fetched once by ComponentCompare).
|
|
24
|
+
*/
|
|
25
|
+
export function APICompare({ getInsights }: APICompareProps) {
|
|
26
|
+
const compareContext = useComponentCompare();
|
|
27
|
+
const baseModel = compareContext?.base?.model;
|
|
28
|
+
const compareModel = compareContext?.compare?.model;
|
|
29
|
+
|
|
30
|
+
// Prefer a diff already on the context — the legacy `ComponentCompare` fetches it once and sets
|
|
31
|
+
// it there. The redesign single-component page does NOT put it on its inline context, so we fetch
|
|
32
|
+
// on our own. This hook is only mounted when the API view is the active tab (the page renders the
|
|
33
|
+
// element on-demand), so lane-compare — which renders one panel per component and never mounts
|
|
34
|
+
// this tab — pays nothing.
|
|
35
|
+
const contextApiDiff = compareContext?.apiDiffResult;
|
|
36
|
+
const shouldSelfFetch = contextApiDiff === undefined;
|
|
37
|
+
const { result: fetchedApiDiff } = useApiDiff(baseModel?.id.toString(), compareModel?.id.toString(), {
|
|
38
|
+
skip: !shouldSelfFetch,
|
|
39
|
+
});
|
|
40
|
+
const apiDiffResult = shouldSelfFetch ? fetchedApiDiff : contextApiDiff;
|
|
41
|
+
|
|
42
|
+
// memoized so the insights context value keeps a stable identity — otherwise a fresh array every
|
|
43
|
+
// render would re-render every `useApiDiffInsights` consumer (incl. the React.memo'd ApiChangeBlock).
|
|
44
|
+
const insights = React.useMemo(() => getInsights?.(), [getInsights]);
|
|
45
|
+
|
|
46
|
+
if (!compareContext) return null;
|
|
47
|
+
|
|
48
|
+
const id = (compareModel || baseModel)?.id;
|
|
49
|
+
if (!id) return null;
|
|
50
|
+
|
|
51
|
+
const componentIdStr = id.toStringWithoutVersion();
|
|
52
|
+
const baseVersion = baseModel?.id.version;
|
|
53
|
+
const compareVersion = compareModel?.id.version;
|
|
54
|
+
|
|
55
|
+
// no base (first version) or identical versions — nothing to diff, not a failure.
|
|
56
|
+
const nothingToCompare = apiDiffResult === null && (!baseVersion || baseVersion === compareVersion);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<ApiDiffInsightProvider insights={insights}>
|
|
60
|
+
<div className={styles.apiCompareContainer}>
|
|
61
|
+
{nothingToCompare ? (
|
|
62
|
+
<ApiDiffSlimRow
|
|
63
|
+
componentIdStr={componentIdStr}
|
|
64
|
+
displayName={id.fullName}
|
|
65
|
+
chip="nothing to compare"
|
|
66
|
+
detail={baseVersion ? 'both sides are the same version' : 'no base version to compare against'}
|
|
67
|
+
tone="ok"
|
|
68
|
+
/>
|
|
69
|
+
) : (
|
|
70
|
+
<ComponentApiDiffSection
|
|
71
|
+
componentIdStr={componentIdStr}
|
|
72
|
+
displayName={id.fullName}
|
|
73
|
+
baseId={baseModel?.id.toString()}
|
|
74
|
+
compareId={compareModel?.id.toString()}
|
|
75
|
+
baseVersion={baseVersion}
|
|
76
|
+
compareVersion={compareVersion}
|
|
77
|
+
result={apiDiffResult}
|
|
78
|
+
loading={apiDiffResult === undefined}
|
|
79
|
+
/>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
</ApiDiffInsightProvider>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { flatten } from 'lodash';
|
|
3
|
+
import type { ComponentUI } from '@teambit/component';
|
|
4
|
+
import { ComponentAspect } from '@teambit/component';
|
|
5
|
+
import { UIRuntime } from '@teambit/harmony.modules.runtimes';
|
|
6
|
+
import { APIRefPage } from '@teambit/api-reference.sections.api-reference-page';
|
|
7
|
+
import { APIRefSection } from '@teambit/api-reference.sections.api-reference-section';
|
|
8
|
+
import type { Harmony, SlotRegistry } from '@teambit/harmony';
|
|
9
|
+
import { Slot } from '@teambit/harmony';
|
|
10
|
+
import type { APINodeRenderer } from '@teambit/api-reference.models.api-node-renderer';
|
|
11
|
+
import { defaultNodeRenderers } from './default-node-renderers';
|
|
12
|
+
import { APIRefRenderersProvider } from '@teambit/api-reference.hooks.use-api-renderers';
|
|
13
|
+
import type { SchemaNodeConstructor } from '@teambit/semantics.entities.semantic-schema';
|
|
14
|
+
import { SchemaRegistry, Schemas } from '@teambit/semantics.entities.semantic-schema';
|
|
15
|
+
import type { CodeUI } from '@teambit/code';
|
|
16
|
+
import { CodeAspect } from '@teambit/code';
|
|
17
|
+
import { TaggedExports } from '@teambit/tagged-exports';
|
|
18
|
+
import type { WorkspaceUI } from '@teambit/workspace';
|
|
19
|
+
import { WorkspaceAspect } from '@teambit/workspace';
|
|
20
|
+
import type { ComponentCompareUI } from '@teambit/component-compare';
|
|
21
|
+
import { ComponentCompareAspect } from '@teambit/component-compare';
|
|
22
|
+
|
|
23
|
+
import { APIReferenceAspect } from './api-reference.aspect';
|
|
24
|
+
import { APICompareSection } from './api-compare.section';
|
|
25
|
+
|
|
26
|
+
export type APINodeRendererSlot = SlotRegistry<APINodeRenderer[]>;
|
|
27
|
+
export class APIReferenceUI {
|
|
28
|
+
constructor(
|
|
29
|
+
private host: string,
|
|
30
|
+
private apiNodeRendererSlot: APINodeRendererSlot,
|
|
31
|
+
private code: CodeUI,
|
|
32
|
+
private workspace: WorkspaceUI
|
|
33
|
+
) {}
|
|
34
|
+
|
|
35
|
+
static dependencies = [ComponentAspect, CodeAspect, WorkspaceAspect, ComponentCompareAspect];
|
|
36
|
+
static runtime = UIRuntime;
|
|
37
|
+
static slots = [Slot.withType<APINodeRenderer[]>()];
|
|
38
|
+
|
|
39
|
+
getAPIPage() {
|
|
40
|
+
const EditorProvider = this.code.getCodeEditorProvider();
|
|
41
|
+
return (
|
|
42
|
+
<EditorProvider>
|
|
43
|
+
<APIRefPage host={this.host} rendererSlot={this.apiNodeRendererSlot} />
|
|
44
|
+
</EditorProvider>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
TaggedAPIPage = ({ componentId }: { componentId: string }) => {
|
|
49
|
+
return (
|
|
50
|
+
<APIRefRenderersProvider nodeRenderers={flatten(this.apiNodeRendererSlot.values())}>
|
|
51
|
+
<TaggedExports componentId={componentId} showBanner={Boolean(this.workspace)} />
|
|
52
|
+
</APIRefRenderersProvider>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated use registerSchemaClasses instead
|
|
58
|
+
* registerSchemaClasses is better for performance as it lazy-loads the schemas.
|
|
59
|
+
*/
|
|
60
|
+
registerSchemaClass(schema: SchemaNodeConstructor) {
|
|
61
|
+
SchemaRegistry.register(schema);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
registerSchemaClasses(getSchemas: () => SchemaNodeConstructor[]) {
|
|
65
|
+
SchemaRegistry.registerGetSchemas(getSchemas);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
registerAPINodeRenderer(apiNodeRenderers: APINodeRenderer[]) {
|
|
69
|
+
this.apiNodeRendererSlot.register(apiNodeRenderers);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
apiNodeRenderers: APINodeRenderer[] = defaultNodeRenderers;
|
|
73
|
+
|
|
74
|
+
static async provider(
|
|
75
|
+
[componentUI, codeUI, workspaceUI, componentCompareUI]: [ComponentUI, CodeUI, WorkspaceUI, ComponentCompareUI],
|
|
76
|
+
_,
|
|
77
|
+
[apiNodeRendererSlot]: [APINodeRendererSlot],
|
|
78
|
+
harmony: Harmony
|
|
79
|
+
) {
|
|
80
|
+
const { config } = harmony;
|
|
81
|
+
const host = String(config.get('teambit.harmony/bit'));
|
|
82
|
+
const apiReferenceUI = new APIReferenceUI(host, apiNodeRendererSlot, codeUI, workspaceUI);
|
|
83
|
+
apiReferenceUI.registerAPINodeRenderer(apiReferenceUI.apiNodeRenderers);
|
|
84
|
+
const apiReferenceSection = new APIRefSection(apiReferenceUI);
|
|
85
|
+
componentUI.registerNavigation(apiReferenceSection.navigationLink, apiReferenceSection.order);
|
|
86
|
+
componentUI.registerRoute(apiReferenceSection.route);
|
|
87
|
+
// register all default schema classes
|
|
88
|
+
apiReferenceUI.registerSchemaClasses(() => Object.values(Schemas));
|
|
89
|
+
|
|
90
|
+
// register API compare tab in component compare. insights are resolved lazily —
|
|
91
|
+
// aspects can register them on componentCompareUI after this provider runs.
|
|
92
|
+
const apiCompareSection = new APICompareSection(() => componentCompareUI.getApiDiffInsights());
|
|
93
|
+
componentCompareUI.registerNavigation(apiCompareSection);
|
|
94
|
+
componentCompareUI.registerRoutes([apiCompareSection.route]);
|
|
95
|
+
|
|
96
|
+
return apiReferenceUI;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export default APIReferenceUI;
|
|
101
|
+
|
|
102
|
+
APIReferenceAspect.addRuntime(APIReferenceUI);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';
|
|
3
|
+
export type { APIDiffResult, APIDiffChange, APIDiffDetail } from '@teambit/semantics.ui.api-diff-view';
|
|
4
|
+
export type APICompareProps = {
|
|
5
|
+
/** resolved lazily at render time — slot registrations can land after the section is constructed */
|
|
6
|
+
getInsights?: () => ApiDiffInsight[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* the API tab of the single-component compare page. thin host around the same
|
|
10
|
+
* `ComponentApiDiffSection` the lane-compare API view uses — one implementation, two hosts.
|
|
11
|
+
* data comes from the compare context (fetched once by ComponentCompare).
|
|
12
|
+
*/
|
|
13
|
+
export declare function APICompare({ getInsights }: APICompareProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.APICompare = APICompare;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
|
+
_react = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _componentUiComponentCompare() {
|
|
15
|
+
const data = require("@teambit/component.ui.component-compare.context");
|
|
16
|
+
_componentUiComponentCompare = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _semanticsUi() {
|
|
22
|
+
const data = require("@teambit/semantics.ui.api-diff-view");
|
|
23
|
+
_semanticsUi = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _apiCompareModule() {
|
|
29
|
+
const data = _interopRequireDefault(require("./api-compare.module.scss"));
|
|
30
|
+
_apiCompareModule = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
36
|
+
// single source of truth for the API diff model lives in api-diff-view.
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* the API tab of the single-component compare page. thin host around the same
|
|
40
|
+
* `ComponentApiDiffSection` the lane-compare API view uses — one implementation, two hosts.
|
|
41
|
+
* data comes from the compare context (fetched once by ComponentCompare).
|
|
42
|
+
*/
|
|
43
|
+
function APICompare({
|
|
44
|
+
getInsights
|
|
45
|
+
}) {
|
|
46
|
+
const compareContext = (0, _componentUiComponentCompare().useComponentCompare)();
|
|
47
|
+
const baseModel = compareContext?.base?.model;
|
|
48
|
+
const compareModel = compareContext?.compare?.model;
|
|
49
|
+
|
|
50
|
+
// Prefer a diff already on the context — the legacy `ComponentCompare` fetches it once and sets
|
|
51
|
+
// it there. The redesign single-component page does NOT put it on its inline context, so we fetch
|
|
52
|
+
// on our own. This hook is only mounted when the API view is the active tab (the page renders the
|
|
53
|
+
// element on-demand), so lane-compare — which renders one panel per component and never mounts
|
|
54
|
+
// this tab — pays nothing.
|
|
55
|
+
const contextApiDiff = compareContext?.apiDiffResult;
|
|
56
|
+
const shouldSelfFetch = contextApiDiff === undefined;
|
|
57
|
+
const {
|
|
58
|
+
result: fetchedApiDiff
|
|
59
|
+
} = (0, _semanticsUi().useApiDiff)(baseModel?.id.toString(), compareModel?.id.toString(), {
|
|
60
|
+
skip: !shouldSelfFetch
|
|
61
|
+
});
|
|
62
|
+
const apiDiffResult = shouldSelfFetch ? fetchedApiDiff : contextApiDiff;
|
|
63
|
+
|
|
64
|
+
// memoized so the insights context value keeps a stable identity — otherwise a fresh array every
|
|
65
|
+
// render would re-render every `useApiDiffInsights` consumer (incl. the React.memo'd ApiChangeBlock).
|
|
66
|
+
const insights = _react().default.useMemo(() => getInsights?.(), [getInsights]);
|
|
67
|
+
if (!compareContext) return null;
|
|
68
|
+
const id = (compareModel || baseModel)?.id;
|
|
69
|
+
if (!id) return null;
|
|
70
|
+
const componentIdStr = id.toStringWithoutVersion();
|
|
71
|
+
const baseVersion = baseModel?.id.version;
|
|
72
|
+
const compareVersion = compareModel?.id.version;
|
|
73
|
+
|
|
74
|
+
// no base (first version) or identical versions — nothing to diff, not a failure.
|
|
75
|
+
const nothingToCompare = apiDiffResult === null && (!baseVersion || baseVersion === compareVersion);
|
|
76
|
+
return /*#__PURE__*/_react().default.createElement(_semanticsUi().ApiDiffInsightProvider, {
|
|
77
|
+
insights: insights
|
|
78
|
+
}, /*#__PURE__*/_react().default.createElement("div", {
|
|
79
|
+
className: _apiCompareModule().default.apiCompareContainer
|
|
80
|
+
}, nothingToCompare ? /*#__PURE__*/_react().default.createElement(_semanticsUi().ApiDiffSlimRow, {
|
|
81
|
+
componentIdStr: componentIdStr,
|
|
82
|
+
displayName: id.fullName,
|
|
83
|
+
chip: "nothing to compare",
|
|
84
|
+
detail: baseVersion ? 'both sides are the same version' : 'no base version to compare against',
|
|
85
|
+
tone: "ok"
|
|
86
|
+
}) : /*#__PURE__*/_react().default.createElement(_semanticsUi().ComponentApiDiffSection, {
|
|
87
|
+
componentIdStr: componentIdStr,
|
|
88
|
+
displayName: id.fullName,
|
|
89
|
+
baseId: baseModel?.id.toString(),
|
|
90
|
+
compareId: compareModel?.id.toString(),
|
|
91
|
+
baseVersion: baseVersion,
|
|
92
|
+
compareVersion: compareVersion,
|
|
93
|
+
result: apiDiffResult,
|
|
94
|
+
loading: apiDiffResult === undefined
|
|
95
|
+
})));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=api-compare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_componentUiComponentCompare","_semanticsUi","_apiCompareModule","e","__esModule","default","APICompare","getInsights","compareContext","useComponentCompare","baseModel","base","model","compareModel","compare","contextApiDiff","apiDiffResult","shouldSelfFetch","undefined","result","fetchedApiDiff","useApiDiff","id","toString","skip","insights","React","useMemo","componentIdStr","toStringWithoutVersion","baseVersion","version","compareVersion","nothingToCompare","createElement","ApiDiffInsightProvider","className","styles","apiCompareContainer","ApiDiffSlimRow","displayName","fullName","chip","detail","tone","ComponentApiDiffSection","baseId","compareId","loading"],"sources":["api-compare.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentCompare } from '@teambit/component.ui.component-compare.context';\nimport {\n ComponentApiDiffSection,\n ApiDiffSlimRow,\n ApiDiffInsightProvider,\n useApiDiff,\n} from '@teambit/semantics.ui.api-diff-view';\nimport type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';\nimport styles from './api-compare.module.scss';\n\n// single source of truth for the API diff model lives in api-diff-view.\nexport type { APIDiffResult, APIDiffChange, APIDiffDetail } from '@teambit/semantics.ui.api-diff-view';\n\nexport type APICompareProps = {\n /** resolved lazily at render time — slot registrations can land after the section is constructed */\n getInsights?: () => ApiDiffInsight[];\n};\n\n/**\n * the API tab of the single-component compare page. thin host around the same\n * `ComponentApiDiffSection` the lane-compare API view uses — one implementation, two hosts.\n * data comes from the compare context (fetched once by ComponentCompare).\n */\nexport function APICompare({ getInsights }: APICompareProps) {\n const compareContext = useComponentCompare();\n const baseModel = compareContext?.base?.model;\n const compareModel = compareContext?.compare?.model;\n\n // Prefer a diff already on the context — the legacy `ComponentCompare` fetches it once and sets\n // it there. The redesign single-component page does NOT put it on its inline context, so we fetch\n // on our own. This hook is only mounted when the API view is the active tab (the page renders the\n // element on-demand), so lane-compare — which renders one panel per component and never mounts\n // this tab — pays nothing.\n const contextApiDiff = compareContext?.apiDiffResult;\n const shouldSelfFetch = contextApiDiff === undefined;\n const { result: fetchedApiDiff } = useApiDiff(baseModel?.id.toString(), compareModel?.id.toString(), {\n skip: !shouldSelfFetch,\n });\n const apiDiffResult = shouldSelfFetch ? fetchedApiDiff : contextApiDiff;\n\n // memoized so the insights context value keeps a stable identity — otherwise a fresh array every\n // render would re-render every `useApiDiffInsights` consumer (incl. the React.memo'd ApiChangeBlock).\n const insights = React.useMemo(() => getInsights?.(), [getInsights]);\n\n if (!compareContext) return null;\n\n const id = (compareModel || baseModel)?.id;\n if (!id) return null;\n\n const componentIdStr = id.toStringWithoutVersion();\n const baseVersion = baseModel?.id.version;\n const compareVersion = compareModel?.id.version;\n\n // no base (first version) or identical versions — nothing to diff, not a failure.\n const nothingToCompare = apiDiffResult === null && (!baseVersion || baseVersion === compareVersion);\n\n return (\n <ApiDiffInsightProvider insights={insights}>\n <div className={styles.apiCompareContainer}>\n {nothingToCompare ? (\n <ApiDiffSlimRow\n componentIdStr={componentIdStr}\n displayName={id.fullName}\n chip=\"nothing to compare\"\n detail={baseVersion ? 'both sides are the same version' : 'no base version to compare against'}\n tone=\"ok\"\n />\n ) : (\n <ComponentApiDiffSection\n componentIdStr={componentIdStr}\n displayName={id.fullName}\n baseId={baseModel?.id.toString()}\n compareId={compareModel?.id.toString()}\n baseVersion={baseVersion}\n compareVersion={compareVersion}\n result={apiDiffResult}\n loading={apiDiffResult === undefined}\n />\n )}\n </div>\n </ApiDiffInsightProvider>\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Section } from '@teambit/component';
|
|
3
|
+
import type { TabItem } from '@teambit/component.ui.component-compare.models.component-compare-props';
|
|
4
|
+
import type { ChangeType } from '@teambit/component.ui.component-compare.models.component-compare-change-type';
|
|
5
|
+
import type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';
|
|
6
|
+
export declare class APICompareSection implements TabItem, Section {
|
|
7
|
+
route: {
|
|
8
|
+
path: string;
|
|
9
|
+
element: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
constructor(getInsights?: () => ApiDiffInsight[]);
|
|
12
|
+
navigationLink: {
|
|
13
|
+
href: string;
|
|
14
|
+
children: string;
|
|
15
|
+
};
|
|
16
|
+
props: {
|
|
17
|
+
href: string;
|
|
18
|
+
children: string;
|
|
19
|
+
};
|
|
20
|
+
order: number;
|
|
21
|
+
changeType: ChangeType;
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.APICompareSection = void 0;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
|
+
_react = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _apiCompare() {
|
|
15
|
+
const data = require("./api-compare");
|
|
16
|
+
_apiCompare = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
|
+
// Use string cast since the external ChangeType enum doesn't have API yet
|
|
26
|
+
const ChangeTypeAPI = 'API';
|
|
27
|
+
class APICompareSection {
|
|
28
|
+
constructor(getInsights) {
|
|
29
|
+
_defineProperty(this, "route", void 0);
|
|
30
|
+
_defineProperty(this, "navigationLink", {
|
|
31
|
+
href: 'api',
|
|
32
|
+
children: 'API'
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "props", this.navigationLink);
|
|
35
|
+
_defineProperty(this, "order", 15);
|
|
36
|
+
_defineProperty(this, "changeType", ChangeTypeAPI);
|
|
37
|
+
_defineProperty(this, "id", 'api');
|
|
38
|
+
// built in the constructor (not a field initializer) so the element captures the
|
|
39
|
+
// getter regardless of class-field initialization order.
|
|
40
|
+
this.route = {
|
|
41
|
+
path: 'api/*',
|
|
42
|
+
element: /*#__PURE__*/_react().default.createElement(_apiCompare().APICompare, {
|
|
43
|
+
getInsights: getInsights
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.APICompareSection = APICompareSection;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=api-compare.section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_apiCompare","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ChangeTypeAPI","APICompareSection","constructor","getInsights","href","children","navigationLink","route","path","element","createElement","APICompare","exports"],"sources":["api-compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport type { Section } from '@teambit/component';\nimport type { TabItem } from '@teambit/component.ui.component-compare.models.component-compare-props';\nimport type { ChangeType } from '@teambit/component.ui.component-compare.models.component-compare-change-type';\nimport type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';\nimport { APICompare } from './api-compare';\n\n// Use string cast since the external ChangeType enum doesn't have API yet\nconst ChangeTypeAPI = 'API' as unknown as ChangeType;\n\nexport class APICompareSection implements TabItem, Section {\n route: { path: string; element: React.ReactNode };\n\n constructor(getInsights?: () => ApiDiffInsight[]) {\n // built in the constructor (not a field initializer) so the element captures the\n // getter regardless of class-field initialization order.\n this.route = {\n path: 'api/*',\n element: <APICompare getInsights={getInsights} />,\n };\n }\n\n navigationLink = {\n href: 'api',\n children: 'API',\n };\n\n props = this.navigationLink;\n\n order = 15;\n changeType = ChangeTypeAPI;\n id = 'api';\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAE3C;AACA,MAAMgB,aAAa,GAAG,KAA8B;AAE7C,MAAMC,iBAAiB,CAA6B;EAGzDC,WAAWA,CAACC,WAAoC,EAAE;IAAArB,eAAA;IAAAA,eAAA,yBASjC;MACfsB,IAAI,EAAE,KAAK;MACXC,QAAQ,EAAE;IACZ,CAAC;IAAAvB,eAAA,gBAEO,IAAI,CAACwB,cAAc;IAAAxB,eAAA,gBAEnB,EAAE;IAAAA,eAAA,qBACGkB,aAAa;IAAAlB,eAAA,aACrB,KAAK;IAjBR;IACA;IACA,IAAI,CAACyB,KAAK,GAAG;MACXC,IAAI,EAAE,OAAO;MACbC,OAAO,eAAEnC,MAAA,GAAAO,OAAA,CAAA6B,aAAA,CAAChC,WAAA,GAAAiC,UAAU;QAACR,WAAW,EAAEA;MAAY,CAAE;IAClD,CAAC;EACH;AAYF;AAACS,OAAA,CAAAX,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.APIReferenceAspect = void 0;
|
|
7
|
+
function _harmony() {
|
|
8
|
+
const data = require("@teambit/harmony");
|
|
9
|
+
_harmony = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
const APIReferenceAspect = exports.APIReferenceAspect = _harmony().Aspect.create({
|
|
15
|
+
id: 'teambit.api-reference/api-reference'
|
|
16
|
+
});
|
|
17
|
+
var _default = exports.default = APIReferenceAspect;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=api-reference.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_harmony","data","require","APIReferenceAspect","exports","Aspect","create","id","_default","default"],"sources":["api-reference.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const APIReferenceAspect = Aspect.create({\n id: 'teambit.api-reference/api-reference',\n});\n\nexport default APIReferenceAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC9CC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEYN,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentUI } from '@teambit/component';
|
|
3
|
+
import type { Harmony, SlotRegistry } from '@teambit/harmony';
|
|
4
|
+
import type { APINodeRenderer } from '@teambit/api-reference.models.api-node-renderer';
|
|
5
|
+
import type { SchemaNodeConstructor } from '@teambit/semantics.entities.semantic-schema';
|
|
6
|
+
import type { CodeUI } from '@teambit/code';
|
|
7
|
+
import type { WorkspaceUI } from '@teambit/workspace';
|
|
8
|
+
import type { ComponentCompareUI } from '@teambit/component-compare';
|
|
9
|
+
export type APINodeRendererSlot = SlotRegistry<APINodeRenderer[]>;
|
|
10
|
+
export declare class APIReferenceUI {
|
|
11
|
+
private host;
|
|
12
|
+
private apiNodeRendererSlot;
|
|
13
|
+
private code;
|
|
14
|
+
private workspace;
|
|
15
|
+
constructor(host: string, apiNodeRendererSlot: APINodeRendererSlot, code: CodeUI, workspace: WorkspaceUI);
|
|
16
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
17
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
18
|
+
static slots: ((registerFn: () => string) => SlotRegistry<APINodeRenderer[]>)[];
|
|
19
|
+
getAPIPage(): React.JSX.Element;
|
|
20
|
+
TaggedAPIPage: ({ componentId }: {
|
|
21
|
+
componentId: string;
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated use registerSchemaClasses instead
|
|
25
|
+
* registerSchemaClasses is better for performance as it lazy-loads the schemas.
|
|
26
|
+
*/
|
|
27
|
+
registerSchemaClass(schema: SchemaNodeConstructor): void;
|
|
28
|
+
registerSchemaClasses(getSchemas: () => SchemaNodeConstructor[]): void;
|
|
29
|
+
registerAPINodeRenderer(apiNodeRenderers: APINodeRenderer[]): void;
|
|
30
|
+
apiNodeRenderers: APINodeRenderer[];
|
|
31
|
+
static provider([componentUI, codeUI, workspaceUI, componentCompareUI]: [ComponentUI, CodeUI, WorkspaceUI, ComponentCompareUI], _: any, [apiNodeRendererSlot]: [APINodeRendererSlot], harmony: Harmony): Promise<APIReferenceUI>;
|
|
32
|
+
}
|
|
33
|
+
export default APIReferenceUI;
|