@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,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Puck Theme CSS Variables
|
|
3
|
+
*
|
|
4
|
+
* This file provides shadcn/ui-compatible CSS variables for Puck components.
|
|
5
|
+
* Import this file in your project's global CSS to style Puck editor components.
|
|
6
|
+
*
|
|
7
|
+
* WHEN TO USE THIS FILE:
|
|
8
|
+
* - If you DON'T use shadcn/ui, copy this file and import it
|
|
9
|
+
* - If you DO use shadcn/ui, you can skip this - variables already exist
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* 1. Copy to your project: src/styles/puck-theme.css
|
|
13
|
+
* 2. Import in your root layout or globals.css
|
|
14
|
+
* 3. Customize colors to match your brand
|
|
15
|
+
*
|
|
16
|
+
* ============================================================================
|
|
17
|
+
* TAILWIND v4 USERS
|
|
18
|
+
* ============================================================================
|
|
19
|
+
*
|
|
20
|
+
* If you're using Tailwind CSS v4, add the following to your main CSS file
|
|
21
|
+
* after @import "tailwindcss" to ensure Puck components are included in the
|
|
22
|
+
* CSS build and use your theme:
|
|
23
|
+
*
|
|
24
|
+
* @source "../node_modules/@delmaredigital/payload-puck";
|
|
25
|
+
*
|
|
26
|
+
* @theme inline {
|
|
27
|
+
* --color-background: var(--background);
|
|
28
|
+
* --color-foreground: var(--foreground);
|
|
29
|
+
* --color-primary: var(--primary);
|
|
30
|
+
* --color-primary-foreground: var(--primary-foreground);
|
|
31
|
+
* --color-secondary: var(--secondary);
|
|
32
|
+
* --color-secondary-foreground: var(--secondary-foreground);
|
|
33
|
+
* --color-muted: var(--muted);
|
|
34
|
+
* --color-muted-foreground: var(--muted-foreground);
|
|
35
|
+
* --color-accent: var(--accent);
|
|
36
|
+
* --color-accent-foreground: var(--accent-foreground);
|
|
37
|
+
* --color-destructive: var(--destructive);
|
|
38
|
+
* --color-destructive-foreground: var(--destructive-foreground);
|
|
39
|
+
* --color-border: var(--border);
|
|
40
|
+
* --color-input: var(--input);
|
|
41
|
+
* --color-ring: var(--ring);
|
|
42
|
+
* --color-popover: var(--popover);
|
|
43
|
+
* --color-popover-foreground: var(--popover-foreground);
|
|
44
|
+
* --color-card: var(--card);
|
|
45
|
+
* --color-card-foreground: var(--card-foreground);
|
|
46
|
+
* --radius-sm: calc(var(--radius) - 4px);
|
|
47
|
+
* --radius-md: calc(var(--radius) - 2px);
|
|
48
|
+
* --radius-lg: var(--radius);
|
|
49
|
+
* --radius-xl: calc(var(--radius) + 4px);
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* ============================================================================
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Light Mode (Default)
|
|
57
|
+
*
|
|
58
|
+
* These variables define the default light theme using neutral slate/zinc colors.
|
|
59
|
+
* Override these in your own CSS to match your brand colors.
|
|
60
|
+
*/
|
|
61
|
+
:root {
|
|
62
|
+
/* Background & Foreground
|
|
63
|
+
* --background: The main page/app background color
|
|
64
|
+
* --foreground: The default text color for content */
|
|
65
|
+
--background: #ffffff;
|
|
66
|
+
--foreground: #0a0a0a;
|
|
67
|
+
|
|
68
|
+
/* Primary
|
|
69
|
+
* --primary: Used for primary actions, buttons, and emphasis
|
|
70
|
+
* --primary-foreground: Text color on primary backgrounds */
|
|
71
|
+
--primary: #18181b;
|
|
72
|
+
--primary-foreground: #fafafa;
|
|
73
|
+
|
|
74
|
+
/* Secondary
|
|
75
|
+
* --secondary: Used for secondary actions and less prominent UI elements
|
|
76
|
+
* --secondary-foreground: Text color on secondary backgrounds */
|
|
77
|
+
--secondary: #f4f4f5;
|
|
78
|
+
--secondary-foreground: #18181b;
|
|
79
|
+
|
|
80
|
+
/* Muted
|
|
81
|
+
* --muted: Used for muted/subtle backgrounds (e.g., disabled states, badges)
|
|
82
|
+
* --muted-foreground: Text color for muted/secondary text */
|
|
83
|
+
--muted: #f4f4f5;
|
|
84
|
+
--muted-foreground: #71717a;
|
|
85
|
+
|
|
86
|
+
/* Accent
|
|
87
|
+
* --accent: Used for hover states, highlights, and accented UI elements
|
|
88
|
+
* --accent-foreground: Text color on accent backgrounds */
|
|
89
|
+
--accent: #f4f4f5;
|
|
90
|
+
--accent-foreground: #18181b;
|
|
91
|
+
|
|
92
|
+
/* Destructive
|
|
93
|
+
* --destructive: Used for error states, delete actions, and warnings
|
|
94
|
+
* --destructive-foreground: Text color on destructive backgrounds */
|
|
95
|
+
--destructive: #ef4444;
|
|
96
|
+
--destructive-foreground: #fafafa;
|
|
97
|
+
|
|
98
|
+
/* Border & Input
|
|
99
|
+
* --border: Default border color for cards, dividers, and containers
|
|
100
|
+
* --input: Border color specifically for form inputs */
|
|
101
|
+
--border: #e4e4e7;
|
|
102
|
+
--input: #e4e4e7;
|
|
103
|
+
|
|
104
|
+
/* Ring
|
|
105
|
+
* --ring: Focus ring color for accessibility (keyboard navigation) */
|
|
106
|
+
--ring: #18181b;
|
|
107
|
+
|
|
108
|
+
/* Popover
|
|
109
|
+
* --popover: Background color for popovers, dropdowns, and floating menus
|
|
110
|
+
* --popover-foreground: Text color inside popovers */
|
|
111
|
+
--popover: #ffffff;
|
|
112
|
+
--popover-foreground: #0a0a0a;
|
|
113
|
+
|
|
114
|
+
/* Card
|
|
115
|
+
* --card: Background color for card components and elevated surfaces
|
|
116
|
+
* --card-foreground: Text color inside cards */
|
|
117
|
+
--card: #ffffff;
|
|
118
|
+
--card-foreground: #0a0a0a;
|
|
119
|
+
|
|
120
|
+
/* Border Radius
|
|
121
|
+
* --radius: Base border radius used throughout the UI
|
|
122
|
+
* Components use calc() to derive sm, md, lg, xl variants */
|
|
123
|
+
--radius: 0.5rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Dark Mode
|
|
128
|
+
*
|
|
129
|
+
* Applied when the `.dark` class is present on an ancestor element.
|
|
130
|
+
* Uses darker zinc/slate tones for comfortable viewing in low-light environments.
|
|
131
|
+
*/
|
|
132
|
+
.dark {
|
|
133
|
+
/* Background & Foreground */
|
|
134
|
+
--background: #0a0a0a;
|
|
135
|
+
--foreground: #fafafa;
|
|
136
|
+
|
|
137
|
+
/* Primary */
|
|
138
|
+
--primary: #fafafa;
|
|
139
|
+
--primary-foreground: #18181b;
|
|
140
|
+
|
|
141
|
+
/* Secondary */
|
|
142
|
+
--secondary: #27272a;
|
|
143
|
+
--secondary-foreground: #fafafa;
|
|
144
|
+
|
|
145
|
+
/* Muted */
|
|
146
|
+
--muted: #27272a;
|
|
147
|
+
--muted-foreground: #a1a1aa;
|
|
148
|
+
|
|
149
|
+
/* Accent */
|
|
150
|
+
--accent: #27272a;
|
|
151
|
+
--accent-foreground: #fafafa;
|
|
152
|
+
|
|
153
|
+
/* Destructive */
|
|
154
|
+
--destructive: #7f1d1d;
|
|
155
|
+
--destructive-foreground: #fafafa;
|
|
156
|
+
|
|
157
|
+
/* Border & Input */
|
|
158
|
+
--border: #27272a;
|
|
159
|
+
--input: #27272a;
|
|
160
|
+
|
|
161
|
+
/* Ring */
|
|
162
|
+
--ring: #d4d4d8;
|
|
163
|
+
|
|
164
|
+
/* Popover */
|
|
165
|
+
--popover: #0a0a0a;
|
|
166
|
+
--popover-foreground: #fafafa;
|
|
167
|
+
|
|
168
|
+
/* Card */
|
|
169
|
+
--card: #0a0a0a;
|
|
170
|
+
--card-foreground: #fafafa;
|
|
171
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@delmaredigital/payload-puck",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Puck visual page builder plugin for Payload CMS",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./plugin": {
|
|
15
|
+
"types": "./dist/plugin/index.d.ts",
|
|
16
|
+
"import": "./dist/plugin/index.mjs",
|
|
17
|
+
"require": "./dist/plugin/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./config": {
|
|
20
|
+
"types": "./dist/config/index.d.ts",
|
|
21
|
+
"import": "./dist/config/index.mjs",
|
|
22
|
+
"require": "./dist/config/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./config/editor": {
|
|
25
|
+
"types": "./dist/config/config.editor.d.ts",
|
|
26
|
+
"import": "./dist/config/config.editor.mjs",
|
|
27
|
+
"require": "./dist/config/config.editor.js"
|
|
28
|
+
},
|
|
29
|
+
"./components": {
|
|
30
|
+
"types": "./dist/components/index.d.ts",
|
|
31
|
+
"import": "./dist/components/index.mjs",
|
|
32
|
+
"require": "./dist/components/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./fields": {
|
|
35
|
+
"types": "./dist/fields/index.d.ts",
|
|
36
|
+
"import": "./dist/fields/index.mjs",
|
|
37
|
+
"require": "./dist/fields/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./render": {
|
|
40
|
+
"types": "./dist/render/index.d.ts",
|
|
41
|
+
"import": "./dist/render/index.mjs",
|
|
42
|
+
"require": "./dist/render/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./editor": {
|
|
45
|
+
"types": "./dist/editor/index.d.ts",
|
|
46
|
+
"import": "./dist/editor/index.mjs",
|
|
47
|
+
"require": "./dist/editor/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./api": {
|
|
50
|
+
"types": "./dist/api/index.d.ts",
|
|
51
|
+
"import": "./dist/api/index.mjs",
|
|
52
|
+
"require": "./dist/api/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./utils": {
|
|
55
|
+
"types": "./dist/utils/index.d.ts",
|
|
56
|
+
"import": "./dist/utils/index.mjs",
|
|
57
|
+
"require": "./dist/utils/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./admin": {
|
|
60
|
+
"types": "./dist/admin/index.d.ts",
|
|
61
|
+
"import": "./dist/admin/index.mjs",
|
|
62
|
+
"require": "./dist/admin/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./admin/client": {
|
|
65
|
+
"types": "./dist/admin/client.d.ts",
|
|
66
|
+
"import": "./dist/admin/client.mjs",
|
|
67
|
+
"require": "./dist/admin/client.js"
|
|
68
|
+
},
|
|
69
|
+
"./theme": {
|
|
70
|
+
"types": "./dist/theme/index.d.ts",
|
|
71
|
+
"import": "./dist/theme/index.mjs",
|
|
72
|
+
"require": "./dist/theme/index.js"
|
|
73
|
+
},
|
|
74
|
+
"./layouts": {
|
|
75
|
+
"types": "./dist/layouts/index.d.ts",
|
|
76
|
+
"import": "./dist/layouts/index.mjs",
|
|
77
|
+
"require": "./dist/layouts/index.js"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"dist",
|
|
82
|
+
"examples",
|
|
83
|
+
"README.md"
|
|
84
|
+
],
|
|
85
|
+
"peerDependencies": {
|
|
86
|
+
"@measured/puck": ">=0.20.0",
|
|
87
|
+
"@payloadcms/ui": ">=3.0.0",
|
|
88
|
+
"next": ">=15.4.0",
|
|
89
|
+
"payload": ">=3.0.0",
|
|
90
|
+
"react": ">=18.0.0"
|
|
91
|
+
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"@payloadcms/ui": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"dependencies": {
|
|
98
|
+
"@measured/puck-plugin-heading-analyzer": "^0.20.2",
|
|
99
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
100
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
101
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
102
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
103
|
+
"@tabler/icons-react": "^3.36.1",
|
|
104
|
+
"@tiptap/core": "^3.14.0",
|
|
105
|
+
"@tiptap/extension-color": "^3.14.0",
|
|
106
|
+
"@tiptap/extension-highlight": "^3.14.0",
|
|
107
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
108
|
+
"@tiptap/extension-subscript": "^3.15.3",
|
|
109
|
+
"@tiptap/extension-superscript": "^3.15.3",
|
|
110
|
+
"@tiptap/extension-text-align": "^3.14.0",
|
|
111
|
+
"@tiptap/extension-text-style": "^3.14.0",
|
|
112
|
+
"@tiptap/extension-underline": "^3.14.0",
|
|
113
|
+
"@tiptap/react": "^3.14.0",
|
|
114
|
+
"@tiptap/starter-kit": "^3.14.0",
|
|
115
|
+
"class-variance-authority": "^0.7.1",
|
|
116
|
+
"clsx": "^2.1.1",
|
|
117
|
+
"tailwind-merge": "^3.4.0"
|
|
118
|
+
},
|
|
119
|
+
"devDependencies": {
|
|
120
|
+
"@measured/puck": "^0.20.2",
|
|
121
|
+
"@payloadcms/ui": "^3.69.0",
|
|
122
|
+
"@types/node": "^25.0.3",
|
|
123
|
+
"@types/react": "^19.2.7",
|
|
124
|
+
"next": "^16.1.1",
|
|
125
|
+
"payload": "^3.69.0",
|
|
126
|
+
"react": "^19.2.3",
|
|
127
|
+
"tsup": "^8.5.1",
|
|
128
|
+
"typescript": "^5.9.3"
|
|
129
|
+
},
|
|
130
|
+
"keywords": [
|
|
131
|
+
"payload",
|
|
132
|
+
"payloadcms",
|
|
133
|
+
"payload-plugin",
|
|
134
|
+
"puck",
|
|
135
|
+
"page-builder",
|
|
136
|
+
"visual-editor",
|
|
137
|
+
"cms"
|
|
138
|
+
],
|
|
139
|
+
"engines": {
|
|
140
|
+
"node": "^18.20.2 || >=20.9.0"
|
|
141
|
+
},
|
|
142
|
+
"author": "Delmare Digital",
|
|
143
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
144
|
+
"repository": {
|
|
145
|
+
"type": "git",
|
|
146
|
+
"url": "git+https://github.com/delmaredigital/payload-puck.git"
|
|
147
|
+
},
|
|
148
|
+
"bugs": {
|
|
149
|
+
"url": "https://github.com/delmaredigital/payload-puck/issues"
|
|
150
|
+
},
|
|
151
|
+
"homepage": "https://delmaredigital.com/developers",
|
|
152
|
+
"scripts": {
|
|
153
|
+
"build": "tsup",
|
|
154
|
+
"dev": "tsup --watch",
|
|
155
|
+
"typecheck": "tsc --noEmit"
|
|
156
|
+
}
|
|
157
|
+
}
|