react-better-html 1.1.157 → 1.1.159
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 +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +297 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +301 -124
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { ComponentType, ComponentProps, ReactNode } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
type PluginName = "react-router-dom" | "
|
|
6
|
+
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
7
7
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
8
8
|
type BetterHtmlPlugin<T = object> = {
|
|
9
9
|
name: PluginName;
|
|
@@ -981,12 +981,17 @@ declare const colorThemeControls: {
|
|
|
981
981
|
toggleTheme: (theme?: ColorTheme) => void;
|
|
982
982
|
};
|
|
983
983
|
|
|
984
|
+
declare function generateLocalStorage<LocalStorage extends object>(): {
|
|
985
|
+
setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
|
|
986
|
+
getItem: <StorageName extends keyof LocalStorage>(name: StorageName) => LocalStorage[StorageName] | undefined;
|
|
987
|
+
removeItem: (name: keyof LocalStorage) => void;
|
|
988
|
+
removeAllItems: () => void;
|
|
989
|
+
};
|
|
990
|
+
|
|
984
991
|
declare const countries: Country[];
|
|
985
992
|
|
|
986
993
|
declare const isMobileDevice: boolean;
|
|
987
994
|
|
|
988
|
-
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor;
|
|
989
|
-
|
|
990
995
|
type AlertsPluginOptions = {
|
|
991
996
|
/** @default "bottom" */
|
|
992
997
|
position?: "top" | "bottom";
|
|
@@ -1004,4 +1009,22 @@ type AlertsPluginOptions = {
|
|
|
1004
1009
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
1005
1010
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
1006
1011
|
|
|
1007
|
-
|
|
1012
|
+
type ReactRouterDomPluginOptions = {};
|
|
1013
|
+
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1014
|
+
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
1015
|
+
|
|
1016
|
+
type LocalStoragePluginOptions = {
|
|
1017
|
+
encryption?: {
|
|
1018
|
+
/** @default false */
|
|
1019
|
+
enabled?: false;
|
|
1020
|
+
} | {
|
|
1021
|
+
/** @default false */
|
|
1022
|
+
enabled?: true;
|
|
1023
|
+
secretKey: string;
|
|
1024
|
+
iv: string;
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1028
|
+
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1029
|
+
|
|
1030
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { ComponentType, ComponentProps, ReactNode } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
type PluginName = "react-router-dom" | "
|
|
6
|
+
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
7
7
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
8
8
|
type BetterHtmlPlugin<T = object> = {
|
|
9
9
|
name: PluginName;
|
|
@@ -981,12 +981,17 @@ declare const colorThemeControls: {
|
|
|
981
981
|
toggleTheme: (theme?: ColorTheme) => void;
|
|
982
982
|
};
|
|
983
983
|
|
|
984
|
+
declare function generateLocalStorage<LocalStorage extends object>(): {
|
|
985
|
+
setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
|
|
986
|
+
getItem: <StorageName extends keyof LocalStorage>(name: StorageName) => LocalStorage[StorageName] | undefined;
|
|
987
|
+
removeItem: (name: keyof LocalStorage) => void;
|
|
988
|
+
removeAllItems: () => void;
|
|
989
|
+
};
|
|
990
|
+
|
|
984
991
|
declare const countries: Country[];
|
|
985
992
|
|
|
986
993
|
declare const isMobileDevice: boolean;
|
|
987
994
|
|
|
988
|
-
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor;
|
|
989
|
-
|
|
990
995
|
type AlertsPluginOptions = {
|
|
991
996
|
/** @default "bottom" */
|
|
992
997
|
position?: "top" | "bottom";
|
|
@@ -1004,4 +1009,22 @@ type AlertsPluginOptions = {
|
|
|
1004
1009
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
1005
1010
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
1006
1011
|
|
|
1007
|
-
|
|
1012
|
+
type ReactRouterDomPluginOptions = {};
|
|
1013
|
+
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1014
|
+
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
1015
|
+
|
|
1016
|
+
type LocalStoragePluginOptions = {
|
|
1017
|
+
encryption?: {
|
|
1018
|
+
/** @default false */
|
|
1019
|
+
enabled?: false;
|
|
1020
|
+
} | {
|
|
1021
|
+
/** @default false */
|
|
1022
|
+
enabled?: true;
|
|
1023
|
+
secretKey: string;
|
|
1024
|
+
iv: string;
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1028
|
+
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1029
|
+
|
|
1030
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|