Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Jul 12, 2024
1 parent e3cf68d commit cc5aea6
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 19 deletions.
3 changes: 3 additions & 0 deletions packages/api-docs-builder-core/baseUi/projectSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export const projectSettings: ProjectSettings = {
getHookInfo: getBaseUiHookInfo,
translationLanguages: LANGUAGES,
skipComponent: () => false,
skipHook: (filename) => {
return filename.match(/(useSlotProps)/) !== null;
},
onCompleted: async () => {
await generateBaseUIApiPages();
},
Expand Down
4 changes: 4 additions & 0 deletions packages/api-docs-builder/ProjectSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export interface ProjectSettings {
* Fuction called to detemine whether to skip the generation of a particular component's API docs
*/
skipComponent: (filename: string) => boolean;
/**
* Fuction called to detemine whether to skip the generation of a particular hook's API docs
*/
skipHook?: (filename: string) => boolean;
/**
* Determine is the component definition should be updated.
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/api-docs-builder/buildApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ async function buildSingleProject(
);

const projectHooks = findHooks(path.join(project.rootPath, 'src')).filter((hook) => {
if (projectSettings.skipHook?.(hook.filename)) {
return false;
}
if (grep === null) {
return true;
}
Expand Down
7 changes: 3 additions & 4 deletions packages/mui-base/src/utils/appendOwnerState.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export {
default as appendOwnerState,
AppendOwnerStateReturnType,
} from '@mui/utils/appendOwnerState';
export { default as appendOwnerState } from '@mui/utils/appendOwnerState';

export type { AppendOwnerStateReturnType } from '@mui/utils/appendOwnerState';
8 changes: 3 additions & 5 deletions packages/mui-base/src/utils/useSlotProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
'use client';
export {
default as useSlotProps,
UseSlotPropsParameters,
UseSlotPropsResult,
} from '@mui/utils/useSlotProps';
export { default as useSlotProps } from '@mui/utils/useSlotProps';

export type { UseSlotPropsParameters, UseSlotPropsResult } from '@mui/utils/useSlotProps';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { appendOwnerState } from './appendOwnerState';
import appendOwnerState from './appendOwnerState';

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

Expand Down
3 changes: 2 additions & 1 deletion packages/mui-utils/src/appendOwnerState/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default, AppendOwnerStateReturnType } from './appendOwnerState';
export { default } from './appendOwnerState';
export type { AppendOwnerStateReturnType } from './appendOwnerState';
7 changes: 2 additions & 5 deletions packages/mui-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ export * from './generateUtilityClass';
export { default as unstable_generateUtilityClasses } from './generateUtilityClasses';
export { default as unstable_ClassNameGenerator } from './ClassNameGenerator';
export { default as clamp } from './clamp';
export {
default as unstable_useSlotProps,
UseSlotPropsParameters,
UseSlotPropsResult,
} from './useSlotProps';
export { default as unstable_useSlotProps } from './useSlotProps';
export type { UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';
export { default as unstable_resolveComponentProps } from './resolveComponentProps';
export { default as unstable_extractEventHandlers } from './extractEventHandlers';
export * from './types';
5 changes: 3 additions & 2 deletions packages/mui-utils/src/mergeSlotProps/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export {
default,
export { default } from './mergeSlotProps';

export type {
WithCommonProps,
MergeSlotPropsParameters,
MergeSlotPropsResult,
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-utils/src/useSlotProps/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default, UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';
export { default } from './useSlotProps';
export type { UseSlotPropsParameters, UseSlotPropsResult } from './useSlotProps';

0 comments on commit cc5aea6

Please sign in to comment.