@notectl/angular 2.2.3 → 2.2.6

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/README.md CHANGED
@@ -35,6 +35,18 @@ Build a real editor in plain HTML, React, Vue, Svelte, or Angular without lockin
35
35
  - CSP-safe styling with `adoptedStyleSheets`
36
36
  - A fast path for "just give me a full editor" and a granular path for "I only want these plugins"
37
37
 
38
+ ## In a team collaboration app
39
+
40
+ notectl is built to live inside real products. Here it powers the card description editor in a Trello-style board, sitting naturally next to checklists, due dates, labels, and assignees:
41
+
42
+ <div align="center">
43
+
44
+ <img src="media/notectl-team-collab-card.png" alt="notectl as the description editor inside a Trello-style team collaboration card" width="720" />
45
+
46
+ </div>
47
+
48
+ Because the editor is a Web Component, dropping it into an existing card, ticket, or comment surface is just mounting one custom element. You get a full rich-text toolbar, keyboard shortcuts, and accessible markup without pulling a framework-specific editor runtime into your app.
49
+
38
50
  ## Install
39
51
 
40
52
  ```bash
@@ -38,9 +38,14 @@ class NotectlTestHarness {
38
38
  await this.component.setContentHTML(html);
39
39
  this.fixture.detectChanges();
40
40
  }
41
- /** Returns the current HTML content. */
42
- async getContentHTML() {
43
- return this.component.getContentHTML();
41
+ async getContentHTML(options) {
42
+ if (!options) {
43
+ return this.component.getContentHTML();
44
+ }
45
+ if (options.cssMode === 'classes') {
46
+ return this.component.getContentHTML({ ...options, cssMode: 'classes' });
47
+ }
48
+ return this.component.getContentHTML({ ...options, cssMode: 'inline' });
44
49
  }
45
50
  /** Returns the current plain text content. */
46
51
  getText() {
@@ -1 +1 @@
1
- {"version":3,"file":"notectl-angular-testing.mjs","sources":["../../testing/src/test-harness.ts","../../testing/src/notectl-angular-testing.ts"],"sourcesContent":["import type { ComponentFixture } from '@angular/core/testing';\nimport type { NotectlEditorComponent } from '@notectl/angular';\n\n/**\n * Test harness for `NotectlEditorComponent` in consumer tests.\n *\n * Wraps a `ComponentFixture` and provides convenience methods\n * for common test operations.\n *\n * @example\n * ```typescript\n * const fixture = TestBed.createComponent(NotectlEditorComponent);\n * const harness = new NotectlTestHarness(fixture);\n * await harness.whenReady();\n * harness.setContentHTML('<p>Hello</p>');\n * expect(harness.getText()).toBe('Hello');\n * ```\n */\nexport class NotectlTestHarness {\n\tconstructor(private readonly fixture: ComponentFixture<NotectlEditorComponent>) {}\n\n\t/** Returns the component instance. */\n\tget component(): NotectlEditorComponent {\n\t\treturn this.fixture.componentInstance;\n\t}\n\n\t/** Waits for the editor to be ready and triggers change detection. */\n\tasync whenReady(): Promise<void> {\n\t\tawait this.component.whenReady();\n\t\tthis.fixture.detectChanges();\n\t}\n\n\t/** Executes a command and triggers change detection. */\n\texecuteCommand(name: string): boolean {\n\t\tconst result: boolean = this.component.executeCommand(name);\n\t\tthis.fixture.detectChanges();\n\t\treturn result;\n\t}\n\n\t/** Sets HTML content and triggers change detection. */\n\tasync setContentHTML(html: string): Promise<void> {\n\t\tawait this.component.setContentHTML(html);\n\t\tthis.fixture.detectChanges();\n\t}\n\n\t/** Returns the current HTML content. */\n\tasync getContentHTML(): Promise<string> {\n\t\treturn this.component.getContentHTML();\n\t}\n\n\t/** Returns the current plain text content. */\n\tgetText(): string {\n\t\treturn this.component.getText();\n\t}\n\n\t/** Returns whether the editor is empty. */\n\tget isEmpty(): boolean {\n\t\treturn this.component.isEmpty();\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;AAcG;MACU,kBAAkB,CAAA;AACD,IAAA,OAAA;AAA7B,IAAA,WAAA,CAA6B,OAAiD,EAAA;QAAjD,IAAA,CAAA,OAAO,GAAP,OAAO;IAA6C;;AAGjF,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB;IACtC;;AAGA,IAAA,MAAM,SAAS,GAAA;AACd,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;AAChC,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IAC7B;;AAGA,IAAA,cAAc,CAAC,IAAY,EAAA;QAC1B,MAAM,MAAM,GAAY,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC;AAC3D,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;AAC5B,QAAA,OAAO,MAAM;IACd;;IAGA,MAAM,cAAc,CAAC,IAAY,EAAA;QAChC,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IAC7B;;AAGA,IAAA,MAAM,cAAc,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;IACvC;;IAGA,OAAO,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;IAChC;;AAGA,IAAA,IAAI,OAAO,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;IAChC;AACA;;AC3DD;;AAEG;;;;"}
1
+ {"version":3,"file":"notectl-angular-testing.mjs","sources":["../../testing/src/test-harness.ts","../../testing/src/notectl-angular-testing.ts"],"sourcesContent":["import type { ComponentFixture } from '@angular/core/testing';\nimport type {\n\tContentCSSResult,\n\tContentHTMLOptions,\n\tNotectlEditorComponent,\n} from '@notectl/angular';\n\n/**\n * Test harness for `NotectlEditorComponent` in consumer tests.\n *\n * Wraps a `ComponentFixture` and provides convenience methods\n * for common test operations.\n *\n * @example\n * ```typescript\n * const fixture = TestBed.createComponent(NotectlEditorComponent);\n * const harness = new NotectlTestHarness(fixture);\n * await harness.whenReady();\n * harness.setContentHTML('<p>Hello</p>');\n * expect(harness.getText()).toBe('Hello');\n * ```\n */\nexport class NotectlTestHarness {\n\tconstructor(private readonly fixture: ComponentFixture<NotectlEditorComponent>) {}\n\n\t/** Returns the component instance. */\n\tget component(): NotectlEditorComponent {\n\t\treturn this.fixture.componentInstance;\n\t}\n\n\t/** Waits for the editor to be ready and triggers change detection. */\n\tasync whenReady(): Promise<void> {\n\t\tawait this.component.whenReady();\n\t\tthis.fixture.detectChanges();\n\t}\n\n\t/** Executes a command and triggers change detection. */\n\texecuteCommand(name: string): boolean {\n\t\tconst result: boolean = this.component.executeCommand(name);\n\t\tthis.fixture.detectChanges();\n\t\treturn result;\n\t}\n\n\t/** Sets HTML content and triggers change detection. */\n\tasync setContentHTML(html: string): Promise<void> {\n\t\tawait this.component.setContentHTML(html);\n\t\tthis.fixture.detectChanges();\n\t}\n\n\t/** Returns the current HTML content. Mirrors {@link NotectlEditorComponent.getContentHTML}. */\n\tasync getContentHTML(): Promise<string>;\n\tasync getContentHTML(options: ContentHTMLOptions & { cssMode?: 'inline' }): Promise<string>;\n\tasync getContentHTML(\n\t\toptions: ContentHTMLOptions & { cssMode: 'classes' },\n\t): Promise<ContentCSSResult>;\n\tasync getContentHTML(options?: ContentHTMLOptions): Promise<string | ContentCSSResult> {\n\t\tif (!options) {\n\t\t\treturn this.component.getContentHTML();\n\t\t}\n\t\tif (options.cssMode === 'classes') {\n\t\t\treturn this.component.getContentHTML({ ...options, cssMode: 'classes' });\n\t\t}\n\t\treturn this.component.getContentHTML({ ...options, cssMode: 'inline' });\n\t}\n\n\t/** Returns the current plain text content. */\n\tgetText(): string {\n\t\treturn this.component.getText();\n\t}\n\n\t/** Returns whether the editor is empty. */\n\tget isEmpty(): boolean {\n\t\treturn this.component.isEmpty();\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;AAcG;MACU,kBAAkB,CAAA;AACD,IAAA,OAAA;AAA7B,IAAA,WAAA,CAA6B,OAAiD,EAAA;QAAjD,IAAA,CAAA,OAAO,GAAP,OAAO;IAA6C;;AAGjF,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB;IACtC;;AAGA,IAAA,MAAM,SAAS,GAAA;AACd,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;AAChC,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IAC7B;;AAGA,IAAA,cAAc,CAAC,IAAY,EAAA;QAC1B,MAAM,MAAM,GAAY,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC;AAC3D,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;AAC5B,QAAA,OAAO,MAAM;IACd;;IAGA,MAAM,cAAc,CAAC,IAAY,EAAA;QAChC,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IAC7B;IAQA,MAAM,cAAc,CAAC,OAA4B,EAAA;QAChD,IAAI,CAAC,OAAO,EAAE;AACb,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;QACvC;AACA,QAAA,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;AAClC,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QACzE;AACA,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IACxE;;IAGA,OAAO,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;IAChC;;AAGA,IAAA,IAAI,OAAO,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;IAChC;AACA;;AC1ED;;AAEG;;;;"}
@@ -369,8 +369,15 @@ class NotectlEditorComponent {
369
369
  setJSON(doc) {
370
370
  void this.valueController.setDocument(doc);
371
371
  }
372
- async getContentHTML() {
373
- return this.requireEditor().getContentHTML();
372
+ async getContentHTML(options) {
373
+ const editor = this.requireEditor();
374
+ if (!options) {
375
+ return editor.getContentHTML();
376
+ }
377
+ if (options.cssMode === 'classes') {
378
+ return editor.getContentHTML({ ...options, cssMode: 'classes' });
379
+ }
380
+ return editor.getContentHTML({ ...options, cssMode: 'inline' });
374
381
  }
375
382
  async setContentHTML(html) {
376
383
  await this.valueController.setSerializedValue(html);
@@ -1 +1 @@
1
- {"version":3,"file":"notectl-angular.mjs","sources":["../../src/lib/value-interop.ts","../../src/lib/EditorValueController.ts","../../src/lib/tokens.ts","../../src/lib/notectl-editor.component.ts","../../src/lib/value-accessor.directive.ts","../../src/lib/notectl-editor.service.ts","../../src/public-api.ts","../../src/notectl-angular.ts"],"sourcesContent":["import type { Document } from '@notectl/core';\n\nimport type { ContentFormat } from './tokens';\nimport type { NotectlValue } from './types';\n\ninterface EditorContentApi {\n\tgetContentHTML(): Promise<string>;\n\tgetJSON(): Document;\n\tgetText(): string;\n\tsetContentHTML(html: string): Promise<void>;\n\tsetJSON(doc: Document): void;\n\tsetText(value: string): void;\n}\n\nconst EMPTY_HTML = '<p></p>';\n\nfunction isDocumentValue(value: NotectlValue): value is Document {\n\treturn typeof value === 'object' && value !== null;\n}\n\nexport async function readEditorValue(\n\teditor: EditorContentApi,\n\tformat: ContentFormat,\n): Promise<NotectlValue> {\n\tswitch (format) {\n\t\tcase 'html':\n\t\t\treturn editor.getContentHTML();\n\t\tcase 'text':\n\t\t\treturn editor.getText();\n\t\tdefault:\n\t\t\treturn editor.getJSON();\n\t}\n}\n\nexport async function writeEditorValue(\n\teditor: EditorContentApi,\n\tformat: ContentFormat,\n\tvalue: NotectlValue,\n): Promise<void> {\n\tif (value === null || value === '') {\n\t\tawait editor.setContentHTML(EMPTY_HTML);\n\t\treturn;\n\t}\n\n\tif (format === 'json' && isDocumentValue(value)) {\n\t\teditor.setJSON(value);\n\t\treturn;\n\t}\n\n\tif (format === 'text' && typeof value === 'string') {\n\t\t// Routing through `setText` (rather than `setContentHTML('<p>${escaped}</p>')`)\n\t\t// preserves block identity and multi-paragraph structure across signal-form\n\t\t// round-trips, fixing the cursor reset reported in #103 for `contentFormat: 'text'`.\n\t\teditor.setText(value);\n\t\treturn;\n\t}\n\n\tif (typeof value === 'string') {\n\t\tawait editor.setContentHTML(value);\n\t\treturn;\n\t}\n\n\teditor.setJSON(value);\n}\n","import type { Document, NotectlEditor } from '@notectl/core';\n\nimport type { ContentFormat } from './tokens';\nimport type { NotectlValue } from './types';\nimport { readEditorValue, writeEditorValue } from './value-interop';\n\ninterface EditorValueControllerOptions {\n\treadonly getEditor: () => NotectlEditor | null;\n\treadonly getFormat: () => ContentFormat;\n\treadonly whenReady: () => Promise<void>;\n\treadonly updateContent: (doc: Document) => void;\n\treadonly emitControlValue: (value: NotectlValue) => void;\n}\n\nexport class EditorValueController {\n\tprivate readonly options: EditorValueControllerOptions;\n\tprivate lastDocument: Document | undefined;\n\tprivate mutedControlChanges = 0;\n\tprivate serializedReadVersion = 0;\n\tprivate writeQueue: Promise<void> = Promise.resolve();\n\n\tconstructor(options: EditorValueControllerOptions) {\n\t\tthis.options = options;\n\t}\n\n\treset(): void {\n\t\tthis.lastDocument = undefined;\n\t\tthis.serializedReadVersion++;\n\t}\n\n\thandleEditorStateChange(doc: Document): void {\n\t\tthis.lastDocument = doc;\n\t\tthis.options.updateContent(doc);\n\n\t\tif (this.mutedControlChanges > 0) return;\n\n\t\tconst readVersion = ++this.serializedReadVersion;\n\t\tvoid this.readCurrentValue().then((value: NotectlValue) => {\n\t\t\tif (readVersion !== this.serializedReadVersion) return;\n\t\t\tthis.options.emitControlValue(value);\n\t\t});\n\t}\n\n\tsyncExternalContent(doc: Document): void {\n\t\tif (doc === this.lastDocument) return;\n\t\tthis.lastDocument = doc;\n\t\tvoid this.enqueueSilent(async (editor: NotectlEditor) => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\twriteControlValue(value: NotectlValue): void {\n\t\tvoid this.enqueueSilent(async (editor: NotectlEditor) => {\n\t\t\tawait writeEditorValue(editor, this.options.getFormat(), value);\n\t\t});\n\t}\n\n\tsetDocument(doc: Document): Promise<void> {\n\t\tthis.lastDocument = doc;\n\t\treturn this.enqueueInteractive(async (editor: NotectlEditor) => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\tsetSerializedValue(value: NotectlValue): Promise<void> {\n\t\treturn this.enqueueInteractive(async (editor: NotectlEditor) => {\n\t\t\tawait writeEditorValue(editor, this.options.getFormat(), value);\n\t\t});\n\t}\n\n\tapplyInitialDocument(editor: NotectlEditor, doc: Document): Promise<void> {\n\t\tthis.lastDocument = doc;\n\t\treturn this.runSilent(async () => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\tprivate async readCurrentValue(): Promise<NotectlValue> {\n\t\tconst editor: NotectlEditor | null = this.options.getEditor();\n\t\tif (!editor) return null;\n\t\treturn readEditorValue(editor, this.options.getFormat());\n\t}\n\n\tprivate enqueueSilent(task: (editor: NotectlEditor) => Promise<void>): Promise<void> {\n\t\treturn this.enqueue(task, true);\n\t}\n\n\tprivate enqueueInteractive(task: (editor: NotectlEditor) => Promise<void>): Promise<void> {\n\t\treturn this.enqueue(task, false);\n\t}\n\n\tprivate enqueue(task: (editor: NotectlEditor) => Promise<void>, silent: boolean): Promise<void> {\n\t\tconst next = this.writeQueue.then(async () => {\n\t\t\tawait this.options.whenReady();\n\t\t\tconst editor: NotectlEditor | null = this.options.getEditor();\n\t\t\tif (!editor) return;\n\n\t\t\tif (silent) {\n\t\t\t\tawait this.runSilent(() => task(editor));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait task(editor);\n\t\t});\n\n\t\tthis.writeQueue = next.catch(() => undefined);\n\t\treturn next;\n\t}\n\n\tprivate async runSilent(task: () => Promise<void>): Promise<void> {\n\t\tthis.mutedControlChanges++;\n\t\ttry {\n\t\t\tawait task();\n\t\t} finally {\n\t\t\tthis.mutedControlChanges--;\n\t\t}\n\t}\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport type { NotectlEditorConfig } from '@notectl/core';\n\n/**\n * Default configuration applied to all `<notectl-editor>` instances within\n * the injector scope. Component-level inputs override these defaults.\n */\nexport const NOTECTL_DEFAULT_CONFIG: InjectionToken<Partial<NotectlEditorConfig>> =\n\tnew InjectionToken<Partial<NotectlEditorConfig>>('notectl-default-config');\n\n/**\n * Content format used by the `ControlValueAccessor` for forms integration.\n * Determines how editor content is serialized when reading/writing form values.\n *\n * - `'json'` — `Document` objects (default)\n * - `'html'` — sanitized HTML strings\n * - `'text'` — plain text strings\n */\nexport const NOTECTL_CONTENT_FORMAT: InjectionToken<ContentFormat> =\n\tnew InjectionToken<ContentFormat>('notectl-content-format');\n\n/** Supported content serialization formats for forms integration. */\nexport type ContentFormat = 'json' | 'html' | 'text';\n\n/** Options for `provideNotectl()`. */\nexport interface NotectlProviderOptions {\n\t/** Default editor configuration applied to all instances. */\n\treadonly config?: Partial<NotectlEditorConfig>;\n\t/** Content serialization format for forms integration. Defaults to `'json'`. */\n\treadonly contentFormat?: ContentFormat;\n}\n\n/**\n * Configures the notectl editor at the environment injector level.\n *\n * @example\n * ```typescript\n * bootstrapApplication(App, {\n * providers: [\n * provideNotectl({\n * config: { theme: ThemePreset.Light, placeholder: 'Start typing...' },\n * contentFormat: 'json',\n * }),\n * ],\n * });\n * ```\n */\nexport function provideNotectl(options: NotectlProviderOptions = {}): EnvironmentProviders {\n\tconst providers = [];\n\n\tif (options.config) {\n\t\tproviders.push({ provide: NOTECTL_DEFAULT_CONFIG, useValue: options.config });\n\t}\n\n\tif (options.contentFormat) {\n\t\tproviders.push({ provide: NOTECTL_CONTENT_FORMAT, useValue: options.contentFormat });\n\t}\n\n\treturn makeEnvironmentProviders(providers);\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\ttype ElementRef,\n\ttype ModelSignal,\n\tafterNextRender,\n\tcomputed,\n\teffect,\n\tforwardRef,\n\tinject,\n\tinput,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type {\n\tDocument,\n\tEditorSelection,\n\tEditorState,\n\tNotectlEditorConfig,\n\tPaperSize,\n\tPlugin,\n\tPluginConfig,\n\tStateChangeEvent,\n\tTheme,\n\tTransaction,\n} from '@notectl/core';\nimport { NotectlEditor, ThemePreset } from '@notectl/core';\nimport type { Locale } from '@notectl/core';\nimport type { TextFormattingConfig } from '@notectl/core/plugins/text-formatting';\n\nimport { EditorValueController } from './EditorValueController';\nimport { type ContentFormat, NOTECTL_CONTENT_FORMAT, NOTECTL_DEFAULT_CONFIG } from './tokens';\nimport type { NotectlValue, SelectionChangeEvent } from './types';\n\ninterface InitConfigSnapshot {\n\treadonly autofocus: boolean;\n\treadonly features: Partial<TextFormattingConfig> | undefined;\n\treadonly locale: Locale | undefined;\n\treadonly maxHistoryDepth: number | undefined;\n\treadonly plugins: readonly Plugin[];\n\treadonly styleNonce: string | undefined;\n\treadonly toolbar: NotectlEditorConfig['toolbar'];\n}\n\nfunction initConfigEquals(a: InitConfigSnapshot, b: InitConfigSnapshot): boolean {\n\treturn (\n\t\ta.plugins === b.plugins &&\n\t\ta.toolbar === b.toolbar &&\n\t\ta.features === b.features &&\n\t\ta.autofocus === b.autofocus &&\n\t\ta.maxHistoryDepth === b.maxHistoryDepth &&\n\t\ta.locale === b.locale &&\n\t\ta.styleNonce === b.styleNonce\n\t);\n}\n\n/**\n * Sentinel default for the Signal Forms `value` model. Reference identity lets the\n * value-to-editor effect ignore the untouched initial value (so it never clobbers\n * `content` or initial content) while still syncing any document a bound field provides.\n */\nconst EMPTY_FORM_VALUE: Document = { children: [] };\n\n@Component({\n\tselector: 'ntl-editor',\n\tstandalone: true,\n\ttemplate: '<div #host></div>',\n\tstyles: ':host { display: block; }',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => NotectlEditorComponent),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\t'[attr.aria-disabled]': 'effectiveReadonly() ? \"true\" : null',\n\t\t'[class.ntl-editor-disabled]': 'effectiveReadonly()',\n\t},\n})\nexport class NotectlEditorComponent implements ControlValueAccessor {\n\tprivate readonly destroyRef: DestroyRef = inject(DestroyRef);\n\tprivate readonly defaultConfig: Partial<NotectlEditorConfig> | null = inject(\n\t\tNOTECTL_DEFAULT_CONFIG,\n\t\t{ optional: true },\n\t);\n\tprivate readonly contentFormat: ContentFormat =\n\t\tinject(NOTECTL_CONTENT_FORMAT, { optional: true }) ?? 'json';\n\n\treadonly plugins = input<readonly Plugin[] | undefined>(undefined);\n\treadonly toolbar = input<NotectlEditorConfig['toolbar']>(undefined);\n\treadonly features = input<Partial<TextFormattingConfig> | undefined>(undefined);\n\treadonly placeholder = input<string | undefined>(undefined);\n\treadonly readonlyMode = input<boolean | undefined>(undefined);\n\treadonly autofocus = input<boolean | undefined>(undefined);\n\treadonly maxHistoryDepth = input<number | undefined>(undefined);\n\treadonly theme = input<ThemePreset | Theme | undefined>(undefined);\n\treadonly paperSize = input<PaperSize | undefined>(undefined);\n\treadonly dir = input<'ltr' | 'rtl' | undefined>(undefined);\n\treadonly locale = input<Locale | undefined>(undefined);\n\treadonly styleNonce = input<string | undefined>(undefined);\n\n\t/** Disabled status received from a bound Signal Forms field (`FormUiControl.disabled`). */\n\treadonly disabled = input<boolean>(false);\n\n\treadonly content: ModelSignal<Document | undefined> = model<Document | undefined>(undefined);\n\n\t/**\n\t * Signal Forms value model implementing the `FormValueControl<Document>` contract, so the\n\t * editor binds to Angular 22 Signal Forms through the `[formField]` directive. `value` and\n\t * `content` are independent views onto editor state: both are driven from editor state\n\t * changes and both write to the editor when set externally, never to each other.\n\t */\n\treadonly value: ModelSignal<Document> = model<Document>(EMPTY_FORM_VALUE);\n\n\treadonly stateChange = output<StateChangeEvent>();\n\treadonly selectionChange = output<SelectionChangeEvent>();\n\treadonly editorFocus = output<void>();\n\treadonly editorBlur = output<void>();\n\treadonly ready = output<void>();\n\n\t/** Emitted when the editor blurs, so a bound Signal Forms field marks itself touched. */\n\treadonly touch = output<void>();\n\n\treadonly editorState = signal<EditorState | null>(null);\n\treadonly isEmpty = computed<boolean>(() => {\n\t\tconst state: EditorState | null = this.editorState();\n\t\tif (!state) return true;\n\t\tconst doc: Document = state.doc;\n\t\tif (doc.children.length === 0) return true;\n\t\tif (doc.children.length > 1) return false;\n\t\tconst block = doc.children[0];\n\t\tif (!block) return true;\n\t\treturn block.type === 'paragraph' && block.children.length === 0;\n\t});\n\n\tprivate readonly resolvedPlugins = computed<readonly Plugin[]>(\n\t\t() => this.plugins() ?? this.defaultConfig?.plugins ?? [],\n\t);\n\tprivate readonly resolvedToolbar = computed<NotectlEditorConfig['toolbar']>(\n\t\t() => this.toolbar() ?? this.defaultConfig?.toolbar,\n\t);\n\tprivate readonly resolvedFeatures = computed<Partial<TextFormattingConfig> | undefined>(\n\t\t() => this.features() ?? this.defaultConfig?.features,\n\t);\n\tprivate readonly resolvedPlaceholder = computed<string>(\n\t\t() => this.placeholder() ?? this.defaultConfig?.placeholder ?? 'Start typing...',\n\t);\n\tprivate readonly resolvedReadonlyMode = computed<boolean>(\n\t\t() => this.readonlyMode() ?? this.defaultConfig?.readonly ?? false,\n\t);\n\tprivate readonly resolvedAutofocus = computed<boolean>(\n\t\t() => this.autofocus() ?? this.defaultConfig?.autofocus ?? false,\n\t);\n\tprivate readonly resolvedMaxHistoryDepth = computed<number | undefined>(\n\t\t() => this.maxHistoryDepth() ?? this.defaultConfig?.maxHistoryDepth,\n\t);\n\tprivate readonly resolvedTheme = computed<ThemePreset | Theme>(\n\t\t() => this.theme() ?? this.defaultConfig?.theme ?? ThemePreset.Light,\n\t);\n\tprivate readonly resolvedPaperSize = computed<PaperSize | undefined>(\n\t\t() => this.paperSize() ?? this.defaultConfig?.paperSize,\n\t);\n\tprivate readonly resolvedDir = computed<'ltr' | 'rtl' | undefined>(\n\t\t() => this.dir() ?? this.defaultConfig?.dir,\n\t);\n\tprivate readonly resolvedLocale = computed<Locale | undefined>(\n\t\t() => this.locale() ?? this.defaultConfig?.locale,\n\t);\n\tprivate readonly resolvedStyleNonce = computed<string | undefined>(\n\t\t() => this.styleNonce() ?? this.defaultConfig?.styleNonce,\n\t);\n\n\treadonly effectiveReadonly = computed<boolean>(\n\t\t() => this.disabledByForms() || this.disabled() || this.resolvedReadonlyMode(),\n\t);\n\n\tprivate readonly hostRef = viewChild.required<ElementRef<HTMLDivElement>>('host');\n\tprivate readonly initialized = signal(false);\n\tprivate readonly disabledByForms = signal(false);\n\n\tprivate readonly valueController = new EditorValueController({\n\t\temitControlValue: (value: NotectlValue) => this.onChange(value),\n\t\tgetEditor: () => this.editorRef,\n\t\tgetFormat: () => this.contentFormat,\n\t\tupdateContent: (doc: Document) => {\n\t\t\tthis.content.set(doc);\n\t\t\tthis.value.set(doc);\n\t\t},\n\t\twhenReady: () => this.readyPromise,\n\t});\n\n\tprivate editorRef: NotectlEditor | null = null;\n\tprivate readyResolve: (() => void) | null = null;\n\tprivate readyPromise!: Promise<void>;\n\tprivate lastInitConfig: InitConfigSnapshot | null = null;\n\tprivate queuedInitConfig: InitConfigSnapshot | null = null;\n\tprivate reinitializePromise: Promise<void> | null = null;\n\tprivate pendingInitialDocument: Document | undefined;\n\tprivate onChange: (value: NotectlValue) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\n\tconstructor() {\n\t\tthis.resetReadyPromise();\n\n\t\tafterNextRender(() => {\n\t\t\tthis.initEditor(this.captureInitConfig());\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\t\tif (!this.initialized() || !editor) return;\n\n\t\t\teditor.setTheme(this.resolvedTheme());\n\t\t\teditor.configure({\n\t\t\t\tdir: this.resolvedDir(),\n\t\t\t\tpaperSize: this.resolvedPaperSize(),\n\t\t\t\tplaceholder: this.resolvedPlaceholder(),\n\t\t\t\treadonly: this.effectiveReadonly(),\n\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst doc: Document | undefined = this.content();\n\t\t\tif (!doc) return;\n\t\t\tthis.valueController.syncExternalContent(doc);\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst doc: Document = this.value();\n\t\t\tif (doc === EMPTY_FORM_VALUE) return;\n\t\t\tthis.valueController.syncExternalContent(doc);\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.scheduleReinitialization(this.captureInitConfig());\n\t\t});\n\n\t\tthis.destroyRef.onDestroy(() => {\n\t\t\tvoid this.destroyEditor();\n\t\t});\n\t}\n\n\tgetJSON(): Document {\n\t\treturn this.requireEditor().getJSON();\n\t}\n\n\tsetJSON(doc: Document): void {\n\t\tvoid this.valueController.setDocument(doc);\n\t}\n\n\tasync getContentHTML(): Promise<string> {\n\t\treturn this.requireEditor().getContentHTML();\n\t}\n\n\tasync setContentHTML(html: string): Promise<void> {\n\t\tawait this.valueController.setSerializedValue(html);\n\t}\n\n\tgetText(): string {\n\t\treturn this.requireEditor().getText();\n\t}\n\n\tsetText(value: string): void {\n\t\tthis.requireEditor().setText(value);\n\t}\n\n\tget commands(): NotectlEditor['commands'] {\n\t\treturn this.requireEditor().commands;\n\t}\n\n\tcan(): ReturnType<NotectlEditor['can']> {\n\t\treturn this.requireEditor().can();\n\t}\n\n\texecuteCommand(name: string): boolean {\n\t\treturn this.editorRef?.executeCommand(name) ?? false;\n\t}\n\n\tconfigurePlugin(pluginId: string, config: PluginConfig): void {\n\t\tthis.editorRef?.configurePlugin(pluginId, config);\n\t}\n\n\tdispatch(tr: Transaction): void {\n\t\tthis.editorRef?.dispatch(tr);\n\t}\n\n\tgetState(): EditorState {\n\t\treturn this.requireEditor().getState();\n\t}\n\n\tsetTheme(theme: ThemePreset | Theme): void {\n\t\tthis.editorRef?.setTheme(theme);\n\t}\n\n\tgetTheme(): ThemePreset | Theme {\n\t\treturn this.editorRef?.getTheme() ?? this.resolvedTheme();\n\t}\n\n\tsetReadonly(readonlyState: boolean): void {\n\t\tthis.editorRef?.configure({ readonly: readonlyState });\n\t}\n\n\twhenReady(): Promise<void> {\n\t\treturn this.readyPromise;\n\t}\n\n\tfocus(options?: FocusOptions): void {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor) return;\n\n\t\tconst focusTarget =\n\t\t\teditor.shadowRoot?.querySelector<HTMLElement>('[contenteditable]') ?? editor;\n\t\tfocusTarget.focus(options);\n\t}\n\n\twriteValue(value: NotectlValue): void {\n\t\tthis.valueController.writeControlValue(value);\n\t}\n\n\tregisterOnChange(fn: (value: NotectlValue) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabledByForms.set(isDisabled);\n\t}\n\n\tprivate resetReadyPromise(): void {\n\t\tthis.readyPromise = new Promise<void>((resolve) => {\n\t\t\tthis.readyResolve = resolve;\n\t\t});\n\t}\n\n\tprivate initEditor(snapshot: InitConfigSnapshot): void {\n\t\tconst hostElement: HTMLDivElement = this.hostRef().nativeElement;\n\t\tconst editor = new NotectlEditor();\n\t\tthis.editorRef = editor;\n\t\tthis.lastInitConfig = snapshot;\n\t\tthis.valueController.reset();\n\n\t\teditor.on('stateChange', (event: StateChangeEvent) => {\n\t\t\tthis.editorState.set(event.newState);\n\t\t\tthis.valueController.handleEditorStateChange(event.newState.doc);\n\t\t\tthis.stateChange.emit(event);\n\t\t});\n\n\t\teditor.on('selectionChange', (event: { selection: EditorSelection }) => {\n\t\t\tthis.selectionChange.emit(event);\n\t\t});\n\n\t\teditor.on('focus', () => {\n\t\t\tthis.editorFocus.emit();\n\t\t});\n\n\t\teditor.on('blur', () => {\n\t\t\t// Only blurs after the editor is initialized mark the form field touched; any blur\n\t\t\t// emitted while the editor is still setting up is not a user interaction.\n\t\t\tif (this.initialized()) {\n\t\t\t\tthis.onTouched();\n\t\t\t\tthis.touch.emit();\n\t\t\t}\n\t\t\tthis.editorBlur.emit();\n\t\t});\n\n\t\teditor.on('ready', () => {\n\t\t\tthis.initialized.set(true);\n\t\t\tthis.editorState.set(editor.getState());\n\t\t\tvoid this.applyInitialContent(editor).finally(() => {\n\t\t\t\tthis.readyResolve?.();\n\t\t\t\tthis.ready.emit();\n\t\t\t});\n\t\t});\n\n\t\teditor.init(this.buildConfig());\n\t\thostElement.appendChild(editor);\n\t}\n\n\tprivate async applyInitialContent(editor: NotectlEditor): Promise<void> {\n\t\tconst currentContent: Document | undefined = this.content();\n\t\tconst initialContent = currentContent ?? this.pendingInitialDocument;\n\t\tthis.pendingInitialDocument = undefined;\n\n\t\tif (!initialContent) return;\n\t\tawait this.valueController.applyInitialDocument(editor, initialContent);\n\t}\n\n\tprivate buildConfig(): NotectlEditorConfig {\n\t\tconst config: NotectlEditorConfig = {\n\t\t\t...this.defaultConfig,\n\t\t\tautofocus: this.resolvedAutofocus(),\n\t\t\tdir: this.resolvedDir(),\n\t\t\tlocale: this.resolvedLocale(),\n\t\t\tmaxHistoryDepth: this.resolvedMaxHistoryDepth(),\n\t\t\tpaperSize: this.resolvedPaperSize(),\n\t\t\tplaceholder: this.resolvedPlaceholder(),\n\t\t\tplugins: this.resolvedPlugins(),\n\t\t\treadonly: this.effectiveReadonly(),\n\t\t\tstyleNonce: this.resolvedStyleNonce(),\n\t\t\ttheme: this.resolvedTheme(),\n\t\t};\n\n\t\tconst toolbar = this.resolvedToolbar();\n\t\tif (toolbar !== undefined) {\n\t\t\tconfig.toolbar = toolbar;\n\t\t}\n\n\t\tconst features = this.resolvedFeatures();\n\t\tif (features !== undefined) {\n\t\t\tconfig.features = features;\n\t\t}\n\n\t\treturn config;\n\t}\n\n\tprivate captureInitConfig(): InitConfigSnapshot {\n\t\treturn {\n\t\t\tautofocus: this.resolvedAutofocus(),\n\t\t\tfeatures: this.resolvedFeatures(),\n\t\t\tlocale: this.resolvedLocale(),\n\t\t\tmaxHistoryDepth: this.resolvedMaxHistoryDepth(),\n\t\t\tplugins: this.resolvedPlugins(),\n\t\t\tstyleNonce: this.resolvedStyleNonce(),\n\t\t\ttoolbar: this.resolvedToolbar(),\n\t\t};\n\t}\n\n\tprivate scheduleReinitialization(snapshot: InitConfigSnapshot): void {\n\t\tif (!this.initialized() || !this.lastInitConfig) return;\n\t\tif (initConfigEquals(snapshot, this.lastInitConfig)) return;\n\n\t\tthis.queuedInitConfig = snapshot;\n\t\tif (this.reinitializePromise) return;\n\n\t\tthis.reinitializePromise = (async () => {\n\t\t\twhile (this.queuedInitConfig) {\n\t\t\t\tconst nextSnapshot = this.queuedInitConfig;\n\t\t\t\tthis.queuedInitConfig = null;\n\t\t\t\tthis.pendingInitialDocument = this.editorRef?.getJSON();\n\t\t\t\tthis.resetReadyPromise();\n\t\t\t\tthis.initialized.set(false);\n\t\t\t\tawait this.destroyEditor();\n\t\t\t\tthis.initEditor(nextSnapshot);\n\t\t\t\tawait this.readyPromise;\n\t\t\t}\n\t\t})().finally(() => {\n\t\t\tthis.reinitializePromise = null;\n\t\t});\n\t}\n\n\tprivate async destroyEditor(): Promise<void> {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor) {\n\t\t\tthis.initialized.set(false);\n\t\t\tthis.editorState.set(null);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editorRef = null;\n\t\teditor.remove();\n\t\tawait editor.destroy();\n\t\tthis.initialized.set(false);\n\t\tthis.editorState.set(null);\n\t}\n\n\tprivate requireEditor(): NotectlEditor {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor || !this.initialized()) {\n\t\t\tthrow new Error('NotectlEditor is not initialized. Await whenReady() first.');\n\t\t}\n\t\treturn editor;\n\t}\n}\n","import { Directive } from '@angular/core';\n\n/**\n * @deprecated Angular Forms support is built into `NotectlEditorComponent`.\n *\n * This directive remains as a compatibility shim so existing imports do not break,\n * but it no longer participates in value accessor registration.\n */\n@Directive({\n\tselector: 'ntl-editor[formControl], ntl-editor[formControlName], ntl-editor[ngModel]',\n\tstandalone: true,\n})\nexport class NotectlValueAccessorDirective {}\n","import { DestroyRef, Injectable, computed, inject, signal } from '@angular/core';\nimport type { EditorState, StateChangeEvent, Transaction } from '@notectl/core';\nimport { type Observable, Subject } from 'rxjs';\n\nimport type { NotectlEditorComponent } from './notectl-editor.component';\n\n/**\n * Optional injectable service for programmatic editor access via DI.\n *\n * Useful when a toolbar or other component needs to interact with\n * the editor without a direct template reference.\n *\n * The service must be provided at a shared injector level and\n * connected to the editor component via `register()`.\n *\n * @example\n * ```typescript\n * @Component({\n * providers: [NotectlEditorService],\n * template: `\n * <app-toolbar />\n * <ntl-editor #editor [plugins]=\"plugins\" />\n * `,\n * })\n * export class EditorPage {\n * private readonly editor = viewChild.required<NotectlEditorComponent>('editor');\n * private readonly service = inject(NotectlEditorService);\n *\n * constructor() {\n * afterNextRender(() => {\n * this.service.register(this.editor());\n * });\n * }\n * }\n * ```\n */\n@Injectable()\nexport class NotectlEditorService {\n\tprivate readonly destroyRef: DestroyRef = inject(DestroyRef);\n\tprivate readonly editorRef = signal<NotectlEditorComponent | null>(null);\n\tprivate readonly stateChangeSubject = new Subject<StateChangeEvent>();\n\n\t/** Whether an editor is currently registered with this service. */\n\treadonly hasEditor = computed<boolean>(() => this.editorRef() !== null);\n\n\t/** Observable stream of state change events from the editor. */\n\treadonly stateChanges$: Observable<StateChangeEvent> = this.stateChangeSubject.asObservable();\n\n\tprivate stateChangeSub: { unsubscribe(): void } | null = null;\n\n\tconstructor() {\n\t\tthis.destroyRef.onDestroy(() => {\n\t\t\tthis.unregister();\n\t\t\tthis.stateChangeSubject.complete();\n\t\t});\n\t}\n\n\t/** Registers an editor component with this service. */\n\tregister(editor: NotectlEditorComponent): void {\n\t\tthis.unregister();\n\t\tthis.editorRef.set(editor);\n\n\t\tthis.stateChangeSub = editor.stateChange.subscribe((event: StateChangeEvent) => {\n\t\t\tthis.stateChangeSubject.next(event);\n\t\t});\n\t}\n\n\t/** Unregisters the current editor from this service. */\n\tunregister(): void {\n\t\tthis.stateChangeSub?.unsubscribe();\n\t\tthis.stateChangeSub = null;\n\t\tthis.editorRef.set(null);\n\t}\n\n\t/** Executes a named command on the registered editor. */\n\texecuteCommand(name: string): boolean {\n\t\tconst editor: NotectlEditorComponent | null = this.editorRef();\n\t\tif (!editor) return false;\n\t\treturn editor.executeCommand(name);\n\t}\n\n\t/** Returns the current editor state, or `null` if no editor is registered. */\n\tgetState(): EditorState | null {\n\t\tconst editor: NotectlEditorComponent | null = this.editorRef();\n\t\tif (!editor) return null;\n\t\ttry {\n\t\t\treturn editor.getState();\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/** Dispatches a transaction on the registered editor. */\n\tdispatch(tr: Transaction): void {\n\t\tthis.editorRef()?.dispatch(tr);\n\t}\n}\n","/**\n * @notectl/angular — Angular integration for the notectl rich text editor.\n * @packageDocumentation\n */\n\n// --- Angular Bindings ---\nexport { NotectlEditorComponent } from './lib/notectl-editor.component';\nexport { NotectlValueAccessorDirective } from './lib/value-accessor.directive';\nexport { NotectlEditorService } from './lib/notectl-editor.service';\n\n// --- Provider Function ---\nexport {\n\tprovideNotectl,\n\ttype NotectlProviderOptions,\n} from './lib/tokens';\n\n// --- Injection Tokens ---\nexport {\n\tNOTECTL_DEFAULT_CONFIG,\n\tNOTECTL_CONTENT_FORMAT,\n\ttype ContentFormat,\n} from './lib/tokens';\n\n// --- Angular-specific Types ---\nexport type { NotectlValue, SelectionChangeEvent } from './lib/types';\n\n// --- Re-exports from @notectl/core (convenience) ---\n\n// Model types\nexport type {\n\tDocument,\n\tBlockNode,\n\tTextNode,\n\tInlineNode,\n\tMark,\n\tBlockAttrs,\n} from '@notectl/core';\n\n// Selection types\nexport type { EditorSelection, Position, Selection } from '@notectl/core';\n\n// State types\nexport type {\n\tEditorState,\n\tTransaction,\n\tTransactionMetadata,\n\tStateChangeEvent,\n} from '@notectl/core';\n\n// Plugin types\nexport type { Plugin, PluginConfig, PluginContext } from '@notectl/core';\n\n// Theme types\nexport type { Theme, PartialTheme, ThemePrimitives } from '@notectl/core';\nexport { ThemePreset, LIGHT_THEME, DARK_THEME, createTheme } from '@notectl/core';\n\n// Editor config\nexport type { NotectlEditorConfig } from '@notectl/core';\n\n// Plugin config types (from sub-path exports)\nexport type { TextFormattingConfig } from '@notectl/core/plugins/text-formatting';\nexport type { FontDefinition } from '@notectl/core/plugins/font';\n\n// Starter fonts\n/** @deprecated Import from '@notectl/core/fonts' instead. */\nexport { STARTER_FONTS } from '@notectl/core/fonts';\n\n// Plugins (tree-shakable re-exports from sub-paths)\nexport { TextFormattingPlugin } from '@notectl/core/plugins/text-formatting';\nexport { HeadingPlugin } from '@notectl/core/plugins/heading';\nexport { ListPlugin } from '@notectl/core/plugins/list';\nexport { LinkPlugin } from '@notectl/core/plugins/link';\nexport { BlockquotePlugin } from '@notectl/core/plugins/blockquote';\nexport { CodeBlockPlugin } from '@notectl/core/plugins/code-block';\nexport { TablePlugin } from '@notectl/core/plugins/table';\nexport { ImagePlugin } from '@notectl/core/plugins/image';\nexport { HorizontalRulePlugin } from '@notectl/core/plugins/horizontal-rule';\nexport { HardBreakPlugin } from '@notectl/core/plugins/hard-break';\nexport { StrikethroughPlugin } from '@notectl/core/plugins/strikethrough';\nexport { HighlightPlugin } from '@notectl/core/plugins/highlight';\nexport { TextColorPlugin } from '@notectl/core/plugins/text-color';\nexport { FontPlugin } from '@notectl/core/plugins/font';\nexport { FontSizePlugin } from '@notectl/core/plugins/font-size';\nexport { AlignmentPlugin } from '@notectl/core/plugins/alignment';\nexport { TextDirectionPlugin } from '@notectl/core/plugins/text-direction';\nexport { BidiIsolationPlugin } from '@notectl/core/plugins/bidi-isolation';\nexport { TextDirectionAutoPlugin } from '@notectl/core/plugins/text-direction-auto';\nexport { SuperSubPlugin } from '@notectl/core/plugins/super-sub';\nexport { ToolbarPlugin } from '@notectl/core/plugins/toolbar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,UAAU,GAAG,SAAS;AAE5B,SAAS,eAAe,CAAC,KAAmB,EAAA;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AACnD;AAEO,eAAe,eAAe,CACpC,MAAwB,EACxB,MAAqB,EAAA;IAErB,QAAQ,MAAM;AACb,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,MAAM,CAAC,cAAc,EAAE;AAC/B,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,MAAM,CAAC,OAAO,EAAE;AACxB,QAAA;AACC,YAAA,OAAO,MAAM,CAAC,OAAO,EAAE;;AAE1B;AAEO,eAAe,gBAAgB,CACrC,MAAwB,EACxB,MAAqB,EACrB,KAAmB,EAAA;IAEnB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;AACnC,QAAA,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC;QACvC;IACD;IAEA,IAAI,MAAM,KAAK,MAAM,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;AAChD,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB;IACD;IAEA,IAAI,MAAM,KAAK,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;;;;AAInD,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB;IACD;AAEA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC9B,QAAA,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC;QAClC;IACD;AAEA,IAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;AACtB;;MCjDa,qBAAqB,CAAA;AAChB,IAAA,OAAO;AAChB,IAAA,YAAY;IACZ,mB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A,CAAC,CAAC;IACH;;IAGA,UAAU,GAAA;AACT,QAAA,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE;AAClC,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;AAC1B,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;IACzB;;AAGA,IAAA,cAAc,CAAC,IAAY,EAAA;AAC1B,QAAA,MAAM,MAAM,GAAkC,IAAI,CAAC,SAAS,EAAE;AAC9D,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK;AACzB,QAAA,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC;IACnC;;IAGA,QAAQ,GAAA;AACP,QAAA,MAAM,MAAM,GAAkC,IAAI,CAAC,SAAS,EAAE;AAC9D,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,IAAI;AACxB,QAAA,IAAI;AACH,YAAA,OAAO,MAAM,CAAC,QAAQ,EAAE;QACzB;AAAE,QAAA,MAAM;AACP,YAAA,OAAO,IAAI;QACZ;IACD;;AAGA,IAAA,QAAQ,CAAC,EAAe,EAAA;QACvB,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC;IAC/B;uGA1DY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAApB,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC;;;ACpCD;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
1
+ {"version":3,"file":"notectl-angular.mjs","sources":["../../src/lib/value-interop.ts","../../src/lib/EditorValueController.ts","../../src/lib/tokens.ts","../../src/lib/notectl-editor.component.ts","../../src/lib/value-accessor.directive.ts","../../src/lib/notectl-editor.service.ts","../../src/public-api.ts","../../src/notectl-angular.ts"],"sourcesContent":["import type { Document } from '@notectl/core';\n\nimport type { ContentFormat } from './tokens';\nimport type { NotectlValue } from './types';\n\ninterface EditorContentApi {\n\tgetContentHTML(): Promise<string>;\n\tgetJSON(): Document;\n\tgetText(): string;\n\tsetContentHTML(html: string): Promise<void>;\n\tsetJSON(doc: Document): void;\n\tsetText(value: string): void;\n}\n\nconst EMPTY_HTML = '<p></p>';\n\nfunction isDocumentValue(value: NotectlValue): value is Document {\n\treturn typeof value === 'object' && value !== null;\n}\n\nexport async function readEditorValue(\n\teditor: EditorContentApi,\n\tformat: ContentFormat,\n): Promise<NotectlValue> {\n\tswitch (format) {\n\t\tcase 'html':\n\t\t\treturn editor.getContentHTML();\n\t\tcase 'text':\n\t\t\treturn editor.getText();\n\t\tdefault:\n\t\t\treturn editor.getJSON();\n\t}\n}\n\nexport async function writeEditorValue(\n\teditor: EditorContentApi,\n\tformat: ContentFormat,\n\tvalue: NotectlValue,\n): Promise<void> {\n\tif (value === null || value === '') {\n\t\tawait editor.setContentHTML(EMPTY_HTML);\n\t\treturn;\n\t}\n\n\tif (format === 'json' && isDocumentValue(value)) {\n\t\teditor.setJSON(value);\n\t\treturn;\n\t}\n\n\tif (format === 'text' && typeof value === 'string') {\n\t\t// Routing through `setText` (rather than `setContentHTML('<p>${escaped}</p>')`)\n\t\t// preserves block identity and multi-paragraph structure across signal-form\n\t\t// round-trips, fixing the cursor reset reported in #103 for `contentFormat: 'text'`.\n\t\teditor.setText(value);\n\t\treturn;\n\t}\n\n\tif (typeof value === 'string') {\n\t\tawait editor.setContentHTML(value);\n\t\treturn;\n\t}\n\n\teditor.setJSON(value);\n}\n","import type { Document, NotectlEditor } from '@notectl/core';\n\nimport type { ContentFormat } from './tokens';\nimport type { NotectlValue } from './types';\nimport { readEditorValue, writeEditorValue } from './value-interop';\n\ninterface EditorValueControllerOptions {\n\treadonly getEditor: () => NotectlEditor | null;\n\treadonly getFormat: () => ContentFormat;\n\treadonly whenReady: () => Promise<void>;\n\treadonly updateContent: (doc: Document) => void;\n\treadonly emitControlValue: (value: NotectlValue) => void;\n}\n\nexport class EditorValueController {\n\tprivate readonly options: EditorValueControllerOptions;\n\tprivate lastDocument: Document | undefined;\n\tprivate mutedControlChanges = 0;\n\tprivate serializedReadVersion = 0;\n\tprivate writeQueue: Promise<void> = Promise.resolve();\n\n\tconstructor(options: EditorValueControllerOptions) {\n\t\tthis.options = options;\n\t}\n\n\treset(): void {\n\t\tthis.lastDocument = undefined;\n\t\tthis.serializedReadVersion++;\n\t}\n\n\thandleEditorStateChange(doc: Document): void {\n\t\tthis.lastDocument = doc;\n\t\tthis.options.updateContent(doc);\n\n\t\tif (this.mutedControlChanges > 0) return;\n\n\t\tconst readVersion = ++this.serializedReadVersion;\n\t\tvoid this.readCurrentValue().then((value: NotectlValue) => {\n\t\t\tif (readVersion !== this.serializedReadVersion) return;\n\t\t\tthis.options.emitControlValue(value);\n\t\t});\n\t}\n\n\tsyncExternalContent(doc: Document): void {\n\t\tif (doc === this.lastDocument) return;\n\t\tthis.lastDocument = doc;\n\t\tvoid this.enqueueSilent(async (editor: NotectlEditor) => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\twriteControlValue(value: NotectlValue): void {\n\t\tvoid this.enqueueSilent(async (editor: NotectlEditor) => {\n\t\t\tawait writeEditorValue(editor, this.options.getFormat(), value);\n\t\t});\n\t}\n\n\tsetDocument(doc: Document): Promise<void> {\n\t\tthis.lastDocument = doc;\n\t\treturn this.enqueueInteractive(async (editor: NotectlEditor) => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\tsetSerializedValue(value: NotectlValue): Promise<void> {\n\t\treturn this.enqueueInteractive(async (editor: NotectlEditor) => {\n\t\t\tawait writeEditorValue(editor, this.options.getFormat(), value);\n\t\t});\n\t}\n\n\tapplyInitialDocument(editor: NotectlEditor, doc: Document): Promise<void> {\n\t\tthis.lastDocument = doc;\n\t\treturn this.runSilent(async () => {\n\t\t\teditor.setJSON(doc);\n\t\t});\n\t}\n\n\tprivate async readCurrentValue(): Promise<NotectlValue> {\n\t\tconst editor: NotectlEditor | null = this.options.getEditor();\n\t\tif (!editor) return null;\n\t\treturn readEditorValue(editor, this.options.getFormat());\n\t}\n\n\tprivate enqueueSilent(task: (editor: NotectlEditor) => Promise<void>): Promise<void> {\n\t\treturn this.enqueue(task, true);\n\t}\n\n\tprivate enqueueInteractive(task: (editor: NotectlEditor) => Promise<void>): Promise<void> {\n\t\treturn this.enqueue(task, false);\n\t}\n\n\tprivate enqueue(task: (editor: NotectlEditor) => Promise<void>, silent: boolean): Promise<void> {\n\t\tconst next = this.writeQueue.then(async () => {\n\t\t\tawait this.options.whenReady();\n\t\t\tconst editor: NotectlEditor | null = this.options.getEditor();\n\t\t\tif (!editor) return;\n\n\t\t\tif (silent) {\n\t\t\t\tawait this.runSilent(() => task(editor));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait task(editor);\n\t\t});\n\n\t\tthis.writeQueue = next.catch(() => undefined);\n\t\treturn next;\n\t}\n\n\tprivate async runSilent(task: () => Promise<void>): Promise<void> {\n\t\tthis.mutedControlChanges++;\n\t\ttry {\n\t\t\tawait task();\n\t\t} finally {\n\t\t\tthis.mutedControlChanges--;\n\t\t}\n\t}\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport type { NotectlEditorConfig } from '@notectl/core';\n\n/**\n * Default configuration applied to all `<notectl-editor>` instances within\n * the injector scope. Component-level inputs override these defaults.\n */\nexport const NOTECTL_DEFAULT_CONFIG: InjectionToken<Partial<NotectlEditorConfig>> =\n\tnew InjectionToken<Partial<NotectlEditorConfig>>('notectl-default-config');\n\n/**\n * Content format used by the `ControlValueAccessor` for forms integration.\n * Determines how editor content is serialized when reading/writing form values.\n *\n * - `'json'` — `Document` objects (default)\n * - `'html'` — sanitized HTML strings\n * - `'text'` — plain text strings\n */\nexport const NOTECTL_CONTENT_FORMAT: InjectionToken<ContentFormat> =\n\tnew InjectionToken<ContentFormat>('notectl-content-format');\n\n/** Supported content serialization formats for forms integration. */\nexport type ContentFormat = 'json' | 'html' | 'text';\n\n/** Options for `provideNotectl()`. */\nexport interface NotectlProviderOptions {\n\t/** Default editor configuration applied to all instances. */\n\treadonly config?: Partial<NotectlEditorConfig>;\n\t/** Content serialization format for forms integration. Defaults to `'json'`. */\n\treadonly contentFormat?: ContentFormat;\n}\n\n/**\n * Configures the notectl editor at the environment injector level.\n *\n * @example\n * ```typescript\n * bootstrapApplication(App, {\n * providers: [\n * provideNotectl({\n * config: { theme: ThemePreset.Light, placeholder: 'Start typing...' },\n * contentFormat: 'json',\n * }),\n * ],\n * });\n * ```\n */\nexport function provideNotectl(options: NotectlProviderOptions = {}): EnvironmentProviders {\n\tconst providers = [];\n\n\tif (options.config) {\n\t\tproviders.push({ provide: NOTECTL_DEFAULT_CONFIG, useValue: options.config });\n\t}\n\n\tif (options.contentFormat) {\n\t\tproviders.push({ provide: NOTECTL_CONTENT_FORMAT, useValue: options.contentFormat });\n\t}\n\n\treturn makeEnvironmentProviders(providers);\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tDestroyRef,\n\ttype ElementRef,\n\ttype ModelSignal,\n\tafterNextRender,\n\tcomputed,\n\teffect,\n\tforwardRef,\n\tinject,\n\tinput,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type {\n\tDocument,\n\tEditorSelection,\n\tEditorState,\n\tNotectlEditorConfig,\n\tPaperSize,\n\tPlugin,\n\tPluginConfig,\n\tStateChangeEvent,\n\tTheme,\n\tTransaction,\n} from '@notectl/core';\nimport { NotectlEditor, ThemePreset } from '@notectl/core';\nimport type { Locale } from '@notectl/core';\nimport type { ContentCSSResult, ContentHTMLOptions } from '@notectl/core/html';\nimport type { TextFormattingConfig } from '@notectl/core/plugins/text-formatting';\n\nimport { EditorValueController } from './EditorValueController';\nimport { type ContentFormat, NOTECTL_CONTENT_FORMAT, NOTECTL_DEFAULT_CONFIG } from './tokens';\nimport type { NotectlValue, SelectionChangeEvent } from './types';\n\ninterface InitConfigSnapshot {\n\treadonly autofocus: boolean;\n\treadonly features: Partial<TextFormattingConfig> | undefined;\n\treadonly locale: Locale | undefined;\n\treadonly maxHistoryDepth: number | undefined;\n\treadonly plugins: readonly Plugin[];\n\treadonly styleNonce: string | undefined;\n\treadonly toolbar: NotectlEditorConfig['toolbar'];\n}\n\nfunction initConfigEquals(a: InitConfigSnapshot, b: InitConfigSnapshot): boolean {\n\treturn (\n\t\ta.plugins === b.plugins &&\n\t\ta.toolbar === b.toolbar &&\n\t\ta.features === b.features &&\n\t\ta.autofocus === b.autofocus &&\n\t\ta.maxHistoryDepth === b.maxHistoryDepth &&\n\t\ta.locale === b.locale &&\n\t\ta.styleNonce === b.styleNonce\n\t);\n}\n\n/**\n * Sentinel default for the Signal Forms `value` model. Reference identity lets the\n * value-to-editor effect ignore the untouched initial value (so it never clobbers\n * `content` or initial content) while still syncing any document a bound field provides.\n */\nconst EMPTY_FORM_VALUE: Document = { children: [] };\n\n@Component({\n\tselector: 'ntl-editor',\n\tstandalone: true,\n\ttemplate: '<div #host></div>',\n\tstyles: ':host { display: block; }',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => NotectlEditorComponent),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\t'[attr.aria-disabled]': 'effectiveReadonly() ? \"true\" : null',\n\t\t'[class.ntl-editor-disabled]': 'effectiveReadonly()',\n\t},\n})\nexport class NotectlEditorComponent implements ControlValueAccessor {\n\tprivate readonly destroyRef: DestroyRef = inject(DestroyRef);\n\tprivate readonly defaultConfig: Partial<NotectlEditorConfig> | null = inject(\n\t\tNOTECTL_DEFAULT_CONFIG,\n\t\t{ optional: true },\n\t);\n\tprivate readonly contentFormat: ContentFormat =\n\t\tinject(NOTECTL_CONTENT_FORMAT, { optional: true }) ?? 'json';\n\n\treadonly plugins = input<readonly Plugin[] | undefined>(undefined);\n\treadonly toolbar = input<NotectlEditorConfig['toolbar']>(undefined);\n\treadonly features = input<Partial<TextFormattingConfig> | undefined>(undefined);\n\treadonly placeholder = input<string | undefined>(undefined);\n\treadonly readonlyMode = input<boolean | undefined>(undefined);\n\treadonly autofocus = input<boolean | undefined>(undefined);\n\treadonly maxHistoryDepth = input<number | undefined>(undefined);\n\treadonly theme = input<ThemePreset | Theme | undefined>(undefined);\n\treadonly paperSize = input<PaperSize | undefined>(undefined);\n\treadonly dir = input<'ltr' | 'rtl' | undefined>(undefined);\n\treadonly locale = input<Locale | undefined>(undefined);\n\treadonly styleNonce = input<string | undefined>(undefined);\n\n\t/** Disabled status received from a bound Signal Forms field (`FormUiControl.disabled`). */\n\treadonly disabled = input<boolean>(false);\n\n\treadonly content: ModelSignal<Document | undefined> = model<Document | undefined>(undefined);\n\n\t/**\n\t * Signal Forms value model implementing the `FormValueControl<Document>` contract, so the\n\t * editor binds to Angular 22 Signal Forms through the `[formField]` directive. `value` and\n\t * `content` are independent views onto editor state: both are driven from editor state\n\t * changes and both write to the editor when set externally, never to each other.\n\t */\n\treadonly value: ModelSignal<Document> = model<Document>(EMPTY_FORM_VALUE);\n\n\treadonly stateChange = output<StateChangeEvent>();\n\treadonly selectionChange = output<SelectionChangeEvent>();\n\treadonly editorFocus = output<void>();\n\treadonly editorBlur = output<void>();\n\treadonly ready = output<void>();\n\n\t/** Emitted when the editor blurs, so a bound Signal Forms field marks itself touched. */\n\treadonly touch = output<void>();\n\n\treadonly editorState = signal<EditorState | null>(null);\n\treadonly isEmpty = computed<boolean>(() => {\n\t\tconst state: EditorState | null = this.editorState();\n\t\tif (!state) return true;\n\t\tconst doc: Document = state.doc;\n\t\tif (doc.children.length === 0) return true;\n\t\tif (doc.children.length > 1) return false;\n\t\tconst block = doc.children[0];\n\t\tif (!block) return true;\n\t\treturn block.type === 'paragraph' && block.children.length === 0;\n\t});\n\n\tprivate readonly resolvedPlugins = computed<readonly Plugin[]>(\n\t\t() => this.plugins() ?? this.defaultConfig?.plugins ?? [],\n\t);\n\tprivate readonly resolvedToolbar = computed<NotectlEditorConfig['toolbar']>(\n\t\t() => this.toolbar() ?? this.defaultConfig?.toolbar,\n\t);\n\tprivate readonly resolvedFeatures = computed<Partial<TextFormattingConfig> | undefined>(\n\t\t() => this.features() ?? this.defaultConfig?.features,\n\t);\n\tprivate readonly resolvedPlaceholder = computed<string>(\n\t\t() => this.placeholder() ?? this.defaultConfig?.placeholder ?? 'Start typing...',\n\t);\n\tprivate readonly resolvedReadonlyMode = computed<boolean>(\n\t\t() => this.readonlyMode() ?? this.defaultConfig?.readonly ?? false,\n\t);\n\tprivate readonly resolvedAutofocus = computed<boolean>(\n\t\t() => this.autofocus() ?? this.defaultConfig?.autofocus ?? false,\n\t);\n\tprivate readonly resolvedMaxHistoryDepth = computed<number | undefined>(\n\t\t() => this.maxHistoryDepth() ?? this.defaultConfig?.maxHistoryDepth,\n\t);\n\tprivate readonly resolvedTheme = computed<ThemePreset | Theme>(\n\t\t() => this.theme() ?? this.defaultConfig?.theme ?? ThemePreset.Light,\n\t);\n\tprivate readonly resolvedPaperSize = computed<PaperSize | undefined>(\n\t\t() => this.paperSize() ?? this.defaultConfig?.paperSize,\n\t);\n\tprivate readonly resolvedDir = computed<'ltr' | 'rtl' | undefined>(\n\t\t() => this.dir() ?? this.defaultConfig?.dir,\n\t);\n\tprivate readonly resolvedLocale = computed<Locale | undefined>(\n\t\t() => this.locale() ?? this.defaultConfig?.locale,\n\t);\n\tprivate readonly resolvedStyleNonce = computed<string | undefined>(\n\t\t() => this.styleNonce() ?? this.defaultConfig?.styleNonce,\n\t);\n\n\treadonly effectiveReadonly = computed<boolean>(\n\t\t() => this.disabledByForms() || this.disabled() || this.resolvedReadonlyMode(),\n\t);\n\n\tprivate readonly hostRef = viewChild.required<ElementRef<HTMLDivElement>>('host');\n\tprivate readonly initialized = signal(false);\n\tprivate readonly disabledByForms = signal(false);\n\n\tprivate readonly valueController = new EditorValueController({\n\t\temitControlValue: (value: NotectlValue) => this.onChange(value),\n\t\tgetEditor: () => this.editorRef,\n\t\tgetFormat: () => this.contentFormat,\n\t\tupdateContent: (doc: Document) => {\n\t\t\tthis.content.set(doc);\n\t\t\tthis.value.set(doc);\n\t\t},\n\t\twhenReady: () => this.readyPromise,\n\t});\n\n\tprivate editorRef: NotectlEditor | null = null;\n\tprivate readyResolve: (() => void) | null = null;\n\tprivate readyPromise!: Promise<void>;\n\tprivate lastInitConfig: InitConfigSnapshot | null = null;\n\tprivate queuedInitConfig: InitConfigSnapshot | null = null;\n\tprivate reinitializePromise: Promise<void> | null = null;\n\tprivate pendingInitialDocument: Document | undefined;\n\tprivate onChange: (value: NotectlValue) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\n\tconstructor() {\n\t\tthis.resetReadyPromise();\n\n\t\tafterNextRender(() => {\n\t\t\tthis.initEditor(this.captureInitConfig());\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\t\tif (!this.initialized() || !editor) return;\n\n\t\t\teditor.setTheme(this.resolvedTheme());\n\t\t\teditor.configure({\n\t\t\t\tdir: this.resolvedDir(),\n\t\t\t\tpaperSize: this.resolvedPaperSize(),\n\t\t\t\tplaceholder: this.resolvedPlaceholder(),\n\t\t\t\treadonly: this.effectiveReadonly(),\n\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst doc: Document | undefined = this.content();\n\t\t\tif (!doc) return;\n\t\t\tthis.valueController.syncExternalContent(doc);\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst doc: Document = this.value();\n\t\t\tif (doc === EMPTY_FORM_VALUE) return;\n\t\t\tthis.valueController.syncExternalContent(doc);\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.scheduleReinitialization(this.captureInitConfig());\n\t\t});\n\n\t\tthis.destroyRef.onDestroy(() => {\n\t\t\tvoid this.destroyEditor();\n\t\t});\n\t}\n\n\tgetJSON(): Document {\n\t\treturn this.requireEditor().getJSON();\n\t}\n\n\tsetJSON(doc: Document): void {\n\t\tvoid this.valueController.setDocument(doc);\n\t}\n\n\t/**\n\t * Returns the document as sanitized HTML. Mirrors {@link NotectlEditor.getContentHTML}.\n\t *\n\t * By default each block carries a `data-block-id` attribute so that\n\t * `setContentHTML(getContentHTML())` preserves block identity (and the caret)\n\t * across external sync. Pass `{ includeBlockIds: false }` for clean export HTML\n\t * without `data-block-id`, or `{ cssMode: 'classes' }` to extract a CSS class map.\n\t */\n\tasync getContentHTML(): Promise<string>;\n\tasync getContentHTML(options: ContentHTMLOptions & { cssMode?: 'inline' }): Promise<string>;\n\tasync getContentHTML(\n\t\toptions: ContentHTMLOptions & { cssMode: 'classes' },\n\t): Promise<ContentCSSResult>;\n\tasync getContentHTML(options?: ContentHTMLOptions): Promise<string | ContentCSSResult> {\n\t\tconst editor: NotectlEditor = this.requireEditor();\n\t\tif (!options) {\n\t\t\treturn editor.getContentHTML();\n\t\t}\n\t\tif (options.cssMode === 'classes') {\n\t\t\treturn editor.getContentHTML({ ...options, cssMode: 'classes' });\n\t\t}\n\t\treturn editor.getContentHTML({ ...options, cssMode: 'inline' });\n\t}\n\n\tasync setContentHTML(html: string): Promise<void> {\n\t\tawait this.valueController.setSerializedValue(html);\n\t}\n\n\tgetText(): string {\n\t\treturn this.requireEditor().getText();\n\t}\n\n\tsetText(value: string): void {\n\t\tthis.requireEditor().setText(value);\n\t}\n\n\tget commands(): NotectlEditor['commands'] {\n\t\treturn this.requireEditor().commands;\n\t}\n\n\tcan(): ReturnType<NotectlEditor['can']> {\n\t\treturn this.requireEditor().can();\n\t}\n\n\texecuteCommand(name: string): boolean {\n\t\treturn this.editorRef?.executeCommand(name) ?? false;\n\t}\n\n\tconfigurePlugin(pluginId: string, config: PluginConfig): void {\n\t\tthis.editorRef?.configurePlugin(pluginId, config);\n\t}\n\n\tdispatch(tr: Transaction): void {\n\t\tthis.editorRef?.dispatch(tr);\n\t}\n\n\tgetState(): EditorState {\n\t\treturn this.requireEditor().getState();\n\t}\n\n\tsetTheme(theme: ThemePreset | Theme): void {\n\t\tthis.editorRef?.setTheme(theme);\n\t}\n\n\tgetTheme(): ThemePreset | Theme {\n\t\treturn this.editorRef?.getTheme() ?? this.resolvedTheme();\n\t}\n\n\tsetReadonly(readonlyState: boolean): void {\n\t\tthis.editorRef?.configure({ readonly: readonlyState });\n\t}\n\n\twhenReady(): Promise<void> {\n\t\treturn this.readyPromise;\n\t}\n\n\tfocus(options?: FocusOptions): void {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor) return;\n\n\t\tconst focusTarget =\n\t\t\teditor.shadowRoot?.querySelector<HTMLElement>('[contenteditable]') ?? editor;\n\t\tfocusTarget.focus(options);\n\t}\n\n\twriteValue(value: NotectlValue): void {\n\t\tthis.valueController.writeControlValue(value);\n\t}\n\n\tregisterOnChange(fn: (value: NotectlValue) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabledByForms.set(isDisabled);\n\t}\n\n\tprivate resetReadyPromise(): void {\n\t\tthis.readyPromise = new Promise<void>((resolve) => {\n\t\t\tthis.readyResolve = resolve;\n\t\t});\n\t}\n\n\tprivate initEditor(snapshot: InitConfigSnapshot): void {\n\t\tconst hostElement: HTMLDivElement = this.hostRef().nativeElement;\n\t\tconst editor = new NotectlEditor();\n\t\tthis.editorRef = editor;\n\t\tthis.lastInitConfig = snapshot;\n\t\tthis.valueController.reset();\n\n\t\teditor.on('stateChange', (event: StateChangeEvent) => {\n\t\t\tthis.editorState.set(event.newState);\n\t\t\tthis.valueController.handleEditorStateChange(event.newState.doc);\n\t\t\tthis.stateChange.emit(event);\n\t\t});\n\n\t\teditor.on('selectionChange', (event: { selection: EditorSelection }) => {\n\t\t\tthis.selectionChange.emit(event);\n\t\t});\n\n\t\teditor.on('focus', () => {\n\t\t\tthis.editorFocus.emit();\n\t\t});\n\n\t\teditor.on('blur', () => {\n\t\t\t// Only blurs after the editor is initialized mark the form field touched; any blur\n\t\t\t// emitted while the editor is still setting up is not a user interaction.\n\t\t\tif (this.initialized()) {\n\t\t\t\tthis.onTouched();\n\t\t\t\tthis.touch.emit();\n\t\t\t}\n\t\t\tthis.editorBlur.emit();\n\t\t});\n\n\t\teditor.on('ready', () => {\n\t\t\tthis.initialized.set(true);\n\t\t\tthis.editorState.set(editor.getState());\n\t\t\tvoid this.applyInitialContent(editor).finally(() => {\n\t\t\t\tthis.readyResolve?.();\n\t\t\t\tthis.ready.emit();\n\t\t\t});\n\t\t});\n\n\t\teditor.init(this.buildConfig());\n\t\thostElement.appendChild(editor);\n\t}\n\n\tprivate async applyInitialContent(editor: NotectlEditor): Promise<void> {\n\t\tconst currentContent: Document | undefined = this.content();\n\t\tconst initialContent = currentContent ?? this.pendingInitialDocument;\n\t\tthis.pendingInitialDocument = undefined;\n\n\t\tif (!initialContent) return;\n\t\tawait this.valueController.applyInitialDocument(editor, initialContent);\n\t}\n\n\tprivate buildConfig(): NotectlEditorConfig {\n\t\tconst config: NotectlEditorConfig = {\n\t\t\t...this.defaultConfig,\n\t\t\tautofocus: this.resolvedAutofocus(),\n\t\t\tdir: this.resolvedDir(),\n\t\t\tlocale: this.resolvedLocale(),\n\t\t\tmaxHistoryDepth: this.resolvedMaxHistoryDepth(),\n\t\t\tpaperSize: this.resolvedPaperSize(),\n\t\t\tplaceholder: this.resolvedPlaceholder(),\n\t\t\tplugins: this.resolvedPlugins(),\n\t\t\treadonly: this.effectiveReadonly(),\n\t\t\tstyleNonce: this.resolvedStyleNonce(),\n\t\t\ttheme: this.resolvedTheme(),\n\t\t};\n\n\t\tconst toolbar = this.resolvedToolbar();\n\t\tif (toolbar !== undefined) {\n\t\t\tconfig.toolbar = toolbar;\n\t\t}\n\n\t\tconst features = this.resolvedFeatures();\n\t\tif (features !== undefined) {\n\t\t\tconfig.features = features;\n\t\t}\n\n\t\treturn config;\n\t}\n\n\tprivate captureInitConfig(): InitConfigSnapshot {\n\t\treturn {\n\t\t\tautofocus: this.resolvedAutofocus(),\n\t\t\tfeatures: this.resolvedFeatures(),\n\t\t\tlocale: this.resolvedLocale(),\n\t\t\tmaxHistoryDepth: this.resolvedMaxHistoryDepth(),\n\t\t\tplugins: this.resolvedPlugins(),\n\t\t\tstyleNonce: this.resolvedStyleNonce(),\n\t\t\ttoolbar: this.resolvedToolbar(),\n\t\t};\n\t}\n\n\tprivate scheduleReinitialization(snapshot: InitConfigSnapshot): void {\n\t\tif (!this.initialized() || !this.lastInitConfig) return;\n\t\tif (initConfigEquals(snapshot, this.lastInitConfig)) return;\n\n\t\tthis.queuedInitConfig = snapshot;\n\t\tif (this.reinitializePromise) return;\n\n\t\tthis.reinitializePromise = (async () => {\n\t\t\twhile (this.queuedInitConfig) {\n\t\t\t\tconst nextSnapshot = this.queuedInitConfig;\n\t\t\t\tthis.queuedInitConfig = null;\n\t\t\t\tthis.pendingInitialDocument = this.editorRef?.getJSON();\n\t\t\t\tthis.resetReadyPromise();\n\t\t\t\tthis.initialized.set(false);\n\t\t\t\tawait this.destroyEditor();\n\t\t\t\tthis.initEditor(nextSnapshot);\n\t\t\t\tawait this.readyPromise;\n\t\t\t}\n\t\t})().finally(() => {\n\t\t\tthis.reinitializePromise = null;\n\t\t});\n\t}\n\n\tprivate async destroyEditor(): Promise<void> {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor) {\n\t\t\tthis.initialized.set(false);\n\t\t\tthis.editorState.set(null);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editorRef = null;\n\t\teditor.remove();\n\t\tawait editor.destroy();\n\t\tthis.initialized.set(false);\n\t\tthis.editorState.set(null);\n\t}\n\n\tprivate requireEditor(): NotectlEditor {\n\t\tconst editor: NotectlEditor | null = this.editorRef;\n\t\tif (!editor || !this.initialized()) {\n\t\t\tthrow new Error('NotectlEditor is not initialized. Await whenReady() first.');\n\t\t}\n\t\treturn editor;\n\t}\n}\n","import { Directive } from '@angular/core';\n\n/**\n * @deprecated Angular Forms support is built into `NotectlEditorComponent`.\n *\n * This directive remains as a compatibility shim so existing imports do not break,\n * but it no longer participates in value accessor registration.\n */\n@Directive({\n\tselector: 'ntl-editor[formControl], ntl-editor[formControlName], ntl-editor[ngModel]',\n\tstandalone: true,\n})\nexport class NotectlValueAccessorDirective {}\n","import { DestroyRef, Injectable, computed, inject, signal } from '@angular/core';\nimport type { EditorState, StateChangeEvent, Transaction } from '@notectl/core';\nimport { type Observable, Subject } from 'rxjs';\n\nimport type { NotectlEditorComponent } from './notectl-editor.component';\n\n/**\n * Optional injectable service for programmatic editor access via DI.\n *\n * Useful when a toolbar or other component needs to interact with\n * the editor without a direct template reference.\n *\n * The service must be provided at a shared injector level and\n * connected to the editor component via `register()`.\n *\n * @example\n * ```typescript\n * @Component({\n * providers: [NotectlEditorService],\n * template: `\n * <app-toolbar />\n * <ntl-editor #editor [plugins]=\"plugins\" />\n * `,\n * })\n * export class EditorPage {\n * private readonly editor = viewChild.required<NotectlEditorComponent>('editor');\n * private readonly service = inject(NotectlEditorService);\n *\n * constructor() {\n * afterNextRender(() => {\n * this.service.register(this.editor());\n * });\n * }\n * }\n * ```\n */\n@Injectable()\nexport class NotectlEditorService {\n\tprivate readonly destroyRef: DestroyRef = inject(DestroyRef);\n\tprivate readonly editorRef = signal<NotectlEditorComponent | null>(null);\n\tprivate readonly stateChangeSubject = new Subject<StateChangeEvent>();\n\n\t/** Whether an editor is currently registered with this service. */\n\treadonly hasEditor = computed<boolean>(() => this.editorRef() !== null);\n\n\t/** Observable stream of state change events from the editor. */\n\treadonly stateChanges$: Observable<StateChangeEvent> = this.stateChangeSubject.asObservable();\n\n\tprivate stateChangeSub: { unsubscribe(): void } | null = null;\n\n\tconstructor() {\n\t\tthis.destroyRef.onDestroy(() => {\n\t\t\tthis.unregister();\n\t\t\tthis.stateChangeSubject.complete();\n\t\t});\n\t}\n\n\t/** Registers an editor component with this service. */\n\tregister(editor: NotectlEditorComponent): void {\n\t\tthis.unregister();\n\t\tthis.editorRef.set(editor);\n\n\t\tthis.stateChangeSub = editor.stateChange.subscribe((event: StateChangeEvent) => {\n\t\t\tthis.stateChangeSubject.next(event);\n\t\t});\n\t}\n\n\t/** Unregisters the current editor from this service. */\n\tunregister(): void {\n\t\tthis.stateChangeSub?.unsubscribe();\n\t\tthis.stateChangeSub = null;\n\t\tthis.editorRef.set(null);\n\t}\n\n\t/** Executes a named command on the registered editor. */\n\texecuteCommand(name: string): boolean {\n\t\tconst editor: NotectlEditorComponent | null = this.editorRef();\n\t\tif (!editor) return false;\n\t\treturn editor.executeCommand(name);\n\t}\n\n\t/** Returns the current editor state, or `null` if no editor is registered. */\n\tgetState(): EditorState | null {\n\t\tconst editor: NotectlEditorComponent | null = this.editorRef();\n\t\tif (!editor) return null;\n\t\ttry {\n\t\t\treturn editor.getState();\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/** Dispatches a transaction on the registered editor. */\n\tdispatch(tr: Transaction): void {\n\t\tthis.editorRef()?.dispatch(tr);\n\t}\n}\n","/**\n * @notectl/angular — Angular integration for the notectl rich text editor.\n * @packageDocumentation\n */\n\n// --- Angular Bindings ---\nexport { NotectlEditorComponent } from './lib/notectl-editor.component';\nexport { NotectlValueAccessorDirective } from './lib/value-accessor.directive';\nexport { NotectlEditorService } from './lib/notectl-editor.service';\n\n// --- Provider Function ---\nexport {\n\tprovideNotectl,\n\ttype NotectlProviderOptions,\n} from './lib/tokens';\n\n// --- Injection Tokens ---\nexport {\n\tNOTECTL_DEFAULT_CONFIG,\n\tNOTECTL_CONTENT_FORMAT,\n\ttype ContentFormat,\n} from './lib/tokens';\n\n// --- Angular-specific Types ---\nexport type { NotectlValue, SelectionChangeEvent } from './lib/types';\n\n// --- Re-exports from @notectl/core (convenience) ---\n\n// Model types\nexport type {\n\tDocument,\n\tBlockNode,\n\tTextNode,\n\tInlineNode,\n\tMark,\n\tBlockAttrs,\n} from '@notectl/core';\n\n// Selection types\nexport type { EditorSelection, Position, Selection } from '@notectl/core';\n\n// State types\nexport type {\n\tEditorState,\n\tTransaction,\n\tTransactionMetadata,\n\tStateChangeEvent,\n} from '@notectl/core';\n\n// Plugin types\nexport type { Plugin, PluginConfig, PluginContext } from '@notectl/core';\n\n// Theme types\nexport type { Theme, PartialTheme, ThemePrimitives } from '@notectl/core';\nexport { ThemePreset, LIGHT_THEME, DARK_THEME, createTheme } from '@notectl/core';\n\n// Editor config\nexport type { NotectlEditorConfig } from '@notectl/core';\n\n// HTML serialization option types (from sub-path export)\nexport type { ContentCSSResult, ContentHTMLOptions } from '@notectl/core/html';\n\n// Plugin config types (from sub-path exports)\nexport type { TextFormattingConfig } from '@notectl/core/plugins/text-formatting';\nexport type { FontDefinition } from '@notectl/core/plugins/font';\n\n// Starter fonts\n/** @deprecated Import from '@notectl/core/fonts' instead. */\nexport { STARTER_FONTS } from '@notectl/core/fonts';\n\n// Plugins (tree-shakable re-exports from sub-paths)\nexport { TextFormattingPlugin } from '@notectl/core/plugins/text-formatting';\nexport { HeadingPlugin } from '@notectl/core/plugins/heading';\nexport { ListPlugin } from '@notectl/core/plugins/list';\nexport { LinkPlugin } from '@notectl/core/plugins/link';\nexport { BlockquotePlugin } from '@notectl/core/plugins/blockquote';\nexport { CodeBlockPlugin } from '@notectl/core/plugins/code-block';\nexport { TablePlugin } from '@notectl/core/plugins/table';\nexport { ImagePlugin } from '@notectl/core/plugins/image';\nexport { HorizontalRulePlugin } from '@notectl/core/plugins/horizontal-rule';\nexport { HardBreakPlugin } from '@notectl/core/plugins/hard-break';\nexport { StrikethroughPlugin } from '@notectl/core/plugins/strikethrough';\nexport { HighlightPlugin } from '@notectl/core/plugins/highlight';\nexport { TextColorPlugin } from '@notectl/core/plugins/text-color';\nexport { FontPlugin } from '@notectl/core/plugins/font';\nexport { FontSizePlugin } from '@notectl/core/plugins/font-size';\nexport { AlignmentPlugin } from '@notectl/core/plugins/alignment';\nexport { TextDirectionPlugin } from '@notectl/core/plugins/text-direction';\nexport { BidiIsolationPlugin } from '@notectl/core/plugins/bidi-isolation';\nexport { TextDirectionAutoPlugin } from '@notectl/core/plugins/text-direction-auto';\nexport { SuperSubPlugin } from '@notectl/core/plugins/super-sub';\nexport { ToolbarPlugin } from '@notectl/core/plugins/toolbar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,UAAU,GAAG,SAAS;AAE5B,SAAS,eAAe,CAAC,KAAmB,EAAA;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AACnD;AAEO,eAAe,eAAe,CACpC,MAAwB,EACxB,MAAqB,EAAA;IAErB,QAAQ,MAAM;AACb,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,MAAM,CAAC,cAAc,EAAE;AAC/B,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,MAAM,CAAC,OAAO,EAAE;AACxB,QAAA;AACC,YAAA,OAAO,MAAM,CAAC,OAAO,EAAE;;AAE1B;AAEO,eAAe,gBAAgB,CACrC,MAAwB,EACxB,MAAqB,EACrB,KAAmB,EAAA;IAEnB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;AACnC,QAAA,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC;QACvC;IACD;IAEA,IAAI,MAAM,KAAK,MAAM,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;AAChD,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB;IACD;IAEA,IAAI,MAAM,KAAK,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;;;;AAInD,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB;IACD;AAEA,IAAA,IAAI,OAAO,KAAK,K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B,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC;IAC/B;uGA1DY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAApB,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC;;;ACpCD;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentFixture } from '@angular/core/testing';
2
- import { NotectlEditorComponent } from '@notectl/angular';
2
+ import { NotectlEditorComponent, ContentHTMLOptions, ContentCSSResult } from '@notectl/angular';
3
3
 
4
4
  /**
5
5
  * Test harness for `NotectlEditorComponent` in consumer tests.
@@ -27,8 +27,14 @@ declare class NotectlTestHarness {
27
27
  executeCommand(name: string): boolean;
28
28
  /** Sets HTML content and triggers change detection. */
29
29
  setContentHTML(html: string): Promise<void>;
30
- /** Returns the current HTML content. */
30
+ /** Returns the current HTML content. Mirrors {@link NotectlEditorComponent.getContentHTML}. */
31
31
  getContentHTML(): Promise<string>;
32
+ getContentHTML(options: ContentHTMLOptions & {
33
+ cssMode?: 'inline';
34
+ }): Promise<string>;
35
+ getContentHTML(options: ContentHTMLOptions & {
36
+ cssMode: 'classes';
37
+ }): Promise<ContentCSSResult>;
32
38
  /** Returns the current plain text content. */
33
39
  getText(): string;
34
40
  /** Returns whether the editor is empty. */
@@ -4,6 +4,8 @@ export { BlockAttrs, BlockNode, DARK_THEME, Document, EditorSelection, EditorSta
4
4
  import * as _angular_core from '@angular/core';
5
5
  import { ModelSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
6
6
  import { ControlValueAccessor } from '@angular/forms';
7
+ import { ContentHTMLOptions, ContentCSSResult } from '@notectl/core/html';
8
+ export { ContentCSSResult, ContentHTMLOptions } from '@notectl/core/html';
7
9
  import { TextFormattingConfig } from '@notectl/core/plugins/text-formatting';
8
10
  export { TextFormattingConfig, TextFormattingPlugin } from '@notectl/core/plugins/text-formatting';
9
11
  import { Observable } from 'rxjs';
@@ -100,7 +102,21 @@ declare class NotectlEditorComponent implements ControlValueAccessor {
100
102
  constructor();
101
103
  getJSON(): Document;
102
104
  setJSON(doc: Document): void;
105
+ /**
106
+ * Returns the document as sanitized HTML. Mirrors {@link NotectlEditor.getContentHTML}.
107
+ *
108
+ * By default each block carries a `data-block-id` attribute so that
109
+ * `setContentHTML(getContentHTML())` preserves block identity (and the caret)
110
+ * across external sync. Pass `{ includeBlockIds: false }` for clean export HTML
111
+ * without `data-block-id`, or `{ cssMode: 'classes' }` to extract a CSS class map.
112
+ */
103
113
  getContentHTML(): Promise<string>;
114
+ getContentHTML(options: ContentHTMLOptions & {
115
+ cssMode?: 'inline';
116
+ }): Promise<string>;
117
+ getContentHTML(options: ContentHTMLOptions & {
118
+ cssMode: 'classes';
119
+ }): Promise<ContentCSSResult>;
104
120
  setContentHTML(html: string): Promise<void>;
105
121
  getText(): string;
106
122
  setText(value: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notectl/angular",
3
- "version": "2.2.3",
3
+ "version": "2.2.6",
4
4
  "description": "Angular integration for the notectl rich text editor. Provides a standalone component, reactive forms support, and DI service.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "peerDependencies": {
44
44
  "@angular/core": ">=21.0.0",
45
45
  "@angular/forms": ">=21.0.0",
46
- "@notectl/core": "^2.2.3",
46
+ "@notectl/core": "^2.2.6",
47
47
  "rxjs": ">=7.0.0"
48
48
  },
49
49
  "devDependencies": {