@tetherto/dev-websites-core 0.2.1 → 0.3.1
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/README.md +81 -9
- package/dist/analytics/GtmLoader.d.mts +14 -0
- package/dist/analytics/GtmLoader.d.mts.map +1 -0
- package/dist/analytics/GtmLoader.mjs +30 -0
- package/dist/analytics/GtmLoader.mjs.map +1 -0
- package/dist/analytics/createTrackedLink.d.mts +46 -0
- package/dist/analytics/createTrackedLink.d.mts.map +1 -0
- package/dist/analytics/createTrackedLink.mjs +36 -0
- package/dist/analytics/createTrackedLink.mjs.map +1 -0
- package/dist/analytics/index.d.mts +3 -0
- package/dist/analytics/index.mjs +3 -0
- package/dist/cms/index.d.mts +2 -2
- package/dist/cms/index.mjs +2 -2
- package/dist/{cms-5bS91IRZ.mjs → cms.mjs} +2 -2
- package/dist/cms.mjs.map +1 -0
- package/dist/i18n/index.d.mts +1 -1
- package/dist/i18n/index.mjs +1 -1
- package/dist/{i18n-Dy3VrbBw.mjs → i18n.mjs} +1 -1
- package/dist/i18n.mjs.map +1 -0
- package/dist/index.d.mts +214 -6
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +6 -6
- package/dist/{index-D36IEwUg.d.mts → index2.d.mts} +1 -1
- package/dist/index2.d.mts.map +1 -0
- package/dist/{index-tTs9h9BS.d.mts → index3.d.mts} +2 -2
- package/dist/index3.d.mts.map +1 -0
- package/dist/{index-Dyi7DDoO.d.mts → index4.d.mts} +1 -1
- package/dist/index4.d.mts.map +1 -0
- package/dist/index5.d.mts +6 -0
- package/dist/{logger-BPURnavq.mjs → logger.mjs} +1 -1
- package/dist/logger.mjs.map +1 -0
- package/dist/{readMediaBuffer-1C3QTpkO.d.mts → readMediaBuffer.d.mts} +1 -1
- package/dist/readMediaBuffer.d.mts.map +1 -0
- package/dist/{readMediaBuffer-DWkTbYVn.mjs → readMediaBuffer.mjs} +2 -2
- package/dist/readMediaBuffer.mjs.map +1 -0
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-e5XjgQ7l.mjs → seo.mjs} +3 -3
- package/dist/seo.mjs.map +1 -0
- package/dist/ui/a11y/focus.d.mts +6 -0
- package/dist/ui/a11y/focus.d.mts.map +1 -0
- package/dist/ui/a11y/focus.mjs +7 -0
- package/dist/ui/a11y/focus.mjs.map +1 -0
- package/dist/ui/a11y/index.d.mts +4 -0
- package/dist/ui/a11y/index.mjs +4 -0
- package/dist/ui/carousel/index.d.mts +3 -0
- package/dist/ui/carousel/index.mjs +3 -0
- package/dist/ui/components/Accordion/Accordion.d.mts +16 -0
- package/dist/ui/components/Accordion/Accordion.d.mts.map +1 -0
- package/dist/ui/components/Accordion/Accordion.mjs +51 -0
- package/dist/ui/components/Accordion/Accordion.mjs.map +1 -0
- package/dist/ui/components/Accordion/index.d.mts +2 -0
- package/dist/ui/components/Accordion/index.mjs +2 -0
- package/dist/ui/components/Avatar/Avatar.d.mts +9 -0
- package/dist/ui/components/Avatar/Avatar.d.mts.map +1 -0
- package/dist/ui/components/Avatar/Avatar.mjs +15 -0
- package/dist/ui/components/Avatar/Avatar.mjs.map +1 -0
- package/dist/ui/components/Avatar/index.d.mts +2 -0
- package/dist/ui/components/Avatar/index.mjs +2 -0
- package/dist/ui/components/Badge/Badge.d.mts +14 -0
- package/dist/ui/components/Badge/Badge.d.mts.map +1 -0
- package/dist/ui/components/Badge/Badge.mjs +30 -0
- package/dist/ui/components/Badge/Badge.mjs.map +1 -0
- package/dist/ui/components/Badge/index.d.mts +2 -0
- package/dist/ui/components/Badge/index.mjs +2 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts +24 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts.map +1 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.mjs +66 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.mjs.map +1 -0
- package/dist/ui/components/BadgeVersion/index.d.mts +2 -0
- package/dist/ui/components/BadgeVersion/index.mjs +2 -0
- package/dist/ui/components/Button/Button.d.mts +14 -0
- package/dist/ui/components/Button/Button.d.mts.map +1 -0
- package/dist/ui/components/Button/Button.mjs +48 -0
- package/dist/ui/components/Button/Button.mjs.map +1 -0
- package/dist/ui/components/Button/index.d.mts +2 -0
- package/dist/ui/components/Button/index.mjs +2 -0
- package/dist/ui/components/Card/Card.d.mts +14 -0
- package/dist/ui/components/Card/Card.d.mts.map +1 -0
- package/dist/ui/components/Card/Card.mjs +40 -0
- package/dist/ui/components/Card/Card.mjs.map +1 -0
- package/dist/ui/components/Card/index.d.mts +2 -0
- package/dist/ui/components/Card/index.mjs +2 -0
- package/dist/ui/components/Carousel/Carousel.d.mts +42 -0
- package/dist/ui/components/Carousel/Carousel.d.mts.map +1 -0
- package/dist/ui/components/Carousel/Carousel.mjs +164 -0
- package/dist/ui/components/Carousel/Carousel.mjs.map +1 -0
- package/dist/ui/components/Carousel/index.d.mts +2 -0
- package/dist/ui/components/Carousel/index.mjs +2 -0
- package/dist/ui/components/Checkbox/Checkbox.d.mts +8 -0
- package/dist/ui/components/Checkbox/Checkbox.d.mts.map +1 -0
- package/dist/ui/components/Checkbox/Checkbox.mjs +39 -0
- package/dist/ui/components/Checkbox/Checkbox.mjs.map +1 -0
- package/dist/ui/components/Checkbox/index.d.mts +2 -0
- package/dist/ui/components/Checkbox/index.mjs +2 -0
- package/dist/ui/components/CodeBlock/CodeBlock.d.mts +22 -0
- package/dist/ui/components/CodeBlock/CodeBlock.d.mts.map +1 -0
- package/dist/ui/components/CodeBlock/CodeBlock.mjs +66 -0
- package/dist/ui/components/CodeBlock/CodeBlock.mjs.map +1 -0
- package/dist/ui/components/CodeBlock/index.d.mts +2 -0
- package/dist/ui/components/CodeBlock/index.mjs +2 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts +19 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts.map +1 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs +59 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs.map +1 -0
- package/dist/ui/components/CodeBlockTabs/index.d.mts +2 -0
- package/dist/ui/components/CodeBlockTabs/index.mjs +2 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts +13 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts.map +1 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs +55 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
- package/dist/ui/components/CollapsibleSection/index.d.mts +2 -0
- package/dist/ui/components/CollapsibleSection/index.mjs +2 -0
- package/dist/ui/components/CopyButton/CopyButton.d.mts +12 -0
- package/dist/ui/components/CopyButton/CopyButton.d.mts.map +1 -0
- package/dist/ui/components/CopyButton/CopyButton.mjs +45 -0
- package/dist/ui/components/CopyButton/CopyButton.mjs.map +1 -0
- package/dist/ui/components/CopyButton/index.d.mts +2 -0
- package/dist/ui/components/CopyButton/index.mjs +2 -0
- package/dist/ui/components/Dialog/Dialog.d.mts +26 -0
- package/dist/ui/components/Dialog/Dialog.d.mts.map +1 -0
- package/dist/ui/components/Dialog/Dialog.mjs +79 -0
- package/dist/ui/components/Dialog/Dialog.mjs.map +1 -0
- package/dist/ui/components/Dialog/index.d.mts +2 -0
- package/dist/ui/components/Dialog/index.mjs +2 -0
- package/dist/ui/components/EmptyState/EmptyState.d.mts +18 -0
- package/dist/ui/components/EmptyState/EmptyState.d.mts.map +1 -0
- package/dist/ui/components/EmptyState/EmptyState.mjs +36 -0
- package/dist/ui/components/EmptyState/EmptyState.mjs.map +1 -0
- package/dist/ui/components/EmptyState/index.d.mts +2 -0
- package/dist/ui/components/EmptyState/index.mjs +2 -0
- package/dist/ui/components/FieldError/FieldError.d.mts +14 -0
- package/dist/ui/components/FieldError/FieldError.d.mts.map +1 -0
- package/dist/ui/components/FieldError/FieldError.mjs +19 -0
- package/dist/ui/components/FieldError/FieldError.mjs.map +1 -0
- package/dist/ui/components/FieldError/index.d.mts +2 -0
- package/dist/ui/components/FieldError/index.mjs +2 -0
- package/dist/ui/components/FormattedDate/FormattedDate.d.mts +15 -0
- package/dist/ui/components/FormattedDate/FormattedDate.d.mts.map +1 -0
- package/dist/ui/components/FormattedDate/FormattedDate.mjs +23 -0
- package/dist/ui/components/FormattedDate/FormattedDate.mjs.map +1 -0
- package/dist/ui/components/FormattedDate/index.d.mts +2 -0
- package/dist/ui/components/FormattedDate/index.mjs +2 -0
- package/dist/ui/components/IconButton/IconButton.d.mts +10 -0
- package/dist/ui/components/IconButton/IconButton.d.mts.map +1 -0
- package/dist/ui/components/IconButton/IconButton.mjs +19 -0
- package/dist/ui/components/IconButton/IconButton.mjs.map +1 -0
- package/dist/ui/components/IconButton/index.d.mts +2 -0
- package/dist/ui/components/IconButton/index.mjs +2 -0
- package/dist/ui/components/Input/Input.d.mts +12 -0
- package/dist/ui/components/Input/Input.d.mts.map +1 -0
- package/dist/ui/components/Input/Input.mjs +43 -0
- package/dist/ui/components/Input/Input.mjs.map +1 -0
- package/dist/ui/components/Input/index.d.mts +2 -0
- package/dist/ui/components/Input/index.mjs +2 -0
- package/dist/ui/components/Label/Label.d.mts +11 -0
- package/dist/ui/components/Label/Label.d.mts.map +1 -0
- package/dist/ui/components/Label/Label.mjs +18 -0
- package/dist/ui/components/Label/Label.mjs.map +1 -0
- package/dist/ui/components/Label/index.d.mts +2 -0
- package/dist/ui/components/Label/index.mjs +2 -0
- package/dist/ui/components/LazyVideo/LazyVideo.d.mts +23 -0
- package/dist/ui/components/LazyVideo/LazyVideo.d.mts.map +1 -0
- package/dist/ui/components/LazyVideo/LazyVideo.mjs +57 -0
- package/dist/ui/components/LazyVideo/LazyVideo.mjs.map +1 -0
- package/dist/ui/components/LazyVideo/index.d.mts +2 -0
- package/dist/ui/components/LazyVideo/index.mjs +2 -0
- package/dist/ui/components/Pagination/Pagination.d.mts +38 -0
- package/dist/ui/components/Pagination/Pagination.d.mts.map +1 -0
- package/dist/ui/components/Pagination/Pagination.mjs +110 -0
- package/dist/ui/components/Pagination/Pagination.mjs.map +1 -0
- package/dist/ui/components/Pagination/index.d.mts +2 -0
- package/dist/ui/components/Pagination/index.mjs +2 -0
- package/dist/ui/components/PaginationItem/PaginationItem.d.mts +15 -0
- package/dist/ui/components/PaginationItem/PaginationItem.d.mts.map +1 -0
- package/dist/ui/components/PaginationItem/PaginationItem.mjs +34 -0
- package/dist/ui/components/PaginationItem/PaginationItem.mjs.map +1 -0
- package/dist/ui/components/PaginationItem/index.d.mts +2 -0
- package/dist/ui/components/PaginationItem/index.mjs +2 -0
- package/dist/ui/components/PasswordInput/PasswordInput.d.mts +10 -0
- package/dist/ui/components/PasswordInput/PasswordInput.d.mts.map +1 -0
- package/dist/ui/components/PasswordInput/PasswordInput.mjs +39 -0
- package/dist/ui/components/PasswordInput/PasswordInput.mjs.map +1 -0
- package/dist/ui/components/PasswordInput/index.d.mts +2 -0
- package/dist/ui/components/PasswordInput/index.mjs +2 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts +20 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts.map +1 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.mjs +39 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.mjs.map +1 -0
- package/dist/ui/components/ProgressStepper/index.d.mts +2 -0
- package/dist/ui/components/ProgressStepper/index.mjs +2 -0
- package/dist/ui/components/Prose/Prose.d.mts +10 -0
- package/dist/ui/components/Prose/Prose.d.mts.map +1 -0
- package/dist/ui/components/Prose/Prose.mjs +19 -0
- package/dist/ui/components/Prose/Prose.mjs.map +1 -0
- package/dist/ui/components/Prose/index.d.mts +2 -0
- package/dist/ui/components/Prose/index.mjs +2 -0
- package/dist/ui/components/Radio/Radio.d.mts +8 -0
- package/dist/ui/components/Radio/Radio.d.mts.map +1 -0
- package/dist/ui/components/Radio/Radio.mjs +25 -0
- package/dist/ui/components/Radio/Radio.mjs.map +1 -0
- package/dist/ui/components/Radio/index.d.mts +2 -0
- package/dist/ui/components/Radio/index.mjs +2 -0
- package/dist/ui/components/Reveal/Reveal.d.mts +10 -0
- package/dist/ui/components/Reveal/Reveal.d.mts.map +1 -0
- package/dist/ui/components/Reveal/Reveal.mjs +18 -0
- package/dist/ui/components/Reveal/Reveal.mjs.map +1 -0
- package/dist/ui/components/Reveal/index.d.mts +2 -0
- package/dist/ui/components/Reveal/index.mjs +2 -0
- package/dist/ui/components/SearchInput/SearchInput.d.mts +15 -0
- package/dist/ui/components/SearchInput/SearchInput.d.mts.map +1 -0
- package/dist/ui/components/SearchInput/SearchInput.mjs +28 -0
- package/dist/ui/components/SearchInput/SearchInput.mjs.map +1 -0
- package/dist/ui/components/SearchInput/index.d.mts +2 -0
- package/dist/ui/components/SearchInput/index.mjs +2 -0
- package/dist/ui/components/Select/Select.d.mts +34 -0
- package/dist/ui/components/Select/Select.d.mts.map +1 -0
- package/dist/ui/components/Select/Select.mjs +167 -0
- package/dist/ui/components/Select/Select.mjs.map +1 -0
- package/dist/ui/components/Select/index.d.mts +2 -0
- package/dist/ui/components/Select/index.mjs +2 -0
- package/dist/ui/components/Sheet/Sheet.d.mts +19 -0
- package/dist/ui/components/Sheet/Sheet.d.mts.map +1 -0
- package/dist/ui/components/Sheet/Sheet.mjs +59 -0
- package/dist/ui/components/Sheet/Sheet.mjs.map +1 -0
- package/dist/ui/components/Sheet/index.d.mts +2 -0
- package/dist/ui/components/Sheet/index.mjs +2 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts +10 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts.map +1 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.mjs +31 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.mjs.map +1 -0
- package/dist/ui/components/StaggerReveal/index.d.mts +2 -0
- package/dist/ui/components/StaggerReveal/index.mjs +2 -0
- package/dist/ui/components/Stepper/Stepper.d.mts +15 -0
- package/dist/ui/components/Stepper/Stepper.d.mts.map +1 -0
- package/dist/ui/components/Stepper/Stepper.mjs +38 -0
- package/dist/ui/components/Stepper/Stepper.mjs.map +1 -0
- package/dist/ui/components/Stepper/index.d.mts +2 -0
- package/dist/ui/components/Stepper/index.mjs +2 -0
- package/dist/ui/components/Switch/Switch.d.mts +12 -0
- package/dist/ui/components/Switch/Switch.d.mts.map +1 -0
- package/dist/ui/components/Switch/Switch.mjs +34 -0
- package/dist/ui/components/Switch/Switch.mjs.map +1 -0
- package/dist/ui/components/Switch/index.d.mts +2 -0
- package/dist/ui/components/Switch/index.mjs +2 -0
- package/dist/ui/components/TextButton/TextButton.d.mts +9 -0
- package/dist/ui/components/TextButton/TextButton.d.mts.map +1 -0
- package/dist/ui/components/TextButton/TextButton.mjs +16 -0
- package/dist/ui/components/TextButton/TextButton.mjs.map +1 -0
- package/dist/ui/components/TextButton/index.d.mts +2 -0
- package/dist/ui/components/TextButton/index.mjs +2 -0
- package/dist/ui/components/Textarea/Textarea.d.mts +9 -0
- package/dist/ui/components/Textarea/Textarea.d.mts.map +1 -0
- package/dist/ui/components/Textarea/Textarea.mjs +27 -0
- package/dist/ui/components/Textarea/Textarea.mjs.map +1 -0
- package/dist/ui/components/Textarea/index.d.mts +2 -0
- package/dist/ui/components/Textarea/index.mjs +2 -0
- package/dist/ui/components/Toast/Toast.d.mts +20 -0
- package/dist/ui/components/Toast/Toast.d.mts.map +1 -0
- package/dist/ui/components/Toast/Toast.mjs +128 -0
- package/dist/ui/components/Toast/Toast.mjs.map +1 -0
- package/dist/ui/components/Toast/index.d.mts +2 -0
- package/dist/ui/components/Toast/index.mjs +2 -0
- package/dist/ui/components/Tooltip/Tooltip.d.mts +11 -0
- package/dist/ui/components/Tooltip/Tooltip.d.mts.map +1 -0
- package/dist/ui/components/Tooltip/Tooltip.mjs +20 -0
- package/dist/ui/components/Tooltip/Tooltip.mjs.map +1 -0
- package/dist/ui/components/Tooltip/index.d.mts +2 -0
- package/dist/ui/components/Tooltip/index.mjs +2 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts +7 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts.map +1 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs +13 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
- package/dist/ui/components/VisuallyHidden/index.d.mts +2 -0
- package/dist/ui/components/VisuallyHidden/index.mjs +2 -0
- package/dist/ui/hooks/index.d.mts +2 -0
- package/dist/ui/hooks/index.mjs +2 -0
- package/dist/ui/hooks/useInView.d.mts +13 -0
- package/dist/ui/hooks/useInView.d.mts.map +1 -0
- package/dist/ui/hooks/useInView.mjs +37 -0
- package/dist/ui/hooks/useInView.mjs.map +1 -0
- package/dist/ui/index.d.mts +81 -0
- package/dist/ui/index.mjs +40 -0
- package/dist/ui/theme/preset.d.mts +170 -0
- package/dist/ui/theme/preset.d.mts.map +1 -0
- package/dist/ui/theme/preset.mjs +143 -0
- package/dist/ui/theme/preset.mjs.map +1 -0
- package/dist/ui/utils/cn.d.mts +6 -0
- package/dist/ui/utils/cn.d.mts.map +1 -0
- package/dist/ui/utils/cn.mjs +42 -0
- package/dist/ui/utils/cn.mjs.map +1 -0
- package/dist/ui/utils/index.d.mts +2 -0
- package/dist/ui/utils/index.mjs +2 -0
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/{utils-CVVQQltg.mjs → utils.mjs} +1 -1
- package/dist/utils.mjs.map +1 -0
- package/package.json +76 -7
- package/src/ui/theme/preset.css +53 -0
- package/src/ui/theme/preset.ts +131 -0
- package/src/ui/theme/theme.css +12 -0
- package/src/ui/theme/tokens.css +57 -0
- package/dist/cms-5bS91IRZ.mjs.map +0 -1
- package/dist/i18n-Dy3VrbBw.mjs.map +0 -1
- package/dist/index-9B8SfwdR.d.mts +0 -214
- package/dist/index-9B8SfwdR.d.mts.map +0 -1
- package/dist/index-D36IEwUg.d.mts.map +0 -1
- package/dist/index-Dyi7DDoO.d.mts.map +0 -1
- package/dist/index-tTs9h9BS.d.mts.map +0 -1
- package/dist/logger-BPURnavq.mjs.map +0 -1
- package/dist/readMediaBuffer-1C3QTpkO.d.mts.map +0 -1
- package/dist/readMediaBuffer-DWkTbYVn.mjs.map +0 -1
- package/dist/seo-e5XjgQ7l.mjs.map +0 -1
- package/dist/utils-CVVQQltg.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# `@tetherto/dev-websites-core`
|
|
2
2
|
|
|
3
|
-
Shared
|
|
4
|
-
|
|
5
|
-
| Import
|
|
6
|
-
|
|
|
7
|
-
| `@tetherto/dev-websites-core/cms`
|
|
8
|
-
| `@tetherto/dev-websites-core/seo`
|
|
9
|
-
| `@tetherto/dev-websites-core/i18n`
|
|
10
|
-
| `@tetherto/dev-websites-core/utils` | `createLogger`, `toPlainValue`, `stripShikiPreBackground`
|
|
3
|
+
Shared CMS, SEO, i18n, utils, UI, and analytics primitives for WDK / QVAC / PEAR / MDK websites.
|
|
4
|
+
|
|
5
|
+
| Import | Contents |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `@tetherto/dev-websites-core/cms` | Payload `buildCmsConfig`, stock collections, access, Lexical, media I/O |
|
|
8
|
+
| `@tetherto/dev-websites-core/seo` | `createMetadataFactory`, `getSiteUrl`, `getOgBackgroundDataUrl` |
|
|
9
|
+
| `@tetherto/dev-websites-core/i18n` | `Languages` / `LanguageLabel` |
|
|
10
|
+
| `@tetherto/dev-websites-core/utils` | `createLogger`, `toPlainValue`, `stripShikiPreBackground` |
|
|
11
|
+
| `@tetherto/dev-websites-core/analytics` | `GtmLoader`, `createTrackedLink` (optional `@next/third-parties` peer) |
|
|
12
|
+
| `@tetherto/dev-websites-core/ui` | UI primitives (`Button`, `Dialog`, `Pagination`, `Tooltip`, …) + `cn` |
|
|
13
|
+
| `@tetherto/dev-websites-core/ui/a11y` | `focusRingClassName`, `VisuallyHidden` |
|
|
14
|
+
| `@tetherto/dev-websites-core/ui/carousel` | `Carousel` (+ optional `embla-carousel-react` peer) |
|
|
15
|
+
| `@tetherto/dev-websites-core/ui/theme.css` | One-shot: tokens + Tailwind v4 `@theme` preset |
|
|
16
|
+
| `@tetherto/dev-websites-core/ui/theme/tokens.css` | CSS variables (HSL channels) |
|
|
17
|
+
| `@tetherto/dev-websites-core/ui/theme/preset.css` | Tailwind v4 `@theme` map |
|
|
18
|
+
| `@tetherto/dev-websites-core/ui/theme/preset` | JS Tailwind preset for `tailwind.config.ts` |
|
|
11
19
|
|
|
12
20
|
### Install
|
|
13
21
|
|
|
@@ -43,6 +51,65 @@ rm -rf node_modules/@tetherto/dev-websites-core && npm install @tetherto/dev-web
|
|
|
43
51
|
Do **not** import `@tetherto/dev-websites-core/cms` from Client Components — it includes Node-only
|
|
44
52
|
modules (`fs`, Payload, S3). Prefer domain subpaths over the root barrel.
|
|
45
53
|
|
|
54
|
+
### Analytics
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { GtmLoader, createTrackedLink } from '@tetherto/dev-websites-core/analytics'
|
|
58
|
+
import { Link } from '@/i18n/navigation'
|
|
59
|
+
import { analytics } from '@/lib/analytics'
|
|
60
|
+
|
|
61
|
+
// Delay GTM until window.load (optional `@next/third-parties` peer)
|
|
62
|
+
<GtmLoader gtmId={gtmId} />
|
|
63
|
+
|
|
64
|
+
// App owns Link + event catalog; core owns click wiring
|
|
65
|
+
export const TrackedLink = createTrackedLink(Link, {
|
|
66
|
+
docsClicked: analytics.docsClicked,
|
|
67
|
+
getStartedClicked: analytics.getStartedClicked,
|
|
68
|
+
externalLinkClicked: analytics.externalLinkClicked,
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### UI theming
|
|
73
|
+
|
|
74
|
+
One **Tailwind theme contract** for all sites (same utility names). Defaults are
|
|
75
|
+
**WDK**. QVAC (and future apps) override values only.
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
// core: @tetherto/dev-websites-core/ui/theme/preset
|
|
79
|
+
// — full theme.extend (colors, type scale, radii, btn sizing)
|
|
80
|
+
|
|
81
|
+
// WDK
|
|
82
|
+
import uiPreset from '@tetherto/dev-websites-core/ui/theme/preset'
|
|
83
|
+
export default {
|
|
84
|
+
presets: [uiPreset],
|
|
85
|
+
content: [/* app + dist/ui */],
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// QVAC — same keys, different CSS variables / brand values
|
|
89
|
+
import uiPreset from '@tetherto/dev-websites-core/ui/theme/preset'
|
|
90
|
+
export default {
|
|
91
|
+
presets: [uiPreset],
|
|
92
|
+
content: [/* app + dist/ui */],
|
|
93
|
+
theme: {
|
|
94
|
+
extend: {
|
|
95
|
+
colors: {
|
|
96
|
+
accent: { DEFAULT: 'hsl(var(--color-text-action) / <alpha-value>)', /* … */ },
|
|
97
|
+
// …
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Apps define the CSS variables the preset references (`--color-bg-base`,
|
|
105
|
+
`--color-accent`, …). QVAC also aliases those names onto its Figma tokens in
|
|
106
|
+
`globals.css`. Product-only utilities (e.g. QVAC `text-heading`) stay in the
|
|
107
|
+
app config until migrated onto the shared names.
|
|
108
|
+
|
|
109
|
+
Optional CSS helpers: `ui/theme/tokens.css`, `ui/theme/preset.css`, `ui/theme.css`
|
|
110
|
+
(short-name contract / Tailwind v4 `@theme`). The JS preset above is the source
|
|
111
|
+
of truth for WDK/QVAC.
|
|
112
|
+
|
|
46
113
|
### CMS stock
|
|
47
114
|
|
|
48
115
|
Registered by `buildCmsConfig` in this order. Disable or extend any of them via
|
|
@@ -69,10 +136,15 @@ to stock hooks, not replaced.
|
|
|
69
136
|
|
|
70
137
|
### Peer dependencies
|
|
71
138
|
|
|
72
|
-
|
|
139
|
+
CMS / Next (required for `/cms` consumers):
|
|
73
140
|
`payload`, `@payloadcms/richtext-lexical`, `@payloadcms/storage-s3`,
|
|
74
141
|
`@aws-sdk/client-s3`, `next`.
|
|
75
142
|
|
|
143
|
+
UI (required for `/ui` consumers):
|
|
144
|
+
`react`, `react-dom`, `@radix-ui/react-*` (dialog, dropdown-menu, primitive, slot, tooltip),
|
|
145
|
+
`class-variance-authority`, `clsx`, `tailwind-merge`. Optional: `react-icons`,
|
|
146
|
+
`embla-carousel-react` (carousel entry only).
|
|
147
|
+
|
|
76
148
|
### Environment variables
|
|
77
149
|
|
|
78
150
|
Read from `process.env` at runtime by the package — **set them in the consuming
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/analytics/GtmLoader.d.ts
|
|
2
|
+
type GtmLoaderProps = {
|
|
3
|
+
gtmId: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Wraps `@next/third-parties` `GoogleTagManager` and delays mounting it until
|
|
7
|
+
* the page has fully loaded (`window.load`). The Next.js helper itself uses
|
|
8
|
+
* `next/script` with `afterInteractive`, which would otherwise inject GTM
|
|
9
|
+
* during hydration and contribute to TBT.
|
|
10
|
+
*/
|
|
11
|
+
declare function GtmLoader({ gtmId }: GtmLoaderProps): import("react").JSX.Element | null;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { GtmLoader, GtmLoaderProps };
|
|
14
|
+
//# sourceMappingURL=GtmLoader.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GtmLoader.d.mts","names":[],"sources":["../../src/analytics/GtmLoader.tsx"],"mappings":";KAKY;EACV;;;;;;;;iBASc,YAAY,SAAS,iCAAc,IAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { GoogleTagManager } from "@next/third-parties/google";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/analytics/GtmLoader.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Wraps `@next/third-parties` `GoogleTagManager` and delays mounting it until
|
|
8
|
+
* the page has fully loaded (`window.load`). The Next.js helper itself uses
|
|
9
|
+
* `next/script` with `afterInteractive`, which would otherwise inject GTM
|
|
10
|
+
* during hydration and contribute to TBT.
|
|
11
|
+
*/
|
|
12
|
+
function GtmLoader({ gtmId }) {
|
|
13
|
+
const [ready, setReady] = useState(false);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!gtmId) return;
|
|
16
|
+
const onLoad = () => setReady(true);
|
|
17
|
+
if (document.readyState === "complete") {
|
|
18
|
+
const id = window.setTimeout(onLoad, 0);
|
|
19
|
+
return () => window.clearTimeout(id);
|
|
20
|
+
}
|
|
21
|
+
window.addEventListener("load", onLoad, { once: true });
|
|
22
|
+
return () => window.removeEventListener("load", onLoad);
|
|
23
|
+
}, [gtmId]);
|
|
24
|
+
if (!ready) return null;
|
|
25
|
+
return /* @__PURE__ */ jsx(GoogleTagManager, { gtmId });
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { GtmLoader };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=GtmLoader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GtmLoader.mjs","names":[],"sources":["../../src/analytics/GtmLoader.tsx"],"sourcesContent":["'use client'\n\nimport { GoogleTagManager } from '@next/third-parties/google'\nimport { useEffect, useState } from 'react'\n\nexport type GtmLoaderProps = {\n gtmId: string\n}\n\n/**\n * Wraps `@next/third-parties` `GoogleTagManager` and delays mounting it until\n * the page has fully loaded (`window.load`). The Next.js helper itself uses\n * `next/script` with `afterInteractive`, which would otherwise inject GTM\n * during hydration and contribute to TBT.\n */\nexport function GtmLoader({ gtmId }: GtmLoaderProps) {\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n if (!gtmId) return\n\n const onLoad = () => setReady(true)\n\n if (document.readyState === 'complete') {\n // Defer one tick so this doesn't fire a synchronous setState during the\n // effect (and to give the browser a frame to settle after `load`).\n const id = window.setTimeout(onLoad, 0)\n return () => window.clearTimeout(id)\n }\n\n window.addEventListener('load', onLoad, { once: true })\n return () => window.removeEventListener('load', onLoad)\n }, [gtmId])\n\n if (!ready) return null\n return <GoogleTagManager gtmId={gtmId} />\n}\n"],"mappings":";;;;;;;;;;;AAeA,SAAgB,UAAU,EAAE,SAAyB;CACnD,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CAExC,gBAAgB;EACd,IAAI,CAAC,OAAO;EAEZ,MAAM,eAAe,SAAS,IAAI;EAElC,IAAI,SAAS,eAAe,YAAY;GAGtC,MAAM,KAAK,OAAO,WAAW,QAAQ,CAAC;GACtC,aAAa,OAAO,aAAa,EAAE;EACrC;EAEA,OAAO,iBAAiB,QAAQ,QAAQ,EAAE,MAAM,KAAK,CAAC;EACtD,aAAa,OAAO,oBAAoB,QAAQ,MAAM;CACxD,GAAG,CAAC,KAAK,CAAC;CAEV,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,oBAAC,kBAAD,EAAyB,MAAQ,CAAA;AAC1C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, ReactElement } from "react";
|
|
2
|
+
//#region src/analytics/createTrackedLink.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Discriminated tracking props. Apps keep tight `Section` / destination unions;
|
|
5
|
+
* pass them as generics to `createTrackedLink`.
|
|
6
|
+
*/
|
|
7
|
+
type CreateTrackedEvent<TSection extends string, TDestination extends string> = {
|
|
8
|
+
event?: never;
|
|
9
|
+
section?: never;
|
|
10
|
+
destination?: never;
|
|
11
|
+
} | {
|
|
12
|
+
event: 'docs_clicked';
|
|
13
|
+
section: TSection;
|
|
14
|
+
destination?: string;
|
|
15
|
+
} | {
|
|
16
|
+
event: 'get_started_clicked';
|
|
17
|
+
section: TSection;
|
|
18
|
+
destination?: never;
|
|
19
|
+
} | {
|
|
20
|
+
event: 'external_link_clicked';
|
|
21
|
+
section: TSection;
|
|
22
|
+
destination: TDestination;
|
|
23
|
+
};
|
|
24
|
+
type TrackedCapture<TSection extends string, TDestination extends string> = {
|
|
25
|
+
docsClicked: (p: {
|
|
26
|
+
section: TSection;
|
|
27
|
+
destination?: string;
|
|
28
|
+
}) => void;
|
|
29
|
+
getStartedClicked: (p: {
|
|
30
|
+
section: TSection;
|
|
31
|
+
}) => void;
|
|
32
|
+
externalLinkClicked: (p: {
|
|
33
|
+
destination: TDestination;
|
|
34
|
+
section: TSection;
|
|
35
|
+
}) => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Builds a site `TrackedLink` that wraps the app's Link (`next-intl` navigation
|
|
39
|
+
* Link or `next/link`) and fires the provided capture callbacks.
|
|
40
|
+
*
|
|
41
|
+
* Routing and event catalogs stay in the app — core only owns the click wiring.
|
|
42
|
+
*/
|
|
43
|
+
declare function createTrackedLink<TLink extends ElementType, TSection extends string = string, TDestination extends string = string>(Link: TLink, capture: TrackedCapture<TSection, TDestination>): (props: ComponentPropsWithoutRef<TLink> & CreateTrackedEvent<TSection, TDestination>) => ReactElement;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { CreateTrackedEvent, type CreateTrackedEvent as TrackedEvent, TrackedCapture, createTrackedLink };
|
|
46
|
+
//# sourceMappingURL=createTrackedLink.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTrackedLink.d.mts","names":[],"sources":["../../src/analytics/createTrackedLink.tsx"],"mappings":";;;;;;KAcY,mBAAmB,yBAAyB;EAClD;EAAe;EAAiB;;EAChC;EAAuB,SAAS;EAAU;;EAC1C;EAA8B,SAAS;EAAU;;EAEjD;EACA,SAAS;EACT,aAAa;;KAGP,eAAe,yBAAyB;EAClD,cAAc;IAAK,SAAS;IAAU;;EACtC,oBAAoB;IAAK,SAAS;;EAClC,sBAAsB;IAAK,aAAa;IAAc,SAAS;;;;;;;;;iBASjD,kBACd,cAAc,aACd,kCACA,sCACA,MAAM,OAAO,SAAS,eAAe,UAAU,iBAsCxB,OAAK,yBAAA,SAAA,mBAAA,UAAA,kBAAuB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
//#region src/analytics/createTrackedLink.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Builds a site `TrackedLink` that wraps the app's Link (`next-intl` navigation
|
|
6
|
+
* Link or `next/link`) and fires the provided capture callbacks.
|
|
7
|
+
*
|
|
8
|
+
* Routing and event catalogs stay in the app — core only owns the click wiring.
|
|
9
|
+
*/
|
|
10
|
+
function createTrackedLink(Link, capture) {
|
|
11
|
+
function TrackedLink(props) {
|
|
12
|
+
const { event, section, destination, onClick, href, ...rest } = props;
|
|
13
|
+
const handleClick = (e) => {
|
|
14
|
+
if (event === "docs_clicked" && section) capture.docsClicked({
|
|
15
|
+
section,
|
|
16
|
+
destination: destination ?? String(href)
|
|
17
|
+
});
|
|
18
|
+
else if (event === "get_started_clicked" && section) capture.getStartedClicked({ section });
|
|
19
|
+
else if (event === "external_link_clicked" && section && destination) capture.externalLinkClicked({
|
|
20
|
+
section,
|
|
21
|
+
destination
|
|
22
|
+
});
|
|
23
|
+
onClick?.(e);
|
|
24
|
+
};
|
|
25
|
+
return createElement(Link, {
|
|
26
|
+
...rest,
|
|
27
|
+
href,
|
|
28
|
+
onClick: handleClick
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return TrackedLink;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { createTrackedLink };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=createTrackedLink.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTrackedLink.mjs","names":[],"sources":["../../src/analytics/createTrackedLink.tsx"],"sourcesContent":["'use client'\n\nimport {\n createElement,\n type ComponentPropsWithoutRef,\n type ElementType,\n type MouseEvent,\n type ReactElement,\n} from 'react'\n\n/**\n * Discriminated tracking props. Apps keep tight `Section` / destination unions;\n * pass them as generics to `createTrackedLink`.\n */\nexport type CreateTrackedEvent<TSection extends string, TDestination extends string> =\n | { event?: never; section?: never; destination?: never }\n | { event: 'docs_clicked'; section: TSection; destination?: string }\n | { event: 'get_started_clicked'; section: TSection; destination?: never }\n | {\n event: 'external_link_clicked'\n section: TSection\n destination: TDestination\n }\n\nexport type TrackedCapture<TSection extends string, TDestination extends string> = {\n docsClicked: (p: { section: TSection; destination?: string }) => void\n getStartedClicked: (p: { section: TSection }) => void\n externalLinkClicked: (p: { destination: TDestination; section: TSection }) => void\n}\n\n/**\n * Builds a site `TrackedLink` that wraps the app's Link (`next-intl` navigation\n * Link or `next/link`) and fires the provided capture callbacks.\n *\n * Routing and event catalogs stay in the app — core only owns the click wiring.\n */\nexport function createTrackedLink<\n TLink extends ElementType,\n TSection extends string = string,\n TDestination extends string = string,\n>(Link: TLink, capture: TrackedCapture<TSection, TDestination>) {\n type LinkProps = ComponentPropsWithoutRef<TLink>\n type TrackedEvent = CreateTrackedEvent<TSection, TDestination>\n type TrackedLinkProps = LinkProps & TrackedEvent\n\n function TrackedLink(props: TrackedLinkProps): ReactElement {\n const { event, section, destination, onClick, href, ...rest } = props as TrackedLinkProps & {\n event?: TrackedEvent['event']\n section?: TSection\n destination?: string\n onClick?: (e: MouseEvent<HTMLAnchorElement>) => void\n href?: unknown\n }\n\n const handleClick = (e: MouseEvent<HTMLAnchorElement>) => {\n if (event === 'docs_clicked' && section) {\n capture.docsClicked({\n section,\n destination: (destination as string | undefined) ?? String(href),\n })\n } else if (event === 'get_started_clicked' && section) {\n capture.getStartedClicked({ section })\n } else if (event === 'external_link_clicked' && section && destination) {\n capture.externalLinkClicked({\n section,\n destination: destination as TDestination,\n })\n }\n onClick?.(e)\n }\n\n return createElement(Link, {\n ...(rest as LinkProps),\n href,\n onClick: handleClick,\n } as LinkProps)\n }\n\n return TrackedLink as (props: TrackedLinkProps) => ReactElement\n}\n\nexport type { CreateTrackedEvent as TrackedEvent }\n"],"mappings":";;;;;;;;;AAoCA,SAAgB,kBAId,MAAa,SAAiD;CAK9D,SAAS,YAAY,OAAuC;EAC1D,MAAM,EAAE,OAAO,SAAS,aAAa,SAAS,MAAM,GAAG,SAAS;EAQhE,MAAM,eAAe,MAAqC;GACxD,IAAI,UAAU,kBAAkB,SAC9B,QAAQ,YAAY;IAClB;IACA,aAAc,eAAsC,OAAO,IAAI;GACjE,CAAC;QACI,IAAI,UAAU,yBAAyB,SAC5C,QAAQ,kBAAkB,EAAE,QAAQ,CAAC;QAChC,IAAI,UAAU,2BAA2B,WAAW,aACzD,QAAQ,oBAAoB;IAC1B;IACa;GACf,CAAC;GAEH,UAAU,CAAC;EACb;EAEA,OAAO,cAAc,MAAM;GACzB,GAAI;GACJ;GACA,SAAS;EACX,CAAc;CAChB;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GtmLoader, GtmLoaderProps } from "./GtmLoader.mjs";
|
|
2
|
+
import { CreateTrackedEvent, TrackedCapture, createTrackedLink } from "./createTrackedLink.mjs";
|
|
3
|
+
export { type CreateTrackedEvent, GtmLoader, type GtmLoaderProps, type TrackedCapture, type CreateTrackedEvent as TrackedEvent, createTrackedLink };
|
package/dist/cms/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as codeTabsBlock, B as STOCK_COLLECTION_SLUGS, C as leafBlocks, D as downloadCtaBlock, E as stepsBlock, F as seoFields, G as applyGlobalOverride, H as CollectionOverride, I as draftsWithAutosave, J as createAccessHelpers, K as AccessHelpers, L as BuildCmsConfigOptions, M as richTextBlock, N as setPublishedAt, O as videoBlock, P as slugify, R as buildCmsConfig, S as languageOptions, T as accordionBlock, U as GlobalOverride, V as StockCollectionSlug, W as applyCollectionOverride, _ as blogContentBlocks, a as createPages, b as codeBlockLanguages, c as createAuthors, d as createUsers, f as CreateS3MediaPluginOptions, g as richTextEditor, h as getRichTextEditorConfig, i as createLegalPages, j as codeBlock, k as imageBlock, l as createMedia, m as requireEnvAtRuntime, n as createChangelog, o as createBlogPosts, p as createS3MediaPlugin, q as AccessOptions, r as createChangelogTags, s as createCategories, t as createSiteSettings, u as createApiTokens, v as pageContentBlocks, w as sectionHeadingBlock, x as defaultCodeLanguage, y as showcaseContentBlocks, z as Overrides } from "../index
|
|
2
|
-
import { n as readPayloadMediaAsDataUrl, r as readPayloadMediaBuffer, t as PayloadMedia } from "../readMediaBuffer
|
|
1
|
+
import { A as codeTabsBlock, B as STOCK_COLLECTION_SLUGS, C as leafBlocks, D as downloadCtaBlock, E as stepsBlock, F as seoFields, G as applyGlobalOverride, H as CollectionOverride, I as draftsWithAutosave, J as createAccessHelpers, K as AccessHelpers, L as BuildCmsConfigOptions, M as richTextBlock, N as setPublishedAt, O as videoBlock, P as slugify, R as buildCmsConfig, S as languageOptions, T as accordionBlock, U as GlobalOverride, V as StockCollectionSlug, W as applyCollectionOverride, _ as blogContentBlocks, a as createPages, b as codeBlockLanguages, c as createAuthors, d as createUsers, f as CreateS3MediaPluginOptions, g as richTextEditor, h as getRichTextEditorConfig, i as createLegalPages, j as codeBlock, k as imageBlock, l as createMedia, m as requireEnvAtRuntime, n as createChangelog, o as createBlogPosts, p as createS3MediaPlugin, q as AccessOptions, r as createChangelogTags, s as createCategories, t as createSiteSettings, u as createApiTokens, v as pageContentBlocks, w as sectionHeadingBlock, x as defaultCodeLanguage, y as showcaseContentBlocks, z as Overrides } from "../index.mjs";
|
|
2
|
+
import { n as readPayloadMediaAsDataUrl, r as readPayloadMediaBuffer, t as PayloadMedia } from "../readMediaBuffer.mjs";
|
|
3
3
|
export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateS3MediaPluginOptions, type GlobalOverride, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
package/dist/cms/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as downloadCtaBlock, B as createAccessHelpers, C as leafBlocks, D as richTextEditor, E as getRichTextEditorConfig, F as languageOptions, I as createAuthors, L as seoFields, M as codeBlock, N as codeBlockLanguages, O as videoBlock, P as defaultCodeLanguage, R as slugify, S as accordionBlock, T as richTextBlock, _ as setPublishedAt, a as applyCollectionOverride, b as showcaseContentBlocks, c as createUsers, d as createMedia, f as createChangelogTags, g as draftsWithAutosave, h as createBlogPosts, i as STOCK_COLLECTION_SLUGS, j as codeTabsBlock, k as imageBlock, l as createLegalPages, m as createCategories, n as requireEnvAtRuntime, o as applyGlobalOverride, p as createChangelog, r as buildCmsConfig, s as createSiteSettings, t as createS3MediaPlugin, u as createPages, v as blogContentBlocks, w as stepsBlock, x as sectionHeadingBlock, y as pageContentBlocks, z as createApiTokens } from "../cms
|
|
2
|
-
import { n as readPayloadMediaBuffer, t as readPayloadMediaAsDataUrl } from "../readMediaBuffer
|
|
1
|
+
import { A as downloadCtaBlock, B as createAccessHelpers, C as leafBlocks, D as richTextEditor, E as getRichTextEditorConfig, F as languageOptions, I as createAuthors, L as seoFields, M as codeBlock, N as codeBlockLanguages, O as videoBlock, P as defaultCodeLanguage, R as slugify, S as accordionBlock, T as richTextBlock, _ as setPublishedAt, a as applyCollectionOverride, b as showcaseContentBlocks, c as createUsers, d as createMedia, f as createChangelogTags, g as draftsWithAutosave, h as createBlogPosts, i as STOCK_COLLECTION_SLUGS, j as codeTabsBlock, k as imageBlock, l as createLegalPages, m as createCategories, n as requireEnvAtRuntime, o as applyGlobalOverride, p as createChangelog, r as buildCmsConfig, s as createSiteSettings, t as createS3MediaPlugin, u as createPages, v as blogContentBlocks, w as stepsBlock, x as sectionHeadingBlock, y as pageContentBlocks, z as createApiTokens } from "../cms.mjs";
|
|
2
|
+
import { n as readPayloadMediaBuffer, t as readPayloadMediaAsDataUrl } from "../readMediaBuffer.mjs";
|
|
3
3
|
export { STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createLogger } from "./logger
|
|
1
|
+
import { t as createLogger } from "./logger.mjs";
|
|
2
2
|
import { buildConfig } from "payload";
|
|
3
3
|
import { BlocksFeature, CodeBlock, EXPERIMENTAL_TableFeature, UploadFeature, editorConfigFactory, lexicalEditor } from "@payloadcms/richtext-lexical";
|
|
4
4
|
import { s3Storage } from "@payloadcms/storage-s3";
|
|
@@ -1416,4 +1416,4 @@ function createS3MediaPlugin(options = {}) {
|
|
|
1416
1416
|
//#endregion
|
|
1417
1417
|
export { downloadCtaBlock as A, createAccessHelpers as B, leafBlocks as C, richTextEditor as D, getRichTextEditorConfig as E, languageOptions as F, createAuthors as I, seoFields as L, codeBlock as M, codeBlockLanguages as N, videoBlock as O, defaultCodeLanguage as P, slugify as R, accordionBlock as S, richTextBlock as T, setPublishedAt as _, applyCollectionOverride as a, showcaseContentBlocks as b, createUsers as c, createMedia as d, createChangelogTags as f, draftsWithAutosave as g, createBlogPosts as h, STOCK_COLLECTION_SLUGS as i, codeTabsBlock as j, imageBlock as k, createLegalPages as l, createCategories as m, requireEnvAtRuntime as n, applyGlobalOverride as o, createChangelog as p, buildCmsConfig as r, createSiteSettings as s, createS3MediaPlugin as t, createPages as u, blogContentBlocks as v, stepsBlock as w, sectionHeadingBlock as x, pageContentBlocks as y, createApiTokens as z };
|
|
1418
1418
|
|
|
1419
|
-
//# sourceMappingURL=cms
|
|
1419
|
+
//# sourceMappingURL=cms.mjs.map
|
package/dist/cms.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cms.mjs","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/collections/createApiTokens.ts","../src/cms/hooks/slugify.ts","../src/cms/shared/seo-fields.ts","../src/cms/collections/createAuthors.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/lexical/editor.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/index.ts","../src/cms/hooks/set-published-at.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createChangelog.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createUsers.ts","../src/cms/globals/createSiteSettings.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts"],"sourcesContent":["import type { Access, FieldAccess, PayloadRequest } from 'payload'\n\nexport type AccessOptions = {\n /**\n * When true, disabled `api-tokens` users are denied public reads.\n * Defaults to on when the stock `api-tokens` collection is enabled.\n */\n apiTokens?: boolean\n}\n\nexport type AccessHelpers = {\n adminOnly: ({ req }: { req: PayloadRequest }) => boolean\n adminOrPublished: Access\n publicRead: Access\n adminOnlyField: FieldAccess\n}\n\nconst isAdminUser = (req: PayloadRequest): boolean => req.user?.collection === 'users'\n\nconst isDisabledApiToken = (req: PayloadRequest): boolean =>\n req.user?.collection === 'api-tokens' && req.user?.enabled === false\n\n/**\n * Build access helpers. Pass `{ apiTokens: true }` when the `api-tokens`\n * collection is registered (stock by default via `buildCmsConfig`).\n */\nexport function createAccessHelpers(options: AccessOptions = {}): AccessHelpers {\n const apiTokens = options.apiTokens === true\n\n const adminOnly = ({ req }: { req: PayloadRequest }): boolean => isAdminUser(req)\n\n const adminOrPublished: Access = ({ req }) => {\n if (isAdminUser(req)) return true\n if (apiTokens && isDisabledApiToken(req)) return false\n return { _status: { equals: 'published' } }\n }\n\n const publicRead: Access = ({ req }) => {\n if (apiTokens && isDisabledApiToken(req)) return false\n return true\n }\n\n const adminOnlyField: FieldAccess = ({ req }) => isAdminUser(req)\n\n return { adminOnly, adminOrPublished, publicRead, adminOnlyField }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { Access, CollectionConfig } from 'payload'\n\nconst adminOrSelf: Access = ({ req }) => {\n if (req.user?.collection === 'users') return true\n if (req.user?.collection === 'api-tokens') return { id: { equals: req.user.id } }\n return false\n}\n\n/**\n * Stock API-key auth collection for server-to-server Payload REST/GraphQL clients.\n * Disable per site with `overrides['api-tokens'] = false`.\n */\nexport function createApiTokens(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'api-tokens',\n labels: {\n singular: 'API Token',\n plural: 'API Tokens',\n },\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'description', 'enabled', 'createdAt'],\n description:\n 'Server-to-server tokens for non-admin clients calling the Payload REST/GraphQL API. ' +\n 'Each token authenticates as an api-tokens user and is restricted to published, public-readable content.',\n },\n auth: {\n useAPIKey: true,\n disableLocalStrategy: true,\n },\n access: {\n read: adminOrSelf,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n admin: {\n description: 'Human-readable label, e.g. \"mobile-app-prod\" or \"partner-foo\".',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n admin: {\n description: 'Who is this token for and what is it used for? Free-form notes.',\n },\n },\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description:\n 'Disable to soft-revoke. To hard-revoke, clear the API Key field or delete the document.',\n },\n },\n ],\n }\n}\n","import type { FieldHook } from 'payload'\n\nexport const slugify: FieldHook = ({ value }) =>\n typeof value === 'string'\n ? value\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-]/g, '')\n : value\n","import type { GroupField, Validate } from 'payload'\n\nconst MAX_META_TITLE = 60\nconst MAX_META_DESCRIPTION = 160\n\nconst validateMetaTitle: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta title is required.'\n if (value.length > MAX_META_TITLE)\n return `Meta title must be ${MAX_META_TITLE} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateMetaDescription: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta description is required.'\n if (value.length > MAX_META_DESCRIPTION)\n return `Meta description must be ${MAX_META_DESCRIPTION} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateUrl: Validate<string | null | undefined> = (value) => {\n if (!value) return true\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/page).'\n }\n}\n\nexport const seoFields: GroupField = {\n name: 'seo',\n type: 'group',\n label: 'SEO',\n fields: [\n {\n name: 'metaTitle',\n type: 'text',\n required: true,\n localized: true,\n maxLength: MAX_META_TITLE,\n validate: validateMetaTitle,\n admin: {\n description: `Required. ${MAX_META_TITLE} characters max — shown in browser tabs and search results.`,\n },\n },\n {\n name: 'metaDescription',\n type: 'textarea',\n required: true,\n localized: true,\n validate: validateMetaDescription,\n admin: {\n description: `Required. ${MAX_META_DESCRIPTION} characters max — shown in search result snippets.`,\n },\n },\n {\n name: 'ogImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description:\n 'Used when the page is shared on social media (1200×630 recommended). Falls back to cover image if empty.',\n },\n },\n {\n name: 'canonicalUrl',\n type: 'text',\n validate: validateUrl,\n admin: {\n description: 'Override for syndicated content. Leave empty to auto-derive from slug.',\n },\n },\n {\n name: 'noIndex',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description: 'When checked, search engines will not index this page.',\n },\n },\n {\n name: 'noFollow',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description:\n 'When checked, search engines will not follow links on this page (paired with noIndex if needed).',\n },\n },\n ],\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createAuthors(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'authors',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'role'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'role',\n type: 'text',\n localized: true,\n admin: {\n description: 'Job title or role (e.g. \"Lead Engineer\")',\n },\n },\n {\n name: 'bio',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n admin: { position: 'sidebar' },\n fields: [\n { name: 'website', type: 'text' },\n { name: 'twitter', type: 'text', admin: { description: '@handle or full URL' } },\n { name: 'linkedin', type: 'text' },\n { name: 'github', type: 'text' },\n ],\n },\n {\n ...seoFields,\n fields: [\n ...seoFields.fields,\n {\n name: 'jsonLd',\n type: 'group',\n label: 'Structured Data Overrides',\n admin: {\n description: 'Used in JSON-LD Person schema on author pages and article bylines.',\n },\n fields: [\n {\n name: 'jobTitle',\n type: 'text',\n admin: { description: 'schema.org jobTitle (defaults to role if empty)' },\n },\n {\n name: 'worksFor',\n type: 'text',\n admin: { description: 'Organization name for schema.org worksFor' },\n },\n {\n name: 'sameAs',\n type: 'array',\n admin: {\n description: 'Extra canonical URLs for this person (Wikipedia, Crunchbase, etc.)',\n },\n fields: [{ name: 'url', type: 'text', required: true }],\n },\n ],\n },\n ],\n },\n ],\n }\n}\n","/** Shared language options for CMS code blocks and Lexical CodeBlock feature. */\nexport const languageOptions = [\n { label: 'TypeScript', value: 'typescript' },\n { label: 'JavaScript', value: 'javascript' },\n { label: 'Python', value: 'python' },\n { label: 'Bash / Shell', value: 'bash' },\n { label: 'Shell', value: 'shell' },\n { label: 'JSON', value: 'json' },\n { label: 'CSS', value: 'css' },\n { label: 'HTML', value: 'html' },\n { label: 'Rust', value: 'rust' },\n { label: 'Go', value: 'go' },\n { label: 'YAML', value: 'yaml' },\n { label: 'Markdown', value: 'markdown' },\n { label: 'Plain Text', value: 'plaintext' },\n]\n\nexport const codeBlockLanguages: Record<string, string> = Object.fromEntries(\n languageOptions.map((opt) => [opt.value, opt.label])\n)\n\nexport const defaultCodeLanguage = 'plaintext'\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeBlock: Block = {\n slug: 'code',\n labels: { singular: 'Code Block', plural: 'Code Blocks' },\n fields: [\n {\n name: 'language',\n type: 'select',\n defaultValue: 'typescript',\n options: languageOptions,\n },\n {\n name: 'filename',\n type: 'text',\n admin: { description: 'Optional filename label shown above the block' },\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'typescript' },\n },\n ],\n}\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeTabsBlock: Block = {\n slug: 'code-tabs',\n labels: { singular: 'Code Tabs', plural: 'Code Tabs' },\n fields: [\n {\n name: 'tabs',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'label',\n type: 'text',\n required: true,\n admin: { description: 'Tab label (e.g. Windows, Linux, Android)' },\n },\n {\n name: 'language',\n type: 'select',\n defaultValue: 'bash',\n options: languageOptions,\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'bash' },\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const downloadCtaBlock: Block = {\n slug: 'download-cta',\n labels: { singular: 'Download CTA', plural: 'Download CTAs' },\n fields: [\n {\n name: 'eyebrow',\n type: 'text',\n localized: true,\n },\n {\n name: 'heading',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'headingAccent',\n type: 'text',\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'submitLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'downloadUrl',\n type: 'text',\n required: true,\n },\n {\n name: 'downloadLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'successMessage',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'consent',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'footnote',\n type: 'textarea',\n localized: true,\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const imageBlock: Block = {\n slug: 'image',\n labels: { singular: 'Image', plural: 'Images' },\n fields: [\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n required: true,\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const videoBlock: Block = {\n slug: 'video',\n labels: { singular: 'Video', plural: 'Videos' },\n fields: [\n {\n name: 'video',\n type: 'upload',\n relationTo: 'media',\n required: true,\n filterOptions: {\n mimeType: { contains: 'video' },\n },\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import {\n BlocksFeature,\n CodeBlock,\n EXPERIMENTAL_TableFeature,\n UploadFeature,\n editorConfigFactory,\n lexicalEditor,\n} from '@payloadcms/richtext-lexical'\n\nimport { codeBlockLanguages, defaultCodeLanguage } from '../blocks/language-options.js'\nimport { videoBlock } from '../blocks/video.js'\n\nimport type { FeatureProviderServer } from '@payloadcms/richtext-lexical'\nimport type { SanitizedConfig } from 'payload'\n\nconst richTextFeatures = ({\n defaultFeatures,\n}: {\n defaultFeatures: FeatureProviderServer[]\n rootFeatures: FeatureProviderServer[]\n}) => [\n ...defaultFeatures.filter((feature) => feature.key !== 'upload'),\n UploadFeature({\n collections: {\n media: {\n fields: [\n {\n name: 'caption',\n type: 'text',\n },\n ],\n },\n },\n }),\n BlocksFeature({\n blocks: [\n CodeBlock({\n languages: codeBlockLanguages,\n defaultLanguage: defaultCodeLanguage,\n }),\n videoBlock,\n ],\n }),\n EXPERIMENTAL_TableFeature(),\n]\n\n/**\n * Shared Lexical editor for every `richText` field.\n *\n * Adds `CodeBlock`, inline `video` block, media upload captions, and\n * `EXPERIMENTAL_TableFeature` on top of Payload defaults.\n */\n// Return type is derived from `lexicalEditor` (a public export) rather than the\n// inferred `LexicalRichTextAdapterProvider` (not re-exported), so the generated\n// declaration stays portable while keeping the narrow Lexical adapter type that\n// consumers like `editorConfigFactory.fromEditor` require.\nexport const richTextEditor = (): ReturnType<typeof lexicalEditor> =>\n lexicalEditor({\n features: richTextFeatures,\n })\n\n/** Resolve Lexical editor config for seed scripts / markdown conversion. */\nexport async function getRichTextEditorConfig(config: SanitizedConfig) {\n return editorConfigFactory.fromFeatures({\n config,\n features: richTextFeatures,\n })\n}\n","import { richTextEditor } from '../lexical/editor.js'\n\nimport type { Block } from 'payload'\n\nexport const richTextBlock: Block = {\n slug: 'rich-text',\n labels: { singular: 'Rich Text', plural: 'Rich Text Blocks' },\n fields: [\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const stepsBlock: Block = {\n slug: 'steps',\n labels: { singular: 'Steps List', plural: 'Steps Lists' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n admin: { description: 'Optional avatar or icon shown next to the step' },\n },\n ],\n },\n ],\n}\n","import { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport const leafBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n]\n","import { leafBlocks } from './leaf-blocks.js'\n\nimport type { Block } from 'payload'\n\nexport const accordionBlock: Block = {\n slug: 'accordion',\n labels: { singular: 'Accordion', plural: 'Accordions' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'defaultOpen',\n type: 'checkbox',\n defaultValue: false,\n },\n {\n name: 'content',\n type: 'blocks',\n blocks: leafBlocks,\n localized: true,\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const sectionHeadingBlock: Block = {\n slug: 'section-heading',\n labels: { singular: 'Section Heading', plural: 'Section Headings' },\n fields: [\n {\n name: 'text',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n}\n","import { accordionBlock } from './accordion.js'\nimport { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { sectionHeadingBlock } from './section-heading.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport { richTextBlock } from './rich-text.js'\nexport { codeBlock } from './code.js'\nexport { codeTabsBlock } from './code-tabs.js'\nexport { imageBlock } from './image.js'\nexport { videoBlock } from './video.js'\nexport { downloadCtaBlock } from './download-cta.js'\nexport { stepsBlock } from './steps.js'\nexport { accordionBlock } from './accordion.js'\nexport { sectionHeadingBlock } from './section-heading.js'\nexport { leafBlocks } from './leaf-blocks.js'\nexport { languageOptions, codeBlockLanguages, defaultCodeLanguage } from './language-options.js'\n\nexport const blogContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const pageContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const showcaseContentBlocks: Block[] = [\n sectionHeadingBlock,\n richTextBlock,\n codeBlock,\n imageBlock,\n]\n","import type { CollectionBeforeChangeHook } from 'payload'\n\nexport const setPublishedAt: CollectionBeforeChangeHook = ({ data }) => {\n if (data && !data.publishedAt && data._status === 'published') {\n data.publishedAt = new Date().toISOString()\n }\n return data\n}\n","import type { CollectionConfig } from 'payload'\n\nexport const draftsWithAutosave: CollectionConfig['versions'] = {\n maxPerDoc: 25,\n drafts: {\n autosave: {\n interval: 800,\n },\n schedulePublish: true,\n },\n}\n","import { blogContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock blog-posts collection (no site revalidation — add via overrides.hooks). */\nexport function createBlogPosts(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'blog-posts',\n defaultSort: '-publishedAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'author', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per post.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'imageAlt',\n type: 'text',\n localized: true,\n admin: {\n description:\n 'Alt text used for the auto-generated social/OG image (`og:image:alt`). Should describe the post for screen readers.',\n },\n },\n {\n name: 'excerpt',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short summary shown in listing cards and meta description fallback.',\n },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: blogContentBlocks,\n },\n {\n name: 'author',\n type: 'relationship',\n relationTo: 'authors',\n admin: { position: 'sidebar' },\n },\n {\n name: 'category',\n type: 'relationship',\n relationTo: 'categories',\n admin: { position: 'sidebar' },\n },\n {\n name: 'readingTime',\n type: 'number',\n min: 1,\n admin: {\n position: 'sidebar',\n description: 'Estimated reading time in minutes.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n {\n name: 'showLatestNews',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description: 'Show a \"Latest News\" section at the bottom of this post.',\n },\n },\n seoFields,\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createCategories(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'categories',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/**\n * Stock changelog collection (shared fields only).\n * Site-specific body / GitHub / related-block fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createChangelog(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog',\n labels: { singular: 'Changelog', plural: 'Changelog' },\n defaultSort: '-releaseDate',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'version', 'versionType', 'tags', 'releaseDate', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description:\n 'Release headline shown on the changelog detail page (e.g. \"Added Solana Support\").',\n },\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per entry.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'version',\n type: 'text',\n admin: {\n position: 'sidebar',\n description:\n 'Optional semantic version label shown in the badge, e.g. v1.1.0 or 2.3.0. Omit for non-versioned announcements.',\n },\n },\n {\n name: 'versionType',\n type: 'select',\n options: [\n { label: 'Major', value: 'major' },\n { label: 'Minor', value: 'minor' },\n { label: 'Patch', value: 'patch' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Release line for badge styling (major / minor / patch). Editors set this explicitly.',\n },\n },\n {\n name: 'releaseDate',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayOnly', displayFormat: 'MMM d, yyyy' },\n },\n },\n {\n name: 'tags',\n type: 'relationship',\n relationTo: 'changelog-tags',\n hasMany: true,\n label: 'Tags',\n admin: {\n position: 'sidebar',\n description: 'Editor-managed tags from the Changelog Tags collection.',\n },\n },\n {\n name: 'heroImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Large visual above the article body on the changelog detail page.',\n },\n },\n {\n name: 'summary',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short excerpt for listing cards and previews.',\n },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock changelog-tags (no site revalidation — add via overrides.hooks). */\nexport function createChangelogTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog-tags',\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description: 'Tags shown on changelog entries.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by listing filters.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors. Not rendered publicly yet.' },\n },\n ],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock media upload collection (always publicly readable once uploaded). */\nexport function createMedia(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'media',\n admin: {\n useAsTitle: 'filename',\n defaultColumns: ['filename', 'alt', 'updatedAt'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n upload: {\n imageSizes: [\n {\n name: 'thumbnail',\n width: 400,\n height: 300,\n position: 'centre',\n },\n {\n name: 'card',\n width: 768,\n height: 512,\n position: 'centre',\n },\n {\n name: 'tablet',\n width: 1024,\n height: undefined,\n position: 'centre',\n },\n ],\n adminThumbnail: 'thumbnail',\n mimeTypes: ['image/*', 'video/*', 'application/pdf'],\n },\n fields: [\n {\n name: 'alt',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n }\n}\n","import { pageContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nfunction createContentPageCollection(\n access: AccessHelpers,\n slug: 'pages' | 'legal-pages'\n): CollectionConfig {\n return {\n slug,\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per page.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: pageContentBlocks,\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n seoFields,\n ],\n }\n}\n\nexport function createPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'pages')\n}\n\nexport function createLegalPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'legal-pages')\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createUsers(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'users',\n admin: {\n useAsTitle: 'email',\n },\n auth: true,\n access: {\n read: access.adminOnly,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { GlobalConfig } from 'payload'\n\nexport function createSiteSettings(access: AccessHelpers): GlobalConfig {\n return {\n slug: 'site-settings',\n label: 'Site Settings',\n access: {\n read: access.publicRead,\n update: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Public site name used in titles and structured data.',\n },\n },\n {\n name: 'defaultDescription',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Fallback meta description when a page does not define its own.',\n },\n },\n {\n name: 'defaultOgImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Default Open Graph image (1200×630 recommended).',\n },\n },\n {\n name: 'organization',\n type: 'group',\n label: 'Organization',\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'legalName',\n type: 'text',\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'logo',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'foundingDate',\n type: 'text',\n admin: { description: 'Year or ISO date for schema.org structured data.' },\n },\n ],\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n fields: [\n { name: 'twitter', type: 'text' },\n { name: 'github', type: 'text' },\n { name: 'linkedin', type: 'text' },\n ],\n },\n ],\n }\n}\n","import type { CollectionConfig, Field, GlobalConfig } from 'payload'\n\ntype OverridableConfig = CollectionConfig | GlobalConfig\n\ntype Override<TConfig extends OverridableConfig> =\n | false\n | {\n fields?: (base: Field[]) => Field[]\n hooks?: Partial<TConfig['hooks']>\n admin?: Partial<TConfig['admin']>\n access?: Partial<TConfig['access']>\n config?: (base: TConfig) => TConfig\n }\n\nexport type CollectionOverride = Override<CollectionConfig>\nexport type GlobalOverride = Override<GlobalConfig>\n\ntype HookArrays = Record<string, unknown[] | undefined>\n\n// Payload collection/global hooks are all arrays of functions, so overrides are\n// appended to the base hooks rather than replacing them.\nfunction mergeHooks(base: HookArrays | undefined, extra: HookArrays | undefined): HookArrays {\n const keys = new Set([...Object.keys(base ?? {}), ...Object.keys(extra ?? {})])\n const merged: HookArrays = {}\n keys.forEach((key) => {\n const combined = [...(base?.[key] ?? []), ...(extra?.[key] ?? [])]\n if (combined.length) merged[key] = combined\n })\n return merged\n}\n\nfunction applyOverride<TConfig extends OverridableConfig>(\n base: TConfig,\n override: Override<TConfig> | undefined\n): TConfig | null {\n if (override === false) return null\n if (!override) return base\n\n const next = {\n ...base,\n ...(override.admin && { admin: { ...base.admin, ...override.admin } }),\n ...(override.access && { access: { ...base.access, ...override.access } }),\n ...(override.fields && { fields: override.fields(base.fields ?? []) }),\n ...(override.hooks && { hooks: mergeHooks(base.hooks, override.hooks as HookArrays) }),\n } as TConfig\n\n return override.config ? override.config(next) : next\n}\n\nexport const applyCollectionOverride = (\n base: CollectionConfig,\n override: CollectionOverride | undefined\n): CollectionConfig | null => applyOverride(base, override)\n\nexport const applyGlobalOverride = (\n base: GlobalConfig,\n override: GlobalOverride | undefined\n): GlobalConfig | null => applyOverride(base, override)\n","import type { CollectionOverride, GlobalOverride } from './applyOverride.js'\n\n/** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */\nexport const STOCK_COLLECTION_SLUGS = [\n 'users',\n 'api-tokens',\n 'media',\n 'authors',\n 'categories',\n 'blog-posts',\n 'pages',\n 'legal-pages',\n 'changelog-tags',\n 'changelog',\n] as const\n\nexport type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number]\n\n/** Typed map of collection/global overrides for `buildCmsConfig`. */\nexport type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {\n 'site-settings'?: GlobalOverride\n}\n","import { buildConfig } from 'payload'\n\nimport { createAccessHelpers, type AccessOptions } from './shared/access.js'\nimport { createApiTokens } from './collections/createApiTokens.js'\nimport { createAuthors } from './collections/createAuthors.js'\nimport { createBlogPosts } from './collections/createBlogPosts.js'\nimport { createCategories } from './collections/createCategories.js'\nimport { createChangelog } from './collections/createChangelog.js'\nimport { createChangelogTags } from './collections/createChangelogTags.js'\nimport { createMedia } from './collections/createMedia.js'\nimport { createLegalPages, createPages } from './collections/createPages.js'\nimport { createUsers } from './collections/createUsers.js'\nimport { createSiteSettings } from './globals/createSiteSettings.js'\nimport { richTextEditor } from './lexical/editor.js'\nimport { applyCollectionOverride, applyGlobalOverride } from './applyOverride.js'\nimport { STOCK_COLLECTION_SLUGS, type Overrides, type StockCollectionSlug } from './overrides.js'\n\nimport type { CollectionConfig, Config, GlobalConfig, Plugin } from 'payload'\n\nexport type BuildCmsConfigOptions<TLocale extends string = string> = {\n secret: string\n // Payload DB adapter instance (e.g. mongooseAdapter({ url }))\n db: Config['db']\n /** Sharp instance from the `sharp` package. */\n sharp?: Config['sharp']\n cors?: Config['cors']\n csrf?: Config['csrf']\n locales: readonly TLocale[]\n /** Must be one of `locales`. */\n defaultLocale: TLocale\n admin?: Config['admin']\n plugins?: Plugin[]\n /** Defaults to the package Lexical editor. */\n editor?: Config['editor']\n access?: AccessOptions\n /** Collection/global slug → override | false. */\n overrides?: Overrides\n extraCollections?: CollectionConfig[]\n extraGlobals?: GlobalConfig[]\n typescript?: Config['typescript']\n /** Extra top-level Payload config keys (e.g. endpoints, graphQL). */\n payload?: Partial<\n Omit<\n Config,\n | 'secret'\n | 'db'\n | 'sharp'\n | 'cors'\n | 'csrf'\n | 'admin'\n | 'plugins'\n | 'editor'\n | 'collections'\n | 'globals'\n | 'localization'\n | 'typescript'\n >\n >\n}\n\n/** Drop keys whose value is `undefined` so they don't clobber Payload defaults. */\nfunction defined<T extends Record<string, unknown>>(obj: T): Partial<T> {\n return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>\n}\n\n/**\n * Build a Payload config from shared stock collections/globals plus site\n * overrides and extras. Types are still generated in the consuming app.\n */\nexport function buildCmsConfig<const TLocale extends string>(\n options: BuildCmsConfigOptions<TLocale>\n) {\n const overrides = options.overrides ?? {}\n const access = createAccessHelpers({\n ...options.access,\n apiTokens: options.access?.apiTokens ?? overrides['api-tokens'] !== false,\n })\n\n const stock: Record<StockCollectionSlug, CollectionConfig> = {\n 'users': createUsers(access),\n 'api-tokens': createApiTokens(access),\n 'media': createMedia(access),\n 'authors': createAuthors(access),\n 'categories': createCategories(access),\n 'blog-posts': createBlogPosts(access),\n 'pages': createPages(access),\n 'legal-pages': createLegalPages(access),\n 'changelog-tags': createChangelogTags(access),\n 'changelog': createChangelog(access),\n }\n\n const collections = [\n ...STOCK_COLLECTION_SLUGS.map((slug) =>\n applyCollectionOverride(stock[slug], overrides[slug])\n ).filter((c): c is CollectionConfig => c !== null),\n ...(options.extraCollections ?? []),\n ]\n\n const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides['site-settings'])\n const globals = [...(siteSettings ? [siteSettings] : []), ...(options.extraGlobals ?? [])]\n\n return buildConfig({\n ...options.payload,\n ...defined({\n sharp: options.sharp,\n cors: options.cors,\n csrf: options.csrf,\n plugins: options.plugins,\n }),\n secret: options.secret,\n db: options.db,\n admin: {\n user: 'users',\n ...options.admin,\n },\n editor: options.editor ?? richTextEditor(),\n collections,\n ...(globals.length ? { globals } : {}),\n localization: {\n locales: options.locales.map((code) => ({\n code,\n label: code.toUpperCase(),\n })),\n defaultLocale: options.defaultLocale,\n fallback: true,\n },\n typescript: options.typescript ?? {\n outputFile: 'src/payload-types.ts',\n },\n })\n}\n","import { createLogger } from '../utils/logger/logger.js'\n\nconst log = createLogger('env')\n\n/**\n * Read a required env var. During Next.js `phase-production-build` and\n * `generate:importmap` (when NEXT_PHASE is unset) returns \"\" instead of throwing,\n * because those phases do not connect to the DB.\n */\nexport function requireEnvAtRuntime(name: string): string {\n const value = process.env[name]\n const isBuildTime = !process.env.NEXT_PHASE || process.env.NEXT_PHASE === 'phase-production-build'\n if (!value && !isBuildTime) {\n log.error(`Missing required environment variable: ${name}`)\n throw new Error(`Missing required environment variable: ${name}`)\n }\n return value ?? ''\n}\n","import { s3Storage } from '@payloadcms/storage-s3'\n\nimport type { Plugin } from 'payload'\n\nexport type CreateS3MediaPluginOptions = {\n /** Defaults to `process.env.AWS_S3_BUCKET`. */\n bucket?: string\n accessKeyId?: string\n secretAccessKey?: string\n region?: string\n /** Custom S3-compatible endpoint (MinIO, etc.). Defaults to `AWS_S3_ENDPOINT`. */\n endpoint?: string\n /** Defaults to `AWS_S3_FORCE_PATH_STYLE === 'true'`. */\n forcePathStyle?: boolean\n /** Collection slug that owns uploads. Defaults to `media`. */\n collection?: string\n}\n\n/** Payload S3 storage plugin wired for the stock `media` collection. */\nexport function createS3MediaPlugin(options: CreateS3MediaPluginOptions = {}): Plugin {\n const bucket = options.bucket ?? process.env.AWS_S3_BUCKET ?? ''\n const endpoint = options.endpoint ?? process.env.AWS_S3_ENDPOINT ?? ''\n const forcePathStyle = options.forcePathStyle ?? process.env.AWS_S3_FORCE_PATH_STYLE === 'true'\n\n return s3Storage({\n enabled: Boolean(bucket),\n collections: {\n [options.collection ?? 'media']: true,\n },\n bucket,\n config: {\n credentials: {\n accessKeyId: options.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID ?? '',\n secretAccessKey: options.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY ?? '',\n },\n region: options.region ?? process.env.AWS_S3_REGION ?? 'us-east-1',\n ...(endpoint ? { endpoint } : {}),\n ...(forcePathStyle ? { forcePathStyle: true } : {}),\n },\n })\n}\n"],"mappings":";;;;;AAiBA,MAAM,eAAe,QAAiC,IAAI,MAAM,eAAe;AAE/E,MAAM,sBAAsB,QAC1B,IAAI,MAAM,eAAe,gBAAgB,IAAI,MAAM,YAAY;;;;;AAMjE,SAAgB,oBAAoB,UAAyB,CAAC,GAAkB;CAC9E,MAAM,YAAY,QAAQ,cAAc;CAExC,MAAM,aAAa,EAAE,UAA4C,YAAY,GAAG;CAEhF,MAAM,oBAA4B,EAAE,UAAU;EAC5C,IAAI,YAAY,GAAG,GAAG,OAAO;EAC7B,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,YAAY,EAAE;CAC5C;CAEA,MAAM,cAAsB,EAAE,UAAU;EACtC,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO;CACT;CAEA,MAAM,kBAA+B,EAAE,UAAU,YAAY,GAAG;CAEhE,OAAO;EAAE;EAAW;EAAkB;EAAY;CAAe;AACnE;;;AC1CA,MAAM,eAAuB,EAAE,UAAU;CACvC,IAAI,IAAI,MAAM,eAAe,SAAS,OAAO;CA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BAAoB,MAAsB;CACxD,MAAM,QAAQ,QAAQ,IAAI;CAC1B,MAAM,cAAc,CAAC,QAAQ,IAAI,cAAc,QAAQ,IAAI,eAAe;CAC1E,IAAI,CAAC,SAAS,CAAC,aAAa;EAC1B,IAAI,MAAM,0CAA0C,MAAM;EAC1D,MAAM,IAAI,MAAM,0CAA0C,MAAM;CAClE;CACA,OAAO,SAAS;AAClB;;;;ACEA,SAAgB,oBAAoB,UAAsC,CAAC,GAAW;CACpF,MAAM,SAAS,QAAQ,UAAU,QAAQ,IAAI,iBAAiB;CAC9D,MAAM,WAAW,QAAQ,YAAY,QAAQ,IAAI,mBAAmB;CACpE,MAAM,iBAAiB,QAAQ,kBAAkB,QAAQ,IAAI,4BAA4B;CAEzF,OAAO,UAAU;EACf,SAAS,QAAQ,MAAM;EACvB,aAAa,GACV,QAAQ,cAAc,UAAU,KACnC;EACA;EACA,QAAQ;GACN,aAAa;IACX,aAAa,QAAQ,eAAe,QAAQ,IAAI,qBAAqB;IACrE,iBAAiB,QAAQ,mBAAmB,QAAQ,IAAI,yBAAyB;GACnF;GACA,QAAQ,QAAQ,UAAU,QAAQ,IAAI,iBAAiB;GACvD,GAAI,WAAW,EAAE,SAAS,IAAI,CAAC;GAC/B,GAAI,iBAAiB,EAAE,gBAAgB,KAAK,IAAI,CAAC;EACnD;CACF,CAAC;AACH"}
|
package/dist/i18n/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Languages, t as LanguageLabel } from "../
|
|
1
|
+
import { n as Languages, t as LanguageLabel } from "../index2.mjs";
|
|
2
2
|
export { LanguageLabel, Languages };
|
package/dist/i18n/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Languages, t as LanguageLabel } from "../i18n
|
|
1
|
+
import { n as Languages, t as LanguageLabel } from "../i18n.mjs";
|
|
2
2
|
export { LanguageLabel, Languages };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.mjs","names":[],"sources":["../src/i18n/languages.ts"],"sourcesContent":["export enum Languages {\n English = 'en',\n}\n\nexport const LanguageLabel: Record<Languages, string> = {\n [Languages.English]: 'En',\n}\n"],"mappings":";AAAA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,MAAa,gBAA2C,GAAA,OACjC,KACvB"}
|