@wirekyt/angular 0.0.21 → 0.0.23

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.
@@ -0,0 +1,196 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, viewChild, inject, ViewContainerRef, Injector, signal, computed, afterNextRender, effect, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ENVIRONMENT_TOKEN } from '@wirekyt/angular';
4
+
5
+ const resetStyle = "<style>*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }</style>";
6
+ const initialFrameSrcdoc = `<html><head>${resetStyle}</head><body><div class="frame-root"></div></body></html>`;
7
+ let frameId = 0;
8
+ const createDefaultTitle = () => {
9
+ const randomId = globalThis.crypto?.randomUUID?.();
10
+ return `frame:${randomId ?? ++frameId}`;
11
+ };
12
+ class Frame {
13
+ srcdoc = input(initialFrameSrcdoc, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "srcdoc" }] : /* istanbul ignore next */ []));
15
+ title = input(undefined, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
17
+ name = input(undefined, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
19
+ head = input(null, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "head" }] : /* istanbul ignore next */ []));
21
+ mount = output();
22
+ unmount = output();
23
+ frameElement = viewChild.required("frame", /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "frameElement" }] : /* istanbul ignore next */ []));
25
+ contentTpl = viewChild.required("content", /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
27
+ vcRef = inject(ViewContainerRef);
28
+ injector = inject(Injector);
29
+ defaultTitle = createDefaultTitle();
30
+ ready = signal(false, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
32
+ frameDocument = signal(undefined, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "frameDocument" }] : /* istanbul ignore next */ []));
34
+ frameRevision = signal(0, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "frameRevision" }] : /* istanbul ignore next */ []));
36
+ contentView;
37
+ headView;
38
+ resizeCleanup;
39
+ mounted = false;
40
+ environment = {
41
+ getRootNode: () => this.frameDocument(),
42
+ };
43
+ resolvedTitle = computed(() => this.title() ?? this.defaultTitle, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "resolvedTitle" }] : /* istanbul ignore next */ []));
45
+ constructor() {
46
+ afterNextRender(() => {
47
+ this.ready.set(true);
48
+ });
49
+ effect(() => {
50
+ const srcdoc = this.srcdoc() ?? initialFrameSrcdoc;
51
+ if (!this.ready())
52
+ return;
53
+ this.mountFrame(srcdoc);
54
+ });
55
+ effect(() => {
56
+ const head = this.head();
57
+ const doc = this.frameDocument();
58
+ this.frameRevision();
59
+ if (!this.ready() || !doc)
60
+ return;
61
+ this.mountHead(head, doc);
62
+ });
63
+ }
64
+ ngOnDestroy() {
65
+ this.destroyViews();
66
+ this.resizeCleanup?.();
67
+ if (this.mounted) {
68
+ this.mounted = false;
69
+ this.unmount.emit();
70
+ }
71
+ }
72
+ mountFrame(srcdoc) {
73
+ const frame = this.frameElement().nativeElement;
74
+ const doc = frame.contentDocument ?? frame.contentWindow?.document;
75
+ if (!doc)
76
+ return;
77
+ this.resizeCleanup?.();
78
+ this.resizeCleanup = undefined;
79
+ if (this.mounted) {
80
+ this.mounted = false;
81
+ this.unmount.emit();
82
+ }
83
+ this.destroyViews();
84
+ doc.open();
85
+ doc.write(srcdoc);
86
+ doc.close();
87
+ this.frameDocument.set(doc);
88
+ this.frameRevision.update((revision) => revision + 1);
89
+ const mountNode = doc.body.querySelector(".frame-root") ?? doc.body;
90
+ const frameInjector = this.createFrameInjector(doc);
91
+ this.contentView = this.vcRef.createEmbeddedView(this.contentTpl(), undefined, {
92
+ injector: frameInjector,
93
+ });
94
+ this.contentView.detectChanges();
95
+ for (const node of this.contentView.rootNodes) {
96
+ mountNode.appendChild(node);
97
+ }
98
+ this.observeSize(frame, mountNode, doc);
99
+ this.mounted = true;
100
+ this.mount.emit();
101
+ }
102
+ mountHead(head, doc) {
103
+ this.destroyView(this.headView);
104
+ this.headView = undefined;
105
+ if (!head)
106
+ return;
107
+ this.headView = this.vcRef.createEmbeddedView(head, undefined, {
108
+ injector: this.createFrameInjector(doc),
109
+ });
110
+ this.headView.detectChanges();
111
+ for (const node of this.headView.rootNodes) {
112
+ doc.head.appendChild(node);
113
+ }
114
+ }
115
+ destroyViews() {
116
+ for (const view of [this.contentView, this.headView]) {
117
+ this.destroyView(view);
118
+ }
119
+ this.contentView = undefined;
120
+ this.headView = undefined;
121
+ }
122
+ destroyView(view) {
123
+ if (!view)
124
+ return;
125
+ for (const node of view.rootNodes) {
126
+ node.parentNode?.removeChild(node);
127
+ }
128
+ view.destroy();
129
+ }
130
+ createFrameInjector(doc) {
131
+ return Injector.create({
132
+ providers: [
133
+ {
134
+ provide: ENVIRONMENT_TOKEN,
135
+ useValue: { getRootNode: () => doc },
136
+ },
137
+ ],
138
+ parent: this.injector,
139
+ });
140
+ }
141
+ observeSize(frame, mountNode, doc) {
142
+ this.resizeCleanup?.();
143
+ const win = doc.defaultView;
144
+ if (!win?.ResizeObserver)
145
+ return;
146
+ const updateSize = () => {
147
+ win.requestAnimationFrame(() => {
148
+ if (!frame.contentDocument?.documentElement)
149
+ return;
150
+ frame.style.setProperty("--width", `${mountNode.scrollWidth}px`);
151
+ frame.style.setProperty("--height", `${mountNode.scrollHeight}px`);
152
+ });
153
+ };
154
+ const observer = new win.ResizeObserver(updateSize);
155
+ observer.observe(mountNode);
156
+ updateSize();
157
+ this.resizeCleanup = () => observer.disconnect();
158
+ }
159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Frame, deps: [], target: i0.ɵɵFactoryTarget.Component });
160
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: Frame, isStandalone: true, selector: "frame", inputs: { srcdoc: { classPropertyName: "srcdoc", publicName: "srcdoc", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, head: { classPropertyName: "head", publicName: "head", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mount: "mount", unmount: "unmount" }, host: { styleAttribute: "display: block;" }, providers: [
161
+ {
162
+ provide: ENVIRONMENT_TOKEN,
163
+ useFactory: (frame) => frame.environment,
164
+ deps: [forwardRef(() => Frame)],
165
+ },
166
+ ], viewQueries: [{ propertyName: "frameElement", first: true, predicate: ["frame"], descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
167
+ <iframe #frame [attr.title]="resolvedTitle()" [attr.name]="name()"></iframe>
168
+ <ng-template #content>
169
+ <ng-content></ng-content>
170
+ </ng-template>
171
+ `, isInline: true, styles: ["iframe{border:0;display:block;height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
172
+ }
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Frame, decorators: [{
174
+ type: Component,
175
+ args: [{ selector: "frame", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
176
+ style: "display: block;",
177
+ }, providers: [
178
+ {
179
+ provide: ENVIRONMENT_TOKEN,
180
+ useFactory: (frame) => frame.environment,
181
+ deps: [forwardRef(() => Frame)],
182
+ },
183
+ ], template: `
184
+ <iframe #frame [attr.title]="resolvedTitle()" [attr.name]="name()"></iframe>
185
+ <ng-template #content>
186
+ <ng-content></ng-content>
187
+ </ng-template>
188
+ `, styles: ["iframe{border:0;display:block;height:100%;width:100%}\n"] }]
189
+ }], ctorParameters: () => [], propDecorators: { srcdoc: [{ type: i0.Input, args: [{ isSignal: true, alias: "srcdoc", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], head: [{ type: i0.Input, args: [{ isSignal: true, alias: "head", required: false }] }], mount: [{ type: i0.Output, args: ["mount"] }], unmount: [{ type: i0.Output, args: ["unmount"] }], frameElement: [{ type: i0.ViewChild, args: ["frame", { isSignal: true }] }], contentTpl: [{ type: i0.ViewChild, args: ["content", { isSignal: true }] }] } });
190
+
191
+ /**
192
+ * Generated bundle index. Do not edit.
193
+ */
194
+
195
+ export { Frame };
196
+ //# sourceMappingURL=wirekyt-angular-frame.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-frame.mjs","sources":["../../src/components/frame/frame.ts","../../src/components/frame/wirekyt-angular-frame.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Injector,\n type ElementRef,\n type EmbeddedViewRef,\n type OnDestroy,\n type TemplateRef,\n ViewContainerRef,\n afterNextRender,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { ENVIRONMENT_TOKEN, type EnvironmentContext } from \"@wirekyt/angular\";\n\nexport interface FrameBaseProps {\n head?: TemplateRef<unknown> | null;\n onMount?: (() => void) | undefined;\n onUnmount?: (() => void) | undefined;\n}\n\nexport interface FrameProps extends FrameBaseProps {\n srcdoc?: string;\n title?: string;\n name?: string;\n}\n\nconst resetStyle =\n \"<style>*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }</style>\";\nconst initialFrameSrcdoc = `<html><head>${resetStyle}</head><body><div class=\"frame-root\"></div></body></html>`;\nlet frameId = 0;\n\nconst createDefaultTitle = (): string => {\n const randomId = globalThis.crypto?.randomUUID?.();\n return `frame:${randomId ?? ++frameId}`;\n};\n\n@Component({\n selector: \"frame\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: \"display: block;\",\n },\n providers: [\n {\n provide: ENVIRONMENT_TOKEN,\n useFactory: (frame: Frame) => frame.environment,\n deps: [forwardRef(() => Frame)],\n },\n ],\n template: `\n <iframe #frame [attr.title]=\"resolvedTitle()\" [attr.name]=\"name()\"></iframe>\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n `,\n styles: [\n `\n iframe {\n border: 0;\n display: block;\n height: 100%;\n width: 100%;\n }\n `,\n ],\n})\nexport class Frame implements OnDestroy {\n readonly srcdoc = input<string | undefined>(initialFrameSrcdoc);\n readonly title = input<string | undefined>(undefined);\n readonly name = input<string | undefined>(undefined);\n readonly head = input<TemplateRef<unknown> | null>(null);\n readonly mount = output<void>();\n readonly unmount = output<void>();\n readonly frameElement = viewChild.required<ElementRef<HTMLIFrameElement>>(\"frame\");\n\n private readonly contentTpl = viewChild.required<TemplateRef<unknown>>(\"content\");\n private readonly vcRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly defaultTitle = createDefaultTitle();\n private readonly ready = signal(false);\n private readonly frameDocument = signal<Document | undefined>(undefined);\n private readonly frameRevision = signal(0);\n private contentView: EmbeddedViewRef<unknown> | undefined;\n private headView: EmbeddedViewRef<unknown> | undefined;\n private resizeCleanup: (() => void) | undefined;\n private mounted = false;\n\n readonly environment: EnvironmentContext = {\n getRootNode: () => this.frameDocument(),\n };\n\n protected readonly resolvedTitle = computed(() => this.title() ?? this.defaultTitle);\n\n constructor() {\n afterNextRender(() => {\n this.ready.set(true);\n });\n\n effect(() => {\n const srcdoc = this.srcdoc() ?? initialFrameSrcdoc;\n if (!this.ready()) return;\n this.mountFrame(srcdoc);\n });\n\n effect(() => {\n const head = this.head();\n const doc = this.frameDocument();\n this.frameRevision();\n if (!this.ready() || !doc) return;\n this.mountHead(head, doc);\n });\n }\n\n ngOnDestroy(): void {\n this.destroyViews();\n this.resizeCleanup?.();\n if (this.mounted) {\n this.mounted = false;\n this.unmount.emit();\n }\n }\n\n private mountFrame(srcdoc: string): void {\n const frame = this.frameElement().nativeElement;\n const doc = frame.contentDocument ?? frame.contentWindow?.document;\n if (!doc) return;\n\n this.resizeCleanup?.();\n this.resizeCleanup = undefined;\n if (this.mounted) {\n this.mounted = false;\n this.unmount.emit();\n }\n this.destroyViews();\n\n doc.open();\n doc.write(srcdoc);\n doc.close();\n this.frameDocument.set(doc);\n this.frameRevision.update((revision) => revision + 1);\n\n const mountNode = doc.body.querySelector<HTMLElement>(\".frame-root\") ?? doc.body;\n const frameInjector = this.createFrameInjector(doc);\n\n this.contentView = this.vcRef.createEmbeddedView(this.contentTpl(), undefined, {\n injector: frameInjector,\n });\n this.contentView.detectChanges();\n for (const node of this.contentView.rootNodes as Node[]) {\n mountNode.appendChild(node);\n }\n\n this.observeSize(frame, mountNode, doc);\n this.mounted = true;\n this.mount.emit();\n }\n\n private mountHead(head: TemplateRef<unknown> | null, doc: Document): void {\n this.destroyView(this.headView);\n this.headView = undefined;\n if (!head) return;\n\n this.headView = this.vcRef.createEmbeddedView(head, undefined, {\n injector: this.createFrameInjector(doc),\n });\n this.headView.detectChanges();\n for (const node of this.headView.rootNodes as Node[]) {\n doc.head.appendChild(node);\n }\n }\n\n private destroyViews(): void {\n for (const view of [this.contentView, this.headView]) {\n this.destroyView(view);\n }\n this.contentView = undefined;\n this.headView = undefined;\n }\n\n private destroyView(view: EmbeddedViewRef<unknown> | undefined): void {\n if (!view) return;\n for (const node of view.rootNodes as Node[]) {\n node.parentNode?.removeChild(node);\n }\n view.destroy();\n }\n\n private createFrameInjector(doc: Document): Injector {\n return Injector.create({\n providers: [\n {\n provide: ENVIRONMENT_TOKEN,\n useValue: { getRootNode: () => doc } satisfies EnvironmentContext,\n },\n ],\n parent: this.injector,\n });\n }\n\n private observeSize(frame: HTMLIFrameElement, mountNode: HTMLElement, doc: Document): void {\n this.resizeCleanup?.();\n const win = doc.defaultView as (Window & typeof globalThis) | null;\n if (!win?.ResizeObserver) return;\n\n const updateSize = () => {\n win.requestAnimationFrame(() => {\n if (!frame.contentDocument?.documentElement) return;\n frame.style.setProperty(\"--width\", `${mountNode.scrollWidth}px`);\n frame.style.setProperty(\"--height\", `${mountNode.scrollHeight}px`);\n });\n };\n const observer = new win.ResizeObserver(updateSize);\n observer.observe(mountNode);\n updateSize();\n this.resizeCleanup = () => observer.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAiCA,MAAM,UAAU,GACd,wFAAwF;AAC1F,MAAM,kBAAkB,GAAG,CAAA,YAAA,EAAe,UAAU,2DAA2D;AAC/G,IAAI,OAAO,GAAG,CAAC;AAEf,MAAM,kBAAkB,GAAG,MAAa;IACtC,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,EAAE,UAAU,IAAI;AAClD,IAAA,OAAO,SAAS,QAAQ,IAAI,EAAE,OAAO,EAAE;AACzC,CAAC;MAiCY,KAAK,CAAA;IACP,MAAM,GAAG,KAAK,CAAqB,kBAAkB;+EAAC;IACtD,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;IAC5C,IAAI,GAAG,KAAK,CAAqB,SAAS;6EAAC;IAC3C,IAAI,GAAG,KAAK,CAA8B,IAAI;6EAAC;IAC/C,KAAK,GAAG,MAAM,EAAQ;IACtB,OAAO,GAAG,MAAM,EAAQ;AACxB,IAAA,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAgC,OAAO;qFAAC;AAEjE,IAAA,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAuB,SAAS;mFAAC;AAChE,IAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,YAAY,GAAG,kBAAkB,EAAE;IACnC,KAAK,GAAG,MAAM,CAAC,KAAK;8EAAC;IACrB,aAAa,GAAG,MAAM,CAAuB,SAAS;sFAAC;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AA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,OAAO,oEAEV,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACnFlF;;AAEG;;;;"}
@@ -0,0 +1,79 @@
1
+ import { NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { computed, booleanAttribute, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { highlightWord } from '@wirekyt/dom/highlight-word';
5
+ export { highlightWord } from '@wirekyt/dom/highlight-word';
6
+
7
+ function useHighlight(options) {
8
+ return computed(() => highlightWord(options.context()));
9
+ }
10
+
11
+ const optionalBooleanAttribute = (value) => {
12
+ if (value == null)
13
+ return undefined;
14
+ return booleanAttribute(value);
15
+ };
16
+ class Highlight {
17
+ query = input.required(/* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
19
+ text = input.required(/* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
21
+ ignoreCase = input(undefined, { ...(ngDevMode ? { debugName: "ignoreCase" } : /* istanbul ignore next */ {}), transform: optionalBooleanAttribute });
22
+ matchAll = input(undefined, { ...(ngDevMode ? { debugName: "matchAll" } : /* istanbul ignore next */ {}), transform: optionalBooleanAttribute });
23
+ exactMatch = input(undefined, { ...(ngDevMode ? { debugName: "exactMatch" } : /* istanbul ignore next */ {}), transform: optionalBooleanAttribute });
24
+ markClass = input(undefined, /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "markClass" }] : /* istanbul ignore next */ []));
26
+ highlightProps = computed(() => {
27
+ const text = this.text();
28
+ if (typeof text !== "string") {
29
+ throw new Error("[wirekyt/highlight] text must be a string");
30
+ }
31
+ return {
32
+ query: this.query(),
33
+ text,
34
+ ignoreCase: this.ignoreCase(),
35
+ matchAll: this.matchAll(),
36
+ exactMatch: this.exactMatch(),
37
+ };
38
+ }, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "highlightProps" }] : /* istanbul ignore next */ []));
40
+ chunks = useHighlight({
41
+ context: () => this.highlightProps(),
42
+ });
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Highlight, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: Highlight, isStandalone: true, selector: "highlight", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, ignoreCase: { classPropertyName: "ignoreCase", publicName: "ignoreCase", isSignal: true, isRequired: false, transformFunction: null }, matchAll: { classPropertyName: "matchAll", publicName: "matchAll", isSignal: true, isRequired: false, transformFunction: null }, exactMatch: { classPropertyName: "exactMatch", publicName: "exactMatch", isSignal: true, isRequired: false, transformFunction: null }, markClass: { classPropertyName: "markClass", publicName: "markClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
45
+ @for (chunk of chunks(); track $index) {
46
+ @if (chunk.match) {
47
+ <mark [ngClass]="markClass()" [textContent]="chunk.text"></mark>
48
+ } @else {
49
+ {{ chunk.text }}
50
+ }
51
+ }
52
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Highlight, decorators: [{
55
+ type: Component,
56
+ args: [{
57
+ selector: "highlight",
58
+ standalone: true,
59
+ imports: [NgClass],
60
+ changeDetection: ChangeDetectionStrategy.OnPush,
61
+ host: { style: "display: contents" },
62
+ template: `
63
+ @for (chunk of chunks(); track $index) {
64
+ @if (chunk.match) {
65
+ <mark [ngClass]="markClass()" [textContent]="chunk.text"></mark>
66
+ } @else {
67
+ {{ chunk.text }}
68
+ }
69
+ }
70
+ `,
71
+ }]
72
+ }], propDecorators: { query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: true }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], ignoreCase: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreCase", required: false }] }], matchAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchAll", required: false }] }], exactMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "exactMatch", required: false }] }], markClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "markClass", required: false }] }] } });
73
+
74
+ /**
75
+ * Generated bundle index. Do not edit.
76
+ */
77
+
78
+ export { Highlight, useHighlight };
79
+ //# sourceMappingURL=wirekyt-angular-highlight.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-highlight.mjs","sources":["../../src/components/highlight/use.ts","../../src/components/highlight/highlight.ts","../../src/components/highlight/wirekyt-angular-highlight.ts"],"sourcesContent":["import type { Signal } from \"@angular/core\";\nimport type { HighlightChunk, HighlightWordProps } from \"@wirekyt/dom/highlight-word\";\n\nimport { computed } from \"@angular/core\";\nimport { highlightWord } from \"@wirekyt/dom/highlight-word\";\n\nexport interface UseHighlightProps extends HighlightWordProps {}\n\nexport interface UseHighlightOptions {\n context: () => UseHighlightProps;\n}\n\nexport type UseHighlightReturn = Signal<HighlightChunk[]>;\n\nexport function useHighlight(options: UseHighlightOptions): UseHighlightReturn {\n return computed(() => highlightWord(options.context()));\n}\n\nexport type { HighlightChunk };\n","import { NgClass } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n input,\n} from \"@angular/core\";\n\nimport type { UseHighlightProps } from \"./use\";\n\nimport { useHighlight } from \"./use\";\n\nconst optionalBooleanAttribute = (value: unknown): boolean | undefined => {\n if (value == null) return undefined;\n return booleanAttribute(value);\n};\n\nexport interface HighlightProps extends UseHighlightProps {\n markClass?: string | string[] | Set<string> | Record<string, unknown> | null;\n}\n\n@Component({\n selector: \"highlight\",\n standalone: true,\n imports: [NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: \"display: contents\" },\n template: `\n @for (chunk of chunks(); track $index) {\n @if (chunk.match) {\n <mark [ngClass]=\"markClass()\" [textContent]=\"chunk.text\"></mark>\n } @else {\n {{ chunk.text }}\n }\n }\n `,\n})\nexport class Highlight {\n readonly query = input.required<UseHighlightProps[\"query\"]>();\n readonly text = input.required<UseHighlightProps[\"text\"]>();\n readonly ignoreCase = input<boolean | undefined, unknown>(undefined, {\n transform: optionalBooleanAttribute,\n });\n readonly matchAll = input<boolean | undefined, unknown>(undefined, {\n transform: optionalBooleanAttribute,\n });\n readonly exactMatch = input<boolean | undefined, unknown>(undefined, {\n transform: optionalBooleanAttribute,\n });\n readonly markClass = input<HighlightProps[\"markClass\"]>(undefined);\n\n private readonly highlightProps = computed(() => {\n const text = this.text();\n if (typeof text !== \"string\") {\n throw new Error(\"[wirekyt/highlight] text must be a string\");\n }\n\n return {\n query: this.query(),\n text,\n ignoreCase: this.ignoreCase(),\n matchAll: this.matchAll(),\n exactMatch: this.exactMatch(),\n };\n });\n\n protected readonly chunks = useHighlight({\n context: () => this.highlightProps(),\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAcM,SAAU,YAAY,CAAC,OAA4B,EAAA;AACvD,IAAA,OAAO,QAAQ,CAAC,MAAM,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD;;ACHA,MAAM,wBAAwB,GAAG,CAAC,KAAc,KAAyB;IACvE,IAAI,KAAK,IAAI,IAAI;AAAE,QAAA,OAAO,SAAS;AACnC,IAAA,OAAO,gBAAgB,CAAC,KAAK,CAAC;AAChC,CAAC;MAsBY,SAAS,CAAA;IACX,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAA8B;IACpD,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAA6B;IAClD,UAAU,GAAG,KAAK,CAA+B,SAAS,kFACjE,SAAS,EAAE,wBAAwB,EAAA,CACnC;IACO,QAAQ,GAAG,KAAK,CAA+B,SAAS,gFAC/D,SAAS,EAAE,wBAAwB,EAAA,CACnC;IACO,UAAU,GAAG,KAAK,CAA+B,SAAS,kFACjE,SAAS,EAAE,wBAAwB,EAAA,CACnC;IACO,SAAS,GAAG,KAAK,CAA8B,SAAS;kFAAC;AAEjD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAAK;AAC9C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;AACxB,QAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC5B,YAAA,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC;QAC9D;QAEA,OAAO;AACL,YAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;YACnB,IAAI;AACJ,YAAA,U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A,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,mBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAVV;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAXS,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAaN,SAAS,EAAA,UAAA,EAAA,CAAA;kBAhBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;AACpC,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;AACF,iBAAA;;;ACrCD;;AAEG;;;;"}
@@ -0,0 +1,439 @@
1
+ import * as toast from '@wirekyt/dom/machines/toast';
2
+ export { anatomy as toastAnatomy } from '@wirekyt/dom/machines/toast';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, input, Injector, DestroyRef, Renderer2, ElementRef, PLATFORM_ID, signal, computed, EnvironmentInjector, runInInjectionContext, effect, afterNextRender, forwardRef, Directive, ChangeDetectionStrategy, Component, TemplateRef, ViewContainerRef } from '@angular/core';
5
+ import { injectLocale, injectEnvironment, createId, useMachine, buildRootCarrier, bindProps } from '@wirekyt/angular';
6
+ import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
7
+
8
+ function createToaster(props = {}) {
9
+ return toast.createStore(props);
10
+ }
11
+
12
+ const TOAST_CONTEXT = new InjectionToken("WIREKYT.TOAST_CONTEXT");
13
+ function injectToastContext() {
14
+ return inject(TOAST_CONTEXT);
15
+ }
16
+ const TOAST_CONTEXT_CARRIER = new InjectionToken("WIREKYT.TOAST_CONTEXT_CARRIER");
17
+ function injectToastContextCarrier() {
18
+ return inject(TOAST_CONTEXT_CARRIER);
19
+ }
20
+
21
+ function useToast(options) {
22
+ const locale = injectLocale();
23
+ const environment = injectEnvironment();
24
+ const fallbackId = createId();
25
+ return useMachine({
26
+ machine: toast.machine,
27
+ context: () => {
28
+ const props = options.context();
29
+ return {
30
+ dir: locale.dir,
31
+ getRootNode: environment.getRootNode,
32
+ ...props,
33
+ id: props.id ?? fallbackId,
34
+ };
35
+ },
36
+ connect: (service, normalize) => toast.connect(service, normalize),
37
+ });
38
+ }
39
+
40
+ function useToastGroup(options) {
41
+ const locale = injectLocale();
42
+ const environment = injectEnvironment();
43
+ const fallbackId = createId();
44
+ return useMachine({
45
+ machine: toast.group.machine,
46
+ context: () => {
47
+ const props = options.context();
48
+ return {
49
+ dir: locale.dir,
50
+ getRootNode: environment.getRootNode,
51
+ ...props,
52
+ id: props.id ?? fallbackId,
53
+ };
54
+ },
55
+ connect: (service, normalize) => toast.group.connect(service, normalize),
56
+ });
57
+ }
58
+
59
+ const noop = () => { };
60
+ const emptyProps = () => ({});
61
+ const fallbackToastApi = {
62
+ type: "info",
63
+ placement: "bottom",
64
+ visible: false,
65
+ paused: false,
66
+ closable: false,
67
+ pause: noop,
68
+ resume: noop,
69
+ dismiss: noop,
70
+ getRootProps: emptyProps,
71
+ getTitleProps: emptyProps,
72
+ getGhostBeforeProps: emptyProps,
73
+ getGhostAfterProps: emptyProps,
74
+ getDescriptionProps: emptyProps,
75
+ getCloseTriggerProps: emptyProps,
76
+ getActionTriggerProps: emptyProps,
77
+ };
78
+ class ToastRoot {
79
+ value = input(undefined, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
81
+ parent = input(undefined, /* @ts-ignore */
82
+ ...(ngDevMode ? [{ debugName: "parent" }] : /* istanbul ignore next */ []));
83
+ index = input(0, /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
85
+ injector = inject(Injector);
86
+ destroyRef = inject(DestroyRef);
87
+ renderer = inject(Renderer2);
88
+ elementRef = inject(ElementRef);
89
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
90
+ machine = signal(null, /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "machine" }] : /* istanbul ignore next */ []));
92
+ machineStartQueued = false;
93
+ destroyed = false;
94
+ state = computed(() => {
95
+ const machine = this.machine();
96
+ return machine?.state();
97
+ }, /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
99
+ api = computed(() => this.machine()?.api() ?? fallbackToastApi, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
101
+ send = (event) => this.service.send(event);
102
+ get service() {
103
+ const machine = this.machine();
104
+ if (!machine)
105
+ throw new Error("ToastRoot service is unavailable before the toast machine starts.");
106
+ return machine.service;
107
+ }
108
+ contextCarrier = buildRootCarrier({
109
+ root: this,
110
+ rootToken: TOAST_CONTEXT,
111
+ originInjector: this.injector,
112
+ environmentInjector: inject(EnvironmentInjector),
113
+ });
114
+ constructor() {
115
+ this.destroyRef.onDestroy(() => {
116
+ this.destroyed = true;
117
+ });
118
+ bindProps({
119
+ elementRef: this.elementRef,
120
+ renderer: this.renderer,
121
+ destroyRef: this.destroyRef,
122
+ props: () => this.api().getRootProps(),
123
+ });
124
+ this.renderGhostElements();
125
+ }
126
+ ngOnInit() {
127
+ if (!this.isBrowser)
128
+ return;
129
+ if (this.value() && this.parent()) {
130
+ this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));
131
+ return;
132
+ }
133
+ effect(() => {
134
+ if (!this.isBrowser || this.machine() || this.machineStartQueued || this.destroyed)
135
+ return;
136
+ if (!this.value() || !this.parent())
137
+ return;
138
+ this.machineStartQueued = true;
139
+ queueMicrotask(() => {
140
+ this.machineStartQueued = false;
141
+ if (this.destroyed || this.machine())
142
+ return;
143
+ if (!this.value() || !this.parent())
144
+ return;
145
+ this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));
146
+ });
147
+ });
148
+ }
149
+ getContextCarrier() {
150
+ return this.contextCarrier;
151
+ }
152
+ createMachine() {
153
+ return useToast({
154
+ context: () => {
155
+ const value = this.value();
156
+ const parent = this.parent();
157
+ if (!value || !parent) {
158
+ throw new Error("ToastRoot requires [value] and [parent] from a Toaster item.");
159
+ }
160
+ return {
161
+ ...value,
162
+ parent,
163
+ index: this.index(),
164
+ };
165
+ },
166
+ });
167
+ }
168
+ renderGhostElements() {
169
+ const before = this.renderer.createElement("div");
170
+ const after = this.renderer.createElement("div");
171
+ let destroyed = false;
172
+ bindProps({
173
+ elementRef: new ElementRef(before),
174
+ renderer: this.renderer,
175
+ destroyRef: this.destroyRef,
176
+ props: () => this.api().getGhostBeforeProps(),
177
+ });
178
+ bindProps({
179
+ elementRef: new ElementRef(after),
180
+ renderer: this.renderer,
181
+ destroyRef: this.destroyRef,
182
+ props: () => this.api().getGhostAfterProps(),
183
+ });
184
+ this.destroyRef.onDestroy(() => {
185
+ destroyed = true;
186
+ before.parentNode?.removeChild(before);
187
+ after.parentNode?.removeChild(after);
188
+ });
189
+ afterNextRender(() => {
190
+ if (destroyed)
191
+ return;
192
+ const host = this.elementRef.nativeElement;
193
+ this.renderer.insertBefore(host, before, host.firstChild);
194
+ this.renderer.appendChild(host, after);
195
+ });
196
+ }
197
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
198
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: ToastRoot, isStandalone: true, selector: "[toast-root]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, parent: { classPropertyName: "parent", publicName: "parent", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
199
+ { provide: TOAST_CONTEXT, useExisting: forwardRef(() => ToastRoot) },
200
+ {
201
+ provide: TOAST_CONTEXT_CARRIER,
202
+ useFactory: (root) => root.getContextCarrier(),
203
+ deps: [forwardRef(() => ToastRoot)],
204
+ },
205
+ ], exportAs: ["toastRoot"], ngImport: i0 });
206
+ }
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastRoot, decorators: [{
208
+ type: Directive,
209
+ args: [{
210
+ selector: "[toast-root]",
211
+ standalone: true,
212
+ exportAs: "toastRoot",
213
+ providers: [
214
+ { provide: TOAST_CONTEXT, useExisting: forwardRef(() => ToastRoot) },
215
+ {
216
+ provide: TOAST_CONTEXT_CARRIER,
217
+ useFactory: (root) => root.getContextCarrier(),
218
+ deps: [forwardRef(() => ToastRoot)],
219
+ },
220
+ ],
221
+ }]
222
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], parent: [{ type: i0.Input, args: [{ isSignal: true, alias: "parent", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }] } });
223
+
224
+ const emptyGroupProps = () => ({});
225
+ const fallbackGroupApi = {
226
+ getCount: () => 0,
227
+ getToasts: () => [],
228
+ subscribe: () => () => { },
229
+ getGroupProps: emptyGroupProps,
230
+ };
231
+ class Toaster {
232
+ toaster = input.required(/* @ts-ignore */
233
+ ...(ngDevMode ? [{ debugName: "toaster" }] : /* istanbul ignore next */ []));
234
+ itemTemplate = input.required(/* @ts-ignore */
235
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
236
+ id = input(undefined, /* @ts-ignore */
237
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
238
+ label = input(undefined, /* @ts-ignore */
239
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
240
+ injector = inject(Injector);
241
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
242
+ machine = signal(null, /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "machine" }] : /* istanbul ignore next */ []));
244
+ state = computed(() => {
245
+ const machine = this.machine();
246
+ return machine?.state();
247
+ }, /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
249
+ api = computed(() => this.machine()?.api() ?? fallbackGroupApi, /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
251
+ toasts = computed(() => this.api().getToasts(), /* @ts-ignore */
252
+ ...(ngDevMode ? [{ debugName: "toasts" }] : /* istanbul ignore next */ []));
253
+ send = (event) => this.service.send(event);
254
+ get service() {
255
+ const machine = this.machine();
256
+ if (!machine)
257
+ throw new Error("Toaster service is unavailable before the toast group machine starts.");
258
+ return machine.service;
259
+ }
260
+ constructor() {
261
+ bindProps({
262
+ elementRef: inject(ElementRef),
263
+ renderer: inject(Renderer2),
264
+ destroyRef: inject(DestroyRef),
265
+ props: () => this.api().getGroupProps(this.label() ? { label: this.label() } : undefined),
266
+ });
267
+ }
268
+ ngOnInit() {
269
+ if (!this.isBrowser)
270
+ return;
271
+ this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));
272
+ }
273
+ createMachine() {
274
+ return useToastGroup({
275
+ context: () => ({
276
+ store: this.toaster(),
277
+ id: this.id(),
278
+ }),
279
+ });
280
+ }
281
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Toaster, deps: [], target: i0.ɵɵFactoryTarget.Component });
282
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: Toaster, isStandalone: true, selector: "toast-toaster", inputs: { toaster: { classPropertyName: "toaster", publicName: "toaster", isSignal: true, isRequired: true, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
283
+ @for (toast of toasts(); track toast.id; let index = $index) {
284
+ <div toast-root [value]="toast" [parent]="service" [index]="index" #root="toastRoot">
285
+ <ng-container
286
+ [ngTemplateOutlet]="itemTemplate()"
287
+ [ngTemplateOutletContext]="{ $implicit: toast }"
288
+ [ngTemplateOutletInjector]="root.getContextCarrier().elementInjector"
289
+ ></ng-container>
290
+ </div>
291
+ }
292
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ToastRoot, selector: "[toast-root]", inputs: ["value", "parent", "index"], exportAs: ["toastRoot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: Toaster, decorators: [{
295
+ type: Component,
296
+ args: [{
297
+ selector: "toast-toaster",
298
+ standalone: true,
299
+ imports: [NgTemplateOutlet, ToastRoot],
300
+ changeDetection: ChangeDetectionStrategy.OnPush,
301
+ template: `
302
+ @for (toast of toasts(); track toast.id; let index = $index) {
303
+ <div toast-root [value]="toast" [parent]="service" [index]="index" #root="toastRoot">
304
+ <ng-container
305
+ [ngTemplateOutlet]="itemTemplate()"
306
+ [ngTemplateOutletContext]="{ $implicit: toast }"
307
+ [ngTemplateOutletInjector]="root.getContextCarrier().elementInjector"
308
+ ></ng-container>
309
+ </div>
310
+ }
311
+ `,
312
+ }]
313
+ }], ctorParameters: () => [], propDecorators: { toaster: [{ type: i0.Input, args: [{ isSignal: true, alias: "toaster", required: true }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
314
+
315
+ class ToastContext {
316
+ static ngTemplateContextGuard(_directive, context) {
317
+ void context;
318
+ return true;
319
+ }
320
+ toast = injectToastContext();
321
+ templateRef = inject(TemplateRef);
322
+ viewContainer = inject(ViewContainerRef);
323
+ constructor() {
324
+ const view = this.viewContainer.createEmbeddedView(this.templateRef, {
325
+ $implicit: this.toast.api,
326
+ api: this.toast.api,
327
+ });
328
+ effect(() => {
329
+ this.toast.api();
330
+ view.detectChanges();
331
+ });
332
+ inject(DestroyRef).onDestroy(() => view.destroy());
333
+ }
334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
335
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: ToastContext, isStandalone: true, selector: "[toast-context]", exportAs: ["toastContext"], ngImport: i0 });
336
+ }
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastContext, decorators: [{
338
+ type: Directive,
339
+ args: [{
340
+ selector: "[toast-context]",
341
+ standalone: true,
342
+ exportAs: "toastContext",
343
+ }]
344
+ }], ctorParameters: () => [] });
345
+
346
+ class ToastTitle {
347
+ constructor() {
348
+ const context = injectToastContext();
349
+ bindProps({
350
+ elementRef: inject(ElementRef),
351
+ renderer: inject(Renderer2),
352
+ destroyRef: inject(DestroyRef),
353
+ props: () => context.api().getTitleProps(),
354
+ });
355
+ }
356
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
357
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: ToastTitle, isStandalone: true, selector: "[toast-title]", exportAs: ["toastTitle"], ngImport: i0 });
358
+ }
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastTitle, decorators: [{
360
+ type: Directive,
361
+ args: [{
362
+ selector: "[toast-title]",
363
+ standalone: true,
364
+ exportAs: "toastTitle",
365
+ }]
366
+ }], ctorParameters: () => [] });
367
+
368
+ class ToastDescription {
369
+ constructor() {
370
+ const context = injectToastContext();
371
+ bindProps({
372
+ elementRef: inject(ElementRef),
373
+ renderer: inject(Renderer2),
374
+ destroyRef: inject(DestroyRef),
375
+ props: () => context.api().getDescriptionProps(),
376
+ });
377
+ }
378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
379
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: ToastDescription, isStandalone: true, selector: "[toast-description]", exportAs: ["toastDescription"], ngImport: i0 });
380
+ }
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastDescription, decorators: [{
382
+ type: Directive,
383
+ args: [{
384
+ selector: "[toast-description]",
385
+ standalone: true,
386
+ exportAs: "toastDescription",
387
+ }]
388
+ }], ctorParameters: () => [] });
389
+
390
+ class ToastActionTrigger {
391
+ constructor() {
392
+ const context = injectToastContext();
393
+ bindProps({
394
+ elementRef: inject(ElementRef),
395
+ renderer: inject(Renderer2),
396
+ destroyRef: inject(DestroyRef),
397
+ props: () => context.api().getActionTriggerProps(),
398
+ });
399
+ }
400
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastActionTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
401
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: ToastActionTrigger, isStandalone: true, selector: "[toast-action-trigger]", exportAs: ["toastActionTrigger"], ngImport: i0 });
402
+ }
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastActionTrigger, decorators: [{
404
+ type: Directive,
405
+ args: [{
406
+ selector: "[toast-action-trigger]",
407
+ standalone: true,
408
+ exportAs: "toastActionTrigger",
409
+ }]
410
+ }], ctorParameters: () => [] });
411
+
412
+ class ToastCloseTrigger {
413
+ constructor() {
414
+ const context = injectToastContext();
415
+ bindProps({
416
+ elementRef: inject(ElementRef),
417
+ renderer: inject(Renderer2),
418
+ destroyRef: inject(DestroyRef),
419
+ props: () => context.api().getCloseTriggerProps(),
420
+ });
421
+ }
422
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastCloseTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
423
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: ToastCloseTrigger, isStandalone: true, selector: "[toast-close-trigger]", exportAs: ["toastCloseTrigger"], ngImport: i0 });
424
+ }
425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ToastCloseTrigger, decorators: [{
426
+ type: Directive,
427
+ args: [{
428
+ selector: "[toast-close-trigger]",
429
+ standalone: true,
430
+ exportAs: "toastCloseTrigger",
431
+ }]
432
+ }], ctorParameters: () => [] });
433
+
434
+ /**
435
+ * Generated bundle index. Do not edit.
436
+ */
437
+
438
+ export { TOAST_CONTEXT, TOAST_CONTEXT_CARRIER, ToastActionTrigger, ToastCloseTrigger, ToastContext, ToastDescription, ToastRoot, ToastTitle, Toaster, createToaster, injectToastContext, injectToastContextCarrier, useToast, useToastGroup };
439
+ //# sourceMappingURL=wirekyt-angular-toast.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-toast.mjs","sources":["../../src/components/toast/create-toaster.ts","../../src/components/toast/use-context.ts","../../src/components/toast/use.ts","../../src/components/toast/use-group.ts","../../src/components/toast/root.ts","../../src/components/toast/toaster.ts","../../src/components/toast/context.ts","../../src/components/toast/title.ts","../../src/components/toast/description.ts","../../src/components/toast/action-trigger.ts","../../src/components/toast/close-trigger.ts","../../src/components/toast/wirekyt-angular-toast.ts"],"sourcesContent":["import * as toast from \"@wirekyt/dom/machines/toast\";\n\nexport type CreateToasterProps = toast.StoreProps;\n\nexport type CreateToasterReturn = toast.Store;\n\nexport function createToaster(props: CreateToasterProps = {}): CreateToasterReturn {\n return toast.createStore(props);\n}\n","import type { ContextCarrier } from \"@wirekyt/angular\";\n\nimport { InjectionToken, inject } from \"@angular/core\";\n\nimport type { ToastRoot } from \"./root\";\n\nexport const TOAST_CONTEXT = new InjectionToken<ToastRoot>(\"WIREKYT.TOAST_CONTEXT\");\n\nexport function injectToastContext(): ToastRoot {\n return inject(TOAST_CONTEXT);\n}\n\nexport const TOAST_CONTEXT_CARRIER = new InjectionToken<ContextCarrier<ToastRoot>>(\n \"WIREKYT.TOAST_CONTEXT_CARRIER\",\n);\n\nexport function injectToastContextCarrier(): ContextCarrier<ToastRoot> {\n return inject(TOAST_CONTEXT_CARRIER);\n}\n","import type { Machine } from \"@wirekyt/dom\";\n\nimport {\n createId,\n injectEnvironment,\n injectLocale,\n useMachine,\n type UseMachineReturn,\n} from \"@wirekyt/angular\";\nimport * as toast from \"@wirekyt/dom/machines/toast\";\n\nexport type UseToastProps = Omit<toast.Props, \"dir\" | \"getRootNode\">;\n\nexport type UseToastReturn = UseMachineReturn<toast.Service[\"state\"], toast.Api, toast.Service>;\n\nexport interface UseToastOptions {\n context: () => UseToastProps;\n}\n\ntype ToastSchema = toast.Machine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useToast(options: UseToastOptions): UseToastReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const fallbackId = createId();\n\n return useMachine<ToastSchema, toast.Api>({\n machine: toast.machine,\n context: () => {\n const props = options.context();\n return {\n dir: locale.dir,\n getRootNode: environment.getRootNode as toast.Props[\"getRootNode\"],\n ...props,\n id: props.id ?? fallbackId,\n };\n },\n connect: (service, normalize) => toast.connect(service, normalize),\n });\n}\n","import type { Machine } from \"@wirekyt/dom\";\n\nimport {\n createId,\n injectEnvironment,\n injectLocale,\n useMachine,\n type UseMachineReturn,\n} from \"@wirekyt/angular\";\nimport * as toast from \"@wirekyt/dom/machines/toast\";\n\nexport type UseToastGroupProps = Omit<toast.GroupProps, \"dir\" | \"getRootNode\" | \"id\"> & {\n id?: string | undefined;\n};\n\nexport type UseToastGroupReturn = UseMachineReturn<\n toast.GroupService[\"state\"],\n toast.GroupApi,\n toast.GroupService\n>;\n\nexport interface UseToastGroupOptions {\n context: () => UseToastGroupProps;\n}\n\ntype ToastGroupSchema = toast.GroupMachine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useToastGroup(options: UseToastGroupOptions): UseToastGroupReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const fallbackId = createId();\n\n return useMachine<ToastGroupSchema, toast.GroupApi>({\n machine: toast.group.machine,\n context: () => {\n const props = options.context();\n return {\n dir: locale.dir,\n getRootNode: environment.getRootNode as toast.GroupProps[\"getRootNode\"],\n ...props,\n id: props.id ?? fallbackId,\n };\n },\n connect: (service, normalize) => toast.group.connect(service, normalize),\n });\n}\n","import { isPlatformBrowser } from \"@angular/common\";\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n EnvironmentInjector,\n Injector,\n PLATFORM_ID,\n Renderer2,\n type ProviderToken,\n type Signal,\n afterNextRender,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n runInInjectionContext,\n signal,\n type InputSignal,\n type OnInit,\n} from \"@angular/core\";\nimport { bindProps, buildRootCarrier, type ContextCarrier } from \"@wirekyt/angular\";\nimport * as toast from \"@wirekyt/dom/machines/toast\";\n\nimport { useToast, type UseToastReturn } from \"./use\";\nimport { TOAST_CONTEXT, TOAST_CONTEXT_CARRIER } from \"./use-context\";\n\ntype ToastElementProps = Record<string, unknown>;\n\nconst noop = (): void => {};\nconst emptyProps = (): ToastElementProps => ({});\n\nconst fallbackToastApi: toast.Api = {\n type: \"info\",\n placement: \"bottom\",\n visible: false,\n paused: false,\n closable: false,\n pause: noop,\n resume: noop,\n dismiss: noop,\n getRootProps: emptyProps,\n getTitleProps: emptyProps,\n getGhostBeforeProps: emptyProps,\n getGhostAfterProps: emptyProps,\n getDescriptionProps: emptyProps,\n getCloseTriggerProps: emptyProps,\n getActionTriggerProps: emptyProps,\n};\n\n@Directive({\n selector: \"[toast-root]\",\n standalone: true,\n exportAs: \"toastRoot\",\n providers: [\n { provide: TOAST_CONTEXT, useExisting: forwardRef(() => ToastRoot) },\n {\n provide: TOAST_CONTEXT_CARRIER,\n useFactory: (root: ToastRoot) => root.getContextCarrier(),\n deps: [forwardRef(() => ToastRoot)],\n },\n ],\n})\nexport class ToastRoot implements OnInit {\n readonly value: InputSignal<toast.Props | undefined> = input<toast.Props | undefined>(undefined);\n readonly parent: InputSignal<toast.GroupService | undefined> = input<\n toast.GroupService | undefined\n >(undefined);\n readonly index: InputSignal<number> = input(0);\n\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly machine = signal<UseToastReturn | null>(null);\n private machineStartQueued = false;\n private destroyed = false;\n readonly state: Signal<toast.Service[\"state\"] | undefined> = computed(() => {\n const machine = this.machine();\n return machine?.state();\n });\n readonly api: Signal<toast.Api> = computed(() => this.machine()?.api() ?? fallbackToastApi);\n\n readonly send: toast.Service[\"send\"] = (event) => this.service.send(event);\n\n get service(): toast.Service {\n const machine = this.machine();\n if (!machine)\n throw new Error(\"ToastRoot service is unavailable before the toast machine starts.\");\n return machine.service;\n }\n\n protected readonly contextCarrier: ContextCarrier<ToastRoot> = buildRootCarrier<ToastRoot>({\n root: this,\n rootToken: TOAST_CONTEXT as ProviderToken<ToastRoot>,\n originInjector: this.injector,\n environmentInjector: inject(EnvironmentInjector),\n });\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n });\n\n bindProps({\n elementRef: this.elementRef,\n renderer: this.renderer,\n destroyRef: this.destroyRef,\n props: () => this.api().getRootProps(),\n });\n this.renderGhostElements();\n }\n\n ngOnInit(): void {\n if (!this.isBrowser) return;\n if (this.value() && this.parent()) {\n this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));\n return;\n }\n\n effect(() => {\n if (!this.isBrowser || this.machine() || this.machineStartQueued || this.destroyed) return;\n if (!this.value() || !this.parent()) return;\n this.machineStartQueued = true;\n queueMicrotask(() => {\n this.machineStartQueued = false;\n if (this.destroyed || this.machine()) return;\n if (!this.value() || !this.parent()) return;\n this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));\n });\n });\n }\n\n getContextCarrier(): ContextCarrier<ToastRoot> {\n return this.contextCarrier;\n }\n\n private createMachine(): UseToastReturn {\n return useToast({\n context: () => {\n const value = this.value();\n const parent = this.parent();\n if (!value || !parent) {\n throw new Error(\"ToastRoot requires [value] and [parent] from a Toaster item.\");\n }\n return {\n ...value,\n parent,\n index: this.index(),\n };\n },\n });\n }\n\n private renderGhostElements(): void {\n const before = this.renderer.createElement(\"div\") as HTMLElement;\n const after = this.renderer.createElement(\"div\") as HTMLElement;\n let destroyed = false;\n\n bindProps({\n elementRef: new ElementRef(before),\n renderer: this.renderer,\n destroyRef: this.destroyRef,\n props: () => this.api().getGhostBeforeProps(),\n });\n bindProps({\n elementRef: new ElementRef(after),\n renderer: this.renderer,\n destroyRef: this.destroyRef,\n props: () => this.api().getGhostAfterProps(),\n });\n\n this.destroyRef.onDestroy(() => {\n destroyed = true;\n before.parentNode?.removeChild(before);\n after.parentNode?.removeChild(after);\n });\n\n afterNextRender(() => {\n if (destroyed) return;\n const host = this.elementRef.nativeElement;\n this.renderer.insertBefore(host, before, host.firstChild);\n this.renderer.appendChild(host, after);\n });\n }\n}\n","import { NgTemplateOutlet, isPlatformBrowser } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n PLATFORM_ID,\n Renderer2,\n type Signal,\n computed,\n inject,\n input,\n runInInjectionContext,\n signal,\n type InputSignal,\n type OnInit,\n type TemplateRef,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport * as toast from \"@wirekyt/dom/machines/toast\";\n\nimport type { CreateToasterReturn } from \"./create-toaster\";\n\nimport { ToastRoot } from \"./root\";\nimport { useToastGroup, type UseToastGroupProps, type UseToastGroupReturn } from \"./use-group\";\n\nconst emptyGroupProps = (): Record<string, unknown> => ({});\n\nconst fallbackGroupApi: toast.GroupApi = {\n getCount: () => 0,\n getToasts: () => [],\n subscribe: () => () => {},\n getGroupProps: emptyGroupProps,\n};\n\nexport interface ToasterProps extends Omit<UseToastGroupProps, \"store\" | \"id\"> {\n toaster: CreateToasterReturn;\n itemTemplate: TemplateRef<{ $implicit: toast.Options }>;\n id?: string;\n}\n\nexport type ToastOptions = toast.Options;\n\n@Component({\n selector: \"toast-toaster\",\n standalone: true,\n imports: [NgTemplateOutlet, ToastRoot],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @for (toast of toasts(); track toast.id; let index = $index) {\n <div toast-root [value]=\"toast\" [parent]=\"service\" [index]=\"index\" #root=\"toastRoot\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: toast }\"\n [ngTemplateOutletInjector]=\"root.getContextCarrier().elementInjector\"\n ></ng-container>\n </div>\n }\n `,\n})\nexport class Toaster implements OnInit {\n readonly toaster: InputSignal<CreateToasterReturn> = input.required<CreateToasterReturn>();\n readonly itemTemplate: InputSignal<TemplateRef<{ $implicit: toast.Options }>> =\n input.required<TemplateRef<{ $implicit: toast.Options }>>();\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly label: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n private readonly injector = inject(Injector);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly machine = signal<UseToastGroupReturn | null>(null);\n\n readonly state: Signal<toast.GroupService[\"state\"] | undefined> = computed(() => {\n const machine = this.machine();\n return machine?.state();\n });\n readonly api: Signal<toast.GroupApi> = computed(() => this.machine()?.api() ?? fallbackGroupApi);\n readonly toasts: Signal<toast.Props[]> = computed(() => this.api().getToasts());\n\n readonly send: toast.GroupService[\"send\"] = (event) => this.service.send(event);\n\n get service(): toast.GroupService {\n const machine = this.machine();\n if (!machine)\n throw new Error(\"Toaster service is unavailable before the toast group machine starts.\");\n return machine.service;\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.api().getGroupProps(this.label() ? { label: this.label() } : undefined),\n });\n }\n\n ngOnInit(): void {\n if (!this.isBrowser) return;\n this.machine.set(runInInjectionContext(this.injector, () => this.createMachine()));\n }\n\n private createMachine(): UseToastGroupReturn {\n return useToastGroup({\n context: () => ({\n store: this.toaster(),\n id: this.id(),\n }),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n} from \"@angular/core\";\n\nimport type { UseToastReturn } from \"./use\";\n\nimport { injectToastContext } from \"./use-context\";\n\nexport interface ToastContextTemplate {\n $implicit: UseToastReturn[\"api\"];\n api: UseToastReturn[\"api\"];\n}\n\n@Directive({\n selector: \"[toast-context]\",\n standalone: true,\n exportAs: \"toastContext\",\n})\nexport class ToastContext {\n static ngTemplateContextGuard(\n _directive: ToastContext,\n context: unknown,\n ): context is ToastContextTemplate {\n void context;\n return true;\n }\n\n private readonly toast = injectToastContext();\n private readonly templateRef = inject<TemplateRef<ToastContextTemplate>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n constructor() {\n const view = this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: this.toast.api,\n api: this.toast.api,\n });\n\n effect(() => {\n this.toast.api();\n view.detectChanges();\n });\n\n inject(DestroyRef).onDestroy(() => view.destroy());\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectToastContext } from \"./use-context\";\n\n@Directive({\n selector: \"[toast-title]\",\n standalone: true,\n exportAs: \"toastTitle\",\n})\nexport class ToastTitle {\n constructor() {\n const context = injectToastContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getTitleProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectToastContext } from \"./use-context\";\n\n@Directive({\n selector: \"[toast-description]\",\n standalone: true,\n exportAs: \"toastDescription\",\n})\nexport class ToastDescription {\n constructor() {\n const context = injectToastContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getDescriptionProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectToastContext } from \"./use-context\";\n\n@Directive({\n selector: \"[toast-action-trigger]\",\n standalone: true,\n exportAs: \"toastActionTrigger\",\n})\nexport class ToastActionTrigger {\n constructor() {\n const context = injectToastContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getActionTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectToastContext } from \"./use-context\";\n\n@Directive({\n selector: \"[toast-close-trigger]\",\n standalone: true,\n exportAs: \"toastCloseTrigger\",\n})\nexport class ToastCloseTrigger {\n constructor() {\n const context = injectToastContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getCloseTriggerProps(),\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMM,SAAU,aAAa,CAAC,KAAA,GAA4B,EAAE,EAAA;AAC1D,IAAA,OAAO,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC;AACjC;;MCFa,aAAa,GAAG,IAAI,cAAc,CAAY,uBAAuB;SAElE,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;MAEa,qBAAqB,GAAG,IAAI,cAAc,CACrD,+BAA+B;SAGjB,yBAAyB,GAAA;AACvC,IAAA,OAAO,MAAM,CAAC,qBAAqB,CAAC;AACtC;;ACGM,SAAU,QAAQ,CAAC,OAAwB,EAAA;AAC/C,IAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,IAAA,MAAM,WAAW,GAAG,iBAAiB,EAAE;AACvC,IAAA,MAAM,UAAU,GAAG,QAAQ,EAAE;AAE7B,IAAA,OAAO,UAAU,CAAyB;QACxC,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,MAAK;AACZ,YAAA,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE;YAC/B,OAAO;gBACL,G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AAC9B,YAAA,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC;AAC3B,YAAA,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;YAC9B,KAAK,EAAE,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAoB,EAAE;AAClD,SAAA,CAAC;IACJ;uGATW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,mBAAmB;AAC9B,iBAAA;;;ACTD;;AAEG;;;;"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirekyt/angular",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Angular adapter for Wirekyt",
5
5
  "files": [
6
6
  "dist",
@@ -99,10 +99,22 @@
99
99
  "types": "./types/wirekyt-angular-format.d.ts",
100
100
  "default": "./fesm2022/wirekyt-angular-format.mjs"
101
101
  },
102
+ "./frame": {
103
+ "types": "./types/wirekyt-angular-frame.d.ts",
104
+ "default": "./fesm2022/wirekyt-angular-frame.mjs"
105
+ },
106
+ "./highlight": {
107
+ "types": "./types/wirekyt-angular-highlight.d.ts",
108
+ "default": "./fesm2022/wirekyt-angular-highlight.mjs"
109
+ },
102
110
  "./presence": {
103
111
  "types": "./types/wirekyt-angular-presence.d.ts",
104
112
  "default": "./fesm2022/wirekyt-angular-presence.mjs"
105
113
  },
114
+ "./toast": {
115
+ "types": "./types/wirekyt-angular-toast.d.ts",
116
+ "default": "./fesm2022/wirekyt-angular-toast.mjs"
117
+ },
106
118
  "./package.json": {
107
119
  "default": "./package.json"
108
120
  }
@@ -9,7 +9,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
9
9
  import { ControlValueAccessor } from '@angular/forms';
10
10
  import { ColorStringFormat } from '@wirekyt/dom/color-utils';
11
11
 
12
- declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"trigger" | "content" | "positioner" | "root" | "area" | "label" | "control" | "valueText" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
12
+ declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"root" | "area" | "label" | "trigger" | "positioner" | "content" | "control" | "valueText" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
13
13
 
14
14
  declare class ColorPickerArea {
15
15
  readonly xChannel: InputSignal<colorPicker.ColorChannel | undefined>;
@@ -13,7 +13,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
13
13
  import { ControlValueAccessor } from '@angular/forms';
14
14
  import * as _wirekyt_angular_combobox from '@wirekyt/angular/combobox';
15
15
 
16
- declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"trigger" | "content" | "positioner" | "input" | "root" | "item" | "label" | "control" | "clearTrigger" | "list" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "empty">;
16
+ declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "list" | "item" | "input" | "label" | "trigger" | "positioner" | "content" | "control" | "clearTrigger" | "itemIndicator" | "itemGroup" | "itemText" | "itemGroupLabel" | "empty">;
17
17
 
18
18
  type ComboboxSchema<T extends CollectionItem = CollectionItem> = Machine<T> extends Machine$1<infer S> ? S : never;
19
19
 
@@ -9,7 +9,7 @@ import * as _wirekyt_angular_presence from '@wirekyt/angular/presence';
9
9
  import { PresenceBase } from '@wirekyt/angular/presence';
10
10
  import { ControlValueAccessor } from '@angular/forms';
11
11
 
12
- declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"trigger" | "content" | "positioner" | "input" | "root" | "label" | "table" | "view" | "control" | "clearTrigger" | "nextTrigger" | "prevTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
12
+ declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "input" | "label" | "table" | "view" | "trigger" | "positioner" | "content" | "control" | "clearTrigger" | "prevTrigger" | "nextTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
13
13
 
14
14
  type OptionalId<T extends {
15
15
  id?: string | undefined;
@@ -0,0 +1,50 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, TemplateRef, ElementRef } from '@angular/core';
3
+ import { EnvironmentContext } from '@wirekyt/angular';
4
+
5
+ interface FrameBaseProps {
6
+ head?: TemplateRef<unknown> | null;
7
+ onMount?: (() => void) | undefined;
8
+ onUnmount?: (() => void) | undefined;
9
+ }
10
+ interface FrameProps extends FrameBaseProps {
11
+ srcdoc?: string;
12
+ title?: string;
13
+ name?: string;
14
+ }
15
+ declare class Frame implements OnDestroy {
16
+ readonly srcdoc: _angular_core.InputSignal<string | undefined>;
17
+ readonly title: _angular_core.InputSignal<string | undefined>;
18
+ readonly name: _angular_core.InputSignal<string | undefined>;
19
+ readonly head: _angular_core.InputSignal<TemplateRef<unknown> | null>;
20
+ readonly mount: _angular_core.OutputEmitterRef<void>;
21
+ readonly unmount: _angular_core.OutputEmitterRef<void>;
22
+ readonly frameElement: _angular_core.Signal<ElementRef<HTMLIFrameElement>>;
23
+ private readonly contentTpl;
24
+ private readonly vcRef;
25
+ private readonly injector;
26
+ private readonly defaultTitle;
27
+ private readonly ready;
28
+ private readonly frameDocument;
29
+ private readonly frameRevision;
30
+ private contentView;
31
+ private headView;
32
+ private resizeCleanup;
33
+ private mounted;
34
+ readonly environment: EnvironmentContext;
35
+ protected readonly resolvedTitle: _angular_core.Signal<string>;
36
+ constructor();
37
+ ngOnDestroy(): void;
38
+ private mountFrame;
39
+ private mountHead;
40
+ private destroyViews;
41
+ private destroyView;
42
+ private createFrameInjector;
43
+ private observeSize;
44
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Frame, never>;
45
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Frame, "frame", never, { "srcdoc": { "alias": "srcdoc"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "head": { "alias": "head"; "required": false; "isSignal": true; }; }, { "mount": "mount"; "unmount": "unmount"; }, never, ["*"], true, never>;
46
+ }
47
+
48
+ export { Frame };
49
+ export type { FrameBaseProps, FrameProps };
50
+ //# sourceMappingURL=wirekyt-angular-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-frame.d.ts","sources":["../../src/components/frame/frame.ts"],"mappings":";;;;UAqBiB,cAAc;WACtB,WAAW;;;AAGnB;AAEK,UAAW,UAAW,SAAQ,cAAc;;;;AAIjD;AAYD,cA+Ba,KAAM,YAAW,SAAS;qBACtB,aAAA,CAAA,WAAA;oBACD,aAAA,CAAA,WAAA;mBACD,aAAA,CAAA,WAAA;mBACA,aAAA,CAAA,WAAA,CAAA,WAAA;oBACC,aAAA,CAAA,gBAAA;sBACE,aAAA,CAAA,gBAAA;2BACK,aAAA,CAAA,MAAA,CAAA,UAAA,CAAA,iBAAA;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAMA,0BAAsB,kBAAkB;AAIxC,sCAAgC,aAAA,CAAA,MAAA;;AAsBhC;AASA;AAmCA;AAcA;AAQA;AAQA;AAYA;oDArIW,KAAK;sDAAL,KAAK;AAsJjB;;;;","names":[]}
@@ -0,0 +1,33 @@
1
+ import * as _wirekyt_angular_highlight from '@wirekyt/angular/highlight';
2
+ import * as _angular_core from '@angular/core';
3
+ import { Signal } from '@angular/core';
4
+ import { HighlightWordProps, HighlightChunk } from '@wirekyt/dom/highlight-word';
5
+ export { HighlightChunk, HighlightSpan, HighlightWordProps, highlightWord } from '@wirekyt/dom/highlight-word';
6
+
7
+ interface UseHighlightProps extends HighlightWordProps {
8
+ }
9
+ interface UseHighlightOptions {
10
+ context: () => UseHighlightProps;
11
+ }
12
+ type UseHighlightReturn = Signal<HighlightChunk[]>;
13
+ declare function useHighlight(options: UseHighlightOptions): UseHighlightReturn;
14
+
15
+ interface HighlightProps extends UseHighlightProps {
16
+ markClass?: string | string[] | Set<string> | Record<string, unknown> | null;
17
+ }
18
+ declare class Highlight {
19
+ readonly query: _angular_core.InputSignal<string | string[]>;
20
+ readonly text: _angular_core.InputSignal<string>;
21
+ readonly ignoreCase: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
22
+ readonly matchAll: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
23
+ readonly exactMatch: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
24
+ readonly markClass: _angular_core.InputSignal<string | Set<string> | Record<string, unknown> | string[] | null | undefined>;
25
+ private readonly highlightProps;
26
+ protected readonly chunks: _wirekyt_angular_highlight.UseHighlightReturn;
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Highlight, never>;
28
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Highlight, "highlight", never, { "query": { "alias": "query"; "required": true; "isSignal": true; }; "text": { "alias": "text"; "required": true; "isSignal": true; }; "ignoreCase": { "alias": "ignoreCase"; "required": false; "isSignal": true; }; "matchAll": { "alias": "matchAll"; "required": false; "isSignal": true; }; "exactMatch": { "alias": "exactMatch"; "required": false; "isSignal": true; }; "markClass": { "alias": "markClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
29
+ }
30
+
31
+ export { Highlight, useHighlight };
32
+ export type { HighlightProps, UseHighlightOptions, UseHighlightProps, UseHighlightReturn };
33
+ //# sourceMappingURL=wirekyt-angular-highlight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-highlight.d.ts","sources":["../../src/components/highlight/use.ts","../../src/components/highlight/highlight.ts"],"mappings":";;;;;;AAMM,UAAW,iBAAkB,SAAQ,kBAAkB;AAAG;UAE/C,mBAAmB;mBACnB,iBAAiB;AACjC;AAEK,KAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc;AAEtD,iBAAgB,YAAY,UAAU,mBAAmB,GAAG,kBAAkB;;ACIxE,UAAW,cAAe,SAAQ,iBAAiB;oCACvB,GAAG,WAAW,MAAM;AACrD;AAED,cAgBa,SAAS;oBACN,aAAA,CAAA,WAAA;mBACD,aAAA,CAAA,WAAA;yBACM,aAAA,CAAA,wBAAA;uBAGF,aAAA,CAAA,wBAAA;yBAGE,aAAA,CAAA,wBAAA;wBAGD,aAAA,CAAA,WAAA,UAAA,GAAA,WAAA,MAAA;AAElB;AAeA,+BAAyB,0BAAA,CAAA,kBAAA;oDA7Bd,SAAS;sDAAT,SAAS;AAgCrB;;;;","names":[]}
@@ -0,0 +1,128 @@
1
+ import * as toast from '@wirekyt/dom/machines/toast';
2
+ export { ActionOptions as ToastActionOptions, Api as ToastApi, GroupApi as ToastGroupApi, GroupMachine as ToastGroupMachine, GroupProps as ToastGroupMachineProps, GroupService as ToastGroupService, Machine as ToastMachine, Props as ToastMachineProps, Options as ToastOptions, Placement as ToastPlacement, PromiseOptions as ToastPromiseOptions, Service as ToastService, Status as ToastStatus, StatusChangeDetails as ToastStatusChangeDetails, Store as ToastStore, StoreProps as ToastStoreProps, Type as ToastType, anatomy as toastAnatomy } from '@wirekyt/dom/machines/toast';
3
+ import { ContextCarrier, UseMachineReturn } from '@wirekyt/angular';
4
+ import * as i0 from '@angular/core';
5
+ import { OnInit, InputSignal, Signal, InjectionToken, TemplateRef } from '@angular/core';
6
+
7
+ type CreateToasterProps = toast.StoreProps;
8
+ type CreateToasterReturn = toast.Store;
9
+ declare function createToaster(props?: CreateToasterProps): CreateToasterReturn;
10
+
11
+ declare class ToastRoot implements OnInit {
12
+ readonly value: InputSignal<toast.Props | undefined>;
13
+ readonly parent: InputSignal<toast.GroupService | undefined>;
14
+ readonly index: InputSignal<number>;
15
+ private readonly injector;
16
+ private readonly destroyRef;
17
+ private readonly renderer;
18
+ private readonly elementRef;
19
+ private readonly isBrowser;
20
+ private readonly machine;
21
+ private machineStartQueued;
22
+ private destroyed;
23
+ readonly state: Signal<toast.Service["state"] | undefined>;
24
+ readonly api: Signal<toast.Api>;
25
+ readonly send: toast.Service["send"];
26
+ get service(): toast.Service;
27
+ protected readonly contextCarrier: ContextCarrier<ToastRoot>;
28
+ constructor();
29
+ ngOnInit(): void;
30
+ getContextCarrier(): ContextCarrier<ToastRoot>;
31
+ private createMachine;
32
+ private renderGhostElements;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastRoot, never>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastRoot, "[toast-root]", ["toastRoot"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
35
+ }
36
+
37
+ declare const TOAST_CONTEXT: InjectionToken<ToastRoot>;
38
+ declare function injectToastContext(): ToastRoot;
39
+ declare const TOAST_CONTEXT_CARRIER: InjectionToken<ContextCarrier<ToastRoot>>;
40
+ declare function injectToastContextCarrier(): ContextCarrier<ToastRoot>;
41
+
42
+ type UseToastProps = Omit<toast.Props, "dir" | "getRootNode">;
43
+ type UseToastReturn = UseMachineReturn<toast.Service["state"], toast.Api, toast.Service>;
44
+ interface UseToastOptions {
45
+ context: () => UseToastProps;
46
+ }
47
+ declare function useToast(options: UseToastOptions): UseToastReturn;
48
+
49
+ type UseToastGroupProps = Omit<toast.GroupProps, "dir" | "getRootNode" | "id"> & {
50
+ id?: string | undefined;
51
+ };
52
+ type UseToastGroupReturn = UseMachineReturn<toast.GroupService["state"], toast.GroupApi, toast.GroupService>;
53
+ interface UseToastGroupOptions {
54
+ context: () => UseToastGroupProps;
55
+ }
56
+ declare function useToastGroup(options: UseToastGroupOptions): UseToastGroupReturn;
57
+
58
+ interface ToasterProps extends Omit<UseToastGroupProps, "store" | "id"> {
59
+ toaster: CreateToasterReturn;
60
+ itemTemplate: TemplateRef<{
61
+ $implicit: toast.Options;
62
+ }>;
63
+ id?: string;
64
+ }
65
+ type ToastOptions = toast.Options;
66
+ declare class Toaster implements OnInit {
67
+ readonly toaster: InputSignal<CreateToasterReturn>;
68
+ readonly itemTemplate: InputSignal<TemplateRef<{
69
+ $implicit: toast.Options;
70
+ }>>;
71
+ readonly id: InputSignal<string | undefined>;
72
+ readonly label: InputSignal<string | undefined>;
73
+ private readonly injector;
74
+ private readonly isBrowser;
75
+ private readonly machine;
76
+ readonly state: Signal<toast.GroupService["state"] | undefined>;
77
+ readonly api: Signal<toast.GroupApi>;
78
+ readonly toasts: Signal<toast.Props[]>;
79
+ readonly send: toast.GroupService["send"];
80
+ get service(): toast.GroupService;
81
+ constructor();
82
+ ngOnInit(): void;
83
+ private createMachine;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<Toaster, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<Toaster, "toast-toaster", never, { "toaster": { "alias": "toaster"; "required": true; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
86
+ }
87
+
88
+ interface ToastContextTemplate {
89
+ $implicit: UseToastReturn["api"];
90
+ api: UseToastReturn["api"];
91
+ }
92
+ declare class ToastContext {
93
+ static ngTemplateContextGuard(_directive: ToastContext, context: unknown): context is ToastContextTemplate;
94
+ private readonly toast;
95
+ private readonly templateRef;
96
+ private readonly viewContainer;
97
+ constructor();
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastContext, never>;
99
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastContext, "[toast-context]", ["toastContext"], {}, {}, never, never, true, never>;
100
+ }
101
+
102
+ declare class ToastTitle {
103
+ constructor();
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastTitle, never>;
105
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastTitle, "[toast-title]", ["toastTitle"], {}, {}, never, never, true, never>;
106
+ }
107
+
108
+ declare class ToastDescription {
109
+ constructor();
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastDescription, never>;
111
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastDescription, "[toast-description]", ["toastDescription"], {}, {}, never, never, true, never>;
112
+ }
113
+
114
+ declare class ToastActionTrigger {
115
+ constructor();
116
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastActionTrigger, never>;
117
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastActionTrigger, "[toast-action-trigger]", ["toastActionTrigger"], {}, {}, never, never, true, never>;
118
+ }
119
+
120
+ declare class ToastCloseTrigger {
121
+ constructor();
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastCloseTrigger, never>;
123
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToastCloseTrigger, "[toast-close-trigger]", ["toastCloseTrigger"], {}, {}, never, never, true, never>;
124
+ }
125
+
126
+ export { TOAST_CONTEXT, TOAST_CONTEXT_CARRIER, ToastActionTrigger, ToastCloseTrigger, ToastContext, ToastDescription, ToastRoot, ToastTitle, Toaster, createToaster, injectToastContext, injectToastContextCarrier, useToast, useToastGroup };
127
+ export type { CreateToasterProps, CreateToasterReturn, ToastContextTemplate, ToasterProps, ToastOptions as ToasterToastOptions, UseToastGroupOptions, UseToastGroupProps, UseToastGroupReturn, UseToastOptions, UseToastProps, UseToastReturn };
128
+ //# sourceMappingURL=wirekyt-angular-toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-toast.d.ts","sources":["../../src/components/toast/create-toaster.ts","../../src/components/toast/root.ts","../../src/components/toast/use-context.ts","../../src/components/toast/use.ts","../../src/components/toast/use-group.ts","../../src/components/toast/toaster.ts","../../src/components/toast/context.ts","../../src/components/toast/title.ts","../../src/components/toast/description.ts","../../src/components/toast/action-trigger.ts","../../src/components/toast/close-trigger.ts"],"mappings":";;;;;;KAEY,kBAAkB,GAAG,KAAK,CAAC,UAAU;KAErC,mBAAmB,GAAG,KAAK,CAAC,KAAK;AAE7C,iBAAgB,aAAa,SAAQ,kBAAuB,GAAG,mBAAmB;;AC6ClF,cAaa,SAAU,YAAW,MAAM;oBACtB,WAAW,CAAC,KAAK,CAAC,KAAK;qBACtB,WAAW,CAAC,KAAK,CAAC,YAAY;AAG/C,oBAAgB,WAAW;AAE3B;AACA;AACA;AACA;AACA;AACA;;;AAGA,oBAAgB,MAAM,CAAC,KAAK,CAAC,OAAO;kBAItB,MAAM,CAAC,KAAK,CAAC,GAAG;mBAEf,KAAK,CAAC,OAAO;AAE5B,mBAAe,KAAK,CAAC,OAAO;uCAOO,cAAc,CAAC,SAAS;;AAqB3D;AAoBA,yBAAqB,cAAc,CAAC,SAAS;AAI7C;AAiBA;yCA5FW,SAAS;2CAAT,SAAS;AA2HrB;;ACrLD,cAAa,aAAa,EAAA,cAAA,CAAA,SAAA;AAE1B,iBAAgB,kBAAkB,IAAI,SAAS;AAI/C,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Ka,YAAY;AACvB,8CACc,YAAY,gCAEZ,oBAAoB;AAKlC;AACA;AACA;;yCAXW,YAAY;2CAAZ,YAAY;AA0BxB;;AC5CD,cAKa,UAAU;;yCAAV,UAAU;2CAAV,UAAU;AAUtB;;ACfD,cAKa,gBAAgB;;yCAAhB,gBAAgB;2CAAhB,gBAAgB;AAU5B;;ACfD,cAKa,kBAAkB;;yCAAlB,kBAAkB;2CAAlB,kBAAkB;AAU9B;;ACfD,cAKa,iBAAiB;;yCAAjB,iBAAiB;2CAAjB,iBAAiB;AAU7B;;;;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirekyt/angular",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Angular adapter for Wirekyt",
5
5
  "files": [
6
6
  "dist",
@@ -99,10 +99,22 @@
99
99
  "types": "./dist/types/wirekyt-angular-format.d.ts",
100
100
  "default": "./dist/fesm2022/wirekyt-angular-format.mjs"
101
101
  },
102
+ "./frame": {
103
+ "types": "./dist/types/wirekyt-angular-frame.d.ts",
104
+ "default": "./dist/fesm2022/wirekyt-angular-frame.mjs"
105
+ },
106
+ "./highlight": {
107
+ "types": "./dist/types/wirekyt-angular-highlight.d.ts",
108
+ "default": "./dist/fesm2022/wirekyt-angular-highlight.mjs"
109
+ },
102
110
  "./presence": {
103
111
  "types": "./dist/types/wirekyt-angular-presence.d.ts",
104
112
  "default": "./dist/fesm2022/wirekyt-angular-presence.mjs"
105
113
  },
114
+ "./toast": {
115
+ "types": "./dist/types/wirekyt-angular-toast.d.ts",
116
+ "default": "./dist/fesm2022/wirekyt-angular-toast.mjs"
117
+ },
106
118
  "./package.json": "./package.json"
107
119
  },
108
120
  "publishConfig": {
@@ -112,7 +124,7 @@
112
124
  "dependencies": {
113
125
  "@internationalized/date": "^3.12.3",
114
126
  "@internationalized/number": "^3.6.7",
115
- "@wirekyt/dom": "0.0.21",
127
+ "@wirekyt/dom": "0.0.23",
116
128
  "tslib": "^2.8.1"
117
129
  },
118
130
  "peerDependencies": {