@terrafirmagreg-team/recipe 1.2.40 → 1.2.41
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.
|
|
3
|
+
"version": "1.2.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Recipe viewer and calculator",
|
|
6
6
|
"license": "LGPL-3.0-only",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@terrafirmagreg-team/preview": "^1.2.12",
|
|
32
32
|
"@terrafirmagreg-team/sites": "^1.2.5",
|
|
33
33
|
"@terrafirmagreg-team/translate": "^1.2.16",
|
|
34
|
-
"@terrafirmagreg-team/ui": "^1.2.
|
|
34
|
+
"@terrafirmagreg-team/ui": "^1.2.31",
|
|
35
35
|
"@types/pathfinding": "^0.1.0",
|
|
36
36
|
"comlink": "^4.4.2",
|
|
37
37
|
"fflate": "0.8.3",
|
|
@@ -62,6 +62,8 @@ export function RecipeFrame({
|
|
|
62
62
|
}),
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
|
+
const onPagerWheel = (event: { deltaY: number }) =>
|
|
66
|
+
goPage(event.deltaY > 0 ? 1 : -1);
|
|
65
67
|
return (
|
|
66
68
|
<div className="flex h-full min-h-0 flex-1 flex-col">
|
|
67
69
|
{strip ? (
|
|
@@ -71,9 +73,9 @@ export function RecipeFrame({
|
|
|
71
73
|
) : null}
|
|
72
74
|
<div
|
|
73
75
|
className={cn(
|
|
74
|
-
'grid items-center gap-x-3 border-b border-border pb-2 pt-2',
|
|
76
|
+
'relative grid items-center gap-x-3 border-b border-border pb-2 pt-2 max-sm:pe-11',
|
|
75
77
|
navPrev || navNext
|
|
76
|
-
? 'grid-cols-[minmax(0,1fr)_minmax(0,360px)_minmax(0,1fr)]'
|
|
78
|
+
? 'grid-cols-[auto_minmax(0,1fr)_auto] sm:grid-cols-[minmax(0,1fr)_minmax(0,360px)_minmax(0,1fr)]'
|
|
77
79
|
: 'grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]',
|
|
78
80
|
)}
|
|
79
81
|
>
|
|
@@ -103,15 +105,12 @@ export function RecipeFrame({
|
|
|
103
105
|
) : (
|
|
104
106
|
<div className="min-w-0 max-w-full">{header}</div>
|
|
105
107
|
)}
|
|
106
|
-
<div className="flex min-w-0 items-center justify-self-end">
|
|
108
|
+
<div className="flex min-w-0 items-center justify-self-end max-sm:absolute max-sm:end-1.5 max-sm:top-1/2 max-sm:-translate-y-1/2">
|
|
107
109
|
<RecipeToolbar session={session} />
|
|
108
110
|
</div>
|
|
109
111
|
</div>
|
|
110
112
|
{list ? (
|
|
111
|
-
<div
|
|
112
|
-
onWheel={(event) => goPage(event.deltaY > 0 ? 1 : -1)}
|
|
113
|
-
className="mx-auto w-full max-w-90"
|
|
114
|
-
>
|
|
113
|
+
<div onWheel={onPagerWheel} className="mx-auto w-full sm:max-w-90">
|
|
115
114
|
{onPageChange ? (
|
|
116
115
|
<Pager
|
|
117
116
|
layout="spread"
|
|
@@ -137,7 +136,7 @@ export function RecipeFrame({
|
|
|
137
136
|
) : null}
|
|
138
137
|
<div className="relative flex min-h-0 flex-1 overflow-hidden pt-2">
|
|
139
138
|
{rail ? (
|
|
140
|
-
<div className="absolute start-0 top-2 bottom-0
|
|
139
|
+
<div className="z-10 flex flex-col sm:absolute sm:start-0 sm:top-2 sm:bottom-0">
|
|
141
140
|
{rail}
|
|
142
141
|
</div>
|
|
143
142
|
) : null}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { LayoutGrid } from 'lucide-react';
|
|
5
5
|
import { useTranslations } from '@terrafirmagreg-team/translate/hooks/use-translations';
|
|
6
|
-
import {
|
|
6
|
+
import { IconButton } from '@terrafirmagreg-team/ui/components/blocks/button/icon-button';
|
|
7
7
|
import {
|
|
8
8
|
Sheet,
|
|
9
9
|
SheetContent,
|
|
@@ -26,15 +26,15 @@ export function RecipeToolbar({ session }: { session: RecipeSession }) {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<div className="flex items-center gap-2">
|
|
29
|
-
<
|
|
30
|
-
variant="
|
|
31
|
-
size="
|
|
29
|
+
<IconButton
|
|
30
|
+
variant="secondary"
|
|
31
|
+
size="icon-lg"
|
|
32
32
|
className="lg:hidden"
|
|
33
|
+
label={t('Items', { note: 'recipe.items' })}
|
|
33
34
|
onClick={() => setItemsOpen(true)}
|
|
34
35
|
>
|
|
35
|
-
<LayoutGrid className="size-
|
|
36
|
-
|
|
37
|
-
</Button>
|
|
36
|
+
<LayoutGrid className="size-[58%]" />
|
|
37
|
+
</IconButton>
|
|
38
38
|
<Sheet open={itemsOpen} onOpenChange={setItemsOpen}>
|
|
39
39
|
<SheetContent side="right" className="w-full gap-3 sm:max-w-md">
|
|
40
40
|
<SheetHeader>
|
|
@@ -189,6 +189,7 @@ export function TypeView({ session }: { session: RecipeSession }) {
|
|
|
189
189
|
dir={-1}
|
|
190
190
|
label={t('Previous category', { note: 'recipe.axis.prev' })}
|
|
191
191
|
disabled={nonEmptyIds.length < 2}
|
|
192
|
+
className="max-sm:hidden"
|
|
192
193
|
onClick={() => goCategory(-1)}
|
|
193
194
|
/>
|
|
194
195
|
}
|
|
@@ -197,6 +198,7 @@ export function TypeView({ session }: { session: RecipeSession }) {
|
|
|
197
198
|
dir={1}
|
|
198
199
|
label={t('Next category', { note: 'recipe.axis.next' })}
|
|
199
200
|
disabled={nonEmptyIds.length < 2}
|
|
201
|
+
className="max-sm:hidden"
|
|
200
202
|
onClick={() => goCategory(1)}
|
|
201
203
|
/>
|
|
202
204
|
}
|