react-better-html 1.1.161 → 1.1.163

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.mjs CHANGED
@@ -1547,14 +1547,9 @@ var alertsPlugin = (options) => ({
1547
1547
  });
1548
1548
 
1549
1549
  // src/plugins/reactRouterDom.ts
1550
- import { Link as RouterLink, NavLink as RouterNavLink } from "react-router-dom";
1551
1550
  var defaultReactRouterDomPluginOptions = {};
1552
1551
  var reactRouterDomPlugin = (options) => ({
1553
1552
  name: "react-router-dom",
1554
- components: {
1555
- Link: RouterLink,
1556
- NavLink: RouterNavLink
1557
- },
1558
1553
  initialize: () => {
1559
1554
  console.log("react-router-dom plugin initialized");
1560
1555
  },
@@ -2208,7 +2203,7 @@ function Alert2({ alert }) {
2208
2203
  const theme2 = useTheme();
2209
2204
  const alertControls2 = useAlertControls();
2210
2205
  const alertsPlugin2 = usePlugin("alerts");
2211
- const pluginConfig = alertsPlugin2?.getConfig?.() ?? {};
2206
+ const pluginConfig = alertsPlugin2?.getConfig() ?? {};
2212
2207
  const defaultAlertDurationNumber = getAlertDurationFromAuto(
2213
2208
  alert.duration ?? pluginConfig.defaultDuration ?? defaultAlertsPluginOptions.defaultDuration,
2214
2209
  alert
@@ -2370,7 +2365,7 @@ function AlertsHolder() {
2370
2365
  const theme2 = useTheme();
2371
2366
  const alertsPlugin2 = usePlugin("alerts");
2372
2367
  const { alerts } = useBetterHtmlContextInternal();
2373
- const pluginConfig = alertsPlugin2?.getConfig?.() ?? {};
2368
+ const pluginConfig = alertsPlugin2?.getConfig() ?? {};
2374
2369
  const top = pluginConfig.position === "top" ? theme2.styles.gap : void 0;
2375
2370
  const bottom = pluginConfig.position === "bottom" ? theme2.styles.gap : void 0;
2376
2371
  const left = pluginConfig.align === "left" ? theme2.styles.space : pluginConfig.align === "center" ? "50%" : void 0;
@@ -5493,8 +5488,8 @@ var encryptString = (text) => {
5493
5488
  "`encryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
5494
5489
  );
5495
5490
  }
5496
- const pluginConfig = localStoragePlugin2.getConfig?.() ?? {};
5497
- if (!pluginConfig?.encryption?.enabled) return text;
5491
+ const pluginConfig = localStoragePlugin2.getConfig();
5492
+ if (!pluginConfig.encryption?.enabled) return text;
5498
5493
  const encrypted = CryptoJS.AES.encrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
5499
5494
  iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
5500
5495
  mode: CryptoJS.mode.CBC,
@@ -5510,8 +5505,8 @@ var decryptString = (text) => {
5510
5505
  "`decryptString` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
5511
5506
  );
5512
5507
  }
5513
- const pluginConfig = localStoragePlugin2.getConfig?.() ?? {};
5514
- if (!pluginConfig?.encryption?.enabled) return text;
5508
+ const pluginConfig = localStoragePlugin2.getConfig();
5509
+ if (!pluginConfig.encryption?.enabled) return text;
5515
5510
  const decrypted = CryptoJS.AES.decrypt(text, CryptoJS.enc.Hex.parse(pluginConfig.encryption.secretKey), {
5516
5511
  iv: CryptoJS.enc.Hex.parse(pluginConfig.encryption.iv),
5517
5512
  mode: CryptoJS.mode.CBC,
@@ -9111,7 +9106,7 @@ function generateLocalStorage() {
9111
9106
  "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9112
9107
  );
9113
9108
  }
9114
- const pluginConfig = localStoragePlugin2.getConfig?.() ?? {};
9109
+ const pluginConfig = localStoragePlugin2.getConfig();
9115
9110
  const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9116
9111
  const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9117
9112
  const readyValue = encryptionEnabled ? encryptString(JSON.stringify(value)) : JSON.stringify(value);
@@ -9129,7 +9124,7 @@ function generateLocalStorage() {
9129
9124
  "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9130
9125
  );
9131
9126
  }
9132
- const pluginConfig = localStoragePlugin2.getConfig?.() ?? {};
9127
+ const pluginConfig = localStoragePlugin2.getConfig();
9133
9128
  const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9134
9129
  const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9135
9130
  const item = localStorage.getItem(readyName.toString());
@@ -9151,7 +9146,7 @@ function generateLocalStorage() {
9151
9146
  "`generateLocalStorage` hook requires the `localStorage` plugin to be added to the `plugins` prop in `<BetterHtmlProvider>`."
9152
9147
  );
9153
9148
  }
9154
- const pluginConfig = localStoragePlugin2.getConfig?.() ?? {};
9149
+ const pluginConfig = localStoragePlugin2.getConfig();
9155
9150
  const encryptionEnabled = pluginConfig.encryption?.enabled ?? false;
9156
9151
  const readyName = encryptionEnabled ? encryptString(name.toString()) : name;
9157
9152
  localStorage.removeItem(readyName.toString());