@laoyuehanni/dsh-token-usage 0.4.14 → 0.4.15
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/lib/client/CostPill.d.ts +3 -4
- package/lib/client/CostPill.d.ts.map +1 -1
- package/lib/client/CostPill.js +5 -7
- package/lib/client/CostPill.js.map +1 -1
- package/lib/client/cost-inflate-motion.d.ts +0 -4
- package/lib/client/cost-inflate-motion.d.ts.map +1 -1
- package/lib/client/cost-inflate-motion.js +0 -19
- package/lib/client/cost-inflate-motion.js.map +1 -1
- package/lib/client/cost-inflate.d.ts +4 -6
- package/lib/client/cost-inflate.d.ts.map +1 -1
- package/lib/client/cost-inflate.js +3 -5
- package/lib/client/cost-inflate.js.map +1 -1
- package/lib/client/use-cost-inflate.d.ts +5 -15
- package/lib/client/use-cost-inflate.d.ts.map +1 -1
- package/lib/client/use-cost-inflate.js +11 -51
- package/lib/client/use-cost-inflate.js.map +1 -1
- package/lib/client.js +69 -177
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
- package/lib/client/CostDeltaFlyLabel.d.ts +0 -8
- package/lib/client/CostDeltaFlyLabel.d.ts.map +0 -1
- package/lib/client/CostDeltaFlyLabel.js +0 -24
- package/lib/client/CostDeltaFlyLabel.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { CostInflateVars } from './cost-inflate.ts';
|
|
3
|
-
/** One +Δ fly label; animation starts on mount via WAAPI. */
|
|
4
|
-
export declare function CostDeltaFlyLabel({ text, vars }: {
|
|
5
|
-
text: string;
|
|
6
|
-
vars: CostInflateVars;
|
|
7
|
-
}): ReactNode;
|
|
8
|
-
//# sourceMappingURL=CostDeltaFlyLabel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CostDeltaFlyLabel.d.ts","sourceRoot":"","sources":["../../src/client/CostDeltaFlyLabel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GAAG,SAAS,CAsBpG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useLayoutEffect, useRef } from 'react';
|
|
3
|
-
import { runDeltaFly } from "./cost-inflate-motion.js";
|
|
4
|
-
import styles from './CostPill.module.css';
|
|
5
|
-
/** One +Δ fly label; animation starts on mount via WAAPI. */
|
|
6
|
-
export function CostDeltaFlyLabel({ text, vars }) {
|
|
7
|
-
const ref = useRef(null);
|
|
8
|
-
useLayoutEffect(() => {
|
|
9
|
-
const el = ref.current;
|
|
10
|
-
if (el === null)
|
|
11
|
-
return;
|
|
12
|
-
const anim = runDeltaFly(el, vars);
|
|
13
|
-
if (anim === null) {
|
|
14
|
-
// Motion is allowed but this host has no WAAPI: without the animation
|
|
15
|
-
// the label would sit statically for the whole inflate window — hide
|
|
16
|
-
// it and let the number update be the only signal.
|
|
17
|
-
el.style.visibility = 'hidden';
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
return () => { anim.cancel(); };
|
|
21
|
-
}, [vars]);
|
|
22
|
-
return (_jsx("span", { ref: ref, className: styles['deltaFly'], children: text }));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=CostDeltaFlyLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CostDeltaFlyLabel.js","sourceRoot":"","sources":["../../src/client/CostDeltaFlyLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAE1C,6DAA6D;AAC7D,MAAM,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,EAA2C;IACvF,MAAM,GAAG,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAEzC,eAAe,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAA;QACtB,IAAI,EAAE,KAAK,IAAI;YAAE,OAAM;QACvB,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QAClC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,sEAAsE;YACtE,qEAAqE;YACrE,mDAAmD;YACnD,EAAE,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAA;YAC9B,OAAM;QACR,CAAC;QACD,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA,CAAC,CAAC,CAAA;IAChC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,YAC1C,IAAI,GACA,CACR,CAAA;AACH,CAAC"}
|