Skip to content

Commit 6570ab3

Browse files
committed
chore: package namespace
1 parent 9b000f1 commit 6570ab3

File tree

12 files changed

+31
-43
lines changed

12 files changed

+31
-43
lines changed

.dumirc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const isGitPagesSite = process.env.GITHUB_ACTIONS;
44
export default defineConfig({
55
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
66
themeConfig: {
7-
name: 'rc-overflow',
7+
name: '@rc-component/overflow',
88
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
99
},
1010
exportStatic: {},
1111
outputPath: 'docs-dist',
12-
base: isGitPagesSite ? `/rc-overflow/` : `/`,
13-
publicPath: isGitPagesSite ? `/rc-overflow/` : `/`,
12+
base: isGitPagesSite ? `/@rc-component/overflow/` : `/`,
13+
publicPath: isGitPagesSite ? `/@rc-component/overflow/` : `/`,
1414
styles: [
1515
`
1616
.markdown table {

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# rc-overflow 🐾
1+
# @rc-component/overflow 🐾
22

33
[![NPM version][npm-image]][npm-url]
44
[![npm download][download-image]][download-url]
@@ -7,8 +7,8 @@
77
[![bundle size][bundlephobia-image]][bundlephobia-url]
88
[![dumi][dumi-image]][dumi-url]
99

10-
[npm-image]: http://img.shields.io/npm/v/rc-overflow.svg?style=flat-square
11-
[npm-url]: http://npmjs.org/package/rc-overflow
10+
[npm-image]: http://img.shields.io/npm/v/@rc-component/overflow.svg?style=flat-square
11+
[npm-url]: http://npmjs.org/package/@rc-component/overflow
1212
[github-actions-image]: https://github.com/react-component/overflow/workflows/CI/badge.svg
1313
[github-actions-url]: https://github.com/react-component/overflow/actions
1414
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/overflow/master.svg?style=flat-square
@@ -17,10 +17,10 @@
1717
[david-image]: https://david-dm.org/react-component/overflow/status.svg?style=flat-square
1818
[david-dev-url]: https://david-dm.org/react-component/overflow?type=dev
1919
[david-dev-image]: https://david-dm.org/react-component/overflow/dev-status.svg?style=flat-square
20-
[download-image]: https://img.shields.io/npm/dm/rc-overflow.svg?style=flat-square
21-
[download-url]: https://npmjs.org/package/rc-overflow
22-
[bundlephobia-url]: https://bundlephobia.com/result?p=rc-overflow
23-
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-overflow
20+
[download-image]: https://img.shields.io/npm/dm/@rc-component/overflow.svg?style=flat-square
21+
[download-url]: https://npmjs.org/package/@rc-component/overflow
22+
[bundlephobia-url]: https://bundlephobia.com/result?p=@rc-component/overflow
23+
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/overflow
2424
[dumi-url]: https://github.com/umijs/dumi
2525
[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square
2626

@@ -32,7 +32,7 @@ https://overflow-react-component.vercel.app/
3232

3333
## Install
3434

35-
[![rc-overflow](https://nodei.co/npm/rc-overflow.png)](https://npmjs.org/package/rc-overflow)
35+
[![@rc-component/overflow](https://nodei.co/npm/@rc-component/overflow.png)](https://npmjs.org/package/@rc-component/overflow)
3636

3737
## Usage
3838

@@ -54,4 +54,4 @@ npm start
5454

5555
## License
5656

57-
rc-overflow is released under the MIT license.
57+
@rc-component/overflow is released under the MIT license.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
hero:
3-
title: rc-overflow
3+
title: @rc-component/overflow
44
description: React Overflow Component
55
---
66

examples/fill-width.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import useLayoutEffect from "rc-util/lib/hooks/useLayoutEffect";
2+
import useLayoutEffect from "@rc-component/util/lib/hooks/useLayoutEffect";
33
import Overflow from '../src';
44
import '../assets/index.less';
55
import './common.less';

now.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "rc-overflow",
3-
"version": "1.4.1",
2+
"name": "@rc-component/overflow",
3+
"version": "1.0.0",
44
"description": "Auto collapse box when overflow",
55
"keywords": [
66
"react",
@@ -38,19 +38,19 @@
3838
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
3939
"test": "rc-test",
4040
"test:coverage": "rc-test --coverage",
41-
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
41+
"prepublishOnly": "npm run compile && rc-np",
4242
"lint": "eslint src/ --ext .tsx,.ts",
4343
"lint:tsc": "tsc -p tsconfig.json --noEmit",
4444
"now-build": "npm run docs:build"
4545
},
4646
"dependencies": {
47-
"@babel/runtime": "^7.11.1",
4847
"classnames": "^2.2.1",
49-
"rc-resize-observer": "^1.0.0",
50-
"rc-util": "^5.37.0"
48+
"@rc-component/resize-observer": "^1.0.0",
49+
"@rc-component/util": "^1.3.0"
5150
},
5251
"devDependencies": {
53-
"@rc-component/father-plugin": "^1.0.0",
52+
"@rc-component/father-plugin": "^2.0.2",
53+
"@rc-component/np": "^1.0.4",
5454
"@testing-library/jest-dom": "^5.16.4",
5555
"@testing-library/react": "^12.0.0",
5656
"@types/classnames": "^2.2.9",
@@ -68,7 +68,6 @@
6868
"eslint": "^7.0.0",
6969
"father": "^4.0.0",
7070
"less": "^3.10.3",
71-
"np": "^7.0.0",
7271
"prettier": "^2.0.5",
7372
"rc-test": "^7.0",
7473
"react": "^16.0.0",
@@ -77,8 +76,8 @@
7776
"typescript": "^5.0.0"
7877
},
7978
"peerDependencies": {
80-
"react": ">=16.9.0",
81-
"react-dom": ">=16.9.0"
79+
"react": ">=18.0.0",
80+
"react-dom": ">=18.0.0"
8281
},
8382
"overrides": {
8483
"cheerio": "1.0.0-rc.12"

src/Item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import classNames from 'classnames';
3-
import ResizeObserver from 'rc-resize-observer';
3+
import ResizeObserver from '@rc-component/resize-observer';
44
import type { ComponentType } from './RawItem';
55

66
// Use shared variable to save bundle size

src/Overflow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
22
import { useState, useMemo, useCallback } from 'react';
33
import classNames from 'classnames';
4-
import ResizeObserver from 'rc-resize-observer';
5-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
4+
import ResizeObserver from '@rc-component/resize-observer';
5+
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
66
import Item from './Item';
77
import useEffectState, { useBatcher } from './hooks/useEffectState';
88
import type { ComponentType } from './RawItem';

src/hooks/channelUpdate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import raf from 'rc-util/lib/raf';
1+
import raf from '@rc-component/util/lib/raf';
22

33
export default function channelUpdate(callback: VoidFunction) {
44
if (typeof MessageChannel === 'undefined') {

src/hooks/useEffectState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useEvent from 'rc-util/lib/hooks/useEvent';
1+
import useEvent from '@rc-component/util/lib/hooks/useEvent';
22
import * as React from 'react';
33
import { unstable_batchedUpdates } from 'react-dom';
44
import channelUpdate from './channelUpdate';

0 commit comments

Comments
 (0)