Skip to content

Commit c9620a6

Browse files
committed
Merge branch 'refactor/export-map-internal-types' into feat/code-mod-export-paths
2 parents e7f3ceb + f2e73f7 commit c9620a6

File tree

39 files changed

+57
-49
lines changed

39 files changed

+57
-49
lines changed

.storybook/components/ProjectTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
Text,
1313
ThemeProvider,
1414
} from '@ui5/webcomponents-react';
15-
import { addCustomCSSWithScoping } from '@ui5/webcomponents-react-base/dist/utils/addCustomCSSWithScoping.js';
15+
import { addCustomCSSWithScoping } from '@ui5/webcomponents-react-base/dist/internal/utils/addCustomCSSWithScoping.js';
1616
import { clsx } from 'clsx';
1717
import type { ReactNode } from 'react';
1818
import { useRef, useState } from 'react';

REUSE.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ SPDX-FileCopyrightText = "2016-2025 Recharts Group"
1616
SPDX-License-Identifier = "MIT"
1717

1818
[[annotations]]
19-
path = "packages/base/src/hooks/useIsomorphicLayoutEffect.ts"
19+
path = "packages/base/src/internal/hooks/useIsomorphicLayoutEffect.ts"
2020
precedence = "aggregate"
2121
SPDX-FileCopyrightText = "2019 Tanner Linsley"
2222
SPDX-License-Identifier = "MIT"
2323

2424
[[annotations]]
25-
path = "packages/base/src/utils/debounce.ts"
25+
path = "packages/base/src/internal/utils/debounce.ts"
2626
precedence = "aggregate"
2727
SPDX-FileCopyrightText = "2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors"
2828
SPDX-License-Identifier = "MIT"
2929

3030
[[annotations]]
31-
path = "packages/base/src/utils/throttle.ts"
31+
path = "packages/base/src/internal/utils/throttle.ts"
3232
precedence = "aggregate"
3333
SPDX-FileCopyrightText = "2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors"
3434
SPDX-License-Identifier = "MIT"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"lerna:version-dryrun": "lerna version --conventional-graduate --no-git-tag-version --no-push",
2424
"wrappers:main": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/UI5/webcomponents) | [Documentation](https://ui5.github.io/webcomponents/)'",
2525
"wrappers:fiori": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-fiori --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/UI5/webcomponents) | [Documentation](https://ui5.github.io/webcomponents/)'",
26-
"wrappers:compat": "WITH_WEB_COMPONENT_IMPORT_PATH='@ui5/webcomponents-react-base/dist/wrapper/withWebComponent.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-compat --out ./packages/compat/src/components --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/UI5/webcomponents) | [Documentation](https://ui5.github.io/webcomponents/)' && prettier --log-level silent --write ./packages/compat/src/components",
26+
"wrappers:compat": "WITH_WEB_COMPONENT_IMPORT_PATH='@ui5/webcomponents-react-base/internal/wrapper/withWebComponent.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-compat --out ./packages/compat/src/components --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/UI5/webcomponents) | [Documentation](https://ui5.github.io/webcomponents/)' && prettier --log-level silent --write ./packages/compat/src/components",
2727
"wrappers:ai": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-ai --out ./packages/ai/src/components --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/UI5/webcomponents) | [Documentation](https://ui5.github.io/webcomponents/)' && prettier --log-level silent --write ./packages/ai/src/components",
2828
"create-webcomponents-wrapper": "(cd packages/cli && tsc) && yarn run wrappers:main && yarn run wrappers:fiori && prettier --log-level silent --write ./packages/main/src/webComponents && eslint --fix ./packages/main/src/webComponents/*/index.tsx && yarn run sb:prepare-cem",
2929
"create-webcomponents-wrapper-compat": "(cd packages/cli && tsc) && yarn run wrappers:compat && yarn run sb:prepare-cem && eslint --fix ./packages/compat/src/components/*/index.tsx",

packages/base/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"./dist": "./dist/index.js",
1616
"./dist/*": "./dist/*",
1717
"./dist/*.js": "./dist/*.js",
18-
"./internal/addCustomCSSWithScoping.js": "./dist/utils/addCustomCSSWithScoping.js",
1918
"./Device": {
2019
"types": "./dist/Device/index.d.ts",
2120
"default": "./dist/Device/index.js"
@@ -51,7 +50,13 @@
5150
"./utils": {
5251
"types": "./dist/utils/index.d.ts",
5352
"default": "./dist/utils/index.js"
54-
}
53+
},
54+
"./types": {
55+
"types": "./dist/types/index.d.ts",
56+
"default": "./dist/types/index.js"
57+
},
58+
"./internal": "./dist/internal",
59+
"./internal/addCustomCSSWithScoping.js": "./dist/utils/addCustomCSSWithScoping.js"
5560
},
5661
"homepage": "https://ui5.github.io/webcomponents-react",
5762
"repository": {

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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
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 * from './internal/hooks/index.js';
14+
export type * from './internal/types/index.js';
1315
export type * from './types/index.js';
1416

1517
export { I18nStore, StyleStore, ThemingParameters, Device, hooks, withWebComponent };
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)

0 commit comments

Comments
 (0)