@redneckz/wildless-cms-uni-blocks 0.2.28 → 0.2.29

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 (206) hide show
  1. package/package.json +2 -2
  2. package/dist/Blocks.d.ts +0 -9
  3. package/dist/Blocks.js +0 -19
  4. package/dist/Blocks.js.map +0 -1
  5. package/dist/ContentPage.d.ts +0 -19
  6. package/dist/ContentPage.js +0 -30
  7. package/dist/ContentPage.js.map +0 -1
  8. package/dist/ContentPageContext.d.ts +0 -17
  9. package/dist/ContentPageContext.js +0 -2
  10. package/dist/ContentPageContext.js.map +0 -1
  11. package/dist/ContentPageHead.d.ts +0 -6
  12. package/dist/ContentPageHead.js +0 -11
  13. package/dist/ContentPageHead.js.map +0 -1
  14. package/dist/Header.d.ts +0 -15
  15. package/dist/Header.js +0 -33
  16. package/dist/Header.js.map +0 -1
  17. package/dist/Icons.d.ts +0 -5
  18. package/dist/Icons.js +0 -12
  19. package/dist/Icons.js.map +0 -1
  20. package/dist/Img.d.ts +0 -7
  21. package/dist/Img.js +0 -12
  22. package/dist/Img.js.map +0 -1
  23. package/dist/LikeControl.d.ts +0 -6
  24. package/dist/LikeControl.js +0 -10
  25. package/dist/LikeControl.js.map +0 -1
  26. package/dist/Placeholder.d.ts +0 -6
  27. package/dist/Placeholder.js +0 -8
  28. package/dist/Placeholder.js.map +0 -1
  29. package/dist/ProductBlock.d.ts +0 -22
  30. package/dist/ProductBlock.js +0 -17
  31. package/dist/ProductBlock.js.map +0 -1
  32. package/dist/ProductColumnBlock.d.ts +0 -13
  33. package/dist/ProductColumnBlock.js +0 -11
  34. package/dist/ProductColumnBlock.js.map +0 -1
  35. package/dist/RichText.d.ts +0 -8
  36. package/dist/RichText.js +0 -10
  37. package/dist/RichText.js.map +0 -1
  38. package/dist/Text.d.ts +0 -8
  39. package/dist/Text.js +0 -8
  40. package/dist/Text.js.map +0 -1
  41. package/dist/TextWithImage.d.ts +0 -9
  42. package/dist/TextWithImage.js +0 -9
  43. package/dist/TextWithImage.js.map +0 -1
  44. package/dist/api/LikeAPI.d.ts +0 -9
  45. package/dist/api/LikeAPI.js +0 -119
  46. package/dist/api/LikeAPI.js.map +0 -1
  47. package/dist/content-page-repository/ContentPageRepository.d.ts +0 -6
  48. package/dist/content-page-repository/ContentPageRepository.js +0 -35
  49. package/dist/content-page-repository/ContentPageRepository.js.map +0 -1
  50. package/dist/content-page-repository/TransformationOptions.d.ts +0 -4
  51. package/dist/content-page-repository/TransformationOptions.js +0 -2
  52. package/dist/content-page-repository/TransformationOptions.js.map +0 -1
  53. package/dist/content-page-repository/index.d.ts +0 -1
  54. package/dist/content-page-repository/index.js +0 -5
  55. package/dist/content-page-repository/index.js.map +0 -1
  56. package/dist/content-page-repository/mapJSON.d.ts +0 -1
  57. package/dist/content-page-repository/mapJSON.js +0 -24
  58. package/dist/content-page-repository/mapJSON.js.map +0 -1
  59. package/dist/content-page-repository/transformContentPage.d.ts +0 -3
  60. package/dist/content-page-repository/transformContentPage.js +0 -27
  61. package/dist/content-page-repository/transformContentPage.js.map +0 -1
  62. package/dist/content-page-repository/transformMarkdown.d.ts +0 -1
  63. package/dist/content-page-repository/transformMarkdown.js +0 -16
  64. package/dist/content-page-repository/transformMarkdown.js.map +0 -1
  65. package/dist/content-page-repository/transformPicture.d.ts +0 -3
  66. package/dist/content-page-repository/transformPicture.js +0 -45
  67. package/dist/content-page-repository/transformPicture.js.map +0 -1
  68. package/dist/index.d.ts +0 -6
  69. package/dist/index.js +0 -11
  70. package/dist/index.js.map +0 -1
  71. package/dist/types.d.ts +0 -42
  72. package/dist/types.js +0 -2
  73. package/dist/types.js.map +0 -1
  74. package/dist/ui-kit/BlockItem.d.ts +0 -7
  75. package/dist/ui-kit/BlockItem.js +0 -8
  76. package/dist/ui-kit/BlockItem.js.map +0 -1
  77. package/dist/ui-kit/Button.d.ts +0 -5
  78. package/dist/ui-kit/Button.js +0 -2
  79. package/dist/ui-kit/Button.js.map +0 -1
  80. package/dist/ui-kit/HeaderItem.d.ts +0 -3
  81. package/dist/ui-kit/HeaderItem.js +0 -10
  82. package/dist/ui-kit/HeaderItem.js.map +0 -1
  83. package/dist/ui-kit/LikeButton.d.ts +0 -5
  84. package/dist/ui-kit/LikeButton.js +0 -15
  85. package/dist/ui-kit/LikeButton.js.map +0 -1
  86. package/dist/ui-kit/Link.d.ts +0 -5
  87. package/dist/ui-kit/Link.js +0 -2
  88. package/dist/ui-kit/Link.js.map +0 -1
  89. package/dist/ui-kit/Logo.d.ts +0 -5
  90. package/dist/ui-kit/Logo.js +0 -16
  91. package/dist/ui-kit/Logo.js.map +0 -1
  92. package/dist/ui-kit/PrimaryButton.d.ts +0 -5
  93. package/dist/ui-kit/PrimaryButton.js +0 -8
  94. package/dist/ui-kit/PrimaryButton.js.map +0 -1
  95. package/dist/ui-kit/SVG.d.ts +0 -12
  96. package/dist/ui-kit/SVG.js +0 -8
  97. package/dist/ui-kit/SVG.js.map +0 -1
  98. package/dist/ui-kit/TopItem.d.ts +0 -9
  99. package/dist/ui-kit/TopItem.js +0 -10
  100. package/dist/ui-kit/TopItem.js.map +0 -1
  101. package/dist/useLink.d.ts +0 -8
  102. package/dist/useLink.js +0 -20
  103. package/dist/useLink.js.map +0 -1
  104. package/lib/Blocks.d.ts +0 -9
  105. package/lib/Blocks.js +0 -17
  106. package/lib/Blocks.js.map +0 -1
  107. package/lib/ContentPage.d.ts +0 -19
  108. package/lib/ContentPage.js +0 -28
  109. package/lib/ContentPage.js.map +0 -1
  110. package/lib/ContentPageContext.d.ts +0 -17
  111. package/lib/ContentPageContext.js +0 -2
  112. package/lib/ContentPageContext.js.map +0 -1
  113. package/lib/ContentPageHead.d.ts +0 -6
  114. package/lib/ContentPageHead.js +0 -9
  115. package/lib/ContentPageHead.js.map +0 -1
  116. package/lib/Header.d.ts +0 -15
  117. package/lib/Header.js +0 -31
  118. package/lib/Header.js.map +0 -1
  119. package/lib/Icons.d.ts +0 -5
  120. package/lib/Icons.js +0 -10
  121. package/lib/Icons.js.map +0 -1
  122. package/lib/Img.d.ts +0 -7
  123. package/lib/Img.js +0 -9
  124. package/lib/Img.js.map +0 -1
  125. package/lib/LikeControl.d.ts +0 -6
  126. package/lib/LikeControl.js +0 -8
  127. package/lib/LikeControl.js.map +0 -1
  128. package/lib/Placeholder.d.ts +0 -6
  129. package/lib/Placeholder.js +0 -6
  130. package/lib/Placeholder.js.map +0 -1
  131. package/lib/ProductBlock.d.ts +0 -22
  132. package/lib/ProductBlock.js +0 -15
  133. package/lib/ProductBlock.js.map +0 -1
  134. package/lib/ProductColumnBlock.d.ts +0 -13
  135. package/lib/ProductColumnBlock.js +0 -9
  136. package/lib/ProductColumnBlock.js.map +0 -1
  137. package/lib/RichText.d.ts +0 -8
  138. package/lib/RichText.js +0 -8
  139. package/lib/RichText.js.map +0 -1
  140. package/lib/Text.d.ts +0 -8
  141. package/lib/Text.js +0 -6
  142. package/lib/Text.js.map +0 -1
  143. package/lib/TextWithImage.d.ts +0 -9
  144. package/lib/TextWithImage.js +0 -7
  145. package/lib/TextWithImage.js.map +0 -1
  146. package/lib/api/LikeAPI.d.ts +0 -9
  147. package/lib/api/LikeAPI.js +0 -116
  148. package/lib/api/LikeAPI.js.map +0 -1
  149. package/lib/common.css +0 -1
  150. package/lib/content-page-repository/ContentPageRepository.d.ts +0 -6
  151. package/lib/content-page-repository/ContentPageRepository.js +0 -29
  152. package/lib/content-page-repository/ContentPageRepository.js.map +0 -1
  153. package/lib/content-page-repository/TransformationOptions.d.ts +0 -4
  154. package/lib/content-page-repository/TransformationOptions.js +0 -2
  155. package/lib/content-page-repository/TransformationOptions.js.map +0 -1
  156. package/lib/content-page-repository/index.d.ts +0 -1
  157. package/lib/content-page-repository/index.js +0 -2
  158. package/lib/content-page-repository/index.js.map +0 -1
  159. package/lib/content-page-repository/mapJSON.d.ts +0 -1
  160. package/lib/content-page-repository/mapJSON.js +0 -21
  161. package/lib/content-page-repository/mapJSON.js.map +0 -1
  162. package/lib/content-page-repository/transformContentPage.d.ts +0 -3
  163. package/lib/content-page-repository/transformContentPage.js +0 -21
  164. package/lib/content-page-repository/transformContentPage.js.map +0 -1
  165. package/lib/content-page-repository/transformMarkdown.d.ts +0 -1
  166. package/lib/content-page-repository/transformMarkdown.js +0 -10
  167. package/lib/content-page-repository/transformMarkdown.js.map +0 -1
  168. package/lib/content-page-repository/transformPicture.d.ts +0 -3
  169. package/lib/content-page-repository/transformPicture.js +0 -39
  170. package/lib/content-page-repository/transformPicture.js.map +0 -1
  171. package/lib/index.d.ts +0 -6
  172. package/lib/index.js +0 -5
  173. package/lib/index.js.map +0 -1
  174. package/lib/types.d.ts +0 -42
  175. package/lib/types.js +0 -2
  176. package/lib/types.js.map +0 -1
  177. package/lib/ui-kit/BlockItem.d.ts +0 -7
  178. package/lib/ui-kit/BlockItem.js +0 -6
  179. package/lib/ui-kit/BlockItem.js.map +0 -1
  180. package/lib/ui-kit/Button.d.ts +0 -5
  181. package/lib/ui-kit/Button.js +0 -2
  182. package/lib/ui-kit/Button.js.map +0 -1
  183. package/lib/ui-kit/HeaderItem.d.ts +0 -3
  184. package/lib/ui-kit/HeaderItem.js +0 -8
  185. package/lib/ui-kit/HeaderItem.js.map +0 -1
  186. package/lib/ui-kit/LikeButton.d.ts +0 -5
  187. package/lib/ui-kit/LikeButton.js +0 -13
  188. package/lib/ui-kit/LikeButton.js.map +0 -1
  189. package/lib/ui-kit/Link.d.ts +0 -5
  190. package/lib/ui-kit/Link.js +0 -2
  191. package/lib/ui-kit/Link.js.map +0 -1
  192. package/lib/ui-kit/Logo.d.ts +0 -5
  193. package/lib/ui-kit/Logo.js +0 -14
  194. package/lib/ui-kit/Logo.js.map +0 -1
  195. package/lib/ui-kit/PrimaryButton.d.ts +0 -5
  196. package/lib/ui-kit/PrimaryButton.js +0 -6
  197. package/lib/ui-kit/PrimaryButton.js.map +0 -1
  198. package/lib/ui-kit/SVG.d.ts +0 -12
  199. package/lib/ui-kit/SVG.js +0 -6
  200. package/lib/ui-kit/SVG.js.map +0 -1
  201. package/lib/ui-kit/TopItem.d.ts +0 -9
  202. package/lib/ui-kit/TopItem.js +0 -8
  203. package/lib/ui-kit/TopItem.js.map +0 -1
  204. package/lib/useLink.d.ts +0 -8
  205. package/lib/useLink.js +0 -17
  206. package/lib/useLink.js.map +0 -1
@@ -1,19 +0,0 @@
1
- import type { ContentPageContext } from './ContentPageContext';
2
- import type { BlockDef, ContentPageDef } from './types';
3
- interface BlockDecoratorProps<VNode> {
4
- blockClassName: string;
5
- block: BlockDef;
6
- render: (props: {
7
- blockClassName: string;
8
- block: BlockDef;
9
- }) => VNode;
10
- }
11
- export declare type BlockDecorator<VNode = any> = (props: BlockDecoratorProps<VNode>) => any;
12
- export interface ContentPageProps {
13
- className?: string;
14
- data: ContentPageDef;
15
- context: ContentPageContext;
16
- blockDecorator?: BlockDecorator;
17
- }
18
- export declare const ContentPage: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageProps, any>, context?: any) => any;
19
- export {};
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { Blocks } from './Blocks.js';
4
- import { LikeControl } from './LikeControl.js';
5
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
6
- export const ContentPage = JSX(({ className, data: { style: pageStyle, blocks, likeControl }, context, blockDecorator = defaultBlockDecorator, }) => {
7
- return (_jsxs("section", { children: [_jsx("div", { className: `grid grid-cols-12 ${style2className(pageStyle)} ${className}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (_jsx("div", { className: "flex justify-end sticky bottom-0 pointer-events-none", children: _jsx(LikeControl, { className: "rounded-tl-lg pointer-events-auto", context: context }) }))] }));
8
- function renderBlock(block, i) {
9
- const { type } = block;
10
- if (!(type in Blocks)) {
11
- console.warn(`No block with "${type}" is registered`);
12
- return null;
13
- }
14
- const BlockComponent = Blocks[type];
15
- return blockDecorator({
16
- blockClassName: style2className(block.style),
17
- block,
18
- render: (props) => {
19
- const { content, blocks } = props.block;
20
- return (_jsx(BlockComponent, { className: props.blockClassName, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
21
- },
22
- });
23
- }
24
- });
25
- function style2className(style) {
26
- return style ? style.join(' ') : '';
27
- }
28
- //# sourceMappingURL=ContentPage.js.map
@@ -1 +0,0 @@
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;AAClC,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,EAC/C,OAAO,EACP,cAAc,GAAG,qBAAqB,GACvC,EAAE,EAAE;IACH,OAAO,CACL,8BACE,cAAK,SAAS,EAAE,qBAAqB,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,EAAE,YAC3E,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,GAC5C,EACL,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,sDAAsD,YACnE,KAAC,WAAW,IAAC,SAAS,EAAC,mCAAmC,EAAC,OAAO,EAAE,OAAO,GAAI,GAC3E,CACP,IACO,CACX,CAAC;IAEF,SAAS,WAAW,CAAC,KAAe,EAAE,CAAS;QAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;SACb;QAED,MAAM,cAAc,GAAG,MAAM,CAAC,IAA2B,CAAC,CAAC;QAC3D,OAAO,cAAc,CAAC;YACpB,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;YAC5C,KAAK;YACL,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;gBACxC,OAAO,CACL,KAAC,cAAc,IAEb,SAAS,EAAE,KAAK,CAAC,cAAc,EAC/B,OAAO,EAAE,OAAO,KACZ,OAAO,YAEV,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,IAL3C,GAAG,IAAI,IAAI,CAAC,EAAE,CAMJ,CAClB,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,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"}
@@ -1,17 +0,0 @@
1
- export interface Router {
2
- pathname: string;
3
- query: Record<string, string | string[] | undefined>;
4
- href?: string;
5
- basePath?: string;
6
- push: (url: string) => void;
7
- }
8
- export interface LikeService {
9
- likeCount: number;
10
- like: () => void;
11
- dislike: () => void;
12
- }
13
- export interface ContentPageContext {
14
- useRouter: () => Router;
15
- useLikeService: () => LikeService;
16
- handlerDecorator?: <F extends Function>(handler: F) => F;
17
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ContentPageContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPageContext.js","sourceRoot":"","sources":["../src/ContentPageContext.tsx"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { ContentPageMeta } from './types';
2
- export interface ContentPageHeadProps {
3
- HeadComponent: Function;
4
- data: ContentPageMeta;
5
- }
6
- export declare const ContentPageHead: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageHeadProps, any>, context?: any) => any;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- export const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
4
- const { title, description, keywords, robots, og } = data;
5
- return (_jsxs(HeadComponent, { children: [_jsx("title", { children: title }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && _jsx("meta", { name: "description", content: description }), keywords && _jsx("meta", { name: "keywords", content: keywords.join(',') }), robots && _jsx("meta", { name: "robots", content: robots.join(',') }), og
6
- ? Object.entries(og).map(([key, value]) => (_jsx("meta", { name: `og:${key}`, content: value }, key)))
7
- : null, children] }));
8
- });
9
- //# sourceMappingURL=ContentPageHead.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../src/ContentPageHead.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;IAC1D,OAAO,CACL,MAAC,aAAa,eACZ,0BAAQ,KAAK,GAAS,EACtB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACrE,WAAW,IAAI,eAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,GAAI,EAChE,QAAQ,IAAI,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EACjE,MAAM,IAAI,eAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EAC3D,EAAE;gBACD,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,eAAgB,IAAI,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAAtC,GAAG,CAAuC,CACtD,CAAC;gBACJ,CAAC,CAAC,IAAI,EACP,QAAQ,IACK,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/lib/Header.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { LinkContent } from './ui-kit/Link';
2
- import type { ContentPageContext } from './ContentPageContext';
3
- declare type HeaderMenuItem = LinkContent;
4
- interface TopMenuItem extends HeaderMenuItem {
5
- items?: HeaderMenuItem[];
6
- }
7
- export interface HeaderContent {
8
- topItems?: TopMenuItem[];
9
- }
10
- export interface HeaderProps extends HeaderContent {
11
- className?: string;
12
- context: ContentPageContext;
13
- }
14
- export declare const Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<HeaderProps, any>, context?: any) => any;
15
- export {};
package/lib/Header.js DELETED
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { HeaderItem } from './ui-kit/HeaderItem.js';
4
- import { Logo } from './ui-kit/Logo.js';
5
- import { TopItem } from './ui-kit/TopItem.js';
6
- import { useLink } from './useLink.js';
7
- export const Header = JSX(({ className, context, topItems }) => {
8
- const router = context.useRouter();
9
- const activeTopItem = topItems?.find(isTopItemActive(router));
10
- const activeSubItem = activeTopItem?.items?.find(isSubItemActive(router));
11
- return (_jsxs("div", { className: `py-8 px-20 bg-white rounded-bl-3xl rounded-br-3xl ${className || ''}`, children: [_jsxs("div", { className: "flex items-center", children: [_jsx(Logo, { className: "mr-8" }), topItems?.length
12
- ? topItems.map((_, i) => (_jsx(TopItem, { active: _ === activeTopItem, ...useLink(context, _) }, String(i))))
13
- : null] }), activeTopItem?.items?.length ? (_jsx("div", { className: "mt-10", children: activeTopItem.items.map((_) => (_jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink(context, _) }, _.href))) })) : null] }));
14
- });
15
- const isURL = (href) => href?.includes('//');
16
- const withoutQuery = (href) => (href || '').replace(/\/?\?.+/, '');
17
- function isTopItemActive({ href, pathname }) {
18
- return (item) => {
19
- const itemHref = withoutQuery(item.href);
20
- if (isURL(itemHref)) {
21
- return Boolean(href && href.startsWith(itemHref));
22
- }
23
- return Boolean(item.href && pathname.startsWith(itemHref));
24
- };
25
- }
26
- function isSubItemActive({ href, pathname }) {
27
- return (item) => {
28
- return withoutQuery(item.href) === (isURL(item.href) ? withoutQuery(href) : pathname);
29
- };
30
- }
31
- //# sourceMappingURL=Header.js.map
package/lib/Header.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../src/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG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CAAC;AAEtD,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAE5E,SAAS,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAU;IACjD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE;YACnB,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;SACnD;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAU;IACjD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxF,CAAC,CAAC;AACJ,CAAC"}
package/lib/Icons.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare const Icons: {
2
- SafeIcon: () => any;
3
- CalendarIcon: () => any;
4
- MoneyIcon: () => any;
5
- };
package/lib/Icons.js DELETED
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- const SafeIcon = () => (_jsxs("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.172 10.255c0-.695.564-1.259 1.259-1.259h.264a1.795 1.795 0 0 1 0 3.59h-.264v.037h.515a.63.63 0 1 1 0 1.259h-.515v.148a.63.63 0 1 1-1.258 0v-.172a.63.63 0 0 1 0-1.21v-2.393Zm1.259 1.073h.264a.537.537 0 0 0 0-1.073h-.264v1.073Z", fill: "#42AB44" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.602 15.918a4.09 4.09 0 1 0 0-8.18 4.09 4.09 0 0 0 0 8.18Zm0 1.259a5.348 5.348 0 1 0 0-10.697 5.348 5.348 0 0 0 0 10.697Z", fill: "#42AB44" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.215 4.018a.63.63 0 0 0-.629-.63h-.565a2.517 2.517 0 0 0-2.517 2.518V17.75a2.517 2.517 0 0 0 2.517 2.517h14.234a2.517 2.517 0 0 0 2.517-2.517V5.906a2.517 2.517 0 0 0-2.517-2.517H11.927a.63.63 0 0 0 0 1.258H21.256c.695 0 1.258.564 1.258 1.259V17.75c0 .695-.563 1.258-1.258 1.258H7.021a1.258 1.258 0 0 1-1.259-1.258V5.906c0-.695.564-1.259 1.259-1.259h.565a.63.63 0 0 0 .63-.63Z", fill: "#000" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.554 4.591a.63.63 0 0 0-.63.63v13.214c0 .347.282.629.63.629h4.442a.63.63 0 1 1 0 1.258H2.554a1.888 1.888 0 0 1-1.888-1.887V5.22c0-1.043.845-1.888 1.888-1.888h.29a.63.63 0 1 1 0 1.258h-.29Z", fill: "#000" })] }));
3
- const CalendarIcon = () => (_jsxs("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [_jsx("circle", { cx: "9.853", cy: "9.854", r: "1.104", stroke: "#42AB44", strokeWidth: "1.333" }), _jsx("path", { d: "M15.916 14.812a1.104 1.104 0 1 1-2.208 0 1.104 1.104 0 0 1 2.208 0Z", stroke: "#42AB44", strokeWidth: "1.333" }), _jsx("path", { d: "m15.036 9.5-5.409 5.667", stroke: "#42AB44", strokeWidth: "1.333", strokeLinecap: "round" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m14.52 2.195 7.875 7.874c.26.26.26.683 0 .943l-11.3 11.3a.667.667 0 0 1-.942 0L2.28 14.436a.667.667 0 0 1 0-.943l1.681-1.681a.667.667 0 1 0-.943-.943L1.336 12.55a2 2 0 0 0 0 2.829l7.874 7.874a2 2 0 0 0 2.829 0l11.3-11.3a2 2 0 0 0 0-2.828l-7.875-7.874a2 2 0 0 0-2.829 0L9.617 4.27a.667.667 0 1 0 .943.943l3.018-3.018c.26-.26.683-.26.943 0Z", fill: "#000" }), _jsx("path", { d: "M3.334 4.253h2.333M2.666 8.586h2M4.666 6.586h2.333", stroke: "#000", strokeWidth: "1.333", strokeLinecap: "round" })] }));
4
- const MoneyIcon = () => (_jsxs("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 23", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.737 1c.377 0 .684.298.684.667V3c0 1.105-.92 2-2.053 2H7.184a.676.676 0 0 1-.684-.667c0-.368.306-.666.684-.666h7.184A.676.676 0 0 0 15.052 3V1.667c0-.369.307-.667.685-.667Z", fill: "#000" }), _jsx("path", { d: "M5.474 8.334A.676.676 0 0 1 4.79 9a.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.378 0 .684.298.684.667ZM5.474 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.378 0 .684.299.684.667ZM5.474 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.378 0 .684.299.684.667ZM8.896 8.334A.676.676 0 0 1 8.212 9a.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.377 0 .684.298.684.667ZM8.896 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM8.896 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM12.316 8.334a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.377 0 .684.298.684.667ZM12.316 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM12.316 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM15.738 8.334a.676.676 0 0 1-.685.666.676.676 0 0 1-.684-.666c0-.369.306-.667.684-.667.378 0 .684.298.684.667Z", fill: "#000" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.92 1.667A.676.676 0 0 0 4.238 1a.676.676 0 0 0-.684.667V3a.676.676 0 0 1-.685.667h-.815c-1.134 0-2.053.895-2.053 2v12c0 1.104.919 2 2.053 2h9.578a.676.676 0 0 0 .684-.667.676.676 0 0 0-.684-.667H2.053a.676.676 0 0 1-.685-.666v-12c0-.369.307-.667.685-.667h.815c1.134 0 2.053-.895 2.053-2V1.667Zm13.553 6c0 .368.306.666.684.666a.676.676 0 0 0 .684-.666V4.333a.676.676 0 0 0-.684-.666.676.676 0 0 0-.684.666v3.334Z", fill: "#000" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m19.16 9.71 3.9.948c.538.127.941.592.941 1.153v3.177a.676.676 0 0 1-.684.667.676.676 0 0 1-.684-.667v-3.06l-3.79-.922-3.79.922v4.302c0 1.516.822 2.945 2.206 3.786h.001l1.585.967 1.216-.7a.694.694 0 0 1 .937.236.657.657 0 0 1-.241.913l-1.25.719a1.293 1.293 0 0 1-1.336-.006l-1.636-.998c-1.77-1.075-2.85-2.925-2.85-4.917v-4.42c0-.56.403-1.025.941-1.152l3.9-.949c.206-.056.428-.056.634 0Z", fill: "#42AB44" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m19.106 12.373 1.783.5a.94.94 0 0 1 .69.91v2.357l-.002.018c-.033.616-.12 1.159-.384 1.659-.267.505-.677.898-1.228 1.292l-.01.007-.58.386a.94.94 0 0 1-1.076-.008l-.75-.527c-.916-.643-1.444-1.72-1.444-2.845v-2.34a.94.94 0 0 1 .69-.908l1.783-.5a.905.905 0 0 1 .528 0Zm-.264 1.314-1.368.384v2.051c0 .733.345 1.391.875 1.763l.5.352.316-.209c.46-.33.682-.577.811-.821.131-.248.203-.563.234-1.103v-2.033l-1.368-.384Z", fill: "#42AB44" })] }));
5
- export const Icons = {
6
- SafeIcon,
7
- CalendarIcon,
8
- MoneyIcon,
9
- };
10
- //# sourceMappingURL=Icons.js.map
package/lib/Icons.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../src/Icons.tsx"],"names":[],"mappings":";AAAA,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,CACrB,eAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,aACrE,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,uOAAuO,EACzO,IAAI,EAAC,SAAS,GACd,EACF,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,8HAA8H,EAChI,IAAI,EAAC,SAAS,GACd,EACF,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,2XAA2X,EAC7X,IAAI,EAAC,MAAM,GACX,EACF,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,gMAAgM,EAClM,IAAI,EAAC,MAAM,GACX,IACE,CACP,CAAC;AACF,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CACzB,eAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,aACrE,iB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;IACnB,QAAQ;IACR,YAAY;IACZ,SAAS;CACV,CAAC"}
package/lib/Img.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { Picture, ImgSource } from './types';
2
- export interface TextWithImageProps {
3
- className?: string;
4
- image: Picture;
5
- }
6
- export declare const Img: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextWithImageProps, any>, context?: any) => any;
7
- export declare function formatToMimeType(format: ImgSource['format']): string | undefined;
package/lib/Img.js DELETED
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- export const Img = JSX(({ className, image }) => (_jsxs("picture", { className: className || '', children: [image.sources?.length
4
- ? image.sources.map(({ src, format }) => (_jsx("source", { srcSet: src, type: formatToMimeType(format) }, src)))
5
- : null, _jsx("img", { src: image.src, alt: image.alt, title: image.title })] })));
6
- export function formatToMimeType(format) {
7
- return format ? `image/${String(format)}` : undefined;
8
- }
9
- //# sourceMappingURL=Img.js.map
package/lib/Img.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Img.js","sourceRoot":"","sources":["../src/Img.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAqB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnE,mBAAS,SAAS,EAAE,SAAS,IAAI,EAAE,aAChC,KAAK,CAAC,OAAO,EAAE,MAAM;YACpB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACrC,iBAAkB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,IAAhD,GAAG,CAAiD,CAClE,CAAC;YACJ,CAAC,CAAC,IAAI,EACR,cAAK,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,IACnD,CACX,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,MAA2B;IAC1D,OAAO,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC"}
@@ -1,6 +0,0 @@
1
- import { ContentPageContext } from './ContentPageContext';
2
- export interface LikeControlProps {
3
- className?: string;
4
- context: ContentPageContext;
5
- }
6
- export declare const LikeControl: (props: import("@redneckz/uni-jsx").PropsWithChildren<LikeControlProps, any>, context?: any) => any;
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { LikeButton } from './ui-kit/LikeButton.js';
4
- export const LikeControl = JSX(({ className, context }) => {
5
- const likeService = context.useLikeService();
6
- return (_jsxs("div", { className: `border-second-light border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [_jsx(LikeButton, { onClick: likeService.like }), _jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180" }), _jsx("span", { className: "select-none", children: likeService.likeCount })] }));
7
- });
8
- //# sourceMappingURL=LikeControl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LikeControl.js","sourceRoot":"","sources":["../src/LikeControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAOjD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1E,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAE7C,OAAO,CACL,eACE,SAAS,EAAE,qHACT,SAAS,IAAI,EACf,EAAE,aAEF,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,CAAC,IAAI,GAAI,EACzC,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,SAAS,EAAC,YAAY,GAAG,EACnE,eAAM,SAAS,EAAC,aAAa,YAAE,WAAW,CAAC,SAAS,GAAQ,IACxD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- export interface PlaceholderContent {
2
- }
3
- export interface PlaceholderProps extends PlaceholderContent {
4
- className?: string;
5
- }
6
- export declare const Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<PlaceholderProps, any>, context?: any) => any;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- export const Placeholder = JSX(({ className, children }) => {
4
- return _jsx("div", { className: className || '', children: children });
5
- });
6
- //# sourceMappingURL=Placeholder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../src/Placeholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3E,OAAO,cAAK,SAAS,EAAE,SAAS,IAAI,EAAE,YAAG,QAAQ,GAAO,CAAC;AAC3D,CAAC,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { ContentPageContext } from './ContentPageContext';
2
- import { Icons } from './Icons';
3
- import { Picture } from './types';
4
- import type { LinkContent } from './ui-kit/Link';
5
- export interface Benefit {
6
- label: string;
7
- description?: string;
8
- icon?: keyof typeof Icons;
9
- }
10
- export interface ProductBlockContent {
11
- title?: string;
12
- description?: string;
13
- image?: Picture;
14
- benefits?: Benefit[];
15
- items?: string[];
16
- button?: LinkContent;
17
- }
18
- export interface ProductBlockProps extends ProductBlockContent {
19
- className?: string;
20
- context: ContentPageContext;
21
- }
22
- export declare const ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductBlockProps, any>, context?: any) => any;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { Icons } from './Icons.js';
4
- import { Img } from './Img.js';
5
- import { BlockItem } from './ui-kit/BlockItem.js';
6
- import { PrimaryButton } from './ui-kit/PrimaryButton.js';
7
- import { useLink } from './useLink.js';
8
- export const ProductBlock = JSX((props) => {
9
- const { className, context, title, description, benefits, button, image, items } = props;
10
- return (_jsxs("section", { className: `font-sans bg-white rounded-[40px] h-[470px] flex justify-between relative overflow-hidden ${className}`, children: [_jsxs("div", { className: ['flex', 'flex-col', 'p-11', image && 'pr-0'].filter(Boolean).join(' '), children: [title && _jsx("h1", { className: "font-medium text-title2 m-0 mb-4 whitespace-pre-wrap", children: title }), description && (_jsx("div", { className: "font-normal text-base text-second-primary mb-7", children: description })), benefits?.length ? _jsx("div", { className: "flex gap-6", children: benefits.map(renderBenefit) }) : null, items?.length ? (_jsx("section", { className: "flex flex-col", role: "list", children: items.map((_, i) => (_jsx(BlockItem, { className: "mt-6", text: _ }, String(i)))) })) : null, button?.text ? (_jsx("div", { className: "mt-auto", children: _jsx(PrimaryButton, { ...useLink(context, button) }) })) : null] }), image && _jsx("div", { className: "h-full flex", children: _jsx(Img, { image: image, className: "flex" }) })] }));
11
- });
12
- function renderBenefit(benefit, i) {
13
- return (_jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (_jsx("div", { className: "h-11 w-11 min-w-11 min-h-11 bg-second-light rounded-full p-[10px] box-border", children: Icons[benefit.icon]() })), _jsxs("div", { className: "flex gap-1 flex-col", children: [_jsx("h4", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (_jsx("div", { className: "font-normal text-sm text-second-primary", children: benefit.description }))] })] }, String(i)));
14
- }
15
- //# sourceMappingURL=ProductBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../src/ProductBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAoB,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEzF,OAAO,CACL,mBACE,SAAS,EAAE,6FAA6F,SAAS,EAAE,aAEnH,eAAK,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aACpF,KAAK,IAAI,aAAI,SAAS,EAAC,sDAAsD,YAAE,KAAK,GAAM,EAC1F,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,gDAAgD,YAAE,WAAW,GAAO,CACpF,EACA,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,YAAY,YAAE,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,GAAO,CAAC,CAAC,CAAC,IAAI,EACzF,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,kBAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,KAAC,SAAS,IAAiB,SAAS,EAAC,MAAM,EAAC,IAAI,EAAE,CAAC,IAAnC,MAAM,CAAC,CAAC,CAAC,CAA8B,CACxD,CAAC,GACM,CACX,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,cAAK,SAAS,EAAC,SAAS,YACtB,KAAC,aAAa,OAAK,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,GAAI,GAC3C,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,KAAK,IAAI,cAAK,SAAS,EAAC,aAAa,YAAE,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,GAAO,IAC7E,CACX,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,aAAa,CAAC,OAAgB,EAAE,CAAS;IAChD,OAAO,CACL,eAAqB,SAAS,EAAC,yBAAyB,aACrD,OAAO,CAAC,IAAI,IAAI,CACf,cAAK,SAAS,EAAC,8EAA8E,YAC1F,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAClB,CACP,EACD,eAAK,SAAS,EAAC,qBAAqB,aAClC,aAAI,SAAS,EAAC,yBAAyB,YAAE,OAAO,CAAC,KAAK,GAAM,EAC3D,OAAO,CAAC,WAAW,IAAI,CACtB,cAAK,SAAS,EAAC,yCAAyC,YAAE,OAAO,CAAC,WAAW,GAAO,CACrF,IACG,KAXE,MAAM,CAAC,CAAC,CAAC,CAYb,CACP,CAAC;AACJ,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { ContentPageContext } from './ContentPageContext';
2
- import type { LinkContent } from './ui-kit/Link';
3
- export interface ProductColumnBlockContent {
4
- title?: string;
5
- items?: string[];
6
- button?: LinkContent;
7
- promo?: boolean;
8
- }
9
- export interface ProductColumnBlockProps extends ProductColumnBlockContent {
10
- className?: string;
11
- context: ContentPageContext;
12
- }
13
- export declare const ProductColumnBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductColumnBlockProps, any>, context?: any) => any;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { BlockItem } from './ui-kit/BlockItem.js';
4
- import { PrimaryButton } from './ui-kit/PrimaryButton.js';
5
- import { useLink } from './useLink.js';
6
- export const ProductColumnBlock = JSX(({ className, context, title, items, button, promo }) => {
7
- return (_jsxs("div", { className: `relative p-8 bg-white text-black font-sans rounded-[40px] ${className || ''}`, children: [_jsx("p", { className: "text-title font-medium m-0", children: title }), items?.length ? (_jsx("section", { className: "flex flex-col", role: "list", children: items.map((_, i) => (_jsx(BlockItem, { className: "mt-6", text: _ }, String(i)))) })) : null, button?.text ? _jsx(PrimaryButton, { className: "mt-12", ...useLink(context, button) }) : null, promo && (_jsx("div", { className: "absolute right-0 bottom-0 bg-promo font-normal px-12 py-3 text-xl rounded-tl-[74px] rounded-br-[40px]", children: "\u0410\u043A\u0446\u0438\u044F" }))] }));
8
- });
9
- //# sourceMappingURL=ProductColumnBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProductColumnBlock.js","sourceRoot":"","sources":["../src/ProductColumnBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,CACL,eACE,SAAS,EAAE,6DAA6D,SAAS,IAAI,EAAE,EAAE,aAEzF,YAAG,SAAS,EAAC,4BAA4B,YAAE,KAAK,GAAK,EACpD,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,kBAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,KAAC,SAAS,IAAiB,SAAS,EAAC,MAAM,EAAC,IAAI,EAAE,CAAC,IAAnC,MAAM,CAAC,CAAC,CAAC,CAA8B,CACxD,CAAC,GACM,CACX,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,SAAS,EAAC,OAAO,KAAK,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACvF,KAAK,IAAI,CACR,cAAK,SAAS,EAAC,uGAAuG,+CAEhH,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
package/lib/RichText.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export interface RichTextContent {
2
- __html?: string;
3
- __md?: string;
4
- }
5
- export interface RichTextProps extends RichTextContent {
6
- className?: string;
7
- }
8
- export declare const RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<RichTextProps, any>, context?: any) => any;
package/lib/RichText.js DELETED
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- export const RichText = JSX(({ className, __html, __md }) => {
4
- const html = __html || __md;
5
- const props = Object.assign({ className: className || '' }, html ? { dangerouslySetInnerHTML: { __html: html } } : {});
6
- return _jsx("div", { ...props });
7
- });
8
- //# sourceMappingURL=RichText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichText.js","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAWxC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC;IAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACF,OAAO,iBAAS,KAAK,GAAI,CAAC;AAC5B,CAAC,CAAC,CAAC"}
package/lib/Text.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export interface TextContent {
2
- primary?: string;
3
- secondary?: string;
4
- }
5
- export interface TextProps extends TextContent {
6
- className?: string;
7
- }
8
- export declare const Text: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextProps, any>, context?: any) => any;
package/lib/Text.js DELETED
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- export const Text = JSX(({ className, primary, secondary, children }) => {
4
- return (_jsxs("div", { className: className || '', children: [primary && _jsx("p", { className: "font-bold text-slate-700 leading-snug", children: primary }), secondary && _jsx("p", { className: "mt-2 text-sm text-slate-600", children: secondary }), children] }));
5
- });
6
- //# sourceMappingURL=Text.js.map
package/lib/Text.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAWxC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAY,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjF,OAAO,CACL,eAAK,SAAS,EAAE,SAAS,IAAI,EAAE,aAC5B,OAAO,IAAI,YAAG,SAAS,EAAC,uCAAuC,YAAE,OAAO,GAAK,EAC7E,SAAS,IAAI,YAAG,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAK,EACvE,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { Picture } from './types';
2
- export interface TextWithImageContent {
3
- primary?: string;
4
- image?: Picture;
5
- }
6
- export interface TextWithImageProps extends TextWithImageContent {
7
- className?: string;
8
- }
9
- export declare const TextWithImage: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextWithImageProps, any>, context?: any) => any;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { Img } from './Img.js';
4
- export const TextWithImage = JSX(({ className, primary, image }) => {
5
- return (_jsxs("div", { className: className || '', children: [primary && _jsx("p", { className: "font-bold text-slate-700 leading-snug", children: primary }), image && _jsx(Img, { image: image })] }));
6
- });
7
- //# sourceMappingURL=TextWithImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextWithImage.js","sourceRoot":"","sources":["../src/TextWithImage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAY5B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAqB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACrF,OAAO,CACL,eAAK,SAAS,EAAE,SAAS,IAAI,EAAE,aAC5B,OAAO,IAAI,YAAG,SAAS,EAAC,uCAAuC,YAAE,OAAO,GAAK,EAC7E,KAAK,IAAI,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,GAAI,IAC3B,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export interface LikeData {
2
- node_id: string;
3
- value: number;
4
- }
5
- export declare function LikeAPI(projectId: string, baseURL: string): {
6
- getLikeCount: (...nodeIds: string[]) => Promise<LikeData[]>;
7
- like: (nodeId: string) => Promise<number>;
8
- dislike: (nodeId: string) => Promise<number>;
9
- };
@@ -1,116 +0,0 @@
1
- const AUTH_PREFIX = 'guest';
2
- const STORAGE_KEY = 'likesToken';
3
- export function LikeAPI(projectId, baseURL) {
4
- async function getLikeCount(...nodeIds) {
5
- if (!nodeIds.length) {
6
- return [];
7
- }
8
- const { token: Authorization } = await auth();
9
- try {
10
- const response = await fetch(`/assist/v1/public/projects/${projectId}/nodes/likes`, {
11
- method: 'POST',
12
- mode: 'cors',
13
- headers: { 'Content-Type': 'application/json', Authorization },
14
- body: JSON.stringify({
15
- node_ids: nodeIds,
16
- }),
17
- });
18
- const { likes } = await response.json();
19
- return likes || [];
20
- }
21
- catch (e) {
22
- console.error(e);
23
- return [];
24
- }
25
- }
26
- async function like(nodeId) {
27
- if (!nodeId) {
28
- return 0;
29
- }
30
- const { token: Authorization, name } = await auth();
31
- try {
32
- const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/like`, {
33
- method: 'POST',
34
- mode: 'cors',
35
- headers: {
36
- 'Content-Type': 'application/json',
37
- Authorization,
38
- UserID: name,
39
- },
40
- body: JSON.stringify({
41
- node_id: nodeId,
42
- user_name: name,
43
- }),
44
- });
45
- const { likes } = await response.json();
46
- return likes || 0;
47
- }
48
- catch (e) {
49
- console.error(e);
50
- return 0;
51
- }
52
- }
53
- async function dislike(nodeId) {
54
- if (!nodeId) {
55
- return 0;
56
- }
57
- const { token: Authorization, name } = await auth();
58
- try {
59
- const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/unlike`, {
60
- method: 'POST',
61
- mode: 'cors',
62
- headers: {
63
- 'Content-Type': 'application/json',
64
- Authorization,
65
- UserID: name,
66
- },
67
- body: JSON.stringify({
68
- node_id: nodeId,
69
- user_name: name,
70
- }),
71
- });
72
- const { likes } = await response.json();
73
- return likes || 0;
74
- }
75
- catch (e) {
76
- console.error(e);
77
- return 0;
78
- }
79
- }
80
- async function auth() {
81
- try {
82
- const userData = JSON.parse(globalThis.localStorage.getItem(STORAGE_KEY) || '');
83
- if (userData?.token) {
84
- return userData;
85
- }
86
- }
87
- catch (e) {
88
- // do nothing
89
- }
90
- try {
91
- const response = await fetch(`${baseURL}/assist/v1/public/auth`, {
92
- method: 'POST',
93
- mode: 'cors',
94
- headers: {
95
- 'Content-Type': 'application/json',
96
- },
97
- body: JSON.stringify({
98
- prefix: AUTH_PREFIX,
99
- }),
100
- });
101
- const { token, name } = await response.json();
102
- globalThis.localStorage.setItem(STORAGE_KEY, JSON.stringify({ token, name }));
103
- return { token, name };
104
- }
105
- catch (e) {
106
- console.error(e);
107
- return {};
108
- }
109
- }
110
- return {
111
- getLikeCount,
112
- like,
113
- dislike,
114
- };
115
- }
116
- //# sourceMappingURL=LikeAPI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LikeAPI.js","sourceRoot":"","sources":["../../src/api/LikeAPI.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,WAAW,GAAG,YAAY,CAAC;AAEjC,MAAM,UAAU,OAAO,CAAC,SAAiB,EAAE,OAAe;IACxD,KAAK,UAAU,YAAY,CAAC,GAAG,OAAiB;QAC9C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAE9C,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,8BAA8B,SAA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B,MAAM,EAAE,WAAW;iBACpB,CAAC;aACH,CAAC,CAAC;YAEH,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAE9C,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAE9E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAc,CAAC;SACpC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,EAAc,CAAC;SACvB;IACH,CAAC;IAED,OAAO;QACL,YAAY;QACZ,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC"}
package/lib/common.css DELETED
@@ -1 +0,0 @@
1
- .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}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-7{grid-column:span 7/span 7}.col-span-8{grid-column:span 8/span 8}.col-span-9{grid-column:span 9/span 9}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-full{grid-column:1/-1}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.col-start-4{grid-column-start:4}.col-start-5{grid-column-start:5}.col-start-6{grid-column-start:6}.col-start-7{grid-column-start:7}.col-start-8{grid-column-start:8}.col-start-9{grid-column-start:9}.col-start-10{grid-column-start:10}.col-start-11{grid-column-start:11}.col-start-12{grid-column-start:12}.col-start-13{grid-column-start:13}.col-start-auto{grid-column-start:auto}.col-end-1{grid-column-end:1}.col-end-2{grid-column-end:2}.col-end-3{grid-column-end:3}.col-end-4{grid-column-end:4}.col-end-5{grid-column-end:5}.col-end-6{grid-column-end:6}.col-end-7{grid-column-end:7}.col-end-8{grid-column-end:8}.col-end-9{grid-column-end:9}.col-end-10{grid-column-end:10}.col-end-11{grid-column-end:11}.col-end-12{grid-column-end:12}.col-end-13{grid-column-end:13}.col-end-auto{grid-column-end:auto}.m-0{margin:0}.mx-3{margin-left:.75rem;margin-right:.75rem}.mr-8{margin-right:2rem}.mt-10{margin-top:2.5rem}.mb-4{margin-bottom:1rem}.mb-7{margin-bottom:1.75rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.ml-2\.5{margin-left:.625rem}.ml-2{margin-left:.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-8{height:2rem}.h-\[470px\]{height:470px}.h-full{height:100%}.h-11{height:2.75rem}.h-\[2px\]{height:2px}.min-h-11{min-height:2.75rem}.w-full{width:100%}.w-8{width:2rem}.w-\[125px\]{width:125px}.w-11{width:2.75rem}.w-\[36px\]{width:36px}.w-10{width:2.5rem}.min-w-11{min-width:2.75rem}.min-w-\[7px\]{min-width:7px}.rotate-180{--tw-rotate:180deg;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))}.cursor-col-resize{cursor:col-resize}.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-flow-col-dense{grid-auto-flow:column dense}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-5{gap:1.25rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-4{gap:1rem}.gap-1{gap:.25rem}.overflow-hidden{overflow:hidden}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-\[40px\]{border-radius:40px}.rounded-3xl{border-radius:1.5rem}.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}.rounded-tl-\[74px\]{border-top-left-radius:74px}.rounded-br-\[40px\]{border-bottom-right-radius:40px}.border{border-width:1px}.border-2{border-width:2px}.border-0{border-width:0}.border-b-2{border-bottom-width:2px}.border-solid{border-style:solid}.border-second-light{--tw-border-opacity:1;border-color:rgb(245 247 249/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-brand{--tw-border-opacity:1;border-color:rgb(66 171 68/var(--tw-border-opacity))}.border-b-brand{--tw-border-opacity:1;border-bottom-color:rgb(66 171 68/var(--tw-border-opacity))}.bg-second-light{--tw-bg-opacity:1;background-color:rgb(245 247 249/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-promo,.bg-white{--tw-bg-opacity:1}.bg-promo{background-color:rgb(247 248 197/var(--tw-bg-opacity))}.bg-brand{--tw-bg-opacity:1;background-color:rgb(66 171 68/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.p-20{padding:5rem}.p-2{padding:.5rem}.p-11{padding:2.75rem}.p-\[10px\]{padding:10px}.p-8{padding:2rem}.py-8{padding-bottom:2rem;padding-top:2rem}.px-20{padding-left:5rem;padding-right:5rem}.px-12{padding-left:3rem;padding-right:3rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-9{padding-left:2.25rem;padding-right:2.25rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.pt-0{padding-top:0}.pr-0{padding-right:0}.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-title2{font-size:2.5rem;line-height:3rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-title{font-size:2rem;line-height:2.5rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-bold{font-weight:700}.leading-snug{line-height:1.375}.text-second-primary{--tw-text-opacity:1;color:rgb(125 126 127/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-brand{color:rgb(66 171 68/var(--tw-text-opacity))}.text-brand,.text-white{--tw-text-opacity:1}.text-white{color:rgb(255 255 255/var(--tw-text-opacity))}.no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.rotate-180{transform:rotate(180deg)}.hover\:text-brand:hover{--tw-text-opacity:1;color:rgb(66 171 68/var(--tw-text-opacity))}
@@ -1,6 +0,0 @@
1
- import type { ContentPageDef } from '../types';
2
- import type { TransformationOptions } from './TransformationOptions';
3
- export declare function ContentPageRepository({ contentDir, publicDir, }?: Partial<TransformationOptions>): {
4
- getAllContentPages: () => Promise<ContentPageDef[]>;
5
- getContentPageBySlug: (slug: string) => Promise<ContentPageDef | undefined>;
6
- };
@@ -1,29 +0,0 @@
1
- import glob from 'glob';
2
- import util from 'util';
3
- import { transformContentPage } from './transformContentPage.js';
4
- const find = util.promisify(glob);
5
- export function ContentPageRepository({ contentDir = 'content', publicDir = 'public', } = {}) {
6
- async function getAllContentPages() {
7
- const pagePaths = await find(`${contentDir}/**/*.page.json`);
8
- return await Promise.all(pagePaths.map(readPage));
9
- }
10
- async function getContentPageBySlug(slug) {
11
- const pages = await getAllContentPages();
12
- return pages.find((content) => content.slug === slug);
13
- }
14
- const cache = {};
15
- async function readPage(filePath) {
16
- if (!(filePath in cache)) {
17
- cache[filePath] = await transformContentPage(filePath, {
18
- contentDir,
19
- publicDir,
20
- });
21
- }
22
- return cache[filePath];
23
- }
24
- return {
25
- getAllContentPages,
26
- getContentPageBySlug,
27
- };
28
- }
29
- //# sourceMappingURL=ContentPageRepository.js.map
@@ -1 +0,0 @@
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;AAGxB,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,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;KACrB,CAAC;AACJ,CAAC"}