@pro-laico/create-atomic-payload 0.1.4

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 (423) hide show
  1. package/bin/cli.js +159 -0
  2. package/package.json +29 -0
  3. package/template/.env.example +35 -0
  4. package/template/.gitattributes +2 -0
  5. package/template/.prettierrc.json +6 -0
  6. package/template/.vscode/extensions.json +3 -0
  7. package/template/.vscode/launch.json +24 -0
  8. package/template/.vscode/settings.json +86 -0
  9. package/template/.yarnrc +1 -0
  10. package/template/LICENSE.md +22 -0
  11. package/template/README.md +128 -0
  12. package/template/eslint.config.mjs +32 -0
  13. package/template/next-env.d.ts +6 -0
  14. package/template/next.config.ts +36 -0
  15. package/template/package.json +75 -0
  16. package/template/public/adminFavicon.svg +1 -0
  17. package/template/public/ogImage.webp +0 -0
  18. package/template/src/access/anyone.ts +3 -0
  19. package/template/src/access/authenticated.ts +7 -0
  20. package/template/src/access/authenticatedOrPublished.ts +6 -0
  21. package/template/src/app/(frontend)/[...slug]/page.tsx +48 -0
  22. package/template/src/app/(frontend)/layout.tsx +49 -0
  23. package/template/src/app/(frontend)/next/exit-preview/route.ts +7 -0
  24. package/template/src/app/(frontend)/next/preview/route.ts +45 -0
  25. package/template/src/app/(frontend)/next/seed/route.ts +31 -0
  26. package/template/src/app/(frontend)/not-found.tsx +93 -0
  27. package/template/src/app/(frontend)/page.tsx +5 -0
  28. package/template/src/app/(frontend)/sitemap.ts +14 -0
  29. package/template/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
  30. package/template/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
  31. package/template/src/app/(payload)/admin/importMap.js +85 -0
  32. package/template/src/app/(payload)/api/[...slug]/route.ts +19 -0
  33. package/template/src/app/(payload)/custom.scss +29 -0
  34. package/template/src/app/(payload)/layout.tsx +31 -0
  35. package/template/src/blocks/actions/blocks.ts +27 -0
  36. package/template/src/blocks/actions/cookieConsent/set/block.ts +17 -0
  37. package/template/src/blocks/actions/cookieConsent/set/filter.ts +3 -0
  38. package/template/src/blocks/actions/cookieConsent/set/options.ts +35 -0
  39. package/template/src/blocks/actions/cookieConsent/toDA/block.ts +14 -0
  40. package/template/src/blocks/actions/cookieConsent/toDA/filter.ts +3 -0
  41. package/template/src/blocks/actions/cookieConsent/toDA/options.ts +19 -0
  42. package/template/src/blocks/actions/dynamicStore/boolean/set/block.ts +15 -0
  43. package/template/src/blocks/actions/dynamicStore/boolean/set/filter.ts +4 -0
  44. package/template/src/blocks/actions/dynamicStore/boolean/set/options.ts +18 -0
  45. package/template/src/blocks/actions/dynamicStore/boolean/toDA/block.ts +10 -0
  46. package/template/src/blocks/actions/dynamicStore/boolean/toDA/filter.ts +3 -0
  47. package/template/src/blocks/actions/dynamicStore/boolean/toDA/options.ts +12 -0
  48. package/template/src/blocks/actions/dynamicStore/text/cycle/block.ts +41 -0
  49. package/template/src/blocks/actions/dynamicStore/text/cycle/filter.ts +4 -0
  50. package/template/src/blocks/actions/dynamicStore/text/cycle/options.ts +23 -0
  51. package/template/src/blocks/actions/dynamicStore/text/toDA/block.ts +10 -0
  52. package/template/src/blocks/actions/dynamicStore/text/toDA/filter.ts +3 -0
  53. package/template/src/blocks/actions/dynamicStore/text/toDA/options.ts +12 -0
  54. package/template/src/blocks/actions/filters.ts +27 -0
  55. package/template/src/blocks/actions/form/errorToDA/block.ts +18 -0
  56. package/template/src/blocks/actions/form/errorToDA/filter.ts +3 -0
  57. package/template/src/blocks/actions/form/errorToDA/options.ts +15 -0
  58. package/template/src/blocks/actions/form/reset/block.ts +18 -0
  59. package/template/src/blocks/actions/form/reset/filter.ts +3 -0
  60. package/template/src/blocks/actions/form/reset/options.ts +30 -0
  61. package/template/src/blocks/actions/form/statusToDA/block.ts +12 -0
  62. package/template/src/blocks/actions/form/statusToDA/filter.ts +3 -0
  63. package/template/src/blocks/actions/form/statusToDA/options.ts +15 -0
  64. package/template/src/blocks/actions/form/submit/block.ts +18 -0
  65. package/template/src/blocks/actions/form/submit/filter.ts +3 -0
  66. package/template/src/blocks/actions/form/submit/options.ts +35 -0
  67. package/template/src/blocks/actions/portal/set/block.ts +25 -0
  68. package/template/src/blocks/actions/portal/set/filter.ts +3 -0
  69. package/template/src/blocks/actions/portal/set/options.ts +43 -0
  70. package/template/src/blocks/actions/processor.ts +263 -0
  71. package/template/src/blocks/actions/theme/set/block.ts +10 -0
  72. package/template/src/blocks/actions/theme/set/filter.ts +3 -0
  73. package/template/src/blocks/actions/theme/set/options.ts +9 -0
  74. package/template/src/blocks/actions/zap.ts +4 -0
  75. package/template/src/blocks/children/atomic/block.ts +123 -0
  76. package/template/src/blocks/children/atomic/controlBar.ts +43 -0
  77. package/template/src/blocks/children/atomic/variants/button/typeField.ts +16 -0
  78. package/template/src/blocks/children/atomic/variants/button/variants/link/component.client.tsx +21 -0
  79. package/template/src/blocks/children/atomic/variants/button/variants/link/component.tsx +13 -0
  80. package/template/src/blocks/children/atomic/variants/button/variants/link/controlBar.ts +73 -0
  81. package/template/src/blocks/children/atomic/variants/button/variants/link/settings.ts +26 -0
  82. package/template/src/blocks/children/atomic/variants/button/variants/portal/controlBar.ts +35 -0
  83. package/template/src/blocks/children/atomic/variants/button/variants/portal/dialog/component.tsx +36 -0
  84. package/template/src/blocks/children/atomic/variants/button/variants/portal/dialog/settings.ts +24 -0
  85. package/template/src/blocks/children/atomic/variants/button/variants/portal/popover/component.tsx +41 -0
  86. package/template/src/blocks/children/atomic/variants/button/variants/portal/popover/settings.ts +111 -0
  87. package/template/src/blocks/children/atomic/variants/button/variants/regular/component.client.tsx +19 -0
  88. package/template/src/blocks/children/atomic/variants/button/variants/regular/component.tsx +11 -0
  89. package/template/src/blocks/children/atomic/variants/form/component.tsx +18 -0
  90. package/template/src/blocks/children/atomic/variants/form/controlBar.ts +22 -0
  91. package/template/src/blocks/children/atomic/variants/form/settings.ts +20 -0
  92. package/template/src/blocks/children/atomic/variants/input/autoCompleteOptions.ts +51 -0
  93. package/template/src/blocks/children/atomic/variants/input/controlBar.ts +13 -0
  94. package/template/src/blocks/children/atomic/variants/input/settings.ts +35 -0
  95. package/template/src/blocks/children/atomic/variants/input/typeField.ts +23 -0
  96. package/template/src/blocks/children/atomic/variants/input/variants/checkBox/component.client.tsx +12 -0
  97. package/template/src/blocks/children/atomic/variants/input/variants/checkBox/component.tsx +6 -0
  98. package/template/src/blocks/children/atomic/variants/input/variants/checkBox/settings.ts +9 -0
  99. package/template/src/blocks/children/atomic/variants/input/variants/number/component.client.tsx +12 -0
  100. package/template/src/blocks/children/atomic/variants/input/variants/number/component.tsx +6 -0
  101. package/template/src/blocks/children/atomic/variants/input/variants/number/settings.ts +9 -0
  102. package/template/src/blocks/children/atomic/variants/input/variants/radio/component.client.tsx +12 -0
  103. package/template/src/blocks/children/atomic/variants/input/variants/radio/component.tsx +6 -0
  104. package/template/src/blocks/children/atomic/variants/input/variants/radio/settings.ts +9 -0
  105. package/template/src/blocks/children/atomic/variants/input/variants/text/component.client.tsx +12 -0
  106. package/template/src/blocks/children/atomic/variants/input/variants/text/component.tsx +7 -0
  107. package/template/src/blocks/children/atomic/variants/input/variants/text/settings.ts +12 -0
  108. package/template/src/blocks/children/atomic/variants/tag/component.client.tsx +17 -0
  109. package/template/src/blocks/children/atomic/variants/tag/component.tsx +13 -0
  110. package/template/src/blocks/children/atomic/variants/tag/controlBar.ts +6 -0
  111. package/template/src/blocks/children/atomic/variants/tag/settings.ts +9 -0
  112. package/template/src/blocks/children/blocks.ts +13 -0
  113. package/template/src/blocks/children/icon/block.ts +41 -0
  114. package/template/src/blocks/children/icon/component.tsx +17 -0
  115. package/template/src/blocks/children/image/block.ts +80 -0
  116. package/template/src/blocks/children/image/component.tsx +21 -0
  117. package/template/src/blocks/children/richText/block.ts +50 -0
  118. package/template/src/blocks/children/richText/component/converters/index.tsx +10 -0
  119. package/template/src/blocks/children/richText/component/converters/internalLink.tsx +8 -0
  120. package/template/src/blocks/children/richText/component/index.tsx +10 -0
  121. package/template/src/blocks/children/richText/component.tsx +7 -0
  122. package/template/src/blocks/children/richText/defaultLexical.ts +65 -0
  123. package/template/src/blocks/children/simpleText/block.ts +41 -0
  124. package/template/src/blocks/children/simpleText/component.client.tsx +18 -0
  125. package/template/src/blocks/children/simpleText/component.tsx +11 -0
  126. package/template/src/blocks/children/svg/block.ts +39 -0
  127. package/template/src/blocks/children/svg/component.tsx +6 -0
  128. package/template/src/blocks/children/video/block.ts +70 -0
  129. package/template/src/blocks/children/video/component.tsx +11 -0
  130. package/template/src/blocks/children/zap.ts +54 -0
  131. package/template/src/blocks/submitForm/form/rateLimiting/blocks.ts +5 -0
  132. package/template/src/blocks/submitForm/form/rateLimiting/functions.ts +1 -0
  133. package/template/src/blocks/submitForm/form/rateLimiting/simpleSlidingWindow/block.ts +23 -0
  134. package/template/src/blocks/submitForm/form/rateLimiting/simpleSlidingWindow/serverFunction.ts +46 -0
  135. package/template/src/blocks/submitForm/form/sanitation/blocks.ts +6 -0
  136. package/template/src/blocks/submitForm/form/sanitation/combineTwoFields/block.ts +19 -0
  137. package/template/src/blocks/submitForm/form/sanitation/combineTwoFields/serverFunction.ts +22 -0
  138. package/template/src/blocks/submitForm/form/sanitation/functions.ts +1 -0
  139. package/template/src/blocks/submitForm/form/validation/blocks.ts +6 -0
  140. package/template/src/blocks/submitForm/form/validation/functions.ts +1 -0
  141. package/template/src/blocks/submitForm/form/validation/isUnique/block.ts +19 -0
  142. package/template/src/blocks/submitForm/form/validation/isUnique/serverFunction.ts +40 -0
  143. package/template/src/blocks/submitForm/form/zap.ts +8 -0
  144. package/template/src/blocks/submitForm/formProcessor.ts +222 -0
  145. package/template/src/blocks/submitForm/input/sanitation/blocks.ts +5 -0
  146. package/template/src/blocks/submitForm/input/sanitation/functions.ts +1 -0
  147. package/template/src/blocks/submitForm/input/sanitation/trimText/block.ts +24 -0
  148. package/template/src/blocks/submitForm/input/sanitation/trimText/serverFunction.ts +63 -0
  149. package/template/src/blocks/submitForm/input/useOn.ts +8 -0
  150. package/template/src/blocks/submitForm/input/validation/blocks.ts +6 -0
  151. package/template/src/blocks/submitForm/input/validation/contains/block.ts +12 -0
  152. package/template/src/blocks/submitForm/input/validation/contains/serverFunction.ts +23 -0
  153. package/template/src/blocks/submitForm/input/validation/doesNotContain/block.ts +12 -0
  154. package/template/src/blocks/submitForm/input/validation/doesNotContain/serverFunction.ts +23 -0
  155. package/template/src/blocks/submitForm/input/validation/functions.ts +2 -0
  156. package/template/src/blocks/submitForm/input/zap.ts +6 -0
  157. package/template/src/blocks/submitForm/serverFunction.ts +42 -0
  158. package/template/src/collections/designSets/collection.ts +44 -0
  159. package/template/src/collections/designSets/defaults.ts +20 -0
  160. package/template/src/collections/designSets/tabs/animation.ts +71 -0
  161. package/template/src/collections/designSets/tabs/colors.ts +31 -0
  162. package/template/src/collections/designSets/tabs/fonts.ts +53 -0
  163. package/template/src/collections/designSets/tabs/miscellaneous.ts +22 -0
  164. package/template/src/collections/designSets/tabs/prose.ts +151 -0
  165. package/template/src/collections/designSets/tabs/settings.ts +52 -0
  166. package/template/src/collections/designSets/tabs/sizes.ts +30 -0
  167. package/template/src/collections/designSets/tabs/storage.ts +51 -0
  168. package/template/src/collections/designSets/tabs/variables.ts +28 -0
  169. package/template/src/collections/favicons.ts +11 -0
  170. package/template/src/collections/fonts/collection.ts +20 -0
  171. package/template/src/collections/fonts/script.ts +199 -0
  172. package/template/src/collections/footers/collection.ts +48 -0
  173. package/template/src/collections/footers/component.tsx +13 -0
  174. package/template/src/collections/headers/collection.ts +47 -0
  175. package/template/src/collections/headers/component.tsx +13 -0
  176. package/template/src/collections/iconSets/collection.ts +80 -0
  177. package/template/src/collections/iconSets/defaults.ts +81 -0
  178. package/template/src/collections/icons.ts +20 -0
  179. package/template/src/collections/images.ts +29 -0
  180. package/template/src/collections/index.ts +17 -0
  181. package/template/src/collections/muxVideos.ts +13 -0
  182. package/template/src/collections/pages/collection.ts +88 -0
  183. package/template/src/collections/pages/tabs/SEO.ts +70 -0
  184. package/template/src/collections/pages/tabs/settings.ts +17 -0
  185. package/template/src/collections/posthogProperty.ts +48 -0
  186. package/template/src/collections/shortcutSets/collection.ts +30 -0
  187. package/template/src/collections/shortcutSets/defaults.ts +1 -0
  188. package/template/src/collections/shortcutSets/protectedNames.ts +135 -0
  189. package/template/src/collections/shortcutSets/tabs/settings.ts +13 -0
  190. package/template/src/collections/shortcutSets/tabs/shortcuts.ts +70 -0
  191. package/template/src/collections/users.ts +11 -0
  192. package/template/src/collections/zap.ts +59 -0
  193. package/template/src/components/child/SSRProps.ts +381 -0
  194. package/template/src/components/child/renderChildren.tsx +148 -0
  195. package/template/src/components/livePreviewListener.tsx +10 -0
  196. package/template/src/components/providers/formProvider.tsx +11 -0
  197. package/template/src/components/providers/tracking/gtm.tsx +11 -0
  198. package/template/src/components/providers/tracking/index.tsx +46 -0
  199. package/template/src/components/providers/tracking/postHog.tsx +41 -0
  200. package/template/src/components/providers/tracking/vercel.tsx +10 -0
  201. package/template/src/components/toast/index.module.css +142 -0
  202. package/template/src/components/toast/index.tsx +55 -0
  203. package/template/src/endpoints/seed/backendForm.ts +48 -0
  204. package/template/src/endpoints/seed/designSet.ts +476 -0
  205. package/template/src/endpoints/seed/footer.ts +389 -0
  206. package/template/src/endpoints/seed/header.ts +3511 -0
  207. package/template/src/endpoints/seed/iconSet.ts +19 -0
  208. package/template/src/endpoints/seed/icons/assets/check.svg +4 -0
  209. package/template/src/endpoints/seed/icons/assets/close.svg +4 -0
  210. package/template/src/endpoints/seed/icons/assets/cookie.svg +7 -0
  211. package/template/src/endpoints/seed/icons/assets/github.svg +1 -0
  212. package/template/src/endpoints/seed/icons/assets/logo.svg +11 -0
  213. package/template/src/endpoints/seed/icons/assets/menu.svg +4 -0
  214. package/template/src/endpoints/seed/icons/assets/theme.svg +4 -0
  215. package/template/src/endpoints/seed/icons/check.ts +14 -0
  216. package/template/src/endpoints/seed/icons/close.ts +14 -0
  217. package/template/src/endpoints/seed/icons/cookie.ts +14 -0
  218. package/template/src/endpoints/seed/icons/github.ts +14 -0
  219. package/template/src/endpoints/seed/icons/index.ts +7 -0
  220. package/template/src/endpoints/seed/icons/logo.ts +14 -0
  221. package/template/src/endpoints/seed/icons/menu.ts +14 -0
  222. package/template/src/endpoints/seed/icons/theme.ts +14 -0
  223. package/template/src/endpoints/seed/index.ts +100 -0
  224. package/template/src/endpoints/seed/pages/home.ts +858 -0
  225. package/template/src/endpoints/seed/pages/index.ts +4 -0
  226. package/template/src/endpoints/seed/pages/notFoundPage.ts +287 -0
  227. package/template/src/endpoints/seed/pages/prose.ts +1436 -0
  228. package/template/src/endpoints/seed/pages/testing.ts +2181 -0
  229. package/template/src/endpoints/seed/shortcutSet.ts +187 -0
  230. package/template/src/endpoints/seed/siteMetaData.ts +10 -0
  231. package/template/src/fields/actions/changeKey.ts +12 -0
  232. package/template/src/fields/actions/index.ts +6 -0
  233. package/template/src/fields/actions/initialValueCheckbox.ts +14 -0
  234. package/template/src/fields/actions/keyText.ts +10 -0
  235. package/template/src/fields/actions/persisted.ts +14 -0
  236. package/template/src/fields/actions/setData.ts +20 -0
  237. package/template/src/fields/actions/strict/index.ts +3 -0
  238. package/template/src/fields/actions/strict/keySelect.ts +28 -0
  239. package/template/src/fields/actions/strict/listenSelect.ts +28 -0
  240. package/template/src/fields/actions/strict/performSelect.ts +30 -0
  241. package/template/src/fields/actions/strict/registry/cookieConsent.ts +14 -0
  242. package/template/src/fields/actions/strict/registry/index.ts +6 -0
  243. package/template/src/fields/actions/strict/registry/theme.ts +9 -0
  244. package/template/src/fields/active.ts +16 -0
  245. package/template/src/fields/apf/index.ts +69 -0
  246. package/template/src/fields/apf/storage.ts +38 -0
  247. package/template/src/fields/blocks/actions.ts +30 -0
  248. package/template/src/fields/blocks/backdropChildren.ts +11 -0
  249. package/template/src/fields/blocks/children.ts +15 -0
  250. package/template/src/fields/blocks/submitForm/form.ts +24 -0
  251. package/template/src/fields/blocks/submitForm/input.ts +25 -0
  252. package/template/src/fields/className.ts +26 -0
  253. package/template/src/fields/coloredEnd.ts +5 -0
  254. package/template/src/fields/defaultOpen.ts +14 -0
  255. package/template/src/fields/designSets/value.ts +80 -0
  256. package/template/src/fields/devMode.ts +11 -0
  257. package/template/src/fields/favicon.ts +18 -0
  258. package/template/src/fields/for.ts +11 -0
  259. package/template/src/fields/keepMounted.ts +11 -0
  260. package/template/src/fields/modal.ts +16 -0
  261. package/template/src/fields/slug.ts +35 -0
  262. package/template/src/fields/staticDataAttributes.ts +29 -0
  263. package/template/src/fields/tabs/block/children/actions.ts +49 -0
  264. package/template/src/fields/tabs/block/children/backdrop.ts +17 -0
  265. package/template/src/fields/tabs/block/children/settings.ts +45 -0
  266. package/template/src/fields/tabs/block/children/submitForm/form.ts +23 -0
  267. package/template/src/fields/tabs/block/children/submitForm/input.ts +14 -0
  268. package/template/src/fields/tabs/block/children/tracking.ts +25 -0
  269. package/template/src/fields/tabs/collection/storage.ts +55 -0
  270. package/template/src/fields/tagType.ts +32 -0
  271. package/template/src/fields/testPath.ts +3 -0
  272. package/template/src/fields/uniqueTitle.ts +8 -0
  273. package/template/src/fields/validationMessage.ts +13 -0
  274. package/template/src/globals/index.ts +8 -0
  275. package/template/src/globals/settings.ts +36 -0
  276. package/template/src/globals/siteMetaData.ts +29 -0
  277. package/template/src/globals/storage.ts +15 -0
  278. package/template/src/globals/tracking/global.ts +25 -0
  279. package/template/src/globals/tracking/tabs/gtm.ts +18 -0
  280. package/template/src/globals/tracking/tabs/postHog.ts +35 -0
  281. package/template/src/hooks/collection/atomicHook/atomicHook.ts +223 -0
  282. package/template/src/hooks/collection/atomicHook/processors/cssProcessor.ts +60 -0
  283. package/template/src/hooks/collection/atomicHook/processors/processDesignSet/generatePreflights.ts +36 -0
  284. package/template/src/hooks/collection/atomicHook/processors/processDesignSet/index.ts +176 -0
  285. package/template/src/hooks/collection/atomicHook/processors/unsetActive.ts +24 -0
  286. package/template/src/hooks/collection/formatSVG.ts +157 -0
  287. package/template/src/hooks/collection/revalidate.ts +53 -0
  288. package/template/src/hooks/collection/sanitizeCollection.ts +5 -0
  289. package/template/src/hooks/field/apf.ts +59 -0
  290. package/template/src/hooks/field/formatSlug.ts +23 -0
  291. package/template/src/hooks/field/href.ts +6 -0
  292. package/template/src/hooks/field/publishedAt.ts +5 -0
  293. package/template/src/hooks/frontEnd/atomicStore/create.ts +69 -0
  294. package/template/src/hooks/frontEnd/atomicStore/index.tsx +20 -0
  295. package/template/src/hooks/frontEnd/atomicStore/slices/base.ts +7 -0
  296. package/template/src/hooks/frontEnd/atomicStore/slices/consent.ts +76 -0
  297. package/template/src/hooks/frontEnd/atomicStore/slices/dynamic.ts +51 -0
  298. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/boolToDA/function.ts +14 -0
  299. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/boolToDA/zap.ts +12 -0
  300. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/cCToDA/function.ts +34 -0
  301. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/cCToDA/zap.ts +17 -0
  302. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/errorToDA/function.ts +22 -0
  303. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/errorToDA/zap.ts +10 -0
  304. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/function.ts +20 -0
  305. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/statusToDA/function.ts +24 -0
  306. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/statusToDA/zap.ts +10 -0
  307. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/textToDA/function.ts +21 -0
  308. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/textToDA/zap.ts +12 -0
  309. package/template/src/hooks/frontEnd/useActions/dispatch/attributer/zap.ts +15 -0
  310. package/template/src/hooks/frontEnd/useActions/dispatch/index.ts +2 -0
  311. package/template/src/hooks/frontEnd/useActions/dispatch/runner/cycleText/function.ts +30 -0
  312. package/template/src/hooks/frontEnd/useActions/dispatch/runner/cycleText/zap.ts +12 -0
  313. package/template/src/hooks/frontEnd/useActions/dispatch/runner/function.ts +21 -0
  314. package/template/src/hooks/frontEnd/useActions/dispatch/runner/resetForm/function.ts +7 -0
  315. package/template/src/hooks/frontEnd/useActions/dispatch/runner/resetForm/zap.ts +9 -0
  316. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setBool/function.ts +10 -0
  317. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setBool/zap.ts +11 -0
  318. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setCCs/function.ts +33 -0
  319. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setCCs/zap.ts +14 -0
  320. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setThemes/function.ts +11 -0
  321. package/template/src/hooks/frontEnd/useActions/dispatch/runner/setThemes/zap.ts +10 -0
  322. package/template/src/hooks/frontEnd/useActions/dispatch/runner/submitForm/function.ts +32 -0
  323. package/template/src/hooks/frontEnd/useActions/dispatch/runner/submitForm/zap.ts +9 -0
  324. package/template/src/hooks/frontEnd/useActions/dispatch/runner/zap.ts +16 -0
  325. package/template/src/hooks/frontEnd/useActions/dispatch/zap.ts +2 -0
  326. package/template/src/hooks/frontEnd/useActions/index.ts +6 -0
  327. package/template/src/hooks/frontEnd/useActions/useActionContext.ts +21 -0
  328. package/template/src/hooks/frontEnd/useActions/useButtonActions.ts +17 -0
  329. package/template/src/hooks/frontEnd/useActions/useDaToText.ts +34 -0
  330. package/template/src/hooks/frontEnd/useActions/useForm.ts +114 -0
  331. package/template/src/hooks/frontEnd/useActions/usePortal.ts +33 -0
  332. package/template/src/hooks/frontEnd/useActions/useToDa.ts +12 -0
  333. package/template/src/hooks/global/revalidate.ts +26 -0
  334. package/template/src/payload.config.ts +78 -0
  335. package/template/src/plugins/blurDataUrls.ts +8 -0
  336. package/template/src/plugins/formBuilder.ts +40 -0
  337. package/template/src/plugins/index.ts +17 -0
  338. package/template/src/plugins/muxVideo.ts +13 -0
  339. package/template/src/plugins/nestedDocs.ts +9 -0
  340. package/template/src/plugins/vercelBlobStorage.ts +8 -0
  341. package/template/src/ts/JSONSchema.ts +93 -0
  342. package/template/src/ts/declarations.ts +24 -0
  343. package/template/src/ts/types/actions.ts +175 -0
  344. package/template/src/ts/types/apf.ts +108 -0
  345. package/template/src/ts/types/cache.ts +166 -0
  346. package/template/src/ts/types/css.ts +14 -0
  347. package/template/src/ts/types/forms.ts +214 -0
  348. package/template/src/ts/types/frontEnd.ts +115 -0
  349. package/template/src/ts/types/index.ts +49 -0
  350. package/template/src/ts/types/payload-types.ts +3684 -0
  351. package/template/src/ts/zap/ap.ts +82 -0
  352. package/template/src/ts/zap/index.ts +4 -0
  353. package/template/src/ui/apf/controls.tsx +88 -0
  354. package/template/src/ui/apf/field.tsx +81 -0
  355. package/template/src/ui/apf/index.scss +59 -0
  356. package/template/src/ui/apf/label.tsx +23 -0
  357. package/template/src/ui/assets/Icon.tsx +21 -0
  358. package/template/src/ui/assets/Logo.tsx +21 -0
  359. package/template/src/ui/assets/atomicIcon.tsx +27 -0
  360. package/template/src/ui/assets/warningIcon.ts +6 -0
  361. package/template/src/ui/blocks/actionBlock.tsx +44 -0
  362. package/template/src/ui/blocks/inputBlock.tsx +24 -0
  363. package/template/src/ui/decorative/coloredEnd.tsx +16 -0
  364. package/template/src/ui/decorative/index.scss +46 -0
  365. package/template/src/ui/fields/iconSelect/index.tsx +19 -0
  366. package/template/src/ui/fields/slug/index.scss +12 -0
  367. package/template/src/ui/fields/slug/index.tsx +72 -0
  368. package/template/src/ui/index.ts +32 -0
  369. package/template/src/ui/root/beforeDashboard/index.scss +22 -0
  370. package/template/src/ui/root/beforeDashboard/index.tsx +39 -0
  371. package/template/src/ui/root/beforeDashboard/seedButton/index.scss +12 -0
  372. package/template/src/ui/root/beforeDashboard/seedButton/index.tsx +84 -0
  373. package/template/src/ui/root/siteTriggers/index.scss +22 -0
  374. package/template/src/ui/root/siteTriggers/index.tsx +94 -0
  375. package/template/src/ui/root/siteTriggers/triggerVercelDeploy.ts +37 -0
  376. package/template/src/ui/rowLabels/animation.tsx +27 -0
  377. package/template/src/ui/rowLabels/atomic/index.scss +62 -0
  378. package/template/src/ui/rowLabels/atomic/index.tsx +96 -0
  379. package/template/src/ui/rowLabels/color.tsx +33 -0
  380. package/template/src/ui/rowLabels/designToken.tsx +30 -0
  381. package/template/src/ui/rowLabels/icon.tsx +32 -0
  382. package/template/src/ui/rowLabels/shortcut/index.scss +21 -0
  383. package/template/src/ui/rowLabels/shortcut/index.tsx +30 -0
  384. package/template/src/ui/rowLabels/simpleText.tsx +41 -0
  385. package/template/src/utilities/deepMerge.ts +30 -0
  386. package/template/src/utilities/extractSVG.ts +9 -0
  387. package/template/src/utilities/format/toKebabCase.ts +79 -0
  388. package/template/src/utilities/format/toTitleCase.ts +47 -0
  389. package/template/src/utilities/formatDurationWithTokens.ts +56 -0
  390. package/template/src/utilities/generateMetaData.ts +45 -0
  391. package/template/src/utilities/generatePreviewPath.ts +43 -0
  392. package/template/src/utilities/get/cache/getAtomicActions.ts +48 -0
  393. package/template/src/utilities/get/cache/getAtomicClasses.ts +20 -0
  394. package/template/src/utilities/get/cache/getDesignSet.ts +15 -0
  395. package/template/src/utilities/get/cache/getFooter.ts +17 -0
  396. package/template/src/utilities/get/cache/getFormSubmissions.ts +17 -0
  397. package/template/src/utilities/get/cache/getForms.ts +43 -0
  398. package/template/src/utilities/get/cache/getHeader.ts +17 -0
  399. package/template/src/utilities/get/cache/getIcon.ts +51 -0
  400. package/template/src/utilities/get/cache/getImage.ts +20 -0
  401. package/template/src/utilities/get/cache/getPage.ts +35 -0
  402. package/template/src/utilities/get/cache/getPages.ts +24 -0
  403. package/template/src/utilities/get/cache/getShortcutSet.ts +17 -0
  404. package/template/src/utilities/get/cache/getSiteCSS.ts +17 -0
  405. package/template/src/utilities/get/cache/getSiteMetadata.ts +14 -0
  406. package/template/src/utilities/get/cache/getSitemap.ts +50 -0
  407. package/template/src/utilities/get/cache/getTracking.ts +14 -0
  408. package/template/src/utilities/get/cache/index.ts +129 -0
  409. package/template/src/utilities/get/cache/react.ts +5 -0
  410. package/template/src/utilities/get/getImageURL.ts +20 -0
  411. package/template/src/utilities/get/getMeUser.ts +22 -0
  412. package/template/src/utilities/get/getURL.ts +20 -0
  413. package/template/src/utilities/log/cache.ts +8 -0
  414. package/template/src/utilities/log/manual.ts +11 -0
  415. package/template/src/utilities/log/revalidation.ts +6 -0
  416. package/template/src/utilities/mergeTags.ts +7 -0
  417. package/template/src/utilities/propertyApplicatorUtility.ts +20 -0
  418. package/template/src/utilities/revalidateTag.ts +55 -0
  419. package/template/src/utilities/runAPF.ts +10 -0
  420. package/template/src/utilities/sanitizeData.ts +24 -0
  421. package/template/src/utilities/seedNestedRelationship.ts +5 -0
  422. package/template/tailwind.config.js +9 -0
  423. package/template/tsconfig.json +49 -0
@@ -0,0 +1,7 @@
1
+ import type { AccessArgs } from 'payload'
2
+
3
+ import type { User } from '@/ts/types'
4
+
5
+ type isAuthenticated = (args: AccessArgs<User>) => boolean
6
+
7
+ export const authd: isAuthenticated = ({ req: { user } }) => Boolean(user)
@@ -0,0 +1,6 @@
1
+ import type { Access } from 'payload'
2
+
3
+ export const authenticatedOrPublished: Access = ({ req: { user } }) => {
4
+ if (user) return true
5
+ return { _status: { equals: 'published' } }
6
+ }
@@ -0,0 +1,48 @@
1
+ 'use server'
2
+ import React from 'react'
3
+ import type { Metadata } from 'next'
4
+ import { draftMode } from 'next/headers'
5
+ import { notFound } from 'next/navigation'
6
+ import getCached from '@/utilities/get/cache/react'
7
+ import { GenerateMetaData } from '@/utilities/generateMetaData'
8
+ import { RenderChildren } from '@/components/child/renderChildren'
9
+ import LivePreviewListener from '@/components/livePreviewListener'
10
+
11
+ type Props = { params: Promise<{ slug?: string[] }> }
12
+
13
+ const slugJoin = (slug: string[] | undefined) => '/' + (slug?.join('/') || '')
14
+
15
+ export async function generateStaticParams() {
16
+ const routes = await getCached('pages', false)
17
+ if (!routes || !Array.isArray(routes)) return []
18
+ const returns = routes.filter((href) => href !== '/').map((href) => ({ slug: href.split('/').slice(1) }))
19
+ return returns || []
20
+ }
21
+
22
+ export async function generateMetadata({ params: paramsPromise }: Props): Promise<Metadata> {
23
+ const { isEnabled: draft } = await draftMode()
24
+ const { slug } = await paramsPromise
25
+ const pages = await getCached('pages', draft)
26
+ const page = await getCached('page', slugJoin(slug), draft, pages)
27
+ const siteMetadata = await getCached('site-metadata', draft)
28
+ const metadata = GenerateMetaData({ page, siteMetadata })
29
+ return metadata
30
+ }
31
+
32
+ export default async function Page({ params: paramsPromise }: Props) {
33
+ const { isEnabled: draft } = await draftMode()
34
+ const { slug } = await paramsPromise
35
+
36
+ const pages = await getCached('pages', draft)
37
+ const page = await getCached('page', slugJoin(slug), draft, pages)
38
+ if (!page) return notFound()
39
+
40
+ return (
41
+ <>
42
+ {draft && <LivePreviewListener />}
43
+ <main className={page.mainClassName || undefined}>
44
+ <RenderChildren blocks={page.children} />
45
+ </main>
46
+ </>
47
+ )
48
+ }
@@ -0,0 +1,49 @@
1
+ 'use server'
2
+ import React from 'react'
3
+ import fonts from '@/app/definition'
4
+ import { draftMode } from 'next/headers'
5
+ import { ThemeProvider } from 'next-themes'
6
+ import { Toaster } from '@/components/toast'
7
+ import getCached from '@/utilities/get/cache/react'
8
+ import { Header } from '@/collections/headers/component'
9
+ import { Footer } from '@/collections/footers/component'
10
+ import { AtomicStoreProvider } from '@/hooks/frontEnd/atomicStore'
11
+ import { TrackingProvider } from '@/components/providers/tracking'
12
+
13
+ const fontVariables = Object.values(fonts)
14
+ .map((font) => (font instanceof Object && 'variable' in font ? font.variable : ''))
15
+ .join(' ')
16
+
17
+ export default async function RootLayout({ children }: { children: React.ReactNode }) {
18
+ const { isEnabled: draft } = await draftMode()
19
+
20
+ const css = await getCached('site-css', draft)
21
+ const ds = await getCached('designSet', draft)
22
+ const header = await getCached('header', draft)
23
+ const footer = await getCached('footer', draft)
24
+ const tracking = await getCached('tracking', draft)
25
+ const storedAtomicActions = await getCached('atomic-actions', draft)
26
+
27
+ return (
28
+ <html lang="en" suppressHydrationWarning className={`${ds?.htmlClassName} ${fontVariables}`}>
29
+ <head>
30
+ <style type="text/css" dangerouslySetInnerHTML={{ __html: css }} />
31
+ </head>
32
+ <body className={ds?.bodyClassName || undefined}>
33
+ <AtomicStoreProvider initialState={storedAtomicActions}>
34
+ <ThemeProvider enableSystem attribute="class" disableTransitionOnChange defaultTheme={ds?.defaultTheme}>
35
+ <TrackingProvider tracking={tracking}>
36
+ <Toaster>
37
+ <div className={ds?.wrapperClassName + ' isolate' || 'isolate'}>
38
+ <Header header={header} />
39
+ {children}
40
+ <Footer footer={footer} />
41
+ </div>
42
+ </Toaster>
43
+ </TrackingProvider>
44
+ </ThemeProvider>
45
+ </AtomicStoreProvider>
46
+ </body>
47
+ </html>
48
+ )
49
+ }
@@ -0,0 +1,7 @@
1
+ import { draftMode } from 'next/headers'
2
+
3
+ export async function GET(): Promise<Response> {
4
+ const draft = await draftMode()
5
+ draft.disable()
6
+ return new Response('Draft mode is disabled')
7
+ }
@@ -0,0 +1,45 @@
1
+ import { getPayload } from 'payload'
2
+ import { draftMode } from 'next/headers'
3
+ import { NextRequest } from 'next/server'
4
+ import { redirect } from 'next/navigation'
5
+ import configPromise from '@payload-config'
6
+ import manualLogger from '@/utilities/log/manual'
7
+ import type { CollectionSlug, PayloadRequest } from 'payload'
8
+
9
+ export async function GET(req: NextRequest): Promise<Response> {
10
+ const payload = await getPayload({ config: configPromise })
11
+ const { searchParams } = new URL(req.url)
12
+
13
+ const slug = searchParams.get('slug')
14
+ const path = searchParams.get('path')
15
+ const previewSecret = searchParams.get('previewSecret')
16
+ const collection = searchParams.get('collection') as CollectionSlug
17
+
18
+ if (previewSecret !== process.env.PREVIEW_SECRET) return new Response('You are not allowed to preview this page', { status: 403 })
19
+ if (!path || !collection || !slug) return new Response('Insufficient search params', { status: 404 })
20
+ if (!path.startsWith('/')) return new Response('This endpoint can only be used for relative previews', { status: 500 })
21
+
22
+ let user
23
+
24
+ try {
25
+ user = await payload.auth({ req: req as unknown as PayloadRequest, headers: req.headers })
26
+ } catch (error) {
27
+ manualLogger(`[Preview] Error verifying token for live preview: ${error}`)
28
+ return new Response('You are not allowed to preview this page', { status: 403 })
29
+ }
30
+
31
+ const draft = await draftMode()
32
+
33
+ if (!user) {
34
+ draft.disable()
35
+ manualLogger('[Preview] Draft Disabled')
36
+ return new Response('You are not allowed to preview this page', { status: 403 })
37
+ }
38
+
39
+ // You can add additional checks here to see if the user is allowed to preview this page
40
+
41
+ manualLogger('[Preview] Draft Enabled')
42
+ draft.enable()
43
+
44
+ redirect(path)
45
+ }
@@ -0,0 +1,31 @@
1
+ import config from '@payload-config'
2
+ import { headers } from 'next/headers'
3
+ import { seed } from '@/endpoints/seed'
4
+ import { createLocalReq, getPayload } from 'payload'
5
+
6
+ export const maxDuration = 60 // This function can run for a maximum of 60 seconds
7
+
8
+ export async function POST(): Promise<Response> {
9
+ const payload = await getPayload({ config })
10
+ const requestHeaders = await headers()
11
+
12
+ if (process.env.INCLUDE_SEED !== 'true') return new Response('Seeding is disabled.', { status: 403 })
13
+
14
+ // Authenticate by passing request headers
15
+ const { user } = await payload.auth({ headers: requestHeaders })
16
+
17
+ if (!user) return new Response('Action forbidden.', { status: 403 })
18
+
19
+ try {
20
+ // Create a Payload request object to pass to the Local API for transactions
21
+ // At this point you should pass in a user, locale, and any other context you need for the Local API
22
+ const payloadReq = await createLocalReq({ user }, payload)
23
+
24
+ await seed({ payload, req: payloadReq })
25
+
26
+ return Response.json({ success: true })
27
+ } catch (e) {
28
+ payload.logger.error({ err: e, message: 'Error seeding data' })
29
+ return new Response('Error seeding data.', { status: 500 })
30
+ }
31
+ }
@@ -0,0 +1,93 @@
1
+ 'use server'
2
+ import React from 'react'
3
+ import Link from 'next/link'
4
+ import { draftMode } from 'next/headers'
5
+ import getCached from '@/utilities/get/cache/react'
6
+ import { RenderChildren } from '@/components/child/renderChildren'
7
+
8
+ //KNOWN ISSUE: 404 Page Does not display in production environment when directly viewing the /404 route.
9
+ //Works in dev though, and works correctly when someone navigates to a non-existent page.
10
+ export default async function NotFound() {
11
+ const { isEnabled: draft } = await draftMode()
12
+ const pages = await getCached('pages', draft)
13
+ const page = await getCached('page', '/404', draft, pages)
14
+
15
+ if (page) {
16
+ return (
17
+ <main className={page.mainClassName || undefined}>
18
+ <RenderChildren blocks={page.children} />
19
+ </main>
20
+ )
21
+ }
22
+
23
+ return (
24
+ <main
25
+ style={{
26
+ display: 'flex',
27
+ flex: 1,
28
+ flexDirection: 'column',
29
+ alignItems: 'center',
30
+ justifyContent: 'center',
31
+ }}
32
+ >
33
+ <div
34
+ style={{
35
+ backgroundColor: 'white',
36
+ padding: '2rem',
37
+ borderRadius: '0.75rem',
38
+ boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
39
+ textAlign: 'center',
40
+ }}
41
+ >
42
+ <h1
43
+ style={{
44
+ fontSize: '9rem',
45
+ fontWeight: 800,
46
+ color: '#d1d5db', // text-gray-300
47
+ userSelect: 'none',
48
+ margin: 0,
49
+ }}
50
+ >
51
+ 404
52
+ </h1>
53
+ <p
54
+ style={{
55
+ marginTop: '1.5rem',
56
+ fontSize: '1.5rem',
57
+ fontWeight: 600,
58
+ color: '#374151', // text-gray-700
59
+ }}
60
+ >
61
+ Oops! Page not found.
62
+ </p>
63
+ <p
64
+ style={{
65
+ marginTop: '0.5rem',
66
+ color: '#6b7280', // text-gray-500
67
+ }}
68
+ >
69
+ The page you’re looking for doesn’t exist or has been moved.
70
+ </p>
71
+
72
+ <div style={{ marginTop: '2rem' }}>
73
+ <Link
74
+ href="/"
75
+ style={{
76
+ display: 'inline-block',
77
+ borderRadius: '0.5rem',
78
+ backgroundColor: 'black',
79
+ padding: '0.75rem 1.5rem',
80
+ color: 'white',
81
+ fontWeight: 500,
82
+ textDecoration: 'none',
83
+ boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
84
+ transition: 'background-color 0.2s ease, box-shadow 0.2s ease',
85
+ }}
86
+ >
87
+ Back to home
88
+ </Link>
89
+ </div>
90
+ </div>
91
+ </main>
92
+ )
93
+ }
@@ -0,0 +1,5 @@
1
+ import PageTemplate, { generateMetadata } from './[...slug]/page'
2
+
3
+ export default PageTemplate
4
+
5
+ export { generateMetadata }
@@ -0,0 +1,14 @@
1
+ 'use server'
2
+ import type { MetadataRoute } from 'next'
3
+ import getCached from '@/utilities/get/cache/react'
4
+
5
+ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
6
+ const sitemap = await getCached('sitemap', false)
7
+ const sitemapEntries = sitemap.map((page) => ({
8
+ url: page.url,
9
+ lastModified: page.lastModified,
10
+ changeFrequency: page.changeFrequency,
11
+ priority: page.priority,
12
+ }))
13
+ return sitemapEntries
14
+ }
@@ -0,0 +1,24 @@
1
+ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
+ import type { Metadata } from 'next'
4
+
5
+ import config from '@payload-config'
6
+ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views'
7
+ import { importMap } from '../importMap'
8
+
9
+ type Args = {
10
+ params: Promise<{
11
+ segments: string[]
12
+ }>
13
+ searchParams: Promise<{
14
+ [key: string]: string | string[]
15
+ }>
16
+ }
17
+
18
+ export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
19
+ generatePageMetadata({ config, params, searchParams })
20
+
21
+ const NotFound = ({ params, searchParams }: Args) =>
22
+ NotFoundPage({ config, params, searchParams, importMap })
23
+
24
+ export default NotFound
@@ -0,0 +1,24 @@
1
+ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
+ import type { Metadata } from 'next'
4
+
5
+ import config from '@payload-config'
6
+ import { RootPage, generatePageMetadata } from '@payloadcms/next/views'
7
+ import { importMap } from '../importMap'
8
+
9
+ type Args = {
10
+ params: Promise<{
11
+ segments: string[]
12
+ }>
13
+ searchParams: Promise<{
14
+ [key: string]: string | string[]
15
+ }>
16
+ }
17
+
18
+ export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
19
+ generatePageMetadata({ config, params, searchParams })
20
+
21
+ const Page = ({ params, searchParams }: Args) =>
22
+ RootPage({ config, params, searchParams, importMap })
23
+
24
+ export default Page
@@ -0,0 +1,85 @@
1
+ import { default as default_1e1f605507ac4d81abdbc5831da0e1b6 } from '@/ui/apf/label'
2
+ import { default as default_fc544a7c902aadc9bfc55ed907448dfb } from '@/ui/apf/field'
3
+ import { default as default_8a7ac2c7c79c3ec2e1d6951d48900455 } from '@/ui/fields/slug'
4
+ import { default as default_689cb8f6b693e47473455b66ff5e9bfa } from '@/ui/apf/controls'
5
+ import { default as default_48cbfad44bafa59cfcf74fd784130a9a } from '@/ui/rowLabels/icon'
6
+ import { default as default_e39b5279f914254b017758220055f1a8 } from '@/ui/rowLabels/designToken'
7
+ import { default as default_e41ccc36c719f166558960cc3fb01689 } from '@/ui/rowLabels/color'
8
+ import { default as default_16d35abd1d6b5b4f200680015a2919c3 } from '@/ui/rowLabels/animation'
9
+ import { default as default_21421aa6013972524cf1183a781258a6 } from '@/ui/rowLabels/shortcut'
10
+ import { MuxUploaderField as MuxUploaderField_c369a797e256de625eba826a6acb8608 } from '@oversightstudio/mux-video/elements'
11
+ import { MuxVideoImageCell as MuxVideoImageCell_c369a797e256de625eba826a6acb8608 } from '@oversightstudio/mux-video/elements'
12
+ import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
13
+ import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
14
+ import { LexicalDiffComponent as LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc'
15
+ import { LinkFeatureClient as LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
16
+ import { FixedToolbarFeatureClient as FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
17
+ import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
18
+ import { BlockquoteFeatureClient as BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
19
+ import { OrderedListFeatureClient as OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
20
+ import { UnorderedListFeatureClient as UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
21
+ import { IndentFeatureClient as IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
22
+ import { AlignFeatureClient as AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
23
+ import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
24
+ import { ParagraphFeatureClient as ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
25
+ import { InlineCodeFeatureClient as InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
26
+ import { SuperscriptFeatureClient as SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
27
+ import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
28
+ import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
29
+ import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
30
+ import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
31
+ import { default as default_270f6bb8ae1323fe93100b8caf0d00e3 } from '@/ui/blocks/actionBlock'
32
+ import { default as default_afd76833cc6ce7bb362fa549a0a6fedb } from '@/ui/blocks/inputBlock'
33
+ import { default as default_8d0556207b1635189a14fae8651677fc } from '@/ui/decorative/coloredEnd'
34
+ import { default as default_7e0ebf8349626d5066c84607ea93eeb9 } from '@/ui/rowLabels/atomic'
35
+ import { default as default_f1f0bac5666a44c5e8419518e1dd9915 } from '@/ui/rowLabels/simpleText'
36
+ import { default as default_11ffef28c6d9fb8a04df535fd3b7f3ac } from '@/ui/fields/iconSelect'
37
+ import { default as default_31e7983ad92c1ad30fcfef2a2c92e0de } from '@/ui/assets/Icon'
38
+ import { default as default_0b906f3c09bdf05f31dac97d0009f13f } from '@/ui/assets/Logo'
39
+ import { default as default_45314b1f13e96bdb34e5fc218cfc22ae } from '@/ui/root/siteTriggers'
40
+ import { VercelBlobClientUploadHandler as VercelBlobClientUploadHandler_16c82c5e25f430251a3e3ba57219ff4e } from '@payloadcms/storage-vercel-blob/client'
41
+ import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'
42
+
43
+ export const importMap = {
44
+ "@/ui/apf/label#default": default_1e1f605507ac4d81abdbc5831da0e1b6,
45
+ "@/ui/apf/field#default": default_fc544a7c902aadc9bfc55ed907448dfb,
46
+ "@/ui/fields/slug#default": default_8a7ac2c7c79c3ec2e1d6951d48900455,
47
+ "@/ui/apf/controls#default": default_689cb8f6b693e47473455b66ff5e9bfa,
48
+ "@/ui/rowLabels/icon#default": default_48cbfad44bafa59cfcf74fd784130a9a,
49
+ "@/ui/rowLabels/designToken#default": default_e39b5279f914254b017758220055f1a8,
50
+ "@/ui/rowLabels/color#default": default_e41ccc36c719f166558960cc3fb01689,
51
+ "@/ui/rowLabels/animation#default": default_16d35abd1d6b5b4f200680015a2919c3,
52
+ "@/ui/rowLabels/shortcut#default": default_21421aa6013972524cf1183a781258a6,
53
+ "@oversightstudio/mux-video/elements#MuxUploaderField": MuxUploaderField_c369a797e256de625eba826a6acb8608,
54
+ "@oversightstudio/mux-video/elements#MuxVideoImageCell": MuxVideoImageCell_c369a797e256de625eba826a6acb8608,
55
+ "@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
56
+ "@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e,
57
+ "@payloadcms/richtext-lexical/rsc#LexicalDiffComponent": LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e,
58
+ "@payloadcms/richtext-lexical/client#LinkFeatureClient": LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
59
+ "@payloadcms/richtext-lexical/client#FixedToolbarFeatureClient": FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
60
+ "@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
61
+ "@payloadcms/richtext-lexical/client#BlockquoteFeatureClient": BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
62
+ "@payloadcms/richtext-lexical/client#OrderedListFeatureClient": OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
63
+ "@payloadcms/richtext-lexical/client#UnorderedListFeatureClient": UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
64
+ "@payloadcms/richtext-lexical/client#IndentFeatureClient": IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
65
+ "@payloadcms/richtext-lexical/client#AlignFeatureClient": AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
66
+ "@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
67
+ "@payloadcms/richtext-lexical/client#ParagraphFeatureClient": ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
68
+ "@payloadcms/richtext-lexical/client#InlineCodeFeatureClient": InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
69
+ "@payloadcms/richtext-lexical/client#SuperscriptFeatureClient": SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
70
+ "@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
71
+ "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
72
+ "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
73
+ "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
74
+ "@/ui/blocks/actionBlock#default": default_270f6bb8ae1323fe93100b8caf0d00e3,
75
+ "@/ui/blocks/inputBlock#default": default_afd76833cc6ce7bb362fa549a0a6fedb,
76
+ "@/ui/decorative/coloredEnd#default": default_8d0556207b1635189a14fae8651677fc,
77
+ "@/ui/rowLabels/atomic#default": default_7e0ebf8349626d5066c84607ea93eeb9,
78
+ "@/ui/rowLabels/simpleText#default": default_f1f0bac5666a44c5e8419518e1dd9915,
79
+ "@/ui/fields/iconSelect#default": default_11ffef28c6d9fb8a04df535fd3b7f3ac,
80
+ "@/ui/assets/Icon#default": default_31e7983ad92c1ad30fcfef2a2c92e0de,
81
+ "@/ui/assets/Logo#default": default_0b906f3c09bdf05f31dac97d0009f13f,
82
+ "@/ui/root/siteTriggers#default": default_45314b1f13e96bdb34e5fc218cfc22ae,
83
+ "@payloadcms/storage-vercel-blob/client#VercelBlobClientUploadHandler": VercelBlobClientUploadHandler_16c82c5e25f430251a3e3ba57219ff4e,
84
+ "@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1
85
+ }
@@ -0,0 +1,19 @@
1
+ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
+ import config from '@payload-config'
4
+ import '@payloadcms/next/css'
5
+ import {
6
+ REST_DELETE,
7
+ REST_GET,
8
+ REST_OPTIONS,
9
+ REST_PATCH,
10
+ REST_POST,
11
+ REST_PUT,
12
+ } from '@payloadcms/next/routes'
13
+
14
+ export const GET = REST_GET(config)
15
+ export const POST = REST_POST(config)
16
+ export const DELETE = REST_DELETE(config)
17
+ export const PATCH = REST_PATCH(config)
18
+ export const PUT = REST_PUT(config)
19
+ export const OPTIONS = REST_OPTIONS(config)
@@ -0,0 +1,29 @@
1
+ .tabs-field__content-wrap {
2
+ padding-bottom: 0px;
3
+ }
4
+
5
+ .blocks-field__rows {
6
+ margin-left: -15px;
7
+ margin-right: -15px;
8
+ }
9
+
10
+ .group-field {
11
+ border: 0px;
12
+ }
13
+
14
+ .nav-button {
15
+ margin: 0 0 4px 0;
16
+ }
17
+
18
+ .tabs-field__content-wrap {
19
+ padding-left: 25px;
20
+ padding-right: 25px;
21
+ }
22
+
23
+ :root {
24
+ --atomic-distinct-1: oklch(87.62% 0.240 148.61);
25
+ --atomic-distinct-2: oklch(69.58% 0.160 55.54);
26
+ --atomic-distinct-3: oklch(65.31% 0.135 242.69);
27
+ --atomic-distinct-4: oklch(83.58% 0.169 91.77);
28
+ --atomic-distinct-5: oklch(57.72% 0.152 315.32);
29
+ }
@@ -0,0 +1,31 @@
1
+ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
+ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
+ import config from '@payload-config'
4
+ import '@payloadcms/next/css'
5
+ import type { ServerFunctionClient } from 'payload'
6
+ import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts'
7
+ import React from 'react'
8
+
9
+ import { importMap } from './admin/importMap.js'
10
+ import './custom.scss'
11
+
12
+ type Args = {
13
+ children: React.ReactNode
14
+ }
15
+
16
+ const serverFunction: ServerFunctionClient = async function (args) {
17
+ 'use server'
18
+ return handleServerFunctions({
19
+ ...args,
20
+ config,
21
+ importMap,
22
+ })
23
+ }
24
+
25
+ const Layout = ({ children }: Args) => (
26
+ <RootLayout config={config} importMap={importMap} serverFunction={serverFunction}>
27
+ {children}
28
+ </RootLayout>
29
+ )
30
+
31
+ export default Layout
@@ -0,0 +1,27 @@
1
+ import { ActSetTheme } from './theme/set/block'
2
+ import { ActResetForm } from './form/reset/block'
3
+ import { ActSubmitForm } from './form/submit/block'
4
+ import { ActSetCC } from './cookieConsent/set/block'
5
+ import { ActSetPortalOpen } from './portal/set/block'
6
+ import { ActCCToDA } from './cookieConsent/toDA/block'
7
+ import { ActFormErrorToDA } from './form/errorToDA/block'
8
+ import { ActFormStatusToDA } from './form/statusToDA/block'
9
+ import { ActDSTextToDA } from './dynamicStore/text/toDA/block'
10
+ import { ActDSSetBool } from './dynamicStore/boolean/set/block'
11
+ import { ActDSCycleText } from './dynamicStore/text/cycle/block'
12
+ import { ActDSBoolToDA } from './dynamicStore/boolean/toDA/block'
13
+
14
+ export const AllActionBlocks = [
15
+ ActSetCC,
16
+ ActCCToDA,
17
+ ActSetTheme,
18
+ ActResetForm,
19
+ ActDSSetBool,
20
+ ActSubmitForm,
21
+ ActDSBoolToDA,
22
+ ActDSTextToDA,
23
+ ActDSCycleText,
24
+ ActFormErrorToDA,
25
+ ActSetPortalOpen,
26
+ ActFormStatusToDA,
27
+ ]
@@ -0,0 +1,17 @@
1
+ import type { Block } from 'payload'
2
+ import { APField } from '@/fields/apf'
3
+ import { KeySelectField, ChangeKeyField, SetDataField, PerformSelectField } from '@/fields/actions'
4
+
5
+ export const ActSetCC: Block = {
6
+ slug: 'ActSetCC',
7
+ interfaceName: 'ActSetCC',
8
+ admin: { group: 'Cookie Consent' },
9
+ labels: { singular: 'Set Cookie Consent', plural: 'Set Cookie Consent' },
10
+ fields: [
11
+ PerformSelectField({ set: 'cookieConsent' }),
12
+ APField({ type: 'checkbox', apf: ['actions'], name: 'acceptAll', admin: { condition: (_, sd) => Boolean(sd?.perform === 'accept') } }),
13
+ KeySelectField({ set: 'cookieConsent', label: 'Set Preference', admin: { condition: (_, sd) => Boolean(sd?.perform === 'preference') } }),
14
+ SetDataField(),
15
+ ChangeKeyField({ admin: { condition: (_, sd) => Boolean(sd?.setDA) } }),
16
+ ],
17
+ }
@@ -0,0 +1,3 @@
1
+ import { ActionBlockFilter } from '@/ts/types/actions'
2
+
3
+ export const ActSetCC = ({ placement, type }: ActionBlockFilter) => Boolean(placement === 'trigger' && type === 'button')
@@ -0,0 +1,35 @@
1
+ import { z } from '@/ts/zap'
2
+ import { ActionProcessFunction } from '@/ts/types'
3
+
4
+ const processFunction: ActionProcessFunction<'ActSetCC'> = ({ perform, acceptAll, key, setDA, changeKey, data }) => {
5
+ let values: z.ap.Type<'RunSetCC'>['values']
6
+
7
+ if (perform === 'preference' && key) {
8
+ values = { perform: 'preference', key }
9
+ } else if (perform === 'accept') {
10
+ values = acceptAll ? { perform: 'accept', acceptAll } : { perform: 'accept' }
11
+ } else {
12
+ values = { perform: 'decline' }
13
+ }
14
+
15
+ const Run: z.ap.Type<'RunSetCC'> = { type: 'RunSetCC', values }
16
+ data.runners.push(Run)
17
+
18
+ if (setDA) {
19
+ let listen: z.ap.Type<'AttCCToDA'>['listen']
20
+
21
+ switch (perform) {
22
+ case 'preference':
23
+ listen = { listen: 'preference', key: key || 'functional' }
24
+ break
25
+ default:
26
+ listen = { listen: perform }
27
+ break
28
+ }
29
+
30
+ const Att: z.ap.Type<'AttCCToDA'> = { type: 'AttCCToDA', listen, changeKey }
31
+ data.attributers.push(Att)
32
+ }
33
+ }
34
+
35
+ export const ActSetCC = { processFunction }
@@ -0,0 +1,14 @@
1
+ import type { Block } from 'payload'
2
+ import { KeySelectField, ChangeKeyField, ListenSelectField } from '@/fields/actions'
3
+
4
+ export const ActCCToDA: Block = {
5
+ slug: 'ActCCToDA',
6
+ interfaceName: 'ActCCToDA',
7
+ admin: { group: 'Cookie Consent' },
8
+ labels: { singular: 'Cookie Consent To Data Attribute', plural: 'Cookie Consent To Data Attribute' },
9
+ fields: [
10
+ ListenSelectField({ set: 'cookieConsent' }),
11
+ KeySelectField({ set: 'cookieConsent', admin: { condition: (_, sd) => Boolean(sd?.listen === 'preference') } }),
12
+ ChangeKeyField(),
13
+ ],
14
+ }
@@ -0,0 +1,3 @@
1
+ import { ActionBlockFilter } from '@/ts/types/actions'
2
+
3
+ export const ActCCToDA = (_: ActionBlockFilter) => true