@domternal/angular 0.2.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Domternal contributors
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 ADDED
@@ -0,0 +1,71 @@
1
+ # @domternal/angular
2
+
3
+ Angular components for the Domternal editor: editor, toolbar, bubble menu, floating menu, and emoji picker. Standalone components with signals, OnPush change detection, reactive forms (`ControlValueAccessor`), and zoneless mode support.
4
+
5
+ Part of the [Domternal](https://github.com/domternal/domternal) toolkit. Full docs at [domternal.dev](https://domternal.dev).
6
+
7
+ Requires Angular 17.1+.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @domternal/core @domternal/theme @domternal/angular
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```ts
18
+ import { Component, signal } from '@angular/core';
19
+ import {
20
+ DomternalEditorComponent,
21
+ DomternalToolbarComponent,
22
+ DomternalBubbleMenuComponent,
23
+ } from '@domternal/angular';
24
+ import { Editor, StarterKit, BubbleMenu } from '@domternal/core';
25
+
26
+ @Component({
27
+ imports: [DomternalEditorComponent, DomternalToolbarComponent, DomternalBubbleMenuComponent],
28
+ template: `
29
+ @if (editor(); as ed) {
30
+ <domternal-toolbar [editor]="ed" />
31
+ }
32
+ <domternal-editor
33
+ [extensions]="extensions"
34
+ [content]="content"
35
+ (editorCreated)="editor.set($event)"
36
+ />
37
+ @if (editor(); as ed) {
38
+ <domternal-bubble-menu [editor]="ed" />
39
+ }
40
+ `,
41
+ })
42
+ export class EditorComponent {
43
+ editor = signal<Editor | null>(null);
44
+ extensions = [StarterKit, BubbleMenu];
45
+ content = '<p>Hello from Angular!</p>';
46
+ }
47
+ ```
48
+
49
+ ### Global Styles
50
+
51
+ Add the theme to your global stylesheet to load editor and toolbar styles:
52
+
53
+ ```scss
54
+ @use '@domternal/theme';
55
+ ```
56
+
57
+ ### Available Components
58
+
59
+ | Component | Description |
60
+ |---|---|
61
+ | `<domternal-editor>` | The core editor surface |
62
+ | `<domternal-toolbar>` | Auto-renders toolbar buttons based on provided extensions |
63
+ | `<domternal-bubble-menu>` | Contextual formatting menu on text selection |
64
+ | `<domternal-floating-menu>` | Block-level insertion menu on empty lines |
65
+ | `<domternal-emoji-picker>` | Emoji picker panel for the Emoji extension |
66
+
67
+ The toolbar and bubble menu components auto-render buttons based on the extensions you provide. No manual button wiring needed.
68
+
69
+ ## License
70
+
71
+ [MIT](https://github.com/domternal/domternal/blob/main/LICENSE)
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Domternal contributors
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/dist/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @domternal/angular
2
+
3
+ Angular components for the Domternal editor: editor, toolbar, bubble menu, floating menu, and emoji picker. Standalone components with signals, OnPush change detection, reactive forms (`ControlValueAccessor`), and zoneless mode support.
4
+
5
+ Part of the [Domternal](https://github.com/domternal/domternal) toolkit. Full docs at [domternal.dev](https://domternal.dev).
6
+
7
+ Requires Angular 17.1+.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @domternal/core @domternal/theme @domternal/angular
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```ts
18
+ import { Component, signal } from '@angular/core';
19
+ import {
20
+ DomternalEditorComponent,
21
+ DomternalToolbarComponent,
22
+ DomternalBubbleMenuComponent,
23
+ } from '@domternal/angular';
24
+ import { Editor, StarterKit, BubbleMenu } from '@domternal/core';
25
+
26
+ @Component({
27
+ imports: [DomternalEditorComponent, DomternalToolbarComponent, DomternalBubbleMenuComponent],
28
+ template: `
29
+ @if (editor(); as ed) {
30
+ <domternal-toolbar [editor]="ed" />
31
+ }
32
+ <domternal-editor
33
+ [extensions]="extensions"
34
+ [content]="content"
35
+ (editorCreated)="editor.set($event)"
36
+ />
37
+ @if (editor(); as ed) {
38
+ <domternal-bubble-menu [editor]="ed" />
39
+ }
40
+ `,
41
+ })
42
+ export class EditorComponent {
43
+ editor = signal<Editor | null>(null);
44
+ extensions = [StarterKit, BubbleMenu];
45
+ content = '<p>Hello from Angular!</p>';
46
+ }
47
+ ```
48
+
49
+ ### Global Styles
50
+
51
+ Add the theme to your global stylesheet to load editor and toolbar styles:
52
+
53
+ ```scss
54
+ @use '@domternal/theme';
55
+ ```
56
+
57
+ ### Available Components
58
+
59
+ | Component | Description |
60
+ |---|---|
61
+ | `<domternal-editor>` | The core editor surface |
62
+ | `<domternal-toolbar>` | Auto-renders toolbar buttons based on provided extensions |
63
+ | `<domternal-bubble-menu>` | Contextual formatting menu on text selection |
64
+ | `<domternal-floating-menu>` | Block-level insertion menu on empty lines |
65
+ | `<domternal-emoji-picker>` | Emoji picker panel for the Emoji extension |
66
+
67
+ The toolbar and bubble menu components auto-render buttons based on the extensions you provide. No manual button wiring needed.
68
+
69
+ ## License
70
+
71
+ [MIT](https://github.com/domternal/domternal/blob/main/LICENSE)