@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 CHANGED
@@ -1437,7 +1437,7 @@ function Skjermbilde({
1437
1437
  );
1438
1438
  };
1439
1439
  const a11y = tekst.skjermbildeA11y(automasker.length, egne.length, allTekst);
1440
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native8.View, { style: { flex: 1, gap: tema.space.md }, children: [
1440
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native8.View, { testID: "skjermbilde-steg", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
1441
1441
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(H, { sub: kilde === "galleri" ? tekst.skjermbildeUnderGalleri : tekst.skjermbildeUnder, children: tekst.skjermbildeTittel }),
1442
1442
  notat ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native8.View, { testID: "bilde-notat", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: notat }) }) : null,
1443
1443
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native8.View, { accessibilityRole: "toolbar", accessibilityLabel: tekst.maskering, style: { flexDirection: "row", gap: tema.space.sm }, children: [
@@ -1451,15 +1451,15 @@ function Skjermbilde({
1451
1451
  testID: "skjermbilde-ramme",
1452
1452
  onLayout,
1453
1453
  style: {
1454
- flex: 1,
1454
+ flexGrow: 1,
1455
+ flexShrink: 1,
1456
+ flexBasis: 0,
1455
1457
  minHeight: tema.touch * 5,
1456
- alignItems: "center",
1457
- justifyContent: "center",
1458
1458
  backgroundColor: screenRules.previewBackdrop,
1459
1459
  borderRadius: tema.radius.md,
1460
1460
  overflow: "hidden"
1461
1461
  },
1462
- children: visning ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1462
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native8.View, { testID: "skjermbilde-flate", pointerEvents: "box-none", style: [import_react_native8.StyleSheet.absoluteFill, { alignItems: "center", justifyContent: "center" }], children: visning ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1463
1463
  import_react_native8.View,
1464
1464
  {
1465
1465
  ref: previewRef,
@@ -1520,7 +1520,7 @@ function Skjermbilde({
1520
1520
  ))
1521
1521
  ]
1522
1522
  }
1523
- ) : null
1523
+ ) : null })
1524
1524
  }
1525
1525
  ),
1526
1526
  automasker.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Hint, { children: [
@@ -1529,7 +1529,7 @@ function Skjermbilde({
1529
1529
  ] }) : null,
1530
1530
  egne.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: tekst.dittStrok }) : null,
1531
1531
  allTekst ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: tekst.allTekstHint }) : null,
1532
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native8.View, { style: { gap: tema.space.sm }, children: [
1532
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native8.View, { testID: "skjermbilde-fot", style: { flexShrink: 0, gap: tema.space.sm }, children: [
1533
1533
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Btn, { variant: "danger", testID: "fjern-bildet", ikon: "\u{1F5D1}", label: tekst.fjernBildet, onPress: onFjern, disabled: komponerer }),
1534
1534
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Btn, { testID: "legg-ved", label: tekst.leggVedOgFortsett, onPress: onLeggVed, disabled: komponerer || !visning, hint: tekst.leggVedHintDD42 })
1535
1535
  ] })
@@ -1785,7 +1785,10 @@ function Widget({
1785
1785
  paddingRight: tema.screenPadding + insets.right,
1786
1786
  gap: tema.space.md,
1787
1787
  maxHeight: "92%",
1788
- minHeight: "60%"
1788
+ minHeight: "60%",
1789
+ // Bildesteget får fast høyde: forhåndsvisningen tilpasses plassen som er igjen, og
1790
+ // uten en kjent høyde har den ingen øvre grense (se Skjermbilde.tsx).
1791
+ ...steg === "skjermbilde" ? { height: "92%" } : {}
1789
1792
  },
1790
1793
  children: [
1791
1794
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native9.View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [