@redneckz/wildless-cms-uni-blocks 0.2.55 → 0.2.58

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.
Files changed (46) hide show
  1. package/dist/ContentPage.d.ts +4 -1
  2. package/dist/ContentPage.js +3 -4
  3. package/dist/ContentPage.js.map +1 -1
  4. package/dist/Footer/Footer.mobile.d.ts +5 -0
  5. package/dist/Footer/Footer.mobile.js +7 -0
  6. package/dist/Footer/Footer.mobile.js.map +1 -0
  7. package/dist/MobileBlocks.d.ts +13 -0
  8. package/dist/MobileBlocks.js +27 -0
  9. package/dist/MobileBlocks.js.map +1 -0
  10. package/dist/content-page-repository/ContentPageRepository.js +1 -1
  11. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  12. package/dist/index.d.ts +7 -3
  13. package/dist/index.js +9 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/{content-page-repository/toMobilePage.d.ts → toMobilePage.d.ts} +1 -1
  16. package/dist/{content-page-repository/toMobilePage.js → toMobilePage.js} +0 -0
  17. package/dist/toMobilePage.js.map +1 -0
  18. package/lib/ContentPage.d.ts +4 -1
  19. package/lib/ContentPage.js +3 -4
  20. package/lib/ContentPage.js.map +1 -1
  21. package/lib/Footer/Footer.mobile.d.ts +5 -0
  22. package/lib/Footer/Footer.mobile.js +5 -0
  23. package/lib/Footer/Footer.mobile.js.map +1 -0
  24. package/lib/MobileBlocks.d.ts +13 -0
  25. package/lib/MobileBlocks.js +25 -0
  26. package/lib/MobileBlocks.js.map +1 -0
  27. package/lib/common.css +1 -1
  28. package/lib/content-page-repository/ContentPageRepository.js +1 -1
  29. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  30. package/lib/index.d.ts +7 -3
  31. package/lib/index.js +4 -1
  32. package/lib/index.js.map +1 -1
  33. package/lib/{content-page-repository/toMobilePage.d.ts → toMobilePage.d.ts} +1 -1
  34. package/lib/{content-page-repository/toMobilePage.js → toMobilePage.js} +0 -0
  35. package/lib/toMobilePage.js.map +1 -0
  36. package/package.json +1 -1
  37. package/src/ContentPage.fixture.tsx +23 -3
  38. package/src/ContentPage.page.json +43 -1
  39. package/src/ContentPage.tsx +10 -5
  40. package/src/Footer/Footer.mobile.tsx +12 -0
  41. package/src/MobileBlocks.ts +25 -0
  42. package/src/content-page-repository/ContentPageRepository.ts +1 -1
  43. package/src/index.ts +18 -3
  44. package/src/{content-page-repository/toMobilePage.ts → toMobilePage.ts} +1 -1
  45. package/dist/content-page-repository/toMobilePage.js.map +0 -1
  46. package/lib/content-page-repository/toMobilePage.js.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { PropsWithChildren } from '@redneckz/uni-jsx';
2
+ import type { BlockContent } from './Blocks';
1
3
  import type { BlockDef, ContentPageDef, UniBlockProps } from './types';
2
4
  interface BlockDecoratorProps<VNode> {
3
5
  blockClassName: string;
@@ -9,8 +11,9 @@ interface BlockDecoratorProps<VNode> {
9
11
  }
10
12
  export declare type BlockDecorator<VNode = any> = (props: BlockDecoratorProps<VNode>, index?: number | string) => any;
11
13
  export interface ContentPageProps extends UniBlockProps {
14
+ blocksRegistry: Record<string, (props: PropsWithChildren<UniBlockProps & BlockContent, any>, context?: any) => any>;
12
15
  data: ContentPageDef;
13
16
  blockDecorator?: BlockDecorator;
14
17
  }
15
- export declare const ContentPage: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageProps, any>, context?: any) => any;
18
+ export declare const ContentPage: (props: PropsWithChildren<ContentPageProps, any>, context?: any) => any;
16
19
  export {};
@@ -2,18 +2,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.ContentPage = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const Blocks_1 = require("./Blocks"); // TODO Lazy load
6
5
  const LikeControl_1 = require("./LikeControl");
7
6
  const Placeholder_1 = require("./Placeholder");
8
7
  const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
9
- exports.ContentPage = (0, uni_jsx_1.JSX)(({ className, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, context, blockDecorator = defaultBlockDecorator, }) => {
8
+ exports.ContentPage = (0, uni_jsx_1.JSX)(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
10
9
  return ((0, jsx_runtime_1.jsxs)("section", { className: "relative", "data-theme": colorPalette, children: [(0, jsx_runtime_1.jsx)("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && ((0, jsx_runtime_1.jsx)("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: (0, jsx_runtime_1.jsx)(LikeControl_1.LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
11
10
  function renderBlock(block, i) {
12
11
  const { type } = block;
13
- if (!(type in Blocks_1.Blocks)) {
12
+ if (!(type in blocksRegistry)) {
14
13
  console.warn(`No block with "${type}" is registered`);
15
14
  }
16
- const BlockComponent = Blocks_1.Blocks[type] || Placeholder_1.Placeholder;
15
+ const BlockComponent = blocksRegistry[type] || Placeholder_1.Placeholder;
17
16
  return blockDecorator({
18
17
  blockClassName: style2className(block.style),
19
18
  block,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../src/ContentPage.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qCAAkC,CAAC,iBAAiB;AACpD,+CAA4C;AAC5C,+CAA4C;AAmB5C,MAAM,qBAAqB,GAAmB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAClF,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AAEvB,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EACC,SAAS,EACT,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C,KAAe,EAAE,CAAS;QAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,EAAE;YAC7B,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,CAAC;SACvD;QAED,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC;QAC3D,OAAO,cAAc,CACnB;YACE,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;YAC5C,KAAK;YACL,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;gBACjD,OAAO,CACL,uBAAC,cAAc,IAEb,SAAS,EAAE,KAAK,CAAC,cAAc,EAC/B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,KACZ,OAAO,YAEV,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,IAN3C,GAAG,IAAI,IAAI,CAAC,EAAE,CAOJ,CAClB,CAAC;YACJ,CAAC;SACF,EACD,SAAS,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,KAAkC;IACzD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { UniBlockProps } from '../types';
2
+ import type { FooterContent } from './Footer';
3
+ export interface FooterProps extends FooterContent, UniBlockProps {
4
+ }
5
+ export declare const Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<FooterProps, any>, context?: any) => any;
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.Footer = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const TextInformation_1 = require("./TextInformation");
6
+ exports.Footer = (0, uni_jsx_1.JSX)(({ className, context }) => ((0, jsx_runtime_1.jsx)("footer", { className: `${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`, children: (0, jsx_runtime_1.jsx)(TextInformation_1.TextInformation, { context: context }) })));
7
+ //# sourceMappingURL=Footer.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.mobile.js","sourceRoot":"","sources":["../../src/Footer/Footer.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,uDAAoD;AAIvC,QAAA,MAAM,GAAG,IAAA,aAAG,EAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACjE,mCAAQ,SAAS,EAAE,GAAG,SAAS,mDAAmD,YAChF,uBAAC,iCAAe,IAAC,OAAO,EAAE,OAAO,GAAI,GAC9B,CACV,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const MobileBlocks: {
2
+ Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Header/Header").HeaderProps, any>, context?: any) => any;
3
+ Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Footer/Footer.mobile").FooterProps, any>, context?: any) => any;
4
+ Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder").PlaceholderProps, any>, context?: any) => any;
5
+ Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile").TileProps, any>, context?: any) => any;
6
+ ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductTile").ProductTileProps, any>, context?: any) => any;
7
+ ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductBlock").ProductBlockProps, any>, context?: any) => any;
8
+ StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./StepsBlock").StepsBlockProps, any>, context?: any) => any;
9
+ BenefitsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./BenefitsBlock").BenefitsBlockProps, any>, context?: any) => any;
10
+ ProductGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductGallery").ProductGalleryProps, any>, context?: any) => any;
11
+ ExchangeRateTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ExchangeRateTile").ExchangeRateTileProps, any>, context?: any) => any;
12
+ MobileAppTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./MobileAppTile").MobileAppTileProps, any>, context?: any) => any;
13
+ };
@@ -0,0 +1,27 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.MobileBlocks = void 0;
3
+ const BenefitsBlock_1 = require("./BenefitsBlock");
4
+ const ExchangeRateTile_1 = require("./ExchangeRateTile");
5
+ const Footer_mobile_1 = require("./Footer/Footer.mobile");
6
+ const index_1 = require("./Header/index");
7
+ const MobileAppTile_1 = require("./MobileAppTile");
8
+ const Placeholder_1 = require("./Placeholder");
9
+ const ProductBlock_1 = require("./ProductBlock");
10
+ const ProductGallery_1 = require("./ProductGallery");
11
+ const ProductTile_1 = require("./ProductTile");
12
+ const StepsBlock_1 = require("./StepsBlock");
13
+ const Tile_1 = require("./Tile");
14
+ exports.MobileBlocks = {
15
+ Header: index_1.Header,
16
+ Footer: Footer_mobile_1.Footer,
17
+ Placeholder: Placeholder_1.Placeholder,
18
+ Tile: Tile_1.Tile,
19
+ ProductTile: ProductTile_1.ProductTile,
20
+ ProductBlock: ProductBlock_1.ProductBlock,
21
+ StepsBlock: StepsBlock_1.StepsBlock,
22
+ BenefitsBlock: BenefitsBlock_1.BenefitsBlock,
23
+ ProductGallery: ProductGallery_1.ProductGallery,
24
+ ExchangeRateTile: ExchangeRateTile_1.ExchangeRateTile,
25
+ MobileAppTile: MobileAppTile_1.MobileAppTile,
26
+ };
27
+ //# sourceMappingURL=MobileBlocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileBlocks.js","sourceRoot":"","sources":["../src/MobileBlocks.ts"],"names":[],"mappings":";;AAAA,mDAAgD;AAChD,yDAAsD;AACtD,0DAAgD;AAChD,0CAAwC;AACxC,mDAAgD;AAChD,+CAA4C;AAC5C,iDAA8C;AAC9C,qDAAkD;AAClD,+CAA4C;AAC5C,6CAA0C;AAC1C,iCAA8B;AAEjB,QAAA,YAAY,GAAG;IAC1B,MAAM,EAAN,cAAM;IACN,MAAM,EAAN,sBAAM;IACN,WAAW,EAAX,yBAAW;IACX,IAAI,EAAJ,WAAI;IACJ,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,UAAU,EAAV,uBAAU;IACV,aAAa,EAAb,6BAAa;IACb,cAAc,EAAd,+BAAc;IACd,gBAAgB,EAAhB,mCAAgB;IAChB,aAAa,EAAb,6BAAa;CACd,CAAC"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ContentPageRepository = void 0;
6
6
  const glob_1 = __importDefault(require("glob"));
7
7
  const util_1 = __importDefault(require("util"));
8
- const toMobilePage_1 = require("./toMobilePage");
8
+ const toMobilePage_1 = require("../toMobilePage");
9
9
  const transformContentPage_1 = require("./transformContentPage");
10
10
  const find = util_1.default.promisify(glob_1.default);
11
11
  function ContentPageRepository({ contentDir = 'content', publicDir = 'public', } = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,gDAAwB;AAExB,iDAA8C;AAE9C,iEAA8D;AAE9D,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,CAAC;AAElC,SAAgB,qBAAqB,CAAC,EACpC,UAAU,GAAG,SAAS,EACtB,SAAS,GAAG,QAAQ,MACc,EAAE;IACpC,KAAK,UAAU,kBAAkB;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,UAAU,iBAAiB,CAAC,CAAC;QAC7D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,UAAU,oBAAoB,CAAC,IAAY;QAC9C,MAAM,KAAK,GAAG,MAAM,kBAAkB,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,UAAU,mBAAmB,CAAC,IAAY;QAC7C,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,IAAI,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAmC,EAAE,CAAC;IACjD,KAAK,UAAU,QAAQ,CAAC,QAAgB;QACtC,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE;YACxB,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,IAAA,2CAAoB,EAAC,QAAQ,EAAE;gBACrD,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO;QACL,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAnCD,sDAmCC"}
1
+ {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,gDAAwB;AACxB,kDAA+C;AAG/C,iEAA8D;AAE9D,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,cAAI,CAAC,CAAC;AAElC,SAAgB,qBAAqB,CAAC,EACpC,UAAU,GAAG,SAAS,EACtB,SAAS,GAAG,QAAQ,MACc,EAAE;IACpC,KAAK,UAAU,kBAAkB;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,UAAU,iBAAiB,CAAC,CAAC;QAC7D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,UAAU,oBAAoB,CAAC,IAAY;QAC9C,MAAM,KAAK,GAAG,MAAM,kBAAkB,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,UAAU,mBAAmB,CAAC,IAAY;QAC7C,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,IAAI,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAmC,EAAE,CAAC;IACjD,KAAK,UAAU,QAAQ,CAAC,QAAgB;QACtC,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE;YACxB,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,IAAA,2CAAoB,EAAC,QAAQ,EAAE;gBACrD,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO;QACL,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAnCD,sDAmCC"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  export type { ProjectSettings } from './ProjectSettings';
2
2
  export { projectSettings } from './ProjectSettings';
3
- export type { BlockDef, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture } from './types';
4
- export type { ContentPageContext, Router, LikeService, Search, HandlerDecorator, } from './ContentPageContext';
3
+ export { LikeAPI } from './api/LikeAPI';
4
+ export { DaDataAPI } from './api/DaDataAPI';
5
+ export type { BlockDef, UniBlockProps, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture, } from './types';
6
+ export type { ContentPageContext, Router, AsyncDataHook, GeolocationHook, LikeService, HandlerDecorator, Search, } from './ContentPageContext';
5
7
  export { ContentPageHead } from './ContentPageHead';
6
8
  export { ContentPage } from './ContentPage';
9
+ export { toMobilePage } from './toMobilePage';
7
10
  export { Blocks } from './Blocks';
8
- export { LikeAPI } from './api/LikeAPI';
11
+ export type { BlockContent } from './Blocks';
12
+ export { MobileBlocks } from './MobileBlocks';
9
13
  export * as url from './utils/url';
10
14
  export { joinList } from './utils/joinList';
package/dist/index.js CHANGED
@@ -22,17 +22,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  return result;
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.joinList = exports.url = exports.LikeAPI = exports.Blocks = exports.ContentPage = exports.ContentPageHead = exports.projectSettings = void 0;
25
+ exports.joinList = exports.url = exports.MobileBlocks = exports.Blocks = exports.toMobilePage = exports.ContentPage = exports.ContentPageHead = exports.DaDataAPI = exports.LikeAPI = exports.projectSettings = void 0;
26
26
  var ProjectSettings_1 = require("./ProjectSettings");
27
27
  Object.defineProperty(exports, "projectSettings", { enumerable: true, get: function () { return ProjectSettings_1.projectSettings; } });
28
+ var LikeAPI_1 = require("./api/LikeAPI");
29
+ Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
30
+ var DaDataAPI_1 = require("./api/DaDataAPI");
31
+ Object.defineProperty(exports, "DaDataAPI", { enumerable: true, get: function () { return DaDataAPI_1.DaDataAPI; } });
28
32
  var ContentPageHead_1 = require("./ContentPageHead");
29
33
  Object.defineProperty(exports, "ContentPageHead", { enumerable: true, get: function () { return ContentPageHead_1.ContentPageHead; } });
30
34
  var ContentPage_1 = require("./ContentPage");
31
35
  Object.defineProperty(exports, "ContentPage", { enumerable: true, get: function () { return ContentPage_1.ContentPage; } });
36
+ var toMobilePage_1 = require("./toMobilePage");
37
+ Object.defineProperty(exports, "toMobilePage", { enumerable: true, get: function () { return toMobilePage_1.toMobilePage; } });
32
38
  var Blocks_1 = require("./Blocks");
33
39
  Object.defineProperty(exports, "Blocks", { enumerable: true, get: function () { return Blocks_1.Blocks; } });
34
- var LikeAPI_1 = require("./api/LikeAPI");
35
- Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
40
+ var MobileBlocks_1 = require("./MobileBlocks");
41
+ Object.defineProperty(exports, "MobileBlocks", { enumerable: true, get: function () { return MobileBlocks_1.MobileBlocks; } });
36
42
  exports.url = __importStar(require("./utils/url"));
37
43
  var joinList_1 = require("./utils/joinList");
38
44
  Object.defineProperty(exports, "joinList", { enumerable: true, get: function () { return joinList_1.joinList; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAEpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,mDAAmC;AACnC,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAExB,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAChB,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAqBlB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAEf,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,mDAAmC;AACnC,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA"}
@@ -1,2 +1,2 @@
1
- import type { ContentPageDef } from '../types';
1
+ import type { ContentPageDef } from './types';
2
2
  export declare function toMobilePage(contentPage: ContentPageDef): ContentPageDef;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toMobilePage.js","sourceRoot":"","sources":["../src/toMobilePage.ts"],"names":[],"mappings":";;AAEA,SAAgB,YAAY,CAAC,WAA2B;IACtD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9F,OAAO;QACL,GAAG,WAAW;QACd,MAAM;KACP,CAAC;AACJ,CAAC;AAND,oCAMC;AAED,SAAS,aAAa,CAAC,KAAe;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,EAAE;QACV,OAAO;YACL,GAAG,KAAK;YACR,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;SACzD,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { PropsWithChildren } from '@redneckz/uni-jsx';
2
+ import type { BlockContent } from './Blocks';
1
3
  import type { BlockDef, ContentPageDef, UniBlockProps } from './types';
2
4
  interface BlockDecoratorProps<VNode> {
3
5
  blockClassName: string;
@@ -9,8 +11,9 @@ interface BlockDecoratorProps<VNode> {
9
11
  }
10
12
  export declare type BlockDecorator<VNode = any> = (props: BlockDecoratorProps<VNode>, index?: number | string) => any;
11
13
  export interface ContentPageProps extends UniBlockProps {
14
+ blocksRegistry: Record<string, (props: PropsWithChildren<UniBlockProps & BlockContent, any>, context?: any) => any>;
12
15
  data: ContentPageDef;
13
16
  blockDecorator?: BlockDecorator;
14
17
  }
15
- export declare const ContentPage: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageProps, any>, context?: any) => any;
18
+ export declare const ContentPage: (props: PropsWithChildren<ContentPageProps, any>, context?: any) => any;
16
19
  export {};
@@ -1,17 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { Blocks } from './Blocks.js'; // TODO Lazy load
4
3
  import { LikeControl } from './LikeControl.js';
5
4
  import { Placeholder } from './Placeholder.js';
6
5
  const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
7
- export const ContentPage = JSX(({ className, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, context, blockDecorator = defaultBlockDecorator, }) => {
6
+ export const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
8
7
  return (_jsxs("section", { className: "relative", "data-theme": colorPalette, children: [_jsx("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (_jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: _jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
9
8
  function renderBlock(block, i) {
10
9
  const { type } = block;
11
- if (!(type in Blocks)) {
10
+ if (!(type in blocksRegistry)) {
12
11
  console.warn(`No block with "${type}" is registered`);
13
12
  }
14
- const BlockComponent = Blocks[type] || Placeholder;
13
+ const BlockComponent = blocksRegistry[type] || Placeholder;
15
14
  return blockDecorator({
16
15
  blockClassName: style2className(block.style),
17
16
  block,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../src/ContentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC,CAAC,iBAAiB;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAmB5C,MAAM,qBAAqB,GAAmB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAClF,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EACC,SAAS,EACT,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,GAAG,IAAI,EAAE,EACpE,OAAO,EACP,cAAc,GAAG,qBAAqB,GACvC,EAAE,EAAE;IACH,OAAO,CACL,mBAAS,SAAS,EAAC,UAAU,gBAAa,YAAY,aACpD,cAAK,SAAS,EAAE,2BAA2B,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,EAAE,YACjF,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,GAC5C,EACL,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,qEAAqE,YAClF,KAAC,WAAW,IACV,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAO,GAChB,GACE,CACP,IACO,CACX,CAAC;IAEF,SAAS,WAAW,CAAC,KAAe,EAAE,CAAS;QAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,IA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AC,cAAc,EAC/B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,KACZ,OAAO,YAEV,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,IAN3C,GAAG,IAAI,IAAI,CAAC,EAAE,CAOJ,CAClB,CAAC;YACJ,CAAC;SACF,EACD,SAAS,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,KAAkC;IACzD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { UniBlockProps } from '../types';
2
+ import type { FooterContent } from './Footer';
3
+ export interface FooterProps extends FooterContent, UniBlockProps {
4
+ }
5
+ export declare const Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<FooterProps, any>, context?: any) => any;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { TextInformation } from './TextInformation.js';
4
+ export const Footer = JSX(({ className, context }) => (_jsx("footer", { className: `${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`, children: _jsx(TextInformation, { context: context }) })));
5
+ //# sourceMappingURL=Footer.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.mobile.js","sourceRoot":"","sources":["../../src/Footer/Footer.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACjE,iBAAQ,SAAS,EAAE,GAAG,SAAS,mDAAmD,YAChF,KAAC,eAAe,IAAC,OAAO,EAAE,OAAO,GAAI,GAC9B,CACV,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const MobileBlocks: {
2
+ Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Header/Header").HeaderProps, any>, context?: any) => any;
3
+ Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Footer/Footer.mobile").FooterProps, any>, context?: any) => any;
4
+ Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder").PlaceholderProps, any>, context?: any) => any;
5
+ Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile").TileProps, any>, context?: any) => any;
6
+ ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductTile").ProductTileProps, any>, context?: any) => any;
7
+ ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductBlock").ProductBlockProps, any>, context?: any) => any;
8
+ StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./StepsBlock").StepsBlockProps, any>, context?: any) => any;
9
+ BenefitsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./BenefitsBlock").BenefitsBlockProps, any>, context?: any) => any;
10
+ ProductGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductGallery").ProductGalleryProps, any>, context?: any) => any;
11
+ ExchangeRateTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ExchangeRateTile").ExchangeRateTileProps, any>, context?: any) => any;
12
+ MobileAppTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./MobileAppTile").MobileAppTileProps, any>, context?: any) => any;
13
+ };
@@ -0,0 +1,25 @@
1
+ import { BenefitsBlock } from './BenefitsBlock.js';
2
+ import { ExchangeRateTile } from './ExchangeRateTile.js';
3
+ import { Footer } from './Footer/Footer.mobile.js';
4
+ import { Header } from './Header/index.js';
5
+ import { MobileAppTile } from './MobileAppTile.js';
6
+ import { Placeholder } from './Placeholder.js';
7
+ import { ProductBlock } from './ProductBlock.js';
8
+ import { ProductGallery } from './ProductGallery.js';
9
+ import { ProductTile } from './ProductTile.js';
10
+ import { StepsBlock } from './StepsBlock.js';
11
+ import { Tile } from './Tile.js';
12
+ export const MobileBlocks = {
13
+ Header,
14
+ Footer,
15
+ Placeholder,
16
+ Tile,
17
+ ProductTile,
18
+ ProductBlock,
19
+ StepsBlock,
20
+ BenefitsBlock,
21
+ ProductGallery,
22
+ ExchangeRateTile,
23
+ MobileAppTile,
24
+ };
25
+ //# sourceMappingURL=MobileBlocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileBlocks.js","sourceRoot":"","sources":["../src/MobileBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,MAAM;IACN,WAAW;IACX,IAAI;IACJ,WAAW;IACX,YAAY;IACZ,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,aAAa;CACd,CAAC"}
package/lib/common.css CHANGED
@@ -1 +1 @@
1
- @import "../fonts/ubuntu/ubuntu.css";[data-theme=pc]{--color-primary-main:#42ab44;--color-primary-hover:#248341;--color-primary-active:#245f34;--color-secondary-hover:#c5e2c6;--color-secondary-active:#d8f2d9}[data-theme=bc]{--color-primary-main:#83b83e;--color-primary-hover:#5c921d;--color-primary-active:#3c5e10;--color-secondary-hover:#e8f4d9;--color-secondary-active:#d8e3ca}[data-theme=eo]{--color-primary-main:#ddb63d;--color-primary-hover:#bb9727;--color-primary-active:#7e630c;--color-secondary-hover:#f1ecdd;--color-secondary-active:#e5dec7}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.top-4{top:1rem}.right-4{right:1rem}.bottom-0{bottom:0}.right-0{right:0}.left-0{left:0}.-bottom-2{bottom:-.5rem}.top-0{top:0}.z-10{z-index:10}.col-span-12{grid-column:span 12/span 12}.col-span-8{grid-column:span 8/span 8}.col-span-4{grid-column:span 4/span 4}.col-span-6{grid-column:span 6/span 6}.m-0{margin:0}.-mx-20{margin-left:-5rem;margin-right:-5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mb-4{margin-bottom:1rem}.mt-4{margin-top:1rem}.mb-6{margin-bottom:1.5rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-2\.5{margin-top:.625rem}.mt-2{margin-top:.5rem}.mt-9{margin-top:2.25rem}.mb-5{margin-bottom:1.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mb-12{margin-bottom:3rem}.mt-5{margin-top:1.25rem}.mb-10{margin-bottom:2.5rem}.mr-8{margin-right:2rem}.mb-2\.5{margin-bottom:.625rem}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mr-5{margin-right:1.25rem}.mr-7{margin-right:1.75rem}.ml-2\.5{margin-left:.625rem}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.h-\[70px\]{height:70px}.h-8{height:2rem}.h-\[90px\]{height:90px}.h-4{height:1rem}.h-\[50px\]{height:50px}.h-\[3px\]{height:3px}.h-0\.5{height:.125rem}.h-0{height:0}.h-\[100px\]{height:100px}.h-\[1px\]{height:1px}.h-\[8px\]{height:8px}.h-\[2px\]{height:2px}.h-\[24px\]{height:24px}.min-h-\[70px\]{min-height:70px}.min-h-\[90px\]{min-height:90px}.min-h-\[50px\]{min-height:50px}.min-h-\[100px\]{min-height:100px}.min-h-\[32px\]{min-height:32px}.min-h-\[8px\]{min-height:8px}.w-\[70px\]{width:70px}.w-full{width:100%}.w-8{width:2rem}.w-\[125px\]{width:125px}.w-\[90px\]{width:90px}.w-\[50px\]{width:50px}.w-\[100px\]{width:100px}.w-\[276px\]{width:276px}.w-\[280px\]{width:280px}.w-\[235px\]{width:235px}.w-\[24px\]{width:24px}.w-\[8px\]{width:8px}.w-\[36px\]{width:36px}.w-10{width:2.5rem}.min-w-\[70px\]{min-width:70px}.min-w-\[90px\]{min-width:90px}.min-w-\[600px\]{min-width:600px}.min-w-\[50px\]{min-width:50px}.min-w-\[100px\]{min-width:100px}.min-w-\[32px\]{min-width:32px}.min-w-\[8px\]{min-width:8px}.max-w-\[600px\]{max-width:600px}.max-w-\[47rem\]{max-width:47rem}.max-w-\[580px\]{max-width:580px}.max-w-min{max-width:-webkit-min-content;max-width:-moz-min-content;max-width:min-content}.max-w-\[292px\]{max-width:292px}.max-w-\[170px\]{max-width:170px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.basis-0{flex-basis:0px}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes progress{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes progress{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.animate-slide{-webkit-animation:progress linear;animation:progress linear}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-1{gap:.25rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-32{gap:8rem}.gap-11{gap:2.75rem}.gap-\[14px\]{gap:14px}.gap-2{gap:.5rem}.gap-3\.5{gap:.875rem}.gap-x-24{-moz-column-gap:6rem;column-gap:6rem}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-bl-3xl{border-bottom-left-radius:1.5rem}.rounded-br-3xl{border-bottom-right-radius:1.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-0{border-width:0}.border-x-0{border-left-width:0;border-right-width:0}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-main{--tw-border-opacity:1;border-color:rgb(240 244 240/var(--tw-border-opacity))}.border-main-divider{--tw-border-opacity:1;border-color:rgb(235 237 240/var(--tw-border-opacity))}.border-primary-main{border-color:var(--color-primary-main)}.border-transparent{border-color:transparent}.border-y-main-divider{--tw-border-opacity:1;border-bottom-color:rgb(235 237 240/var(--tw-border-opacity));border-top-color:rgb(235 237 240/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-main{--tw-bg-opacity:1;background-color:rgb(240 244 240/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-secondary-light{--tw-bg-opacity:1;background-color:rgb(245 247 249/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-primary-main{background-color:var(--color-primary-main)}.bg-main-divider{--tw-bg-opacity:1;background-color:rgb(235 237 240/var(--tw-bg-opacity))}.bg-secondary-dark{--tw-bg-opacity:1;background-color:rgb(226 228 229/var(--tw-bg-opacity))}.p-12{padding:3rem}.p-10{padding:2.5rem}.p-20{padding:5rem}.p-2{padding:.5rem}.p-\[10px\]{padding:10px}.p-11{padding:2.75rem}.p-\[26px\]{padding:26px}.p-9{padding:2.25rem}.p-0{padding:0}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.px-0{padding-left:0;padding-right:0}.py-4{padding-bottom:1rem;padding-top:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-12{padding-left:3rem;padding-right:3rem}.py-12{padding-bottom:3rem;padding-top:3rem}.px-\[88px\]{padding-left:88px;padding-right:88px}.px-3{padding-left:.75rem;padding-right:.75rem}.px-9{padding-left:2.25rem;padding-right:2.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-\[5px\]{padding-bottom:5px;padding-top:5px}.px-20{padding-left:5rem;padding-right:5rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-2{padding-bottom:.5rem}.pt-0{padding-top:0}.pl-11{padding-left:2.75rem}.pt-4{padding-top:1rem}.pl-12{padding-left:3rem}.pr-\[7\.5rem\]{padding-right:7.5rem}.pt-1{padding-top:.25rem}.pr-28{padding-right:7rem}.pt-\[3px\]{padding-top:3px}.pt-\[5px\]{padding-top:5px}.pt-5{padding-top:1.25rem}.pb-8{padding-bottom:2rem}.pl-4{padding-left:1rem}.pl-\[170px\]{padding-left:170px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:Ubuntu,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-base{font-size:1rem;line-height:1.5rem}.text-title-xs{font-size:1.5rem;line-height:1.875rem}.text-title-sm{font-size:1.75rem;line-height:2.5rem}.text-title{font-size:2rem;line-height:2.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.375rem}.text-xs{font-size:.75rem;line-height:1.125rem}.text-title-lg{font-size:2.5rem;line-height:3rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.text-primary-text{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}.text-secondary-text{--tw-text-opacity:1;color:rgb(125 126 127/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-secondary-light{--tw-text-opacity:1;color:rgb(245 247 249/var(--tw-text-opacity))}.text-primary-main{color:var(--color-primary-main)}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.shadow-\[0_8px_32px_0px_\#00000014\]{--tw-shadow:0 8px 32px 0px #00000014;--tw-shadow-colored:0 8px 32px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.duration-1000{transition-duration:1s}.rotate-180{transform:rotate(180deg)}.-translate-x-full{transform:translateX(-100%)}.visited\:text-secondary-text:visited{color:#7d7e7f}.hover\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\:bg-secondary-hover:hover{background-color:var(--color-secondary-hover)}.hover\:text-primary-text:hover{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}.hover\:text-primary-main:hover{color:var(--color-primary-main)}.hover\:text-secondary-active:hover{color:var(--color-secondary-active)}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.active\:bg-primary-active:active{background-color:var(--color-primary-active)}.active\:bg-secondary-active:active{background-color:var(--color-secondary-active)}.group:hover .group-hover\:text-primary-text{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}@media (min-width:1280px) and (max-width:1535px){.xl\:w-\[220px\]{width:220px}.xl\:gap-8{gap:2rem}.xl\:gap-5{gap:1.25rem}}
1
+ @import "../fonts/ubuntu/ubuntu.css";[data-theme=pc]{--color-primary-main:#42ab44;--color-primary-hover:#248341;--color-primary-active:#245f34;--color-secondary-hover:#c5e2c6;--color-secondary-active:#d8f2d9}[data-theme=bc]{--color-primary-main:#83b83e;--color-primary-hover:#5c921d;--color-primary-active:#3c5e10;--color-secondary-hover:#e8f4d9;--color-secondary-active:#d8e3ca}[data-theme=eo]{--color-primary-main:#ddb63d;--color-primary-hover:#bb9727;--color-primary-active:#7e630c;--color-secondary-hover:#f1ecdd;--color-secondary-active:#e5dec7}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.top-4{top:1rem}.right-4{right:1rem}.bottom-0{bottom:0}.right-0{right:0}.left-0{left:0}.-bottom-2{bottom:-.5rem}.top-0{top:0}.z-10{z-index:10}.col-span-12{grid-column:span 12/span 12}.col-span-8{grid-column:span 8/span 8}.col-span-4{grid-column:span 4/span 4}.col-span-6{grid-column:span 6/span 6}.m-0{margin:0}.-mx-20{margin-left:-5rem;margin-right:-5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mb-4{margin-bottom:1rem}.mt-4{margin-top:1rem}.mb-6{margin-bottom:1.5rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-2\.5{margin-top:.625rem}.mt-2{margin-top:.5rem}.mt-9{margin-top:2.25rem}.mb-5{margin-bottom:1.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mb-12{margin-bottom:3rem}.mt-5{margin-top:1.25rem}.mb-10{margin-bottom:2.5rem}.mr-8{margin-right:2rem}.mb-2\.5{margin-bottom:.625rem}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mr-5{margin-right:1.25rem}.mr-7{margin-right:1.75rem}.ml-2\.5{margin-left:.625rem}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.h-\[70px\]{height:70px}.h-8{height:2rem}.h-\[90px\]{height:90px}.h-4{height:1rem}.h-\[50px\]{height:50px}.h-\[3px\]{height:3px}.h-0\.5{height:.125rem}.h-0{height:0}.h-\[100px\]{height:100px}.h-\[1px\]{height:1px}.h-\[8px\]{height:8px}.h-\[2px\]{height:2px}.h-\[24px\]{height:24px}.min-h-\[70px\]{min-height:70px}.min-h-\[90px\]{min-height:90px}.min-h-\[50px\]{min-height:50px}.min-h-\[100px\]{min-height:100px}.min-h-\[32px\]{min-height:32px}.min-h-\[8px\]{min-height:8px}.w-\[70px\]{width:70px}.w-full{width:100%}.w-8{width:2rem}.w-\[125px\]{width:125px}.w-\[90px\]{width:90px}.w-\[50px\]{width:50px}.w-\[100px\]{width:100px}.w-\[276px\]{width:276px}.w-\[280px\]{width:280px}.w-\[235px\]{width:235px}.w-\[24px\]{width:24px}.w-\[8px\]{width:8px}.w-\[36px\]{width:36px}.w-10{width:2.5rem}.min-w-\[70px\]{min-width:70px}.min-w-\[90px\]{min-width:90px}.min-w-\[600px\]{min-width:600px}.min-w-\[50px\]{min-width:50px}.min-w-\[100px\]{min-width:100px}.min-w-\[32px\]{min-width:32px}.min-w-\[8px\]{min-width:8px}.max-w-\[600px\]{max-width:600px}.max-w-\[47rem\]{max-width:47rem}.max-w-\[580px\]{max-width:580px}.max-w-min{max-width:-webkit-min-content;max-width:-moz-min-content;max-width:min-content}.max-w-\[292px\]{max-width:292px}.max-w-\[170px\]{max-width:170px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.basis-0{flex-basis:0px}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes progress{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes progress{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.animate-slide{-webkit-animation:progress linear;animation:progress linear}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-1{gap:.25rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-32{gap:8rem}.gap-11{gap:2.75rem}.gap-\[14px\]{gap:14px}.gap-2{gap:.5rem}.gap-3\.5{gap:.875rem}.gap-x-24{-moz-column-gap:6rem;column-gap:6rem}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-tl-lg{border-top-left-radius:.5rem}.rounded-bl-3xl{border-bottom-left-radius:1.5rem}.rounded-br-3xl{border-bottom-right-radius:1.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-0{border-width:0}.border-x-0{border-left-width:0;border-right-width:0}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-main{--tw-border-opacity:1;border-color:rgb(240 244 240/var(--tw-border-opacity))}.border-main-divider{--tw-border-opacity:1;border-color:rgb(235 237 240/var(--tw-border-opacity))}.border-primary-main{border-color:var(--color-primary-main)}.border-transparent{border-color:transparent}.border-y-main-divider{--tw-border-opacity:1;border-bottom-color:rgb(235 237 240/var(--tw-border-opacity));border-top-color:rgb(235 237 240/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-main{--tw-bg-opacity:1;background-color:rgb(240 244 240/var(--tw-bg-opacity))}.bg-secondary-text{--tw-bg-opacity:1;background-color:rgb(125 126 127/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-secondary-light{--tw-bg-opacity:1;background-color:rgb(245 247 249/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-primary-main{background-color:var(--color-primary-main)}.bg-main-divider{--tw-bg-opacity:1;background-color:rgb(235 237 240/var(--tw-bg-opacity))}.bg-secondary-dark{--tw-bg-opacity:1;background-color:rgb(226 228 229/var(--tw-bg-opacity))}.p-12{padding:3rem}.p-10{padding:2.5rem}.p-20{padding:5rem}.p-2{padding:.5rem}.p-\[10px\]{padding:10px}.p-11{padding:2.75rem}.p-\[26px\]{padding:26px}.p-9{padding:2.25rem}.p-0{padding:0}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.px-0{padding-left:0;padding-right:0}.py-4{padding-bottom:1rem;padding-top:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-12{padding-left:3rem;padding-right:3rem}.py-12{padding-bottom:3rem;padding-top:3rem}.px-\[88px\]{padding-left:88px;padding-right:88px}.px-3{padding-left:.75rem;padding-right:.75rem}.px-9{padding-left:2.25rem;padding-right:2.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-\[5px\]{padding-bottom:5px;padding-top:5px}.px-20{padding-left:5rem;padding-right:5rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-2{padding-bottom:.5rem}.pt-0{padding-top:0}.pl-11{padding-left:2.75rem}.pt-4{padding-top:1rem}.pl-12{padding-left:3rem}.pr-\[7\.5rem\]{padding-right:7.5rem}.pt-1{padding-top:.25rem}.pr-28{padding-right:7rem}.pt-\[3px\]{padding-top:3px}.pt-\[5px\]{padding-top:5px}.pt-5{padding-top:1.25rem}.pb-8{padding-bottom:2rem}.pl-4{padding-left:1rem}.pl-\[170px\]{padding-left:170px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:Ubuntu,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-base{font-size:1rem;line-height:1.5rem}.text-title-xs{font-size:1.5rem;line-height:1.875rem}.text-title-sm{font-size:1.75rem;line-height:2.5rem}.text-title{font-size:2rem;line-height:2.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.375rem}.text-xs{font-size:.75rem;line-height:1.125rem}.text-title-lg{font-size:2.5rem;line-height:3rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.text-primary-text{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}.text-secondary-text{--tw-text-opacity:1;color:rgb(125 126 127/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-secondary-light{--tw-text-opacity:1;color:rgb(245 247 249/var(--tw-text-opacity))}.text-primary-main{color:var(--color-primary-main)}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.shadow-\[0_8px_32px_0px_\#00000014\]{--tw-shadow:0 8px 32px 0px #00000014;--tw-shadow-colored:0 8px 32px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.duration-1000{transition-duration:1s}.rotate-180{transform:rotate(180deg)}.-translate-x-full{transform:translateX(-100%)}.visited\:text-secondary-text:visited{color:#7d7e7f}.hover\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\:bg-secondary-hover:hover{background-color:var(--color-secondary-hover)}.hover\:text-primary-text:hover{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}.hover\:text-primary-main:hover{color:var(--color-primary-main)}.hover\:text-secondary-active:hover{color:var(--color-secondary-active)}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.active\:bg-primary-active:active{background-color:var(--color-primary-active)}.active\:bg-secondary-active:active{background-color:var(--color-secondary-active)}.group:hover .group-hover\:text-primary-text{--tw-text-opacity:1;color:rgb(28 28 28/var(--tw-text-opacity))}@media (min-width:1280px) and (max-width:1535px){.xl\:w-\[220px\]{width:220px}.xl\:gap-8{gap:2rem}.xl\:gap-5{gap:1.25rem}}
@@ -1,6 +1,6 @@
1
1
  import glob from 'glob';
2
2
  import util from 'util';
3
- import { toMobilePage } from './toMobilePage.js';
3
+ import { toMobilePage } from '../toMobilePage.js';
4
4
  import { transformContentPage } from './transformContentPage.js';
5
5
  const find = util.promisify(glob);
6
6
  export function ContentPageRepository({ contentDir = 'content', publicDir = 'public', } = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,UAAU,qBAAqB,CAAC,EACpC,UAAU,GAAG,SAAS,EACtB,SAAS,GAAG,QAAQ,MACc,EAAE;IACpC,KAAK,UAAU,kBAAkB;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,UAAU,iBAAiB,CAAC,CAAC;QAC7D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,UAAU,oBAAoB,CAAC,IAAY;QAC9C,MAAM,KAAK,GAAG,MAAM,kBAAkB,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,UAAU,mBAAmB,CAAC,IAAY;QAC7C,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAmC,EAAE,CAAC;IACjD,KAAK,UAAU,QAAQ,CAAC,QAAgB;QACtC,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE;YACxB,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,oBAAoB,CAAC,QAAQ,EAAE;gBACrD,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO;QACL,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,UAAU,qBAAqB,CAAC,EACpC,UAAU,GAAG,SAAS,EACtB,SAAS,GAAG,QAAQ,MACc,EAAE;IACpC,KAAK,UAAU,kBAAkB;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,UAAU,iBAAiB,CAAC,CAAC;QAC7D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,UAAU,oBAAoB,CAAC,IAAY;QAC9C,MAAM,KAAK,GAAG,MAAM,kBAAkB,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,UAAU,mBAAmB,CAAC,IAAY;QAC7C,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,GAAmC,EAAE,CAAC;IACjD,KAAK,UAAU,QAAQ,CAAC,QAAgB;QACtC,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE;YACxB,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,oBAAoB,CAAC,QAAQ,EAAE;gBACrD,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED,OAAO;QACL,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  export type { ProjectSettings } from './ProjectSettings';
2
2
  export { projectSettings } from './ProjectSettings';
3
- export type { BlockDef, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture } from './types';
4
- export type { ContentPageContext, Router, LikeService, Search, HandlerDecorator, } from './ContentPageContext';
3
+ export { LikeAPI } from './api/LikeAPI';
4
+ export { DaDataAPI } from './api/DaDataAPI';
5
+ export type { BlockDef, UniBlockProps, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture, } from './types';
6
+ export type { ContentPageContext, Router, AsyncDataHook, GeolocationHook, LikeService, HandlerDecorator, Search, } from './ContentPageContext';
5
7
  export { ContentPageHead } from './ContentPageHead';
6
8
  export { ContentPage } from './ContentPage';
9
+ export { toMobilePage } from './toMobilePage';
7
10
  export { Blocks } from './Blocks';
8
- export { LikeAPI } from './api/LikeAPI';
11
+ export type { BlockContent } from './Blocks';
12
+ export { MobileBlocks } from './MobileBlocks';
9
13
  export * as url from './utils/url';
10
14
  export { joinList } from './utils/joinList';
package/lib/index.js CHANGED
@@ -1,8 +1,11 @@
1
1
  export { projectSettings } from './ProjectSettings.js';
2
+ export { LikeAPI } from './api/LikeAPI.js';
3
+ export { DaDataAPI } from './api/DaDataAPI.js';
2
4
  export { ContentPageHead } from './ContentPageHead.js';
3
5
  export { ContentPage } from './ContentPage.js';
6
+ export { toMobilePage } from './toMobilePage.js';
4
7
  export { Blocks } from './Blocks.js';
5
- export { LikeAPI } from './api/LikeAPI.js';
8
+ export { MobileBlocks } from './MobileBlocks.js';
6
9
  export * as url from './utils/url.js';
7
10
  export { joinList } from './utils/joinList.js';
8
11
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAqB5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- import type { ContentPageDef } from '../types';
1
+ import type { ContentPageDef } from './types';
2
2
  export declare function toMobilePage(contentPage: ContentPageDef): ContentPageDef;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toMobilePage.js","sourceRoot":"","sources":["../src/toMobilePage.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAC,WAA2B;IACtD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9F,OAAO;QACL,GAAG,WAAW;QACd,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAAe;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,EAAE;QACV,OAAO;YACL,GAAG,KAAK;YACR,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;SACzD,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.2.55",
3
+ "version": "0.2.58",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,12 @@
1
1
  import { context } from './setup-fixture';
2
2
 
3
+ import { Blocks } from './Blocks';
4
+ import { toMobilePage } from './content-page-repository/toMobilePage';
3
5
  import { BlockDecorator, ContentPage } from './ContentPage';
6
+ import { MobileBlocks } from './MobileBlocks';
7
+ import type { ContentPageDef } from './types';
8
+
9
+ const data = require('./ContentPage.page.json');
4
10
 
5
11
  const blockDecorator: BlockDecorator = ({ blockClassName, block, render }, i) => (
6
12
  <div
@@ -23,14 +29,28 @@ const blockDecorator: BlockDecorator = ({ blockClassName, block, render }, i) =>
23
29
 
24
30
  export default {
25
31
  default: (
26
- <ContentPage context={context} className="bg-main" data={require('./ContentPage.page.json')} />
32
+ <ContentPage
33
+ className="bg-main"
34
+ context={context}
35
+ blocksRegistry={Blocks}
36
+ data={data as ContentPageDef}
37
+ />
38
+ ),
39
+ mobile: (
40
+ <ContentPage
41
+ className="bg-secondary-text"
42
+ context={context}
43
+ blocksRegistry={MobileBlocks}
44
+ data={toMobilePage(data as ContentPageDef)}
45
+ />
27
46
  ),
28
47
  editor: (
29
48
  <div style={{ background: "url('grid.svg')", height: '100%' }}>
30
49
  <ContentPage
31
- context={context}
32
50
  className="bg-transparent"
33
- data={require('./ContentPage.page.json')}
51
+ context={context}
52
+ blocksRegistry={Blocks}
53
+ data={data as ContentPageDef}
34
54
  blockDecorator={blockDecorator}
35
55
  />
36
56
  </div>
@@ -192,6 +192,9 @@
192
192
  "height": 220
193
193
  }
194
194
  }
195
+ },
196
+ "mobile": {
197
+ "style": ["col-span-12"]
195
198
  }
196
199
  },
197
200
  {
@@ -209,6 +212,9 @@
209
212
  }
210
213
  ],
211
214
  "promo": true
215
+ },
216
+ "mobile": {
217
+ "style": ["col-span-12"]
212
218
  }
213
219
  },
214
220
  {
@@ -233,6 +239,9 @@
233
239
  "height": 220
234
240
  }
235
241
  }
242
+ },
243
+ "mobile": {
244
+ "style": ["col-span-12"]
236
245
  }
237
246
  },
238
247
  {
@@ -257,6 +266,9 @@
257
266
  "height": 220
258
267
  }
259
268
  }
269
+ },
270
+ "mobile": {
271
+ "style": ["col-span-12"]
260
272
  }
261
273
  },
262
274
  {
@@ -301,6 +313,9 @@
301
313
  "version": "secondary"
302
314
  }
303
315
  ]
316
+ },
317
+ "mobile": {
318
+ "style": ["col-span-12"]
304
319
  }
305
320
  },
306
321
  {
@@ -316,6 +331,9 @@
316
331
  "version": "secondary"
317
332
  }
318
333
  ]
334
+ },
335
+ "mobile": {
336
+ "style": ["col-span-12"]
319
337
  }
320
338
  },
321
339
  {
@@ -335,6 +353,9 @@
335
353
  "version": "secondary"
336
354
  }
337
355
  ]
356
+ },
357
+ "mobile": {
358
+ "style": ["col-span-12"]
338
359
  }
339
360
  },
340
361
  {
@@ -351,11 +372,17 @@
351
372
  "version": "secondary"
352
373
  }
353
374
  ]
375
+ },
376
+ "mobile": {
377
+ "hidden": true
354
378
  }
355
379
  },
356
380
  {
357
381
  "type": "ExchangeRateTile",
358
- "style": ["col-span-4"]
382
+ "style": ["col-span-4"],
383
+ "mobile": {
384
+ "style": ["col-span-12"]
385
+ }
359
386
  },
360
387
  {
361
388
  "type": "MobileAppTile",
@@ -365,6 +392,9 @@
365
392
  "href": "https://rshbnaturaldbo.onelink.me/qhkF/f182074f?af_qr=true",
366
393
  "src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAC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0QdryNj8ZbfWj/dj0a/3VP2VZwFKgVMmrppG8rpFSIKoSteHY8hUv+aD5daWj/5N/at1dIG9DbiQk/QEuC03o2fvtQRUCRv7Qj0Pqpf6tfgbwoZhNECaMKQ+sVSIk0CS7dvQ23/u34Vsj1ZR/Kl+045O/xO6QNiAAhQQqke2GaKjR1gDS/24GcDpAEIQBTuz0gtJ7Vh/yR3cZP8dn1yF+BlB8/swmdThj5I7uNnwCy65G/AlkgFwboCjQNNAE6/pRNC6Z2euqcttuETFcQ8kd2Gz/lx65H/sYrpF2w46vAnQJxhay8VWBSgQI5qWZ9xQoUyFjCOphUoEBOqllfsQIFMpawDiYVKJCTatZXrECBjCWsg0kFCuSkmvUVK1AgYwnrYFKBAjmpZn3FChTIWMI6mFSgQE6qWV+xAgUylrAOJhUokJNq1lesQIGMJayDSQX+AzMMbwXyi0XeAAAAAElFTkSuQmCC"
367
394
  }
395
+ },
396
+ "mobile": {
397
+ "style": ["col-span-12"]
368
398
  }
369
399
  },
370
400
  {
@@ -471,6 +501,9 @@
471
501
  "height": 220
472
502
  }
473
503
  }
504
+ },
505
+ "mobile": {
506
+ "style": ["col-span-12"]
474
507
  }
475
508
  },
476
509
  {
@@ -510,6 +543,9 @@
510
543
  "height": 220
511
544
  }
512
545
  }
546
+ },
547
+ "mobile": {
548
+ "style": ["col-span-12"]
513
549
  }
514
550
  },
515
551
  {
@@ -549,6 +585,9 @@
549
585
  "height": 220
550
586
  }
551
587
  }
588
+ },
589
+ "mobile": {
590
+ "style": ["col-span-12"]
552
591
  }
553
592
  },
554
593
  {
@@ -580,6 +619,9 @@
580
619
  "version": "secondary"
581
620
  }
582
621
  ]
622
+ },
623
+ "mobile": {
624
+ "style": ["col-span-12"]
583
625
  }
584
626
  },
585
627
  {
@@ -1,5 +1,5 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { Blocks } from './Blocks'; // TODO Lazy load
1
+ import { JSX, PropsWithChildren } from '@redneckz/uni-jsx';
2
+ import type { BlockContent } from './Blocks';
3
3
  import { LikeControl } from './LikeControl';
4
4
  import { Placeholder } from './Placeholder';
5
5
  import type { BlockDef, ContentPageDef, UniBlockProps } from './types';
@@ -16,6 +16,10 @@ export type BlockDecorator<VNode = any> = (
16
16
  ) => any;
17
17
 
18
18
  export interface ContentPageProps extends UniBlockProps {
19
+ blocksRegistry: Record<
20
+ string,
21
+ (props: PropsWithChildren<UniBlockProps & BlockContent, any>, context?: any) => any
22
+ >;
19
23
  data: ContentPageDef;
20
24
  blockDecorator?: BlockDecorator;
21
25
  }
@@ -26,8 +30,9 @@ const defaultBlockDecorator: BlockDecorator = ({ blockClassName, block, render }
26
30
  export const ContentPage = JSX<ContentPageProps>(
27
31
  ({
28
32
  className,
29
- data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' },
30
33
  context,
34
+ blocksRegistry,
35
+ data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' },
31
36
  blockDecorator = defaultBlockDecorator,
32
37
  }) => {
33
38
  return (
@@ -48,11 +53,11 @@ export const ContentPage = JSX<ContentPageProps>(
48
53
 
49
54
  function renderBlock(block: BlockDef, i: number) {
50
55
  const { type } = block;
51
- if (!(type in Blocks)) {
56
+ if (!(type in blocksRegistry)) {
52
57
  console.warn(`No block with "${type}" is registered`);
53
58
  }
54
59
 
55
- const BlockComponent = Blocks[type as keyof typeof Blocks] || Placeholder;
60
+ const BlockComponent = blocksRegistry[type] || Placeholder;
56
61
  return blockDecorator(
57
62
  {
58
63
  blockClassName: style2className(block.style),
@@ -0,0 +1,12 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../types';
3
+ import type { FooterContent } from './Footer';
4
+ import { TextInformation } from './TextInformation';
5
+
6
+ export interface FooterProps extends FooterContent, UniBlockProps {}
7
+
8
+ export const Footer = JSX<FooterProps>(({ className, context }) => (
9
+ <footer className={`${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`}>
10
+ <TextInformation context={context} />
11
+ </footer>
12
+ ));
@@ -0,0 +1,25 @@
1
+ import { BenefitsBlock } from './BenefitsBlock';
2
+ import { ExchangeRateTile } from './ExchangeRateTile';
3
+ import { Footer } from './Footer/Footer.mobile';
4
+ import { Header } from './Header/index';
5
+ import { MobileAppTile } from './MobileAppTile';
6
+ import { Placeholder } from './Placeholder';
7
+ import { ProductBlock } from './ProductBlock';
8
+ import { ProductGallery } from './ProductGallery';
9
+ import { ProductTile } from './ProductTile';
10
+ import { StepsBlock } from './StepsBlock';
11
+ import { Tile } from './Tile';
12
+
13
+ export const MobileBlocks = {
14
+ Header,
15
+ Footer,
16
+ Placeholder,
17
+ Tile,
18
+ ProductTile,
19
+ ProductBlock,
20
+ StepsBlock,
21
+ BenefitsBlock,
22
+ ProductGallery,
23
+ ExchangeRateTile,
24
+ MobileAppTile,
25
+ };
@@ -1,7 +1,7 @@
1
1
  import glob from 'glob';
2
2
  import util from 'util';
3
+ import { toMobilePage } from '../toMobilePage';
3
4
  import type { ContentPageDef } from '../types';
4
- import { toMobilePage } from './toMobilePage';
5
5
  import type { TransformationOptions } from './TransformationOptions';
6
6
  import { transformContentPage } from './transformContentPage';
7
7
 
package/src/index.ts CHANGED
@@ -1,20 +1,35 @@
1
1
  export type { ProjectSettings } from './ProjectSettings';
2
2
  export { projectSettings } from './ProjectSettings';
3
3
 
4
- export type { BlockDef, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture } from './types';
4
+ export { LikeAPI } from './api/LikeAPI';
5
+ export { DaDataAPI } from './api/DaDataAPI';
6
+
7
+ export type {
8
+ BlockDef,
9
+ UniBlockProps,
10
+ ContentPageMeta,
11
+ ContentPageDef,
12
+ Img,
13
+ ImgSource,
14
+ Picture,
15
+ } from './types';
5
16
  export type {
6
17
  ContentPageContext,
7
18
  Router,
19
+ AsyncDataHook,
20
+ GeolocationHook,
8
21
  LikeService,
9
- Search,
10
22
  HandlerDecorator,
23
+ Search,
11
24
  } from './ContentPageContext';
12
25
 
13
26
  export { ContentPageHead } from './ContentPageHead';
14
27
  export { ContentPage } from './ContentPage';
28
+ export { toMobilePage } from './toMobilePage';
15
29
 
16
30
  export { Blocks } from './Blocks';
17
- export { LikeAPI } from './api/LikeAPI';
31
+ export type { BlockContent } from './Blocks';
32
+ export { MobileBlocks } from './MobileBlocks';
18
33
 
19
34
  export * as url from './utils/url';
20
35
  export { joinList } from './utils/joinList';
@@ -1,4 +1,4 @@
1
- import type { BlockDef, ContentPageDef } from '../types';
1
+ import type { BlockDef, ContentPageDef } from './types';
2
2
 
3
3
  export function toMobilePage(contentPage: ContentPageDef): ContentPageDef {
4
4
  const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
@@ -1 +0,0 @@
1
- {"version":3,"file":"toMobilePage.js","sourceRoot":"","sources":["../../src/content-page-repository/toMobilePage.ts"],"names":[],"mappings":";;AAEA,SAAgB,YAAY,CAAC,WAA2B;IACtD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9F,OAAO;QACL,GAAG,WAAW;QACd,MAAM;KACP,CAAC;AACJ,CAAC;AAND,oCAMC;AAED,SAAS,aAAa,CAAC,KAAe;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,EAAE;QACV,OAAO;YACL,GAAG,KAAK;YACR,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;SACzD,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toMobilePage.js","sourceRoot":"","sources":["../../src/content-page-repository/toMobilePage.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAC,WAA2B;IACtD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9F,OAAO;QACL,GAAG,WAAW;QACd,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAAe;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,EAAE;QACV,OAAO;YACL,GAAG,KAAK;YACR,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK;SACzD,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC"}