Skip to content

Commit f5ef15e

Browse files
feat(react): Merge pull request #49 from mindfiredigital/dev
Relaese from Dev
2 parents 33e023b + 5ea8b5f commit f5ef15e

156 files changed

Lines changed: 26732 additions & 8357 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ examples
1616
# production
1717
/build
1818
packages/**/dist/
19+
packages/**/docusaurus/build/
20+
packages/**/docusaurus/.docusaurus/
21+
packages/document-editor-react/docs/
1922

2023
# misc
2124
.DS_Store

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"@babel/preset-env": "^7.26.0",
4141
"@changesets/changelog-github": "^0.5.0",
4242
"@changesets/cli": "^2.27.12",
43-
"@commitlint/cli": "^19.4.0",
44-
"@commitlint/config-conventional": "^19.2.2",
43+
"@commitlint/cli": "^19.8.1",
44+
"@commitlint/config-conventional": "^19.8.1",
4545
"@typescript-eslint/eslint-plugin": "^8.23.0",
4646
"@typescript-eslint/parser": "^8.23.0",
4747
"babel": "^6.23.0",
@@ -65,7 +65,8 @@
6565
"pnpm": {
6666
"overrides": {
6767
"react": "18.3.1",
68-
"react-dom": "18.3.1"
68+
"react-dom": "18.3.1",
69+
"@commitlint/format": "19.8.1"
6970
}
7071
},
7172
"lint-staged": {
343 KB
Binary file not shown.

packages/document-editor-react/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<h1 align="center">React Document Editor </h1><br><br>
1+
<h1 align="center">React Canvas Editor </h1><br><br>
22
<p align="center">
33
<a href="https://www.npmjs.com/package/@mindfiredigital/react-canvas-editor"><img src="https://img.shields.io/npm/v/@mindfiredigital/react-canvas-editor.svg?sanitize=true" alt="Version"></a>
44
<a href="https://www.npmjs.com/package/@mindfiredigital/react-canvas-editor"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs"></a>
55
</p>
66

77
<br>
88

9-
<p align="center"> Experience powerful document creation with our React-based canvas editor. Craft and manage multi-page documents effortlessly </p>
9+
<p align="center"> Experience powerful document creation with our React-based editor. Craft and manage multi-page documents effortlessly </p>
1010

1111
The `@mindfiredigital/react-canvas-editor` is a tool that allows developers to integrate multi page document editors built on top of Canvas using React.
1212

@@ -18,7 +18,6 @@ The `@mindfiredigital/react-canvas-editor` is a tool that allows developers to i
1818
- [Features](#features)
1919
- [Installation](#installation)
2020
- [Getting Started](#getting-started)
21-
- [Contributing](#contributing)
2221
- [License](#license)
2322

2423
<br>
@@ -471,15 +470,6 @@ DocumentEditorWebComponent({
471470

472471
<br>
473472

474-
## Demo
475-
476-
[React Canvas Editor](https://canvas-editor-htfx.vercel.app/)
477-
478-
## Contributing
479-
480-
We welcome contributions from the community. If you'd like to contribute to the `react-document-editor` npm package, please follow our [Contributing Guidelines](CONTRIBUTING.md).
481-
<br>
482-
483473
## License
484474

485475
Copyright (c) Mindfire Digital llp. All rights reserved.

packages/document-editor-react/__mocks__/canvas-editor.js

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

packages/document-editor-react/__mocks__/fileMock.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/document-editor-react/babel.config.cjs

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

packages/document-editor-react/component/src/components/ButtonWrapper/ButtonWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function ButtonWrapper(props: ButtonWrapperProps) {
1111
edge="start"
1212
aria-label={props.title}
1313
sx={{ mr: 1, borderRadius: 0, ...props.sx }}
14+
onMouseDown={(e) => e.preventDefault()}
1415
onClick={props.handleClick}
1516
>
1617
{props.children}

packages/document-editor-react/component/src/components/ColorPalettes/ColorPalettes.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ const ColorPalette: React.FC<IColorPalette> = ({
3939
};
4040

4141
const handleColor = (hexColor: string) => {
42+
const isSame = hexColor === definedColor;
4243
if (feature === Color.HIGHLIGHT) {
43-
DOMEventHandlers.highlightText(hexColor);
44+
DOMEventHandlers.highlightText(isSame ? "" : hexColor);
4445
} else if (feature === Color.COLOR) {
45-
DOMEventHandlers.setFontColor(hexColor);
46+
DOMEventHandlers.setFontColor(isSame ? "" : hexColor);
4647
}
4748
};
4849

0 commit comments

Comments
 (0)