@rotorjs/dashboard 0.7.2 → 0.7.3

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.
Files changed (2) hide show
  1. package/dist/main.js +6 -17
  2. package/package.json +17 -17
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ActionEvent as e, StateConsumer as t, StateEngine as n, StateEventTarget as r, StateReducer as i, TypedEventTarget as a } from "@rotorjs/state";
2
2
  import o from "fast-deep-equal";
3
3
  import { v7 as s } from "uuid";
4
- //#region lib/DashboardEnvironment.ts
4
+ // lib/DashboardEnvironment.ts
5
5
  var c = class extends a {
6
6
  #e;
7
7
  #t = s();
@@ -108,16 +108,14 @@ var c = class extends a {
108
108
  return this.#t;
109
109
  }
110
110
  };
111
- //#endregion
112
- //#region lib/interests.ts
111
+ // lib/interests.ts
113
112
  function d(e) {
114
113
  return `dashboard://var/${encodeURIComponent(e)}`;
115
114
  }
116
115
  function f(e) {
117
116
  return `dashboard://fact/${encodeURIComponent(e)}`;
118
117
  }
119
- //#endregion
120
- //#region lib/DashboardEngine.ts
118
+ // lib/DashboardEngine.ts
121
119
  var p = class extends n {
122
120
  #e;
123
121
  #t;
@@ -185,11 +183,7 @@ var p = class extends n {
185
183
  }, h = class extends t {
186
184
  constructor(e, t, n) {
187
185
  super(e, t, n), this.target.addEventListener("action", (e) => {
188
- switch (e.action.type) {
189
- case "sync":
190
- this.target.subscribeState(this.id, this.descriptor);
191
- return;
192
- }
186
+ e.action.type === "sync" && this.target.subscribeState(this.id, this.descriptor);
193
187
  }, { signal: this.signal });
194
188
  }
195
189
  compareStates(e, t) {
@@ -222,9 +216,7 @@ var p = class extends n {
222
216
  return new Intl.NumberFormat(this.getLocale(e));
223
217
  }
224
218
  format(e, t) {
225
- switch (t?.type) {
226
- default: return y(this.getFormat(t).format(e), t);
227
- }
219
+ return t?.type, y(this.getFormat(t).format(e), t);
228
220
  }
229
221
  };
230
222
  function y(e, t) {
@@ -235,14 +227,11 @@ function y(e, t) {
235
227
  case "none":
236
228
  r = "";
237
229
  break;
238
- default:
239
- r = "\xA0";
240
- break;
230
+ default: r = "\xA0";
241
231
  }
242
232
  switch (t.unit.position) {
243
233
  case "left": return `${n}${r}${e}`;
244
234
  default: return `${e}${r}${n}`;
245
235
  }
246
236
  }
247
- //#endregion
248
237
  export { p as DashboardEngine, c as DashboardEnvironment, m as DashboardEventTarget, h as DashboardStateConsumer, g as DashboardStateReducer, u as FactEvent, v as NumberFormatter, l as VarEvent, f as dashboardFactInterest, _ as dashboardLocaleFact, d as dashboardVarInterest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotorjs/dashboard",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Rotor",
5
5
  "author": {
6
6
  "name": "Aaron Burmeister"
@@ -43,28 +43,28 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@eslint/js": "^10.0.1",
46
- "@types/react": "^19.2.17",
47
- "@types/react-dom": "^19.1.9",
48
- "@vitejs/plugin-react": "^6.0.2",
49
- "eslint": "^10.5.0",
46
+ "@types/react": "^19.3.0",
47
+ "@types/react-dom": "^19.3.0",
48
+ "@vitejs/plugin-react": "^6.3.0",
49
+ "eslint": "^10.14.0",
50
50
  "eslint-config-prettier": "^10.1.8",
51
51
  "eslint-import-resolver-typescript": "^4.4.5",
52
- "eslint-plugin-import-x": "^4.16.2",
53
- "eslint-plugin-prettier": "^5.5.6",
52
+ "eslint-plugin-import-x": "^4.18.1",
53
+ "eslint-plugin-prettier": "^5.5.7",
54
54
  "eslint-plugin-react-hooks": "^7.1.1",
55
- "eslint-plugin-react-refresh": "^0.5.3",
56
- "globals": "^17.6.0",
57
- "prettier": "^3.8.4",
58
- "react": "^19.2.7",
59
- "react-dom": "^19.2.7",
55
+ "eslint-plugin-react-refresh": "^0.5.7",
56
+ "globals": "^17.14.0",
57
+ "prettier": "^3.10.1",
58
+ "react": "^19.3.1",
59
+ "react-dom": "^19.3.1",
60
60
  "typescript": "^6.0.3",
61
- "typescript-eslint": "^8.61.1",
62
- "unplugin-dts": "^1.0.2",
63
- "vite": "^8.0.16"
61
+ "typescript-eslint": "^8.72.2",
62
+ "unplugin-dts": "^1.1.2",
63
+ "vite": "^8.3.8"
64
64
  },
65
65
  "dependencies": {
66
- "@rotorjs/state": "^0.7.0",
66
+ "@rotorjs/state": "^0.7.1",
67
67
  "fast-deep-equal": "^3.1.3",
68
- "uuid": "^14.0.0"
68
+ "uuid": "^14.0.3"
69
69
  }
70
70
  }