@ludo.ninja/components 2.0.4 → 2.0.5

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.
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const GlobalLayout: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
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.GlobalLayout = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const envLine_1 = __importDefault(require("@ludo.ninja/ui/build/components/envLine"));
9
+ const initializer_1 = require("../components/sidebar/initializer");
10
+ const useAuthVerification_1 = require("../modules/user/auth/useAuthVerification");
11
+ const profileDataInitialization_1 = require("../modules/user/profileData/profileDataInitialization");
12
+ const env_1 = require("../store/env");
13
+ const globalStyles_1 = __importDefault(require("../styles/globalStyles"));
14
+ const Alert_1 = __importDefault(require("../system/Alert"));
15
+ const Modal_1 = __importDefault(require("../system/Modals/Modal"));
16
+ const ModalSidebar_1 = __importDefault(require("../system/Modals/ModalSidebar"));
17
+ const CreatorModalSidebarPortal_1 = require("../system/Modals/ModalSidebar/CreatorModalSidebarPortal");
18
+ const Overlay_1 = __importDefault(require("../system/Overlay"));
19
+ const screen_1 = require("../utils/screen");
20
+ const useMultiAudio_1 = __importDefault(require("../hooks/audio/useMultiAudio"));
21
+ const CreatorNotifications_1 = require("../modules/notifications/CreatorNotifications");
22
+ const useFetchMyExperienceWithLevel_1 = __importDefault(require("../api/server-experiences/queries/useFetchMyExperienceWithLevel"));
23
+ const SubscriberInviteNotification_1 = require("../api/subscriptions/SubscriberInviteNotification");
24
+ const sessionScroll_1 = require("../modules/sessionScroll");
25
+ const GlobalLayout = ({ children }) => {
26
+ (0, useFetchMyExperienceWithLevel_1.default)();
27
+ (0, useMultiAudio_1.default)();
28
+ (0, useAuthVerification_1.useAuthVerification)();
29
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
30
+ const envValue = NEXT_PUBLIC_ENV_VALUE !== 'prod' ? NEXT_PUBLIC_ENV_VALUE : null;
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(profileDataInitialization_1.ProfileDataInitialization, {}), (0, jsx_runtime_1.jsx)(envLine_1.default, { isNeedToShow: envValue }), (0, jsx_runtime_1.jsx)(globalStyles_1.default, {}), children, (0, jsx_runtime_1.jsx)(CreatorNotifications_1.CreatorNotifications, {}), (0, jsx_runtime_1.jsx)(screen_1.InitializeAppHeight, {}), (0, jsx_runtime_1.jsx)(SubscriberInviteNotification_1.SubscriberInviteNotification, {}), (0, jsx_runtime_1.jsx)(Overlay_1.default, {}), (0, jsx_runtime_1.jsx)(initializer_1.SidebarInitializer, {}), (0, jsx_runtime_1.jsx)(Alert_1.default, {}), (0, jsx_runtime_1.jsx)(Modal_1.default, {}), (0, jsx_runtime_1.jsx)(ModalSidebar_1.default, {}), (0, jsx_runtime_1.jsx)(CreatorModalSidebarPortal_1.CreatorModalSidebarPortal, {}), (0, jsx_runtime_1.jsx)(sessionScroll_1.DeleteScrollStateInterceptor, {})] }));
32
+ };
33
+ exports.GlobalLayout = GlobalLayout;
@@ -0,0 +1,3 @@
1
+ import { LayoutProps } from '@/layouts/pageWithLayout';
2
+ declare const LWithRegularHeader: LayoutProps;
3
+ export default LWithRegularHeader;
@@ -0,0 +1,16 @@
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 styled_components_1 = __importDefault(require("styled-components"));
8
+ const Meta_1 = __importDefault(require("../../../components/base/Meta"));
9
+ const header_1 = __importDefault(require("../../../components/headers/header"));
10
+ // Component
11
+ const SWrapper = styled_components_1.default.div `
12
+ min-height: var(--app-height);
13
+ `;
14
+ const LWithRegularHeader = ({ children }) => ((0, jsx_runtime_1.jsxs)(SWrapper, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(header_1.default, {}), children] }));
15
+ // Export
16
+ exports.default = LWithRegularHeader;
@@ -0,0 +1,5 @@
1
+ import { NextPage } from 'next';
2
+ import LWithRegularHeader from '@/layouts/base/LWithRegularHeader/index';
3
+ export type PageLWithRegularHeader = NextPage & {
4
+ layout: typeof LWithRegularHeader;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { LayoutProps } from '@/layouts/pageWithLayout';
2
+ declare const LWithSearchHeader: LayoutProps;
3
+ export default LWithSearchHeader;
@@ -0,0 +1,12 @@
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 Meta_1 = __importDefault(require("../../../components/base/Meta"));
8
+ const headerSearch_1 = __importDefault(require("../../../components/headers/headerSearch"));
9
+ // Component
10
+ const LWithSearchHeader = ({ children }) => ((0, jsx_runtime_1.jsxs)("div", { style: { minHeight: 'var(--app-height)' }, children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(headerSearch_1.default, {}), children] }));
11
+ // Export
12
+ exports.default = LWithSearchHeader;
@@ -0,0 +1,5 @@
1
+ import { NextPage } from 'next';
2
+ import LWithSearchHeader from '@/layouts/base/LWithSearchHeader/index';
3
+ export type PageLWithSearchHeader = NextPage & {
4
+ layout: typeof LWithSearchHeader;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { LayoutProps } from '@/layouts/pageWithLayout';
2
+ declare const MainLayout: LayoutProps;
3
+ export default MainLayout;
@@ -0,0 +1,17 @@
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 utils_1 = require("@ludo.ninja/utils");
8
+ const toTopBtn_1 = __importDefault(require("../../../components/toTopBtn"));
9
+ const LWithRegularHeader_1 = __importDefault(require("../../base/LWithRegularHeader"));
10
+ const styles_1 = require("../styles");
11
+ const pageTransitionLayout_1 = __importDefault(require("../../pageTransitionLayout"));
12
+ // Component
13
+ const MainLayout = ({ children }) => {
14
+ return ((0, jsx_runtime_1.jsx)(pageTransitionLayout_1.default, { children: (0, jsx_runtime_1.jsx)(LWithRegularHeader_1.default, { children: (0, jsx_runtime_1.jsxs)(styles_1.StyledMain, { children: [children, !utils_1.isServer && (0, jsx_runtime_1.jsx)(toTopBtn_1.default, {})] }) }) }));
15
+ };
16
+ // Export
17
+ exports.default = MainLayout;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledMain: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
3
+ export declare const StyledMainForms: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -0,0 +1,46 @@
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.StyledMainForms = exports.StyledMain = void 0;
7
+ const styled_components_1 = __importDefault(require("styled-components"));
8
+ const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
9
+ const ScreenWidth_1 = require("../../styles/ScreenWidth");
10
+ exports.StyledMain = styled_components_1.default.main `
11
+ width: 1080px;
12
+ margin: 0 auto;
13
+ padding-top: 124px;
14
+ padding-bottom: 60px;
15
+
16
+ ${ScreenWidth_1.mediaQuery.maxWidthTablet} {
17
+ width: 768px;
18
+ padding-bottom: 32px;
19
+ }
20
+
21
+ ${ScreenWidth_1.mediaQuery.mobile} {
22
+ width: 320px;
23
+ padding-top: 80px;
24
+ padding-bottom: 20px;
25
+ }
26
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
27
+ width: ${(0, _4k_1.adaptiveValueCalc)(1080)};
28
+ padding-top: ${(0, _4k_1.adaptiveValueCalc)(124)};
29
+ padding-bottom: ${(0, _4k_1.adaptiveValueCalc)(60)};
30
+ }
31
+ `;
32
+ exports.StyledMainForms = styled_components_1.default.main `
33
+ width: 1080px;
34
+ margin: 0 auto;
35
+
36
+ ${ScreenWidth_1.mediaQuery.maxWidthTablet} {
37
+ width: 768px;
38
+ }
39
+
40
+ ${ScreenWidth_1.mediaQuery.mobile} {
41
+ width: 400px;
42
+ }
43
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
44
+ width: ${(0, _4k_1.adaptiveValueCalc)(1080)};
45
+ }
46
+ `;
@@ -0,0 +1,6 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface ILayoutProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const PageTransitionLayout: FC<ILayoutProps>;
6
+ export default PageTransitionLayout;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const router_1 = require("next/router");
5
+ const framer_motion_1 = require("framer-motion");
6
+ const PageTransitionLayout = ({ children }) => {
7
+ const router = (0, router_1.useRouter)();
8
+ return ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: 'wait', children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: "initialState", animate: "animateState", exit: "exitState", transition: {
9
+ type: 'tween',
10
+ duration: 0.5,
11
+ }, variants: {
12
+ initialState: {
13
+ opacity: 0,
14
+ },
15
+ animateState: {
16
+ opacity: 1,
17
+ },
18
+ exitState: {
19
+ opacity: 0,
20
+ },
21
+ }, children: children }, router.route) }));
22
+ };
23
+ exports.default = PageTransitionLayout;
@@ -0,0 +1,8 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { PageLWithRegularHeader } from '@/layouts/base/LWithRegularHeader/type';
3
+ import { PageLWithSearchHeader } from '@/layouts/base/LWithSearchHeader/type';
4
+ export type PageWithLayoutType = PageLWithRegularHeader | PageLWithSearchHeader;
5
+ export type LayoutProps = ({ children, }: {
6
+ children: ReactNode;
7
+ }) => ReactElement;
8
+ export default PageWithLayoutType;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -13,12 +13,12 @@
13
13
  "clean": "rimraf tsconfig.tsbuildinfo && rimraf build",
14
14
  "build:tsc": "npm run clean && tsc --build",
15
15
  "replaceImports": "node replaceImports.js",
16
- "publish": "npm publish --access public -workspace @ludo.ninja/components",
17
16
  "check-types": "tsc --pretty --noEmit",
18
17
  "check-format": "prettier --check .",
19
18
  "check-lint": "eslint . --ext ts --ext tsx --ext js",
20
19
  "lint": "npm run check-format && npm run check-lint && npm run check-types && npm run test && npm run build",
21
- "build": "npm run check-types && npm run build:tsc && npm run replaceImports"
20
+ "build": "npm run check-types && npm run build:tsc && npm run replaceImports",
21
+ "publish": "npm publish --access public -workspace @ludo.ninja/components"
22
22
  },
23
23
  "dependencies": {
24
24
  "@marker.io/browser": "^0.19.0",