@cstar.help/react 0.10.3 → 0.10.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.
package/dist/index.cjs CHANGED
@@ -985,7 +985,7 @@ function useBossBattle() {
985
985
  const refresh = (0, import_react22.useCallback)(async () => {
986
986
  if (subRef.current) await subRef.current.refresh();
987
987
  }, []);
988
- return { boss, active: boss?.active ?? false, loading, error, refresh };
988
+ return { boss, active: boss !== null, loading, error, refresh };
989
989
  }
990
990
 
991
991
  // src/dashboard/usePlayerStats.ts
package/dist/index.d.cts CHANGED
@@ -484,7 +484,7 @@ interface UseBossBattleReturn {
484
484
  * ```tsx
485
485
  * const { boss, active, loading, error } = useBossBattle();
486
486
  * if (active) {
487
- * return <BossHPBar hp={boss.health} max={boss.maxHealth} />;
487
+ * return <BossHPBar hp={boss.currentHealth} max={boss.maxHealth} />;
488
488
  * }
489
489
  * ```
490
490
  */
package/dist/index.d.ts CHANGED
@@ -484,7 +484,7 @@ interface UseBossBattleReturn {
484
484
  * ```tsx
485
485
  * const { boss, active, loading, error } = useBossBattle();
486
486
  * if (active) {
487
- * return <BossHPBar hp={boss.health} max={boss.maxHealth} />;
487
+ * return <BossHPBar hp={boss.currentHealth} max={boss.maxHealth} />;
488
488
  * }
489
489
  * ```
490
490
  */
package/dist/index.js CHANGED
@@ -931,7 +931,7 @@ function useBossBattle() {
931
931
  const refresh = useCallback14(async () => {
932
932
  if (subRef.current) await subRef.current.refresh();
933
933
  }, []);
934
- return { boss, active: boss?.active ?? false, loading, error, refresh };
934
+ return { boss, active: boss !== null, loading, error, refresh };
935
935
  }
936
936
 
937
937
  // src/dashboard/usePlayerStats.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cstar.help/react",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "React hooks for the cStar customer support platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,12 +30,12 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=18.0.0",
33
- "@cstar.help/js": "^0.18.2"
33
+ "@cstar.help/js": "^0.18.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "react": "^18.3.1",
37
37
  "react-dom": "^18.3.1",
38
- "@cstar.help/js": "^0.18.2",
38
+ "@cstar.help/js": "^0.18.5",
39
39
  "@testing-library/react": "^16.1.0",
40
40
  "@types/react": "^18.3.0",
41
41
  "@types/react-dom": "^18.3.0",