@kritzel/angular-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.
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,116 +1,116 @@
1
- # Kritzel Engine for Angular
2
-
3
- Build infinite canvas and collaborative whiteboard experiences in Angular 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 Angular wrapper for idiomatic template integration.
6
-
7
- Kritzel handles the hard parts of canvas-based applications — infinite pan/zoom, hit-testing, CRDT-based collaboration, undo/redo, and cross-browser rendering — so you can focus on your product's domain logic.
8
-
9
- **Full documentation:** [kritzel.io/docs/angular/getting-started/quick-start](https://kritzel.io/docs/angular/getting-started/quick-start)
10
-
11
- ## Installation
12
-
13
- ```bash
14
- npm install @kritzel/angular-engine
15
- ```
16
-
17
- ## Setup
18
-
19
- Register Kritzel in your application config:
20
-
21
- ```ts
22
- import { ApplicationConfig } from '@angular/core';
23
- import { provideKritzel } from '@kritzel/angular-engine';
24
-
25
- export const appConfig: ApplicationConfig = {
26
- providers: [
27
- // ... other providers
28
- provideKritzel(),
29
- ],
30
- };
31
- ```
32
-
33
- Then use the component in your template:
34
-
35
- ```ts
36
- import { Component } from '@angular/core';
37
- import { KritzelEngine } from '@kritzel/angular-engine';
38
-
39
- @Component({
40
- selector: 'app-editor',
41
- imports: [KritzelEngine],
42
- template: `<kritzel-engine></kritzel-engine>`,
43
- styles: [`kritzel-engine { display: block; width: 100%; height: 100vh; }`],
44
- })
45
- export class EditorComponent {}
46
- ```
47
-
48
- This renders the lower-level engine canvas without the editor toolbar shell.
49
-
50
- ## Optional Enhancements
51
-
52
- ### Persist Canvas State
53
-
54
- 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`.
55
-
56
- ```ts
57
- import { Component } from '@angular/core';
58
- import { IndexedDBSyncProvider, KritzelEngine, KritzelSyncConfig } from '@kritzel/angular-engine';
59
-
60
- @Component({
61
- selector: 'app-editor',
62
- imports: [KritzelEngine],
63
- template: `<kritzel-engine [syncConfig]="syncConfig"></kritzel-engine>`,
64
- styles: [`kritzel-engine { display: block; width: 100%; height: 100vh; }`],
65
- })
66
- export class EditorComponent {
67
- readonly syncConfig: KritzelSyncConfig = {
68
- providers: [IndexedDBSyncProvider],
69
- };
70
- }
71
- ```
72
-
73
- ### Apply Full Viewport Styling
74
-
75
- 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`):
76
-
77
- ```css
78
- html,
79
- body,
80
- app-root {
81
- width: 100dvw;
82
- height: 100dvh;
83
- margin: 0;
84
- padding: 0;
85
- overflow: hidden;
86
- display: block;
87
- }
88
- ```
89
-
90
- ### Include Mobile Viewport Meta Tag
91
-
92
- For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
93
-
94
- ```html
95
- <meta
96
- name="viewport"
97
- 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"
98
- />
99
- ```
100
-
101
- ## Fundamentals
102
-
103
- Kritzel is composed of a small set of core concepts that work together to power your canvas experience:
104
-
105
- - **Components** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
106
- - **Tools** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
107
- - **Objects** — The visual building blocks on the canvas — paths, shapes, text, and images with shared spatial properties.
108
- - **Workspaces** — Containers that manage an entire canvas collection, view state, and editor configuration.
109
- - **Theming** — Built-in light and dark themes with full CSS variable customization to match your brand.
110
- - **Collaboration** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
111
-
112
- Learn more in the [full documentation](https://kritzel.io/docs/angular/getting-started/basic-usage).
113
-
114
- ## License
115
-
116
- 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 Angular
2
+
3
+ Build infinite canvas and collaborative whiteboard experiences in Angular 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 Angular wrapper for idiomatic template integration.
6
+
7
+ Kritzel handles the hard parts of canvas-based applications — infinite pan/zoom, hit-testing, CRDT-based collaboration, undo/redo, and cross-browser rendering — so you can focus on your product's domain logic.
8
+
9
+ **Full documentation:** [kritzel.io/docs/angular/getting-started/quick-start](https://kritzel.io/docs/angular/getting-started/quick-start)
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @kritzel/angular-engine
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ Register Kritzel in your application config:
20
+
21
+ ```ts
22
+ import { ApplicationConfig } from '@angular/core';
23
+ import { provideKritzel } from '@kritzel/angular-engine';
24
+
25
+ export const appConfig: ApplicationConfig = {
26
+ providers: [
27
+ // ... other providers
28
+ provideKritzel(),
29
+ ],
30
+ };
31
+ ```
32
+
33
+ Then use the component in your template:
34
+
35
+ ```ts
36
+ import { Component } from '@angular/core';
37
+ import { KritzelEngine } from '@kritzel/angular-engine';
38
+
39
+ @Component({
40
+ selector: 'app-editor',
41
+ imports: [KritzelEngine],
42
+ template: `<kritzel-engine></kritzel-engine>`,
43
+ styles: [`kritzel-engine { display: block; width: 100%; height: 100vh; }`],
44
+ })
45
+ export class EditorComponent {}
46
+ ```
47
+
48
+ This renders the lower-level engine canvas without the editor toolbar shell.
49
+
50
+ ## Optional Enhancements
51
+
52
+ ### Persist Canvas State
53
+
54
+ 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`.
55
+
56
+ ```ts
57
+ import { Component } from '@angular/core';
58
+ import { IndexedDBSyncProvider, KritzelEngine, KritzelSyncConfig } from '@kritzel/angular-engine';
59
+
60
+ @Component({
61
+ selector: 'app-editor',
62
+ imports: [KritzelEngine],
63
+ template: `<kritzel-engine [syncConfig]="syncConfig"></kritzel-engine>`,
64
+ styles: [`kritzel-engine { display: block; width: 100%; height: 100vh; }`],
65
+ })
66
+ export class EditorComponent {
67
+ readonly syncConfig: KritzelSyncConfig = {
68
+ providers: [IndexedDBSyncProvider],
69
+ };
70
+ }
71
+ ```
72
+
73
+ ### Apply Full Viewport Styling
74
+
75
+ 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`):
76
+
77
+ ```css
78
+ html,
79
+ body,
80
+ app-root {
81
+ width: 100dvw;
82
+ height: 100dvh;
83
+ margin: 0;
84
+ padding: 0;
85
+ overflow: hidden;
86
+ display: block;
87
+ }
88
+ ```
89
+
90
+ ### Include Mobile Viewport Meta Tag
91
+
92
+ For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
93
+
94
+ ```html
95
+ <meta
96
+ name="viewport"
97
+ 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"
98
+ />
99
+ ```
100
+
101
+ ## Fundamentals
102
+
103
+ Kritzel is composed of a small set of core concepts that work together to power your canvas experience:
104
+
105
+ - **Components** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
106
+ - **Tools** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
107
+ - **Objects** — The visual building blocks on the canvas — paths, shapes, text, and images with shared spatial properties.
108
+ - **Workspaces** — Containers that manage an entire canvas collection, view state, and editor configuration.
109
+ - **Theming** — Built-in light and dark themes with full CSS variable customization to match your brand.
110
+ - **Collaboration** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
111
+
112
+ Learn more in the [full documentation](https://kritzel.io/docs/angular/getting-started/basic-usage).
113
+
114
+ ## License
115
+
116
+ 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.