Skip to content

Commit 895df28

Browse files
committed
create internal folder and move internals there
1 parent 14d30d7 commit 895df28

27 files changed

+38
-46
lines changed

packages/base/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,11 @@
5151
"types": "./dist/utils/index.d.ts",
5252
"default": "./dist/utils/index.js"
5353
},
54-
"./internal/types": {
55-
"types": "./dist/types/internal/index.d.ts",
56-
"default": "./dist/types/internal/index.js"
57-
},
58-
"./internal/addCustomCSSWithScoping": {
59-
"types": "./dist/utils/addCustomCSSWithScoping.d.ts",
60-
"default": "./dist/utils/addCustomCSSWithScoping.js"
54+
"./types": {
55+
"types": "./dist/types/index.d.ts",
56+
"default": "./dist/types/index.js"
6157
},
58+
"./internal": "./dist/internal",
6259
"./internal/addCustomCSSWithScoping.js": "./dist/utils/addCustomCSSWithScoping.js"
6360
},
6461
"homepage": "https://sap.github.io/ui5-webcomponents-react",

packages/base/src/hooks/index.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
import { useCurrentTheme } from './useCurrentTheme.js';
21
import { useI18nBundle } from './useI18nBundle.js';
3-
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js';
4-
import { useIsRTL } from './useIsRTL.js';
5-
import { useStylesheet } from './useStylesheet.js';
6-
import { useSyncRef } from './useSyncRef.js';
72
import { useViewportRange } from './useViewportRange.js';
83

9-
export {
10-
useI18nBundle,
11-
useIsomorphicLayoutEffect,
12-
useIsRTL,
13-
useSyncRef,
14-
useViewportRange,
15-
useStylesheet,
16-
useCurrentTheme,
17-
};
4+
export { useI18nBundle, useViewportRange };

packages/base/src/hooks/useI18nBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import I18nBundle from '@ui5/webcomponents-base/dist/i18nBundle.js';
44
import { useEffect, useSyncExternalStore } from 'react';
5-
import { I18nStore } from '../stores/I18nStore.js';
5+
import { I18nStore } from '../internal/stores/I18nStore.js';
66

77
const defaultBundle = new I18nBundle('defaultBundle');
88

packages/base/src/index.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import * as Device from './Device/index.js';
22
import VersionInfo from './generated/VersionInfo.js';
33
import * as hooks from './hooks/index.js';
4-
import { I18nStore } from './stores/I18nStore.js';
5-
import { StyleStore } from './stores/StyleStore.js';
4+
import { I18nStore } from './internal/stores/I18nStore.js';
5+
import { StyleStore } from './internal/stores/StyleStore.js';
6+
import { withWebComponent } from './internal/wrapper/withWebComponent.js';
7+
import type { WithWebComponentPropTypes } from './internal/wrapper/withWebComponent.js';
68
import { ThemingParameters } from './styling/ThemingParameters.js';
7-
import { withWebComponent } from './wrapper/withWebComponent.js';
8-
import type { WithWebComponentPropTypes } from './wrapper/withWebComponent.js';
99

10-
export * from './styling/CssSizeVariables.js';
11-
export * from './utils/index.js';
10+
export * from './internal/styling/CssSizeVariables.js';
11+
export * from './internal/utils/index.js';
1212
export * from './hooks/index.js';
13-
export type * from './types/internal/index.js';
13+
export * from './internal/hooks/index.js';
14+
export type * from './internal/types/index.js';
15+
export type * from './types/index.js';
1416

1517
export { I18nStore, StyleStore, ThemingParameters, Device, hooks, withWebComponent };
1618
export type { WithWebComponentPropTypes };
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { useCurrentTheme } from './useCurrentTheme.js';
2+
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js';
3+
import { useIsRTL } from './useIsRTL.js';
4+
import { useStylesheet } from './useStylesheet.js';
5+
import { useSyncRef } from './useSyncRef.js';
6+
7+
export { useIsomorphicLayoutEffect, useIsRTL, useSyncRef, useStylesheet, useCurrentTheme };
File renamed without changes.

packages/base/src/hooks/useIsRTL.ts renamed to packages/base/src/internal/hooks/useIsRTL.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { attachDirectionChange, detachDirectionChange } from '@ui5/webcomponents-base/dist/locale/directionChange.js';
44
import type { RefObject } from 'react';
55
import { useRef, useState } from 'react';
6-
import { useIsomorphicLayoutEffect } from '../hooks/index.js';
6+
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js';
77

88
const useIsRTL = <RefType extends HTMLElement>(elementRef: RefObject<RefType>): boolean => {
99
const [isRTL, setRTL] = useState(false); // initial value is always LTR (also for SSR)

packages/base/src/hooks/useIsomorphicLayoutEffect.ts renamed to packages/base/src/internal/hooks/useIsomorphicLayoutEffect.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)