react-easy-wall 1.0.28 → 1.1.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.
@@ -5,11 +5,13 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var panel_actions = require('./panel.actions.js');
6
6
  var index = require('../../_virtual/index.js');
7
7
  var panel_store = require('./panel.store.js');
8
+ var session_hooks = require('../session/session.hooks.js');
8
9
  var Button = require('../../node_modules/@mui/material/esm/Button/Button.js');
9
10
 
10
11
  const PanelButton = ({ children, ...rest }) => {
11
12
  const { isOpen } = index.libExports.useStore(panel_store.panelStore);
12
- return jsxRuntime.jsx(Button.default, { onClick: () => panel_actions.handlePanelClick(!isOpen), ...rest, children: children });
13
+ const { user } = session_hooks.useSession();
14
+ return (jsxRuntime.jsx(Button.default, { onClick: () => user && panel_actions.handlePanelClick(!isOpen), ...rest, children: children }));
13
15
  };
14
16
 
15
17
  exports.PanelButton = PanelButton;
@@ -1 +1 @@
1
- {"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client'\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return <Button onClick={() => handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>;\n};\n"],"names":[],"mappings":";;;;;;;;;AAWO;;AAGL;AAGF;;"}
1
+ {"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n const { user } = useSession();\n return (\n <Button onClick={() => user && handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAYO;;AAEL;;AAMF;;"}
@@ -9,7 +9,12 @@ const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {},
9
9
  const { subscription } = session_hooks.useSession();
10
10
  if (!subscription)
11
11
  return null;
12
- return jsxRuntime.jsx(Box.default, { ...subscriptionImageContainerProps, children: children });
12
+ return (jsxRuntime.jsx(Box.default, { sx: {
13
+ borderRadius: '50%',
14
+ position: 'absolute',
15
+ top: -7,
16
+ right: -7,
17
+ }, ...subscriptionImageContainerProps, children: children }));
13
18
  };
14
19
 
15
20
  exports.PanelSubscriptionIcon = PanelSubscriptionIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box ,BoxProps} from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return <Box {...subscriptionImageContainerProps}>{children}</Box>;\n};\n"],"names":[],"mappings":";;;;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AACF;;"}
1
+ {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box, BoxProps } from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return (\n <Box\n sx={{\n borderRadius: '50%',\n position: 'absolute',\n top: -7,\n right: -7,\n }}\n {...subscriptionImageContainerProps}>\n {children}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AAGM;AACA;;;AAGD;AAKP;;"}
@@ -3,11 +3,13 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { handlePanelClick } from './panel.actions.js';
4
4
  import { l as libExports } from '../../_virtual/index.js';
5
5
  import { panelStore } from './panel.store.js';
6
+ import { useSession } from '../session/session.hooks.js';
6
7
  import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
7
8
 
8
9
  const PanelButton = ({ children, ...rest }) => {
9
10
  const { isOpen } = libExports.useStore(panelStore);
10
- return jsx(Button, { onClick: () => handlePanelClick(!isOpen), ...rest, children: children });
11
+ const { user } = useSession();
12
+ return (jsx(Button, { onClick: () => user && handlePanelClick(!isOpen), ...rest, children: children }));
11
13
  };
12
14
 
13
15
  export { PanelButton };
@@ -1 +1 @@
1
- {"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client'\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return <Button onClick={() => handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>;\n};\n"],"names":[],"mappings":";;;;;;;AAWO;;AAGL;AAGF;;"}
1
+ {"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n const { user } = useSession();\n return (\n <Button onClick={() => user && handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAYO;;AAEL;;AAMF;;"}
@@ -7,7 +7,12 @@ const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {},
7
7
  const { subscription } = useSession();
8
8
  if (!subscription)
9
9
  return null;
10
- return jsx(Box, { ...subscriptionImageContainerProps, children: children });
10
+ return (jsx(Box, { sx: {
11
+ borderRadius: '50%',
12
+ position: 'absolute',
13
+ top: -7,
14
+ right: -7,
15
+ }, ...subscriptionImageContainerProps, children: children }));
11
16
  };
12
17
 
13
18
  export { PanelSubscriptionIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box ,BoxProps} from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return <Box {...subscriptionImageContainerProps}>{children}</Box>;\n};\n"],"names":[],"mappings":";;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AACF;;"}
1
+ {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box, BoxProps } from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return (\n <Box\n sx={{\n borderRadius: '50%',\n position: 'absolute',\n top: -7,\n right: -7,\n }}\n {...subscriptionImageContainerProps}>\n {children}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AAGM;AACA;;;AAGD;AAKP;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface PaywallProps {
3
+ children?: React.ReactNode;
4
+ post?: any;
5
+ postTypeField?: string;
6
+ postType?: string;
7
+ }
8
+ export declare const Paywall: React.FC<PaywallProps>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { BoxProps, TypographyProps, ButtonProps } from '@mui/material';
3
+ export interface PaywallSubscriptionProps {
4
+ post?: any;
5
+ containerProps?: BoxProps;
6
+ titleProps?: TypographyProps;
7
+ subtitleProps?: TypographyProps;
8
+ buttonProps?: ButtonProps;
9
+ buttonText?: string;
10
+ secondaryButtonProps?: ButtonProps;
11
+ secondaryButtonText?: string;
12
+ title?: string;
13
+ subtitle?: string;
14
+ withCaption?: boolean;
15
+ }
16
+ export declare const PaywallSubscription: React.FC<PaywallSubscriptionProps>;
@@ -0,0 +1,3 @@
1
+ export * from './PaywallSubscription';
2
+ export * from './paywall.constants';
3
+ export * from './Paywall';
@@ -0,0 +1 @@
1
+ export declare const PAYWALL_AUTH_ENDPOINT: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-easy-wall",
3
- "version": "1.0.28",
3
+ "version": "1.1.1",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/index.d.ts",