dictate-button 1.6.0 → 1.7.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.
@@ -2,6 +2,7 @@ export interface DictateButtonProps {
2
2
  size?: number;
3
3
  apiEndpoint?: string;
4
4
  language?: string;
5
+ audioFeedback?: boolean;
5
6
  theme?: 'light' | 'dark';
6
7
  class?: string;
7
8
  }
@@ -12,12 +13,3 @@ declare module 'solid-js' {
12
13
  }
13
14
  }
14
15
  }
15
- type AddButtonEventListenersOptions = {
16
- threshold?: number;
17
- preventScroll?: boolean;
18
- onShortTap?: (e: PointerEvent) => void;
19
- onLongPressStart?: (e: PointerEvent) => void;
20
- onLongPressEnd?: (e: PointerEvent) => void;
21
- };
22
- export declare function addButtonEventListeners(element: HTMLButtonElement, { threshold, preventScroll, onShortTap, onLongPressStart, onLongPressEnd, }?: AddButtonEventListenersOptions): () => void;
23
- export {};
@@ -1,54 +1,54 @@
1
- const St = (t, n) => t === n, j = {
2
- equals: St
1
+ const xt = (t, n) => t === n, N = {
2
+ equals: xt
3
3
  };
4
- let pt = _t;
5
- const x = 1, N = 2, ht = {
4
+ let pt = wt;
5
+ const S = 1, j = 2, ht = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var b = null;
12
- let W = null, xt = null, g = null, w = null, E = null, z = 0;
11
+ var y = null;
12
+ let G = null, St = null, g = null, _ = null, E = null, V = 0;
13
13
  function At(t, n) {
14
- const e = g, o = b, r = t.length === 0, i = n === void 0 ? o : n, l = r ? ht : {
14
+ const e = g, r = y, o = t.length === 0, i = n === void 0 ? r : n, l = o ? ht : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: i ? i.context : null,
18
18
  owner: i
19
- }, s = r ? t : () => t(() => V(() => $(l)));
20
- b = l, g = null;
19
+ }, s = o ? t : () => t(() => z(() => $(l)));
20
+ y = l, g = null;
21
21
  try {
22
- return M(s, !0);
22
+ return O(s, !0);
23
23
  } finally {
24
- g = e, b = o;
24
+ g = e, y = r;
25
25
  }
26
26
  }
27
27
  function gt(t, n) {
28
- n = n ? Object.assign({}, j, n) : j;
28
+ n = n ? Object.assign({}, N, n) : N;
29
29
  const e = {
30
30
  value: t,
31
31
  observers: null,
32
32
  observerSlots: null,
33
33
  comparator: n.equals || void 0
34
- }, o = (r) => (typeof r == "function" && (r = r(e.value)), yt(e, r));
35
- return [bt.bind(e), o];
34
+ }, r = (o) => (typeof o == "function" && (o = o(e.value)), yt(e, o));
35
+ return [bt.bind(e), r];
36
36
  }
37
37
  function D(t, n, e) {
38
- const o = Z(t, n, !1, x);
39
- L(o);
40
- }
41
- function kt(t, n, e) {
42
- pt = Mt;
43
- const o = Z(t, n, !1, x);
44
- o.user = !0, E ? E.push(o) : L(o);
38
+ const r = Z(t, n, !1, S);
39
+ L(r);
45
40
  }
46
41
  function Tt(t, n, e) {
47
- e = e ? Object.assign({}, j, e) : j;
48
- const o = Z(t, n, !0, 0);
49
- return o.observers = null, o.observerSlots = null, o.comparator = e.equals || void 0, L(o), bt.bind(o);
42
+ pt = Ot;
43
+ const r = Z(t, n, !1, S);
44
+ r.user = !0, E ? E.push(r) : L(r);
45
+ }
46
+ function kt(t, n, e) {
47
+ e = e ? Object.assign({}, N, e) : N;
48
+ const r = Z(t, n, !0, 0);
49
+ return r.observers = null, r.observerSlots = null, r.comparator = e.equals || void 0, L(r), bt.bind(r);
50
50
  }
51
- function V(t) {
51
+ function z(t) {
52
52
  if (g === null) return t();
53
53
  const n = g;
54
54
  g = null;
@@ -59,14 +59,14 @@ function V(t) {
59
59
  }
60
60
  }
61
61
  function Pt(t) {
62
- return b === null || (b.cleanups === null ? b.cleanups = [t] : b.cleanups.push(t)), t;
62
+ return y === null || (y.cleanups === null ? y.cleanups = [t] : y.cleanups.push(t)), t;
63
63
  }
64
64
  function bt() {
65
65
  if (this.sources && this.state)
66
- if (this.state === x) L(this);
66
+ if (this.state === S) L(this);
67
67
  else {
68
- const t = w;
69
- w = null, M(() => K(this), !1), w = t;
68
+ const t = _;
69
+ _ = null, O(() => K(this), !1), _ = t;
70
70
  }
71
71
  if (g) {
72
72
  const t = this.observers ? this.observers.length : 0;
@@ -75,117 +75,117 @@ function bt() {
75
75
  return this.value;
76
76
  }
77
77
  function yt(t, n, e) {
78
- let o = t.value;
79
- return (!t.comparator || !t.comparator(o, n)) && (t.value = n, t.observers && t.observers.length && M(() => {
80
- for (let r = 0; r < t.observers.length; r += 1) {
81
- const i = t.observers[r], l = W && W.running;
82
- l && W.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? w.push(i) : E.push(i), i.observers && wt(i)), l || (i.state = x);
78
+ let r = t.value;
79
+ return (!t.comparator || !t.comparator(r, n)) && (t.value = n, t.observers && t.observers.length && O(() => {
80
+ for (let o = 0; o < t.observers.length; o += 1) {
81
+ const i = t.observers[o], l = G && G.running;
82
+ l && G.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? _.push(i) : E.push(i), i.observers && _t(i)), l || (i.state = S);
83
83
  }
84
- if (w.length > 1e6)
85
- throw w = [], new Error();
84
+ if (_.length > 1e6)
85
+ throw _ = [], new Error();
86
86
  }, !1)), n;
87
87
  }
88
88
  function L(t) {
89
89
  if (!t.fn) return;
90
90
  $(t);
91
- const n = z;
91
+ const n = V;
92
92
  $t(t, t.value, n);
93
93
  }
94
94
  function $t(t, n, e) {
95
- let o;
96
- const r = b, i = g;
97
- g = b = t;
95
+ let r;
96
+ const o = y, i = g;
97
+ g = y = t;
98
98
  try {
99
- o = t.fn(n);
99
+ r = t.fn(n);
100
100
  } catch (l) {
101
- return t.pure && (t.state = x, t.owned && t.owned.forEach($), t.owned = null), t.updatedAt = e + 1, vt(l);
101
+ return t.pure && (t.state = S, t.owned && t.owned.forEach($), t.owned = null), t.updatedAt = e + 1, vt(l);
102
102
  } finally {
103
- g = i, b = r;
103
+ g = i, y = o;
104
104
  }
105
- (!t.updatedAt || t.updatedAt <= e) && (t.updatedAt != null && "observers" in t ? yt(t, o) : t.value = o, t.updatedAt = e);
105
+ (!t.updatedAt || t.updatedAt <= e) && (t.updatedAt != null && "observers" in t ? yt(t, r) : t.value = r, t.updatedAt = e);
106
106
  }
107
- function Z(t, n, e, o = x, r) {
107
+ function Z(t, n, e, r = S, o) {
108
108
  const i = {
109
109
  fn: t,
110
- state: o,
110
+ state: r,
111
111
  updatedAt: null,
112
112
  owned: null,
113
113
  sources: null,
114
114
  sourceSlots: null,
115
115
  cleanups: null,
116
116
  value: n,
117
- owner: b,
118
- context: b ? b.context : null,
117
+ owner: y,
118
+ context: y ? y.context : null,
119
119
  pure: e
120
120
  };
121
- return b === null || b !== ht && (b.owned ? b.owned.push(i) : b.owned = [i]), i;
121
+ return y === null || y !== ht && (y.owned ? y.owned.push(i) : y.owned = [i]), i;
122
122
  }
123
123
  function F(t) {
124
124
  if (t.state === 0) return;
125
- if (t.state === N) return K(t);
126
- if (t.suspense && V(t.suspense.inFallback)) return t.suspense.effects.push(t);
125
+ if (t.state === j) return K(t);
126
+ if (t.suspense && z(t.suspense.inFallback)) return t.suspense.effects.push(t);
127
127
  const n = [t];
128
- for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < z); )
128
+ for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < V); )
129
129
  t.state && n.push(t);
130
130
  for (let e = n.length - 1; e >= 0; e--)
131
- if (t = n[e], t.state === x)
131
+ if (t = n[e], t.state === S)
132
132
  L(t);
133
- else if (t.state === N) {
134
- const o = w;
135
- w = null, M(() => K(t, n[0]), !1), w = o;
133
+ else if (t.state === j) {
134
+ const r = _;
135
+ _ = null, O(() => K(t, n[0]), !1), _ = r;
136
136
  }
137
137
  }
138
- function M(t, n) {
139
- if (w) return t();
138
+ function O(t, n) {
139
+ if (_) return t();
140
140
  let e = !1;
141
- n || (w = []), E ? e = !0 : E = [], z++;
141
+ n || (_ = []), E ? e = !0 : E = [], V++;
142
142
  try {
143
- const o = t();
144
- return Lt(e), o;
145
- } catch (o) {
146
- e || (E = null), w = null, vt(o);
143
+ const r = t();
144
+ return Lt(e), r;
145
+ } catch (r) {
146
+ e || (E = null), _ = null, vt(r);
147
147
  }
148
148
  }
149
149
  function Lt(t) {
150
- if (w && (_t(w), w = null), t) return;
150
+ if (_ && (wt(_), _ = null), t) return;
151
151
  const n = E;
152
- E = null, n.length && M(() => pt(n), !1);
152
+ E = null, n.length && O(() => pt(n), !1);
153
153
  }
154
- function _t(t) {
154
+ function wt(t) {
155
155
  for (let n = 0; n < t.length; n++) F(t[n]);
156
156
  }
157
- function Mt(t) {
157
+ function Ot(t) {
158
158
  let n, e = 0;
159
159
  for (n = 0; n < t.length; n++) {
160
- const o = t[n];
161
- o.user ? t[e++] = o : F(o);
160
+ const r = t[n];
161
+ r.user ? t[e++] = r : F(r);
162
162
  }
163
163
  for (n = 0; n < e; n++) F(t[n]);
164
164
  }
165
165
  function K(t, n) {
166
166
  t.state = 0;
167
167
  for (let e = 0; e < t.sources.length; e += 1) {
168
- const o = t.sources[e];
169
- if (o.sources) {
170
- const r = o.state;
171
- r === x ? o !== n && (!o.updatedAt || o.updatedAt < z) && F(o) : r === N && K(o, n);
168
+ const r = t.sources[e];
169
+ if (r.sources) {
170
+ const o = r.state;
171
+ o === S ? r !== n && (!r.updatedAt || r.updatedAt < V) && F(r) : o === j && K(r, n);
172
172
  }
173
173
  }
174
174
  }
175
- function wt(t) {
175
+ function _t(t) {
176
176
  for (let n = 0; n < t.observers.length; n += 1) {
177
177
  const e = t.observers[n];
178
- e.state || (e.state = N, e.pure ? w.push(e) : E.push(e), e.observers && wt(e));
178
+ e.state || (e.state = j, e.pure ? _.push(e) : E.push(e), e.observers && _t(e));
179
179
  }
180
180
  }
181
181
  function $(t) {
182
182
  let n;
183
183
  if (t.sources)
184
184
  for (; t.sources.length; ) {
185
- const e = t.sources.pop(), o = t.sourceSlots.pop(), r = e.observers;
186
- if (r && r.length) {
187
- const i = r.pop(), l = e.observerSlots.pop();
188
- o < r.length && (i.sourceSlots[l] = o, r[o] = i, e.observerSlots[o] = l);
185
+ const e = t.sources.pop(), r = t.sourceSlots.pop(), o = e.observers;
186
+ if (o && o.length) {
187
+ const i = o.pop(), l = e.observerSlots.pop();
188
+ r < o.length && (i.sourceSlots[l] = r, o[r] = i, e.observerSlots[r] = l);
189
189
  }
190
190
  }
191
191
  if (t.tOwned) {
@@ -202,47 +202,47 @@ function $(t) {
202
202
  }
203
203
  t.state = 0;
204
204
  }
205
- function Ot(t) {
205
+ function Mt(t) {
206
206
  return t instanceof Error ? t : new Error(typeof t == "string" ? t : "Unknown error", {
207
207
  cause: t
208
208
  });
209
209
  }
210
- function vt(t, n = b) {
211
- throw Ot(t);
210
+ function vt(t, n = y) {
211
+ throw Mt(t);
212
212
  }
213
213
  function B(t, n) {
214
- return V(() => t(n || {}));
214
+ return z(() => t(n || {}));
215
215
  }
216
- const I = (t) => Tt(() => t());
216
+ const I = (t) => kt(() => t());
217
217
  function Rt(t, n, e) {
218
- let o = e.length, r = n.length, i = o, l = 0, s = 0, a = n[r - 1].nextSibling, d = null;
219
- for (; l < r || s < i; ) {
218
+ let r = e.length, o = n.length, i = r, l = 0, s = 0, a = n[o - 1].nextSibling, d = null;
219
+ for (; l < o || s < i; ) {
220
220
  if (n[l] === e[s]) {
221
221
  l++, s++;
222
222
  continue;
223
223
  }
224
- for (; n[r - 1] === e[i - 1]; )
225
- r--, i--;
226
- if (r === l) {
227
- const c = i < o ? s ? e[s - 1].nextSibling : e[i - s] : a;
224
+ for (; n[o - 1] === e[i - 1]; )
225
+ o--, i--;
226
+ if (o === l) {
227
+ const c = i < r ? s ? e[s - 1].nextSibling : e[i - s] : a;
228
228
  for (; s < i; ) t.insertBefore(e[s++], c);
229
229
  } else if (i === s)
230
- for (; l < r; )
230
+ for (; l < o; )
231
231
  (!d || !d.has(n[l])) && n[l].remove(), l++;
232
- else if (n[l] === e[i - 1] && e[s] === n[r - 1]) {
233
- const c = n[--r].nextSibling;
234
- t.insertBefore(e[s++], n[l++].nextSibling), t.insertBefore(e[--i], c), n[r] = e[i];
232
+ else if (n[l] === e[i - 1] && e[s] === n[o - 1]) {
233
+ const c = n[--o].nextSibling;
234
+ t.insertBefore(e[s++], n[l++].nextSibling), t.insertBefore(e[--i], c), n[o] = e[i];
235
235
  } else {
236
236
  if (!d) {
237
237
  d = /* @__PURE__ */ new Map();
238
- let y = s;
239
- for (; y < i; ) d.set(e[y], y++);
238
+ let w = s;
239
+ for (; w < i; ) d.set(e[w], w++);
240
240
  }
241
241
  const c = d.get(n[l]);
242
242
  if (c != null)
243
243
  if (s < c && c < i) {
244
- let y = l, C = 1, p;
245
- for (; ++y < r && y < i && !((p = d.get(n[y])) == null || p !== c + C); )
244
+ let w = l, C = 1, p;
245
+ for (; ++w < o && w < i && !((p = d.get(n[w])) == null || p !== c + C); )
246
246
  C++;
247
247
  if (C > c - s) {
248
248
  const q = n[l];
@@ -253,12 +253,12 @@ function Rt(t, n, e) {
253
253
  }
254
254
  }
255
255
  }
256
- function O(t, n, e, o) {
257
- let r;
256
+ function M(t, n, e, r) {
257
+ let o;
258
258
  const i = () => {
259
259
  const s = document.createElement("template");
260
260
  return s.innerHTML = t, s.content.firstChild;
261
- }, l = () => (r || (r = i())).cloneNode(!0);
261
+ }, l = () => (o || (o = i())).cloneNode(!0);
262
262
  return l.cloneNode = l, l;
263
263
  }
264
264
  function P(t, n, e) {
@@ -266,131 +266,131 @@ function P(t, n, e) {
266
266
  }
267
267
  function Bt(t, n, e) {
268
268
  if (!n) return e ? P(t, "style") : n;
269
- const o = t.style;
270
- if (typeof n == "string") return o.cssText = n;
271
- typeof e == "string" && (o.cssText = e = void 0), e || (e = {}), n || (n = {});
272
- let r, i;
269
+ const r = t.style;
270
+ if (typeof n == "string") return r.cssText = n;
271
+ typeof e == "string" && (r.cssText = e = void 0), e || (e = {}), n || (n = {});
272
+ let o, i;
273
273
  for (i in e)
274
- n[i] == null && o.removeProperty(i), delete e[i];
274
+ n[i] == null && r.removeProperty(i), delete e[i];
275
275
  for (i in n)
276
- r = n[i], r !== e[i] && (o.setProperty(i, r), e[i] = r);
276
+ o = n[i], o !== e[i] && (r.setProperty(i, o), e[i] = o);
277
277
  return e;
278
278
  }
279
279
  function It(t, n, e) {
280
- return V(() => t(n, e));
280
+ return z(() => t(n, e));
281
281
  }
282
- function A(t, n, e, o) {
283
- if (e !== void 0 && !o && (o = []), typeof n != "function") return U(t, n, o, e);
284
- D((r) => U(t, n(), r, e), o);
282
+ function A(t, n, e, r) {
283
+ if (e !== void 0 && !r && (r = []), typeof n != "function") return U(t, n, r, e);
284
+ D((o) => U(t, n(), o, e), r);
285
285
  }
286
- function U(t, n, e, o, r) {
286
+ function U(t, n, e, r, o) {
287
287
  for (; typeof e == "function"; ) e = e();
288
288
  if (n === e) return e;
289
- const i = typeof n, l = o !== void 0;
289
+ const i = typeof n, l = r !== void 0;
290
290
  if (t = l && e[0] && e[0].parentNode || t, i === "string" || i === "number") {
291
291
  if (i === "number" && (n = n.toString(), n === e))
292
292
  return e;
293
293
  if (l) {
294
294
  let s = e[0];
295
- s && s.nodeType === 3 ? s.data !== n && (s.data = n) : s = document.createTextNode(n), e = k(t, e, o, s);
295
+ s && s.nodeType === 3 ? s.data !== n && (s.data = n) : s = document.createTextNode(n), e = T(t, e, r, s);
296
296
  } else
297
297
  e !== "" && typeof e == "string" ? e = t.firstChild.data = n : e = t.textContent = n;
298
298
  } else if (n == null || i === "boolean")
299
- e = k(t, e, o);
299
+ e = T(t, e, r);
300
300
  else {
301
301
  if (i === "function")
302
302
  return D(() => {
303
303
  let s = n();
304
304
  for (; typeof s == "function"; ) s = s();
305
- e = U(t, s, e, o);
305
+ e = U(t, s, e, r);
306
306
  }), () => e;
307
307
  if (Array.isArray(n)) {
308
308
  const s = [], a = e && Array.isArray(e);
309
- if (X(s, n, e, r))
310
- return D(() => e = U(t, s, e, o, !0)), () => e;
309
+ if (X(s, n, e, o))
310
+ return D(() => e = U(t, s, e, r, !0)), () => e;
311
311
  if (s.length === 0) {
312
- if (e = k(t, e, o), l) return e;
313
- } else a ? e.length === 0 ? at(t, s, o) : Rt(t, e, s) : (e && k(t), at(t, s));
312
+ if (e = T(t, e, r), l) return e;
313
+ } else a ? e.length === 0 ? at(t, s, r) : Rt(t, e, s) : (e && T(t), at(t, s));
314
314
  e = s;
315
315
  } else if (n.nodeType) {
316
316
  if (Array.isArray(e)) {
317
- if (l) return e = k(t, e, o, n);
318
- k(t, e, null, n);
317
+ if (l) return e = T(t, e, r, n);
318
+ T(t, e, null, n);
319
319
  } else e == null || e === "" || !t.firstChild ? t.appendChild(n) : t.replaceChild(n, t.firstChild);
320
320
  e = n;
321
321
  }
322
322
  }
323
323
  return e;
324
324
  }
325
- function X(t, n, e, o) {
326
- let r = !1;
325
+ function X(t, n, e, r) {
326
+ let o = !1;
327
327
  for (let i = 0, l = n.length; i < l; i++) {
328
328
  let s = n[i], a = e && e[t.length], d;
329
329
  if (!(s == null || s === !0 || s === !1)) if ((d = typeof s) == "object" && s.nodeType)
330
330
  t.push(s);
331
331
  else if (Array.isArray(s))
332
- r = X(t, s, a) || r;
332
+ o = X(t, s, a) || o;
333
333
  else if (d === "function")
334
- if (o) {
334
+ if (r) {
335
335
  for (; typeof s == "function"; ) s = s();
336
- r = X(t, Array.isArray(s) ? s : [s], Array.isArray(a) ? a : [a]) || r;
336
+ o = X(t, Array.isArray(s) ? s : [s], Array.isArray(a) ? a : [a]) || o;
337
337
  } else
338
- t.push(s), r = !0;
338
+ t.push(s), o = !0;
339
339
  else {
340
340
  const c = String(s);
341
341
  a && a.nodeType === 3 && a.data === c ? t.push(a) : t.push(document.createTextNode(c));
342
342
  }
343
343
  }
344
- return r;
344
+ return o;
345
345
  }
346
346
  function at(t, n, e = null) {
347
- for (let o = 0, r = n.length; o < r; o++) t.insertBefore(n[o], e);
347
+ for (let r = 0, o = n.length; r < o; r++) t.insertBefore(n[r], e);
348
348
  }
349
- function k(t, n, e, o) {
349
+ function T(t, n, e, r) {
350
350
  if (e === void 0) return t.textContent = "";
351
- const r = o || document.createTextNode("");
351
+ const o = r || document.createTextNode("");
352
352
  if (n.length) {
353
353
  let i = !1;
354
354
  for (let l = n.length - 1; l >= 0; l--) {
355
355
  const s = n[l];
356
- if (r !== s) {
356
+ if (o !== s) {
357
357
  const a = s.parentNode === t;
358
- !i && !l ? a ? t.replaceChild(r, s) : t.insertBefore(r, e) : a && s.remove();
358
+ !i && !l ? a ? t.replaceChild(o, s) : t.insertBefore(o, e) : a && s.remove();
359
359
  } else i = !0;
360
360
  }
361
- } else t.insertBefore(r, e);
362
- return [r];
361
+ } else t.insertBefore(o, e);
362
+ return [o];
363
363
  }
364
- function jt(t) {
365
- return Object.keys(t).reduce((e, o) => {
366
- const r = t[o];
367
- return e[o] = Object.assign({}, r), mt(r.value) && !Ut(r.value) && !Array.isArray(r.value) && (e[o].value = Object.assign({}, r.value)), Array.isArray(r.value) && (e[o].value = r.value.slice(0)), e;
364
+ function Nt(t) {
365
+ return Object.keys(t).reduce((e, r) => {
366
+ const o = t[r];
367
+ return e[r] = Object.assign({}, o), mt(o.value) && !Ut(o.value) && !Array.isArray(o.value) && (e[r].value = Object.assign({}, o.value)), Array.isArray(o.value) && (e[r].value = o.value.slice(0)), e;
368
368
  }, {});
369
369
  }
370
- function Nt(t) {
371
- return t ? Object.keys(t).reduce((e, o) => {
372
- const r = t[o];
373
- return e[o] = mt(r) && "value" in r ? r : {
374
- value: r
375
- }, e[o].attribute || (e[o].attribute = Kt(o)), e[o].parse = "parse" in e[o] ? e[o].parse : typeof e[o].value != "string", e;
370
+ function jt(t) {
371
+ return t ? Object.keys(t).reduce((e, r) => {
372
+ const o = t[r];
373
+ return e[r] = mt(o) && "value" in o ? o : {
374
+ value: o
375
+ }, e[r].attribute || (e[r].attribute = Kt(r)), e[r].parse = "parse" in e[r] ? e[r].parse : typeof e[r].value != "string", e;
376
376
  }, {}) : {};
377
377
  }
378
378
  function Dt(t) {
379
- return Object.keys(t).reduce((e, o) => (e[o] = t[o].value, e), {});
379
+ return Object.keys(t).reduce((e, r) => (e[r] = t[r].value, e), {});
380
380
  }
381
381
  function Ft(t, n) {
382
- const e = jt(n);
383
- return Object.keys(n).forEach((r) => {
384
- const i = e[r], l = t.getAttribute(i.attribute), s = t[r];
385
- l != null && (i.value = i.parse ? Ct(l) : l), s != null && (i.value = Array.isArray(s) ? s.slice(0) : s), i.reflect && ct(t, i.attribute, i.value, !!i.parse), Object.defineProperty(t, r, {
382
+ const e = Nt(n);
383
+ return Object.keys(n).forEach((o) => {
384
+ const i = e[o], l = t.getAttribute(i.attribute), s = t[o];
385
+ l != null && (i.value = i.parse ? Ct(l) : l), s != null && (i.value = Array.isArray(s) ? s.slice(0) : s), i.reflect && ct(t, i.attribute, i.value, !!i.parse), Object.defineProperty(t, o, {
386
386
  get() {
387
387
  return i.value;
388
388
  },
389
389
  set(a) {
390
390
  const d = i.value;
391
391
  i.value = a, i.reflect && ct(this, i.attribute, i.value, !!i.parse);
392
- for (let c = 0, y = this.__propertyChangedCallbacks.length; c < y; c++)
393
- this.__propertyChangedCallbacks[c](r, a, d);
392
+ for (let c = 0, w = this.__propertyChangedCallbacks.length; c < w; c++)
393
+ this.__propertyChangedCallbacks[c](o, a, d);
394
394
  },
395
395
  enumerable: !0,
396
396
  configurable: !0
@@ -405,10 +405,10 @@ function Ct(t) {
405
405
  return t;
406
406
  }
407
407
  }
408
- function ct(t, n, e, o) {
408
+ function ct(t, n, e, r) {
409
409
  if (e == null || e === !1) return t.removeAttribute(n);
410
- let r = o ? JSON.stringify(e) : e;
411
- t.__updating[n] = !0, r === "true" && (r = ""), t.setAttribute(n, r), Promise.resolve().then(() => delete t.__updating[n]);
410
+ let o = r ? JSON.stringify(e) : e;
411
+ t.__updating[n] = !0, o === "true" && (o = ""), t.setAttribute(n, o), Promise.resolve().then(() => delete t.__updating[n]);
412
412
  }
413
413
  function Kt(t) {
414
414
  return t.replace(/\.?([A-Z]+)/g, (n, e) => "-" + e.toLowerCase()).replace("_", "-").replace(/^-/, "");
@@ -419,82 +419,82 @@ function mt(t) {
419
419
  function Ut(t) {
420
420
  return Object.prototype.toString.call(t) === "[object Function]";
421
421
  }
422
- function zt(t) {
422
+ function Vt(t) {
423
423
  return typeof t == "function" && t.toString().indexOf("class") === 0;
424
424
  }
425
- let G;
426
- function Vt(t, n) {
425
+ let W;
426
+ function zt(t, n) {
427
427
  const e = Object.keys(n);
428
428
  return class extends t {
429
429
  static get observedAttributes() {
430
- return e.map((r) => n[r].attribute);
430
+ return e.map((o) => n[o].attribute);
431
431
  }
432
432
  constructor() {
433
433
  super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
434
- for (let r of e)
435
- this[r] = void 0;
434
+ for (let o of e)
435
+ this[o] = void 0;
436
436
  }
437
437
  connectedCallback() {
438
438
  if (this.__initialized) return;
439
439
  this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = Ft(this, n);
440
- const r = Dt(this.props), i = this.Component, l = G;
440
+ const o = Dt(this.props), i = this.Component, l = W;
441
441
  try {
442
- G = this, this.__initialized = !0, zt(i) ? new i(r, {
442
+ W = this, this.__initialized = !0, Vt(i) ? new i(o, {
443
443
  element: this
444
- }) : i(r, {
444
+ }) : i(o, {
445
445
  element: this
446
446
  });
447
447
  } finally {
448
- G = l;
448
+ W = l;
449
449
  }
450
450
  }
451
451
  async disconnectedCallback() {
452
452
  if (await Promise.resolve(), this.isConnected) return;
453
453
  this.__propertyChangedCallbacks.length = 0;
454
- let r = null;
455
- for (; r = this.__releaseCallbacks.pop(); ) r(this);
454
+ let o = null;
455
+ for (; o = this.__releaseCallbacks.pop(); ) o(this);
456
456
  delete this.__initialized, this.__released = !0;
457
457
  }
458
- attributeChangedCallback(r, i, l) {
459
- if (this.__initialized && !this.__updating[r] && (r = this.lookupProp(r), r in n)) {
460
- if (l == null && !this[r]) return;
461
- this[r] = n[r].parse ? Ct(l) : l;
458
+ attributeChangedCallback(o, i, l) {
459
+ if (this.__initialized && !this.__updating[o] && (o = this.lookupProp(o), o in n)) {
460
+ if (l == null && !this[o]) return;
461
+ this[o] = n[o].parse ? Ct(l) : l;
462
462
  }
463
463
  }
464
- lookupProp(r) {
464
+ lookupProp(o) {
465
465
  if (n)
466
- return e.find((i) => r === i || r === n[i].attribute);
466
+ return e.find((i) => o === i || o === n[i].attribute);
467
467
  }
468
468
  get renderRoot() {
469
469
  return this.shadowRoot || this.attachShadow({
470
470
  mode: "open"
471
471
  });
472
472
  }
473
- addReleaseCallback(r) {
474
- this.__releaseCallbacks.push(r);
473
+ addReleaseCallback(o) {
474
+ this.__releaseCallbacks.push(o);
475
475
  }
476
- addPropertyChangedCallback(r) {
477
- this.__propertyChangedCallbacks.push(r);
476
+ addPropertyChangedCallback(o) {
477
+ this.__propertyChangedCallbacks.push(o);
478
478
  }
479
479
  };
480
480
  }
481
481
  function qt(t, n = {}, e = {}) {
482
482
  const {
483
- BaseElement: o = HTMLElement,
484
- extension: r,
483
+ BaseElement: r = HTMLElement,
484
+ extension: o,
485
485
  customElements: i = window.customElements
486
486
  } = e;
487
487
  return (l) => {
488
488
  let s = i.get(t);
489
- return s ? (s.prototype.Component = l, s) : (s = Vt(o, Nt(n)), s.prototype.Component = l, s.prototype.registeredTag = t, i.define(t, s, r), s);
489
+ return s ? (s.prototype.Component = l, s) : (s = zt(r, jt(n)), s.prototype.Component = l, s.prototype.registeredTag = t, i.define(t, s, o), s);
490
490
  };
491
491
  }
492
492
  function Ht(t) {
493
493
  const n = Object.keys(t), e = {};
494
- for (let o = 0; o < n.length; o++) {
495
- const [r, i] = gt(t[n[o]]);
496
- Object.defineProperty(e, n[o], {
497
- get: r,
494
+ for (let r = 0; r < n.length; r++) {
495
+ const [o, i] = gt(t[n[r]]);
496
+ Object.defineProperty(e, n[r], {
497
+ get: o,
498
498
  set(l) {
499
499
  i(() => l);
500
500
  }
@@ -502,28 +502,28 @@ function Ht(t) {
502
502
  }
503
503
  return e;
504
504
  }
505
- function Wt(t) {
505
+ function Gt(t) {
506
506
  if (t.assignedSlot && t.assignedSlot._$owner) return t.assignedSlot._$owner;
507
507
  let n = t.parentNode;
508
508
  for (; n && !n._$owner && !(n.assignedSlot && n.assignedSlot._$owner); )
509
509
  n = n.parentNode;
510
510
  return n && n.assignedSlot ? n.assignedSlot._$owner : t._$owner;
511
511
  }
512
- function Gt(t) {
512
+ function Wt(t) {
513
513
  return (n, e) => {
514
- const { element: o } = e;
515
- return At((r) => {
514
+ const { element: r } = e;
515
+ return At((o) => {
516
516
  const i = Ht(n);
517
- o.addPropertyChangedCallback((s, a) => i[s] = a), o.addReleaseCallback(() => {
518
- o.renderRoot.textContent = "", r();
517
+ r.addPropertyChangedCallback((s, a) => i[s] = a), r.addReleaseCallback(() => {
518
+ r.renderRoot.textContent = "", o();
519
519
  });
520
520
  const l = t(i, e);
521
- return A(o.renderRoot, l);
522
- }, Wt(o));
521
+ return A(r.renderRoot, l);
522
+ }, Gt(r));
523
523
  };
524
524
  }
525
525
  function Jt(t, n, e) {
526
- return arguments.length === 2 && (e = n, n = {}), qt(t, n)(Gt(e));
526
+ return arguments.length === 2 && (e = n, n = {}), qt(t, n)(Wt(e));
527
527
  }
528
528
  const Xt = `
529
529
  :host([theme="dark"]) {
@@ -583,56 +583,62 @@ const Xt = `
583
583
  }
584
584
  }
585
585
  `;
586
- var Zt = /* @__PURE__ */ O('<div part=container class=dictate-button__container><style></style><div aria-live=polite class=dictate-button__status-announcer style="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0"></div><button part=button class=dictate-button__button>'), Qt = /* @__PURE__ */ O('<svg part=icon class="dictate-button__icon dictate-button__icon--idle"fill=none viewBox="0 0 24 24"stroke-width=1.5 stroke=currentColor role=img aria-hidden=true><path stroke-linecap=round stroke-linejoin=round d="M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z">'), Yt = /* @__PURE__ */ O('<svg part=icon class="dictate-button__icon dictate-button__icon--recording"viewBox="0 0 24 24"fill=currentColor role=img aria-hidden=true><circle cx=12 cy=12 r=10>'), te = /* @__PURE__ */ O('<svg part=icon class="dictate-button__icon dictate-button__icon--processing"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round role=img aria-hidden=true><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9">'), ee = /* @__PURE__ */ O('<svg part=icon class="dictate-button__icon dictate-button__icon--error"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=4 stroke-linecap=round stroke-linejoin=round role=img aria-hidden=true><line x1=12 x2=12 y1=4 y2=14></line><line x1=12 x2=12.01 y1=20 y2=20>');
587
- console.debug("dictate-button version:", "1.6.0");
588
- const ne = "https://api.dictate-button.io/transcribe", S = "dictate-button.io", J = -70, ut = -10, dt = 0, re = 4, oe = 0.25, ie = 0.05;
586
+ var Zt = /* @__PURE__ */ M('<div part=container class=dictate-button__container><style></style><div aria-live=polite class=dictate-button__status-announcer style="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0"></div><button part=button class=dictate-button__button>'), Qt = /* @__PURE__ */ M('<svg part=icon class="dictate-button__icon dictate-button__icon--idle"fill=none viewBox="0 0 24 24"stroke-width=1.5 stroke=currentColor role=img aria-hidden=true><path stroke-linecap=round stroke-linejoin=round d="M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z">'), Yt = /* @__PURE__ */ M('<svg part=icon class="dictate-button__icon dictate-button__icon--recording"viewBox="0 0 24 24"fill=currentColor role=img aria-hidden=true><circle cx=12 cy=12 r=10>'), te = /* @__PURE__ */ M('<svg part=icon class="dictate-button__icon dictate-button__icon--processing"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round role=img aria-hidden=true><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9">'), ee = /* @__PURE__ */ M('<svg part=icon class="dictate-button__icon dictate-button__icon--error"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=4 stroke-linecap=round stroke-linejoin=round role=img aria-hidden=true><line x1=12 x2=12 y1=4 y2=14></line><line x1=12 x2=12.01 y1=20 y2=20>');
587
+ console.debug("dictate-button version:", "1.7.0");
588
+ const ne = "https://api.dictate-button.io/transcribe", x = "dictate-button.io", J = -70, ut = -10, dt = 0, re = 4, oe = 0.25, ie = 0.05;
589
589
  Jt("dictate-button", {
590
590
  size: 30,
591
591
  apiEndpoint: ne,
592
- language: void 0
592
+ language: void 0,
593
+ audioFeedback: !0
593
594
  }, (t, {
594
595
  element: n
595
596
  }) => {
596
597
  console.debug("api", t.apiEndpoint);
597
- const [e, o] = gt("idle");
598
- let r = null, i = null, l = [], s = null, a = null, d = null, c = null, y = !1, C = 0;
598
+ const [e, r] = gt("idle");
599
+ let o = null, i = null, l = [], s = null, a = null, d = null, c = null, w = !1, C = 0;
599
600
  const p = (f) => f <= J ? 0 : f >= ut ? 1 : (f - J) / (ut - J), q = (f) => {
600
- let _ = 0;
601
+ let b = 0;
601
602
  for (let v = 0; v < f.length; v++) {
602
603
  const u = (f[v] - 128) / 128;
603
- _ += u * u;
604
+ b += u * u;
604
605
  }
605
- return Math.sqrt(_ / f.length);
606
+ return Math.sqrt(b / f.length);
606
607
  }, Et = (f) => 20 * Math.log10(Math.max(f, 1e-8)), Q = (f) => {
607
- const _ = n.shadowRoot.querySelector(".dictate-button__button");
608
- if (!_)
608
+ const b = n.shadowRoot.querySelector(".dictate-button__button");
609
+ if (!b)
609
610
  return;
610
611
  const v = dt + f * (re - dt), u = 0 + f * 0.4;
611
- _.style.boxShadow = `0 0 0 ${v}px light-dark(rgba(0, 0, 0, ${u}), rgba(255, 255, 255, ${u}))`;
612
+ b.style.boxShadow = `0 0 0 ${v}px light-dark(rgba(0, 0, 0, ${u}), rgba(255, 255, 255, ${u}))`;
612
613
  }, Y = () => {
613
- if (!y || !d || !c) return;
614
+ if (!w || !d || !c) return;
614
615
  d.getByteTimeDomainData(c);
615
- const f = q(c), _ = Et(f), v = p(_), u = v > C ? oe : ie;
616
+ const f = q(c), b = Et(f), v = p(b), u = v > C ? oe : ie;
616
617
  C = u * v + (1 - u) * C, Q(C), requestAnimationFrame(Y);
617
618
  }, tt = () => {
618
- r && r.state !== "inactive" && r.stop(), i && (i.getTracks().forEach((f) => f.stop()), i = null), l = [], s = null, y = !1, a && a.state !== "closed" && a.close(), a = null, d = null, c = null, C = 0, Q(0);
619
+ o && o.state !== "inactive" && o.stop(), i && (i.getTracks().forEach((f) => f.stop()), i = null), l = [], s = null, w = !1, a && a.state !== "closed" && a.close(), a = null, d = null, c = null, C = 0, Q(0);
619
620
  };
620
621
  n.addEventListener("disconnected", tt);
621
622
  const et = async (f) => {
622
623
  if (e() === "idle") {
623
624
  s = f;
624
625
  try {
625
- const _ = await navigator.mediaDevices.getUserMedia({
626
+ t.audioFeedback && fe();
627
+ } catch (b) {
628
+ console.warn("Failed to play starting sound:", b);
629
+ }
630
+ try {
631
+ const b = await navigator.mediaDevices.getUserMedia({
626
632
  audio: !0
627
633
  });
628
- i = _, a = new (window.AudioContext || window.webkitAudioContext)();
629
- const v = a.createMediaStreamSource(_);
630
- d = a.createAnalyser(), d.fftSize = 2048, v.connect(d), c = new Uint8Array(d.fftSize), r = new MediaRecorder(_, {
634
+ i = b, a = new (window.AudioContext || window.webkitAudioContext)();
635
+ const v = a.createMediaStreamSource(b);
636
+ d = a.createAnalyser(), d.fftSize = 2048, v.connect(d), c = new Uint8Array(d.fftSize), o = new MediaRecorder(b, {
631
637
  mimeType: "audio/webm"
632
- }), l = [], r.ondataavailable = (u) => {
638
+ }), l = [], o.ondataavailable = (u) => {
633
639
  l.push(u.data);
634
- }, r.onstop = async () => {
635
- y = !1, o("processing"), T(n, "transcribing:started", "Started transcribing");
640
+ }, o.onstop = async () => {
641
+ w = !1, r("processing"), k(n, "transcribing:started", "Started transcribing");
636
642
  const u = new Blob(l, {
637
643
  type: "audio/webm"
638
644
  });
@@ -646,22 +652,22 @@ Jt("dictate-button", {
646
652
  if (!h.ok) throw new Error("Failed to transcribe audio");
647
653
  const H = await h.json();
648
654
  if (e() !== "processing") return;
649
- T(n, "transcribing:finished", H.text), o("idle");
655
+ k(n, "transcribing:finished", H.text), r("idle");
650
656
  } catch (m) {
651
- console.error("Failed to transcribe audio:", m), T(n, "transcribing:failed", "Failed to transcribe audio"), rt();
657
+ console.error("Failed to transcribe audio:", m), k(n, "transcribing:failed", "Failed to transcribe audio"), rt();
652
658
  }
653
- }, r.start(), T(n, "recording:started", "Started recording"), y = !0, Y(), o("recording");
654
- } catch (_) {
655
- console.error("Failed to start recording:", _), T(n, "recording:failed", "Failed to start recording"), rt();
659
+ }, o.start(), k(n, "recording:started", "Started recording"), w = !0, Y(), r("recording");
660
+ } catch (b) {
661
+ console.error("Failed to start recording:", b), k(n, "recording:failed", "Failed to start recording"), rt();
656
662
  }
657
663
  }
658
664
  }, nt = () => {
659
- e() === "recording" && (T(n, "recording:stopped", "Stopped recording"), o("idle"), tt());
665
+ e() === "recording" && (k(n, "recording:stopped", "Stopped recording"), r("idle"), tt());
660
666
  }, rt = () => {
661
- o("error"), setTimeout(() => o("idle"), 2e3);
667
+ r("error"), setTimeout(() => r("idle"), 2e3);
662
668
  };
663
669
  let R;
664
- return kt(() => {
670
+ return Tt(() => {
665
671
  if (!R) return;
666
672
  const f = de(R, {
667
673
  onShortTap: () => {
@@ -676,8 +682,8 @@ Jt("dictate-button", {
676
682
  });
677
683
  Pt(f);
678
684
  }), (() => {
679
- var f = Zt(), _ = f.firstChild, v = _.nextSibling, u = v.nextSibling;
680
- A(_, Xt), A(v, () => ft(e()));
685
+ var f = Zt(), b = f.firstChild, v = b.nextSibling, u = v.nextSibling;
686
+ A(b, Xt), A(v, () => ft(e()));
681
687
  var m = R;
682
688
  return typeof m == "function" ? It(m, u) : R = u, A(u, (() => {
683
689
  var h = I(() => e() === "idle");
@@ -706,26 +712,26 @@ Jt("dictate-button", {
706
712
  const se = (t) => {
707
713
  switch (t) {
708
714
  case "idle":
709
- return `Start dictation (${S})`;
715
+ return `Start dictation (${x})`;
710
716
  case "recording":
711
- return `Stop dictation (${S})`;
717
+ return `Stop dictation (${x})`;
712
718
  case "processing":
713
- return `Stop processing (${S})`;
719
+ return `Stop processing (${x})`;
714
720
  case "error":
715
- return `Click to reset (${S})`;
721
+ return `Click to reset (${x})`;
716
722
  }
717
723
  }, ft = (t) => {
718
724
  switch (t) {
719
725
  case "idle":
720
- return `Start dictation (${S})`;
726
+ return `Start dictation (${x})`;
721
727
  case "recording":
722
- return `Dictation in progress. Click to stop it (${S})`;
728
+ return `Dictation in progress. Click to stop it (${x})`;
723
729
  case "processing":
724
- return `Processing dictation. Click to cancel it (${S})`;
730
+ return `Processing dictation. Click to cancel it (${x})`;
725
731
  case "error":
726
- return `Dictation error. Click to reset (${S})`;
732
+ return `Dictation error. Click to reset (${x})`;
727
733
  }
728
- }, T = (t, n, e) => {
734
+ }, k = (t, n, e) => {
729
735
  t.dispatchEvent(new CustomEvent(n, {
730
736
  detail: e,
731
737
  bubbles: !0,
@@ -735,32 +741,37 @@ const se = (t) => {
735
741
  function de(t, {
736
742
  threshold: n = 500,
737
743
  preventScroll: e = !0,
738
- onShortTap: o,
739
- onLongPressStart: r,
744
+ onShortTap: r,
745
+ onLongPressStart: o,
740
746
  onLongPressEnd: i
741
747
  } = {}) {
742
748
  let l, s = !1;
743
749
  const a = (p) => p.preventDefault(), d = (p) => {
744
750
  l && clearTimeout(l), s = !1, p.preventDefault(), t.setPointerCapture(p.pointerId), l = window.setTimeout(() => {
745
- s = !0, r?.(p), t.dispatchEvent(new CustomEvent("longpress", {
751
+ s = !0, o?.(p), t.dispatchEvent(new CustomEvent("longpress", {
746
752
  detail: p
747
753
  }));
748
754
  }, n);
749
755
  }, c = (p) => {
750
756
  l && clearTimeout(l), t.releasePointerCapture(p.pointerId), s ? (i?.(p), t.dispatchEvent(new CustomEvent("longpressend", {
751
757
  detail: p
752
- }))) : (o?.(p), t.dispatchEvent(new CustomEvent("shorttap", {
758
+ }))) : (r?.(p), t.dispatchEvent(new CustomEvent("shorttap", {
753
759
  detail: p
754
760
  })));
755
- }, y = (p) => {
761
+ }, w = (p) => {
756
762
  l && clearTimeout(l), t.releasePointerCapture(p.pointerId), s = !1;
757
763
  }, C = (p) => {
758
764
  p.preventDefault(), p.stopPropagation();
759
765
  };
760
- return e && (t.style.touchAction = "none", t.addEventListener("contextmenu", a)), t.addEventListener("pointerdown", d), t.addEventListener("pointerup", c), t.addEventListener("pointercancel", y), t.addEventListener("click", C), () => {
761
- e && t.removeEventListener("contextmenu", a), t.removeEventListener("pointerdown", d), t.removeEventListener("pointerup", c), t.removeEventListener("pointercancel", y), t.removeEventListener("click", C);
766
+ return e && (t.style.touchAction = "none", t.addEventListener("contextmenu", a)), t.addEventListener("pointerdown", d), t.addEventListener("pointerup", c), t.addEventListener("pointercancel", w), t.addEventListener("click", C), () => {
767
+ e && t.removeEventListener("contextmenu", a), t.removeEventListener("pointerdown", d), t.removeEventListener("pointerup", c), t.removeEventListener("pointercancel", w), t.removeEventListener("click", C);
768
+ };
769
+ }
770
+ function fe() {
771
+ const t = new (window.AudioContext || window.webkitAudioContext)(), n = t.createOscillator(), e = t.createGain();
772
+ n.type = "sine", n.frequency.setValueAtTime(550, t.currentTime);
773
+ const r = t.currentTime;
774
+ e.gain.setValueAtTime(0, r), e.gain.linearRampToValueAtTime(0.035, r + 0.03), e.gain.linearRampToValueAtTime(0, r + 0.25), n.connect(e), e.connect(t.destination), n.start(r), n.stop(r + 0.3), n.onended = () => {
775
+ t && t.state !== "closed" && t.close();
762
776
  };
763
777
  }
764
- export {
765
- de as addButtonEventListeners
766
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dictate-button",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Dictate Button (Web Component)",
5
5
  "keywords": [
6
6
  "custom-element",