@terrafirmagreg-team/recipe 1.2.14 → 1.2.16

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.14",
3
+ "version": "1.2.16",
4
4
  "type": "module",
5
5
  "description": "Recipe viewer and calculator",
6
6
  "license": "LGPL-3.0-only",
@@ -23,15 +23,15 @@
23
23
  "./styles.css": "./styles.css"
24
24
  },
25
25
  "dependencies": {
26
- "@terrafirmagreg-team/data": "^1.2.3",
27
- "@terrafirmagreg-team/dump": "^1.2.11",
26
+ "@terrafirmagreg-team/data": "^1.2.4",
27
+ "@terrafirmagreg-team/dump": "^1.2.12",
28
28
  "@terrafirmagreg-team/game": "^1.2.6",
29
- "@terrafirmagreg-team/kit": "^1.2.15",
30
- "@terrafirmagreg-team/mdx": "^1.2.7",
31
- "@terrafirmagreg-team/preview": "^1.2.3",
32
- "@terrafirmagreg-team/sites": "^1.2.2",
33
- "@terrafirmagreg-team/translate": "^1.2.8",
34
- "@terrafirmagreg-team/ui": "^1.2.10",
29
+ "@terrafirmagreg-team/kit": "^1.2.17",
30
+ "@terrafirmagreg-team/mdx": "^1.2.8",
31
+ "@terrafirmagreg-team/preview": "^1.2.4",
32
+ "@terrafirmagreg-team/sites": "^1.2.3",
33
+ "@terrafirmagreg-team/translate": "^1.2.9",
34
+ "@terrafirmagreg-team/ui": "^1.2.12",
35
35
  "@types/pathfinding": "^0.1.0",
36
36
  "comlink": "^4.4.2",
37
37
  "fflate": "0.8.3",
@@ -71,7 +71,7 @@ export function AlloyCalculator({ session }: { session: RecipeSession }) {
71
71
  )
72
72
  }
73
73
  >
74
- <div className="scrollbar-thin flex-1 space-y-5 overflow-y-auto p-2 sm:p-4">
74
+ <div className="flex-1 space-y-5 overflow-y-auto p-2 sm:p-4">
75
75
  {loading ? (
76
76
  <EmptyState variant="loading" />
77
77
  ) : value === undefined ? (
@@ -17,7 +17,7 @@ export function WorkstationRail({
17
17
  if (!workstations?.length) return null;
18
18
  const { lang, names, nav } = session;
19
19
  return (
20
- <div className="scrollbar-thin flex max-h-full flex-col items-center gap-1 self-start overflow-y-auto overflow-x-hidden rounded-lg border border-border bg-muted/60 p-1">
20
+ <div className="flex max-h-full flex-col items-center gap-1 self-start overflow-y-auto overflow-x-hidden rounded-lg border border-border bg-muted/60 p-1">
21
21
  <Factory
22
22
  className="m-1 size-3.5 shrink-0 text-muted-foreground"
23
23
  aria-hidden
@@ -6,6 +6,7 @@ import { useTranslations } from '@terrafirmagreg-team/translate/hooks/use-transl
6
6
  import { RecipeToolbar } from '@terrafirmagreg-team/recipe/components/views/browser/toolbar';
7
7
  import type { RecipeSession } from '@terrafirmagreg-team/recipe/types';
8
8
  import { CalcHelp } from './help';
9
+ import { useFeatureFlags } from '@terrafirmagreg-team/kit/hooks/use-features';
9
10
 
10
11
  export function CalcActions({
11
12
  session,
@@ -21,11 +22,13 @@ export function CalcActions({
21
22
  onClear: () => void;
22
23
  }) {
23
24
  const t = useTranslations();
25
+ const flags = useFeatureFlags();
24
26
  return (
25
27
  <>
26
28
  <RecipeToolbar session={session} />
27
29
  <IconButton
28
30
  overlay
31
+ disabled={flags?.share === false}
29
32
  label={shared ? t('Copied', { note: 'recipe.copied' }) : t('Share', { note: 'recipe.calc.share' })}
30
33
  onClick={onShare}
31
34
  >
@@ -155,7 +155,7 @@ export function Calculator({ session }: { session: RecipeSession }) {
155
155
  focusNodeId={focusNodeId}
156
156
  onFocusedNode={() => setFocusNodeId(null)}
157
157
  empty={
158
- <div className="scrollbar-thin absolute inset-0 z-10 grid place-items-center overflow-auto p-4">
158
+ <div className="absolute inset-0 z-10 grid place-items-center overflow-auto p-4">
159
159
  <div className="flex flex-col items-center gap-4">
160
160
  <EmptyState variant="empty">
161
161
  {t('Click an item in the catalog to add a card.', { note: 'recipe.calc.empty' })}
@@ -66,7 +66,7 @@ export function IconPicker({
66
66
  placeholder={t('Search items', { note: 'recipe.search' })}
67
67
  className="h-7 px-2 text-xs"
68
68
  />
69
- <div className="scrollbar-thin mt-2 grid max-h-60 grid-cols-6 gap-1 overflow-y-auto">
69
+ <div className="mt-2 grid max-h-60 grid-cols-6 gap-1 overflow-y-auto">
70
70
  {results.map((item) => (
71
71
  <button
72
72
  key={`${item.kind}:${item.id}`}
@@ -78,7 +78,7 @@ export function CalcTrees({
78
78
  {t('Schemes', { note: 'recipe.calc.trees' })}
79
79
  </LeftSidebarFolderTrigger>
80
80
  <LeftSidebarFolderContent>
81
- <ul className="flex flex-col">
81
+ <ul className="flex max-h-60 flex-col overflow-y-auto">
82
82
  {tabs.map((tab) => (
83
83
  <TabRow
84
84
  key={tab.id}
@@ -71,7 +71,7 @@ export function ForgeCalculator({ session }: { session: RecipeSession }) {
71
71
  )
72
72
  }
73
73
  >
74
- <div className="scrollbar-thin flex-1 space-y-5 overflow-y-auto p-2 sm:p-4">
74
+ <div className="flex-1 space-y-5 overflow-y-auto p-2 sm:p-4">
75
75
  {loading ? (
76
76
  <EmptyState variant="loading" />
77
77
  ) : value === undefined ? (
@@ -1,6 +1,6 @@
1
1
  import type { CalculatorState } from '@terrafirmagreg-team/recipe/types/calc';
2
2
 
3
- const MAX_HISTORY = 20;
3
+ const MAX_HISTORY = 5;
4
4
 
5
5
  export type CalcTreeEntry = {
6
6
  id: string;