@terrafirmagreg-team/recipe 1.2.29 → 1.2.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrafirmagreg-team/recipe",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "type": "module",
5
5
  "description": "Recipe viewer and calculator",
6
6
  "license": "LGPL-3.0-only",
@@ -23,19 +23,19 @@
23
23
  "./styles.css": "./styles.css"
24
24
  },
25
25
  "dependencies": {
26
- "@terrafirmagreg-team/data": "^1.2.13",
27
- "@terrafirmagreg-team/dump": "^1.2.22",
28
- "@terrafirmagreg-team/game": "^1.2.13",
29
- "@terrafirmagreg-team/kit": "^1.2.29",
30
- "@terrafirmagreg-team/mdx": "^1.2.12",
26
+ "@terrafirmagreg-team/data": "^1.2.14",
27
+ "@terrafirmagreg-team/dump": "^1.2.23",
28
+ "@terrafirmagreg-team/game": "^1.2.14",
29
+ "@terrafirmagreg-team/kit": "^1.2.30",
30
+ "@terrafirmagreg-team/mdx": "^1.2.13",
31
31
  "@terrafirmagreg-team/preview": "^1.2.8",
32
- "@terrafirmagreg-team/sites": "^1.2.4",
33
- "@terrafirmagreg-team/translate": "^1.2.13",
34
- "@terrafirmagreg-team/ui": "^1.2.21",
32
+ "@terrafirmagreg-team/sites": "^1.2.5",
33
+ "@terrafirmagreg-team/translate": "^1.2.14",
34
+ "@terrafirmagreg-team/ui": "^1.2.23",
35
35
  "@types/pathfinding": "^0.1.0",
36
36
  "comlink": "^4.4.2",
37
37
  "fflate": "0.8.3",
38
- "lucide-react": "^1.70.0",
38
+ "lucide-react": "^1.72.0",
39
39
  "pathfinding": "0.4.18",
40
40
  "server-only": "^0.0.1"
41
41
  },
@@ -32,7 +32,7 @@ export function useAddToCalc(session: RecipeSession) {
32
32
  : [
33
33
  ...state.cards,
34
34
  {
35
- id: `c${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`,
35
+ id: `c${crypto.randomUUID()}`,
36
36
  materialId: item,
37
37
  kind,
38
38
  recipeId: null,
@@ -48,9 +48,7 @@ export function useItemPress({
48
48
  : [
49
49
  ...parsed.cards,
50
50
  {
51
- id: `c${Date.now().toString(36)}${Math.random()
52
- .toString(36)
53
- .slice(2, 4)}`,
51
+ id: `c${crypto.randomUUID()}`,
54
52
  materialId: id,
55
53
  kind,
56
54
  recipeId: null,
@@ -16,7 +16,7 @@ export const EMPTY_ENTRIES: CalcTreeEntry[] = [];
16
16
 
17
17
  export function newCalcEntry(state: CalculatorState, name?: string): CalcTreeEntry {
18
18
  return {
19
- id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`,
19
+ id: crypto.randomUUID(),
20
20
  name,
21
21
  savedAt: Date.now(),
22
22
  state,
@@ -11,11 +11,11 @@ function calcTabId(): string {
11
11
  try {
12
12
  tabId = window.sessionStorage.getItem(TAB_KEY);
13
13
  if (!tabId) {
14
- tabId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
14
+ tabId = crypto.randomUUID();
15
15
  window.sessionStorage.setItem(TAB_KEY, tabId);
16
16
  }
17
17
  } catch {
18
- tabId ??= `tab-${Math.random().toString(36).slice(2, 8)}`;
18
+ tabId ??= `tab-${crypto.randomUUID()}`;
19
19
  }
20
20
  return tabId;
21
21
  }