@justanarthur/payload-www 0.3.4 → 1.0.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 +317 -307
- package/dist/access.d.ts +2 -2
- package/dist/access.js +6 -30
- package/dist/blocks.d.ts +0 -10
- package/dist/blocks.js +8 -33
- package/dist/collections.d.ts +33 -225
- package/dist/collections.js +186 -661
- package/dist/config.d.ts +19 -105
- package/dist/config.js +263 -868
- package/dist/fields.d.ts +4 -46
- package/dist/fields.js +183 -73
- package/dist/imagehash.js +0 -15
- package/dist/import-map-provider.d.ts +0 -16
- package/dist/import-map-provider.js +0 -15
- package/dist/metadata.d.ts +24 -89
- package/dist/metadata.js +123 -258
- package/dist/pages.d.ts +37 -319
- package/dist/pages.js +355 -973
- package/dist/render-pages.d.ts +69 -564
- package/dist/render-pages.js +476 -1502
- package/dist/sitemap.d.ts +10 -0
- package/dist/sitemap.js +324 -0
- package/dist/translator.js +0 -15
- package/dist/utils.d.ts +4 -12
- package/dist/utils.js +10 -56
- package/package.json +75 -178
- package/dist/components.d.ts +0 -6
- package/dist/components.js +0 -39
- package/dist/core-access.d.ts +0 -11
- package/dist/core-access.js +0 -44
- package/dist/core-blocks.d.ts +0 -24
- package/dist/core-blocks.js +0 -89
- package/dist/core-fields.d.ts +0 -73
- package/dist/core-fields.js +0 -181
- package/dist/core-utils.d.ts +0 -16
- package/dist/core-utils.js +0 -73
- package/dist/data-collections.d.ts +0 -229
- package/dist/data-collections.js +0 -697
- package/dist/data-seed.d.ts +0 -76
- package/dist/data-seed.js +0 -212
- package/dist/data-test.d.ts +0 -30
- package/dist/data-test.js +0 -1134
- package/dist/globals.d.ts +0 -69
- package/dist/globals.js +0 -259
- package/dist/hooks.d.ts +0 -108
- package/dist/hooks.js +0 -228
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -39
- package/dist/render-components.d.ts +0 -42
- package/dist/render-components.js +0 -154
- package/dist/render-metadata.d.ts +0 -122
- package/dist/render-metadata.js +0 -393
- package/dist/render-utils.d.ts +0 -166
- package/dist/render-utils.js +0 -401
- package/dist/seed.d.ts +0 -76
- package/dist/seed.js +0 -212
- package/dist/server.d.ts +0 -980
- package/dist/server.js +0 -2265
- package/dist/test.d.ts +0 -30
- package/dist/test.js +0 -1134
- package/dist/with-www-config.d.ts +0 -108
- package/dist/with-www-config.js +0 -1030
package/dist/access.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ declare const anyone: Access;
|
|
|
3
3
|
declare const authenticated: Access;
|
|
4
4
|
declare const authenticatedOrPublished: Access;
|
|
5
5
|
import { Access as Access_wc6ft0 } from "payload";
|
|
6
|
-
declare const
|
|
6
|
+
declare const access: {
|
|
7
7
|
anyone: Access_wc6ft0;
|
|
8
8
|
authenticated: Access_wc6ft0;
|
|
9
9
|
authenticatedOrPublished: Access_wc6ft0;
|
|
10
10
|
};
|
|
11
|
-
export {
|
|
11
|
+
export { access as default, authenticatedOrPublished, authenticated, anyone };
|
package/dist/access.js
CHANGED
|
@@ -1,41 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __returnValue = (v) => v;
|
|
4
|
-
function __exportSetter(name, newValue) {
|
|
5
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
-
}
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
set: __exportSetter.bind(all, name)
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
2
|
|
|
18
|
-
// src/
|
|
19
|
-
var anyone = () =>
|
|
20
|
-
|
|
21
|
-
return true;
|
|
22
|
-
};
|
|
23
|
-
var authenticated = ({ req: { user } }) => {
|
|
24
|
-
const result = Boolean(user);
|
|
25
|
-
console.log("[WWW] core/access:authenticated ->", result);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
3
|
+
// src/collections/access/index.ts
|
|
4
|
+
var anyone = () => true;
|
|
5
|
+
var authenticated = ({ req: { user } }) => Boolean(user);
|
|
28
6
|
var authenticatedOrPublished = ({ req: { user } }) => {
|
|
29
|
-
if (user)
|
|
30
|
-
console.log("[WWW] core/access:authenticatedOrPublished -> true (authenticated)");
|
|
7
|
+
if (user)
|
|
31
8
|
return true;
|
|
32
|
-
}
|
|
33
|
-
console.log('[WWW] core/access:authenticatedOrPublished -> { _status: { equals: "published" } }');
|
|
34
9
|
return { _status: { equals: "published" } };
|
|
35
10
|
};
|
|
36
11
|
|
|
37
12
|
// src/exports/access.ts
|
|
38
|
-
var
|
|
13
|
+
var access = { anyone, authenticated, authenticatedOrPublished };
|
|
14
|
+
var access_default = access;
|
|
39
15
|
export {
|
|
40
16
|
access_default as default,
|
|
41
17
|
authenticatedOrPublished,
|
package/dist/blocks.d.ts
CHANGED
|
@@ -10,15 +10,5 @@ type RenderBlocksProps = {
|
|
|
10
10
|
locale: string;
|
|
11
11
|
searchParams?: Record<string, string | string[] | undefined>;
|
|
12
12
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Render a page's `blocks` array to React. Each block's render module
|
|
15
|
-
* is resolved via Payload's generated importMap. The host registers
|
|
16
|
-
* each block in the importMap with a key like `BlockCta#default` (use
|
|
17
|
-
* `generateImportName('block', 'cta')` to build the key).
|
|
18
|
-
*
|
|
19
|
-
* Falls back gracefully: if a block's importMap path is missing or
|
|
20
|
-
* the component is not registered, the block is skipped and a
|
|
21
|
-
* `console.warn` is logged (in dev).
|
|
22
|
-
*/
|
|
23
13
|
declare const RenderBlocks: FC<RenderBlocksProps>;
|
|
24
14
|
export { RenderBlocks as default, RenderBlocksProps, RenderBlocks };
|
package/dist/blocks.js
CHANGED
|
@@ -1,43 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __returnValue = (v) => v;
|
|
4
|
-
function __exportSetter(name, newValue) {
|
|
5
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
-
}
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
set: __exportSetter.bind(all, name)
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
2
|
|
|
18
|
-
// src/
|
|
3
|
+
// src/render/getFromImportMap.ts
|
|
19
4
|
function getFromImportMap(key, importMap) {
|
|
20
|
-
|
|
21
|
-
const value = importMap[resolvedKey];
|
|
22
|
-
console.log("[WWW] core/utils:getFromImportMap key=", key, "resolved=", resolvedKey, "hit=", Boolean(value));
|
|
23
|
-
return value;
|
|
5
|
+
return key && importMap[key.includes("#") ? key : key + "#default"];
|
|
24
6
|
}
|
|
25
7
|
|
|
26
|
-
// src/
|
|
8
|
+
// src/render/generateImportName.ts
|
|
27
9
|
function generateImportName(type, slug) {
|
|
28
10
|
switch (type) {
|
|
29
|
-
case "block":
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
case "page": {
|
|
35
|
-
const name = `Page${slug.replace(/(^\w|-\w)/g, (m) => m.replace("-", "").toUpperCase())}#default`;
|
|
36
|
-
console.log("[WWW] core/utils:generateImportName type=page slug=", slug, "->", name);
|
|
37
|
-
return name;
|
|
38
|
-
}
|
|
11
|
+
case "block":
|
|
12
|
+
return `Block${slug.replace(/(^\w|-\w)/g, (m) => m.replace("-", "").toUpperCase())}#default`;
|
|
13
|
+
case "page":
|
|
14
|
+
return `Page${slug.replace(/(^\w|-\w)/g, (m) => m.replace("-", "").toUpperCase())}#default`;
|
|
39
15
|
default:
|
|
40
|
-
console.error("[WWW] core/utils:generateImportName unknown type:", type);
|
|
41
16
|
throw new Error(`Unknown type: ${type}`);
|
|
42
17
|
}
|
|
43
18
|
}
|
|
@@ -61,7 +36,7 @@ var RenderBlocks = ({
|
|
|
61
36
|
for (let i = 0;i < blocks.length; i++) {
|
|
62
37
|
const block = blocks[i];
|
|
63
38
|
const { blockType } = block;
|
|
64
|
-
const importMapPath = config.admin?.dependencies?.[blockType]?.path
|
|
39
|
+
const importMapPath = config.admin?.dependencies?.[blockType]?.path || generateImportName("block", blockType);
|
|
65
40
|
const Block = getFromImportMap(importMapPath, importMap);
|
|
66
41
|
if (!Block) {
|
|
67
42
|
console.warn(`[WWW] render/blocks:RenderBlocks no block for type=${blockType} importMapPath=${importMapPath} (locale=${locale})`);
|
package/dist/collections.d.ts
CHANGED
|
@@ -1,229 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
collectionSlug: string;
|
|
9
|
-
/**
|
|
10
|
-
* URL path prefix for this collection's rendered URLs. Pages use
|
|
11
|
-
* `''` (mounted at root); Posts use `'/posts'`. Leading slash,
|
|
12
|
-
* no trailing slash — same convention as
|
|
13
|
-
* `createSitemapFile.urlPrefixes`.
|
|
14
|
-
*/
|
|
15
|
-
urlPathPrefix?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Sitemap tag the collection's revalidation hook invalidates on
|
|
18
|
-
* every save. Defaults to `${collectionSlug}-sitemap`. Pass
|
|
19
|
-
* `false` to opt out (collections without a sitemap handler).
|
|
20
|
-
*/
|
|
21
|
-
sitemapTag?: string | false;
|
|
22
|
-
/**
|
|
23
|
-
* Locale prefix mode — mirrors next-intl's `localePrefix`.
|
|
24
|
-
* Defaults to `'always'` (preserves legacy behavior).
|
|
25
|
-
*/
|
|
26
|
-
localePrefix?: LocalePrefixMode;
|
|
27
|
-
/**
|
|
28
|
-
* Default locale for `localePrefix: 'as-needed'`. Falls back to
|
|
29
|
-
* `req.payload.config.localization.defaultLocale` at request time
|
|
30
|
-
* when omitted.
|
|
31
|
-
*/
|
|
32
|
-
defaultLocale?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Path invalidation strategy. Default: `'url'` — fans out
|
|
35
|
-
* `revalidatePath` for every locale × every slug. Set to
|
|
36
|
-
* `'tag-only'` for collections without a URL (e.g. `staticPages`
|
|
37
|
-
* — addressed by a `kind` discriminator, not a slug). Tag-only
|
|
38
|
-
* mode still fires the per-collection tag (via `sitemapTag`) and
|
|
39
|
-
* the per-id tag (`collection_<slug>_<id>`).
|
|
40
|
-
*/
|
|
41
|
-
pathMode?: "url" | "tag-only";
|
|
42
|
-
};
|
|
43
|
-
declare const HOME_PAGE_SLUG = "";
|
|
44
|
-
declare const PAGES_SLUG = "pages";
|
|
45
|
-
type CreatePagesCollectionOptions = {
|
|
46
|
-
/**
|
|
47
|
-
* Blocks the Pages collection accepts.
|
|
48
|
-
*/
|
|
49
|
-
blocks: Block[];
|
|
50
|
-
/**
|
|
51
|
-
* Optional override for the collection slug. Default: `'pages'`.
|
|
52
|
-
* Hosts that want a different slug (e.g. `'site_pages'`) pass
|
|
53
|
-
* it here. The lib's Header / Footer `linkRelationTo` default
|
|
54
|
-
* uses `'pages'` — combine this with a matching
|
|
55
|
-
* `linkRelationTo` to keep nav links targeting the right
|
|
56
|
-
* collection.
|
|
57
|
-
*/
|
|
58
|
-
slug?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Optional override for the `custom.path` Payload uses to resolve
|
|
61
|
-
* the page's render module. Default: the lib's `PAGES_RENDER_PATH`
|
|
62
|
-
* (a Server Component that calls `RenderBlocks`). Use this when
|
|
63
|
-
* you've defined your own Server Component for the collection.
|
|
64
|
-
*/
|
|
65
|
-
renderPath?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Locale prefix mode for path invalidation. Defaults to `'always'`
|
|
68
|
-
* (preserves current behavior). Set to `'as-needed'` when the host
|
|
69
|
-
* uses next-intl `localePrefix: 'as-needed'` — otherwise the hook
|
|
70
|
-
* invalidates paths the public routes don't use.
|
|
71
|
-
*/
|
|
72
|
-
localePrefix?: CreateRevalidateCollectionHookOptions["localePrefix"];
|
|
73
|
-
/**
|
|
74
|
-
* Default locale for prefix skipping. Falls back to
|
|
75
|
-
* `req.payload.config.localization.defaultLocale` at request time
|
|
76
|
-
* when omitted.
|
|
77
|
-
*/
|
|
78
|
-
defaultLocale?: CreateRevalidateCollectionHookOptions["defaultLocale"];
|
|
79
|
-
/**
|
|
80
|
-
* Enable nested (hierarchical) slugs. When `true`, the slug field
|
|
81
|
-
* additionally accepts the `_` nesting divider (so `about_us`
|
|
82
|
-
* renders at `/about/us`) and the admin description documents the
|
|
83
|
-
* convention. Pair with `createCollectionPageExports({ nested: true })`
|
|
84
|
-
* on the matching route. Default: `false` (flat, hyphen-only slugs).
|
|
85
|
-
*/
|
|
86
|
-
nested?: boolean;
|
|
87
|
-
};
|
|
88
|
-
declare const createPagesCollection: (blocks: Block[], options?: Omit<CreatePagesCollectionOptions, "blocks">) => CollectionConfig;
|
|
89
|
-
import { CollectionConfig as CollectionConfig2 } from "payload";
|
|
90
|
-
declare const POSTS_SLUG = "posts";
|
|
91
|
-
type CreatePostsCollectionOptions = {
|
|
92
|
-
/**
|
|
93
|
-
* Optional override for the collection slug. Default: `'posts'`.
|
|
94
|
-
* Hosts that want a different slug (e.g. `'articles'` or `'blog'`)
|
|
95
|
-
* pass it here. Combine with the page route's URL convention and
|
|
96
|
-
* the lib's translator plugin's `collections` list.
|
|
97
|
-
*/
|
|
98
|
-
slug?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Override the `custom.path` Payload uses to resolve the post's
|
|
101
|
-
* render module. Defaults to the lib's `POSTS_RENDER_PATH`
|
|
102
|
-
* (the lib's `<PostsPage>` Server Component, which renders
|
|
103
|
-
* `title` + `excerpt` + Lexical `content`). Hosts that want a
|
|
104
|
-
* custom render pass their own Server Component's import path
|
|
105
|
-
* here (e.g. `'@/blog/Post#default'`).
|
|
106
|
-
*/
|
|
107
|
-
renderPath?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Locale prefix mode for path invalidation. Defaults to `'always'`.
|
|
110
|
-
* Set to `'as-needed'` when the host uses next-intl
|
|
111
|
-
* `localePrefix: 'as-needed'` — otherwise the hook invalidates
|
|
112
|
-
* paths the public routes don't use.
|
|
113
|
-
*/
|
|
114
|
-
localePrefix?: "always" | "as-needed" | "never";
|
|
115
|
-
/**
|
|
116
|
-
* Default locale for prefix skipping. Falls back to
|
|
117
|
-
* `req.payload.config.localization.defaultLocale` at request time
|
|
118
|
-
* when omitted.
|
|
119
|
-
*/
|
|
120
|
-
defaultLocale?: string;
|
|
1
|
+
import { CollectionConfig, Field, GlobalConfig } from "payload";
|
|
2
|
+
type CreateWWWCollectionArgs<IsGlobalConfig extends boolean> = {
|
|
3
|
+
slug: string;
|
|
4
|
+
renderPath: string;
|
|
5
|
+
isGlobalConfig?: IsGlobalConfig;
|
|
6
|
+
isDraft?: boolean;
|
|
121
7
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
* plugin has a second localized collection to translate.
|
|
131
|
-
*/
|
|
132
|
-
declare const createPostsCollection: (options?: CreatePostsCollectionOptions) => CollectionConfig2;
|
|
133
|
-
import { Block as Block2, CollectionConfig as CollectionConfig3 } from "payload";
|
|
134
|
-
declare const STATIC_PAGES_SLUG = "staticPages";
|
|
135
|
-
type CreateStaticPagesCollectionOptions = {
|
|
136
|
-
/**
|
|
137
|
-
* Blocks the StaticPages collection accepts. Hosts pass the same
|
|
138
|
-
* `blocks` they use for `createPagesCollection` (or a smaller
|
|
139
|
-
* subset — e.g. just `pageHeroBlock` + `ctaBlock` + `featureGridBlock`).
|
|
140
|
-
* The lib does not curate a separate block set for system pages.
|
|
141
|
-
*/
|
|
142
|
-
blocks: Block2[];
|
|
8
|
+
declare function createWWWCollectionGlobal<
|
|
9
|
+
IsGlobalConfig extends boolean = false,
|
|
10
|
+
Config = IsGlobalConfig extends true ? GlobalConfig : CollectionConfig
|
|
11
|
+
>(fields: Field[], { slug: collectionSlug, renderPath, isGlobalConfig, isDraft }: CreateWWWCollectionArgs<IsGlobalConfig>): Config;
|
|
12
|
+
import { CollectionAfterChangeHook, CollectionAfterDeleteHook, GlobalAfterChangeHook } from "payload";
|
|
13
|
+
declare function createRevalidateCollectionGlobalHook(): {
|
|
14
|
+
afterChange: (CollectionAfterChangeHook & CollectionAfterDeleteHook) | GlobalAfterChangeHook;
|
|
15
|
+
afterDelete: (CollectionAfterChangeHook & CollectionAfterDeleteHook) | GlobalAfterChangeHook;
|
|
143
16
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
renderPath?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Collection slugs the nav's link fields can reference. Required
|
|
154
|
-
* by Payload 3.85 — empty `relationTo` arrays are rejected.
|
|
155
|
-
* Defaults to `['pages']` (the lib's Pages collection). Pass a
|
|
156
|
-
* different list when your host has additional linkable collections.
|
|
157
|
-
*/
|
|
158
|
-
linkRelationTo?: string[];
|
|
159
|
-
/**
|
|
160
|
-
* Extra fields appended to each `navColumn` link — e.g. a
|
|
161
|
-
* `description` text field or a `navHover` group for a mega-menu.
|
|
162
|
-
* Lets hosts enrich the column-link schema without redefining the
|
|
163
|
-
* whole nav.
|
|
164
|
-
*/
|
|
165
|
-
navColumnLinkFields?: Field[];
|
|
166
|
-
/**
|
|
167
|
-
* Extra fields appended to each top-level `navItem` link.
|
|
168
|
-
*/
|
|
169
|
-
navItemLinkFields?: Field[];
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Build the Header global. The lib's default shape: a `nav` blocks
|
|
173
|
-
* field with two block types — `navColumn` (a titled group of links)
|
|
174
|
-
* and `navItem` (a single link).
|
|
175
|
-
*/
|
|
176
|
-
declare const createHeaderGlobal: (options?: CreateHeaderGlobalOptions) => GlobalConfig;
|
|
177
|
-
import { Field as Field2, GlobalConfig as GlobalConfig2 } from "payload";
|
|
178
|
-
type CreateFooterGlobalOptions = {
|
|
179
|
-
/**
|
|
180
|
-
* Optional override for the `custom.path` Payload uses to resolve
|
|
181
|
-
* the footer's render module. Default: the lib's `FOOTER_RENDER_PATH`.
|
|
182
|
-
*/
|
|
183
|
-
renderPath?: string;
|
|
184
|
-
/**
|
|
185
|
-
* Collection slugs the nav's link fields can reference. Required
|
|
186
|
-
* by Payload 3.85 — empty `relationTo` arrays are rejected.
|
|
187
|
-
* Defaults to `['pages']` (the lib's Pages collection). Pass a
|
|
188
|
-
* different list when your host has additional linkable collections.
|
|
189
|
-
*/
|
|
190
|
-
linkRelationTo?: string[];
|
|
191
|
-
/**
|
|
192
|
-
* Extra fields appended to each `navColumn` link — e.g. a
|
|
193
|
-
* `description` text field. Lets hosts enrich the column-link
|
|
194
|
-
* schema without redefining the whole nav.
|
|
195
|
-
*/
|
|
196
|
-
navColumnLinkFields?: Field2[];
|
|
197
|
-
/**
|
|
198
|
-
* Extra fields appended to each top-level `navItem` link.
|
|
199
|
-
*/
|
|
200
|
-
navItemLinkFields?: Field2[];
|
|
17
|
+
type CollectionGlobalLocaleIdentifiersArgs = ({
|
|
18
|
+
collectionSlug: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
} | {
|
|
21
|
+
globalSlug: string;
|
|
22
|
+
}) & {
|
|
23
|
+
locale: string;
|
|
201
24
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}): string | null;
|
|
214
|
-
import { Block as Block_129qi5 } from "payload";
|
|
215
|
-
import { CollectionConfig as CollectionConfig_j7kwbk } from "payload";
|
|
216
|
-
import { GlobalConfig as GlobalConfig_fuin17 } from "payload";
|
|
217
|
-
declare const _default: {
|
|
218
|
-
createPagesCollection: (blocks: Block_129qi5[], options?: Omit<CreatePagesCollectionOptions, "blocks">) => CollectionConfig_j7kwbk;
|
|
219
|
-
createPostsCollection: (options?: CreatePostsCollectionOptions) => CollectionConfig_j7kwbk;
|
|
220
|
-
createStaticPagesCollection: (blocks: Block_129qi5[]) => CollectionConfig_j7kwbk;
|
|
221
|
-
createHeaderGlobal: (options?: CreateHeaderGlobalOptions) => GlobalConfig_fuin17;
|
|
222
|
-
createFooterGlobal: (options?: CreateFooterGlobalOptions) => GlobalConfig_fuin17;
|
|
223
|
-
generatePreviewPath: typeof generatePreviewPath;
|
|
224
|
-
HOME_PAGE_SLUG: string;
|
|
225
|
-
PAGES_SLUG: string;
|
|
226
|
-
POSTS_SLUG: string;
|
|
227
|
-
STATIC_PAGES_SLUG: string;
|
|
25
|
+
declare function createCollectionCacheKey(args: CollectionGlobalLocaleIdentifiersArgs): string;
|
|
26
|
+
import { SanitizedConfig } from "payload";
|
|
27
|
+
import { JsonObject as JsonObject_wrdbbt } from "payload";
|
|
28
|
+
declare function queryDoc(args: CollectionGlobalLocaleIdentifiersArgs, { config: configPromise }: {
|
|
29
|
+
config: Promise<SanitizedConfig>;
|
|
30
|
+
}): Promise<JsonObject_wrdbbt | null>;
|
|
31
|
+
declare const collections: {
|
|
32
|
+
createWWWCollectionGlobal: typeof createWWWCollectionGlobal;
|
|
33
|
+
createRevalidateCollectionGlobalHook: typeof createRevalidateCollectionGlobalHook;
|
|
34
|
+
createCollectionCacheKey: typeof createCollectionCacheKey;
|
|
35
|
+
queryDoc: typeof queryDoc;
|
|
228
36
|
};
|
|
229
|
-
export {
|
|
37
|
+
export { queryDoc, collections as default, createWWWCollectionGlobal, createRevalidateCollectionGlobalHook, createCollectionCacheKey };
|