@orangelogic/design-system 2.116.0 → 2.118.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.
Files changed (38) hide show
  1. package/library/chunks/asset-link-format.QzzboHHE.js +6 -0
  2. package/library/chunks/asset.CIWxY-Aw.js +469 -0
  3. package/library/chunks/{endpoints.DBlquU2-.js → endpoints.D4h8hp1m.js} +90 -90
  4. package/library/chunks/{folder-select.Bc9x2hMO.js → folder-select.CrWjwQcw.js} +2 -2
  5. package/library/chunks/{list-editor.on8VVRn-.js → list-editor.BfpDIsU5.js} +127 -122
  6. package/library/chunks/{transformation.BlQCWMfI.js → transformation.c-RS37zA.js} +1 -1
  7. package/library/components/asset-link-format.js +3 -3
  8. package/library/components/audio.js +165 -103
  9. package/library/components/cropper.js +1 -1
  10. package/library/components/folder-select.js +2 -2
  11. package/library/components/list-editor.js +1 -1
  12. package/library/components/molecules.js +2 -2
  13. package/library/components/select.js +107 -107
  14. package/library/components/types.js +23959 -24121
  15. package/library/package.json +1 -1
  16. package/library/packages/atoms/src/components/audio/audio.d.ts +32 -5
  17. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +2 -1
  18. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  19. package/library/packages/molecules/src/index.d.ts +0 -1
  20. package/library/packages/molecules/src/page-outline/page-outline.d.ts +1 -2
  21. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +4 -1
  22. package/library/packages/organisms/src/chatbot/chatbot.d.ts +1 -1
  23. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
  24. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -0
  25. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -0
  26. package/library/packages/services/src/api/asset/asset.d.ts +6 -3
  27. package/library/packages/services/src/api/endpoints.d.ts +2 -1
  28. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +6 -1
  29. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +2 -0
  30. package/library/packages/types/src/asset-link-format.d.ts +1 -0
  31. package/library/packages/types/src/content-builder.d.ts +4 -0
  32. package/library/react-web-component.d.ts +741 -721
  33. package/library/utils.js +1 -1
  34. package/package.json +1 -1
  35. package/library/chunks/asset-link-format.B0c92pSs.js +0 -6
  36. package/library/chunks/asset.D_xAgoOX.js +0 -460
  37. package/library/packages/molecules/src/timeline/timeline.d.ts +0 -71
  38. package/library/packages/molecules/src/timeline/timeline.styles.d.ts +0 -2
@@ -1,27 +1,30 @@
1
1
  import { r as f, R as y } from "../chunks/resizable-component.styles.DpK0TTP5.js";
2
2
  import { c as v } from "../chunks/component.styles.CRO4Odto.js";
3
- import { U as u, g, f as x, D as w } from "../chunks/time.BSmpFe2G.js";
4
- import { c as _ } from "../chunks/custom-element.L4WJXn1j.js";
5
- import { L as b } from "../chunks/i18n.CH-wak_P.js";
6
- import { w as m } from "../chunks/watch.CThbualB.js";
7
- import { e as S, b as P } from "../chunks/waveform.1U9U_0rd.js";
8
- import { i as $, b as z, x as h } from "../chunks/lit-element.jLBm65_O.js";
9
- import { n } from "../chunks/lib-cortex-element.CVMmyPMC.js";
10
- import { r as s } from "../chunks/state.CSDxrqLd.js";
11
- import { e as E } from "../chunks/query.BBf1UFkC.js";
12
- import { e as C } from "../chunks/class-map.BiVq-cVR.js";
3
+ import { U as m, g as w, f as g, D as x } from "../chunks/time.BSmpFe2G.js";
4
+ import { c as P } from "../chunks/custom-element.L4WJXn1j.js";
5
+ import { L as S } from "../chunks/i18n.CH-wak_P.js";
6
+ import { w as u } from "../chunks/watch.CThbualB.js";
7
+ import { e as _, b } from "../chunks/waveform.1U9U_0rd.js";
8
+ import { i as E, b as $, x as l } from "../chunks/lit-element.jLBm65_O.js";
9
+ import { n as h } from "../chunks/lib-cortex-element.CVMmyPMC.js";
10
+ import { r } from "../chunks/state.CSDxrqLd.js";
11
+ import { e as k } from "../chunks/query.BBf1UFkC.js";
12
+ import { e as W } from "../chunks/class-map.BiVq-cVR.js";
13
13
  import { n as d } from "../chunks/when.Dr1es41R.js";
14
- import { C as k } from "../chunks/icon-button.CQiBjznj.js";
14
+ import { C as z } from "../chunks/icon-button.CQiBjznj.js";
15
15
  import { C as T } from "../chunks/typography.DJC_UXgs.js";
16
- const A = $`audio{display:none}:host{background-color:var(--background-color,var(--cx-color-neutral-0));border-radius:var(--border-radius,0px);border:var(--border,0px);box-sizing:border-box;color:var(--text-color,var(--cx-color-neutral));height:var(--height,auto);width:var(--width,100%);border-style:solid;display:block;position:relative}.audio{border-radius:inherit;gap:var(--cx-spacing-x-small,4px);height:100%;padding:var(--cx-spacing-small,8px);flex-direction:column;justify-content:center;display:flex;overflow:hidden}.audio--empty{height:var(--height,200px);min-height:var(--min-height,100%);padding:0}.audio--empty:before{background-color:var(--cx-color-neutral-1000);color:var(--cx-color-neutral-0);content:attr(data-empty-label);font-family:var(--cx-font-sans);font-size:clamp(var(--cx-font-size-x-small), 4cqw, var(--cx-font-size-large));font-weight:var(--cx-font-weight-semibold);text-align:center;height:100%;text-shadow:.05em .05em .1em var(--cx-color-neutral-1000);justify-content:center;align-items:center;width:100%;line-height:1;display:flex}.audio__play-button{--cx-input-border-width:2px;--cx-input-border-color:var(--text-color,var(--cx-color-neutral))}.audio__play-button::part(base){width:50px;height:50px;color:var(--text-color,var(--cx-color-neutral))!important}.audio__player{align-items:center;gap:var(--cx-spacing-small,8px);height:148px;display:flex}.audio__waveform{flex:1;min-width:0;overflow:hidden}.audio__waveform-svg{cursor:pointer;flex:1;width:100%;min-width:0;height:100%;display:block;overflow:hidden}.audio__waveform-wave{fill:var(--waves-color,var(--cx-color-primary))}.audio__waveform-played{fill:var(--played-color,color-mix(in srgb, var(--waves-color,var(--cx-color-primary)) 50%, white))}.audio__waveform-playhead{fill:var(--playhead-color,var(--cx-color-neutral-0));opacity:.9}.audio__footer{font-size:var(--cx-font-size-x-small,11px);color:var(--text-color,var(--cx-color-neutral));flex-direction:column;gap:0;padding-left:2px;display:flex}.audio__time{color:var(--text-color,var(--cx-color-neutral));font-variant-numeric:tabular-nums}.audio__filename{opacity:.75;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}`;
17
- var B = Object.defineProperty, W = Object.getOwnPropertyDescriptor, i = (t, a, o, r) => {
18
- for (var l = r > 1 ? void 0 : r ? W(a, o) : a, c = t.length - 1, p; c >= 0; c--)
19
- (p = t[c]) && (l = (r ? p(a, o, l) : p(l)) || l);
20
- return r && l && B(a, o, l), l;
16
+ const C = E`audio{display:none}:host{background-color:var(--background-color,var(--cx-color-neutral-0));border-radius:var(--border-radius,0px);border:var(--border,0px);box-sizing:border-box;color:var(--text-color,var(--cx-color-neutral));height:var(--height,auto);width:var(--width,100%);border-style:solid;display:block;position:relative}.audio{border-radius:inherit;gap:var(--cx-spacing-x-small,4px);height:100%;padding:var(--cx-spacing-small,8px);flex-direction:column;justify-content:center;display:flex;overflow:hidden}.audio--empty{height:var(--height,200px);min-height:var(--min-height,100%);padding:0}.audio--empty:before{background-color:var(--cx-color-neutral-1000);color:var(--cx-color-neutral-0);content:attr(data-empty-label);font-family:var(--cx-font-sans);font-size:clamp(var(--cx-font-size-x-small), 4cqw, var(--cx-font-size-large));font-weight:var(--cx-font-weight-semibold);text-align:center;height:100%;text-shadow:.05em .05em .1em var(--cx-color-neutral-1000);justify-content:center;align-items:center;width:100%;line-height:1;display:flex}.audio__play-button{--cx-input-border-width:2px;--cx-input-border-color:var(--text-color,var(--cx-color-neutral))}.audio__play-button::part(base){width:50px;height:50px;color:var(--text-color,var(--cx-color-neutral))!important}.audio__player{align-items:center;gap:var(--cx-spacing-small,8px);height:148px;display:flex}.audio__waveform{flex:1;min-width:0;overflow:hidden}.audio__waveform-svg{cursor:pointer;flex:1;width:100%;min-width:0;height:100%;display:block;overflow:hidden}.audio__waveform-wave{fill:var(--waves-color,var(--cx-color-primary))}.audio__waveform-played{fill:var(--played-color,color-mix(in srgb, var(--waves-color,var(--cx-color-primary)) 50%, white))}.audio__waveform-playhead{fill:var(--playhead-color,var(--cx-color-neutral-0));opacity:.9}.audio__footer{font-size:var(--cx-font-size-x-small,11px);color:var(--text-color,var(--cx-color-neutral));flex-direction:column;gap:0;padding-left:2px;display:flex}.audio__time{color:var(--text-color,var(--cx-color-neutral));font-variant-numeric:tabular-nums}.audio__filename{opacity:.75;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}`;
17
+ var I = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (t, o, a, s) => {
18
+ for (var n = s > 1 ? void 0 : s ? D(o, a) : o, c = t.length - 1, p; c >= 0; c--)
19
+ (p = t[c]) && (n = (s ? p(o, a, n) : p(n)) || n);
20
+ return s && n && I(o, a, n), n;
21
21
  };
22
- let e = class extends y {
22
+ let i = class extends y {
23
23
  constructor() {
24
- super(...arguments), this.localize = new b(this), this.srcLoadVersion = 0, this.extractWaveformPeaks = S, this.src = "", this.name = "", this.autoplay = !1, this.loop = !1, this.waveformSrc = "", this.isPlaying = !1, this.isLoaded = !1, this.isError = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.audioSrc = "";
24
+ super(...arguments), this.localize = new S(this), this.srcLoadVersion = 0, this.allWaveformPeaks = [], this.extractWaveformPeaks = _, this.src = "", this.name = "", this.autoplay = !1, this.loop = !1, this.waveformSrc = "", this.inPoint = 0, this.outPoint = 0, this.isPlaying = !1, this.isLoaded = !1, this.isError = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.audioSrc = "", this.pendingAutoplay = !1;
25
+ }
26
+ get clampedInPoint() {
27
+ return this.durationSeconds ? Math.max(0, Math.min(this.inPoint, this.durationSeconds)) : Math.max(0, this.inPoint);
25
28
  }
26
29
  runConnectedCallback() {
27
30
  this.hasUpdated && this.requestUpdate("src");
@@ -29,34 +32,54 @@ let e = class extends y {
29
32
  disconnectedCallback() {
30
33
  super.disconnectedCallback(), this.srcLoadVersion++, this.cleanUp();
31
34
  }
35
+ willUpdate(t) {
36
+ super.willUpdate(t), (t.has("inPoint") || t.has("outPoint") || t.has("durationSeconds")) && this.recomputeWindow();
37
+ }
32
38
  async handleSrcChange() {
33
39
  await this.applySrc(this.src);
34
40
  }
41
+ handleInPointChange() {
42
+ !this.audioEl || !this.durationSeconds || this.audioEl.currentTime < this.clampedInPoint && this.seekToInPoint();
43
+ }
35
44
  async applySrc(t) {
36
- const a = ++this.srcLoadVersion;
45
+ const o = ++this.srcLoadVersion;
37
46
  if (this.isLoaded = !1, this.isPlaying = !1, !this.waveformSrc) {
38
47
  this.cleanUp();
39
48
  return;
40
49
  }
41
- await this.setupPngWaveform(t, a);
50
+ await this.setupPngWaveform(t, o);
42
51
  }
43
52
  updated(t) {
44
53
  super.updated(t), (t.has("width") || t.has("height") || t.has("resizeSize")) && this.handleSizeChange();
45
54
  }
55
+ recomputeWindow() {
56
+ const t = this.clampedInPoint;
57
+ this.effectiveOutPoint = this.outPoint > 0 ? Math.min(this.outPoint, this.durationSeconds || this.outPoint) : this.durationSeconds, this.windowDuration = Math.max(0, this.effectiveOutPoint - t), this.recomputeWaveform();
58
+ }
59
+ recomputeWaveform() {
60
+ if (!this.allWaveformPeaks.length)
61
+ return;
62
+ let t = this.allWaveformPeaks;
63
+ if (this.durationSeconds > 0) {
64
+ const a = this.allWaveformPeaks.length, s = Math.floor(this.clampedInPoint / this.durationSeconds * a), n = Math.ceil(this.effectiveOutPoint / this.durationSeconds * a);
65
+ t = this.allWaveformPeaks.slice(s, n);
66
+ }
67
+ const o = t.length || 1;
68
+ this.waveformViewBoxWidth = o, this.waveformPath = b(t, o, 200);
69
+ }
46
70
  cleanUp() {
47
- this.audioEl?.pause(), this.audioSrc = "", this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.isLoaded = !1, this.isPlaying = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0;
71
+ this.audioEl?.pause(), this.audioSrc = "", this.allWaveformPeaks = [], this.waveformPath = "", this.waveformViewBoxWidth = 1e3, this.playedFraction = 0, this.style.setProperty("--played-fraction", "0"), this.isLoaded = !1, this.isPlaying = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.effectiveOutPoint = 0, this.windowDuration = 0, this.pendingAutoplay = !1;
48
72
  }
49
- async setupPngWaveform(t, a) {
73
+ async setupPngWaveform(t, o) {
50
74
  this.cleanUp();
51
- const o = await this.extractWaveformPeaks(this.waveformSrc);
52
- if (a !== this.srcLoadVersion || !this.isConnected)
53
- return;
54
- if (!o) {
55
- this.isError = !0, this.emit("cx-error");
56
- return;
75
+ const a = await this.extractWaveformPeaks(this.waveformSrc);
76
+ if (!(o !== this.srcLoadVersion || !this.isConnected)) {
77
+ if (!a) {
78
+ this.isError = !0, this.emit("cx-error");
79
+ return;
80
+ }
81
+ this.allWaveformPeaks = a.peaks, this.recomputeWaveform(), t && (this.audioSrc = t), this.isLoaded = !0, this.autoplay && t && (this.inPoint > 0 ? this.pendingAutoplay = !0 : (await this.updateComplete, this.audioEl?.play()));
57
82
  }
58
- const r = o.peaks.length;
59
- this.waveformViewBoxWidth = r, this.waveformPath = P(o.peaks, r, 200), t && (this.audioSrc = t), this.isLoaded = !0, this.autoplay && t && (await this.updateComplete, this.audioEl?.play());
60
83
  }
61
84
  handleAudioPlay() {
62
85
  this.isPlaying = !0, this.emit("cx-play");
@@ -67,21 +90,42 @@ let e = class extends y {
67
90
  handleAudioTimeUpdate() {
68
91
  if (!this.audioEl)
69
92
  return;
70
- const t = this.audioEl.duration ? this.audioEl.currentTime / this.audioEl.duration : 0;
71
- this.playedFraction = t, this.style.setProperty("--played-fraction", String(t)), this.currentTimeSeconds = this.audioEl.currentTime, this.emit("cx-time-update", { detail: { time: this.audioEl.currentTime } });
93
+ const t = this.audioEl.currentTime;
94
+ if (this.outPoint > 0 && t >= this.effectiveOutPoint) {
95
+ this.audioEl.pause(), this.audioEl.currentTime = this.effectiveOutPoint, this.handleOutPointReached();
96
+ return;
97
+ }
98
+ const o = this.clampedInPoint, a = this.windowDuration ? Math.max(0, Math.min(1, (t - o) / this.windowDuration)) : 0;
99
+ this.playedFraction = a, this.style.setProperty("--played-fraction", String(a)), this.currentTimeSeconds = Math.max(0, t - o), this.emit("cx-time-update", { detail: { time: this.currentTimeSeconds } });
72
100
  }
73
101
  handleAudioDurationChange() {
74
- this.durationSeconds = this.audioEl?.duration || 0;
102
+ this.durationSeconds = this.audioEl?.duration || 0, this.recomputeWindow();
103
+ const t = this.clampedInPoint;
104
+ t > 0 && this.audioEl && this.audioEl.currentTime < t && this.seekToInPoint(), this.pendingAutoplay && (this.pendingAutoplay = !1, this.audioEl?.play());
75
105
  }
76
106
  handleAudioEnded() {
107
+ if (this.loop && this.clampedInPoint > 0) {
108
+ this.seekToInPoint(), this.audioEl?.play();
109
+ return;
110
+ }
77
111
  this.isPlaying = !1, this.emit("cx-ended");
78
112
  }
79
113
  handleAudioError() {
80
114
  this.audioSrc && (this.isError = !0, this.emit("cx-error"));
81
115
  }
116
+ handleOutPointReached() {
117
+ if (this.isPlaying = !1, this.playedFraction = 1, this.style.setProperty("--played-fraction", "1"), this.currentTimeSeconds = this.windowDuration, this.loop) {
118
+ this.seekToInPoint(), this.audioEl?.play();
119
+ return;
120
+ }
121
+ this.seekToInPoint(), this.emit("cx-ended");
122
+ }
123
+ seekToInPoint() {
124
+ this.audioEl && (this.audioEl.currentTime = this.clampedInPoint);
125
+ }
82
126
  handleSizeChange() {
83
- const t = this.isResizing ? `${this.resizeSize.width}px` : this.width, a = this.isResizing ? `${this.resizeSize.height}px` : this.height;
84
- this.width || this.isResizing ? this.style.setProperty("--width", t) : this.style.removeProperty("--width"), this.height || this.isResizing ? this.style.setProperty("--height", a) : this.style.removeProperty("--height");
127
+ const t = this.isResizing ? `${this.resizeSize.width}px` : this.width, o = this.isResizing ? `${this.resizeSize.height}px` : this.height;
128
+ this.width || this.isResizing ? this.style.setProperty("--width", t) : this.style.removeProperty("--width"), this.height || this.isResizing ? this.style.setProperty("--height", o) : this.style.removeProperty("--height");
85
129
  }
86
130
  /** Starts audio playback. */
87
131
  play() {
@@ -96,91 +140,109 @@ let e = class extends y {
96
140
  this.isPlaying ? this.pause() : this.play();
97
141
  }
98
142
  formatTime(t) {
99
- const o = this.durationSeconds >= 3600 ? u.HourMinuteSecond : u.MinuteSecond, r = g(t * 1e3, o);
100
- return x(r, w.Digital);
143
+ const a = this.windowDuration >= 3600 ? m.HourMinuteSecond : m.MinuteSecond, s = w(t * 1e3, a);
144
+ return g(s, x.Digital);
101
145
  }
102
146
  handleWaveformClick(t) {
103
- if (t.stopPropagation(), !this.audioEl || !this.durationSeconds)
147
+ if (t.stopPropagation(), !this.audioEl || !this.windowDuration)
104
148
  return;
105
- const o = t.currentTarget.getBoundingClientRect(), r = Math.max(0, Math.min(1, (t.clientX - o.left) / o.width));
106
- this.audioEl.currentTime = r * this.durationSeconds;
149
+ const a = t.currentTarget.getBoundingClientRect(), s = Math.max(0, Math.min(1, (t.clientX - a.left) / a.width));
150
+ this.audioEl.currentTime = this.clampedInPoint + s * this.windowDuration;
107
151
  }
108
152
  handlePlayButtonKeyDown(t) {
109
153
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.togglePlay());
110
154
  }
111
155
  render() {
112
- const t = !this.src && !this.waveformSrc, a = this.formatTime(this.currentTimeSeconds), o = this.formatTime(this.durationSeconds);
113
- return h`<audio src=${this.audioSrc} ?loop=${this.loop} @play=${this.handleAudioPlay} @pause=${this.handleAudioPause} @timeupdate=${this.handleAudioTimeUpdate} @durationchange=${this.handleAudioDurationChange} @ended=${this.handleAudioEnded} @error=${this.handleAudioError}></audio><div part="base" class=${C({ audio: !0, "audio--empty": t })} data-empty-label=${this.localize.term("emptyAudio")} @click=${this.startResizing}>${d(
156
+ const t = !this.src && !this.waveformSrc, o = this.formatTime(this.currentTimeSeconds), a = this.formatTime(this.windowDuration);
157
+ return l`<audio src=${this.audioSrc} ?loop=${this.loop && this.clampedInPoint === 0 && this.outPoint <= 0} @play=${this.handleAudioPlay} @pause=${this.handleAudioPause} @timeupdate=${this.handleAudioTimeUpdate} @durationchange=${this.handleAudioDurationChange} @ended=${this.handleAudioEnded} @error=${this.handleAudioError}></audio><div part="base" class=${W({ audio: !0, "audio--empty": t })} data-empty-label=${this.localize.term("emptyAudio")} @click=${this.startResizing}>${d(
114
158
  !t,
115
- () => h`<div part="player" class="audio__player"><cx-icon-button part="play-button" class="audio__play-button" aria-pressed=${String(this.isPlaying)} circle label=${this.localize.term(this.isPlaying ? "pause" : "play")} name=${this.isPlaying ? "pause" : "play_arrow"} variant="filled" outline @click=${this.togglePlay} @keydown=${this.handlePlayButtonKeyDown}></cx-icon-button>${d(
159
+ () => l`<div part="player" class="audio__player"><cx-icon-button part="play-button" class="audio__play-button" aria-pressed=${String(this.isPlaying)} circle label=${this.localize.term(this.isPlaying ? "pause" : "play")} name=${this.isPlaying ? "pause" : "play_arrow"} variant="filled" outline @click=${this.togglePlay} @keydown=${this.handlePlayButtonKeyDown}></cx-icon-button>${d(
116
160
  this.waveformPath,
117
- () => z`<svg class="audio__waveform-svg" part="waveform-svg" viewBox="0 0 ${this.waveformViewBoxWidth} 200" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" @click=${this.handleWaveformClick}><path class="audio__waveform-wave" d=${this.waveformPath} /><svg x="0" y="0" width=${String(Math.round(this.playedFraction * this.waveformViewBoxWidth))} height="200" overflow="hidden"><path class="audio__waveform-played" d=${this.waveformPath} /></svg><rect class="audio__waveform-playhead" x=${String(Math.max(0, Math.round(this.playedFraction * this.waveformViewBoxWidth) - 1))} y="0" width="2" height="200"/></svg>`,
118
- () => h`<div part="waveform" class="audio__waveform"></div>`
119
- )}</div><div part="footer" class="audio__footer"><cx-typography part="time" variant="small" class="audio__time">${a} / ${o}</cx-typography>${d(
161
+ () => $`<svg class="audio__waveform-svg" part="waveform-svg" viewBox="0 0 ${this.waveformViewBoxWidth} 200" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" @click=${this.handleWaveformClick}><path class="audio__waveform-wave" d=${this.waveformPath} /><svg x="0" y="0" width=${String(Math.round(this.playedFraction * this.waveformViewBoxWidth))} height="200" overflow="hidden"><path class="audio__waveform-played" d=${this.waveformPath} /></svg><rect class="audio__waveform-playhead" x=${String(Math.max(0, Math.round(this.playedFraction * this.waveformViewBoxWidth) - 1))} y="0" width="2" height="200"/></svg>`,
162
+ () => l`<div part="waveform" class="audio__waveform"></div>`
163
+ )}</div><div part="footer" class="audio__footer"><cx-typography part="time" variant="small" class="audio__time">${o} / ${a}</cx-typography>${d(
120
164
  this.name,
121
- () => h`<cx-typography part="filename" class="audio__filename">${this.name}</cx-typography>`
165
+ () => l`<cx-typography part="filename" class="audio__filename">${this.name}</cx-typography>`
122
166
  )}</div>`
123
167
  )}</div>${d(this.resizable && this.isResizeActive, () => this.renderResizer())}
124
168
  `;
125
169
  }
126
170
  };
127
- e.styles = [v, f, A];
128
- e.dependencies = {
129
- "cx-icon-button": k,
171
+ i.styles = [v, f, C];
172
+ i.dependencies = {
173
+ "cx-icon-button": z,
130
174
  "cx-typography": T
131
175
  };
132
- i([
133
- E("audio")
134
- ], e.prototype, "audioEl", 2);
135
- i([
136
- n({ reflect: !0, type: String })
137
- ], e.prototype, "src", 2);
138
- i([
139
- n({ reflect: !0, type: String })
140
- ], e.prototype, "name", 2);
141
- i([
142
- n({ reflect: !0, type: Boolean })
143
- ], e.prototype, "autoplay", 2);
144
- i([
145
- n({ reflect: !0, type: Boolean })
146
- ], e.prototype, "loop", 2);
147
- i([
148
- n({ attribute: "waveform-src", reflect: !0, type: String })
149
- ], e.prototype, "waveformSrc", 2);
150
- i([
151
- s()
152
- ], e.prototype, "isPlaying", 2);
153
- i([
154
- s()
155
- ], e.prototype, "isLoaded", 2);
156
- i([
157
- s()
158
- ], e.prototype, "isError", 2);
159
- i([
160
- s()
161
- ], e.prototype, "currentTimeSeconds", 2);
162
- i([
163
- s()
164
- ], e.prototype, "durationSeconds", 2);
165
- i([
166
- s()
167
- ], e.prototype, "waveformPath", 2);
168
- i([
169
- s()
170
- ], e.prototype, "waveformViewBoxWidth", 2);
171
- i([
172
- s()
173
- ], e.prototype, "playedFraction", 2);
174
- i([
175
- s()
176
- ], e.prototype, "audioSrc", 2);
177
- i([
178
- m("waveformSrc", { waitUntilFirstUpdate: !0 }),
179
- m("src")
180
- ], e.prototype, "handleSrcChange", 1);
181
- e = i([
182
- _("cx-audio")
183
- ], e);
176
+ e([
177
+ k("audio")
178
+ ], i.prototype, "audioEl", 2);
179
+ e([
180
+ h({ reflect: !0, type: String })
181
+ ], i.prototype, "src", 2);
182
+ e([
183
+ h({ reflect: !0, type: String })
184
+ ], i.prototype, "name", 2);
185
+ e([
186
+ h({ reflect: !0, type: Boolean })
187
+ ], i.prototype, "autoplay", 2);
188
+ e([
189
+ h({ reflect: !0, type: Boolean })
190
+ ], i.prototype, "loop", 2);
191
+ e([
192
+ h({ attribute: "waveform-src", reflect: !0, type: String })
193
+ ], i.prototype, "waveformSrc", 2);
194
+ e([
195
+ h({ attribute: "in-point", reflect: !0, type: Number })
196
+ ], i.prototype, "inPoint", 2);
197
+ e([
198
+ h({ attribute: "out-point", reflect: !0, type: Number })
199
+ ], i.prototype, "outPoint", 2);
200
+ e([
201
+ r()
202
+ ], i.prototype, "isPlaying", 2);
203
+ e([
204
+ r()
205
+ ], i.prototype, "isLoaded", 2);
206
+ e([
207
+ r()
208
+ ], i.prototype, "isError", 2);
209
+ e([
210
+ r()
211
+ ], i.prototype, "currentTimeSeconds", 2);
212
+ e([
213
+ r()
214
+ ], i.prototype, "durationSeconds", 2);
215
+ e([
216
+ r()
217
+ ], i.prototype, "effectiveOutPoint", 2);
218
+ e([
219
+ r()
220
+ ], i.prototype, "windowDuration", 2);
221
+ e([
222
+ r()
223
+ ], i.prototype, "waveformPath", 2);
224
+ e([
225
+ r()
226
+ ], i.prototype, "waveformViewBoxWidth", 2);
227
+ e([
228
+ r()
229
+ ], i.prototype, "playedFraction", 2);
230
+ e([
231
+ r()
232
+ ], i.prototype, "audioSrc", 2);
233
+ e([
234
+ r()
235
+ ], i.prototype, "pendingAutoplay", 2);
236
+ e([
237
+ u("waveformSrc", { waitUntilFirstUpdate: !0 }),
238
+ u("src")
239
+ ], i.prototype, "handleSrcChange", 1);
240
+ e([
241
+ u("inPoint", { waitUntilFirstUpdate: !0 })
242
+ ], i.prototype, "handleInPointChange", 1);
243
+ i = e([
244
+ P("cx-audio")
245
+ ], i);
184
246
  export {
185
- e as default
247
+ i as default
186
248
  };
@@ -1,6 +1,6 @@
1
1
  import { n as S, C as be } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as ye } from "../chunks/component.styles.CRO4Odto.js";
3
- import { U as N } from "../chunks/asset-link-format.B0c92pSs.js";
3
+ import { U as N } from "../chunks/asset-link-format.QzzboHHE.js";
4
4
  import { c as Re } from "../chunks/custom-element.L4WJXn1j.js";
5
5
  import { i as _e, x as te } from "../chunks/lit-element.jLBm65_O.js";
6
6
  import { r as ve } from "../chunks/state.CSDxrqLd.js";
@@ -5,12 +5,12 @@ import "./select.js";
5
5
  import "./tag.js";
6
6
  import "../chunks/tree.Btf2Q4YZ.js";
7
7
  import "../chunks/lib-cortex-element.CVMmyPMC.js";
8
- import { C as h } from "../chunks/folder-select.Bc9x2hMO.js";
8
+ import { C as h } from "../chunks/folder-select.CrWjwQcw.js";
9
9
  import "../chunks/component.styles.CRO4Odto.js";
10
10
  import "../chunks/custom-element.L4WJXn1j.js";
11
11
  import "../chunks/i18n.CH-wak_P.js";
12
12
  import "../chunks/watch.CThbualB.js";
13
- import "../chunks/endpoints.DBlquU2-.js";
13
+ import "../chunks/endpoints.D4h8hp1m.js";
14
14
  import "../chunks/lit-element.jLBm65_O.js";
15
15
  import "../chunks/state.CSDxrqLd.js";
16
16
  import "../chunks/query.BBf1UFkC.js";
@@ -18,7 +18,7 @@ import "../chunks/custom-element.L4WJXn1j.js";
18
18
  import "../chunks/debounce.CIEhztrj.js";
19
19
  import "../chunks/i18n.CH-wak_P.js";
20
20
  import "../chunks/watch.CThbualB.js";
21
- import { c as E, C as F } from "../chunks/list-editor.on8VVRn-.js";
21
+ import { c as E, C as F } from "../chunks/list-editor.BfpDIsU5.js";
22
22
  import "../chunks/lit-element.jLBm65_O.js";
23
23
  import "../chunks/state.CSDxrqLd.js";
24
24
  import "../chunks/query.BBf1UFkC.js";
@@ -5,8 +5,8 @@ import { C } from "../chunks/confirm-popover.BifwpSuf.js";
5
5
  import { default as s } from "./corner-position-input-group.js";
6
6
  import { default as m } from "./cropper.js";
7
7
  import { default as i } from "./dynamic-select.js";
8
- import { C as c } from "../chunks/folder-select.Bc9x2hMO.js";
9
- import { C as P } from "../chunks/list-editor.on8VVRn-.js";
8
+ import { C as c } from "../chunks/folder-select.CrWjwQcw.js";
9
+ import { C as P } from "../chunks/list-editor.BfpDIsU5.js";
10
10
  import { default as I } from "./masonry.js";
11
11
  import { default as y } from "./padding-input-group.js";
12
12
  import { default as w } from "./position-picker.js";