@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.
- package/bin/cli.js +159 -0
- package/package.json +29 -0
- package/template/.env.example +35 -0
- package/template/.gitattributes +2 -0
- package/template/.prettierrc.json +6 -0
- package/template/.vscode/extensions.json +3 -0
- package/template/.vscode/launch.json +24 -0
- package/template/.vscode/settings.json +86 -0
- package/template/.yarnrc +1 -0
- package/template/LICENSE.md +22 -0
- package/template/README.md +128 -0
- package/template/eslint.config.mjs +32 -0
- package/template/next-env.d.ts +6 -0
- package/template/next.config.ts +36 -0
- package/template/package.json +75 -0
- package/template/public/adminFavicon.svg +1 -0
- package/template/public/ogImage.webp +0 -0
- package/template/src/access/anyone.ts +3 -0
- package/template/src/access/authenticated.ts +7 -0
- package/template/src/access/authenticatedOrPublished.ts +6 -0
- package/template/src/app/(frontend)/[...slug]/page.tsx +48 -0
- package/template/src/app/(frontend)/layout.tsx +49 -0
- package/template/src/app/(frontend)/next/exit-preview/route.ts +7 -0
- package/template/src/app/(frontend)/next/preview/route.ts +45 -0
- package/template/src/app/(frontend)/next/seed/route.ts +31 -0
- package/template/src/app/(frontend)/not-found.tsx +93 -0
- package/template/src/app/(frontend)/page.tsx +5 -0
- package/template/src/app/(frontend)/sitemap.ts +14 -0
- package/template/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
- package/template/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
- package/template/src/app/(payload)/admin/importMap.js +85 -0
- package/template/src/app/(payload)/api/[...slug]/route.ts +19 -0
- package/template/src/app/(payload)/custom.scss +29 -0
- package/template/src/app/(payload)/layout.tsx +31 -0
- package/template/src/blocks/actions/blocks.ts +27 -0
- package/template/src/blocks/actions/cookieConsent/set/block.ts +17 -0
- package/template/src/blocks/actions/cookieConsent/set/filter.ts +3 -0
- package/template/src/blocks/actions/cookieConsent/set/options.ts +35 -0
- package/template/src/blocks/actions/cookieConsent/toDA/block.ts +14 -0
- package/template/src/blocks/actions/cookieConsent/toDA/filter.ts +3 -0
- package/template/src/blocks/actions/cookieConsent/toDA/options.ts +19 -0
- package/template/src/blocks/actions/dynamicStore/boolean/set/block.ts +15 -0
- package/template/src/blocks/actions/dynamicStore/boolean/set/filter.ts +4 -0
- package/template/src/blocks/actions/dynamicStore/boolean/set/options.ts +18 -0
- package/template/src/blocks/actions/dynamicStore/boolean/toDA/block.ts +10 -0
- package/template/src/blocks/actions/dynamicStore/boolean/toDA/filter.ts +3 -0
- package/template/src/blocks/actions/dynamicStore/boolean/toDA/options.ts +12 -0
- package/template/src/blocks/actions/dynamicStore/text/cycle/block.ts +41 -0
- package/template/src/blocks/actions/dynamicStore/text/cycle/filter.ts +4 -0
- package/template/src/blocks/actions/dynamicStore/text/cycle/options.ts +23 -0
- package/template/src/blocks/actions/dynamicStore/text/toDA/block.ts +10 -0
- package/template/src/blocks/actions/dynamicStore/text/toDA/filter.ts +3 -0
- package/template/src/blocks/actions/dynamicStore/text/toDA/options.ts +12 -0
- package/template/src/blocks/actions/filters.ts +27 -0
- package/template/src/blocks/actions/form/errorToDA/block.ts +18 -0
- package/template/src/blocks/actions/form/errorToDA/filter.ts +3 -0
- package/template/src/blocks/actions/form/errorToDA/options.ts +15 -0
- package/template/src/blocks/actions/form/reset/block.ts +18 -0
- package/template/src/blocks/actions/form/reset/filter.ts +3 -0
- package/template/src/blocks/actions/form/reset/options.ts +30 -0
- package/template/src/blocks/actions/form/statusToDA/block.ts +12 -0
- package/template/src/blocks/actions/form/statusToDA/filter.ts +3 -0
- package/template/src/blocks/actions/form/statusToDA/options.ts +15 -0
- package/template/src/blocks/actions/form/submit/block.ts +18 -0
- package/template/src/blocks/actions/form/submit/filter.ts +3 -0
- package/template/src/blocks/actions/form/submit/options.ts +35 -0
- package/template/src/blocks/actions/portal/set/block.ts +25 -0
- package/template/src/blocks/actions/portal/set/filter.ts +3 -0
- package/template/src/blocks/actions/portal/set/options.ts +43 -0
- package/template/src/blocks/actions/processor.ts +263 -0
- package/template/src/blocks/actions/theme/set/block.ts +10 -0
- package/template/src/blocks/actions/theme/set/filter.ts +3 -0
- package/template/src/blocks/actions/theme/set/options.ts +9 -0
- package/template/src/blocks/actions/zap.ts +4 -0
- package/template/src/blocks/children/atomic/block.ts +123 -0
- package/template/src/blocks/children/atomic/controlBar.ts +43 -0
- package/template/src/blocks/children/atomic/variants/button/typeField.ts +16 -0
- package/template/src/blocks/children/atomic/variants/button/variants/link/component.client.tsx +21 -0
- package/template/src/blocks/children/atomic/variants/button/variants/link/component.tsx +13 -0
- package/template/src/blocks/children/atomic/variants/button/variants/link/controlBar.ts +73 -0
- package/template/src/blocks/children/atomic/variants/button/variants/link/settings.ts +26 -0
- package/template/src/blocks/children/atomic/variants/button/variants/portal/controlBar.ts +35 -0
- package/template/src/blocks/children/atomic/variants/button/variants/portal/dialog/component.tsx +36 -0
- package/template/src/blocks/children/atomic/variants/button/variants/portal/dialog/settings.ts +24 -0
- package/template/src/blocks/children/atomic/variants/button/variants/portal/popover/component.tsx +41 -0
- package/template/src/blocks/children/atomic/variants/button/variants/portal/popover/settings.ts +111 -0
- package/template/src/blocks/children/atomic/variants/button/variants/regular/component.client.tsx +19 -0
- package/template/src/blocks/children/atomic/variants/button/variants/regular/component.tsx +11 -0
- package/template/src/blocks/children/atomic/variants/form/component.tsx +18 -0
- package/template/src/blocks/children/atomic/variants/form/controlBar.ts +22 -0
- package/template/src/blocks/children/atomic/variants/form/settings.ts +20 -0
- package/template/src/blocks/children/atomic/variants/input/autoCompleteOptions.ts +51 -0
- package/template/src/blocks/children/atomic/variants/input/controlBar.ts +13 -0
- package/template/src/blocks/children/atomic/variants/input/settings.ts +35 -0
- package/template/src/blocks/children/atomic/variants/input/typeField.ts +23 -0
- package/template/src/blocks/children/atomic/variants/input/variants/checkBox/component.client.tsx +12 -0
- package/template/src/blocks/children/atomic/variants/input/variants/checkBox/component.tsx +6 -0
- package/template/src/blocks/children/atomic/variants/input/variants/checkBox/settings.ts +9 -0
- package/template/src/blocks/children/atomic/variants/input/variants/number/component.client.tsx +12 -0
- package/template/src/blocks/children/atomic/variants/input/variants/number/component.tsx +6 -0
- package/template/src/blocks/children/atomic/variants/input/variants/number/settings.ts +9 -0
- package/template/src/blocks/children/atomic/variants/input/variants/radio/component.client.tsx +12 -0
- package/template/src/blocks/children/atomic/variants/input/variants/radio/component.tsx +6 -0
- package/template/src/blocks/children/atomic/variants/input/variants/radio/settings.ts +9 -0
- package/template/src/blocks/children/atomic/variants/input/variants/text/component.client.tsx +12 -0
- package/template/src/blocks/children/atomic/variants/input/variants/text/component.tsx +7 -0
- package/template/src/blocks/children/atomic/variants/input/variants/text/settings.ts +12 -0
- package/template/src/blocks/children/atomic/variants/tag/component.client.tsx +17 -0
- package/template/src/blocks/children/atomic/variants/tag/component.tsx +13 -0
- package/template/src/blocks/children/atomic/variants/tag/controlBar.ts +6 -0
- package/template/src/blocks/children/atomic/variants/tag/settings.ts +9 -0
- package/template/src/blocks/children/blocks.ts +13 -0
- package/template/src/blocks/children/icon/block.ts +41 -0
- package/template/src/blocks/children/icon/component.tsx +17 -0
- package/template/src/blocks/children/image/block.ts +80 -0
- package/template/src/blocks/children/image/component.tsx +21 -0
- package/template/src/blocks/children/richText/block.ts +50 -0
- package/template/src/blocks/children/richText/component/converters/index.tsx +10 -0
- package/template/src/blocks/children/richText/component/converters/internalLink.tsx +8 -0
- package/template/src/blocks/children/richText/component/index.tsx +10 -0
- package/template/src/blocks/children/richText/component.tsx +7 -0
- package/template/src/blocks/children/richText/defaultLexical.ts +65 -0
- package/template/src/blocks/children/simpleText/block.ts +41 -0
- package/template/src/blocks/children/simpleText/component.client.tsx +18 -0
- package/template/src/blocks/children/simpleText/component.tsx +11 -0
- package/template/src/blocks/children/svg/block.ts +39 -0
- package/template/src/blocks/children/svg/component.tsx +6 -0
- package/template/src/blocks/children/video/block.ts +70 -0
- package/template/src/blocks/children/video/component.tsx +11 -0
- package/template/src/blocks/children/zap.ts +54 -0
- package/template/src/blocks/submitForm/form/rateLimiting/blocks.ts +5 -0
- package/template/src/blocks/submitForm/form/rateLimiting/functions.ts +1 -0
- package/template/src/blocks/submitForm/form/rateLimiting/simpleSlidingWindow/block.ts +23 -0
- package/template/src/blocks/submitForm/form/rateLimiting/simpleSlidingWindow/serverFunction.ts +46 -0
- package/template/src/blocks/submitForm/form/sanitation/blocks.ts +6 -0
- package/template/src/blocks/submitForm/form/sanitation/combineTwoFields/block.ts +19 -0
- package/template/src/blocks/submitForm/form/sanitation/combineTwoFields/serverFunction.ts +22 -0
- package/template/src/blocks/submitForm/form/sanitation/functions.ts +1 -0
- package/template/src/blocks/submitForm/form/validation/blocks.ts +6 -0
- package/template/src/blocks/submitForm/form/validation/functions.ts +1 -0
- package/template/src/blocks/submitForm/form/validation/isUnique/block.ts +19 -0
- package/template/src/blocks/submitForm/form/validation/isUnique/serverFunction.ts +40 -0
- package/template/src/blocks/submitForm/form/zap.ts +8 -0
- package/template/src/blocks/submitForm/formProcessor.ts +222 -0
- package/template/src/blocks/submitForm/input/sanitation/blocks.ts +5 -0
- package/template/src/blocks/submitForm/input/sanitation/functions.ts +1 -0
- package/template/src/blocks/submitForm/input/sanitation/trimText/block.ts +24 -0
- package/template/src/blocks/submitForm/input/sanitation/trimText/serverFunction.ts +63 -0
- package/template/src/blocks/submitForm/input/useOn.ts +8 -0
- package/template/src/blocks/submitForm/input/validation/blocks.ts +6 -0
- package/template/src/blocks/submitForm/input/validation/contains/block.ts +12 -0
- package/template/src/blocks/submitForm/input/validation/contains/serverFunction.ts +23 -0
- package/template/src/blocks/submitForm/input/validation/doesNotContain/block.ts +12 -0
- package/template/src/blocks/submitForm/input/validation/doesNotContain/serverFunction.ts +23 -0
- package/template/src/blocks/submitForm/input/validation/functions.ts +2 -0
- package/template/src/blocks/submitForm/input/zap.ts +6 -0
- package/template/src/blocks/submitForm/serverFunction.ts +42 -0
- package/template/src/collections/designSets/collection.ts +44 -0
- package/template/src/collections/designSets/defaults.ts +20 -0
- package/template/src/collections/designSets/tabs/animation.ts +71 -0
- package/template/src/collections/designSets/tabs/colors.ts +31 -0
- package/template/src/collections/designSets/tabs/fonts.ts +53 -0
- package/template/src/collections/designSets/tabs/miscellaneous.ts +22 -0
- package/template/src/collections/designSets/tabs/prose.ts +151 -0
- package/template/src/collections/designSets/tabs/settings.ts +52 -0
- package/template/src/collections/designSets/tabs/sizes.ts +30 -0
- package/template/src/collections/designSets/tabs/storage.ts +51 -0
- package/template/src/collections/designSets/tabs/variables.ts +28 -0
- package/template/src/collections/favicons.ts +11 -0
- package/template/src/collections/fonts/collection.ts +20 -0
- package/template/src/collections/fonts/script.ts +199 -0
- package/template/src/collections/footers/collection.ts +48 -0
- package/template/src/collections/footers/component.tsx +13 -0
- package/template/src/collections/headers/collection.ts +47 -0
- package/template/src/collections/headers/component.tsx +13 -0
- package/template/src/collections/iconSets/collection.ts +80 -0
- package/template/src/collections/iconSets/defaults.ts +81 -0
- package/template/src/collections/icons.ts +20 -0
- package/template/src/collections/images.ts +29 -0
- package/template/src/collections/index.ts +17 -0
- package/template/src/collections/muxVideos.ts +13 -0
- package/template/src/collections/pages/collection.ts +88 -0
- package/template/src/collections/pages/tabs/SEO.ts +70 -0
- package/template/src/collections/pages/tabs/settings.ts +17 -0
- package/template/src/collections/posthogProperty.ts +48 -0
- package/template/src/collections/shortcutSets/collection.ts +30 -0
- package/template/src/collections/shortcutSets/defaults.ts +1 -0
- package/template/src/collections/shortcutSets/protectedNames.ts +135 -0
- package/template/src/collections/shortcutSets/tabs/settings.ts +13 -0
- package/template/src/collections/shortcutSets/tabs/shortcuts.ts +70 -0
- package/template/src/collections/users.ts +11 -0
- package/template/src/collections/zap.ts +59 -0
- package/template/src/components/child/SSRProps.ts +381 -0
- package/template/src/components/child/renderChildren.tsx +148 -0
- package/template/src/components/livePreviewListener.tsx +10 -0
- package/template/src/components/providers/formProvider.tsx +11 -0
- package/template/src/components/providers/tracking/gtm.tsx +11 -0
- package/template/src/components/providers/tracking/index.tsx +46 -0
- package/template/src/components/providers/tracking/postHog.tsx +41 -0
- package/template/src/components/providers/tracking/vercel.tsx +10 -0
- package/template/src/components/toast/index.module.css +142 -0
- package/template/src/components/toast/index.tsx +55 -0
- package/template/src/endpoints/seed/backendForm.ts +48 -0
- package/template/src/endpoints/seed/designSet.ts +476 -0
- package/template/src/endpoints/seed/footer.ts +389 -0
- package/template/src/endpoints/seed/header.ts +3511 -0
- package/template/src/endpoints/seed/iconSet.ts +19 -0
- package/template/src/endpoints/seed/icons/assets/check.svg +4 -0
- package/template/src/endpoints/seed/icons/assets/close.svg +4 -0
- package/template/src/endpoints/seed/icons/assets/cookie.svg +7 -0
- package/template/src/endpoints/seed/icons/assets/github.svg +1 -0
- package/template/src/endpoints/seed/icons/assets/logo.svg +11 -0
- package/template/src/endpoints/seed/icons/assets/menu.svg +4 -0
- package/template/src/endpoints/seed/icons/assets/theme.svg +4 -0
- package/template/src/endpoints/seed/icons/check.ts +14 -0
- package/template/src/endpoints/seed/icons/close.ts +14 -0
- package/template/src/endpoints/seed/icons/cookie.ts +14 -0
- package/template/src/endpoints/seed/icons/github.ts +14 -0
- package/template/src/endpoints/seed/icons/index.ts +7 -0
- package/template/src/endpoints/seed/icons/logo.ts +14 -0
- package/template/src/endpoints/seed/icons/menu.ts +14 -0
- package/template/src/endpoints/seed/icons/theme.ts +14 -0
- package/template/src/endpoints/seed/index.ts +100 -0
- package/template/src/endpoints/seed/pages/home.ts +858 -0
- package/template/src/endpoints/seed/pages/index.ts +4 -0
- package/template/src/endpoints/seed/pages/notFoundPage.ts +287 -0
- package/template/src/endpoints/seed/pages/prose.ts +1436 -0
- package/template/src/endpoints/seed/pages/testing.ts +2181 -0
- package/template/src/endpoints/seed/shortcutSet.ts +187 -0
- package/template/src/endpoints/seed/siteMetaData.ts +10 -0
- package/template/src/fields/actions/changeKey.ts +12 -0
- package/template/src/fields/actions/index.ts +6 -0
- package/template/src/fields/actions/initialValueCheckbox.ts +14 -0
- package/template/src/fields/actions/keyText.ts +10 -0
- package/template/src/fields/actions/persisted.ts +14 -0
- package/template/src/fields/actions/setData.ts +20 -0
- package/template/src/fields/actions/strict/index.ts +3 -0
- package/template/src/fields/actions/strict/keySelect.ts +28 -0
- package/template/src/fields/actions/strict/listenSelect.ts +28 -0
- package/template/src/fields/actions/strict/performSelect.ts +30 -0
- package/template/src/fields/actions/strict/registry/cookieConsent.ts +14 -0
- package/template/src/fields/actions/strict/registry/index.ts +6 -0
- package/template/src/fields/actions/strict/registry/theme.ts +9 -0
- package/template/src/fields/active.ts +16 -0
- package/template/src/fields/apf/index.ts +69 -0
- package/template/src/fields/apf/storage.ts +38 -0
- package/template/src/fields/blocks/actions.ts +30 -0
- package/template/src/fields/blocks/backdropChildren.ts +11 -0
- package/template/src/fields/blocks/children.ts +15 -0
- package/template/src/fields/blocks/submitForm/form.ts +24 -0
- package/template/src/fields/blocks/submitForm/input.ts +25 -0
- package/template/src/fields/className.ts +26 -0
- package/template/src/fields/coloredEnd.ts +5 -0
- package/template/src/fields/defaultOpen.ts +14 -0
- package/template/src/fields/designSets/value.ts +80 -0
- package/template/src/fields/devMode.ts +11 -0
- package/template/src/fields/favicon.ts +18 -0
- package/template/src/fields/for.ts +11 -0
- package/template/src/fields/keepMounted.ts +11 -0
- package/template/src/fields/modal.ts +16 -0
- package/template/src/fields/slug.ts +35 -0
- package/template/src/fields/staticDataAttributes.ts +29 -0
- package/template/src/fields/tabs/block/children/actions.ts +49 -0
- package/template/src/fields/tabs/block/children/backdrop.ts +17 -0
- package/template/src/fields/tabs/block/children/settings.ts +45 -0
- package/template/src/fields/tabs/block/children/submitForm/form.ts +23 -0
- package/template/src/fields/tabs/block/children/submitForm/input.ts +14 -0
- package/template/src/fields/tabs/block/children/tracking.ts +25 -0
- package/template/src/fields/tabs/collection/storage.ts +55 -0
- package/template/src/fields/tagType.ts +32 -0
- package/template/src/fields/testPath.ts +3 -0
- package/template/src/fields/uniqueTitle.ts +8 -0
- package/template/src/fields/validationMessage.ts +13 -0
- package/template/src/globals/index.ts +8 -0
- package/template/src/globals/settings.ts +36 -0
- package/template/src/globals/siteMetaData.ts +29 -0
- package/template/src/globals/storage.ts +15 -0
- package/template/src/globals/tracking/global.ts +25 -0
- package/template/src/globals/tracking/tabs/gtm.ts +18 -0
- package/template/src/globals/tracking/tabs/postHog.ts +35 -0
- package/template/src/hooks/collection/atomicHook/atomicHook.ts +223 -0
- package/template/src/hooks/collection/atomicHook/processors/cssProcessor.ts +60 -0
- package/template/src/hooks/collection/atomicHook/processors/processDesignSet/generatePreflights.ts +36 -0
- package/template/src/hooks/collection/atomicHook/processors/processDesignSet/index.ts +176 -0
- package/template/src/hooks/collection/atomicHook/processors/unsetActive.ts +24 -0
- package/template/src/hooks/collection/formatSVG.ts +157 -0
- package/template/src/hooks/collection/revalidate.ts +53 -0
- package/template/src/hooks/collection/sanitizeCollection.ts +5 -0
- package/template/src/hooks/field/apf.ts +59 -0
- package/template/src/hooks/field/formatSlug.ts +23 -0
- package/template/src/hooks/field/href.ts +6 -0
- package/template/src/hooks/field/publishedAt.ts +5 -0
- package/template/src/hooks/frontEnd/atomicStore/create.ts +69 -0
- package/template/src/hooks/frontEnd/atomicStore/index.tsx +20 -0
- package/template/src/hooks/frontEnd/atomicStore/slices/base.ts +7 -0
- package/template/src/hooks/frontEnd/atomicStore/slices/consent.ts +76 -0
- package/template/src/hooks/frontEnd/atomicStore/slices/dynamic.ts +51 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/boolToDA/function.ts +14 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/boolToDA/zap.ts +12 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/cCToDA/function.ts +34 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/cCToDA/zap.ts +17 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/errorToDA/function.ts +22 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/errorToDA/zap.ts +10 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/function.ts +20 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/statusToDA/function.ts +24 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/statusToDA/zap.ts +10 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/textToDA/function.ts +21 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/textToDA/zap.ts +12 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/attributer/zap.ts +15 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/index.ts +2 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/cycleText/function.ts +30 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/cycleText/zap.ts +12 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/function.ts +21 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/resetForm/function.ts +7 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/resetForm/zap.ts +9 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setBool/function.ts +10 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setBool/zap.ts +11 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setCCs/function.ts +33 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setCCs/zap.ts +14 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setThemes/function.ts +11 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/setThemes/zap.ts +10 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/submitForm/function.ts +32 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/submitForm/zap.ts +9 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/runner/zap.ts +16 -0
- package/template/src/hooks/frontEnd/useActions/dispatch/zap.ts +2 -0
- package/template/src/hooks/frontEnd/useActions/index.ts +6 -0
- package/template/src/hooks/frontEnd/useActions/useActionContext.ts +21 -0
- package/template/src/hooks/frontEnd/useActions/useButtonActions.ts +17 -0
- package/template/src/hooks/frontEnd/useActions/useDaToText.ts +34 -0
- package/template/src/hooks/frontEnd/useActions/useForm.ts +114 -0
- package/template/src/hooks/frontEnd/useActions/usePortal.ts +33 -0
- package/template/src/hooks/frontEnd/useActions/useToDa.ts +12 -0
- package/template/src/hooks/global/revalidate.ts +26 -0
- package/template/src/payload.config.ts +78 -0
- package/template/src/plugins/blurDataUrls.ts +8 -0
- package/template/src/plugins/formBuilder.ts +40 -0
- package/template/src/plugins/index.ts +17 -0
- package/template/src/plugins/muxVideo.ts +13 -0
- package/template/src/plugins/nestedDocs.ts +9 -0
- package/template/src/plugins/vercelBlobStorage.ts +8 -0
- package/template/src/ts/JSONSchema.ts +93 -0
- package/template/src/ts/declarations.ts +24 -0
- package/template/src/ts/types/actions.ts +175 -0
- package/template/src/ts/types/apf.ts +108 -0
- package/template/src/ts/types/cache.ts +166 -0
- package/template/src/ts/types/css.ts +14 -0
- package/template/src/ts/types/forms.ts +214 -0
- package/template/src/ts/types/frontEnd.ts +115 -0
- package/template/src/ts/types/index.ts +49 -0
- package/template/src/ts/types/payload-types.ts +3684 -0
- package/template/src/ts/zap/ap.ts +82 -0
- package/template/src/ts/zap/index.ts +4 -0
- package/template/src/ui/apf/controls.tsx +88 -0
- package/template/src/ui/apf/field.tsx +81 -0
- package/template/src/ui/apf/index.scss +59 -0
- package/template/src/ui/apf/label.tsx +23 -0
- package/template/src/ui/assets/Icon.tsx +21 -0
- package/template/src/ui/assets/Logo.tsx +21 -0
- package/template/src/ui/assets/atomicIcon.tsx +27 -0
- package/template/src/ui/assets/warningIcon.ts +6 -0
- package/template/src/ui/blocks/actionBlock.tsx +44 -0
- package/template/src/ui/blocks/inputBlock.tsx +24 -0
- package/template/src/ui/decorative/coloredEnd.tsx +16 -0
- package/template/src/ui/decorative/index.scss +46 -0
- package/template/src/ui/fields/iconSelect/index.tsx +19 -0
- package/template/src/ui/fields/slug/index.scss +12 -0
- package/template/src/ui/fields/slug/index.tsx +72 -0
- package/template/src/ui/index.ts +32 -0
- package/template/src/ui/root/beforeDashboard/index.scss +22 -0
- package/template/src/ui/root/beforeDashboard/index.tsx +39 -0
- package/template/src/ui/root/beforeDashboard/seedButton/index.scss +12 -0
- package/template/src/ui/root/beforeDashboard/seedButton/index.tsx +84 -0
- package/template/src/ui/root/siteTriggers/index.scss +22 -0
- package/template/src/ui/root/siteTriggers/index.tsx +94 -0
- package/template/src/ui/root/siteTriggers/triggerVercelDeploy.ts +37 -0
- package/template/src/ui/rowLabels/animation.tsx +27 -0
- package/template/src/ui/rowLabels/atomic/index.scss +62 -0
- package/template/src/ui/rowLabels/atomic/index.tsx +96 -0
- package/template/src/ui/rowLabels/color.tsx +33 -0
- package/template/src/ui/rowLabels/designToken.tsx +30 -0
- package/template/src/ui/rowLabels/icon.tsx +32 -0
- package/template/src/ui/rowLabels/shortcut/index.scss +21 -0
- package/template/src/ui/rowLabels/shortcut/index.tsx +30 -0
- package/template/src/ui/rowLabels/simpleText.tsx +41 -0
- package/template/src/utilities/deepMerge.ts +30 -0
- package/template/src/utilities/extractSVG.ts +9 -0
- package/template/src/utilities/format/toKebabCase.ts +79 -0
- package/template/src/utilities/format/toTitleCase.ts +47 -0
- package/template/src/utilities/formatDurationWithTokens.ts +56 -0
- package/template/src/utilities/generateMetaData.ts +45 -0
- package/template/src/utilities/generatePreviewPath.ts +43 -0
- package/template/src/utilities/get/cache/getAtomicActions.ts +48 -0
- package/template/src/utilities/get/cache/getAtomicClasses.ts +20 -0
- package/template/src/utilities/get/cache/getDesignSet.ts +15 -0
- package/template/src/utilities/get/cache/getFooter.ts +17 -0
- package/template/src/utilities/get/cache/getFormSubmissions.ts +17 -0
- package/template/src/utilities/get/cache/getForms.ts +43 -0
- package/template/src/utilities/get/cache/getHeader.ts +17 -0
- package/template/src/utilities/get/cache/getIcon.ts +51 -0
- package/template/src/utilities/get/cache/getImage.ts +20 -0
- package/template/src/utilities/get/cache/getPage.ts +35 -0
- package/template/src/utilities/get/cache/getPages.ts +24 -0
- package/template/src/utilities/get/cache/getShortcutSet.ts +17 -0
- package/template/src/utilities/get/cache/getSiteCSS.ts +17 -0
- package/template/src/utilities/get/cache/getSiteMetadata.ts +14 -0
- package/template/src/utilities/get/cache/getSitemap.ts +50 -0
- package/template/src/utilities/get/cache/getTracking.ts +14 -0
- package/template/src/utilities/get/cache/index.ts +129 -0
- package/template/src/utilities/get/cache/react.ts +5 -0
- package/template/src/utilities/get/getImageURL.ts +20 -0
- package/template/src/utilities/get/getMeUser.ts +22 -0
- package/template/src/utilities/get/getURL.ts +20 -0
- package/template/src/utilities/log/cache.ts +8 -0
- package/template/src/utilities/log/manual.ts +11 -0
- package/template/src/utilities/log/revalidation.ts +6 -0
- package/template/src/utilities/mergeTags.ts +7 -0
- package/template/src/utilities/propertyApplicatorUtility.ts +20 -0
- package/template/src/utilities/revalidateTag.ts +55 -0
- package/template/src/utilities/runAPF.ts +10 -0
- package/template/src/utilities/sanitizeData.ts +24 -0
- package/template/src/utilities/seedNestedRelationship.ts +5 -0
- package/template/tailwind.config.js +9 -0
- package/template/tsconfig.json +49 -0
|
@@ -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,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,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,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
|
+
}
|