@axium/client 0.19.0 → 0.19.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.
package/dist/requests.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { $API } from '@axium/core/api';
2
2
  import { prettifyError } from 'zod';
3
+ // @ts-expect-error 2339
4
+ BigInt.prototype.toJSON = function () {
5
+ return Number(this);
6
+ };
3
7
  export let token = null;
4
8
  export function setToken(value) {
5
9
  token = value;
@@ -1,10 +1,18 @@
1
1
  <script lang="ts">
2
- const { min = 0, max, value, text } = $props();
2
+ interface Props<T extends number | bigint> {
3
+ min?: T;
4
+ max: T;
5
+ value: T;
6
+ text: string;
7
+ }
8
+
9
+ const { min: _min, max, value, text }: Props<any> = $props();
10
+ let min: typeof value = _min || typeof value == 'bigint' ? 0n : 0;
3
11
  </script>
4
12
 
5
13
  <div class="Bar">
6
14
  {#if max}
7
- <div class="fill" style="width: {((value - min) / (max - min)) * 100}%"></div>
15
+ <div class="fill" style="width: {((value - min) / (max - min)) * ((typeof value == 'bigint' ? 100n : 100) as typeof value)}%"></div>
8
16
  {/if}
9
17
  {#if text}<span class="text">{text}</span>{/if}
10
18
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/client",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "author": "James Prevett <jp@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",