Skip to content

Commit cc5aea6

Browse files
committed
fix CI
1 parent e3cf68d commit cc5aea6

File tree

10 files changed

+26
-19
lines changed

10 files changed

+26
-19
lines changed

packages/api-docs-builder-core/baseUi/projectSettings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export const projectSettings: ProjectSettings = {
2727
getHookInfo: getBaseUiHookInfo,
2828
translationLanguages: LANGUAGES,
2929
skipComponent: () => false,
30+
skipHook: (filename) => {
31+
return filename.match(/(useSlotProps)/) !== null;
32+
},
3033
onCompleted: async () => {
3134
await generateBaseUIApiPages();
3235
},

packages/api-docs-builder/ProjectSettings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export interface ProjectSettings {
5454
* Fuction called to detemine whether to skip the generation of a particular component's API docs
5555
*/
5656
skipComponent: (filename: string) => boolean;
57+
/**
58+
* Fuction called to detemine whether to skip the generation of a particular hook's API docs
59+
*/
60+
skipHook?: (filename: string) => boolean;
5761
/**
5862
* Determine is the component definition should be updated.
5963
*/

packages/api-docs-builder/buildApi.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ async function buildSingleProject(
134134
);
135135

136136
const projectHooks = findHooks(path.join(project.rootPath, 'src')).filter((hook) => {
137+
if (projectSettings.skipHook?.(hook.filename)) {
138+
return false;
139+
}
137140
if (grep === null) {
138141
return true;
139142
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export {
2-
default as appendOwnerState,
3-
AppendOwnerStateReturnType,
4-
} from '@mui/utils/appendOwnerState';
1+
export { default as appendOwnerState } from '@mui/utils/appendOwnerState';
2+
3+
export type { AppendOwnerStateReturnType } from '@mui/utils/appendOwnerState';
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
'use client';
2-
export {
3-
default as useSlotProps,
4-
UseSlotPropsParameters,
5-
UseSlotPropsResult,
6-
} from '@mui/utils/useSlotProps';
2+
export { default as useSlotProps } from '@mui/utils/useSlotProps';
3+
4+
export type { UseSlotPropsParameters, UseSlotPropsResult } from '@mui/utils/useSlotProps';

packages/mui-utils/src/appendOwnerState/appendOwnerState.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { appendOwnerState } from './appendOwnerState';
2+
import appendOwnerState from './appendOwnerState';
33

44
const divProps = appendOwnerState('div', { otherProp: true }, { ownerStateProps: true });
55

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export { default, AppendOwnerStateReturnType } from './appendOwnerState';
1+
export { default } from './appendOwnerState';
2+
export type { AppendOwnerStateReturnType } from './appendOwnerState';

packages/mui-utils/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ export * from './generateUtilityClass';
4141
export { default as unstable_generateUtilityClasses } from './generateUtilityClasses';
4242
export { default as unstable_ClassNameGenerator } from './ClassNameGenerator';
4343
export { default as clamp } from './clamp';
44-
export {
45-
default as unstable_useSlotProps,
46-
UseSlotPropsParameters,
47-
UseSlotPropsResult,
48-
} from './useSlotProps';
44+
export { default as unstable_useSlotProps } from './useSlotProps';
45+
export type { UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';
4946
export { default as unstable_resolveComponentProps } from './resolveComponentProps';
5047
export { default as unstable_extractEventHandlers } from './extractEventHandlers';
5148
export * from './types';

packages/mui-utils/src/mergeSlotProps/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
export {
2-
default,
1+
export { default } from './mergeSlotProps';
2+
3+
export type {
34
WithCommonProps,
45
MergeSlotPropsParameters,
56
MergeSlotPropsResult,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export { default, UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';
1+
export { default } from './useSlotProps';
2+
export type { UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';

0 commit comments

Comments
 (0)