Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -199,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2,984 changes: 1,492 additions & 1,492 deletions demo/.docker/database/init.sql

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions demo/.docker/web/dist/~demos/:id/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion demo/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "dumi build",
"dev": "dumi dev",
"start": "npm run dev",
"update-demo": "npm run build && rm -rf ../.docker/web/dist && mv ./dist ../.docker/web"
"update-demo": "npm run build && rm -rf ../.docker/web/dist && rm -rf ./dist/~demos/:id && mv ./dist ../.docker/web"
},
"commitlint": {
"extends": [
Expand Down
Binary file modified demo/web/public/fonts/RareWordsFonts.ttf
Binary file not shown.
Binary file added demo/web/public/fonts/RareWordsFonts.woff
Binary file not shown.
18 changes: 14 additions & 4 deletions demo/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
"baseUrl": "./",
"strict": true,
"paths": {
"@/*": ["./*"],
"@@/*": ["src/.umi/*"]
"@/*": [
"./*"
],
"@@/*": [
"src/.umi/*"
]
},
"allowSyntheticDefaultImports": true
},
Expand All @@ -26,5 +30,11 @@
"docs",
"tests"
],
"include": [".dumi/**/*", ".dumirc.ts", "src/**/*", "types", "utils", "service"]
}
"include": [
".dumirc.ts",
"src/**/*",
"types",
"utils",
"service"
]
}
16 changes: 4 additions & 12 deletions frontend/input/h5-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,13 @@ const Page = () => {
!!!这里注意的是此键盘组件基于 React 运行的,并且没有内置 React 库,如果你的系统也没有引入 React 相关的 script,请记得在此之前先引入:

```html
<script
src="https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.production.min.js"
crossorigin
></script>
<script
src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"
crossorigin
></script>
<script src="https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.production.min.js" crossorigin></script>
<script src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js" crossorigin></script>
```

示例代码:

```xml
```html
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -109,7 +103,7 @@ const Page = () => {
<script src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js" crossorigin></script>
<style>
:root {
--px: 0.5px !important; // 组件px单位
--px: 0.5px !important;
}
</style>
</head>
Expand All @@ -126,8 +120,6 @@ const Page = () => {
</html>
```

> 如果 unpkg.com 被墙了,可以替换成 npm.elemecdn.com 的国内镜像,使用地址 https://npm.elemecdn.com/ant-rare-words-input-react/dist/ant-rare-words-input-react.min.js
>
> 如果不希望跟随版本更新,可以限制引入 cdn 时的版本,使用地址 https://unpkg.com/[email protected]/dist/ant-rare-words-input-react.min.js

## 开发
Expand Down
2 changes: 1 addition & 1 deletion frontend/input/h5-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"@react-spring/web": "^9.6.1",
"ant-rare-words-utils": "^0.0.4",
"ant-rare-words-utils": "^0.0.10",
"classnames": "^2.3.2",
"lodash": "^4.17.21",
"postcss-plugin-px2rem": "^0.8.1"
Expand Down
10 changes: 5 additions & 5 deletions frontend/input/h5-svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export default {
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.production.min.js" crossorigin></script>
<script src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/[email protected]/dist/index.umd.js" crossorigin></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/index.css">
</head>
<body>
<div class="content">
Expand All @@ -159,8 +162,8 @@ export default {
const inputBtnEle = document.getElementById('open-input-btn');
const inputEle = document.getElementById('input');
inputBtnEle.addEventListener('click', function () {
const { Input } = window.RareWordsSvelte;
const input = new Input({
const { RareWordsInput } = window.RareWordsSvelte;
const input = new RareWordsInput({
target: document.body,
props: {
visible: true,
Expand All @@ -184,9 +187,6 @@ export default {
</body>
</html>
```

> 如果 unpkg.com 被墙了,可以替换成 npm.elemecdn.com 的国内镜像,使用地址 https://npm.elemecdn.com/ant-rare-words-svelte/dist/index.umd.js
>
> 如果不希望跟随版本更新,可以限制引入 cdn 时的版本,使用地址 https://unpkg.com/[email protected]/dist/ant-rare-words-svelte.min.js

## 开发
Expand Down
4 changes: 2 additions & 2 deletions frontend/input/pc-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ const Page = () => {
<script src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js" crossorigin></script>
<style>
:root {
--px: 0.5px !important; // 设置组件px单位
--px: 0.5px !important;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/ant-rare-words-input-react-pc@0.0.1/dist/ant-rare-words-input-react-pc.min.js" crossorigin></script>
<script src="https://unpkg.com/ant-rare-words-input-react-pc/dist/ant-rare-words-input-react-pc.min.js" crossorigin></script>
<script>
const domNode = document.getElementById('app');
const root = ReactDOM.createRoot(domNode);
Expand Down
4 changes: 2 additions & 2 deletions frontend/input/pc-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ant-rare-words-input-react-pc",
"version": "0.0.6",
"version": "0.0.9",
"description": "生僻字输入键盘电脑版",
"license": "MIT",
"module": "dist/index.js",
Expand Down Expand Up @@ -43,7 +43,7 @@
]
},
"dependencies": {
"ant-rare-words-utils": "^0.0.6",
"ant-rare-words-utils": "^0.0.10",
"antd": "^5.2.2",
"classnames": "^2.3.2"
},
Expand Down
5 changes: 5 additions & 0 deletions frontend/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { FontLoader } from './src/font-loader';

export {
FontLoader,
}
2 changes: 1 addition & 1 deletion tools/mergeFont.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ rareWordsFont.setFontface({
ascent: 812,
descent: -212,
});
rareWordsFont.output({ path: rareWordsFilePath, types: ['ttf'] });
rareWordsFont.output({ path: rareWordsFilePath, types: ['ttf', 'woff'] });
2 changes: 1 addition & 1 deletion tools/splitAlibabaSubFontAndMergeZData.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ newFont.setFontface({
ascent: 812,
descent: -212,
});
newFont.output({ path: rareWordsFilePath, types: ['ttf'] });
newFont.output({ path: rareWordsFilePath, types: ['ttf', 'woff'] });