@stellartech/voice-widget-directus 1.0.7 → 1.0.8
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.
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1131,6 +1131,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1131
1131
|
if (pendingVariant?.audio_file_id) {
|
|
1132
1132
|
console.log("[Voice Widget] Pending variant completed with audio:", pendingVariant.audio_file_id);
|
|
1133
1133
|
isNewVariantComplete = true;
|
|
1134
|
+
} else if (pendingVariant?.status === "failed") {
|
|
1135
|
+
console.log("[Voice Widget] Pending variant failed, stopping poll");
|
|
1136
|
+
stopVoiceoverPolling();
|
|
1137
|
+
pendingVariantId.value = null;
|
|
1138
|
+
errorMessage.value = "Voice generation failed. Please try again.";
|
|
1139
|
+
return;
|
|
1134
1140
|
} else {
|
|
1135
1141
|
console.log(`[Voice Widget] Poll #${voiceoverPollCount} - pending variant not yet complete`);
|
|
1136
1142
|
}
|
|
@@ -1139,6 +1145,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1139
1145
|
if (processingThatCompleted) {
|
|
1140
1146
|
console.log("[Voice Widget] Found completed processing variant:", processingThatCompleted.id);
|
|
1141
1147
|
isNewVariantComplete = true;
|
|
1148
|
+
} else if (allVariantsNow.length > 0 && allVariantsNow.every((v) => v.status === "failed")) {
|
|
1149
|
+
console.log("[Voice Widget] All variants failed, stopping poll");
|
|
1150
|
+
stopVoiceoverPolling();
|
|
1151
|
+
errorMessage.value = "Voice generation failed. Please try again.";
|
|
1152
|
+
return;
|
|
1142
1153
|
}
|
|
1143
1154
|
}
|
|
1144
1155
|
if (isNewVariantComplete) {
|
|
@@ -2042,10 +2053,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2042
2053
|
}
|
|
2043
2054
|
});
|
|
2044
2055
|
|
|
2045
|
-
var css = "\n.voice-widget[data-v-
|
|
2056
|
+
var css = "\n.voice-widget[data-v-dbe97361] {\n font-family: var(--theme--fonts--sans--font-family);\n padding: 16px;\n border: 1px solid var(--theme--form--field--input--border-color);\n border-radius: var(--theme--border-radius);\n background: var(--theme--background);\n}\n.widget__header[data-v-dbe97361] {\n margin-bottom: 20px;\n}\n.widget__header-row[data-v-dbe97361] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n}\n.widget__header-text[data-v-dbe97361] {\n flex: 1;\n}\n.widget__title[data-v-dbe97361] {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 0 4px 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--theme--foreground);\n}\n.widget__collapse-btn[data-v-dbe97361] {\n background: none;\n border: none;\n padding: 4px;\n cursor: pointer;\n color: var(--theme--foreground-subdued);\n border-radius: 4px;\n}\n.widget__collapse-btn[data-v-dbe97361]:hover {\n background: var(--theme--background-accent);\n}\n.widget__subtitle[data-v-dbe97361] {\n margin: 0;\n font-size: 14px;\n color: var(--theme--foreground-subdued);\n}\n.widget__header-controls[data-v-dbe97361] {\n display: flex;\n gap: 16px;\n align-items: center;\n}\n.widget__url-input[data-v-dbe97361] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.widget__url-label[data-v-dbe97361] {\n font-size: 12px;\n color: var(--theme--foreground-subdued);\n white-space: nowrap;\n}\n.widget__url-field[data-v-dbe97361] {\n padding: 6px 10px;\n border: 1px solid var(--theme--form--field--input--border-color);\n border-radius: var(--theme--border-radius);\n font-size: 12px;\n width: 280px;\n background: var(--theme--form--field--input--background);\n color: var(--theme--foreground);\n}\n.widget__section[data-v-dbe97361] {\n margin-bottom: 20px;\n}\n.widget__section-label[data-v-dbe97361] {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: var(--theme--foreground);\n}\n.widget__model-buttons[data-v-dbe97361] {\n display: flex;\n gap: 8px;\n}\n.widget__model-btn[data-v-dbe97361] {\n padding: 8px 16px;\n border: 1px solid var(--theme--form--field--input--border-color);\n border-radius: var(--theme--border-radius);\n background: var(--theme--background);\n color: var(--theme--foreground);\n cursor: pointer;\n font-size: 14px;\n transition: all 0.15s ease;\n}\n.widget__model-btn[data-v-dbe97361]:hover {\n border-color: var(--theme--primary);\n}\n.widget__model-btn--active[data-v-dbe97361] {\n background: var(--theme--primary);\n border-color: var(--theme--primary);\n color: var(--theme--primary-foreground, #fff);\n}\n.widget__voice-list[data-v-dbe97361] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.widget__section--toggle[data-v-dbe97361] {\n padding: 12px;\n background: var(--theme--background-subdued);\n border-radius: var(--theme--border-radius);\n}\n.widget__toggle[data-v-dbe97361] {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n.widget__toggle input[data-v-dbe97361] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n.widget__toggle-label[data-v-dbe97361] {\n font-size: 14px;\n font-weight: 500;\n color: var(--theme--foreground);\n}\n.widget__toggle-note[data-v-dbe97361] {\n margin: 4px 0 0 24px;\n font-size: 12px;\n color: var(--theme--foreground-subdued);\n}\n.widget__footer[data-v-dbe97361] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 16px;\n border-top: 1px solid var(--theme--border-color-subdued);\n margin-top: 20px;\n}\n.widget__footer-left[data-v-dbe97361],\n.widget__footer-right[data-v-dbe97361] {\n display: flex;\n gap: 8px;\n}\n.widget__variant-nav[data-v-dbe97361] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n margin-bottom: 16px;\n padding: 8px 0;\n}\n.widget__variant-counter[data-v-dbe97361] {\n font-size: 14px;\n font-weight: 500;\n color: var(--theme--foreground-subdued);\n min-width: 60px;\n text-align: center;\n}\n.widget__btn--icon[data-v-dbe97361] {\n padding: 6px;\n min-width: 32px;\n min-height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.widget__result-date[data-v-dbe97361] {\n margin-top: 8px;\n font-size: 12px;\n color: var(--theme--foreground-subdued);\n}\n.widget__btn[data-v-dbe97361] {\n padding: 8px 16px;\n border: none;\n border-radius: var(--theme--border-radius);\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.widget__btn[data-v-dbe97361]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.widget__btn--primary[data-v-dbe97361] {\n background: var(--theme--primary);\n color: var(--theme--primary-foreground, #fff);\n}\n.widget__btn--primary[data-v-dbe97361]:hover:not(:disabled) {\n background: var(--theme--primary-accent);\n}\n.widget__btn--secondary[data-v-dbe97361] {\n background: var(--theme--background-accent);\n color: var(--theme--foreground);\n border: 1px solid var(--theme--form--field--input--border-color);\n}\n.widget__btn--secondary[data-v-dbe97361]:hover:not(:disabled) {\n background: var(--theme--background-normal);\n}\n\n/* Processing State */\n.widget__processing[data-v-dbe97361] {\n padding: 40px 20px;\n text-align: center;\n}\n.widget__progress[data-v-dbe97361] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n margin-bottom: 16px;\n font-size: 16px;\n color: var(--theme--foreground);\n}\n.widget__progress-bar[data-v-dbe97361] {\n height: 8px;\n background: var(--theme--background-accent);\n border-radius: 4px;\n overflow: hidden;\n max-width: 400px;\n margin: 0 auto;\n}\n.widget__progress-fill[data-v-dbe97361] {\n height: 100%;\n background: var(--theme--primary);\n transition: width 0.3s ease;\n}\n\n/* Error State */\n.widget__error[data-v-dbe97361] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 20px;\n color: var(--theme--danger);\n text-align: center;\n}\n.widget__error-actions[data-v-dbe97361] {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n.widget__retry[data-v-dbe97361] {\n padding: 6px 12px;\n background: var(--theme--danger);\n color: #fff;\n border: none;\n border-radius: var(--theme--border-radius);\n cursor: pointer;\n}\n\n/* Loading State */\n.widget__loading[data-v-dbe97361] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n color: var(--theme--foreground-subdued);\n}\n\n/* Result State */\n.widget__result[data-v-dbe97361] {\n padding: 20px;\n background: var(--theme--background-subdued);\n border-radius: var(--theme--border-radius);\n margin-bottom: 20px;\n}\n.widget__result-info[data-v-dbe97361] {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--theme--border-color-subdued);\n}\n.widget__result-info p[data-v-dbe97361] {\n margin: 4px 0;\n font-size: 14px;\n color: var(--theme--foreground-subdued);\n}\n.widget__result-info strong[data-v-dbe97361] {\n color: var(--theme--foreground);\n}\n\n/* Variants List View */\n.widget__variants-list[data-v-dbe97361] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n max-height: 400px;\n overflow-y: auto;\n margin-bottom: 16px;\n}\n.widget__variant-item[data-v-dbe97361] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 1px solid var(--theme--border-color-subdued);\n border-radius: var(--theme--border-radius);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.widget__variant-item[data-v-dbe97361]:hover {\n border-color: var(--theme--primary);\n}\n.widget__variant-item--selected[data-v-dbe97361] {\n border-color: var(--theme--primary);\n background: var(--theme--primary-background);\n}\n.widget__variant-radio[data-v-dbe97361] {\n flex-shrink: 0;\n}\n.widget__variant-radio input[data-v-dbe97361] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n.widget__variant-player[data-v-dbe97361] {\n flex: 1;\n min-width: 200px;\n}\n.widget__variant-meta[data-v-dbe97361] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 120px;\n}\n.widget__variant-voice[data-v-dbe97361] {\n font-size: 13px;\n font-weight: 500;\n color: var(--theme--foreground);\n}\n.widget__variant-date[data-v-dbe97361] {\n font-size: 11px;\n color: var(--theme--foreground-subdued);\n}\n.widget__btn--danger[data-v-dbe97361] {\n color: var(--theme--danger);\n background: transparent;\n border: none;\n}\n.widget__btn--danger[data-v-dbe97361]:hover {\n background: var(--theme--danger-background);\n}\n.widget__selected-info[data-v-dbe97361] {\n padding: 12px;\n background: var(--theme--background-subdued);\n border-radius: var(--theme--border-radius);\n margin-bottom: 16px;\n}\n.widget__selected-info p[data-v-dbe97361] {\n margin: 4px 0;\n font-size: 14px;\n color: var(--theme--foreground-subdued);\n}\n.widget__selected-info strong[data-v-dbe97361] {\n color: var(--theme--foreground);\n}\n.widget__progress-status[data-v-dbe97361] {\n text-align: center;\n font-size: 12px;\n color: var(--theme--foreground-subdued);\n margin-top: 8px;\n}\n\n/* Animations */\n.spinning[data-v-dbe97361] {\n animation: spin-dbe97361 1s linear infinite;\n}\n@keyframes spin-dbe97361 {\nfrom { transform: rotate(0deg);\n}\nto { transform: rotate(360deg);\n}\n}\n";
|
|
2046
2057
|
n(css,{});
|
|
2047
2058
|
|
|
2048
|
-
var InterfaceComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2059
|
+
var InterfaceComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dbe97361"], ["__file", "interface.vue"]]);
|
|
2049
2060
|
|
|
2050
2061
|
var index = defineInterface({
|
|
2051
2062
|
id: "voice-widget",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stellartech/voice-widget-directus",
|
|
3
3
|
"description": "Voice generation widget with model/voice selection and audio preview for Directus",
|
|
4
4
|
"icon": "mic",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.8",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"readme": "README.md",
|
|
8
8
|
"repository": {
|