@wirekyt/angular 0.0.6 → 0.0.7

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,493 @@
1
+ import * as carousel from '@wirekyt/dom/machines/carousel';
2
+ import { anatomy } from '@wirekyt/dom/machines/carousel';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, booleanAttribute, input, model, output, DestroyRef, effect, Renderer2, ElementRef, forwardRef, Directive, computed, signal, TemplateRef, ViewContainerRef } from '@angular/core';
5
+ import { injectLocale, injectEnvironment, createId, useMachine, bindProps } from '@wirekyt/angular';
6
+
7
+ const carouselAnatomy = anatomy.extendWith("autoplayIndicator");
8
+
9
+ const CAROUSEL_CONTEXT = new InjectionToken("WIREKYT.CAROUSEL_CONTEXT");
10
+ function injectCarouselContext() {
11
+ return inject(CAROUSEL_CONTEXT);
12
+ }
13
+
14
+ function useCarousel(options) {
15
+ const locale = injectLocale();
16
+ const environment = injectEnvironment();
17
+ const fallbackId = createId();
18
+ return useMachine({
19
+ machine: carousel.machine,
20
+ context: () => {
21
+ const props = options.context();
22
+ return {
23
+ ...props,
24
+ dir: locale.dir,
25
+ getRootNode: environment.getRootNode,
26
+ id: props.id ?? fallbackId,
27
+ slideCount: props.slideCount ?? 0,
28
+ };
29
+ },
30
+ connect: (service, normalize) => carousel.connect(service, normalize),
31
+ });
32
+ }
33
+
34
+ const autoplayAttribute = (value) => {
35
+ if (value === undefined || value === null)
36
+ return undefined;
37
+ if (typeof value === "object" && !Array.isArray(value) && "delay" in value)
38
+ return value;
39
+ return booleanAttribute(value);
40
+ };
41
+ class CarouselRoot {
42
+ id = input(undefined, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
44
+ ids = input(undefined, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "ids" }] : /* istanbul ignore next */ []));
46
+ page = model(undefined, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
48
+ defaultPage = input(undefined, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "defaultPage" }] : /* istanbul ignore next */ []));
50
+ slideCount = input(0, /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "slideCount" }] : /* istanbul ignore next */ []));
52
+ slidesPerPage = input(undefined, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "slidesPerPage" }] : /* istanbul ignore next */ []));
54
+ slidesPerMove = input(undefined, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "slidesPerMove" }] : /* istanbul ignore next */ []));
56
+ autoSize = input(false, { ...(ngDevMode ? { debugName: "autoSize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
+ loop = input(false, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
58
+ allowMouseDrag = input(false, { ...(ngDevMode ? { debugName: "allowMouseDrag" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
59
+ autoplay = input(undefined, { ...(ngDevMode ? { debugName: "autoplay" } : /* istanbul ignore next */ {}), transform: autoplayAttribute });
60
+ orientation = input(undefined, /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
62
+ spacing = input(undefined, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
64
+ padding = input(undefined, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
66
+ inViewThreshold = input(undefined, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "inViewThreshold" }] : /* istanbul ignore next */ []));
68
+ snapType = input(undefined, /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "snapType" }] : /* istanbul ignore next */ []));
70
+ translations = input(undefined, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "translations" }] : /* istanbul ignore next */ []));
72
+ pageDetailsChange = output();
73
+ dragStatusChange = output();
74
+ autoplayStatusChange = output();
75
+ machine = useCarousel({
76
+ context: () => ({
77
+ id: this.id(),
78
+ ids: this.ids(),
79
+ page: this.page(),
80
+ defaultPage: this.defaultPage(),
81
+ slideCount: this.slideCount(),
82
+ slidesPerPage: this.slidesPerPage(),
83
+ slidesPerMove: this.slidesPerMove(),
84
+ autoSize: this.autoSize(),
85
+ loop: this.loop(),
86
+ allowMouseDrag: this.allowMouseDrag(),
87
+ autoplay: this.autoplay(),
88
+ orientation: this.orientation(),
89
+ spacing: this.spacing(),
90
+ padding: this.padding(),
91
+ inViewThreshold: this.inViewThreshold(),
92
+ snapType: this.snapType(),
93
+ translations: this.translations(),
94
+ onPageChange: (details) => {
95
+ const currentPage = this.page();
96
+ if (currentPage !== details.page) {
97
+ this.page.set(details.page);
98
+ }
99
+ this.pageDetailsChange.emit(details);
100
+ },
101
+ onDragStatusChange: (details) => {
102
+ this.dragStatusChange.emit(details);
103
+ },
104
+ onAutoplayStatusChange: (details) => {
105
+ this.autoplayStatusChange.emit(details);
106
+ },
107
+ }),
108
+ });
109
+ state = this.machine.state;
110
+ api = this.machine.api;
111
+ service = this.machine.service;
112
+ send = this.machine.send;
113
+ constructor() {
114
+ const destroyRef = inject(DestroyRef);
115
+ let destroyed = false;
116
+ let hasObservedSlideCount = false;
117
+ let previousSlideCount;
118
+ destroyRef.onDestroy(() => {
119
+ destroyed = true;
120
+ });
121
+ effect(() => {
122
+ const slideCount = this.slideCount();
123
+ if (!hasObservedSlideCount) {
124
+ hasObservedSlideCount = true;
125
+ previousSlideCount = slideCount;
126
+ return;
127
+ }
128
+ if (Object.is(previousSlideCount, slideCount))
129
+ return;
130
+ previousSlideCount = slideCount;
131
+ const win = this.service.scope.getWin();
132
+ const scheduleMicrotask = win.queueMicrotask?.bind(win) ?? queueMicrotask;
133
+ scheduleMicrotask(() => {
134
+ if (!destroyed)
135
+ this.api().refresh();
136
+ });
137
+ });
138
+ bindProps({
139
+ elementRef: inject(ElementRef),
140
+ renderer: inject(Renderer2),
141
+ destroyRef,
142
+ props: () => this.api().getRootProps(),
143
+ });
144
+ }
145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
146
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: CarouselRoot, isStandalone: true, selector: "[carouselRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, defaultPage: { classPropertyName: "defaultPage", publicName: "defaultPage", isSignal: true, isRequired: false, transformFunction: null }, slideCount: { classPropertyName: "slideCount", publicName: "slideCount", isSignal: true, isRequired: false, transformFunction: null }, slidesPerPage: { classPropertyName: "slidesPerPage", publicName: "slidesPerPage", isSignal: true, isRequired: false, transformFunction: null }, slidesPerMove: { classPropertyName: "slidesPerMove", publicName: "slidesPerMove", isSignal: true, isRequired: false, transformFunction: null }, autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, allowMouseDrag: { classPropertyName: "allowMouseDrag", publicName: "allowMouseDrag", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, inViewThreshold: { classPropertyName: "inViewThreshold", publicName: "inViewThreshold", isSignal: true, isRequired: false, transformFunction: null }, snapType: { classPropertyName: "snapType", publicName: "snapType", isSignal: true, isRequired: false, transformFunction: null }, translations: { classPropertyName: "translations", publicName: "translations", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageDetailsChange: "pageDetailsChange", dragStatusChange: "dragStatusChange", autoplayStatusChange: "autoplayStatusChange" }, providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRoot) }], exportAs: ["carouselRoot"], ngImport: i0 });
147
+ }
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselRoot, decorators: [{
149
+ type: Directive,
150
+ args: [{
151
+ selector: "[carouselRoot]",
152
+ standalone: true,
153
+ exportAs: "carouselRoot",
154
+ providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRoot) }],
155
+ }]
156
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], defaultPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPage", required: false }] }], slideCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "slideCount", required: false }] }], slidesPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "slidesPerPage", required: false }] }], slidesPerMove: [{ type: i0.Input, args: [{ isSignal: true, alias: "slidesPerMove", required: false }] }], autoSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSize", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], allowMouseDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMouseDrag", required: false }] }], autoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoplay", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], inViewThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "inViewThreshold", required: false }] }], snapType: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapType", required: false }] }], translations: [{ type: i0.Input, args: [{ isSignal: true, alias: "translations", required: false }] }], pageDetailsChange: [{ type: i0.Output, args: ["pageDetailsChange"] }], dragStatusChange: [{ type: i0.Output, args: ["dragStatusChange"] }], autoplayStatusChange: [{ type: i0.Output, args: ["autoplayStatusChange"] }] } });
157
+
158
+ class CarouselRootProvider {
159
+ value = input.required(/* @ts-ignore */
160
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
161
+ state = computed(() => this.value().state(), /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
163
+ api = computed(() => this.value().api(), /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
165
+ send = (event) => this.value().send(event);
166
+ get service() {
167
+ return this.value().service;
168
+ }
169
+ constructor() {
170
+ bindProps({
171
+ elementRef: inject(ElementRef),
172
+ renderer: inject(Renderer2),
173
+ destroyRef: inject(DestroyRef),
174
+ props: () => this.api().getRootProps(),
175
+ });
176
+ }
177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
178
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: CarouselRootProvider, isStandalone: true, selector: "[carouselRootProvider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRootProvider) }], exportAs: ["carouselRootProvider"], ngImport: i0 });
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselRootProvider, decorators: [{
181
+ type: Directive,
182
+ args: [{
183
+ selector: "[carouselRootProvider]",
184
+ standalone: true,
185
+ exportAs: "carouselRootProvider",
186
+ providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRootProvider) }],
187
+ }]
188
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
189
+
190
+ class CarouselItemGroup {
191
+ constructor() {
192
+ const carousel = injectCarouselContext();
193
+ bindProps({
194
+ elementRef: inject(ElementRef),
195
+ renderer: inject(Renderer2),
196
+ destroyRef: inject(DestroyRef),
197
+ props: () => carousel.api().getItemGroupProps(),
198
+ });
199
+ }
200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
201
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselItemGroup, isStandalone: true, selector: "[carouselItemGroup]", exportAs: ["carouselItemGroup"], ngImport: i0 });
202
+ }
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselItemGroup, decorators: [{
204
+ type: Directive,
205
+ args: [{
206
+ selector: "[carouselItemGroup]",
207
+ standalone: true,
208
+ exportAs: "carouselItemGroup",
209
+ }]
210
+ }], ctorParameters: () => [] });
211
+
212
+ class CarouselItem {
213
+ index = input.required(/* @ts-ignore */
214
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
215
+ snapAlign = input(undefined, /* @ts-ignore */
216
+ ...(ngDevMode ? [{ debugName: "snapAlign" }] : /* istanbul ignore next */ []));
217
+ constructor() {
218
+ const carousel = injectCarouselContext();
219
+ bindProps({
220
+ elementRef: inject(ElementRef),
221
+ renderer: inject(Renderer2),
222
+ destroyRef: inject(DestroyRef),
223
+ props: () => carousel.api().getItemProps({
224
+ index: this.index(),
225
+ snapAlign: this.snapAlign(),
226
+ }),
227
+ });
228
+ }
229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
230
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: CarouselItem, isStandalone: true, selector: "[carouselItem]", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, snapAlign: { classPropertyName: "snapAlign", publicName: "snapAlign", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["carouselItem"], ngImport: i0 });
231
+ }
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselItem, decorators: [{
233
+ type: Directive,
234
+ args: [{
235
+ selector: "[carouselItem]",
236
+ standalone: true,
237
+ exportAs: "carouselItem",
238
+ }]
239
+ }], ctorParameters: () => [], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], snapAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapAlign", required: false }] }] } });
240
+
241
+ class CarouselControl {
242
+ constructor() {
243
+ const carousel = injectCarouselContext();
244
+ bindProps({
245
+ elementRef: inject(ElementRef),
246
+ renderer: inject(Renderer2),
247
+ destroyRef: inject(DestroyRef),
248
+ props: () => carousel.api().getControlProps(),
249
+ });
250
+ }
251
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
252
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselControl, isStandalone: true, selector: "[carouselControl]", exportAs: ["carouselControl"], ngImport: i0 });
253
+ }
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselControl, decorators: [{
255
+ type: Directive,
256
+ args: [{
257
+ selector: "[carouselControl]",
258
+ standalone: true,
259
+ exportAs: "carouselControl",
260
+ }]
261
+ }], ctorParameters: () => [] });
262
+
263
+ class CarouselPrevTrigger {
264
+ constructor() {
265
+ const carousel = injectCarouselContext();
266
+ bindProps({
267
+ elementRef: inject(ElementRef),
268
+ renderer: inject(Renderer2),
269
+ destroyRef: inject(DestroyRef),
270
+ props: () => carousel.api().getPrevTriggerProps(),
271
+ });
272
+ }
273
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselPrevTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
274
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselPrevTrigger, isStandalone: true, selector: "[carouselPrevTrigger]", exportAs: ["carouselPrevTrigger"], ngImport: i0 });
275
+ }
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselPrevTrigger, decorators: [{
277
+ type: Directive,
278
+ args: [{
279
+ selector: "[carouselPrevTrigger]",
280
+ standalone: true,
281
+ exportAs: "carouselPrevTrigger",
282
+ }]
283
+ }], ctorParameters: () => [] });
284
+
285
+ class CarouselNextTrigger {
286
+ constructor() {
287
+ const carousel = injectCarouselContext();
288
+ bindProps({
289
+ elementRef: inject(ElementRef),
290
+ renderer: inject(Renderer2),
291
+ destroyRef: inject(DestroyRef),
292
+ props: () => carousel.api().getNextTriggerProps(),
293
+ });
294
+ }
295
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselNextTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
296
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselNextTrigger, isStandalone: true, selector: "[carouselNextTrigger]", exportAs: ["carouselNextTrigger"], ngImport: i0 });
297
+ }
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselNextTrigger, decorators: [{
299
+ type: Directive,
300
+ args: [{
301
+ selector: "[carouselNextTrigger]",
302
+ standalone: true,
303
+ exportAs: "carouselNextTrigger",
304
+ }]
305
+ }], ctorParameters: () => [] });
306
+
307
+ class CarouselIndicatorGroup {
308
+ constructor() {
309
+ const carousel = injectCarouselContext();
310
+ bindProps({
311
+ elementRef: inject(ElementRef),
312
+ renderer: inject(Renderer2),
313
+ destroyRef: inject(DestroyRef),
314
+ props: () => carousel.api().getIndicatorGroupProps(),
315
+ });
316
+ }
317
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselIndicatorGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
318
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselIndicatorGroup, isStandalone: true, selector: "[carouselIndicatorGroup]", exportAs: ["carouselIndicatorGroup"], ngImport: i0 });
319
+ }
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselIndicatorGroup, decorators: [{
321
+ type: Directive,
322
+ args: [{
323
+ selector: "[carouselIndicatorGroup]",
324
+ standalone: true,
325
+ exportAs: "carouselIndicatorGroup",
326
+ }]
327
+ }], ctorParameters: () => [] });
328
+
329
+ class CarouselIndicator {
330
+ index = input.required(/* @ts-ignore */
331
+ ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
332
+ readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
333
+ constructor() {
334
+ const carousel = injectCarouselContext();
335
+ bindProps({
336
+ elementRef: inject(ElementRef),
337
+ renderer: inject(Renderer2),
338
+ destroyRef: inject(DestroyRef),
339
+ props: () => carousel.api().getIndicatorProps({
340
+ index: this.index(),
341
+ readOnly: this.readOnly(),
342
+ }),
343
+ });
344
+ }
345
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
346
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: CarouselIndicator, isStandalone: true, selector: "[carouselIndicator]", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["carouselIndicator"], ngImport: i0 });
347
+ }
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselIndicator, decorators: [{
349
+ type: Directive,
350
+ args: [{
351
+ selector: "[carouselIndicator]",
352
+ standalone: true,
353
+ exportAs: "carouselIndicator",
354
+ }]
355
+ }], ctorParameters: () => [], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }] } });
356
+
357
+ class CarouselAutoplayTrigger {
358
+ constructor() {
359
+ const carousel = injectCarouselContext();
360
+ bindProps({
361
+ elementRef: inject(ElementRef),
362
+ renderer: inject(Renderer2),
363
+ destroyRef: inject(DestroyRef),
364
+ props: () => carousel.api().getAutoplayTriggerProps(),
365
+ });
366
+ }
367
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselAutoplayTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
368
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselAutoplayTrigger, isStandalone: true, selector: "[carouselAutoplayTrigger]", exportAs: ["carouselAutoplayTrigger"], ngImport: i0 });
369
+ }
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselAutoplayTrigger, decorators: [{
371
+ type: Directive,
372
+ args: [{
373
+ selector: "[carouselAutoplayTrigger]",
374
+ standalone: true,
375
+ exportAs: "carouselAutoplayTrigger",
376
+ }]
377
+ }], ctorParameters: () => [] });
378
+
379
+ class CarouselAutoplayIndicator {
380
+ label = input(undefined, /* @ts-ignore */
381
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
382
+ fallback = input(undefined, /* @ts-ignore */
383
+ ...(ngDevMode ? [{ debugName: "fallback" }] : /* istanbul ignore next */ []));
384
+ elementRef = inject(ElementRef);
385
+ renderer = inject(Renderer2);
386
+ ownsTextContent = signal(false, /* @ts-ignore */
387
+ ...(ngDevMode ? [{ debugName: "ownsTextContent" }] : /* istanbul ignore next */ []));
388
+ constructor() {
389
+ const carousel = injectCarouselContext();
390
+ bindProps({
391
+ elementRef: this.elementRef,
392
+ renderer: this.renderer,
393
+ destroyRef: inject(DestroyRef),
394
+ props: () => carouselAnatomy.build().autoplayIndicator.attrs,
395
+ });
396
+ effect(() => {
397
+ if (!this.ownsTextContent())
398
+ return;
399
+ this.renderer.setProperty(this.elementRef.nativeElement, "textContent", carousel.api().isPlaying ? (this.label() ?? "") : (this.fallback() ?? ""));
400
+ });
401
+ }
402
+ ngAfterContentInit() {
403
+ this.ownsTextContent.set(hasOnlyWhitespaceContent$1(this.elementRef.nativeElement));
404
+ }
405
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselAutoplayIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
406
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: CarouselAutoplayIndicator, isStandalone: true, selector: "[carouselAutoplayIndicator]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["carouselAutoplayIndicator"], ngImport: i0 });
407
+ }
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselAutoplayIndicator, decorators: [{
409
+ type: Directive,
410
+ args: [{
411
+ selector: "[carouselAutoplayIndicator]",
412
+ standalone: true,
413
+ exportAs: "carouselAutoplayIndicator",
414
+ }]
415
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }] } });
416
+ function hasOnlyWhitespaceContent$1(element) {
417
+ return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
418
+ }
419
+
420
+ class CarouselProgressText {
421
+ elementRef = inject(ElementRef);
422
+ renderer = inject(Renderer2);
423
+ ownsTextContent = signal(false, /* @ts-ignore */
424
+ ...(ngDevMode ? [{ debugName: "ownsTextContent" }] : /* istanbul ignore next */ []));
425
+ constructor() {
426
+ const carousel = injectCarouselContext();
427
+ bindProps({
428
+ elementRef: this.elementRef,
429
+ renderer: this.renderer,
430
+ destroyRef: inject(DestroyRef),
431
+ props: () => carousel.api().getProgressTextProps(),
432
+ });
433
+ effect(() => {
434
+ if (!this.ownsTextContent())
435
+ return;
436
+ this.renderer.setProperty(this.elementRef.nativeElement, "textContent", carousel.api().getProgressText());
437
+ });
438
+ }
439
+ ngAfterContentInit() {
440
+ this.ownsTextContent.set(hasOnlyWhitespaceContent(this.elementRef.nativeElement));
441
+ }
442
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselProgressText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
443
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselProgressText, isStandalone: true, selector: "[carouselProgressText]", exportAs: ["carouselProgressText"], ngImport: i0 });
444
+ }
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselProgressText, decorators: [{
446
+ type: Directive,
447
+ args: [{
448
+ selector: "[carouselProgressText]",
449
+ standalone: true,
450
+ exportAs: "carouselProgressText",
451
+ }]
452
+ }], ctorParameters: () => [] });
453
+ function hasOnlyWhitespaceContent(element) {
454
+ return element.firstElementChild === null && (element.textContent?.trim() ?? "") === "";
455
+ }
456
+
457
+ class CarouselContext {
458
+ static ngTemplateContextGuard(_directive, context) {
459
+ void context;
460
+ return true;
461
+ }
462
+ carousel = injectCarouselContext();
463
+ templateRef = inject(TemplateRef);
464
+ viewContainer = inject(ViewContainerRef);
465
+ constructor() {
466
+ const view = this.viewContainer.createEmbeddedView(this.templateRef, {
467
+ $implicit: this.carousel.api,
468
+ api: this.carousel.api,
469
+ });
470
+ effect(() => {
471
+ this.carousel.api();
472
+ view.detectChanges();
473
+ });
474
+ inject(DestroyRef).onDestroy(() => view.destroy());
475
+ }
476
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
477
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: CarouselContext, isStandalone: true, selector: "[carouselContext]", exportAs: ["carouselContext"], ngImport: i0 });
478
+ }
479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CarouselContext, decorators: [{
480
+ type: Directive,
481
+ args: [{
482
+ selector: "[carouselContext]",
483
+ standalone: true,
484
+ exportAs: "carouselContext",
485
+ }]
486
+ }], ctorParameters: () => [] });
487
+
488
+ /**
489
+ * Generated bundle index. Do not edit.
490
+ */
491
+
492
+ export { CAROUSEL_CONTEXT, CarouselAutoplayIndicator, CarouselAutoplayTrigger, CarouselContext, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselProgressText, CarouselRoot, CarouselRootProvider, carouselAnatomy, injectCarouselContext, useCarousel };
493
+ //# sourceMappingURL=wirekyt-angular-carousel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirekyt-angular-carousel.mjs","sources":["../../src/components/carousel/anatomy.ts","../../src/components/carousel/use-context.ts","../../src/components/carousel/use.ts","../../src/components/carousel/root.ts","../../src/components/carousel/root-provider.ts","../../src/components/carousel/item-group.ts","../../src/components/carousel/item.ts","../../src/components/carousel/control.ts","../../src/components/carousel/prev-trigger.ts","../../src/components/carousel/next-trigger.ts","../../src/components/carousel/indicator-group.ts","../../src/components/carousel/indicator.ts","../../src/components/carousel/autoplay-trigger.ts","../../src/components/carousel/autoplay-indicator.ts","../../src/components/carousel/progress-text.ts","../../src/components/carousel/context.ts","../../src/components/carousel/wirekyt-angular-carousel.ts"],"sourcesContent":["import type { AnatomyInstance } from \"@wirekyt/dom/anatomy\";\n\nimport { anatomy } from \"@wirekyt/dom/machines/carousel\";\n\nexport const carouselAnatomy: AnatomyInstance<\n | \"root\"\n | \"itemGroup\"\n | \"item\"\n | \"control\"\n | \"nextTrigger\"\n | \"prevTrigger\"\n | \"indicatorGroup\"\n | \"indicator\"\n | \"autoplayTrigger\"\n | \"progressText\"\n | \"autoplayIndicator\"\n> = anatomy.extendWith(\"autoplayIndicator\");\n","import { InjectionToken, inject } from \"@angular/core\";\n\nimport type { UseCarouselReturn } from \"./use\";\n\nexport const CAROUSEL_CONTEXT = new InjectionToken<UseCarouselReturn>(\"WIREKYT.CAROUSEL_CONTEXT\");\n\nexport function injectCarouselContext(): UseCarouselReturn {\n return inject(CAROUSEL_CONTEXT);\n}\n","import {\n createId,\n injectEnvironment,\n injectLocale,\n useMachine,\n UseMachineReturn,\n} from \"@wirekyt/angular\";\nimport { Machine } from \"@wirekyt/dom\";\nimport * as carousel from \"@wirekyt/dom/machines/carousel\";\n\ntype OptionalId<T extends { id?: string | undefined }> = Omit<T, \"id\"> & { id?: string };\n\nexport interface UseCarouselProps extends OptionalId<\n Omit<carousel.Props, \"dir\" | \"getRootNode\" | \"slideCount\">\n> {\n slideCount?: number | undefined;\n}\n\nexport type UseCarouselReturn = UseMachineReturn<\n carousel.Service[\"state\"],\n carousel.Api,\n carousel.Service\n>;\n\nexport interface UseCarouselOptions {\n context: () => UseCarouselProps;\n}\n\ntype CarouselContext = Record<string, unknown>;\ntype CarouselSchema = carousel.Machine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useCarousel(options: UseCarouselOptions): UseCarouselReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const fallbackId = createId();\n\n return useMachine<CarouselSchema, carousel.Api>({\n machine: carousel.machine,\n context: () => {\n const props = options.context();\n return {\n ...props,\n dir: locale.dir,\n getRootNode: environment.getRootNode,\n id: props.id ?? fallbackId,\n slideCount: props.slideCount ?? 0,\n } as CarouselContext;\n },\n connect: (service, normalize) => carousel.connect(service, normalize),\n });\n}\n","import type * as carousel from \"@wirekyt/dom/machines/carousel\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n booleanAttribute,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n type InputSignal,\n type InputSignalWithTransform,\n type ModelSignal,\n type OutputEmitterRef,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type {\n CarouselAutoplayStatusDetails,\n CarouselDragStatusDetails,\n CarouselElementIds,\n CarouselIntlTranslations,\n CarouselPageChangeDetails,\n} from \"./types\";\n\nimport { useCarousel, type UseCarouselReturn } from \"./use\";\nimport { CAROUSEL_CONTEXT } from \"./use-context\";\n\nconst autoplayAttribute = (value: unknown): boolean | { delay: number } | undefined => {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"object\" && !Array.isArray(value) && \"delay\" in value)\n return value as { delay: number };\n return booleanAttribute(value);\n};\n\n@Directive({\n selector: \"[carouselRoot]\",\n standalone: true,\n exportAs: \"carouselRoot\",\n providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRoot) }],\n})\nexport class CarouselRoot implements UseCarouselReturn {\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly ids: InputSignal<CarouselElementIds | undefined> = input<CarouselElementIds | undefined>(\n undefined,\n );\n readonly page: ModelSignal<number | undefined> = model<number | undefined>(undefined);\n readonly defaultPage: InputSignal<number | undefined> = input<number | undefined>(undefined);\n readonly slideCount: InputSignal<number> = input<number>(0);\n readonly slidesPerPage: InputSignal<number | undefined> = input<number | undefined>(undefined);\n readonly slidesPerMove: InputSignal<number | \"auto\" | undefined> = input<\n number | \"auto\" | undefined\n >(undefined);\n readonly autoSize: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly loop: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly allowMouseDrag: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n readonly autoplay: InputSignalWithTransform<boolean | { delay: number } | undefined, unknown> =\n input<boolean | { delay: number } | undefined, unknown>(undefined, {\n transform: autoplayAttribute,\n });\n readonly orientation: InputSignal<carousel.Props[\"orientation\"]> =\n input<carousel.Props[\"orientation\"]>(undefined);\n readonly spacing: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly padding: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly inViewThreshold: InputSignal<number | number[] | undefined> = input<\n number | number[] | undefined\n >(undefined);\n readonly snapType: InputSignal<carousel.Props[\"snapType\"]> =\n input<carousel.Props[\"snapType\"]>(undefined);\n readonly translations: InputSignal<CarouselIntlTranslations | undefined> = input<\n CarouselIntlTranslations | undefined\n >(undefined);\n\n readonly pageDetailsChange: OutputEmitterRef<CarouselPageChangeDetails> =\n output<CarouselPageChangeDetails>();\n readonly dragStatusChange: OutputEmitterRef<CarouselDragStatusDetails> =\n output<CarouselDragStatusDetails>();\n readonly autoplayStatusChange: OutputEmitterRef<CarouselAutoplayStatusDetails> =\n output<CarouselAutoplayStatusDetails>();\n\n private readonly machine = useCarousel({\n context: () => ({\n id: this.id(),\n ids: this.ids(),\n page: this.page(),\n defaultPage: this.defaultPage(),\n slideCount: this.slideCount(),\n slidesPerPage: this.slidesPerPage(),\n slidesPerMove: this.slidesPerMove(),\n autoSize: this.autoSize(),\n loop: this.loop(),\n allowMouseDrag: this.allowMouseDrag(),\n autoplay: this.autoplay(),\n orientation: this.orientation(),\n spacing: this.spacing(),\n padding: this.padding(),\n inViewThreshold: this.inViewThreshold(),\n snapType: this.snapType(),\n translations: this.translations(),\n onPageChange: (details) => {\n const currentPage = this.page();\n if (currentPage !== details.page) {\n this.page.set(details.page);\n }\n this.pageDetailsChange.emit(details);\n },\n onDragStatusChange: (details) => {\n this.dragStatusChange.emit(details);\n },\n onAutoplayStatusChange: (details) => {\n this.autoplayStatusChange.emit(details);\n },\n }),\n });\n\n readonly state: Signal<carousel.Service[\"state\"]> = this.machine.state;\n readonly api: Signal<carousel.Api> = this.machine.api;\n readonly service: carousel.Service = this.machine.service;\n readonly send: carousel.Service[\"send\"] = this.machine.send;\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n let destroyed = false;\n let hasObservedSlideCount = false;\n let previousSlideCount: number | undefined;\n destroyRef.onDestroy(() => {\n destroyed = true;\n });\n\n effect(() => {\n const slideCount = this.slideCount();\n if (!hasObservedSlideCount) {\n hasObservedSlideCount = true;\n previousSlideCount = slideCount;\n return;\n }\n if (Object.is(previousSlideCount, slideCount)) return;\n previousSlideCount = slideCount;\n const win = this.service.scope.getWin();\n const scheduleMicrotask = win.queueMicrotask?.bind(win) ?? queueMicrotask;\n scheduleMicrotask(() => {\n if (!destroyed) this.api().refresh();\n });\n });\n\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef,\n props: () => this.api().getRootProps(),\n });\n }\n}\n","import type * as carousel from \"@wirekyt/dom/machines/carousel\";\n\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n computed,\n forwardRef,\n inject,\n input,\n type InputSignal,\n type Signal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { UseCarouselReturn } from \"./use\";\n\nimport { CAROUSEL_CONTEXT } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselRootProvider]\",\n standalone: true,\n exportAs: \"carouselRootProvider\",\n providers: [{ provide: CAROUSEL_CONTEXT, useExisting: forwardRef(() => CarouselRootProvider) }],\n})\nexport class CarouselRootProvider implements UseCarouselReturn {\n readonly value: InputSignal<UseCarouselReturn> = input.required<UseCarouselReturn>();\n readonly state: Signal<carousel.Service[\"state\"]> = computed(() => this.value().state());\n readonly api: Signal<carousel.Api> = computed(() => this.value().api());\n readonly send: carousel.Service[\"send\"] = (event) => this.value().send(event);\n\n get service(): carousel.Service {\n return this.value().service;\n }\n\n constructor() {\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => this.api().getRootProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselItemGroup]\",\n standalone: true,\n exportAs: \"carouselItemGroup\",\n})\nexport class CarouselItemGroup {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getItemGroupProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n inject,\n input,\n type InputSignal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { CarouselItemProps } from \"./types\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselItem]\",\n standalone: true,\n exportAs: \"carouselItem\",\n})\nexport class CarouselItem {\n readonly index: InputSignal<number> = input.required<number>();\n readonly snapAlign: InputSignal<CarouselItemProps[\"snapAlign\"]> =\n input<CarouselItemProps[\"snapAlign\"]>(undefined);\n\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () =>\n carousel.api().getItemProps({\n index: this.index(),\n snapAlign: this.snapAlign(),\n }),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselControl]\",\n standalone: true,\n exportAs: \"carouselControl\",\n})\nexport class CarouselControl {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getControlProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselPrevTrigger]\",\n standalone: true,\n exportAs: \"carouselPrevTrigger\",\n})\nexport class CarouselPrevTrigger {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getPrevTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselNextTrigger]\",\n standalone: true,\n exportAs: \"carouselNextTrigger\",\n})\nexport class CarouselNextTrigger {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getNextTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselIndicatorGroup]\",\n standalone: true,\n exportAs: \"carouselIndicatorGroup\",\n})\nexport class CarouselIndicatorGroup {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getIndicatorGroupProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n booleanAttribute,\n inject,\n input,\n type InputSignal,\n type InputSignalWithTransform,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselIndicator]\",\n standalone: true,\n exportAs: \"carouselIndicator\",\n})\nexport class CarouselIndicator {\n readonly index: InputSignal<number> = input.required<number>();\n readonly readOnly: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () =>\n carousel.api().getIndicatorProps({\n index: this.index(),\n readOnly: this.readOnly(),\n }),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselAutoplayTrigger]\",\n standalone: true,\n exportAs: \"carouselAutoplayTrigger\",\n})\nexport class CarouselAutoplayTrigger {\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getAutoplayTriggerProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n input,\n signal,\n type AfterContentInit,\n type InputSignal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { carouselAnatomy } from \"./anatomy\";\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselAutoplayIndicator]\",\n standalone: true,\n exportAs: \"carouselAutoplayIndicator\",\n})\nexport class CarouselAutoplayIndicator implements AfterContentInit {\n readonly label: InputSignal<string | undefined> = input<string | undefined>(undefined);\n readonly fallback: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly ownsTextContent = signal(false);\n\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: this.elementRef,\n renderer: this.renderer,\n destroyRef: inject(DestroyRef),\n props: () => carouselAnatomy.build().autoplayIndicator.attrs,\n });\n\n effect(() => {\n if (!this.ownsTextContent()) return;\n this.renderer.setProperty(\n this.elementRef.nativeElement,\n \"textContent\",\n carousel.api().isPlaying ? (this.label() ?? \"\") : (this.fallback() ?? \"\"),\n );\n });\n }\n\n ngAfterContentInit(): void {\n this.ownsTextContent.set(hasOnlyWhitespaceContent(this.elementRef.nativeElement));\n }\n}\n\nfunction hasOnlyWhitespaceContent(element: HTMLElement): boolean {\n return element.firstElementChild === null && (element.textContent?.trim() ?? \"\") === \"\";\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n signal,\n type AfterContentInit,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\n@Directive({\n selector: \"[carouselProgressText]\",\n standalone: true,\n exportAs: \"carouselProgressText\",\n})\nexport class CarouselProgressText implements AfterContentInit {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly ownsTextContent = signal(false);\n\n constructor() {\n const carousel = injectCarouselContext();\n bindProps({\n elementRef: this.elementRef,\n renderer: this.renderer,\n destroyRef: inject(DestroyRef),\n props: () => carousel.api().getProgressTextProps(),\n });\n\n effect(() => {\n if (!this.ownsTextContent()) return;\n this.renderer.setProperty(\n this.elementRef.nativeElement,\n \"textContent\",\n carousel.api().getProgressText(),\n );\n });\n }\n\n ngAfterContentInit(): void {\n this.ownsTextContent.set(hasOnlyWhitespaceContent(this.elementRef.nativeElement));\n }\n}\n\nfunction hasOnlyWhitespaceContent(element: HTMLElement): boolean {\n return element.firstElementChild === null && (element.textContent?.trim() ?? \"\") === \"\";\n}\n","import {\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n} from \"@angular/core\";\n\nimport type { UseCarouselReturn } from \"./use\";\n\nimport { injectCarouselContext } from \"./use-context\";\n\nexport interface CarouselContextTemplate {\n $implicit: UseCarouselReturn[\"api\"];\n api: UseCarouselReturn[\"api\"];\n}\n\n@Directive({\n selector: \"[carouselContext]\",\n standalone: true,\n exportAs: \"carouselContext\",\n})\nexport class CarouselContext {\n static ngTemplateContextGuard(\n _directive: CarouselContext,\n context: unknown,\n ): context is CarouselContextTemplate {\n void context;\n return true;\n }\n\n private readonly carousel = injectCarouselContext();\n private readonly templateRef = inject<TemplateRef<CarouselContextTemplate>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n constructor() {\n const view = this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: this.carousel.api,\n api: this.carousel.api,\n });\n\n effect(() => {\n this.carousel.api();\n view.detectChanges();\n });\n\n inject(DestroyRef).onDestroy(() => view.destroy());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["hasOnlyWhitespaceContent"],"mappings":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