@gguf/coder 0.2.4 → 0.2.5
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'
|
|
3
|
+
export default function RandomSpinner(props: Omit<ComponentProps<typeof Spinner>, 'type'>): 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;
|
|
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;AAQ5C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,MAAM,CAAC,2CASxF"}
|
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Spinner from 'ink-spinner';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
];
|
|
4
|
+
// The three requested styles:
|
|
5
|
+
// dot style: dots (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏)
|
|
6
|
+
// triangle style: triangle (◢◣◤◥)
|
|
7
|
+
const SPINNER_TYPES = ['dots', 'star', 'hamburger', 'triangle'];
|
|
24
8
|
export default function RandomSpinner(props) {
|
|
25
|
-
// Select a random spinner
|
|
26
|
-
const
|
|
27
|
-
const randomIndex = Math.floor(Math.random() *
|
|
28
|
-
return
|
|
9
|
+
// Select a random spinner type once on mount
|
|
10
|
+
const type = useMemo(() => {
|
|
11
|
+
const randomIndex = Math.floor(Math.random() * SPINNER_TYPES.length);
|
|
12
|
+
return SPINNER_TYPES[randomIndex];
|
|
29
13
|
}, []);
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
return _jsx(Spinner, {
|
|
14
|
+
// Cast type to any to avoid strict type checking issues with specific spinner names
|
|
15
|
+
// depending on the version of ink-spinner/cli-spinners types installed
|
|
16
|
+
return _jsx(Spinner, { type: type, ...props });
|
|
33
17
|
}
|
|
34
18
|
//# 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,
|
|
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,kCAAkC;AAClC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC;AAEzE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAmD;IACrF,6CAA6C;IAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE;QACtB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACrE,OAAO,aAAa,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,oFAAoF;IACpF,uEAAuE;IACvE,OAAO,KAAC,OAAO,IAAC,IAAI,EAAE,IAAW,KAAM,KAAK,GAAI,CAAC;AACrD,CAAC"}
|