@rhseung/ps-cli 1.2.1 → 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.
@@ -9,24 +9,22 @@ import {
9
9
  import {
10
10
  getProblemDirPath,
11
11
  getProblemId
12
- } from "../chunk-3TMQ74SA.js";
12
+ } from "../chunk-BM3ZMA4K.js";
13
13
  import {
14
14
  getLanguageConfig,
15
15
  getSupportedLanguages,
16
16
  getSupportedLanguagesString
17
17
  } from "../chunk-TQXMB7XV.js";
18
- import {
19
- LoadingSpinner
20
- } from "../chunk-IJLJBKLK.js";
21
18
  import {
22
19
  getAutoOpenEditor,
23
20
  getEditor
24
- } from "../chunk-63CK6URL.js";
21
+ } from "../chunk-CIG2LEJC.js";
25
22
  import "../chunk-FYS2JH42.js";
26
23
 
27
24
  // src/commands/fetch.tsx
28
25
  import { useState, useEffect } from "react";
29
- import { render, Text as Text2, Box as Box2 } from "ink";
26
+ import { render, Box as Box2 } from "ink";
27
+ import { StatusMessage, Alert } from "@inkjs/ui";
30
28
 
31
29
  // src/services/scraper.ts
32
30
  import * as cheerio from "cheerio";
@@ -431,6 +429,7 @@ function ProblemDashboard({ problem }) {
431
429
  }
432
430
 
433
431
  // src/commands/fetch.tsx
432
+ import { Spinner } from "@inkjs/ui";
434
433
  import { execaCommand } from "execa";
435
434
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
436
435
  function FetchCommand({
@@ -516,19 +515,19 @@ function FetchCommand({
516
515
  }, [problemId, language, onComplete]);
517
516
  if (status === "loading") {
518
517
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
519
- /* @__PURE__ */ jsx2(LoadingSpinner, { message }),
518
+ /* @__PURE__ */ jsx2(Spinner, { label: message }),
520
519
  problem && /* @__PURE__ */ jsx2(ProblemDashboard, { problem })
521
520
  ] });
522
521
  }
523
522
  if (status === "error") {
524
- return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: /* @__PURE__ */ jsxs2(Text2, { color: "red", children: [
525
- "\u2717 \uC624\uB958 \uBC1C\uC0DD: ",
523
+ return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: /* @__PURE__ */ jsxs2(Alert, { variant: "error", children: [
524
+ "\uC624\uB958 \uBC1C\uC0DD: ",
526
525
  error
527
526
  ] }) });
528
527
  }
529
528
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", width: "100%", children: [
530
529
  problem && /* @__PURE__ */ jsx2(Box2, { alignSelf: "flex-start", children: /* @__PURE__ */ jsx2(ProblemDashboard, { problem }) }),
531
- /* @__PURE__ */ jsx2(Text2, { color: "green", children: message })
530
+ /* @__PURE__ */ jsx2(StatusMessage, { variant: "success", children: message })
532
531
  ] });
533
532
  }
534
533
  async function fetchCommand(problemId, language) {