recappi 0.1.46 → 0.1.47
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 +34 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -161,7 +161,7 @@ function statusStyle(status) {
|
|
|
161
161
|
case "failed":
|
|
162
162
|
return { label: "Failed", color: "red" };
|
|
163
163
|
default:
|
|
164
|
-
return { label: status, color: "
|
|
164
|
+
return { label: status, color: "gray" };
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function spinnerChar(frame) {
|
|
@@ -285,7 +285,7 @@ function recordingStatusStyle(status) {
|
|
|
285
285
|
case "aborted":
|
|
286
286
|
return { label: "Aborted", color: "gray", glyph: "\u2022" };
|
|
287
287
|
default:
|
|
288
|
-
return { label: status, color: "
|
|
288
|
+
return { label: status, color: "gray", glyph: "\u2022" };
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
function listWindow(selected, total, size) {
|
|
@@ -553,7 +553,7 @@ var init_LiveCaptionsView = __esm({
|
|
|
553
553
|
init_liveCaptions();
|
|
554
554
|
STATUS_COLOR = {
|
|
555
555
|
connecting: "yellow",
|
|
556
|
-
live: "
|
|
556
|
+
live: "cyan",
|
|
557
557
|
reconnecting: "yellow",
|
|
558
558
|
stopped: "gray",
|
|
559
559
|
error: "red"
|
|
@@ -619,7 +619,7 @@ function MeterRow({
|
|
|
619
619
|
const silent = level <= 0.03;
|
|
620
620
|
return /* @__PURE__ */ jsxs2(Box2, { children: [
|
|
621
621
|
/* @__PURE__ */ jsx3(Box2, { width: 9, children: /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: label }) }),
|
|
622
|
-
/* @__PURE__ */ jsx3(Box2, { width, children: /* @__PURE__ */ jsx3(Text2, { color: paused ? "gray" : silent ? "yellow" : "
|
|
622
|
+
/* @__PURE__ */ jsx3(Box2, { width, children: /* @__PURE__ */ jsx3(Text2, { color: paused ? "gray" : silent ? "yellow" : "cyan", children: waveform(samples, width) }) }),
|
|
623
623
|
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: ` ${paused ? "paused" : levelDb(level)}` })
|
|
624
624
|
] });
|
|
625
625
|
}
|
|
@@ -728,7 +728,7 @@ function RecordingHeroScreen({
|
|
|
728
728
|
] }) }),
|
|
729
729
|
/* @__PURE__ */ jsx3(Box2, { marginTop: 1, children: /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: context }) }),
|
|
730
730
|
captions ? /* @__PURE__ */ jsxs2(Box2, { marginTop: 1, flexDirection: "column", children: [
|
|
731
|
-
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "LIVE CAPTIONS" }),
|
|
731
|
+
/* @__PURE__ */ jsx3(Text2, { bold: true, dimColor: true, children: "LIVE CAPTIONS" }),
|
|
732
732
|
/* @__PURE__ */ jsx3(HeroCaptions, { state: captions })
|
|
733
733
|
] }) : null
|
|
734
734
|
] }),
|
|
@@ -814,7 +814,7 @@ function AccountBody({ status }) {
|
|
|
814
814
|
] }),
|
|
815
815
|
status.billing ? /* @__PURE__ */ jsx5(Usage, { billing: status.billing }) : null,
|
|
816
816
|
/* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
817
|
-
/* @__PURE__ */ jsx5(Text3, { dimColor: true, children: "LOCAL STORE" }),
|
|
817
|
+
/* @__PURE__ */ jsx5(Text3, { bold: true, dimColor: true, children: "LOCAL STORE" }),
|
|
818
818
|
/* @__PURE__ */ jsx5(Text3, { dimColor: true, wrap: "truncate-middle", children: status.localStore.path }),
|
|
819
819
|
/* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
|
|
820
820
|
`${status.localStore.accountScopedArtifacts} artifact${status.localStore.accountScopedArtifacts === 1 ? "" : "s"} for this account`,
|
|
@@ -828,7 +828,7 @@ function Usage({ billing }) {
|
|
|
828
828
|
const minutesUsed = billing.minutesUsed;
|
|
829
829
|
const storageCap = billing.storageCapBytes;
|
|
830
830
|
return /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
831
|
-
/* @__PURE__ */ jsx5(Text3, { dimColor: true, children: "USAGE" }),
|
|
831
|
+
/* @__PURE__ */ jsx5(Text3, { bold: true, dimColor: true, children: "USAGE" }),
|
|
832
832
|
/* @__PURE__ */ jsxs3(Text3, { children: [
|
|
833
833
|
/* @__PURE__ */ jsx5(Text3, { dimColor: true, children: "Plan " }),
|
|
834
834
|
/* @__PURE__ */ jsx5(Text3, { bold: true, children: billing.tier })
|
|
@@ -1105,7 +1105,7 @@ function PeekBody({
|
|
|
1105
1105
|
meta3 ? /* @__PURE__ */ jsx11(Text9, { dimColor: true, children: ` ${meta3}` }) : null
|
|
1106
1106
|
] }),
|
|
1107
1107
|
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx11(SummarySection, { item, summary }) }),
|
|
1108
|
-
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text9, { dimColor: true, children: "\u23CE open \xB7 t transcript
|
|
1108
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text9, { dimColor: true, children: "\u23CE open \xB7 t transcript" }) })
|
|
1109
1109
|
] });
|
|
1110
1110
|
}
|
|
1111
1111
|
function SummarySection({
|
|
@@ -1120,7 +1120,7 @@ function SummarySection({
|
|
|
1120
1120
|
}
|
|
1121
1121
|
const points = (summary.keyPoints ?? []).slice(0, 3);
|
|
1122
1122
|
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1123
|
-
/* @__PURE__ */ jsx11(Text9, { dimColor: true, children: "SUMMARY" }),
|
|
1123
|
+
/* @__PURE__ */ jsx11(Text9, { bold: true, dimColor: true, children: "SUMMARY" }),
|
|
1124
1124
|
/* @__PURE__ */ jsx11(Text9, { children: summary.tldr }),
|
|
1125
1125
|
points.length > 0 ? /* @__PURE__ */ jsx11(Box9, { marginTop: 1, flexDirection: "column", children: points.map((point, i) => /* @__PURE__ */ jsx11(Text9, { dimColor: true, wrap: "truncate-end", children: `\u2022 ${point}` }, i)) }) : null
|
|
1126
1126
|
] });
|
|
@@ -1630,7 +1630,7 @@ function PermissionPreflightView({
|
|
|
1630
1630
|
return /* @__PURE__ */ jsxs13(Box14, { flexDirection: "column", paddingX: 1, children: [
|
|
1631
1631
|
/* @__PURE__ */ jsxs13(Text14, { children: [
|
|
1632
1632
|
/* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "\u2039 " }),
|
|
1633
|
-
/* @__PURE__ */ jsx16(Text14, { bold: true,
|
|
1633
|
+
/* @__PURE__ */ jsx16(Text14, { bold: true, children: "Recording permissions" })
|
|
1634
1634
|
] }),
|
|
1635
1635
|
/* @__PURE__ */ jsx16(Box14, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "Checking permissions\u2026" }) : items.map((item) => {
|
|
1636
1636
|
const status = statusGlyph2(item.status);
|
|
@@ -1677,7 +1677,7 @@ var init_PermissionPreflightView = __esm({
|
|
|
1677
1677
|
});
|
|
1678
1678
|
|
|
1679
1679
|
// src/tui/RecordSetupView.tsx
|
|
1680
|
-
import { useEffect as useEffect3, useState as useState6 } from "react";
|
|
1680
|
+
import { useEffect as useEffect3, useRef, useState as useState6 } from "react";
|
|
1681
1681
|
import { Box as Box15, Text as Text15, useInput as useInput5 } from "ink";
|
|
1682
1682
|
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1683
1683
|
function levelDb2(level) {
|
|
@@ -1693,7 +1693,7 @@ function InputMeter({ level }) {
|
|
|
1693
1693
|
if (level == null) return /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "\u2014" });
|
|
1694
1694
|
const silent = level <= 0.03;
|
|
1695
1695
|
return /* @__PURE__ */ jsxs14(Text15, { children: [
|
|
1696
|
-
/* @__PURE__ */ jsx17(Text15, { color: silent ? "yellow" : "
|
|
1696
|
+
/* @__PURE__ */ jsx17(Text15, { color: silent ? "yellow" : "cyan", children: meterBar(level, METER_W) }),
|
|
1697
1697
|
/* @__PURE__ */ jsx17(Text15, { dimColor: true, children: ` ${levelDb2(level)}` })
|
|
1698
1698
|
] });
|
|
1699
1699
|
}
|
|
@@ -1710,6 +1710,7 @@ function RecordSetupView({
|
|
|
1710
1710
|
() => Math.max(0, model.microphones?.findIndex((device) => device.isDefault) ?? 0)
|
|
1711
1711
|
);
|
|
1712
1712
|
const [sceneIdx, setSceneIdx] = useState6(0);
|
|
1713
|
+
const userPickedMic = useRef(false);
|
|
1713
1714
|
const sources = model.sources;
|
|
1714
1715
|
const microphones = model.microphones ?? [];
|
|
1715
1716
|
const selected = sources[Math.min(srcIdx, Math.max(0, sources.length - 1))];
|
|
@@ -1725,14 +1726,29 @@ function RecordSetupView({
|
|
|
1725
1726
|
};
|
|
1726
1727
|
useEffect3(() => {
|
|
1727
1728
|
onSelectionChange?.(selection);
|
|
1728
|
-
}, [
|
|
1729
|
+
}, [
|
|
1730
|
+
includeMic,
|
|
1731
|
+
onSelectionChange,
|
|
1732
|
+
selection.includeMicrophone,
|
|
1733
|
+
selection.microphoneDeviceId,
|
|
1734
|
+
selection.sceneId,
|
|
1735
|
+
selection.sourceId,
|
|
1736
|
+
srcIdx,
|
|
1737
|
+
micIdx
|
|
1738
|
+
]);
|
|
1739
|
+
useEffect3(() => {
|
|
1740
|
+
if (userPickedMic.current || microphones.length === 0) return;
|
|
1741
|
+
const di = microphones.findIndex((device) => device.isDefault);
|
|
1742
|
+
if (di > 0) setMicIdx(di);
|
|
1743
|
+
}, [microphones.length]);
|
|
1729
1744
|
useInput5((input, key) => {
|
|
1730
1745
|
if (key.upArrow || input === "k") setSrcIdx((i) => Math.max(0, i - 1));
|
|
1731
1746
|
else if (key.downArrow || input === "j") setSrcIdx((i) => Math.min(sources.length - 1, i + 1));
|
|
1732
1747
|
else if (input === " ") setIncludeMic((m) => !m);
|
|
1733
|
-
else if (input === "m" && includeMic && hasMultipleMicrophones)
|
|
1748
|
+
else if (input === "m" && includeMic && hasMultipleMicrophones) {
|
|
1749
|
+
userPickedMic.current = true;
|
|
1734
1750
|
setMicIdx((i) => (i + 1) % microphones.length);
|
|
1735
|
-
else if (input === "s" && model.scenes.length > 1) setSceneIdx((i) => (i + 1) % model.scenes.length);
|
|
1751
|
+
} else if (input === "s" && model.scenes.length > 1) setSceneIdx((i) => (i + 1) % model.scenes.length);
|
|
1736
1752
|
else if (key.return && selected) onStart(selection);
|
|
1737
1753
|
else if (key.escape) onCancel();
|
|
1738
1754
|
});
|
|
@@ -2036,7 +2052,8 @@ function AppShell({
|
|
|
2036
2052
|
if (event.type !== "audio.level") return;
|
|
2037
2053
|
const level = levelFromRmsDb(event.rmsDb);
|
|
2038
2054
|
if (event.input === "microphone") {
|
|
2039
|
-
const
|
|
2055
|
+
const microphones = recordSetupModel.microphones ?? [];
|
|
2056
|
+
const microphoneId = event.microphoneDeviceId ?? selection.microphoneDeviceId ?? microphones.find((device) => device.isDefault)?.id ?? microphones[0]?.id;
|
|
2040
2057
|
if (!microphoneId) return;
|
|
2041
2058
|
setRecordSetupLevels((current) => ({
|
|
2042
2059
|
...current,
|
|
@@ -2061,6 +2078,7 @@ function AppShell({
|
|
|
2061
2078
|
recordSetupSelection.includeMicrophone,
|
|
2062
2079
|
recordSetupSelection.microphoneDeviceId,
|
|
2063
2080
|
recordSetupSelection.sourceId,
|
|
2081
|
+
recordSetupModel.microphones,
|
|
2064
2082
|
recordSetupModel.sources,
|
|
2065
2083
|
screen.kind,
|
|
2066
2084
|
startRecordSetupPreview
|