Skip to content

Commit 698a996

Browse files
committed
consistent readme, license
1 parent 43e6254 commit 698a996

File tree

8 files changed

+50
-34
lines changed

8 files changed

+50
-34
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 bemit UG (haftungsbeschränkt)
3+
Copyright (c) 2025 Michael Becker <[email protected]> (https://bemit.codes)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ CodeMirror v6 integration for React, with MUI widgets for [UI-Schema](https://gi
1212
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
1313
![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript&label&labelColor=blue&color=555555)
1414

15-
- [CodeMirror](https://codemirror.net/) v6 as plain React integration: `@ui-schema/kit-codemirror` [![npm (scoped)](https://img.shields.io/npm/v/@ui-schema/kit-codemirror?style=flat-square)](https://www.npmjs.com/package/@ui-schema/kit-codemirror) [![Component Documentation](https://img.shields.io/badge/Documentation-green?labelColor=0a6e8a&color=61dafb&logoColor=ffffff&style=flat-square&logo=react)](./docs/kit-codemirror/kit-codemirror.md)
16-
- UI-Schema Widgets for [MUI](https://mui.com): `@ui-schema/material-code` [![npm (scoped)](https://img.shields.io/npm/v/@ui-schema/material-code?style=flat-square)](https://www.npmjs.com/package/@ui-schema/material-code) [![Component Documentation](https://img.shields.io/badge/Documentation-green?labelColor=1a237e&color=0d47a1&logoColor=ffffff&style=flat-square&logo=mui)](./docs/material-code/material-code.md)
15+
- [CodeMirror v6](https://codemirror.net/) for React, with just the necessities:
16+
- `@ui-schema/kit-codemirror` [![npm (scoped)](https://img.shields.io/npm/v/@ui-schema/kit-codemirror?style=flat-square)](https://www.npmjs.com/package/@ui-schema/kit-codemirror)
17+
- [Documentation](./docs/kit-codemirror/kit-codemirror.md)
18+
- UI-Schema Widgets for [MUI](https://mui.com):
19+
- `@ui-schema/material-code` [![npm (scoped)](https://img.shields.io/npm/v/@ui-schema/material-code?style=flat-square)](https://www.npmjs.com/package/@ui-schema/material-code)
20+
- [Documentation](./docs/material-code/material-code.md)
1721

1822
[![Visit Core Project](https://img.shields.io/badge/Visit%20Core%20Project-blue?labelColor=fff&color=107b8c&style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDYuMjkgMTQ0Ljg3Ij48ZGVmcz48c3R5bGU+LmE0M2YzMmM3LTZiOWUtNDZhZi05Y2RkLWUxNzc1YjJjNzZiMHtmaWxsOiMwMzM5NDQ7fS5lNDNmYmJjMS0xNWM1LTRhZmUtOTdkNS0yYTk3YzY3MGJmZTN7ZmlsbDojMDVhZWNhO308L3N0eWxlPjwvZGVmcz48dGl0bGU+VUktU2NoZW1hPC90aXRsZT48cGF0aCBjbGFzcz0iYTQzZjMyYzctNmI5ZS00NmFmLTljZGQtZTE3NzViMmM3NmIwIiBkPSJNNTMuMjgsM0MzNCwzLDMwLDIsMTguMTIsNS4yMmMtMTAsMi43Mi0xNiwxMi4zMS0xNiwyMi43NC0uMTMsMTctLjI5LDM0LC4wNiw1MC45My41OCwyOC43NSwyMS4zNiw1NS4zOCw1MC4wNyw2NC43OSwzOC42NCwxMi42Niw4MC4yLTguMjUsOTIuNjgtNDYuNjQuMTMtLjM5LjMxLTEuMzYuMzMtMS40Mi0xLjIyLjM4LTEuNCwxLjE2LTEuODMsMS45LTkuNjksMTctMjQuNDIsMjUuNjUtNDMuOTIsMjUuNzdhNDQuNDMsNDQuNDMsMCwwLDEtMjIuODQtNi42M2MtMTMtNy42Ni0yMS0xOC44NC0yMi45LTM0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMS45MyAtMi41MSkiLz48cGF0aCBjbGFzcz0iZTQzZmJiYzEtMTVjNS00YWZlLTk3ZDUtMmE5N2M2NzBiZmUzIiBkPSJNMTI1LjgsMzUuNzhjLTctOC40MS0xMy4xOS0xNy40MS0yMC42MS0yNS40NS02LjEyLDUuMjItOC4zMSwxMi4xOC04LjM4LDE5Ljg2LS4xMywxNC42NC0uMjEsMjkuMjguMDYsNDMuOTIuMjEsMTEuMzItNi40MiwyMC4xOC0xNywyMi41NkM3MC42NCw5OC43NCw2MC43Niw5NS40Nyw1NSw4NC4zNWExMi4yMiwxMi4yMiwwLDAsMC0xLjI2LTEuNzJjMS45MiwxNS4xOSw5LjkxLDI2LjM3LDIyLjksMzRhNDQuNDMsNDQuNDMsMCwwLDAsMjIuODQsNi42M2MxOS41LS4xMiwzNC4yMy04LjczLDQzLjkyLTI1Ljc3LjQzLS43NC42MS0xLjUyLDEuODMtMS45QzE0OSw4NC44LDE0OC4yNCwzMi4xNSwxNDgsMjEiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xLjkzIC0yLjUxKSIvPjxwYXRoIGNsYXNzPSJhNDNmMzJjNy02YjllLTQ2YWYtOWNkZC1lMTc3NWIyYzc2YjAiIGQ9Ik0xNDgsMjFWMy4xN2MtMy0uMTctMjEuMzUtMS44NS0zMS41My44OWEzMS42NSwzMS42NSwwLDAsMC0xMS4yOCw2LjI3YzcuNDIsOCwxMy42NSwxNywyMC42MSwyNS40NSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEuOTMgLTIuNTEpIi8+PC9zdmc+Cg==)](https://github.com/ui-schema/ui-schema)
1923

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"sloc": "node ./sloc.js",
3434
"release": "lerna publish from-package --contents build --no-git-reset"
3535
},
36-
"author": "Michael Becker, https://i-am-digital.eu",
36+
"author": "Michael Becker <[email protected]> (https://bemit.codes)",
3737
"license": "MIT",
3838
"devDependencies": {
3939
"@jest/types": "^29.6.3",

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "0.1.0",
55
"description": "",
66
"homepage": "",
7-
"author": "Michael Becker <[email protected]>",
7+
"author": "Michael Becker <[email protected]> (https://bemit.codes)",
88
"license": "MIT",
99
"scripts": {
1010
"tscheck": "tsc --noEmit"

packages/kit-codemirror/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,31 @@
33
Thin-wrapper for CodeMirror v6 to use as React Component, with hooks and stuff to build more advanced editors easily.
44

55
- [Documentation](https://github.com/ui-schema/react-codemirror/blob/main/docs/kit-codemirror)
6-
- [Demo](https://github.com/ui-schema/react-codemirror/blob/main/packages/demo/src/pages/PageDemoComponent.tsx)
6+
- [Example Code](https://github.com/ui-schema/react-codemirror/blob/main/packages/demo/src/pages/PageDemoComponent.tsx)
7+
8+
```tsx
9+
import { useState, useCallback } from 'react'
10+
import { CodeMirror } from '@ui-schema/kit-codemirror/CodeMirror'
11+
import { isRemoteChange } from '@ui-schema/kit-codemirror/isRemoteChange'
12+
import type { CodeMirrorOnChange } from '@ui-schema/kit-codemirror/useCodeMirror'
13+
import type { CodeMirrorComponentProps, CodeMirrorProps } from '@ui-schema/kit-codemirror/CodeMirror'
14+
15+
const DemoComponent = () => {
16+
const [value, setValue] = useState('')
17+
18+
const onChange: CodeMirrorOnChange = useCallback((update, newValue) => {
19+
if(!update.docChanged || typeof newValue !== 'string' || isRemoteChange(update)) {
20+
return
21+
}
22+
setValue(newValue)
23+
}, [setValue])
24+
25+
return <CodeMirror
26+
value={value}
27+
onChange={onChange}
28+
/>
29+
}
30+
```
731

832
## License
933

packages/kit-codemirror/package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
"name": "@ui-schema/kit-codemirror",
33
"version": "1.0.0-alpha.2",
44
"description": "CodeMirror v6 as React Component, with hooks and stuff - but only the necessities.",
5-
"author": {
6-
"name": "bemit",
7-
"url": "https://bemit.codes"
8-
},
9-
"contributors": [
10-
{
11-
"name": "Michael Becker",
12-
"url": "https://i-am-digital.eu"
13-
}
14-
],
5+
"author": "Michael Becker <[email protected]> (https://bemit.codes)",
156
"license": "MIT",
167
"keywords": [
178
"codemirror",
189
"codemirror6",
1910
"react-component",
2011
"react"
2112
],
13+
"homepage": "https://github.com/ui-schema/react-codemirror/tree/main/packages/kit-codemirror",
2214
"repository": {
2315
"type": "git",
2416
"url": "https://github.com/ui-schema/react-codemirror.git",

packages/material-code/README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# UI-Schema: DS Material-UI, Code Editor
22

3-
Code Editor (codemirror) to work with [@ui-schema/ui-schema](https://github.com/ui-schema/ui-schema), using [@material-ui](https://github.com/mui-org/material-ui/).
3+
Code Editor (codemirror) to work with [@ui-schema/react](https://github.com/ui-schema/ui-schema), using [@mui](https://github.com/mui-org/material-ui/).
44

55
- [Documentation](https://github.com/ui-schema/react-codemirror/blob/main/docs/material-code)
6-
- [Demo](https://github.com/ui-schema/react-codemirror/blob/main/packages/demo/src/pages/PageDemoWidget.tsx)
6+
- [Example Code](https://github.com/ui-schema/react-codemirror/blob/main/packages/demo/src/pages/PageDemoWidget.tsx)
77

88
Supports:
99

10-
- CodeMirror v5 up to `0.4.0-alpha.1`
11-
- react integration of `codemirror`:
12-
- using `react-codemirror2` up to `0.4.0-alpha.0`
13-
- using a modified (and included) copy of `react-codemirror2` for `0.4.0-alpha.1`
14-
- CodeMirror v6 since `0.4.0-beta.0`
15-
- react integration of `@codemirror/*` with `@ui-schema/kit-codemirror`
10+
- CodeMirror
11+
- v6 from `0.4.0-beta.0`
12+
- react integration of `@codemirror/*` with `@ui-schema/kit-codemirror`
13+
- v5 up to `0.4.0-alpha.1`
14+
- react integration of `codemirror`:
15+
- using `react-codemirror2` up to `0.4.0-alpha.0`
16+
- using a modified (and included) copy of `react-codemirror2` for `0.4.0-alpha.1`
17+
- MUI
18+
- v5, 6 and 7 from `0.5.x`
19+
- v5 up to `0.4.x`
1620

1721
## License
1822

packages/material-code/package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22
"name": "@ui-schema/material-code",
33
"version": "0.5.0-alpha.3",
44
"description": "Code editor widgets using CodeMirror, with Material-UI styling for UI-Schema",
5-
"author": {
6-
"name": "bemit",
7-
"url": "https://bemit.codes"
8-
},
9-
"contributors": [
10-
{
11-
"name": "Michael Becker",
12-
"url": "https://i-am-digital.eu"
13-
}
14-
],
5+
"author": "Michael Becker <[email protected]> (https://bemit.codes)",
156
"license": "MIT",
167
"keywords": [
178
"ui-schema",
@@ -25,6 +16,7 @@
2516
"codemirror",
2617
"form"
2718
],
19+
"homepage": "https://github.com/ui-schema/react-codemirror/tree/main/packages/material-code",
2820
"repository": {
2921
"type": "git",
3022
"url": "https://github.com/ui-schema/react-codemirror.git",

0 commit comments

Comments
 (0)