@delmaredigital/payload-puck 0.1.0
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/LICENSE +73 -0
- package/README.md +1580 -0
- package/dist/AccordionClient.d.mts +24 -0
- package/dist/AccordionClient.d.ts +24 -0
- package/dist/AccordionClient.js +786 -0
- package/dist/AccordionClient.js.map +1 -0
- package/dist/AccordionClient.mjs +784 -0
- package/dist/AccordionClient.mjs.map +1 -0
- package/dist/AnimatedWrapper.d.mts +30 -0
- package/dist/AnimatedWrapper.d.ts +30 -0
- package/dist/AnimatedWrapper.js +379 -0
- package/dist/AnimatedWrapper.js.map +1 -0
- package/dist/AnimatedWrapper.mjs +377 -0
- package/dist/AnimatedWrapper.mjs.map +1 -0
- package/dist/admin/client.d.mts +108 -0
- package/dist/admin/client.d.ts +108 -0
- package/dist/admin/client.js +177 -0
- package/dist/admin/client.js.map +1 -0
- package/dist/admin/client.mjs +173 -0
- package/dist/admin/client.mjs.map +1 -0
- package/dist/admin/index.d.mts +157 -0
- package/dist/admin/index.d.ts +157 -0
- package/dist/admin/index.js +31 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +29 -0
- package/dist/admin/index.mjs.map +1 -0
- package/dist/api/index.d.mts +460 -0
- package/dist/api/index.d.ts +460 -0
- package/dist/api/index.js +588 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/index.mjs +578 -0
- package/dist/api/index.mjs.map +1 -0
- package/dist/components/index.css +339 -0
- package/dist/components/index.css.map +1 -0
- package/dist/components/index.d.mts +222 -0
- package/dist/components/index.d.ts +222 -0
- package/dist/components/index.js +9177 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +9130 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/config.editor.css +339 -0
- package/dist/config/config.editor.css.map +1 -0
- package/dist/config/config.editor.d.mts +153 -0
- package/dist/config/config.editor.d.ts +153 -0
- package/dist/config/config.editor.js +9400 -0
- package/dist/config/config.editor.js.map +1 -0
- package/dist/config/config.editor.mjs +9368 -0
- package/dist/config/config.editor.mjs.map +1 -0
- package/dist/config/index.d.mts +68 -0
- package/dist/config/index.d.ts +68 -0
- package/dist/config/index.js +2017 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +1991 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/editor/index.d.mts +784 -0
- package/dist/editor/index.d.ts +784 -0
- package/dist/editor/index.js +4517 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/index.mjs +4483 -0
- package/dist/editor/index.mjs.map +1 -0
- package/dist/fields/index.css +339 -0
- package/dist/fields/index.css.map +1 -0
- package/dist/fields/index.d.mts +600 -0
- package/dist/fields/index.d.ts +600 -0
- package/dist/fields/index.js +7739 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/index.mjs +7590 -0
- package/dist/fields/index.mjs.map +1 -0
- package/dist/index-CQu6SzDg.d.mts +327 -0
- package/dist/index-CoUQnyC3.d.ts +327 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +569 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +555 -0
- package/dist/index.mjs.map +1 -0
- package/dist/layouts/index.d.mts +96 -0
- package/dist/layouts/index.d.ts +96 -0
- package/dist/layouts/index.js +394 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/layouts/index.mjs +378 -0
- package/dist/layouts/index.mjs.map +1 -0
- package/dist/plugin/index.d.mts +289 -0
- package/dist/plugin/index.d.ts +289 -0
- package/dist/plugin/index.js +569 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/index.mjs +555 -0
- package/dist/plugin/index.mjs.map +1 -0
- package/dist/render/index.d.mts +109 -0
- package/dist/render/index.d.ts +109 -0
- package/dist/render/index.js +2146 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/index.mjs +2123 -0
- package/dist/render/index.mjs.map +1 -0
- package/dist/shared-DMAF1AcH.d.mts +545 -0
- package/dist/shared-DMAF1AcH.d.ts +545 -0
- package/dist/theme/index.d.mts +155 -0
- package/dist/theme/index.d.ts +155 -0
- package/dist/theme/index.js +201 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/index.mjs +186 -0
- package/dist/theme/index.mjs.map +1 -0
- package/dist/types-D7D3rZ1J.d.mts +116 -0
- package/dist/types-D7D3rZ1J.d.ts +116 -0
- package/dist/types-_6MvjyKv.d.mts +104 -0
- package/dist/types-_6MvjyKv.d.ts +104 -0
- package/dist/utils/index.d.mts +267 -0
- package/dist/utils/index.d.ts +267 -0
- package/dist/utils/index.js +426 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +412 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils-DaRs9t0J.d.mts +85 -0
- package/dist/utils-gAvt0Vhw.d.ts +85 -0
- package/examples/README.md +240 -0
- package/examples/api/puck/pages/[id]/route.ts +64 -0
- package/examples/api/puck/pages/[id]/versions/route.ts +47 -0
- package/examples/api/puck/pages/route.ts +45 -0
- package/examples/app/(frontend)/page.tsx +94 -0
- package/examples/app/[...slug]/page.tsx +101 -0
- package/examples/app/pages/[id]/edit/page.tsx +148 -0
- package/examples/components/CustomBanner.tsx +368 -0
- package/examples/config/custom-config.ts +223 -0
- package/examples/config/payload.config.example.ts +64 -0
- package/examples/lib/puck-layouts.ts +258 -0
- package/examples/lib/puck-theme.ts +94 -0
- package/examples/styles/puck-theme.css +171 -0
- package/package.json +157 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Config } from '@measured/puck';
|
|
2
|
+
import { L as LayoutDefinition } from '../types-D7D3rZ1J.mjs';
|
|
3
|
+
export { D as DEFAULT_LAYOUTS, c as createLayout } from '../utils-DaRs9t0J.mjs';
|
|
4
|
+
import { b as MergeConfigOptions } from '../index-CQu6SzDg.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'payload';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Merges Puck configurations together
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { mergeConfigs, baseConfig } from '@delmaredigital/payload-puck/config'
|
|
14
|
+
*
|
|
15
|
+
* const customConfig = mergeConfigs({
|
|
16
|
+
* base: baseConfig,
|
|
17
|
+
* components: {
|
|
18
|
+
* CustomHero: myHeroConfig,
|
|
19
|
+
* },
|
|
20
|
+
* categories: {
|
|
21
|
+
* custom: { title: 'Custom', components: ['CustomHero'] },
|
|
22
|
+
* },
|
|
23
|
+
* exclude: ['CallToAction'], // Remove if not needed
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function mergeConfigs(options: MergeConfigOptions): Config;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Server-safe Puck configuration
|
|
31
|
+
*
|
|
32
|
+
* This config is safe for server-side rendering and should be used
|
|
33
|
+
* with the PageRenderer component.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Creates a Puck configuration with custom layouts
|
|
38
|
+
*
|
|
39
|
+
* @param layouts - Custom layout definitions
|
|
40
|
+
* @returns Puck configuration with the specified layouts
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { createConfig, DEFAULT_LAYOUTS, createLayout } from '@delmaredigital/payload-puck/config'
|
|
45
|
+
*
|
|
46
|
+
* const customConfig = createConfig([
|
|
47
|
+
* ...DEFAULT_LAYOUTS,
|
|
48
|
+
* createLayout({
|
|
49
|
+
* value: 'blog',
|
|
50
|
+
* label: 'Blog Post',
|
|
51
|
+
* maxWidth: '720px',
|
|
52
|
+
* }),
|
|
53
|
+
* ])
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function createConfig(layouts?: LayoutDefinition[]): Config;
|
|
57
|
+
/**
|
|
58
|
+
* Base Puck configuration with server-safe component configs
|
|
59
|
+
*
|
|
60
|
+
* All components have server-safe versions (.server.tsx) that render
|
|
61
|
+
* without client-side interactivity. Use editorConfig from ./config.editor
|
|
62
|
+
* for the full interactive editor experience.
|
|
63
|
+
*
|
|
64
|
+
* For custom layouts, use createConfig() instead.
|
|
65
|
+
*/
|
|
66
|
+
declare const baseConfig: Config;
|
|
67
|
+
|
|
68
|
+
export { LayoutDefinition, baseConfig, createConfig, mergeConfigs };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Config } from '@measured/puck';
|
|
2
|
+
import { L as LayoutDefinition } from '../types-D7D3rZ1J.js';
|
|
3
|
+
export { D as DEFAULT_LAYOUTS, c as createLayout } from '../utils-gAvt0Vhw.js';
|
|
4
|
+
import { b as MergeConfigOptions } from '../index-CoUQnyC3.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'payload';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Merges Puck configurations together
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { mergeConfigs, baseConfig } from '@delmaredigital/payload-puck/config'
|
|
14
|
+
*
|
|
15
|
+
* const customConfig = mergeConfigs({
|
|
16
|
+
* base: baseConfig,
|
|
17
|
+
* components: {
|
|
18
|
+
* CustomHero: myHeroConfig,
|
|
19
|
+
* },
|
|
20
|
+
* categories: {
|
|
21
|
+
* custom: { title: 'Custom', components: ['CustomHero'] },
|
|
22
|
+
* },
|
|
23
|
+
* exclude: ['CallToAction'], // Remove if not needed
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function mergeConfigs(options: MergeConfigOptions): Config;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Server-safe Puck configuration
|
|
31
|
+
*
|
|
32
|
+
* This config is safe for server-side rendering and should be used
|
|
33
|
+
* with the PageRenderer component.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Creates a Puck configuration with custom layouts
|
|
38
|
+
*
|
|
39
|
+
* @param layouts - Custom layout definitions
|
|
40
|
+
* @returns Puck configuration with the specified layouts
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { createConfig, DEFAULT_LAYOUTS, createLayout } from '@delmaredigital/payload-puck/config'
|
|
45
|
+
*
|
|
46
|
+
* const customConfig = createConfig([
|
|
47
|
+
* ...DEFAULT_LAYOUTS,
|
|
48
|
+
* createLayout({
|
|
49
|
+
* value: 'blog',
|
|
50
|
+
* label: 'Blog Post',
|
|
51
|
+
* maxWidth: '720px',
|
|
52
|
+
* }),
|
|
53
|
+
* ])
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function createConfig(layouts?: LayoutDefinition[]): Config;
|
|
57
|
+
/**
|
|
58
|
+
* Base Puck configuration with server-safe component configs
|
|
59
|
+
*
|
|
60
|
+
* All components have server-safe versions (.server.tsx) that render
|
|
61
|
+
* without client-side interactivity. Use editorConfig from ./config.editor
|
|
62
|
+
* for the full interactive editor experience.
|
|
63
|
+
*
|
|
64
|
+
* For custom layouts, use createConfig() instead.
|
|
65
|
+
*/
|
|
66
|
+
declare const baseConfig: Config;
|
|
67
|
+
|
|
68
|
+
export { LayoutDefinition, baseConfig, createConfig, mergeConfigs };
|