@ludo.ninja/components 2.0.5 → 2.0.7

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.
@@ -1,4 +1,3 @@
1
- import 'slick-carousel/slick/slick.css';
2
1
  import Media from '@/dto/common/Media';
3
2
  export declare const CollectionSlider: ({ medias }: {
4
3
  medias: Media[] | null;
@@ -8,7 +8,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  // link to carousel source https://dev.to/holdmypotion/react-3d-image-slider-5g6
9
9
  const react_1 = require("react");
10
10
  const react_slick_1 = __importDefault(require("react-slick"));
11
- require("slick-carousel/slick/slick.css");
12
11
  const styled_components_1 = __importDefault(require("styled-components"));
13
12
  const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
14
13
  const store_1 = require("./store");
@@ -1,6 +1,7 @@
1
- import { ReactNode } from 'react';
2
- declare const FontsInitializeLayout: ({ children }: {
3
- children: ReactNode;
4
- }) => import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode } from "react";
2
+ export declare const getFontsLayout: () => {
3
+ FontsInitializeLayout: ({ children }: {
4
+ children: ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ };
5
7
  export declare const GlobalFontsFallback: import("styled-components").RuleSet<object>;
6
- export default FontsInitializeLayout;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GlobalFontsFallback = void 0;
3
+ exports.GlobalFontsFallback = exports.getFontsLayout = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const google_1 = require("next/font/google");
@@ -11,30 +11,34 @@ const vars_1 = require("./vars");
11
11
  // style: ['normal'],
12
12
  // weight: ['200', '300', '400', '500', '600', '700', '800'],
13
13
  // });
14
- const fallbackPoppins = 'LocalPoppinsFont, sans-serif';
15
- const fallbackDMSans = 'LocalDMSansFont';
16
- const poppinsFont = (0, google_1.Poppins)({
17
- subsets: ['latin'],
18
- weight: ['200', '300', '400', '500', '600', '700', '800'],
19
- variable: '--PoppinsFont', //poppinsFontVarCss.variable
20
- fallback: ['LocalPoppinsFont, sans-serif'], // fallbackPoppins
21
- });
22
- const dmsansFont = (0, google_1.DM_Sans)({
23
- subsets: ['latin'],
24
- style: ['normal', 'italic'],
25
- weight: ['400', '500', '600', '700'],
26
- variable: '--DMSansFont', //dmsansFontVarCss.variable
27
- fallback: ['LocalDMSansFont'], // fallbackDMSans
28
- });
29
- const FontsInitializeLayout = ({ children }) => {
30
- (0, react_1.useEffect)(() => {
31
- // update fonts to react portal elements
32
- document.body.classList.add(poppinsFont.variable);
33
- document.body.classList.add(dmsansFont.variable);
34
- document.body.style.fontFamily = vars_1.poppinsFontVarCss.css; // initial font family
35
- }, []);
36
- return ((0, jsx_runtime_1.jsx)("main", { style: { fontFamily: vars_1.poppinsFontVarCss.css }, className: `${dmsansFont.variable} ${poppinsFont.variable}`, children: children }));
14
+ const fallbackPoppins = "LocalPoppinsFont, sans-serif";
15
+ const fallbackDMSans = "LocalDMSansFont";
16
+ const getFontsLayout = () => {
17
+ const poppinsFont = (0, google_1.Poppins)({
18
+ subsets: ["latin"],
19
+ weight: ["200", "300", "400", "500", "600", "700", "800"],
20
+ variable: "--PoppinsFont", //poppinsFontVarCss.variable
21
+ fallback: ["LocalPoppinsFont, sans-serif"], // fallbackPoppins
22
+ });
23
+ const dmsansFont = (0, google_1.DM_Sans)({
24
+ subsets: ["latin"],
25
+ style: ["normal", "italic"],
26
+ weight: ["400", "500", "600", "700"],
27
+ variable: "--DMSansFont", //dmsansFontVarCss.variable
28
+ fallback: ["LocalDMSansFont"], // fallbackDMSans
29
+ });
30
+ const FontsInitializeLayout = ({ children }) => {
31
+ (0, react_1.useEffect)(() => {
32
+ // update fonts to react portal elements
33
+ document.body.classList.add(poppinsFont.variable);
34
+ document.body.classList.add(dmsansFont.variable);
35
+ document.body.style.fontFamily = vars_1.poppinsFontVarCss.css; // initial font family
36
+ }, []);
37
+ return ((0, jsx_runtime_1.jsx)("main", { style: { fontFamily: vars_1.poppinsFontVarCss.css }, className: `${dmsansFont.variable} ${poppinsFont.variable}`, children: children }));
38
+ };
39
+ return { FontsInitializeLayout };
37
40
  };
41
+ exports.getFontsLayout = getFontsLayout;
38
42
  exports.GlobalFontsFallback = (0, styled_components_1.css) `
39
43
  /* poppins-200 - latin */
40
44
  @font-face {
@@ -157,4 +161,3 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
157
161
  src: url('/fonts/dm-sans-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
158
162
  }
159
163
  `;
160
- exports.default = FontsInitializeLayout;
@@ -27,7 +27,7 @@ const GlobalLayout = ({ children }) => {
27
27
  (0, useMultiAudio_1.default)();
28
28
  (0, useAuthVerification_1.useAuthVerification)();
29
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;
30
+ const envValue = NEXT_PUBLIC_ENV_VALUE !== 'prod' ? NEXT_PUBLIC_ENV_VALUE : '';
31
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
32
  };
33
33
  exports.GlobalLayout = GlobalLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",