@absolutejs/voice 0.0.22-beta.52 → 0.0.22-beta.53

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.
@@ -254,6 +254,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
254
254
  refresh: store.refresh
255
255
  };
256
256
  };
257
+ var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
258
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
259
+ return;
260
+ }
261
+ customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
262
+ mounted;
263
+ connectedCallback() {
264
+ const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
265
+ this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
266
+ description: this.getAttribute("description") ?? undefined,
267
+ includeLinks: this.getAttribute("include-links") !== "false",
268
+ intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
269
+ title: this.getAttribute("title") ?? undefined
270
+ });
271
+ }
272
+ disconnectedCallback() {
273
+ this.mounted?.close();
274
+ this.mounted = undefined;
275
+ }
276
+ });
277
+ };
257
278
 
258
279
  // src/angular/voice-ops-status.component.ts
259
280
  var _dec = [
@@ -6,7 +6,7 @@ export { bindVoiceBargeIn, createVoiceDuplexController } from './duplex';
6
6
  export { bindVoiceHTMX } from './htmx';
7
7
  export { createMicrophoneCapture } from './microphone';
8
8
  export { createVoiceAppKitStatusStore, fetchVoiceAppKitStatus } from './appKitStatus';
9
- export { createVoiceOpsStatusViewModel, getVoiceOpsStatusCSS, getVoiceOpsStatusLabel, mountVoiceOpsStatus, renderVoiceOpsStatusHTML } from './opsStatusWidget';
9
+ export { createVoiceOpsStatusViewModel, defineVoiceOpsStatusElement, getVoiceOpsStatusCSS, getVoiceOpsStatusLabel, mountVoiceOpsStatus, renderVoiceOpsStatusHTML } from './opsStatusWidget';
10
10
  export { createVoiceProviderStatusStore, fetchVoiceProviderStatus } from './providerStatus';
11
11
  export { createVoiceWorkflowStatusStore, fetchVoiceWorkflowStatus } from './workflowStatus';
12
12
  export type { VoiceAppKitStatusClientOptions, VoiceAppKitStatusSnapshot } from './appKitStatus';
@@ -1804,6 +1804,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
1804
1804
  refresh: store.refresh
1805
1805
  };
1806
1806
  };
1807
+ var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
1808
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
1809
+ return;
1810
+ }
1811
+ customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
1812
+ mounted;
1813
+ connectedCallback() {
1814
+ const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
1815
+ this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
1816
+ description: this.getAttribute("description") ?? undefined,
1817
+ includeLinks: this.getAttribute("include-links") !== "false",
1818
+ intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
1819
+ title: this.getAttribute("title") ?? undefined
1820
+ });
1821
+ }
1822
+ disconnectedCallback() {
1823
+ this.mounted?.close();
1824
+ this.mounted = undefined;
1825
+ }
1826
+ });
1827
+ };
1807
1828
  // src/client/providerStatus.ts
1808
1829
  var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
1809
1830
  const fetchImpl = options.fetch ?? globalThis.fetch;
@@ -1969,6 +1990,7 @@ export {
1969
1990
  fetchVoiceWorkflowStatus,
1970
1991
  fetchVoiceProviderStatus,
1971
1992
  fetchVoiceAppKitStatus,
1993
+ defineVoiceOpsStatusElement,
1972
1994
  decodeVoiceAudioChunk,
1973
1995
  createVoiceWorkflowStatusStore,
1974
1996
  createVoiceStream,
@@ -37,3 +37,4 @@ export declare const mountVoiceOpsStatus: (element: Element, path?: string, opti
37
37
  close: () => void;
38
38
  refresh: () => Promise<VoiceAppKitStatusReport | undefined>;
39
39
  };
40
+ export declare const defineVoiceOpsStatusElement: (tagName?: string) => void;
@@ -271,6 +271,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
271
271
  refresh: store.refresh
272
272
  };
273
273
  };
274
+ var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
275
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
276
+ return;
277
+ }
278
+ customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
279
+ mounted;
280
+ connectedCallback() {
281
+ const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
282
+ this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
283
+ description: this.getAttribute("description") ?? undefined,
284
+ includeLinks: this.getAttribute("include-links") !== "false",
285
+ intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
286
+ title: this.getAttribute("title") ?? undefined
287
+ });
288
+ }
289
+ disconnectedCallback() {
290
+ this.mounted?.close();
291
+ this.mounted = undefined;
292
+ }
293
+ });
294
+ };
274
295
 
275
296
  // src/react/VoiceOpsStatus.tsx
276
297
  import { jsxDEV } from "react/jsx-dev-runtime";
@@ -253,6 +253,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
253
253
  refresh: store.refresh
254
254
  };
255
255
  };
256
+ var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
257
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
258
+ return;
259
+ }
260
+ customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
261
+ mounted;
262
+ connectedCallback() {
263
+ const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
264
+ this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
265
+ description: this.getAttribute("description") ?? undefined,
266
+ includeLinks: this.getAttribute("include-links") !== "false",
267
+ intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
268
+ title: this.getAttribute("title") ?? undefined
269
+ });
270
+ }
271
+ disconnectedCallback() {
272
+ this.mounted?.close();
273
+ this.mounted = undefined;
274
+ }
275
+ });
276
+ };
256
277
 
257
278
  // src/svelte/createVoiceOpsStatus.ts
258
279
  var createVoiceOpsStatus = (path = "/app-kit/status", options = {}) => {
package/dist/vue/index.js CHANGED
@@ -254,6 +254,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
254
254
  refresh: store.refresh
255
255
  };
256
256
  };
257
+ var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
258
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
259
+ return;
260
+ }
261
+ customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
262
+ mounted;
263
+ connectedCallback() {
264
+ const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
265
+ this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
266
+ description: this.getAttribute("description") ?? undefined,
267
+ includeLinks: this.getAttribute("include-links") !== "false",
268
+ intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
269
+ title: this.getAttribute("title") ?? undefined
270
+ });
271
+ }
272
+ disconnectedCallback() {
273
+ this.mounted?.close();
274
+ this.mounted = undefined;
275
+ }
276
+ });
277
+ };
257
278
 
258
279
  // src/vue/useVoiceAppKitStatus.ts
259
280
  import { onUnmounted, ref, shallowRef } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.52",
3
+ "version": "0.0.22-beta.53",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",