Skip to content

Commit 917236a

Browse files
authored
Merge branch 'master' into StoryBook-8
2 parents 27350d6 + 446deca commit 917236a

34 files changed

+7084
-3937
lines changed

.eslintrc.json

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

.github/pr-badge.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
- icon: visualstudio
2+
label: 'GitHub.dev'
3+
message: 'PR-$prNumber'
4+
color: 'blue'
5+
url: 'https://github.dev/$owner/$repo/pull/$prNumber'
6+
7+
- icon: github
8+
label: 'GitHub codespaces'
9+
message: 'PR-$prNumber'
10+
color: 'black'
11+
url: 'https://codespaces.new/$owner/$repo/pull/$prNumber'
12+
13+
- icon: git
14+
label: 'GitPod.io'
15+
message: 'PR-$prNumber'
16+
color: 'orange'
17+
url: 'https://gitpod.io/?autostart=true#https://github.com/$owner/$repo/pull/$prNumber'

.github/workflows/main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,30 @@ on:
66
jobs:
77
Build-and-Publish:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
id-token: write
912
steps:
10-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1114

12-
- uses: pnpm/action-setup@v2
15+
- uses: pnpm/action-setup@v4
1316
with:
1417
version: 9
15-
- uses: actions/setup-node@v3
18+
- uses: actions/setup-node@v4
1619
with:
17-
node-version: 18
20+
node-version: 20
1821
registry-url: https://registry.npmjs.org
1922
cache: pnpm
2023
- name: Install Dependencies
2124
run: pnpm i --frozen-lockfile
2225

2326
- name: Build & Publish
24-
run: npm publish
27+
run: npm publish --access public --provenance
2528
env:
2629
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2730

2831
- name: Update document
29-
uses: peaceiris/actions-gh-pages@v3
32+
uses: peaceiris/actions-gh-pages@v4
3033
with:
3134
publish_dir: ./docs
3235
personal_token: ${{ secrets.GITHUB_TOKEN }}

.gitpod.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This configuration file was automatically generated by Gitpod.
2+
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
3+
# and commit this file to your remote git repository to share the goodness with others.
4+
5+
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
6+
7+
vscode:
8+
extensions:
9+
- yzhang.markdown-all-in-one
10+
- jock.svg
11+
- redhat.vscode-yaml
12+
- clinyong.vscode-css-modules
13+
- akamud.vscode-caniuse
14+
- visualstudioexptteam.intellicode-api-usage-examples
15+
- pflannery.vscode-versionlens
16+
- christian-kohler.npm-intellisense
17+
- esbenp.prettier-vscode
18+
- rangav.vscode-thunder-client
19+
- eamodio.gitlens
20+
- github.vscode-pull-request-github
21+
- github.vscode-github-actions
22+
tasks:
23+
- init: pnpm i
24+
command: pnpm build

.npmignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
.eslintrc.json
1+
.*
2+
eslint.config.mjs
23
vite.config.ts
3-
.parcel*
44
docs/
55
preview/
66
api-extractor.json
77
stories/
8-
.storybook/
9-
storybook-static/
10-
.vscode/
11-
.husky/
12-
.github/
8+
storybook-static/

ReadMe.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,29 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
2323

2424
### Components
2525

26-
1. [Time Distance](source/TimeDistance.tsx)
27-
2. [Icon](source/Icon.tsx)
28-
3. [Avatar](source/Avatar.tsx)
29-
4. [Nameplate](source/Nameplate.tsx)
30-
5. [Type Echo](source/TypeEcho.tsx)
31-
6. [Click Boundary](source/ClickBoundary.tsx)
32-
7. [Spinner Button](source/SpinnerButton.tsx)
33-
8. [Select](source/Select.tsx)
34-
9. [Month Calendar](source/MonthCalendar.tsx)
35-
10. [Code Block](source/CodeBlock.tsx)
36-
11. [Page Nav](source/PageNav.tsx)
37-
12. [Editor](source/Editor.tsx)
38-
13. [Editor HTML](source/EditorHTML.tsx)
39-
14. [Table Spinner](source/TableSpinner.tsx)
40-
15. [Loading](source/Loading.tsx)
41-
16. [Share Box](source/ShareBox.tsx)
42-
17. [Overlay Box](source/OverlayBox.tsx)
43-
18. [Dialog](source/Dialog.tsx)
26+
1. [Time](source/Time.tsx)
27+
2. [Time Distance](source/TimeDistance.tsx)
28+
3. [Timeline](source/Timeline/)
29+
4. [Icon](source/Icon.tsx)
30+
5. [Avatar](source/Avatar.tsx)
31+
6. [Nameplate](source/Nameplate.tsx)
32+
7. [Type Echo](source/TypeEcho.tsx)
33+
8. [Horizontal Marquee](source/HorizontalMarquee/)
34+
9. [Vertical Marquee](source/VerticalMarquee/)
35+
10. [Click Boundary](source/ClickBoundary.tsx)
36+
11. [Spinner Button](source/SpinnerButton.tsx)
37+
12. [Select](source/Select.tsx)
38+
13. [Month Calendar](source/MonthCalendar.tsx)
39+
14. [Code Block](source/CodeBlock.tsx)
40+
15. [Page Nav](source/PageNav.tsx)
41+
16. [Editor](source/Editor.tsx)
42+
17. [Editor HTML](source/EditorHTML.tsx)
43+
18. [Table Spinner](source/TableSpinner.tsx)
44+
19. [Loading](source/Loading.tsx)
45+
20. [Share Box](source/ShareBox.tsx)
46+
21. [Overlay Box](source/OverlayBox.tsx)
47+
22. [Dialog](source/Dialog.tsx)
48+
23. [User Rank](source/UserRank/)
4449

4550
#### Data components
4651

@@ -81,6 +86,7 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
8186
rel="stylesheet"
8287
href="https://unpkg.com/[email protected]/themes/prism.min.css"
8388
/>
89+
<link rel="stylesheet" href="https://unpkg.com/idea-react/dist/index.css" />
8490
```
8591

8692
### `tsconfig.json`

eslint.config.mjs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// @ts-check
2+
import { fixupPluginRules } from '@eslint/compat';
3+
import eslint from '@eslint/js';
4+
import eslintConfigPrettier from 'eslint-config-prettier';
5+
import reactPlugin from 'eslint-plugin-react';
6+
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
7+
import globals from 'globals';
8+
import tsEslint from 'typescript-eslint';
9+
import { fileURLToPath } from 'url';
10+
11+
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
12+
13+
export default tsEslint.config(
14+
// register all of the plugins up-front
15+
{
16+
plugins: {
17+
'@typescript-eslint': tsEslint.plugin,
18+
// @ts-expect-error https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
19+
react: fixupPluginRules(reactPlugin),
20+
'simple-import-sort': simpleImportSortPlugin
21+
}
22+
},
23+
// config with just ignores is the replacement for `.eslintignore`
24+
{ ignores: ['**/node_modules/**', '**/dist/**', '**/.parcel-cache/**'] },
25+
26+
// extends ...
27+
eslint.configs.recommended,
28+
...tsEslint.configs.recommended,
29+
30+
// base config
31+
{
32+
languageOptions: {
33+
globals: { ...globals.es2020, ...globals.browser, ...globals.node },
34+
parserOptions: {
35+
projectService: true,
36+
tsconfigRootDir,
37+
warnOnUnsupportedTypeScriptVersion: false
38+
}
39+
},
40+
rules: {
41+
'simple-import-sort/exports': 'error',
42+
'simple-import-sort/imports': 'error',
43+
'react/jsx-no-target-blank': 'warn',
44+
'react/jsx-sort-props': [
45+
'error',
46+
{
47+
reservedFirst: true,
48+
shorthandLast: true,
49+
callbacksLast: true,
50+
noSortAlphabetically: true
51+
}
52+
],
53+
'@typescript-eslint/no-unused-vars': 'warn',
54+
'@typescript-eslint/no-explicit-any': 'warn',
55+
'@typescript-eslint/no-empty-object-type': 'off',
56+
'@typescript-eslint/no-unsafe-declaration-merging': 'warn'
57+
}
58+
},
59+
{
60+
files: ['**/*.js'],
61+
extends: [tsEslint.configs.disableTypeChecked],
62+
rules: {
63+
// turn off other type-aware rules
64+
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',
65+
66+
// turn off rules that don't apply to JS code
67+
'@typescript-eslint/explicit-function-return-type': 'off'
68+
}
69+
},
70+
eslintConfigPrettier
71+
);

package.json

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "idea-react",
3-
"version": "2.0.0-rc.3",
3+
"version": "2.0.0-rc.8",
44
"license": "LGPL-3.0-or-later",
55
"author": "[email protected]",
66
"description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
@@ -22,37 +22,40 @@
2222
"types": "dist/index.d.ts",
2323
"main": "dist/index.js",
2424
"dependencies": {
25-
"@editorjs/editorjs": "^2.30.2",
25+
"@editorjs/editorjs": "^2.30.6",
2626
"@editorjs/paragraph": "^2.11.6",
2727
"@react-editor-js/core": "^2.1.0",
28-
"@swc/helpers": "^0.5.12",
28+
"@swc/helpers": "^0.5.13",
2929
"classnames": "^2.5.1",
3030
"editorjs-html": "^3.4.3",
3131
"html2canvas": "^1.4.1",
32-
"iterable-observer": "^1.0.1",
32+
"iterable-observer": "^1.1.0",
3333
"lodash": "^4.17.21",
3434
"mobx": ">=6.11",
3535
"mobx-react": ">=9.1",
3636
"mobx-react-helper": "^0.3.1",
3737
"prismjs": "^1.29.0",
38-
"react-bootstrap": "^2.10.4",
38+
"react-bootstrap": "^2.10.5",
3939
"react-editor-js": "^2.1.0",
4040
"react-element-to-jsx-string": "^15.0.0",
41-
"web-utility": "^4.4.0"
41+
"web-utility": "^4.4.1"
4242
},
4343
"peerDependencies": {
4444
"react": ">=16",
4545
"react-dom": ">=16"
4646
},
4747
"devDependencies": {
48-
"@babel/plugin-proposal-decorators": "^7.24.7",
49-
"@babel/preset-typescript": "^7.24.7",
50-
"@microsoft/api-extractor": "^7.47.2",
48+
"@babel/plugin-proposal-decorators": "^7.25.9",
49+
"@babel/preset-typescript": "^7.26.0",
50+
"@eslint/compat": "^1.2.1",
51+
"@eslint/js": "^9.13.0",
52+
"@microsoft/api-extractor": "^7.47.11",
5153
"@parcel/config-default": "~2.12.0",
5254
"@parcel/packager-ts": "~2.12.0",
55+
"@parcel/transformer-less": "2.12.0",
5356
"@parcel/transformer-typescript-tsc": "~2.12.0",
5457
"@parcel/transformer-typescript-types": "~2.12.0",
55-
"@storybook/addon-console": "^3.0.0",
58+
"@softonus/prettier-plugin-duplicate-remover": "^1.0.1",
5659
"@storybook/addon-essentials": "^8.2.5",
5760
"@storybook/addon-interactions": "^8.2.5",
5861
"@storybook/addon-links": "^8.2.5",
@@ -62,45 +65,50 @@
6265
"@storybook/react": "^8.2.5",
6366
"@storybook/react-vite": "^8.2.5",
6467
"@storybook/test": "^8.2.5",
65-
"@types/lodash": "^4.17.7",
66-
"@types/node": "^18.19.41",
67-
"@types/prismjs": "^1.26.4",
68-
"@types/react": "^18.3.3",
69-
"@types/react-dom": "^18.3.0",
70-
"@typescript-eslint/eslint-plugin": "^7.16.1",
71-
"@typescript-eslint/parser": "^7.16.1",
72-
"@vitejs/plugin-react": "^4.3.1",
73-
"eslint": "^8.57.0",
68+
"@types/lodash": "^4.17.12",
69+
"@types/node": "^20.17.1",
70+
"@types/prismjs": "^1.26.5",
71+
"@types/react": "^18.3.12",
72+
"@types/react-dom": "^18.3.1",
73+
"@vitejs/plugin-react": "^4.3.3",
74+
"eslint": "^9.13.0",
7475
"eslint-config-prettier": "^9.1.0",
75-
"eslint-plugin-import": "^2.29.1",
76+
"eslint-plugin-react": "^7.37.2",
7677
"eslint-plugin-simple-import-sort": "^12.1.1",
77-
"husky": "^9.1.1",
78+
"globals": "^15.11.0",
79+
"husky": "^9.1.6",
7880
"koapache": "^2.2.2",
7981
"less": "^4.2.0",
80-
"lint-staged": "^15.2.7",
82+
"lint-staged": "^15.2.10",
8183
"parcel": "~2.12.0",
82-
"postcss-preset-env": "^9.6.0",
84+
"postcss-preset-env": "^10.0.8",
8385
"prettier": "^3.3.3",
86+
"prettier-plugin-css-order": "^2.1.2",
8487
"process": "^0.11.10",
8588
"prop-types": "15.8.1",
8689
"react": "^18.3.1",
8790
"react-dom": "^18.3.1",
88-
"rimraf": "^5.0.9",
91+
"rimraf": "^6.0.1",
8992
"storybook": "^8.2.5",
90-
"typedoc": "^0.26.4",
91-
"typedoc-plugin-mdn-links": "^3.2.5",
92-
"typescript": "~5.5.3",
93-
"vite": "^5.3.4"
93+
"typedoc": "^0.26.10",
94+
"typedoc-plugin-mdn-links": "^3.3.4",
95+
"typescript": "~5.6.3",
96+
"typescript-eslint": "^8.11.0",
97+
"vite": "^5.4.10"
9498
},
9599
"prettier": {
96100
"singleQuote": true,
97101
"trailingComma": "none",
98102
"arrowParens": "avoid",
99-
"tabWidth": 4
103+
"tabWidth": 4,
104+
"plugins": [
105+
"prettier-plugin-css-order",
106+
"@softonus/prettier-plugin-duplicate-remover"
107+
]
100108
},
101109
"lint-staged": {
102-
"*.{md,less,json,yml,ts,tsx}": "prettier --write",
103-
"*.{js,jsx,ts,tsx}": "eslint --fix"
110+
"*.{md,less,json,yml,js,mjs,ts,tsx}": "prettier --write",
111+
"*.{js,ts,tsx}": "eslint --fix"
104112
},
105113
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
106114
"targets": {
@@ -114,7 +122,7 @@
114122
"api-extractor": "tsc --project tsconfig.build.json --outDir dist/dts && api-extractor run && rimraf dist/dts",
115123
"pack-preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel build --public-url=. --dist-dir=../docs/preview/",
116124
"pack-docs": "rimraf docs/ && typedoc source/",
117-
"pack-dist": "rimraf .parcel-cache/ dist/ && parcel build",
125+
"pack-dist": "rimraf .parcel-cache/ dist/ && parcel build && sed -i 's/^require(\"\\.\\/index\\.css\");//' dist/index.js && rimraf dist/index.js.map",
118126
"start": "npm run pack-docs && npm run pack-preview && web-server docs/ -p 8080 -o",
119127
"build": "npm run pack-docs && npm run pack-preview && npm run pack-dist && npm run api-extractor",
120128
"prepublishOnly": "npm test && npm run build",

0 commit comments

Comments
 (0)