@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,4 +0,0 @@
1
- export interface TransformationOptions {
2
- contentDir: string;
3
- publicDir: string;
4
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TransformationOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransformationOptions.js","sourceRoot":"","sources":["../../src/content-page-repository/TransformationOptions.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export { ContentPageRepository } from './ContentPageRepository';
@@ -1,2 +0,0 @@
1
- export { ContentPageRepository } from './ContentPageRepository.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content-page-repository/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- export declare function mapJSON<T>(data: T, mapper: <In, Out = In>(value: In, key: string[]) => Promise<Out>, key?: string[]): Promise<T>;
@@ -1,21 +0,0 @@
1
- export async function mapJSON(data, mapper, key = []) {
2
- if (data === null || data === undefined)
3
- return data;
4
- const mappedData = await mapper(data, key);
5
- if (mappedData !== data)
6
- return mappedData;
7
- if (Array.isArray(data)) {
8
- const values = data.map((_, i) => mapJSON(_, mapper, [String(i)].concat(key)));
9
- return Promise.all(values);
10
- }
11
- else if (typeof data === 'object' && data.toString() === '[object Object]') {
12
- const subKeys = Object.keys(data);
13
- const values = subKeys.map((k) => mapJSON(data[k], mapper, [k].concat(key)));
14
- const pairs = (await Promise.all(values)).map((_, i) => ({
15
- [subKeys[i]]: _,
16
- }));
17
- return Object.assign({}, ...pairs);
18
- }
19
- return mapper(data, key);
20
- }
21
- //# sourceMappingURL=mapJSON.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapJSON.js","sourceRoot":"","sources":["../../src/content-page-repository/mapJSON.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAO,EACP,MAAgE,EAChE,MAAgB,EAAE;IAElB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAErD,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3C,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,UAAe,CAAC;IAEhD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAQ,CAAC;KACnC;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAK,IAAY,CAAC,QAAQ,EAAE,KAAK,iBAAiB,EAAE;QACrF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAW,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACvD,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAChB,CAAC,CAAC,CAAC;QACJ,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC;KACpC;IACD,OAAO,MAAM,CAAI,IAAI,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ContentPageDef } from '../types';
2
- import type { TransformationOptions } from './TransformationOptions';
3
- export declare function transformContentPage(pagePath: string, options: TransformationOptions): Promise<ContentPageDef>;
@@ -1,21 +0,0 @@
1
- import fs from 'fs';
2
- import util from 'util';
3
- import { mapJSON } from './mapJSON.js';
4
- import { transformMarkdown } from './transformMarkdown.js';
5
- import { transformPicture } from './transformPicture.js';
6
- const readFile = util.promisify(fs.readFile);
7
- export async function transformContentPage(pagePath, options) {
8
- const content = await readFile(pagePath, 'utf8');
9
- return mapJSON(JSON.parse(content), async (value, [key]) => {
10
- const isMarkdown = typeof value === 'string' && key?.endsWith('__md');
11
- const isPicture = value && value.src && typeof value.src === 'string';
12
- if (isMarkdown) {
13
- return await transformMarkdown(value);
14
- }
15
- else if (isPicture) {
16
- return await transformPicture(pagePath, value, options);
17
- }
18
- return value;
19
- });
20
- }
21
- //# sourceMappingURL=transformContentPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformContentPage.js","sourceRoot":"","sources":["../../src/content-page-repository/transformContentPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAgB,EAChB,OAA8B;IAE9B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,OAAO,OAAO,CAAiB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAU,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE;QAC9E,MAAM,UAAU,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtE,MAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC;QACtE,IAAI,UAAU,EAAE;YACd,OAAO,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACvC;aAAM,IAAI,SAAS,EAAE;YACpB,OAAO,MAAM,gBAAgB,CAAC,QAAQ,EAAE,KAAgB,EAAE,OAAO,CAAC,CAAC;SACpE;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +0,0 @@
1
- export declare function transformMarkdown(markdown: string | null | undefined): Promise<string>;
@@ -1,10 +0,0 @@
1
- import { unified } from 'unified';
2
- import remarkParse from 'remark-parse';
3
- import remarkHtml from 'remark-html';
4
- export async function transformMarkdown(markdown) {
5
- if (!markdown)
6
- return '';
7
- const result = await unified().use(remarkParse).use(remarkHtml).process(markdown);
8
- return result.toString('utf-8');
9
- }
10
- //# sourceMappingURL=transformMarkdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformMarkdown.js","sourceRoot":"","sources":["../../src/content-page-repository/transformMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAmC;IACzE,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { Picture } from '../types';
2
- import type { TransformationOptions } from './TransformationOptions';
3
- export declare function transformPicture(pagePath: string, picture: Picture, options: TransformationOptions): Promise<Picture>;
@@ -1,39 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import sharp from 'sharp';
4
- import util from 'util';
5
- const mkdir = util.promisify(fs.mkdir);
6
- export async function transformPicture(pagePath, picture, options) {
7
- const sources = picture.sources || [];
8
- const [transformedPicture, ...transformedSources] = await Promise.all([picture].concat(sources).map((_) => transformImg(pagePath, picture.src, { ...options, ..._ })));
9
- return {
10
- ...picture,
11
- src: transformedPicture,
12
- sources: transformedSources.map((_, i) => ({
13
- ...sources[i],
14
- src: _,
15
- })),
16
- };
17
- }
18
- async function transformImg(pagePath, src, transformationOptions) {
19
- const { contentDir, publicDir, format, options, size } = transformationOptions;
20
- const imgPath = `${path.dirname(pagePath)}/${src}`;
21
- let chain = sharp(imgPath);
22
- if (size)
23
- chain = chain.resize(size);
24
- if (format)
25
- chain = chain.toFormat(format, options);
26
- const transformedSrc = transformSrc(src, transformationOptions);
27
- const transformedImgPath = `${publicDir}/${path.relative(contentDir, `${path.dirname(pagePath)}/${transformedSrc}`)}`;
28
- await mkdir(path.dirname(transformedImgPath), { recursive: true });
29
- await chain.toFile(transformedImgPath);
30
- return transformedSrc;
31
- }
32
- function transformSrc(src, { format, size }) {
33
- const noTransform = !format && !size;
34
- if (noTransform)
35
- return src;
36
- const suffix = [size?.width, size?.height].filter(Boolean).join('-');
37
- return `${path.basename(src, path.extname(src))}${suffix ? `-${suffix}` : ''}.${String(format) || path.extname(src)}`;
38
- }
39
- //# sourceMappingURL=transformPicture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformPicture.js","sourceRoot":"","sources":["../../src/content-page-repository/transformPicture.ts"],"names":[],"mappings":"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"}
package/lib/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export type { BlockDef, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture } from './types';
2
- export type { ContentPageContext, Router } from './ContentPageContext';
3
- export { Blocks } from './Blocks';
4
- export { LikeAPI } from './api/LikeAPI';
5
- export { ContentPageHead } from './ContentPageHead';
6
- export { ContentPage } from './ContentPage';
package/lib/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { Blocks } from './Blocks.js';
2
- export { LikeAPI } from './api/LikeAPI.js';
3
- export { ContentPageHead } from './ContentPageHead.js';
4
- export { ContentPage } from './ContentPage.js';
5
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
package/lib/types.d.ts DELETED
@@ -1,42 +0,0 @@
1
- import type { AvifOptions, FormatEnum, GifOptions, HeifOptions, JpegOptions, PngOptions, ResizeOptions, TiffOptions, WebpOptions } from 'sharp';
2
- import type { HeaderContent } from './Header';
3
- import type { PlaceholderContent } from './Placeholder';
4
- import type { ProductColumnBlockContent } from './ProductColumnBlock';
5
- import type { RichTextContent } from './RichText';
6
- import type { TextContent } from './Text';
7
- import type { TextWithImageContent } from './TextWithImage';
8
- import type { ProductBlockContent } from './ProductBlock';
9
- export declare type BlockContent = ProductColumnBlockContent | HeaderContent | TextContent | TextWithImageContent | RichTextContent | PlaceholderContent | ProductBlockContent;
10
- export interface BlockDef {
11
- type: string;
12
- style?: string[];
13
- content?: BlockContent;
14
- blocks?: BlockDef[];
15
- }
16
- export interface ContentPageMeta {
17
- title: string;
18
- slug: string;
19
- description?: string;
20
- keywords?: string[];
21
- robots?: string[];
22
- og?: Record<string, string>;
23
- }
24
- export interface ContentPageDef extends ContentPageMeta {
25
- style?: string[];
26
- blocks?: BlockDef[];
27
- likeControl?: boolean;
28
- }
29
- export interface Img {
30
- src: string;
31
- alt?: string;
32
- title?: string;
33
- }
34
- export interface ImgSource {
35
- src: string;
36
- format?: keyof FormatEnum;
37
- options?: JpegOptions | PngOptions | WebpOptions | AvifOptions | HeifOptions | GifOptions | TiffOptions;
38
- size?: ResizeOptions;
39
- }
40
- export interface Picture extends Img, ImgSource {
41
- sources?: ImgSource[];
42
- }
package/lib/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
package/lib/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export interface BlockItemContent {
2
- text?: string;
3
- }
4
- export interface BlockItemProps extends BlockItemContent {
5
- className?: string;
6
- }
7
- export declare const BlockItem: (props: import("@redneckz/uni-jsx").PropsWithChildren<BlockItemProps, any>, context?: any) => any;
@@ -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 BlockItem = JSX(({ className, text, children }) => {
4
- return (_jsxs("div", { className: `inline-block flex items-center ${className || ''}`, role: "listitem", children: [_jsx("div", { className: "inline-block min-w-[7px] h-[2px] bg-brand" }), _jsx("span", { className: "text-base text-second-primary font-normal font-sans mx-3", children: text || children })] }));
5
- });
6
- //# sourceMappingURL=BlockItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../src/ui-kit/BlockItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAUxC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAiB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7E,OAAO,CACL,eAAK,SAAS,EAAE,kCAAkC,SAAS,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,UAAU,aAClF,cAAK,SAAS,EAAC,2CAA2C,GAAO,EACjE,eAAM,SAAS,EAAC,0DAA0D,YACvE,IAAI,IAAI,QAAQ,GACZ,IACH,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { LinkContent } from './Link';
2
- export interface ButtonProps extends LinkContent {
3
- className?: string;
4
- onClick?: (ev: MouseEvent) => any;
5
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/ui-kit/Button.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { TopItemProps } from './TopItem';
2
- export declare type HeaderItemProps = TopItemProps;
3
- export declare const HeaderItem: (props: import("@redneckz/uni-jsx").PropsWithChildren<TopItemProps, any>, context?: any) => any;
@@ -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 HeaderItem = JSX(({ className, text, href, target, active, onClick, children }) => {
4
- const linkStyle = active ? 'border-b-brand' : 'border-transparent';
5
- const textStyle = active ? 'text-brand' : 'text-black hover:text-brand';
6
- return (_jsx("a", { className: `${linkStyle} border-0 border-b-2 border-solid inline-block bg-transparent py-2 text-center font-sans no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: _jsx("span", { className: `${textStyle} text-base font-normal`, children: text || children }) }));
7
- });
8
- //# sourceMappingURL=HeaderItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderItem.js","sourceRoot":"","sources":["../../src/ui-kit/HeaderItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAKxC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACxE,OAAO,CACL,YACE,SAAS,EAAE,GAAG,SAAS,yGACrB,SAAS,IAAI,EACf,EAAE,EACF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,eAAM,SAAS,EAAE,GAAG,SAAS,wBAAwB,YAAG,IAAI,IAAI,QAAQ,GAAQ,GAC9E,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,5 +0,0 @@
1
- export interface LikeButtonProps {
2
- className?: string;
3
- onClick?: (ev: MouseEvent) => any;
4
- }
5
- export declare const LikeButton: (props: import("@redneckz/uni-jsx").PropsWithChildren<LikeButtonProps, any>, context?: any) => any;
@@ -1,13 +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 LikeButton = JSX(({ className, onClick }) => (_jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, children: renderLikeIcon() })));
4
- const renderLikeIcon = () => {
5
- const params = {
6
- stroke: '#292D32',
7
- strokeLinecap: 'round',
8
- strokeLinejoin: 'round',
9
- strokeWidth: '1.5',
10
- };
11
- return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), _jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
12
- };
13
- //# sourceMappingURL=LikeButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LikeButton.js","sourceRoot":"","sources":["../../src/ui-kit/LikeButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOxC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACzE,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,+CAA+C,SAAS,IAAI,EAAE,EAAE,EAC3E,OAAO,EAAE,OAAO,YAEf,cAAc,EAAE,GACV,CACV,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,MAAM,GAAG;QACb,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,OAAO;QACtB,cAAc,EAAE,OAAO;QACvB,WAAW,EAAE,KAAK;KACnB,CAAC;IAEF,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACrE,kBACM,MAAM,EACV,gBAAgB,EAAC,IAAI,EACrB,CAAC,EAAC,wLAAwL,GAC1L,EACF,kBACM,MAAM,EACV,CAAC,EAAC,oGAAoG,GACtG,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export interface LinkContent {
2
- text?: string;
3
- href?: string;
4
- target?: '_blank' | '_self' | '_parent' | '_top' | string;
5
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/ui-kit/Link.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export interface LogoProps {
2
- className?: string;
3
- href?: string;
4
- }
5
- export declare const Logo: (props: import("@redneckz/uni-jsx").PropsWithChildren<LogoProps, any>, context?: any) => any;
@@ -1,14 +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 { SVG } from './SVG.js';
4
- const LOGO_PATHS = [
5
- 'm13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z',
6
- 'M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z',
7
- 'M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z',
8
- 'M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z',
9
- 'M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z',
10
- ];
11
- export const Logo = JSX(({ className, href, children }) => {
12
- return (_jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: "_blank", children: [_jsx(SVG, { className: "text-brand w-10", viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), _jsx("span", { className: "text-black text-base font-medium ml-2.5", children: children || 'Россельхозбанк' })] }));
13
- });
14
- //# sourceMappingURL=Logo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../src/ui-kit/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAO5B,MAAM,UAAU,GAAG;IACjB,w5CAAw5C;IACx5C,2OAA2O;IAC3O,0JAA0J;IAC1J,gpBAAgpB;IAChpB,kDAAkD;CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAY,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,OAAO,CACL,aACE,SAAS,EAAE,mDAAmD,SAAS,IAAI,EAAE,EAAE,EAC/E,IAAI,EAAE,IAAI,IAAI,kBAAkB,EAChC,MAAM,EAAC,QAAQ,aAEf,KAAC,GAAG,IAAC,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAI,EAC9F,eAAM,SAAS,EAAC,yCAAyC,YACtD,QAAQ,IAAI,gBAAgB,GACxB,IACL,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { LinkContent } from './Link';
2
- import type { ButtonProps } from './Button';
3
- export declare type PrimaryButtonContent = LinkContent;
4
- export declare type PrimaryButtonProps = ButtonProps;
5
- export declare const PrimaryButton: (props: import("@redneckz/uni-jsx").PropsWithChildren<ButtonProps, 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 PrimaryButton = JSX(({ className, text, href, target, onClick, children }) => {
4
- return (_jsx("a", { className: `inline-block bg-brand rounded-3xl px-9 py-3.5 text-center font-sans no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: _jsx("span", { className: "text-white text-sm font-medium", children: text || children }) }));
5
- });
6
- //# sourceMappingURL=PrimaryButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PrimaryButton.js","sourceRoot":"","sources":["../../src/ui-kit/PrimaryButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOxC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvD,OAAO,CACL,YACE,SAAS,EAAE,oFACT,SAAS,IAAI,EACf,EAAE,EACF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,eAAM,SAAS,EAAC,gCAAgC,YAAE,IAAI,IAAI,QAAQ,GAAQ,GACxE,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,12 +0,0 @@
1
- interface SVGPath {
2
- d: string;
3
- fill?: string;
4
- }
5
- export interface SVGProps {
6
- className?: string;
7
- viewBox?: string;
8
- fill?: string;
9
- paths: SVGPath[];
10
- }
11
- export declare const SVG: (props: import("@redneckz/uni-jsx").PropsWithChildren<SVGProps, any>, context?: any) => any;
12
- export {};
package/lib/ui-kit/SVG.js DELETED
@@ -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 SVG = JSX(({ className, viewBox, fill = 'none', paths }) => {
4
- return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, children: paths.map(({ d, fill }, i) => _jsx("path", { d: d, fill: fill || 'currentColor' }, i)) }));
5
- });
6
- //# sourceMappingURL=SVG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVG.js","sourceRoot":"","sources":["../../src/ui-kit/SVG.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAcxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,cAAK,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,YACvF,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAc,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,cAAc,IAArC,CAAC,CAAwC,CAAC,GAChF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { LinkContent } from './Link';
2
- export interface TopItemContent extends LinkContent {
3
- active?: boolean;
4
- }
5
- export interface TopItemProps extends TopItemContent {
6
- className?: string;
7
- onClick?: (ev: MouseEvent) => any;
8
- }
9
- export declare const TopItem: (props: import("@redneckz/uni-jsx").PropsWithChildren<TopItemProps, any>, context?: any) => any;
@@ -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 TopItem = JSX(({ className, text, href, target, active, onClick, children }) => {
4
- const linkStyle = active ? 'border-brand rounded-3xl' : 'border-transparent';
5
- const textStyle = active ? 'text-brand' : 'text-black hover:text-brand';
6
- return (_jsx("a", { className: `${linkStyle} border border-solid inline-block bg-transparent px-4 py-2 text-center font-sans no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: _jsx("span", { className: `${textStyle} text-base font-normal`, children: text || children }) }));
7
- });
8
- //# sourceMappingURL=TopItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopItem.js","sourceRoot":"","sources":["../../src/ui-kit/TopItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAYxC,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CACxB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAC7E,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACxE,OAAO,CACL,YACE,SAAS,EAAE,GAAG,SAAS,iGACrB,SAAS,IAAI,EACf,EAAE,EACF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,eAAM,SAAS,EAAE,GAAG,SAAS,wBAAwB,YAAG,IAAI,IAAI,QAAQ,GAAQ,GAC9E,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
package/lib/useLink.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { ContentPageContext } from './ContentPageContext';
2
- import type { LinkContent } from './ui-kit/Link';
3
- export declare function useLink({ useRouter, handlerDecorator }: ContentPageContext, link: Partial<LinkContent>): {
4
- onClick: (ev: MouseEvent) => void;
5
- text?: string | undefined;
6
- href?: string | undefined;
7
- target?: string | undefined;
8
- };
package/lib/useLink.js DELETED
@@ -1,17 +0,0 @@
1
- const defaultHandlerDecorator = (_) => _;
2
- export function useLink({ useRouter, handlerDecorator = defaultHandlerDecorator }, link) {
3
- const router = useRouter();
4
- const { href, target } = link;
5
- return {
6
- ...link,
7
- onClick: handlerDecorator((ev) => {
8
- const isLocalHref = href && !href.includes('//');
9
- const isLocalTarget = !target || target === '_self';
10
- if (isLocalHref && isLocalTarget) {
11
- ev.preventDefault();
12
- router.push(href);
13
- }
14
- }),
15
- };
16
- }
17
- //# sourceMappingURL=useLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLink.js","sourceRoot":"","sources":["../src/useLink.ts"],"names":[],"mappings":"AAGA,MAAM,uBAAuB,GAAoC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAE1E,MAAM,UAAU,OAAO,CACrB,EAAE,SAAS,EAAE,gBAAgB,GAAG,uBAAuB,EAAsB,EAC7E,IAA0B;IAE1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,OAAO;QACL,GAAG,IAAI;QACP,OAAO,EAAE,gBAAgB,CAAC,CAAC,EAAc,EAAE,EAAE;YAC3C,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjD,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,MAAM,KAAK,OAAO,CAAC;YACpD,IAAI,WAAW,IAAI,aAAa,EAAE;gBAChC,EAAE,CAAC,cAAc,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}