@molecule/app-feature-transport-bar-angular 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,553 @@
1
+ /**
2
+ * TransportBar component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { NgTemplateOutlet } from '@angular/common';
7
+ import { Component, ElementRef, inject, Renderer2, ViewChild, } from '@angular/core';
8
+ import { useTranslation } from '@molecule/app-angular';
9
+ import { getClassMap } from '@molecule/app-ui';
10
+ import { hasNodes, SlotWrapper } from '@molecule/app-ui-angular';
11
+ import * as i0 from "@angular/core";
12
+ const _c0 = ["timeSlot"];
13
+ const _c1 = ["childSlot"];
14
+ const _c2 = ["namedSlot"];
15
+ const _c3 = ["*", [["", "slot", "timedisplay"]]];
16
+ const _c4 = ["*", "[slot=timeDisplay]"];
17
+ function TransportBar_Conditional_0_Template(rf, ctx) { if (rf & 1) {
18
+ const _r1 = i0.ɵɵgetCurrentView();
19
+ i0.ɵɵelementStart(0, "button", 12);
20
+ i0.ɵɵlistener("click", function TransportBar_Conditional_0_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.callSkipBack($event)); });
21
+ i0.ɵɵelementStart(1, "span", 5);
22
+ i0.ɵɵtext(2, "\u23EE");
23
+ i0.ɵɵelementEnd()();
24
+ } if (rf & 2) {
25
+ const ctx_r1 = i0.ɵɵnextContext();
26
+ i0.ɵɵclassMap(ctx_r1.controlClasses());
27
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
28
+ i0.ɵɵproperty("disabled", !ctx_r1.canSkipValue());
29
+ i0.ɵɵattribute("aria-label", ctx_r1.skipBackLabel());
30
+ } }
31
+ function TransportBar_Conditional_7_Template(rf, ctx) { if (rf & 1) {
32
+ const _r3 = i0.ɵɵgetCurrentView();
33
+ i0.ɵɵelementStart(0, "button", 13);
34
+ i0.ɵɵlistener("click", function TransportBar_Conditional_7_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.callSkipForward($event)); });
35
+ i0.ɵɵelementStart(1, "span", 5);
36
+ i0.ɵɵtext(2, "\u23ED");
37
+ i0.ɵɵelementEnd()();
38
+ } if (rf & 2) {
39
+ const ctx_r1 = i0.ɵɵnextContext();
40
+ i0.ɵɵclassMap(ctx_r1.controlClasses());
41
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
42
+ i0.ɵɵproperty("disabled", !ctx_r1.canSkipValue());
43
+ i0.ɵɵattribute("aria-label", ctx_r1.skipForwardLabel());
44
+ } }
45
+ function TransportBar_Conditional_8_Template(rf, ctx) { if (rf & 1) {
46
+ const _r4 = i0.ɵɵgetCurrentView();
47
+ i0.ɵɵelementStart(0, "button", 14);
48
+ i0.ɵɵlistener("click", function TransportBar_Conditional_8_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.callRecordToggle($event)); });
49
+ i0.ɵɵelementStart(1, "span", 5);
50
+ i0.ɵɵtext(2, "\u25CF");
51
+ i0.ɵɵelementEnd()();
52
+ } if (rf & 2) {
53
+ const ctx_r1 = i0.ɵɵnextContext();
54
+ i0.ɵɵclassMap(ctx_r1.controlClasses());
55
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
56
+ i0.ɵɵattribute("aria-label", ctx_r1.isRecording ? ctx_r1.stopRecordingLabel() : ctx_r1.recordLabel())("aria-pressed", !!ctx_r1.isRecording)("data-state", ctx_r1.isRecording ? "recording" : "idle");
57
+ } }
58
+ function TransportBar_Conditional_9_Template(rf, ctx) { if (rf & 1) {
59
+ const _r5 = i0.ɵɵgetCurrentView();
60
+ i0.ɵɵelementStart(0, "button", 15);
61
+ i0.ɵɵlistener("click", function TransportBar_Conditional_9_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.callLoopToggle($event)); });
62
+ i0.ɵɵelementStart(1, "span", 5);
63
+ i0.ɵɵtext(2, "\u21BB");
64
+ i0.ɵɵelementEnd()();
65
+ } if (rf & 2) {
66
+ const ctx_r1 = i0.ɵɵnextContext();
67
+ i0.ɵɵclassMap(ctx_r1.controlClasses());
68
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
69
+ i0.ɵɵattribute("aria-label", ctx_r1.loop ? ctx_r1.loopOnLabel() : ctx_r1.loopOffLabel())("aria-pressed", !!ctx_r1.loop)("data-state", ctx_r1.loop ? "on" : "off");
70
+ } }
71
+ function TransportBar_Conditional_18_Template(rf, ctx) { if (rf & 1) {
72
+ i0.ɵɵelementContainer(0, 11);
73
+ } if (rf & 2) {
74
+ const ctx_r1 = i0.ɵɵnextContext();
75
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.asTemplate(ctx_r1.timeDisplay));
76
+ } }
77
+ function TransportBar_Conditional_19_Template(rf, ctx) { if (rf & 1) {
78
+ i0.ɵɵtext(0);
79
+ } if (rf & 2) {
80
+ const ctx_r1 = i0.ɵɵnextContext();
81
+ i0.ɵɵtextInterpolate(ctx_r1.timeDisplayText());
82
+ } }
83
+ function TransportBar_Conditional_20_Template(rf, ctx) { if (rf & 1) {
84
+ i0.ɵɵtext(0);
85
+ } if (rf & 2) {
86
+ const ctx_r1 = i0.ɵɵnextContext();
87
+ i0.ɵɵtextInterpolate(ctx_r1.falsySlotText());
88
+ } }
89
+ /**
90
+ * Whether a field is one of the cases' projected node templates (a `{ $nodes }`
91
+ * value inside a prop becomes a `TemplateRef`).
92
+ *
93
+ * @param value - The field value.
94
+ * @returns True for a projected node template.
95
+ */
96
+ const isTemplate = (value) => typeof value === 'object' && value !== null && 'createEmbeddedView' in value;
97
+ /**
98
+ * Transport-control bar (play / pause / stop / record / skip / loop) used by
99
+ * music-daw + video-editor surfaces for editor playback control. Renders a
100
+ * horizontal bar of buttons with semantic icons and fully translated
101
+ * `aria-label`s; an optional time-display slot lets callers render the current
102
+ * playhead position / total duration without coupling the bar to any specific
103
+ * time-format library.
104
+ *
105
+ * The host IS the outer `<div>` (`div[mol-transport-bar]`), matching React's
106
+ * root exactly. Every button renders only while React would render it (a
107
+ * missing handler renders no button, `canStop` / `canSkip` only disable one),
108
+ * and the time-display wrapper renders only while React's `{slot && …}` would
109
+ * render it — the Angular projection capture points must stay mounted, so
110
+ * presence is read in {@link TransportBar.ngAfterViewInit} and the wrapper is
111
+ * detached through {@link SlotWrapper} instead.
112
+ */
113
+ export class TransportBar {
114
+ /** Whether playback is currently running. */
115
+ isPlaying;
116
+ /** Whether recording is currently armed / running. */
117
+ isRecording;
118
+ /** Whether the stop button is enabled (defaults to `true` at read time). */
119
+ canStop;
120
+ /** Whether the skip buttons are enabled (defaults to `true` at read time). */
121
+ canSkip;
122
+ /** Whether loop playback is currently engaged. */
123
+ loop;
124
+ /** Toggle play / pause. */
125
+ onPlayToggle;
126
+ /** Stop playback. */
127
+ onStop;
128
+ /** Skip to the previous marker / start of clip. */
129
+ onSkipBack;
130
+ /** Skip to the next marker / end of clip. */
131
+ onSkipForward;
132
+ /** Toggle record mode. */
133
+ onRecordToggle;
134
+ /** Toggle loop mode. */
135
+ onLoopToggle;
136
+ /** Optional time-display slot: projected `[slot=timeDisplay]`, a `TemplateRef`, or text. */
137
+ timeDisplay;
138
+ /** Extra classes merged onto the root element. */
139
+ className;
140
+ /** The time-display wrapper (always in the template; detached when React renders none). */
141
+ timeSlotRef;
142
+ /** The default content's capture point (its nodes are unwrapped when React shows them). */
143
+ childSlotRef;
144
+ /** The `[slot=timeDisplay]` content's capture point. */
145
+ namedSlotRef;
146
+ i18n = useTranslation();
147
+ host = inject(ElementRef).nativeElement;
148
+ renderer = inject(Renderer2);
149
+ wrapper = new SlotWrapper(inject(ElementRef), this.renderer);
150
+ /** Whether `children` content was projected (a projection is fixed at creation). */
151
+ hasChildSlot = false;
152
+ /** Whether `[slot=timeDisplay]` content was projected. */
153
+ hasNamedSlot = false;
154
+ /** Each capture wrapper's permanent comment anchor, left at its template position. */
155
+ captureAnchors = new Map();
156
+ /** The nodes each capture wrapper currently has hoisted out of it. */
157
+ hoistedNodes = new Map();
158
+ /**
159
+ * The current class map.
160
+ * @returns The UIClassMap.
161
+ */
162
+ cm() {
163
+ return getClassMap();
164
+ }
165
+ /**
166
+ * Computes the root class list (React's `cm.cn(cm.flex({…}), cm.sp('p', 2), className)`).
167
+ * @returns The class string.
168
+ */
169
+ classes() {
170
+ return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('p', 2), this.className);
171
+ }
172
+ /**
173
+ * Computes every control's class list (React's `cm.cn(cm.cursorPointer, cm.sp('p', 1))`).
174
+ * @returns The class string.
175
+ */
176
+ controlClasses() {
177
+ return this.cm().cn(this.cm().cursorPointer, this.cm().sp('p', 1));
178
+ }
179
+ /**
180
+ * Computes the time-display wrapper's class list (React's `cm.cn(cm.textSize('sm'), cm.sp('px', 2))`).
181
+ * @returns The class string.
182
+ */
183
+ timeClasses() {
184
+ return this.cm().cn(this.cm().textSize('sm'), this.cm().sp('px', 2));
185
+ }
186
+ /**
187
+ * The toolbar's accessible name (React's `transportBar.aria.region`).
188
+ * @returns The label text.
189
+ */
190
+ regionLabel() {
191
+ return this.i18n.t('transportBar.aria.region', {}, { defaultValue: 'Playback transport controls' });
192
+ }
193
+ /**
194
+ * The skip-back button's accessible name.
195
+ * @returns The label text.
196
+ */
197
+ skipBackLabel() {
198
+ return this.i18n.t('transportBar.aria.skipBack', {}, { defaultValue: 'Skip backward' });
199
+ }
200
+ /**
201
+ * The skip-forward button's accessible name.
202
+ * @returns The label text.
203
+ */
204
+ skipForwardLabel() {
205
+ return this.i18n.t('transportBar.aria.skipForward', {}, { defaultValue: 'Skip forward' });
206
+ }
207
+ /**
208
+ * The play button's accessible name.
209
+ * @returns The label text.
210
+ */
211
+ playLabel() {
212
+ return this.i18n.t('transportBar.aria.play', {}, { defaultValue: 'Play' });
213
+ }
214
+ /**
215
+ * The pause button's accessible name.
216
+ * @returns The label text.
217
+ */
218
+ pauseLabel() {
219
+ return this.i18n.t('transportBar.aria.pause', {}, { defaultValue: 'Pause' });
220
+ }
221
+ /**
222
+ * The stop button's accessible name.
223
+ * @returns The label text.
224
+ */
225
+ stopLabel() {
226
+ return this.i18n.t('transportBar.aria.stop', {}, { defaultValue: 'Stop' });
227
+ }
228
+ /**
229
+ * The record button's accessible name while idle.
230
+ * @returns The label text.
231
+ */
232
+ recordLabel() {
233
+ return this.i18n.t('transportBar.aria.record', {}, { defaultValue: 'Record' });
234
+ }
235
+ /**
236
+ * The record button's accessible name while recording.
237
+ * @returns The label text.
238
+ */
239
+ stopRecordingLabel() {
240
+ return this.i18n.t('transportBar.aria.stopRecording', {}, { defaultValue: 'Stop recording' });
241
+ }
242
+ /**
243
+ * The loop button's accessible name while engaged.
244
+ * @returns The label text.
245
+ */
246
+ loopOnLabel() {
247
+ return this.i18n.t('transportBar.aria.loopOn', {}, { defaultValue: 'Disable loop' });
248
+ }
249
+ /**
250
+ * The loop button's accessible name while disengaged.
251
+ * @returns The label text.
252
+ */
253
+ loopOffLabel() {
254
+ return this.i18n.t('transportBar.aria.loopOff', {}, { defaultValue: 'Enable loop' });
255
+ }
256
+ /**
257
+ * React's `canStop = true` default parameter.
258
+ * @returns Whether the stop button is enabled.
259
+ */
260
+ canStopValue() {
261
+ return this.canStop ?? true;
262
+ }
263
+ /**
264
+ * React's `canSkip = true` default parameter.
265
+ * @returns Whether the skip buttons are enabled.
266
+ */
267
+ canSkipValue() {
268
+ return this.canSkip ?? true;
269
+ }
270
+ /**
271
+ * React's `timeDisplay ?? children` truthiness: whether the time-display
272
+ * wrapper renders.
273
+ * @returns True when the wrapper (and not the bare falsy value) renders.
274
+ */
275
+ slotPresent() {
276
+ return this.namedPresent() || this.hasChildSlot;
277
+ }
278
+ /**
279
+ * Whether React's `timeDisplay` slot is provided at all: the input (a
280
+ * template, text or number) or projected `[slot=timeDisplay]` content.
281
+ * @returns True when the named slot wins over the default content.
282
+ */
283
+ namedPresent() {
284
+ return this.timeDisplayPresent() || this.hasNamedSlot;
285
+ }
286
+ /**
287
+ * Whether a value is a projected node template.
288
+ * @param value - The field value.
289
+ * @returns True for a projected node template.
290
+ */
291
+ isTemplate(value) {
292
+ return isTemplate(value);
293
+ }
294
+ /**
295
+ * The value as a template (call under {@link TransportBar.isTemplate}).
296
+ * @param value - The field value.
297
+ * @returns The template.
298
+ */
299
+ asTemplate(value) {
300
+ return value;
301
+ }
302
+ /**
303
+ * The `timeDisplay` input's text (a string or number renders as text, as
304
+ * React renders it inside the wrapper).
305
+ * @returns The text, or `''` when the input is a node or absent.
306
+ */
307
+ timeDisplayText() {
308
+ const value = this.timeDisplay;
309
+ if (typeof value === 'string')
310
+ return value;
311
+ if (typeof value === 'number' && value !== 0 && !Number.isNaN(value))
312
+ return String(value);
313
+ return '';
314
+ }
315
+ /**
316
+ * React's `{slot && …}` yields the falsy value itself, and React renders a
317
+ * number there (`0` shows as the text "0"); an empty string, `false`, `null`
318
+ * and `undefined` render nothing.
319
+ * @returns The text React renders beside the controls, or `''`.
320
+ */
321
+ falsySlotText() {
322
+ if (this.slotPresent())
323
+ return '';
324
+ return typeof this.timeDisplay === 'number' ? String(this.timeDisplay) : '';
325
+ }
326
+ /** Toggles play / pause (React's `onClick={onPlayToggle}`). */
327
+ callPlayToggle(event) {
328
+ this.onPlayToggle?.(event);
329
+ }
330
+ /** Stops playback (React's `onClick={onStop}`). */
331
+ callStop(event) {
332
+ this.onStop?.(event);
333
+ }
334
+ /** Skips backward (React's conditional skip button). */
335
+ callSkipBack(event) {
336
+ this.onSkipBack?.(event);
337
+ }
338
+ /** Skips forward (React's conditional skip button). */
339
+ callSkipForward(event) {
340
+ this.onSkipForward?.(event);
341
+ }
342
+ /** Toggles record mode (React's conditional record button). */
343
+ callRecordToggle(event) {
344
+ this.onRecordToggle?.(event);
345
+ }
346
+ /** Toggles loop mode (React's conditional loop button). */
347
+ callLoopToggle(event) {
348
+ this.onLoopToggle?.(event);
349
+ }
350
+ /**
351
+ * Reads the projected slots' presence and turns the two capture wrappers into
352
+ * permanent anchors: a projection point must stay mounted, so its nodes are
353
+ * moved out (unwrapped) while React renders them and kept inside the detached
354
+ * wrapper while React does not.
355
+ */
356
+ ngAfterViewInit() {
357
+ this.hasChildSlot = hasNodes(this.childSlotRef?.nativeElement);
358
+ this.hasNamedSlot = hasNodes(this.namedSlotRef?.nativeElement);
359
+ this.anchor(this.childSlotRef?.nativeElement);
360
+ this.anchor(this.namedSlotRef?.nativeElement);
361
+ this.reconcile();
362
+ }
363
+ /** Re-applies React's conditional DOM after input writes. */
364
+ ngDoCheck() {
365
+ this.reconcile();
366
+ }
367
+ /** Detaches the time-display wrapper from its re-insertion anchor on teardown. */
368
+ ngOnDestroy() {
369
+ this.captureAnchors.clear();
370
+ this.hoistedNodes.clear();
371
+ }
372
+ /**
373
+ * Whether the `timeDisplay` input alone makes React render the wrapper.
374
+ * @returns True for a template, a non-empty string, a non-zero number or `true`.
375
+ */
376
+ timeDisplayPresent() {
377
+ const value = this.timeDisplay;
378
+ if (isTemplate(value))
379
+ return true;
380
+ if (typeof value === 'number')
381
+ return value !== 0 && !Number.isNaN(value);
382
+ if (typeof value === 'string')
383
+ return value !== '';
384
+ return value === true;
385
+ }
386
+ /**
387
+ * Leaves a comment anchor at a capture wrapper's template position and takes
388
+ * the wrapper out of the DOM (the projection stays inside it).
389
+ * @param slot - The capture wrapper.
390
+ */
391
+ anchor(slot) {
392
+ if (!slot)
393
+ return;
394
+ const parent = slot.parentNode;
395
+ if (!parent)
396
+ return;
397
+ const comment = this.renderer.createComment('capture');
398
+ parent.insertBefore(comment, slot);
399
+ parent.removeChild(slot);
400
+ this.captureAnchors.set(slot, comment);
401
+ }
402
+ /**
403
+ * Applies React's DOM for the time-display region: the wrapper renders only
404
+ * while React renders it, and each projected slot is unwrapped while it is
405
+ * the one React shows.
406
+ */
407
+ reconcile() {
408
+ const time = this.timeSlotRef?.nativeElement;
409
+ if (!time)
410
+ return;
411
+ const present = this.namedPresent();
412
+ this.wrapper.sync(time, this.slotPresent());
413
+ const winner = present ? this.namedSlotRef?.nativeElement : this.childSlotRef?.nativeElement;
414
+ const loser = present ? this.childSlotRef?.nativeElement : this.namedSlotRef?.nativeElement;
415
+ this.hoist(winner, true);
416
+ this.hoist(loser, false);
417
+ }
418
+ /**
419
+ * Moves a capture wrapper's nodes out beside its anchor (visible) or back
420
+ * inside it (hidden); the wrapper itself never renders.
421
+ * @param slot - The capture wrapper.
422
+ * @param visible - Whether React renders its content here.
423
+ */
424
+ hoist(slot, visible) {
425
+ if (!slot)
426
+ return;
427
+ const anchor = this.captureAnchors.get(slot);
428
+ if (!anchor)
429
+ return;
430
+ const hoisted = this.hoistedNodes.get(slot);
431
+ if (visible && !hoisted) {
432
+ const parent = anchor.parentNode;
433
+ if (!parent)
434
+ return;
435
+ const nodes = Array.from(slot.childNodes);
436
+ for (const node of nodes)
437
+ parent.insertBefore(node, anchor);
438
+ this.hoistedNodes.set(slot, nodes);
439
+ }
440
+ else if (!visible && hoisted) {
441
+ for (const node of hoisted)
442
+ slot.appendChild(node);
443
+ this.hoistedNodes.delete(slot);
444
+ }
445
+ }
446
+ static ɵfac = function TransportBar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TransportBar)(); };
447
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TransportBar, selectors: [["div", "mol-transport-bar", ""]], viewQuery: function TransportBar_Query(rf, ctx) { if (rf & 1) {
448
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
449
+ } if (rf & 2) {
450
+ let _t;
451
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.timeSlotRef = _t.first);
452
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.childSlotRef = _t.first);
453
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.namedSlotRef = _t.first);
454
+ } }, hostAttrs: ["role", "toolbar", "data-mol-id", "transport-bar"], hostVars: 3, hostBindings: function TransportBar_HostBindings(rf, ctx) { if (rf & 2) {
455
+ i0.ɵɵattribute("aria-label", ctx.regionLabel());
456
+ i0.ɵɵclassMap(ctx.classes());
457
+ } }, inputs: { isPlaying: "isPlaying", isRecording: "isRecording", canStop: "canStop", canSkip: "canSkip", loop: "loop", onPlayToggle: "onPlayToggle", onStop: "onStop", onSkipBack: "onSkipBack", onSkipForward: "onSkipForward", onRecordToggle: "onRecordToggle", onLoopToggle: "onLoopToggle", timeDisplay: "timeDisplay", className: "className" }, ngContentSelectors: _c4, decls: 21, vars: 35, consts: [["timeSlot", ""], ["childSlot", ""], ["namedSlot", ""], ["type", "button", "data-mol-id", "transport-bar-skip-back", 3, "disabled", "class", "background", "border", "cursor", "padding"], ["type", "button", "data-mol-id", "transport-bar-play-toggle", 3, "click"], ["aria-hidden", "true"], ["type", "button", "data-mol-id", "transport-bar-stop", 3, "click", "disabled"], ["type", "button", "data-mol-id", "transport-bar-skip-forward", 3, "disabled", "class", "background", "border", "cursor", "padding"], ["type", "button", "data-mol-id", "transport-bar-record-toggle", 3, "class", "background", "border", "cursor", "padding"], ["type", "button", "data-mol-id", "transport-bar-loop-toggle", 3, "class", "background", "border", "cursor", "padding"], ["data-mol-id", "transport-bar-time-display"], [3, "ngTemplateOutlet"], ["type", "button", "data-mol-id", "transport-bar-skip-back", 3, "click", "disabled"], ["type", "button", "data-mol-id", "transport-bar-skip-forward", 3, "click", "disabled"], ["type", "button", "data-mol-id", "transport-bar-record-toggle", 3, "click"], ["type", "button", "data-mol-id", "transport-bar-loop-toggle", 3, "click"]], template: function TransportBar_Template(rf, ctx) { if (rf & 1) {
458
+ i0.ɵɵprojectionDef(_c3);
459
+ i0.ɵɵconditionalCreate(0, TransportBar_Conditional_0_Template, 3, 12, "button", 3);
460
+ i0.ɵɵelementStart(1, "button", 4);
461
+ i0.ɵɵlistener("click", function TransportBar_Template_button_click_1_listener($event) { return ctx.callPlayToggle($event); });
462
+ i0.ɵɵelementStart(2, "span", 5);
463
+ i0.ɵɵtext(3);
464
+ i0.ɵɵelementEnd()();
465
+ i0.ɵɵelementStart(4, "button", 6);
466
+ i0.ɵɵlistener("click", function TransportBar_Template_button_click_4_listener($event) { return ctx.callStop($event); });
467
+ i0.ɵɵelementStart(5, "span", 5);
468
+ i0.ɵɵtext(6, "\u23F9");
469
+ i0.ɵɵelementEnd()();
470
+ i0.ɵɵconditionalCreate(7, TransportBar_Conditional_7_Template, 3, 12, "button", 7);
471
+ i0.ɵɵconditionalCreate(8, TransportBar_Conditional_8_Template, 3, 13, "button", 8);
472
+ i0.ɵɵconditionalCreate(9, TransportBar_Conditional_9_Template, 3, 13, "button", 9);
473
+ i0.ɵɵelementStart(10, "div", 10, 0)(12, "span", null, 1);
474
+ i0.ɵɵprojection(14);
475
+ i0.ɵɵelementEnd();
476
+ i0.ɵɵelementStart(15, "span", null, 2);
477
+ i0.ɵɵprojection(17, 1);
478
+ i0.ɵɵelementEnd();
479
+ i0.ɵɵconditionalCreate(18, TransportBar_Conditional_18_Template, 1, 1, "ng-container", 11);
480
+ i0.ɵɵconditionalCreate(19, TransportBar_Conditional_19_Template, 1, 1);
481
+ i0.ɵɵelementEnd();
482
+ i0.ɵɵconditionalCreate(20, TransportBar_Conditional_20_Template, 1, 1);
483
+ } if (rf & 2) {
484
+ i0.ɵɵconditional(ctx.onSkipBack ? 0 : -1);
485
+ i0.ɵɵadvance();
486
+ i0.ɵɵclassMap(ctx.controlClasses());
487
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
488
+ i0.ɵɵattribute("aria-label", ctx.isPlaying ? ctx.pauseLabel() : ctx.playLabel())("aria-pressed", ctx.isPlaying)("data-state", ctx.isPlaying ? "playing" : "paused");
489
+ i0.ɵɵadvance(2);
490
+ i0.ɵɵtextInterpolate(ctx.isPlaying ? "\u23F8" : "\u25B6");
491
+ i0.ɵɵadvance();
492
+ i0.ɵɵclassMap(ctx.controlClasses());
493
+ i0.ɵɵstyleProp("background", "transparent")("border", "none")("cursor", "pointer")("padding", 0);
494
+ i0.ɵɵproperty("disabled", !ctx.canStopValue());
495
+ i0.ɵɵattribute("aria-label", ctx.stopLabel());
496
+ i0.ɵɵadvance(3);
497
+ i0.ɵɵconditional(ctx.onSkipForward ? 7 : -1);
498
+ i0.ɵɵadvance();
499
+ i0.ɵɵconditional(ctx.onRecordToggle ? 8 : -1);
500
+ i0.ɵɵadvance();
501
+ i0.ɵɵconditional(ctx.onLoopToggle ? 9 : -1);
502
+ i0.ɵɵadvance();
503
+ i0.ɵɵclassMap(ctx.timeClasses());
504
+ i0.ɵɵadvance(8);
505
+ i0.ɵɵconditional(ctx.isTemplate(ctx.timeDisplay) ? 18 : -1);
506
+ i0.ɵɵadvance();
507
+ i0.ɵɵconditional(ctx.timeDisplayText() ? 19 : -1);
508
+ i0.ɵɵadvance();
509
+ i0.ɵɵconditional(ctx.falsySlotText() ? 20 : -1);
510
+ } }, dependencies: [NgTemplateOutlet], encapsulation: 2 });
511
+ }
512
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TransportBar, [{
513
+ type: Component,
514
+ args: [{
515
+ selector: 'div[mol-transport-bar]',
516
+ standalone: true,
517
+ imports: [NgTemplateOutlet],
518
+ inputs: [
519
+ 'isPlaying',
520
+ 'isRecording',
521
+ 'canStop',
522
+ 'canSkip',
523
+ 'loop',
524
+ 'onPlayToggle',
525
+ 'onStop',
526
+ 'onSkipBack',
527
+ 'onSkipForward',
528
+ 'onRecordToggle',
529
+ 'onLoopToggle',
530
+ 'timeDisplay',
531
+ 'className',
532
+ ],
533
+ host: {
534
+ role: 'toolbar',
535
+ 'data-mol-id': 'transport-bar',
536
+ '[attr.aria-label]': 'regionLabel()',
537
+ '[class]': 'classes()',
538
+ },
539
+ // prettier-ignore
540
+ template: `@if (onSkipBack) {<button type="button" (click)="callSkipBack($event)" [disabled]="!canSkipValue()" [attr.aria-label]="skipBackLabel()" data-mol-id="transport-bar-skip-back" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">⏮</span></button>}<button type="button" (click)="callPlayToggle($event)" [attr.aria-label]="isPlaying ? pauseLabel() : playLabel()" [attr.aria-pressed]="isPlaying" [attr.data-state]="isPlaying ? 'playing' : 'paused'" data-mol-id="transport-bar-play-toggle" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">{{ isPlaying ? '⏸' : '▶' }}</span></button><button type="button" (click)="callStop($event)" [disabled]="!canStopValue()" [attr.aria-label]="stopLabel()" data-mol-id="transport-bar-stop" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">⏹</span></button>@if (onSkipForward) {<button type="button" (click)="callSkipForward($event)" [disabled]="!canSkipValue()" [attr.aria-label]="skipForwardLabel()" data-mol-id="transport-bar-skip-forward" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">⏭</span></button>}@if (onRecordToggle) {<button type="button" (click)="callRecordToggle($event)" [attr.aria-label]="isRecording ? stopRecordingLabel() : recordLabel()" [attr.aria-pressed]="!!isRecording" [attr.data-state]="isRecording ? 'recording' : 'idle'" data-mol-id="transport-bar-record-toggle" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">●</span></button>}@if (onLoopToggle) {<button type="button" (click)="callLoopToggle($event)" [attr.aria-label]="loop ? loopOnLabel() : loopOffLabel()" [attr.aria-pressed]="!!loop" [attr.data-state]="loop ? 'on' : 'off'" data-mol-id="transport-bar-loop-toggle" [class]="controlClasses()" [style.background]="'transparent'" [style.border]="'none'" [style.cursor]="'pointer'" [style.padding]="0"><span aria-hidden="true">↻</span></button>}<div #timeSlot data-mol-id="transport-bar-time-display" [class]="timeClasses()"><span #childSlot><ng-content></ng-content></span><span #namedSlot><ng-content select="[slot=timeDisplay]"></ng-content></span>@if (isTemplate(timeDisplay)) {<ng-container [ngTemplateOutlet]="asTemplate(timeDisplay)" />}@if (timeDisplayText()) {{{ timeDisplayText() }}}</div>@if (falsySlotText()) {{{ falsySlotText() }}}`,
541
+ }]
542
+ }], null, { timeSlotRef: [{
543
+ type: ViewChild,
544
+ args: ['timeSlot']
545
+ }], childSlotRef: [{
546
+ type: ViewChild,
547
+ args: ['childSlot']
548
+ }], namedSlotRef: [{
549
+ type: ViewChild,
550
+ args: ['namedSlot']
551
+ }] }); })();
552
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TransportBar, { className: "TransportBar", filePath: "transport-bar.component.ts", lineNumber: 77 }); })();
553
+ //# sourceMappingURL=transport-bar.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport-bar.component.js","sourceRoot":"","sources":["../src/transport-bar.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACN,SAAS,EAET,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;;;;;;;;;IAsDjC,kCAAiS;IAA3Q,sLAAS,2BAAoB,KAAC;IAA6O,+BAAy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;YAA3c,6CAA2c;YAAA,cAAka;YAAla,2CAAka;YAAwD,cAAuB;YAAvB,gCAAuB;YAA+H,eAA6F;YAA7F,2DAA6F;YAAA,cAAiD;YAAjD,iDAAiD;YAAM,cAA6C;YAA7C,+CAA6C;4BAvB3rF,gBAAgB;;iFAyBf,YAAY;cA5BxB,SAAS;eAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,gBAAgB,CAAC;gBAC3B,MAAM,EAAE;oBACN,WAAW;oBACX,aAAa;oBACb,SAAS;oBACT,SAAS;oBACT,MAAM;oBACN,cAAc;oBACd,QAAQ;oBACR,YAAY;oBACZ,eAAe;oBACf,gBAAgB;oBAChB,cAAc;oBACd,aAAa;oBACb,WAAW;iBACZ;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,aAAa,EAAE,eAAe;oBAC9B,mBAAmB,EAAE,eAAe;oBACpC,SAAS,EAAE,WAAW;iBACvB;gBACD,kBAAkB;gBAClB,QAAQ,EAAE,4rFAA4rF;aACvsF;;kBA8BE,SAAS;mBAAC,UAAU;;kBAEpB,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,WAAW;;kFAjCX,YAAY"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Types of `@molecule/app-feature-transport-bar-angular` — the Angular
3
+ * counterpart of `@molecule/app-feature-transport-bar-react`, same props and
4
+ * DOM.
5
+ *
6
+ * @module
7
+ */
8
+ /**
9
+ * Props accepted by {@link TransportBar} — the same props
10
+ * `@molecule/app-feature-transport-bar-react` accepts. Node props
11
+ * (`timeDisplay`, `children`) are projected content in Angular (an input
12
+ * cannot carry a node), so they are typed `unknown`: pass them in the host
13
+ * template, not as values.
14
+ */
15
+ export interface TransportBarProps {
16
+ /**
17
+ * Whether playback is currently running. Drives the play / pause toggle
18
+ * button's icon, label, and `aria-pressed` state.
19
+ */
20
+ isPlaying: boolean;
21
+ /**
22
+ * Whether recording is currently armed / running. Drives the record
23
+ * button's icon, label, and `aria-pressed` state. The record button
24
+ * itself renders only when `onRecordToggle` is provided.
25
+ */
26
+ isRecording?: boolean;
27
+ /**
28
+ * Whether the stop button is enabled. When `false`, the button still
29
+ * renders but is `disabled`. Defaults to `true` when omitted.
30
+ */
31
+ canStop?: boolean;
32
+ /**
33
+ * Whether the skip-back / skip-forward buttons are enabled. When `false`,
34
+ * the buttons still render but are `disabled`. Defaults to `true` when
35
+ * omitted. Skip buttons only render when their respective `onSkipBack` /
36
+ * `onSkipForward` handlers are provided.
37
+ */
38
+ canSkip?: boolean;
39
+ /**
40
+ * Whether loop playback is currently engaged. Drives the loop button's
41
+ * `aria-pressed` state. The loop button itself renders only when
42
+ * `onLoopToggle` is provided.
43
+ */
44
+ loop?: boolean;
45
+ /** Toggle play / pause. Required. */
46
+ onPlayToggle: (event: Event) => void;
47
+ /** Stop playback (resets to start). Required. */
48
+ onStop: (event: Event) => void;
49
+ /** Skip to the previous marker / start of clip. Optional. */
50
+ onSkipBack?: (event: Event) => void;
51
+ /** Skip to the next marker / end of clip. Optional. */
52
+ onSkipForward?: (event: Event) => void;
53
+ /** Toggle record mode. Optional — when omitted no record button is rendered. */
54
+ onRecordToggle?: (event: Event) => void;
55
+ /** Toggle loop mode. Optional — when omitted no loop button is rendered. */
56
+ onLoopToggle?: (event: Event) => void;
57
+ /**
58
+ * Optional time-display slot, projected as `[slot=timeDisplay]` content (or
59
+ * passed as a `TemplateRef` / text input). Takes precedence over
60
+ * `children`.
61
+ */
62
+ timeDisplay?: unknown;
63
+ /** Optional time-display slot, projected as the element's default content. */
64
+ children?: unknown;
65
+ /** Extra classes merged onto the root element. */
66
+ className?: string;
67
+ }
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qCAAqC;IACrC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACpC,iDAAiD;IACjD,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC9B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACnC,uDAAuD;IACvD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACtC,gFAAgF;IAChF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACvC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACrC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types of `@molecule/app-feature-transport-bar-angular` — the Angular
3
+ * counterpart of `@molecule/app-feature-transport-bar-react`, same props and
4
+ * DOM.
5
+ *
6
+ * @module
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}