@upmade/react-engine 0.6.2 → 0.6.3

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 +21 -21
  2. package/README.md +96 -96
  3. package/package.json +51 -51
package/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Lukas Mühlenbeck
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lukas Mühlenbeck
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,96 +1,96 @@
1
- # Upmade Engine for React
2
-
3
- Build infinite canvas and collaborative whiteboard experiences in React with Upmade's native wrapper and TypeScript-first API.
4
-
5
- Upmade 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
- Upmade 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:** [upmade.io/docs/react/getting-started/quick-start](https://upmade.io/docs/react/getting-started/quick-start)
10
-
11
- ## Installation
12
-
13
- ```bash
14
- npm install @upmade/react-engine
15
- ```
16
-
17
- ## Setup
18
-
19
- Render Upmade in your component:
20
-
21
- ```tsx
22
- import { UpmadeEngine } from '@upmade/react-engine';
23
-
24
- export function Editor() {
25
- return <UpmadeEngine 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 { UpmadeEngine, IndexedDBSyncProvider } from '@upmade/react-engine';
39
-
40
- export function Editor() {
41
- const syncConfig = {
42
- providers: [IndexedDBSyncProvider],
43
- };
44
-
45
- return (
46
- <UpmadeEngine
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 Upmade 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
- Upmade is composed of a small set of core concepts that work together to power your canvas experience:
84
-
85
- - **[Components](https://upmade.io/docs/react/getting-started/basic-usage)** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
86
- - **[Tools](https://upmade.io/docs/react/fundamentals/tools)** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
87
- - **[Objects](https://upmade.io/docs/react/fundamentals/objects)** — The visual building blocks on the canvas, such as paths, shapes, text, and images with shared spatial properties.
88
- - **[Workspaces](https://upmade.io/docs/react/fundamentals/workspaces)** — Containers that manage an entire canvas collection, view state, and editor configuration.
89
- - **[Theming](https://upmade.io/docs/react/customization/themes)** — Built-in light and dark themes with full CSS variable customization to match your brand.
90
- - **[Collaboration](https://upmade.io/docs/react/advanced/collaboration)** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
91
-
92
- Learn more in the [full documentation](https://upmade.io/docs/react/getting-started/basic-usage).
93
-
94
- ## License
95
-
96
- Upmade is released under the [MIT License](./LICENSE.md).
1
+ # Upmade Engine for React
2
+
3
+ Build infinite canvas and collaborative whiteboard experiences in React with Upmade's native wrapper and TypeScript-first API.
4
+
5
+ Upmade 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
+ Upmade 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:** [upmade.io/docs/react/getting-started/quick-start](https://upmade.io/docs/react/getting-started/quick-start)
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @upmade/react-engine
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ Render Upmade in your component:
20
+
21
+ ```tsx
22
+ import { UpmadeEngine } from '@upmade/react-engine';
23
+
24
+ export function Editor() {
25
+ return <UpmadeEngine 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 { UpmadeEngine, IndexedDBSyncProvider } from '@upmade/react-engine';
39
+
40
+ export function Editor() {
41
+ const syncConfig = {
42
+ providers: [IndexedDBSyncProvider],
43
+ };
44
+
45
+ return (
46
+ <UpmadeEngine
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 Upmade 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
+ Upmade is composed of a small set of core concepts that work together to power your canvas experience:
84
+
85
+ - **[Components](https://upmade.io/docs/react/getting-started/basic-usage)** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
86
+ - **[Tools](https://upmade.io/docs/react/fundamentals/tools)** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
87
+ - **[Objects](https://upmade.io/docs/react/fundamentals/objects)** — The visual building blocks on the canvas, such as paths, shapes, text, and images with shared spatial properties.
88
+ - **[Workspaces](https://upmade.io/docs/react/fundamentals/workspaces)** — Containers that manage an entire canvas collection, view state, and editor configuration.
89
+ - **[Theming](https://upmade.io/docs/react/customization/themes)** — Built-in light and dark themes with full CSS variable customization to match your brand.
90
+ - **[Collaboration](https://upmade.io/docs/react/advanced/collaboration)** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
91
+
92
+ Learn more in the [full documentation](https://upmade.io/docs/react/getting-started/basic-usage).
93
+
94
+ ## License
95
+
96
+ Upmade is released under the [MIT License](./LICENSE.md).
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "@upmade/react-engine",
3
- "version": "0.6.2",
4
- "homepage": "https://upmade.io/",
5
- "description": "Upmade engine wrapper for React.",
6
- "keywords": [
7
- "infinite canvas",
8
- "collaboration",
9
- "whiteboard",
10
- "drawing",
11
- "react"
12
- ],
13
- "license": "MIT",
14
- "main": "dist/index.js",
15
- "module": "dist/index.js",
16
- "types": "dist/types/index.d.ts",
17
- "directories": {
18
- "lib": "lib",
19
- "test": "__tests__"
20
- },
21
- "files": [
22
- "dist"
23
- ],
24
- "publishConfig": {
25
- "access": "public"
26
- },
27
- "dependencies": {
28
- "@stencil/react-output-target": "^1.2.0"
29
- },
30
- "peerDependencies": {
31
- "@upmade/engine": "^0.6.2"
32
- },
33
- "repository": {
34
- "type": "git",
35
- "url": "https://github.com/kasual1/kritzel.git"
36
- },
37
- "scripts": {
38
- "test": "node ./__tests__/react-library.test.js",
39
- "build": "npm run tsc",
40
- "tsc": "tsc -p . --outDir ./dist",
41
- "clean": "rimraf dist node_modules",
42
- "bump": "npm version patch",
43
- "release": "npm publish"
44
- },
45
- "devDependencies": {
46
- "@types/react": "^19.2.7",
47
- "react": "^19.2.3",
48
- "react-dom": "^19.2.3",
49
- "typescript": "^5.9.3"
50
- }
51
- }
1
+ {
2
+ "name": "@upmade/react-engine",
3
+ "version": "0.6.3",
4
+ "homepage": "https://upmade.io/",
5
+ "description": "Upmade engine wrapper for React.",
6
+ "keywords": [
7
+ "infinite canvas",
8
+ "collaboration",
9
+ "whiteboard",
10
+ "drawing",
11
+ "react"
12
+ ],
13
+ "license": "MIT",
14
+ "main": "dist/index.js",
15
+ "module": "dist/index.js",
16
+ "types": "dist/types/index.d.ts",
17
+ "directories": {
18
+ "lib": "lib",
19
+ "test": "__tests__"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "dependencies": {
28
+ "@stencil/react-output-target": "^1.2.0"
29
+ },
30
+ "peerDependencies": {
31
+ "@upmade/engine": "^0.6.3"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/kasual1/kritzel.git"
36
+ },
37
+ "scripts": {
38
+ "test": "node ./__tests__/react-library.test.js",
39
+ "build": "npm run tsc",
40
+ "tsc": "tsc -p . --outDir ./dist",
41
+ "clean": "rimraf dist node_modules",
42
+ "bump": "npm version patch",
43
+ "release": "npm publish"
44
+ },
45
+ "devDependencies": {
46
+ "@types/react": "^19.2.7",
47
+ "react": "^19.2.3",
48
+ "react-dom": "^19.2.3",
49
+ "typescript": "^5.9.3"
50
+ }
51
+ }