@gguf/coder 0.2.3 → 0.2.4

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.
@@ -1,4 +1,4 @@
1
1
  import Spinner from 'ink-spinner';
2
2
  import type { ComponentProps } from 'react';
3
- export default function RandomSpinner(props: Omit<ComponentProps<typeof Spinner>, 'type'>): import("react/jsx-runtime").JSX.Element;
3
+ export default function RandomSpinner(props: Omit<ComponentProps<typeof Spinner>, 'type' | 'spinner'>): import("react/jsx-runtime").JSX.Element;
4
4
  //# sourceMappingURL=random-spinner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"random-spinner.d.ts","sourceRoot":"","sources":["../../source/components/random-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAS5C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,MAAM,CAAC,2CAUxF"}
1
+ {"version":3,"file":"random-spinner.d.ts","sourceRoot":"","sources":["../../source/components/random-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAwB5C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,2CAUpG"}
@@ -1,19 +1,34 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Spinner from 'ink-spinner';
3
3
  import { useMemo } from 'react';
4
- // The three requested styles:
5
- // dot style: dots (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏)
6
- // arrow style: arrow3 (←↖↑↗→↘↓↙)
7
- // triangle style: triangle (◢◣◤◥)
8
- const SPINNER_TYPES = ['dots', 'arrow3', 'triangle'];
4
+ // Define the available spinner options.
5
+ // Some use built-in 'type' strings from cli-spinners, others use custom 'spinner' objects.
6
+ const SPINNER_OPTIONS = [
7
+ { type: 'dots' },
8
+ // Star style: ✶✸✹✺✹✷
9
+ {
10
+ spinner: {
11
+ interval: 80,
12
+ frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
13
+ },
14
+ },
15
+ { type: 'triangle' },
16
+ // Hamburger style: ☱☲☴
17
+ {
18
+ spinner: {
19
+ interval: 100,
20
+ frames: ['☱', '☲', '☴'],
21
+ },
22
+ },
23
+ ];
9
24
  export default function RandomSpinner(props) {
10
- // Select a random spinner type once on mount
11
- const type = useMemo(() => {
12
- const randomIndex = Math.floor(Math.random() * SPINNER_TYPES.length);
13
- return SPINNER_TYPES[randomIndex];
25
+ // Select a random spinner configuration once on mount
26
+ const spinnerConfig = useMemo(() => {
27
+ const randomIndex = Math.floor(Math.random() * SPINNER_OPTIONS.length);
28
+ return SPINNER_OPTIONS[randomIndex];
14
29
  }, []);
15
- // Cast type to any to avoid strict type checking issues with specific spinner names
16
- // depending on the version of ink-spinner/cli-spinners types installed
17
- return _jsx(Spinner, { type: type, ...props });
30
+ // Spread the selected configuration (type or spinner) onto the Spinner component
31
+ // Cast to any to handle the mixed types of SPINNER_OPTIONS flexible props
32
+ return _jsx(Spinner, { ...spinnerConfig, ...props });
18
33
  }
19
34
  //# sourceMappingURL=random-spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"random-spinner.js","sourceRoot":"","sources":["../../source/components/random-spinner.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC,kCAAkC;AAClC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAE9D,MAAM,CAAC,O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AAe,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,iFAAiF;IACjF,0EAA0E;IAC1E,OAAO,KAAC,OAAO,OAAM,aAAqB,KAAM,KAAK,GAAI,CAAC;AAC9D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gguf/coder",
3
3
  "main": "dist/cli.js",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "description": "Coder",
6
6
  "keywords": [
7
7
  "ai",