@kritzel/react-engine 0.4.31 → 0.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.md +49 -49
  2. package/README.md +96 -96
  3. package/package.json +2 -2
package/LICENSE.md CHANGED
@@ -1,50 +1,50 @@
1
- # Software License Agreement
2
-
3
- **IMPORTANT NOTICE:** This is a source-available, non-commercial license.
4
- * **Hobbyists & Personal Use:** 100% Free. You are welcome to use, modify, and experiment with this software for personal, hobby, or educational projects.
5
- * **Commercial & Professional Use:** Strictly Prohibited. If you want to use this software in a corporate environment, for professional client work, or as part of a revenue-generating product, you must obtain a commercial license.
6
-
7
- To purchase a commercial license, please visit: https://kritzel.io
8
-
9
- ---
10
-
11
- ## PolyForm Noncommercial License 1.0.0
12
-
13
- ### Acceptance
14
- By using or distributing this software, you accept this license.
15
-
16
- ### User
17
- You is the person or organization who accepts this license. You can accept this license for only yourself or for an organization.
18
-
19
- ### Software
20
- Software is the software that includes this license text.
21
-
22
- ### Practice
23
- Practice is to use, copy, modify, distribute, or make derivative works of the Software.
24
-
25
- ### Grant
26
- You may Practice the Software for noncommercial purposes.
27
-
28
- ### Noncommercial Purposes
29
- Noncommercial purposes are purposes that are not commercial purposes.
30
-
31
- ### Commercial Purposes
32
- Commercial purposes are purposes intended for or directed toward commercial advantage or monetary compensation. Commercial purposes include, but are not limited to, using the Software to provide services to others for a fee, using the Software as part of a product sold or licensed to others, or using the Software inside a business or for professional work.
33
-
34
- ### Redistribution
35
- You may redistribute copies of the Software, with or without modification, provided that you include this license text with every copy.
36
-
37
- ### Notices
38
- You must ensure that any copy of the Software you distribute includes all copyright notices, trademark notices, and other legal notices included in the Software.
39
-
40
- ### No Other Rights
41
- This license does not grant any patent rights or trademark rights.
42
-
43
- ### Termination
44
- If you violate any term of this license, your rights under this license terminate immediately.
45
-
46
- ### Defensive Patent Claims
47
- If you make a patent claim against anyone alleging that the Software infringes a patent, your rights under this license terminate immediately.
48
-
49
- ### No Warranty
1
+ # Software License Agreement
2
+
3
+ **IMPORTANT NOTICE:** This is a source-available, non-commercial license.
4
+ * **Hobbyists & Personal Use:** 100% Free. You are welcome to use, modify, and experiment with this software for personal, hobby, or educational projects.
5
+ * **Commercial & Professional Use:** Strictly Prohibited. If you want to use this software in a corporate environment, for professional client work, or as part of a revenue-generating product, you must obtain a commercial license.
6
+
7
+ To purchase a commercial license, please visit: https://kritzel.io
8
+
9
+ ---
10
+
11
+ ## PolyForm Noncommercial License 1.0.0
12
+
13
+ ### Acceptance
14
+ By using or distributing this software, you accept this license.
15
+
16
+ ### User
17
+ You is the person or organization who accepts this license. You can accept this license for only yourself or for an organization.
18
+
19
+ ### Software
20
+ Software is the software that includes this license text.
21
+
22
+ ### Practice
23
+ Practice is to use, copy, modify, distribute, or make derivative works of the Software.
24
+
25
+ ### Grant
26
+ You may Practice the Software for noncommercial purposes.
27
+
28
+ ### Noncommercial Purposes
29
+ Noncommercial purposes are purposes that are not commercial purposes.
30
+
31
+ ### Commercial Purposes
32
+ Commercial purposes are purposes intended for or directed toward commercial advantage or monetary compensation. Commercial purposes include, but are not limited to, using the Software to provide services to others for a fee, using the Software as part of a product sold or licensed to others, or using the Software inside a business or for professional work.
33
+
34
+ ### Redistribution
35
+ You may redistribute copies of the Software, with or without modification, provided that you include this license text with every copy.
36
+
37
+ ### Notices
38
+ You must ensure that any copy of the Software you distribute includes all copyright notices, trademark notices, and other legal notices included in the Software.
39
+
40
+ ### No Other Rights
41
+ This license does not grant any patent rights or trademark rights.
42
+
43
+ ### Termination
44
+ If you violate any term of this license, your rights under this license terminate immediately.
45
+
46
+ ### Defensive Patent Claims
47
+ If you make a patent claim against anyone alleging that the Software infringes a patent, your rights under this license terminate immediately.
48
+
49
+ ### No Warranty
50
50
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,96 +1,96 @@
1
- # Kritzel Engine for React
2
-
3
- Build infinite canvas and collaborative whiteboard experiences in React with Kritzel's native wrapper and TypeScript-first API.
4
-
5
- Kritzel is a framework-agnostic infinite canvas and collaborative whiteboard engine. It provides web components that work natively in any framework, with a first-class React wrapper for idiomatic JSX integration.
6
-
7
- Kritzel handles the hard parts of canvas-based applications — infinite pan and zoom, hit-testing, CRDT-based collaboration, undo and redo, and cross-browser rendering — so you can focus on your product's domain logic.
8
-
9
- **Full documentation:** [kritzel.io/docs/react/getting-started/quick-start](https://kritzel.io/docs/react/getting-started/quick-start)
10
-
11
- ## Installation
12
-
13
- ```bash
14
- npm install @kritzel/react-engine
15
- ```
16
-
17
- ## Setup
18
-
19
- Render Kritzel in your component:
20
-
21
- ```tsx
22
- import { KritzelEngine } from '@kritzel/react-engine';
23
-
24
- export function Editor() {
25
- return <KritzelEngine style={{ display: 'block', width: '100%', height: '100vh' }} />;
26
- }
27
- ```
28
-
29
- This renders the lower-level engine canvas without the editor toolbar shell.
30
-
31
- ## Optional Enhancements
32
-
33
- ### Persist Canvas State
34
-
35
- By default, the engine uses an empty sync provider list, so canvas state is reset on reload. To persist objects locally across page reloads, configure `syncConfig` explicitly with `IndexedDBSyncProvider`.
36
-
37
- ```tsx
38
- import { KritzelEngine, IndexedDBSyncProvider } from '@kritzel/react-engine';
39
-
40
- export function Editor() {
41
- const syncConfig = {
42
- providers: [IndexedDBSyncProvider],
43
- };
44
-
45
- return (
46
- <KritzelEngine
47
- syncConfig={syncConfig}
48
- style={{ display: 'block', width: '100%', height: '100vh' }}
49
- />
50
- );
51
- }
52
- ```
53
-
54
- ### Apply Full Viewport Styling
55
-
56
- To ensure the Kritzel engine occupies the entire viewport and prevents unwanted scrolling, add the following CSS to your global stylesheet (e.g. `styles.css`):
57
-
58
- ```css
59
- html,
60
- body,
61
- #root {
62
- width: 100dvw;
63
- height: 100dvh;
64
- margin: 0;
65
- padding: 0;
66
- overflow: hidden;
67
- }
68
- ```
69
-
70
- ### Include Mobile Viewport Meta Tag
71
-
72
- For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
73
-
74
- ```html
75
- <meta
76
- name="viewport"
77
- content="viewport-fit=cover, width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0, interactive-widget=resizes-content"
78
- />
79
- ```
80
-
81
- ## Fundamentals
82
-
83
- Kritzel is composed of a small set of core concepts that work together to power your canvas experience:
84
-
85
- - **Components** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
86
- - **Tools** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
87
- - **Objects** — The visual building blocks on the canvas, such as paths, shapes, text, and images with shared spatial properties.
88
- - **Workspaces** — Containers that manage an entire canvas collection, view state, and editor configuration.
89
- - **Theming** — Built-in light and dark themes with full CSS variable customization to match your brand.
90
- - **Collaboration** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
91
-
92
- Learn more in the [full documentation](https://kritzel.io/docs/react/getting-started/basic-usage).
93
-
94
- ## License
95
-
96
- See the [Kritzel License](https://kritzel.io/license). Kritzel is free for personal, hobby, and educational use. Commercial use requires a license — visit [kritzel.io](https://kritzel.io) for details.
1
+ # Kritzel Engine for React
2
+
3
+ Build infinite canvas and collaborative whiteboard experiences in React with Kritzel's native wrapper and TypeScript-first API.
4
+
5
+ Kritzel is a framework-agnostic infinite canvas and collaborative whiteboard engine. It provides web components that work natively in any framework, with a first-class React wrapper for idiomatic JSX integration.
6
+
7
+ Kritzel handles the hard parts of canvas-based applications — infinite pan and zoom, hit-testing, CRDT-based collaboration, undo and redo, and cross-browser rendering — so you can focus on your product's domain logic.
8
+
9
+ **Full documentation:** [kritzel.io/docs/react/getting-started/quick-start](https://kritzel.io/docs/react/getting-started/quick-start)
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @kritzel/react-engine
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ Render Kritzel in your component:
20
+
21
+ ```tsx
22
+ import { KritzelEngine } from '@kritzel/react-engine';
23
+
24
+ export function Editor() {
25
+ return <KritzelEngine style={{ display: 'block', width: '100%', height: '100vh' }} />;
26
+ }
27
+ ```
28
+
29
+ This renders the lower-level engine canvas without the editor toolbar shell.
30
+
31
+ ## Optional Enhancements
32
+
33
+ ### Persist Canvas State
34
+
35
+ By default, the engine uses an empty sync provider list, so canvas state is reset on reload. To persist objects locally across page reloads, configure `syncConfig` explicitly with `IndexedDBSyncProvider`.
36
+
37
+ ```tsx
38
+ import { KritzelEngine, IndexedDBSyncProvider } from '@kritzel/react-engine';
39
+
40
+ export function Editor() {
41
+ const syncConfig = {
42
+ providers: [IndexedDBSyncProvider],
43
+ };
44
+
45
+ return (
46
+ <KritzelEngine
47
+ syncConfig={syncConfig}
48
+ style={{ display: 'block', width: '100%', height: '100vh' }}
49
+ />
50
+ );
51
+ }
52
+ ```
53
+
54
+ ### Apply Full Viewport Styling
55
+
56
+ To ensure the Kritzel engine occupies the entire viewport and prevents unwanted scrolling, add the following CSS to your global stylesheet (e.g. `styles.css`):
57
+
58
+ ```css
59
+ html,
60
+ body,
61
+ #root {
62
+ width: 100dvw;
63
+ height: 100dvh;
64
+ margin: 0;
65
+ padding: 0;
66
+ overflow: hidden;
67
+ }
68
+ ```
69
+
70
+ ### Include Mobile Viewport Meta Tag
71
+
72
+ For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
73
+
74
+ ```html
75
+ <meta
76
+ name="viewport"
77
+ content="viewport-fit=cover, width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0, interactive-widget=resizes-content"
78
+ />
79
+ ```
80
+
81
+ ## Fundamentals
82
+
83
+ Kritzel is composed of a small set of core concepts that work together to power your canvas experience:
84
+
85
+ - **Components** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
86
+ - **Tools** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
87
+ - **Objects** — The visual building blocks on the canvas, such as paths, shapes, text, and images with shared spatial properties.
88
+ - **Workspaces** — Containers that manage an entire canvas collection, view state, and editor configuration.
89
+ - **Theming** — Built-in light and dark themes with full CSS variable customization to match your brand.
90
+ - **Collaboration** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
91
+
92
+ Learn more in the [full documentation](https://kritzel.io/docs/react/getting-started/basic-usage).
93
+
94
+ ## License
95
+
96
+ See the [Kritzel License](https://kritzel.io/license). Kritzel is free for personal, hobby, and educational use. Commercial use requires a license — visit [kritzel.io](https://kritzel.io) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kritzel/react-engine",
3
- "version": "0.4.31",
3
+ "version": "0.4.33",
4
4
  "homepage": "https://kritzel.io/",
5
5
  "description": "Kritzel engine wrapper for React.",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  "@stencil/react-output-target": "^1.2.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@kritzel/engine": "^0.4.31"
31
+ "@kritzel/engine": "^0.4.33"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",