react-native-better-html 1.0.19 → 1.0.21

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.d.mts CHANGED
@@ -367,7 +367,7 @@ declare const Loader: typeof LoaderComponent & {
367
367
  text: typeof LoaderComponent.text;
368
368
  };
369
369
 
370
- type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin">;
370
+ type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin" | "transitionDuration">;
371
371
  type AnimationStyleProps<Style extends ViewStyle = ViewStyle> = ComponentStyle<Style> & PropsTransforms;
372
372
  type InitialComponentStyle<Style extends ViewStyle = ViewStyle> = {
373
373
  [CSSProperty in keyof AnimationStyleProps<Style> as `initial${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
@@ -420,6 +420,8 @@ type ScreenHolderProps = {
420
420
  noScroll?: boolean;
421
421
  /** @default false */
422
422
  noSideSpace?: boolean;
423
+ /** @default false */
424
+ noTopSpace?: boolean;
423
425
  /** @default 1 (second) */
424
426
  refreshTimeout?: number;
425
427
  onRefresh?: () => void;
package/dist/index.d.ts CHANGED
@@ -367,7 +367,7 @@ declare const Loader: typeof LoaderComponent & {
367
367
  text: typeof LoaderComponent.text;
368
368
  };
369
369
 
370
- type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin">;
370
+ type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin" | "transitionDuration">;
371
371
  type AnimationStyleProps<Style extends ViewStyle = ViewStyle> = ComponentStyle<Style> & PropsTransforms;
372
372
  type InitialComponentStyle<Style extends ViewStyle = ViewStyle> = {
373
373
  [CSSProperty in keyof AnimationStyleProps<Style> as `initial${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
@@ -420,6 +420,8 @@ type ScreenHolderProps = {
420
420
  noScroll?: boolean;
421
421
  /** @default false */
422
422
  noSideSpace?: boolean;
423
+ /** @default false */
424
+ noTopSpace?: boolean;
423
425
  /** @default 1 (second) */
424
426
  refreshTimeout?: number;
425
427
  onRefresh?: () => void;
package/dist/index.js CHANGED
@@ -1341,6 +1341,7 @@ var getAlertDurationFromAuto = (duration, alert) => {
1341
1341
  };
1342
1342
  function Alert({ alert }) {
1343
1343
  const theme2 = (0, import_react_better_core9.useTheme)();
1344
+ const device = useDevice();
1344
1345
  const alertControls2 = useAlertControls();
1345
1346
  const alertsPlugin2 = usePlugin("alerts");
1346
1347
  const pluginConfig = alertsPlugin2?.getConfig() ?? {};
@@ -1393,9 +1394,12 @@ function Alert({ alert }) {
1393
1394
  clearTimeout(timeout);
1394
1395
  };
1395
1396
  }, [onPressCloseAlert, defaultAlertDurationNumber]);
1397
+ const iconSize = 16;
1398
+ const iconPadding = (theme2.styles.space + theme2.styles.gap) / 2;
1396
1399
  return defaultAlertDisplay === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1397
1400
  Animate_default.View,
1398
1401
  {
1402
+ maxWidth: "100%",
1399
1403
  initialOpacity: 0,
1400
1404
  animateOpacity: isRemoved ? 0 : 1,
1401
1405
  initialX: 40,
@@ -1408,20 +1412,29 @@ function Alert({ alert }) {
1408
1412
  justifyContent: "center",
1409
1413
  backgroundColor: alertData[alert.type].backgroundColor,
1410
1414
  borderRadius: 999,
1411
- padding: (theme2.styles.space + theme2.styles.gap) / 2,
1415
+ padding: iconPadding,
1412
1416
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1413
1417
  Icon_default,
1414
1418
  {
1415
1419
  name: alertData[alert.type].icon,
1420
+ nameIOS: alertData[alert.type].iconIOS,
1421
+ size: iconSize,
1416
1422
  color: alertData[alert.type].iconColor ?? theme2.colors.base
1417
1423
  }
1418
1424
  )
1419
1425
  }
1420
1426
  ),
1421
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(View_default, { children: [
1422
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
1423
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default.body, { children: alert.message })
1424
- ] }),
1427
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1428
+ View_default,
1429
+ {
1430
+ maxWidth: device.windowDimensions.width - theme2.styles.space - theme2.styles.space - (iconPadding + iconSize + iconPadding) - theme2.styles.space - 60 - theme2.styles.space - theme2.styles.space - theme2.styles.space,
1431
+ gap: theme2.styles.gap / 3,
1432
+ children: [
1433
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
1434
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default.body, { children: alert.message })
1435
+ ]
1436
+ }
1437
+ ),
1425
1438
  pluginConfig.withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button_default.icon, { icon: "XMark", onPress: onPressCloseAlert })
1426
1439
  ] }) })
1427
1440
  }
@@ -1622,6 +1635,7 @@ var import_jsx_runtime11 = require("react/jsx-runtime");
1622
1635
  var ScreenHolderComponent = ({
1623
1636
  noScroll,
1624
1637
  noSideSpace,
1638
+ noTopSpace,
1625
1639
  refreshTimeout = 1,
1626
1640
  onRefresh,
1627
1641
  onRefreshEnd,
@@ -1658,7 +1672,7 @@ var ScreenHolderComponent = ({
1658
1672
  {
1659
1673
  flex: 1,
1660
1674
  paddingHorizontal: !noSideSpace ? theme2.styles.space : void 0,
1661
- paddingTop: theme2.styles.gap + (insideTopSafeArea ? device.safeArea.afterCalculations.top : 0),
1675
+ paddingTop: (!noTopSpace ? theme2.styles.gap : 0) + (insideTopSafeArea ? device.safeArea.afterCalculations.top : 0),
1662
1676
  paddingBottom: import_react_native8.Platform.OS === "ios" && keyboard.isOpened ? device.safeArea.afterCalculations.top : bottomSpace + (insideBottomSafeArea ? device.safeArea.afterCalculations.bottom : 0),
1663
1677
  children
1664
1678
  }