@modelnex/sdk 0.5.34 → 0.5.35
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.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +13 -30
- package/dist/index.mjs +13 -30
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -779,7 +779,6 @@ interface RecordingOverlayProps {
|
|
|
779
779
|
pendingNarration: string;
|
|
780
780
|
polishedNarration: string;
|
|
781
781
|
isListening: boolean;
|
|
782
|
-
onMarkStep: () => void;
|
|
783
782
|
onToggleVoiceCapture: () => void;
|
|
784
783
|
onElementSelected: (recorded: RecordedElement) => void;
|
|
785
784
|
onPageLevelStep: () => void;
|
|
@@ -795,7 +794,7 @@ interface RecordingOverlayProps {
|
|
|
795
794
|
onCancelRecording: () => void;
|
|
796
795
|
onStopRecording: () => void;
|
|
797
796
|
}
|
|
798
|
-
declare function RecordingOverlay({ stepIndex, stepCount, captureEventCount, capturedTranscript, isVoiceCaptureActive, phase, pendingNarration, polishedNarration, isListening,
|
|
797
|
+
declare function RecordingOverlay({ stepIndex, stepCount, captureEventCount, capturedTranscript, isVoiceCaptureActive, phase, pendingNarration, polishedNarration, isListening, onToggleVoiceCapture, onElementSelected, onPageLevelStep, onStepTypeConfirmed, onStartNarration, onSubmitTextNarration, onNarrationApprove, onNarrationRedo, onNarrationEdit, onAddNextStep, onDoneRecording, onCancel, onCancelRecording, onStopRecording, }: RecordingOverlayProps): react_jsx_runtime.JSX.Element;
|
|
799
798
|
|
|
800
799
|
declare function isAskDrivenInputStepType(stepType?: string | null): boolean;
|
|
801
800
|
declare function isInteractiveInputStepType(stepType?: string | null): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -779,7 +779,6 @@ interface RecordingOverlayProps {
|
|
|
779
779
|
pendingNarration: string;
|
|
780
780
|
polishedNarration: string;
|
|
781
781
|
isListening: boolean;
|
|
782
|
-
onMarkStep: () => void;
|
|
783
782
|
onToggleVoiceCapture: () => void;
|
|
784
783
|
onElementSelected: (recorded: RecordedElement) => void;
|
|
785
784
|
onPageLevelStep: () => void;
|
|
@@ -795,7 +794,7 @@ interface RecordingOverlayProps {
|
|
|
795
794
|
onCancelRecording: () => void;
|
|
796
795
|
onStopRecording: () => void;
|
|
797
796
|
}
|
|
798
|
-
declare function RecordingOverlay({ stepIndex, stepCount, captureEventCount, capturedTranscript, isVoiceCaptureActive, phase, pendingNarration, polishedNarration, isListening,
|
|
797
|
+
declare function RecordingOverlay({ stepIndex, stepCount, captureEventCount, capturedTranscript, isVoiceCaptureActive, phase, pendingNarration, polishedNarration, isListening, onToggleVoiceCapture, onElementSelected, onPageLevelStep, onStepTypeConfirmed, onStartNarration, onSubmitTextNarration, onNarrationApprove, onNarrationRedo, onNarrationEdit, onAddNextStep, onDoneRecording, onCancel, onCancelRecording, onStopRecording, }: RecordingOverlayProps): react_jsx_runtime.JSX.Element;
|
|
799
798
|
|
|
800
799
|
declare function isAskDrivenInputStepType(stepType?: string | null): boolean;
|
|
801
800
|
declare function isInteractiveInputStepType(stepType?: string | null): boolean;
|
package/dist/index.js
CHANGED
|
@@ -7588,7 +7588,14 @@ var panelBase = {
|
|
|
7588
7588
|
fontSize: "13px",
|
|
7589
7589
|
color: "#18181b"
|
|
7590
7590
|
};
|
|
7591
|
-
function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimized,
|
|
7591
|
+
function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimized, onToggleVoiceCapture, onToggleMinimized, onStop, onCancel }) {
|
|
7592
|
+
const [hasActivatedVoiceCapture, setHasActivatedVoiceCapture] = (0, import_react17.useState)(isVoiceCaptureActive);
|
|
7593
|
+
(0, import_react17.useEffect)(() => {
|
|
7594
|
+
if (isVoiceCaptureActive) {
|
|
7595
|
+
setHasActivatedVoiceCapture(true);
|
|
7596
|
+
}
|
|
7597
|
+
}, [isVoiceCaptureActive]);
|
|
7598
|
+
const voiceCaptureLabel = isVoiceCaptureActive ? "Pause" : hasActivatedVoiceCapture ? "Continue" : "Start";
|
|
7592
7599
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
7593
7600
|
"div",
|
|
7594
7601
|
{
|
|
@@ -7648,44 +7655,23 @@ function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimiz
|
|
|
7648
7655
|
),
|
|
7649
7656
|
!minimized && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
7650
7657
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#d4d4d8", fontSize: "12px", whiteSpace: "nowrap", fontWeight: 500 }, children: captureEventCount <= 1 ? "Perform the workflow, then press Start to capture voice" : `${captureEventCount - 1} interactions \u2022 ${stepCount} note${stepCount !== 1 ? "s" : ""}` }),
|
|
7651
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7652
|
-
"button",
|
|
7653
|
-
{
|
|
7654
|
-
onClick: onMarkStep,
|
|
7655
|
-
style: {
|
|
7656
|
-
padding: "8px 16px",
|
|
7657
|
-
background: "linear-gradient(135deg, #3b82f6, #2563eb)",
|
|
7658
|
-
color: "#fff",
|
|
7659
|
-
border: "none",
|
|
7660
|
-
borderRadius: "10px",
|
|
7661
|
-
cursor: "pointer",
|
|
7662
|
-
fontSize: "13px",
|
|
7663
|
-
fontWeight: 700,
|
|
7664
|
-
whiteSpace: "nowrap",
|
|
7665
|
-
boxShadow: "0 4px 12px rgba(59, 130, 246, 0.3)",
|
|
7666
|
-
transition: "transform 0.1s"
|
|
7667
|
-
},
|
|
7668
|
-
onMouseDown: (e) => e.currentTarget.style.transform = "scale(0.95)",
|
|
7669
|
-
onMouseUp: (e) => e.currentTarget.style.transform = "scale(1)",
|
|
7670
|
-
children: "+ Add note"
|
|
7671
|
-
}
|
|
7672
|
-
),
|
|
7673
7658
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7674
7659
|
"button",
|
|
7675
7660
|
{
|
|
7676
7661
|
onClick: onToggleVoiceCapture,
|
|
7677
7662
|
style: {
|
|
7678
7663
|
padding: "7px 12px",
|
|
7679
|
-
background: isVoiceCaptureActive ? "rgba(
|
|
7680
|
-
color: isVoiceCaptureActive ? "#
|
|
7681
|
-
border: "1px solid rgba(
|
|
7664
|
+
background: isVoiceCaptureActive ? "linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(245, 158, 11, 0.22))" : "linear-gradient(135deg, #34d399, #059669)",
|
|
7665
|
+
color: isVoiceCaptureActive ? "#fef3c7" : "#f0fdf4",
|
|
7666
|
+
border: isVoiceCaptureActive ? "1px solid rgba(251,191,36,0.35)" : "1px solid rgba(16,185,129,0.45)",
|
|
7682
7667
|
borderRadius: "8px",
|
|
7683
7668
|
cursor: "pointer",
|
|
7684
7669
|
fontSize: "12px",
|
|
7685
7670
|
fontWeight: 600,
|
|
7671
|
+
boxShadow: isVoiceCaptureActive ? "0 0 0 1px rgba(251,191,36,0.08), 0 6px 16px rgba(245,158,11,0.18)" : "0 6px 16px rgba(5,150,105,0.28)",
|
|
7686
7672
|
transition: "all 0.2s"
|
|
7687
7673
|
},
|
|
7688
|
-
children:
|
|
7674
|
+
children: voiceCaptureLabel
|
|
7689
7675
|
}
|
|
7690
7676
|
),
|
|
7691
7677
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -8442,7 +8428,6 @@ function RecordingOverlay({
|
|
|
8442
8428
|
pendingNarration,
|
|
8443
8429
|
polishedNarration,
|
|
8444
8430
|
isListening,
|
|
8445
|
-
onMarkStep,
|
|
8446
8431
|
onToggleVoiceCapture,
|
|
8447
8432
|
onElementSelected,
|
|
8448
8433
|
onPageLevelStep,
|
|
@@ -8535,7 +8520,6 @@ function RecordingOverlay({
|
|
|
8535
8520
|
captureEventCount,
|
|
8536
8521
|
isVoiceCaptureActive,
|
|
8537
8522
|
minimized: hudMinimized,
|
|
8538
|
-
onMarkStep,
|
|
8539
8523
|
onToggleVoiceCapture,
|
|
8540
8524
|
onToggleMinimized: () => setHudMinimized((value) => !value),
|
|
8541
8525
|
onStop: onDoneRecording,
|
|
@@ -11206,7 +11190,6 @@ function ModelNexChatBubble({
|
|
|
11206
11190
|
pendingNarration: recording.pendingNarration,
|
|
11207
11191
|
polishedNarration: recording.polishedNarration,
|
|
11208
11192
|
isListening: voice.isListening,
|
|
11209
|
-
onMarkStep: () => recording.markStep(),
|
|
11210
11193
|
onToggleVoiceCapture: () => recording.toggleVoiceCapture(),
|
|
11211
11194
|
onElementSelected: (recorded) => recording.selectElement(recorded),
|
|
11212
11195
|
onPageLevelStep: () => recording.selectPageLevel(),
|
package/dist/index.mjs
CHANGED
|
@@ -7378,7 +7378,14 @@ var panelBase = {
|
|
|
7378
7378
|
fontSize: "13px",
|
|
7379
7379
|
color: "#18181b"
|
|
7380
7380
|
};
|
|
7381
|
-
function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimized,
|
|
7381
|
+
function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimized, onToggleVoiceCapture, onToggleMinimized, onStop, onCancel }) {
|
|
7382
|
+
const [hasActivatedVoiceCapture, setHasActivatedVoiceCapture] = useState12(isVoiceCaptureActive);
|
|
7383
|
+
useEffect16(() => {
|
|
7384
|
+
if (isVoiceCaptureActive) {
|
|
7385
|
+
setHasActivatedVoiceCapture(true);
|
|
7386
|
+
}
|
|
7387
|
+
}, [isVoiceCaptureActive]);
|
|
7388
|
+
const voiceCaptureLabel = isVoiceCaptureActive ? "Pause" : hasActivatedVoiceCapture ? "Continue" : "Start";
|
|
7382
7389
|
return /* @__PURE__ */ jsxs2(
|
|
7383
7390
|
"div",
|
|
7384
7391
|
{
|
|
@@ -7438,44 +7445,23 @@ function ActiveHUD({ stepCount, captureEventCount, isVoiceCaptureActive, minimiz
|
|
|
7438
7445
|
),
|
|
7439
7446
|
!minimized && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
7440
7447
|
/* @__PURE__ */ jsx3("span", { style: { color: "#d4d4d8", fontSize: "12px", whiteSpace: "nowrap", fontWeight: 500 }, children: captureEventCount <= 1 ? "Perform the workflow, then press Start to capture voice" : `${captureEventCount - 1} interactions \u2022 ${stepCount} note${stepCount !== 1 ? "s" : ""}` }),
|
|
7441
|
-
/* @__PURE__ */ jsx3(
|
|
7442
|
-
"button",
|
|
7443
|
-
{
|
|
7444
|
-
onClick: onMarkStep,
|
|
7445
|
-
style: {
|
|
7446
|
-
padding: "8px 16px",
|
|
7447
|
-
background: "linear-gradient(135deg, #3b82f6, #2563eb)",
|
|
7448
|
-
color: "#fff",
|
|
7449
|
-
border: "none",
|
|
7450
|
-
borderRadius: "10px",
|
|
7451
|
-
cursor: "pointer",
|
|
7452
|
-
fontSize: "13px",
|
|
7453
|
-
fontWeight: 700,
|
|
7454
|
-
whiteSpace: "nowrap",
|
|
7455
|
-
boxShadow: "0 4px 12px rgba(59, 130, 246, 0.3)",
|
|
7456
|
-
transition: "transform 0.1s"
|
|
7457
|
-
},
|
|
7458
|
-
onMouseDown: (e) => e.currentTarget.style.transform = "scale(0.95)",
|
|
7459
|
-
onMouseUp: (e) => e.currentTarget.style.transform = "scale(1)",
|
|
7460
|
-
children: "+ Add note"
|
|
7461
|
-
}
|
|
7462
|
-
),
|
|
7463
7448
|
/* @__PURE__ */ jsx3(
|
|
7464
7449
|
"button",
|
|
7465
7450
|
{
|
|
7466
7451
|
onClick: onToggleVoiceCapture,
|
|
7467
7452
|
style: {
|
|
7468
7453
|
padding: "7px 12px",
|
|
7469
|
-
background: isVoiceCaptureActive ? "rgba(
|
|
7470
|
-
color: isVoiceCaptureActive ? "#
|
|
7471
|
-
border: "1px solid rgba(
|
|
7454
|
+
background: isVoiceCaptureActive ? "linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(245, 158, 11, 0.22))" : "linear-gradient(135deg, #34d399, #059669)",
|
|
7455
|
+
color: isVoiceCaptureActive ? "#fef3c7" : "#f0fdf4",
|
|
7456
|
+
border: isVoiceCaptureActive ? "1px solid rgba(251,191,36,0.35)" : "1px solid rgba(16,185,129,0.45)",
|
|
7472
7457
|
borderRadius: "8px",
|
|
7473
7458
|
cursor: "pointer",
|
|
7474
7459
|
fontSize: "12px",
|
|
7475
7460
|
fontWeight: 600,
|
|
7461
|
+
boxShadow: isVoiceCaptureActive ? "0 0 0 1px rgba(251,191,36,0.08), 0 6px 16px rgba(245,158,11,0.18)" : "0 6px 16px rgba(5,150,105,0.28)",
|
|
7476
7462
|
transition: "all 0.2s"
|
|
7477
7463
|
},
|
|
7478
|
-
children:
|
|
7464
|
+
children: voiceCaptureLabel
|
|
7479
7465
|
}
|
|
7480
7466
|
),
|
|
7481
7467
|
/* @__PURE__ */ jsx3(
|
|
@@ -8232,7 +8218,6 @@ function RecordingOverlay({
|
|
|
8232
8218
|
pendingNarration,
|
|
8233
8219
|
polishedNarration,
|
|
8234
8220
|
isListening,
|
|
8235
|
-
onMarkStep,
|
|
8236
8221
|
onToggleVoiceCapture,
|
|
8237
8222
|
onElementSelected,
|
|
8238
8223
|
onPageLevelStep,
|
|
@@ -8325,7 +8310,6 @@ function RecordingOverlay({
|
|
|
8325
8310
|
captureEventCount,
|
|
8326
8311
|
isVoiceCaptureActive,
|
|
8327
8312
|
minimized: hudMinimized,
|
|
8328
|
-
onMarkStep,
|
|
8329
8313
|
onToggleVoiceCapture,
|
|
8330
8314
|
onToggleMinimized: () => setHudMinimized((value) => !value),
|
|
8331
8315
|
onStop: onDoneRecording,
|
|
@@ -10996,7 +10980,6 @@ function ModelNexChatBubble({
|
|
|
10996
10980
|
pendingNarration: recording.pendingNarration,
|
|
10997
10981
|
polishedNarration: recording.polishedNarration,
|
|
10998
10982
|
isListening: voice.isListening,
|
|
10999
|
-
onMarkStep: () => recording.markStep(),
|
|
11000
10983
|
onToggleVoiceCapture: () => recording.toggleVoiceCapture(),
|
|
11001
10984
|
onElementSelected: (recorded) => recording.selectElement(recorded),
|
|
11002
10985
|
onPageLevelStep: () => recording.selectPageLevel(),
|