react-better-html 1.1.4 → 1.1.6
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/components/Div.d.ts +24 -4
- package/dist/components/Div.js +40 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +4 -0
- package/dist/index.js +8 -2
- package/dist/types/app.d.ts +14 -0
- package/dist/types/app.js +2 -0
- package/dist/types/asset.d.ts +2 -0
- package/dist/types/asset.js +2 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/components.js +2 -0
- package/dist/types/icon.d.ts +8 -0
- package/dist/types/icon.js +2 -0
- package/dist/types/loader.d.ts +1 -0
- package/dist/types/loader.js +2 -0
- package/dist/types/theme.d.ts +19 -0
- package/dist/types/theme.js +2 -0
- package/dist/utils/functions.js +2 -0
- package/dist/utils/hooks.d.ts +8 -0
- package/dist/utils/hooks.js +54 -0
- package/dist/utils/logger.d.ts +41 -0
- package/dist/utils/logger.js +66 -0
- package/package.json +7 -19
- package/dist/index.js.map +0 -1
- /package/dist/{types/types.d.ts → utils/functions.d.ts} +0 -0
package/dist/components/Div.d.ts
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ComponentStyle } from "../types/components";
|
|
2
|
+
import { OmitProps } from "../types/app";
|
|
3
|
+
type DivProps<Value> = {
|
|
4
|
+
value?: Value;
|
|
5
|
+
as?: keyof JSX.IntrinsicElements;
|
|
6
|
+
isTabAccessed?: boolean;
|
|
7
|
+
onClickWithValue?: (value: Value) => void;
|
|
8
|
+
} & OmitProps<React.ComponentProps<"div">, "style"> & ComponentStyle;
|
|
9
|
+
type DivComponent = {
|
|
10
|
+
<Value>(props: DivProps<Value> & {
|
|
11
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
12
|
+
}): React.ReactElement;
|
|
13
|
+
row: <Value>(props: DivProps<Value> & {
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
invertFlexDirection?: boolean;
|
|
16
|
+
}) => React.ReactElement;
|
|
17
|
+
column: <Value>(props: DivProps<Value> & {
|
|
18
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
19
|
+
invertFlexDirection?: boolean;
|
|
20
|
+
}) => React.ReactElement;
|
|
21
|
+
grid: <Value>(props: DivProps<Value> & {
|
|
22
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
+
}) => React.ReactElement;
|
|
3
24
|
};
|
|
4
|
-
declare
|
|
5
|
-
declare const _default: import("react").MemoExoticComponent<typeof Div>;
|
|
25
|
+
declare const _default: import("react").MemoExoticComponent<DivComponent>;
|
|
6
26
|
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const hooks_1 = require("../utils/hooks");
|
|
11
|
+
const DivElement = styled_components_1.default.div.withConfig({
|
|
12
|
+
shouldForwardProp: (prop) => !["normalStyle", "hoverStyle"].includes(prop),
|
|
13
|
+
}) `
|
|
14
|
+
${(props) => props.normalStyle}
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
${(props) => props.hoverStyle}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const Div = (0, react_1.forwardRef)(function Div({ value, as, isTabAccessed, onClickWithValue, role, onClick, onKeyDown, ...props }, ref) {
|
|
21
|
+
const styledComponentStyles = (0, hooks_1.useStyledComponentStyles)(props);
|
|
22
|
+
const dataProps = (0, hooks_1.useComponentPropsWithPrefix)(props, "data");
|
|
23
|
+
const ariaProps = (0, hooks_1.useComponentPropsWithPrefix)(props, "aria");
|
|
24
|
+
const restProps = (0, hooks_1.useComponentPropsWithoutStyle)(props);
|
|
25
|
+
const onClickElement = (0, react_1.useCallback)((event) => {
|
|
26
|
+
onClick?.(event);
|
|
27
|
+
onClickWithValue?.(value);
|
|
28
|
+
}, [onClick, onClickWithValue, value]);
|
|
29
|
+
const onKeyDownElement = (0, react_1.useCallback)((event) => {
|
|
30
|
+
onKeyDown?.(event);
|
|
31
|
+
if (!isTabAccessed)
|
|
32
|
+
return;
|
|
33
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
event.currentTarget.click();
|
|
36
|
+
}
|
|
37
|
+
}, [onKeyDown, isTabAccessed]);
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(DivElement, { as: as, tabIndex: isTabAccessed && !constants_1.isMobileDevice ? 0 : undefined, role: role ?? (onClick ? "button" : undefined), onClick: onClickElement, onKeyDown: onKeyDownElement, ...styledComponentStyles, ...dataProps, ...ariaProps, ...restProps, ref: ref }));
|
|
39
|
+
});
|
|
40
|
+
exports.default = (0, react_1.memo)(Div);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isMobileDevice: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Div = void 0;
|
|
7
|
+
const Div_1 = __importDefault(require("./components/Div"));
|
|
8
|
+
exports.Div = Div_1.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Removes the given props from type */
|
|
2
|
+
export type OmitProps<T, K extends keyof T> = Omit<T, K>;
|
|
3
|
+
/** Removes the given options from type */
|
|
4
|
+
export type ExcludeOptions<T, K extends T> = Exclude<T, K>;
|
|
5
|
+
/** Picks only the selected values */
|
|
6
|
+
export type PickValue<T, K extends T> = K;
|
|
7
|
+
/** Makes all object props optional (On the root) */
|
|
8
|
+
export type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
|
|
9
|
+
/** Makes all object props optional (On the root and nested) */
|
|
10
|
+
export type DeepPartialRecord<T> = {
|
|
11
|
+
[K in keyof T]?: T[K] extends object ? DeepPartialRecord<T[K]> : T[K];
|
|
12
|
+
};
|
|
13
|
+
/** returns only the required props */
|
|
14
|
+
export type PickAllRequired<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ComponentStyle = React.CSSProperties;
|
|
2
|
+
export type ComponentHoverStyle = {
|
|
3
|
+
[CSSProperty in keyof ComponentStyle as `${CSSProperty & string}Hover`]: ComponentStyle[CSSProperty];
|
|
4
|
+
};
|
|
5
|
+
export type ComponentMarginProps = {
|
|
6
|
+
margin?: ComponentStyle["margin"];
|
|
7
|
+
marginTop?: ComponentStyle["marginTop"];
|
|
8
|
+
marginBottom?: ComponentStyle["marginBottom"];
|
|
9
|
+
marginLeft?: ComponentStyle["marginLeft"];
|
|
10
|
+
marginRight?: ComponentStyle["marginRight"];
|
|
11
|
+
marginBlock?: ComponentStyle["marginBlock"];
|
|
12
|
+
marginInline?: ComponentStyle["marginInline"];
|
|
13
|
+
};
|
|
14
|
+
export type ComponentPaddingProps = {
|
|
15
|
+
padding?: ComponentStyle["padding"];
|
|
16
|
+
paddingTop?: ComponentStyle["paddingTop"];
|
|
17
|
+
paddingBottom?: ComponentStyle["paddingBottom"];
|
|
18
|
+
paddingLeft?: ComponentStyle["paddingLeft"];
|
|
19
|
+
paddingRight?: ComponentStyle["paddingRight"];
|
|
20
|
+
paddingBlock?: ComponentStyle["paddingBlock"];
|
|
21
|
+
paddingInline?: ComponentStyle["paddingInline"];
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type LoaderName = "";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
sideSpace: number;
|
|
3
|
+
borderRadius: number;
|
|
4
|
+
borderRadiusSmall?: number;
|
|
5
|
+
gap: number;
|
|
6
|
+
fontSize?: number;
|
|
7
|
+
fontFamily: string;
|
|
8
|
+
transition: string;
|
|
9
|
+
};
|
|
10
|
+
export type Color = `#${string}` | "transparent";
|
|
11
|
+
export type Colors = Record<"textPrimary" | "textSecondary" | "brand" | "brandSecondary" | "success" | "info" | "warn" | "error" | "errorSecondary" | "backgroundBase" | "backgroundSecondary" | "backgroundTertiary" | "border", Color>;
|
|
12
|
+
export type Theme = {
|
|
13
|
+
styles: Styles;
|
|
14
|
+
colors: Colors;
|
|
15
|
+
};
|
|
16
|
+
export type PartialTheme = {
|
|
17
|
+
styles?: Partial<Styles>;
|
|
18
|
+
colors?: Partial<Colors>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentHoverStyle, ComponentStyle } from "../types/components";
|
|
2
|
+
import { Theme } from "../types/theme";
|
|
3
|
+
export declare function useStyledComponentStyles(props: ComponentStyle & ComponentHoverStyle, theme?: Theme): {
|
|
4
|
+
normalStyle: ComponentStyle;
|
|
5
|
+
hoverStyle: ComponentStyle;
|
|
6
|
+
};
|
|
7
|
+
export declare function useComponentPropsWithPrefix<Props extends Record<string, any>, Prefix extends string>(props: Props, prefix: Prefix): Record<`${Prefix}-${string}`, any>;
|
|
8
|
+
export declare function useComponentPropsWithoutStyle<Props extends Record<string, any>>(props: Props): Partial<Props>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStyledComponentStyles = useStyledComponentStyles;
|
|
4
|
+
exports.useComponentPropsWithPrefix = useComponentPropsWithPrefix;
|
|
5
|
+
exports.useComponentPropsWithoutStyle = useComponentPropsWithoutStyle;
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const cssProps = Object.keys(document.documentElement.style).reduce((previousValue, currentValue) => {
|
|
8
|
+
previousValue[currentValue] = true;
|
|
9
|
+
return previousValue;
|
|
10
|
+
}, {});
|
|
11
|
+
function useStyledComponentStyles(props, theme) {
|
|
12
|
+
const styles = (0, react_1.useMemo)(() => {
|
|
13
|
+
const normalStyle = {};
|
|
14
|
+
const hoverStyle = {};
|
|
15
|
+
let haveHover = false;
|
|
16
|
+
for (const key in props) {
|
|
17
|
+
if (key.endsWith("Hover")) {
|
|
18
|
+
haveHover = true;
|
|
19
|
+
const normalKey = key.slice(0, -5);
|
|
20
|
+
hoverStyle[normalKey] = props[key];
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
if (key.startsWith("data-") || key.startsWith("aria-"))
|
|
24
|
+
continue;
|
|
25
|
+
normalStyle[key] = props[key];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (haveHover)
|
|
29
|
+
normalStyle.transition = theme?.styles.transition ?? "";
|
|
30
|
+
return {
|
|
31
|
+
normalStyle,
|
|
32
|
+
hoverStyle,
|
|
33
|
+
};
|
|
34
|
+
}, [props, theme]);
|
|
35
|
+
return styles;
|
|
36
|
+
}
|
|
37
|
+
function useComponentPropsWithPrefix(props, prefix) {
|
|
38
|
+
return (0, react_1.useMemo)(() => {
|
|
39
|
+
const returnValue = {};
|
|
40
|
+
for (const key in props) {
|
|
41
|
+
if (key.startsWith(`${prefix}-`)) {
|
|
42
|
+
returnValue[key] = props[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return returnValue;
|
|
46
|
+
}, [props, prefix]);
|
|
47
|
+
}
|
|
48
|
+
function useComponentPropsWithoutStyle(props) {
|
|
49
|
+
return (0, react_1.useMemo)(() => Object.keys(props).reduce((previousValue, currentValue) => {
|
|
50
|
+
if (!cssProps[currentValue])
|
|
51
|
+
previousValue[currentValue] = props[currentValue];
|
|
52
|
+
return previousValue;
|
|
53
|
+
}, {}), [props]);
|
|
54
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type TextColor = keyof typeof textColors;
|
|
2
|
+
type BackgroundColor = keyof typeof backgroundColors;
|
|
3
|
+
type Options = {
|
|
4
|
+
color?: TextColor;
|
|
5
|
+
backgroundColor?: BackgroundColor;
|
|
6
|
+
bold?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const textColors: {
|
|
9
|
+
black: string;
|
|
10
|
+
red: string;
|
|
11
|
+
green: string;
|
|
12
|
+
yellow: string;
|
|
13
|
+
blue: string;
|
|
14
|
+
magenta: string;
|
|
15
|
+
cyan: string;
|
|
16
|
+
white: string;
|
|
17
|
+
};
|
|
18
|
+
declare const backgroundColors: {
|
|
19
|
+
black: string;
|
|
20
|
+
red: string;
|
|
21
|
+
green: string;
|
|
22
|
+
yellow: string;
|
|
23
|
+
blue: string;
|
|
24
|
+
magenta: string;
|
|
25
|
+
cyan: string;
|
|
26
|
+
white: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const log: {
|
|
29
|
+
/** @description Default log function */
|
|
30
|
+
log: (text?: string, options?: Options) => void;
|
|
31
|
+
/** @description Logs the value in pretty json format */
|
|
32
|
+
json: (jsonObject?: any, options?: Options) => void;
|
|
33
|
+
/** @description Logs a -=-= pattern */
|
|
34
|
+
divider: (color?: TextColor) => void;
|
|
35
|
+
trace: () => void;
|
|
36
|
+
success: (text?: string, bold?: boolean) => void;
|
|
37
|
+
info: (text?: string, bold?: boolean) => void;
|
|
38
|
+
warn: (text?: string, bold?: boolean) => void;
|
|
39
|
+
error: (text?: string, bold?: boolean) => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.log = void 0;
|
|
4
|
+
const textColors = {
|
|
5
|
+
black: "#111111",
|
|
6
|
+
red: "#f83e4b",
|
|
7
|
+
green: "#5ac53a",
|
|
8
|
+
yellow: "#f8d770",
|
|
9
|
+
blue: "#3d6fdf",
|
|
10
|
+
magenta: "#9648eb",
|
|
11
|
+
cyan: "#53b2c8",
|
|
12
|
+
white: "#f8f8f8",
|
|
13
|
+
};
|
|
14
|
+
const backgroundColors = {
|
|
15
|
+
black: "#111111",
|
|
16
|
+
red: "#f83e4b",
|
|
17
|
+
green: "#5ac53a",
|
|
18
|
+
yellow: "#f8d770",
|
|
19
|
+
blue: "#3d6fdf",
|
|
20
|
+
magenta: "#9648eb",
|
|
21
|
+
cyan: "#53b2c8",
|
|
22
|
+
white: "#f8f8f8",
|
|
23
|
+
};
|
|
24
|
+
const logTypes = {
|
|
25
|
+
info: "cyan",
|
|
26
|
+
success: "green",
|
|
27
|
+
warn: "yellow",
|
|
28
|
+
error: "red",
|
|
29
|
+
};
|
|
30
|
+
function getCssString(options) {
|
|
31
|
+
const color = options.color ? textColors[options.color] : undefined;
|
|
32
|
+
const backgroundColor = options.backgroundColor ? backgroundColors[options.backgroundColor] : undefined;
|
|
33
|
+
const fontWeight = options.bold ? "bold" : "normal";
|
|
34
|
+
return `${color ? `color: ${color};` : ""}${backgroundColor ? `background-color: ${backgroundColor};` : ""}${fontWeight ? `font-weight: ${fontWeight};` : ""}`;
|
|
35
|
+
}
|
|
36
|
+
function logText(text, options) {
|
|
37
|
+
console.log(`%c${text}`, getCssString(options ?? {}));
|
|
38
|
+
}
|
|
39
|
+
exports.log = {
|
|
40
|
+
...Object.entries(logTypes).reduce((previousValue, [logType, color]) => {
|
|
41
|
+
previousValue[logType] = (text = "", bold) => {
|
|
42
|
+
logText(text, {
|
|
43
|
+
color,
|
|
44
|
+
bold,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
return previousValue;
|
|
48
|
+
}, {}),
|
|
49
|
+
/** @description Default log function */
|
|
50
|
+
log: (text, options) => {
|
|
51
|
+
logText(text, options);
|
|
52
|
+
},
|
|
53
|
+
/** @description Logs the value in pretty json format */
|
|
54
|
+
json: (jsonObject, options) => {
|
|
55
|
+
logText(`\n${JSON.stringify(jsonObject, null, 4)}`, options);
|
|
56
|
+
},
|
|
57
|
+
/** @description Logs a -=-= pattern */
|
|
58
|
+
divider: (color) => {
|
|
59
|
+
logText("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-", {
|
|
60
|
+
color,
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
trace: () => {
|
|
64
|
+
console.trace();
|
|
65
|
+
},
|
|
66
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-better-html",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "A component library for react that is as close to plane html as possible",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
6
|
"files": [
|
|
8
7
|
"dist"
|
|
9
8
|
],
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
"scripts": {
|
|
25
24
|
"clean": "rimraf dist",
|
|
26
25
|
"prebuild": "npm run clean",
|
|
27
|
-
"build": "
|
|
26
|
+
"build": "tsc",
|
|
28
27
|
"predeploy": "npm run build",
|
|
29
28
|
"deploy": "npm publish"
|
|
30
29
|
},
|
|
@@ -36,26 +35,15 @@
|
|
|
36
35
|
],
|
|
37
36
|
"author": "Kristiyan Valchev (kriss.vv)",
|
|
38
37
|
"license": "ISC",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"rimraf": "^6.0.1"
|
|
40
|
+
},
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@babel/cli": "^7.24.8",
|
|
41
|
-
"@babel/core": "^7.24.8",
|
|
42
|
-
"@babel/preset-env": "^7.24.8",
|
|
43
|
-
"@babel/preset-react": "^7.24.7",
|
|
44
|
-
"@babel/preset-typescript": "^7.24.7",
|
|
45
42
|
"@types/react": "^18.3.3",
|
|
46
|
-
"
|
|
47
|
-
"babel-loader": "^9.1.3",
|
|
48
|
-
"react": "^18.0.0",
|
|
49
|
-
"react-dom": "^18.0.0",
|
|
50
|
-
"rimraf": "^6.0.1",
|
|
51
|
-
"ts-loader": "^9.5.1",
|
|
52
|
-
"typescript": "^5.5.3",
|
|
53
|
-
"webpack": "^5.93.0",
|
|
54
|
-
"webpack-cli": "^5.1.4",
|
|
55
|
-
"webpack-node-externals": "^3.0.0"
|
|
43
|
+
"typescript": "^5.5.3"
|
|
56
44
|
},
|
|
57
45
|
"peerDependencies": {
|
|
58
46
|
"react": "^18.0.0",
|
|
59
|
-
"
|
|
47
|
+
"styled-components": "^6.1.15"
|
|
60
48
|
}
|
|
61
49
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":"wCACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtD,IAAMC,EAAUC,EAAQ,KAIxBH,EAAAA,SAAkB,EAAIE,EAAQE,OAH9B,SAAYC,GAAe,IAAZC,EAAQD,EAARC,SACX,OAAOC,MAAAC,cAAA,WAAMF,EACjB,G,sBCJA,IAAIG,EAAmBC,MAAQA,KAAKD,iBAAoB,SAAUE,GAC9D,OAAQA,GAAOA,EAAIC,WAAcD,EAAM,CAAE,QAAWA,EACxD,EACAb,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQa,SAAM,EACd,IAAMC,EAAQL,EAAgBN,EAAQ,MACtCH,EAAQa,IAAMC,EAAK,O,UCPnBC,EAAOf,QAAUG,QAAQ,Q,GCCrBa,EAA2B,CAAC,ECE5BC,EDCJ,SAASC,EAAoBC,GAE5B,IAAIC,EAAeJ,EAAyBG,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAapB,QAGrB,IAAIe,EAASC,EAAyBG,GAAY,CAGjDnB,QAAS,CAAC,GAOX,OAHAsB,EAAoBH,GAAUI,KAAKR,EAAOf,QAASe,EAAQA,EAAOf,QAASkB,GAGpEH,EAAOf,OACf,CCnB0BkB,CAAoB,K","sources":["webpack://react-better-html/./src/components/Div.tsx","webpack://react-better-html/./src/index.ts","webpack://react-better-html/external commonjs2 \"react\"","webpack://react-better-html/webpack/bootstrap","webpack://react-better-html/webpack/startup"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nfunction Div({ children }) {\n return <div>{children}</div>;\n}\nexports.default = (0, react_1.memo)(Div);\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Div = void 0;\nconst Div_1 = __importDefault(require(\"./components/Div\"));\nexports.Div = Div_1.default;\n","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(124);\n"],"names":["Object","defineProperty","exports","value","react_1","require","memo","_ref","children","React","createElement","__importDefault","this","mod","__esModule","Div","Div_1","module","__webpack_module_cache__","__webpack_exports__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call"],"sourceRoot":""}
|
|
File without changes
|