@innspel/react-native 0.7.0 → 0.7.1
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 +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1298,7 +1298,7 @@ function MineInnspill({
|
|
|
1298
1298
|
// src/widget/Skjermbilde.tsx
|
|
1299
1299
|
import { skaler, strokTilRekter, treffer, trykkTilRekt } from "@innspel/core";
|
|
1300
1300
|
import { useCallback, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
1301
|
-
import { Image as Image2, Pressable as Pressable4, Text as Text7, View as View7 } from "react-native";
|
|
1301
|
+
import { Image as Image2, Pressable as Pressable4, StyleSheet, Text as Text7, View as View7 } from "react-native";
|
|
1302
1302
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1303
1303
|
function Skjermbilde({
|
|
1304
1304
|
bilde,
|
|
@@ -1399,7 +1399,7 @@ function Skjermbilde({
|
|
|
1399
1399
|
);
|
|
1400
1400
|
};
|
|
1401
1401
|
const a11y = tekst.skjermbildeA11y(automasker.length, egne.length, allTekst);
|
|
1402
|
-
return /* @__PURE__ */ jsxs7(View7, { style: {
|
|
1402
|
+
return /* @__PURE__ */ jsxs7(View7, { testID: "skjermbilde-steg", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1403
1403
|
/* @__PURE__ */ jsx7(H, { sub: kilde === "galleri" ? tekst.skjermbildeUnderGalleri : tekst.skjermbildeUnder, children: tekst.skjermbildeTittel }),
|
|
1404
1404
|
notat ? /* @__PURE__ */ jsx7(View7, { testID: "bilde-notat", children: /* @__PURE__ */ jsx7(Hint, { children: notat }) }) : null,
|
|
1405
1405
|
/* @__PURE__ */ jsxs7(View7, { accessibilityRole: "toolbar", accessibilityLabel: tekst.maskering, style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
@@ -1413,15 +1413,15 @@ function Skjermbilde({
|
|
|
1413
1413
|
testID: "skjermbilde-ramme",
|
|
1414
1414
|
onLayout,
|
|
1415
1415
|
style: {
|
|
1416
|
-
|
|
1416
|
+
flexGrow: 1,
|
|
1417
|
+
flexShrink: 1,
|
|
1418
|
+
flexBasis: 0,
|
|
1417
1419
|
minHeight: tema.touch * 5,
|
|
1418
|
-
alignItems: "center",
|
|
1419
|
-
justifyContent: "center",
|
|
1420
1420
|
backgroundColor: screenRules.previewBackdrop,
|
|
1421
1421
|
borderRadius: tema.radius.md,
|
|
1422
1422
|
overflow: "hidden"
|
|
1423
1423
|
},
|
|
1424
|
-
children: visning ? /* @__PURE__ */ jsxs7(
|
|
1424
|
+
children: /* @__PURE__ */ jsx7(View7, { testID: "skjermbilde-flate", pointerEvents: "box-none", style: [StyleSheet.absoluteFill, { alignItems: "center", justifyContent: "center" }], children: visning ? /* @__PURE__ */ jsxs7(
|
|
1425
1425
|
View7,
|
|
1426
1426
|
{
|
|
1427
1427
|
ref: previewRef,
|
|
@@ -1482,7 +1482,7 @@ function Skjermbilde({
|
|
|
1482
1482
|
))
|
|
1483
1483
|
]
|
|
1484
1484
|
}
|
|
1485
|
-
) : null
|
|
1485
|
+
) : null })
|
|
1486
1486
|
}
|
|
1487
1487
|
),
|
|
1488
1488
|
automasker.length ? /* @__PURE__ */ jsxs7(Hint, { children: [
|
|
@@ -1491,7 +1491,7 @@ function Skjermbilde({
|
|
|
1491
1491
|
] }) : null,
|
|
1492
1492
|
egne.length ? /* @__PURE__ */ jsx7(Hint, { children: tekst.dittStrok }) : null,
|
|
1493
1493
|
allTekst ? /* @__PURE__ */ jsx7(Hint, { children: tekst.allTekstHint }) : null,
|
|
1494
|
-
/* @__PURE__ */ jsxs7(View7, { style: { gap: tema.space.sm }, children: [
|
|
1494
|
+
/* @__PURE__ */ jsxs7(View7, { testID: "skjermbilde-fot", style: { flexShrink: 0, gap: tema.space.sm }, children: [
|
|
1495
1495
|
/* @__PURE__ */ jsx7(Btn, { variant: "danger", testID: "fjern-bildet", ikon: "\u{1F5D1}", label: tekst.fjernBildet, onPress: onFjern, disabled: komponerer }),
|
|
1496
1496
|
/* @__PURE__ */ jsx7(Btn, { testID: "legg-ved", label: tekst.leggVedOgFortsett, onPress: onLeggVed, disabled: komponerer || !visning, hint: tekst.leggVedHintDD42 })
|
|
1497
1497
|
] })
|
|
@@ -1747,7 +1747,10 @@ function Widget({
|
|
|
1747
1747
|
paddingRight: tema.screenPadding + insets.right,
|
|
1748
1748
|
gap: tema.space.md,
|
|
1749
1749
|
maxHeight: "92%",
|
|
1750
|
-
minHeight: "60%"
|
|
1750
|
+
minHeight: "60%",
|
|
1751
|
+
// Bildesteget får fast høyde: forhåndsvisningen tilpasses plassen som er igjen, og
|
|
1752
|
+
// uten en kjent høyde har den ingen øvre grense (se Skjermbilde.tsx).
|
|
1753
|
+
...steg === "skjermbilde" ? { height: "92%" } : {}
|
|
1751
1754
|
},
|
|
1752
1755
|
children: [
|
|
1753
1756
|
/* @__PURE__ */ jsxs8(View8, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|