open-nami 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +41 -45
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
9
9
  "package.json"(exports, module) {
10
10
  module.exports = {
11
11
  name: "open-nami",
12
- version: "1.3.0",
12
+ version: "1.3.1",
13
13
  description: "Open Nami: terminal-first bulk social media profile downloader for Instagram, TikTok, Facebook & X.",
14
14
  type: "module",
15
15
  bin: {
@@ -4368,7 +4368,7 @@ async function dispatchDownload(options) {
4368
4368
  }
4369
4369
 
4370
4370
  // src/components/views/picking-view.tsx
4371
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
4371
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
4372
4372
  function ChoiceIndicator({ isSelected }) {
4373
4373
  const theme = useTheme();
4374
4374
  return /* @__PURE__ */ jsxs6(Box6, { children: [
@@ -4416,7 +4416,7 @@ function getPickingOptions(platform) {
4416
4416
  return items;
4417
4417
  }
4418
4418
  function PickingView({
4419
- contentWidth: _contentWidth,
4419
+ contentWidth,
4420
4420
  profile,
4421
4421
  outputDir,
4422
4422
  initialLimit,
@@ -4427,7 +4427,7 @@ function PickingView({
4427
4427
  onSelect,
4428
4428
  onHighlight,
4429
4429
  theme,
4430
- gapComponent: _Gap
4430
+ gapComponent: Gap2
4431
4431
  }) {
4432
4432
  const platformName = profile.platform.charAt(0).toUpperCase() + profile.platform.slice(1);
4433
4433
  const items = getPickingOptions(profile.platform);
@@ -4455,48 +4455,44 @@ function PickingView({
4455
4455
  resume: initialResume
4456
4456
  });
4457
4457
  };
4458
- return /* @__PURE__ */ jsx8(Box6, { flexDirection: "column", alignItems: "center", width: "100%", children: /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", width: 56, children: [
4459
- /* @__PURE__ */ jsxs6(Box6, { children: [
4460
- /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E " }),
4458
+ const boxWidth = Math.min(48, Math.max(44, (contentWidth || 80) - 8));
4459
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", alignItems: "center", width: "100%", children: [
4460
+ /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", alignItems: "center", marginBottom: 1, children: [
4461
4461
  /* @__PURE__ */ jsxs6(Text7, { bold: true, color: theme.primary, children: [
4462
4462
  "@",
4463
4463
  profile.username
4464
4464
  ] }),
4465
- /* @__PURE__ */ jsx8(Text7, { color: theme.gray, dimColor: theme.dimSecondary, children: ` \xB7 ${platformName}` })
4466
- ] }),
4467
- profile.cleanUrl ? /* @__PURE__ */ jsxs6(Box6, { children: [
4468
- /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E " }),
4469
- /* @__PURE__ */ jsx8(Text7, { color: theme.gray, dimColor: theme.dimSecondary, children: profile.cleanUrl })
4470
- ] }) : null,
4471
- /* @__PURE__ */ jsx8(Box6, { children: /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E" }) }),
4472
- /* @__PURE__ */ jsxs6(Box6, { children: [
4473
- /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E " }),
4465
+ /* @__PURE__ */ jsx8(Gap2, {}),
4466
+ /* @__PURE__ */ jsxs6(Text7, { color: theme.gray, dimColor: theme.dimSecondary, children: [
4467
+ "\u25B8 ",
4468
+ platformName,
4469
+ profile.cleanUrl ? ` \xB7 ${profile.cleanUrl}` : ""
4470
+ ] }),
4471
+ /* @__PURE__ */ jsx8(Gap2, {}),
4474
4472
  /* @__PURE__ */ jsx8(Text7, { color: theme.gray, dimColor: theme.dimSecondary, children: "Select target media:" })
4475
4473
  ] }),
4476
- /* @__PURE__ */ jsx8(Box6, { children: /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E" }) }),
4477
- /* @__PURE__ */ jsx8(
4478
- SelectInput,
4479
- {
4480
- indicatorComponent: ChoiceIndicator,
4481
- itemComponent: ChoiceItem,
4482
- items: items.map((item, index) => ({
4483
- key: String(index),
4484
- label: item.label,
4485
- value: item.value,
4486
- description: item.description
4487
- })),
4488
- onSelect: (item) => handleItemSelect(item.value),
4489
- onHighlight: (item) => onHighlight?.(item.value)
4490
- }
4491
- ),
4492
- hasCheckpoint ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
4493
- /* @__PURE__ */ jsx8(Box6, { children: /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E" }) }),
4494
- /* @__PURE__ */ jsxs6(Box6, { children: [
4474
+ /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", width: boxWidth, children: [
4475
+ /* @__PURE__ */ jsx8(
4476
+ SelectInput,
4477
+ {
4478
+ indicatorComponent: ChoiceIndicator,
4479
+ itemComponent: ChoiceItem,
4480
+ items: items.map((item, index) => ({
4481
+ key: String(index),
4482
+ label: item.label,
4483
+ value: item.value,
4484
+ description: item.description
4485
+ })),
4486
+ onSelect: (item) => handleItemSelect(item.value),
4487
+ onHighlight: (item) => onHighlight?.(item.value)
4488
+ }
4489
+ ),
4490
+ hasCheckpoint ? /* @__PURE__ */ jsxs6(Box6, { marginTop: 1, children: [
4495
4491
  /* @__PURE__ */ jsx8(Text7, { color: theme.primary, children: "\u258E " }),
4496
4492
  /* @__PURE__ */ jsx8(Text7, { color: theme.primary, bold: true, children: "\u26A1 Checkpoint found (cursor saved)" })
4497
- ] })
4498
- ] }) : null
4499
- ] }) });
4493
+ ] }) : null
4494
+ ] })
4495
+ ] });
4500
4496
  }
4501
4497
 
4502
4498
  // src/components/views/platform-view.tsx
@@ -4707,7 +4703,7 @@ function DownloadingView({
4707
4703
  // src/components/views/completion-view.tsx
4708
4704
  import os7 from "os";
4709
4705
  import { Box as Box10, Text as Text12 } from "ink";
4710
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
4706
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
4711
4707
  var DONE_LABEL = "\u21B5 download another";
4712
4708
  function CompletionView({
4713
4709
  profile,
@@ -4719,10 +4715,10 @@ function CompletionView({
4719
4715
  const plural = result.downloadedCount === 1 ? "" : "s";
4720
4716
  const skipText = result.skippedCount > 0 ? ` (${result.skippedCount} archived)` : "";
4721
4717
  return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", alignItems: "center", children: [
4722
- /* @__PURE__ */ jsx13(Text12, { children: isZero ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
4718
+ /* @__PURE__ */ jsx13(Text12, { children: isZero ? /* @__PURE__ */ jsxs10(Fragment2, { children: [
4723
4719
  /* @__PURE__ */ jsx13(Text12, { bold: true, color: theme.primary, children: "\u2713 profile scanned " }),
4724
4720
  /* @__PURE__ */ jsx13(Text12, { color: theme.primary, children: "\u2014 0 media items found" })
4725
- ] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
4721
+ ] }) : /* @__PURE__ */ jsxs10(Fragment2, { children: [
4726
4722
  /* @__PURE__ */ jsx13(Text12, { bold: true, color: theme.primary, children: "\u2713 profile downloaded! " }),
4727
4723
  /* @__PURE__ */ jsx13(Text12, { color: theme.primary, children: "saved to:" })
4728
4724
  ] }) }),
@@ -5735,7 +5731,7 @@ async function runBatchQueue(options) {
5735
5731
  }
5736
5732
 
5737
5733
  // src/components/views/batch-view.tsx
5738
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
5734
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
5739
5735
  var PLATFORMS = ["instagram", "tiktok", "facebook", "x"];
5740
5736
  var CHOICES2 = ["all", "photos", "videos", "stories", "highlights"];
5741
5737
  var DATE_PRESETS = ["all", "24h", "7d", "30d", "2024", "2023", "2022", "2021", "custom"];
@@ -6442,7 +6438,7 @@ function BatchView({
6442
6438
  }
6443
6439
  ) }),
6444
6440
  /* @__PURE__ */ jsx17(Text16, { color: theme.gray, dimColor: theme.dimSecondary, children: "\u21B5 confirm \xB7 esc cancel" })
6445
- ] }) : /* @__PURE__ */ jsxs14(Fragment4, { children: [
6441
+ ] }) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
6446
6442
  /* @__PURE__ */ jsxs14(Box14, { justifyContent: "space-between", width: "100%", children: [
6447
6443
  /* @__PURE__ */ jsxs14(Box14, { width: colWidth, children: [
6448
6444
  /* @__PURE__ */ jsx17(Text16, { color: theme.gray, dimColor: theme.dimSecondary, children: "[p] Platform: " }),
@@ -6654,7 +6650,7 @@ function frameRowSpan(row) {
6654
6650
  }
6655
6651
 
6656
6652
  // src/app.tsx
6657
- import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
6653
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
6658
6654
  var TAGLINE = "grab any profile. paste. download. done.";
6659
6655
  var DOWNLOAD_BUTTON = "download";
6660
6656
  var Gap = ({ lines = 1 }) => /* @__PURE__ */ jsx18(Box15, { flexDirection: "column", flexShrink: 0, children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx18(Text17, { children: " " }, i)) });
@@ -7229,7 +7225,7 @@ function InnerApp({
7229
7225
  onRegisterClickTargets: setBatchClickTargets
7230
7226
  }
7231
7227
  ),
7232
- hints.length > 0 ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
7228
+ hints.length > 0 ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
7233
7229
  /* @__PURE__ */ jsx18(Gap, { lines: 2 }),
7234
7230
  /* @__PURE__ */ jsx18(
7235
7231
  Shortcuts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-nami",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Open Nami: terminal-first bulk social media profile downloader for Instagram, TikTok, Facebook & X.",
5
5
  "type": "module",
6
6
  "bin": {