@bison-lab/payload-core 4.32.0 → 4.32.2
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 +8 -0
- package/dist/block-library.d.mts +1 -1
- package/dist/block-library.mjs +1 -1
- package/dist/{catalogue-SrzJ3equ.d.mts → catalogue-BC_A9eLc.d.mts} +9 -5
- package/dist/{catalogue-SrzJ3equ.d.mts.map → catalogue-BC_A9eLc.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{published-BFiOGw2X.mjs → published-niJkPGjE.mjs} +18 -10
- package/dist/published-niJkPGjE.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/published-BFiOGw2X.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -426,6 +426,14 @@ createBlockLibrary({
|
|
|
426
426
|
`access.update` defaults to `isAdmin`. Pass `access` to change who may
|
|
427
427
|
edit availability. Then `payload generate:importmap` and `payload migrate:create`.
|
|
428
428
|
|
|
429
|
+
An extra may use a slug the package also ships. A site that built its own
|
|
430
|
+
block before the package shipped one under that slug still renders its own
|
|
431
|
+
config, so its entry replaces the package entry in place: its label,
|
|
432
|
+
category, controls, screenshot and sample, one row per slug.
|
|
433
|
+
`createBlockLibrary` records the site's slugs (`admin.custom.siteSlugs`) so
|
|
434
|
+
`getSectionControls` keeps that entry too. Remove the extra when the site
|
|
435
|
+
switches to the package block.
|
|
436
|
+
|
|
429
437
|
### The Add Block drawer
|
|
430
438
|
|
|
431
439
|
Payload has no slot to replace its Add Block drawer, and three places open
|
package/dist/block-library.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as PACKAGE_BLOCK_SLUGS, C as BlockLibraryDoc, D as BlockLibraryKind, O as BlockLibraryRow, T as BlockLibraryEntry, _ as SectionControls, a as sectionControlsFromLibrary, c as BlockLibraryReader, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as SectionControlKey, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, j as PackageBlockSlug, l as blockLibraryEntriesFromConfig, m as SECTION_CONTROL_KEYS, n as BlockLibraryOptions, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, t as BlockLibraryCheck, u as getSectionControls, v as defaultSectionControls, x as BLOCK_LIBRARY_SLUG, y as sectionControlsOf } from "./catalogue-
|
|
1
|
+
import { A as PACKAGE_BLOCK_SLUGS, C as BlockLibraryDoc, D as BlockLibraryKind, O as BlockLibraryRow, T as BlockLibraryEntry, _ as SectionControls, a as sectionControlsFromLibrary, c as BlockLibraryReader, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as SectionControlKey, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, j as PackageBlockSlug, l as blockLibraryEntriesFromConfig, m as SECTION_CONTROL_KEYS, n as BlockLibraryOptions, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, t as BlockLibraryCheck, u as getSectionControls, v as defaultSectionControls, x as BLOCK_LIBRARY_SLUG, y as sectionControlsOf } from "./catalogue-BC_A9eLc.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/block-library/island.d.ts
|
|
4
4
|
/**
|
package/dist/block-library.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as sectionControlsOf, a as sectionControlsFromLibrary, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as defaultSectionControls, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, l as BLOCK_LIBRARY_SLUG, m as SECTION_CONTROL_KEYS, n as getSectionControls, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, t as blockLibraryEntriesFromConfig, u as PACKAGE_BLOCK_SLUGS } from "./published-
|
|
1
|
+
import { _ as sectionControlsOf, a as sectionControlsFromLibrary, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as defaultSectionControls, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, l as BLOCK_LIBRARY_SLUG, m as SECTION_CONTROL_KEYS, n as getSectionControls, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, t as blockLibraryEntriesFromConfig, u as PACKAGE_BLOCK_SLUGS } from "./published-niJkPGjE.mjs";
|
|
2
2
|
//#region src/block-library/island.ts
|
|
3
3
|
/**
|
|
4
4
|
* How a Block library island tells its card how tall it is (BIS-147).
|
|
@@ -144,7 +144,8 @@ interface BlockLibraryReader {
|
|
|
144
144
|
* `createBlockLibrary` keeps the rows it seeded (package and extras) on the
|
|
145
145
|
* `blocks` field's `admin.custom.rows`, so a site block's catalogue default
|
|
146
146
|
* is known here without the site passing `blocks` a second time. Package
|
|
147
|
-
* slugs are left out
|
|
147
|
+
* slugs are left out (the catalogue already has them) unless the site
|
|
148
|
+
* registered its own entry under one, which `siteSlugs` records.
|
|
148
149
|
*/
|
|
149
150
|
declare function blockLibraryEntriesFromConfig(payload: Pick<BlockLibraryReader, "config">): BlockLibraryEntry[];
|
|
150
151
|
/**
|
|
@@ -172,9 +173,12 @@ interface BlockLibraryCheck {
|
|
|
172
173
|
}
|
|
173
174
|
/**
|
|
174
175
|
* The package entries, then the site's extras. An extra whose slug the
|
|
175
|
-
* package ships
|
|
176
|
-
*
|
|
177
|
-
*
|
|
176
|
+
* package ships replaces that package entry in its place: a site that
|
|
177
|
+
* registered its own block before the package shipped one under the same
|
|
178
|
+
* slug still renders its own config, so its label, category, controls,
|
|
179
|
+
* picture and sample are the true ones. A release that adds such a block
|
|
180
|
+
* therefore never yields two rows for one slug, and never relabels the
|
|
181
|
+
* site's block as the package's.
|
|
178
182
|
*/
|
|
179
183
|
declare function blockLibraryCatalogue(extras?: readonly BlockLibraryEntry[]): BlockLibraryEntry[];
|
|
180
184
|
declare function defaultBlockLibraryValue(options: BlockLibraryOptions): BlockLibraryRow[];
|
|
@@ -207,4 +211,4 @@ declare function sectionControlsFromLibrary(doc: BlockLibraryDoc | null | undefi
|
|
|
207
211
|
declare function validateBlockLibrary(value: unknown, options: BlockLibraryOptions, check?: BlockLibraryCheck): Promise<true | string>;
|
|
208
212
|
//#endregion
|
|
209
213
|
export { PACKAGE_BLOCK_SLUGS as A, BlockLibraryDoc as C, BlockLibraryKind as D, BlockLibraryHolder as E, BlockLibraryRow as O, BlockLibraryCategoryId as S, BlockLibraryEntry as T, SectionControls as _, sectionControlsFromLibrary as a, BLOCK_LIBRARY_CATEGORIES as b, BlockLibraryReader as c, DEFAULT_SECTION_CONTROLS as d, HERO_SECTION_CONTROLS as f, SectionControlKey as g, SECTION_CONTROL_LABELS as h, defaultBlockLibraryValue as i, PackageBlockSlug as j, BlockLibraryUsage as k, blockLibraryEntriesFromConfig as l, SECTION_CONTROL_KEYS as m, BlockLibraryOptions as n, stampBlockLibrary as o, NO_SECTION_CONTROLS as p, blockLibraryCatalogue as r, validateBlockLibrary as s, BlockLibraryCheck as t, getSectionControls as u, defaultSectionControls as v, BlockLibraryDraftHolder as w, BLOCK_LIBRARY_SLUG as x, sectionControlsOf as y };
|
|
210
|
-
//# sourceMappingURL=catalogue-
|
|
214
|
+
//# sourceMappingURL=catalogue-BC_A9eLc.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue-
|
|
1
|
+
{"version":3,"file":"catalogue-BC_A9eLc.d.mts","names":[],"sources":["../src/block-library/types.ts","../src/block-library/controls.ts","../src/block-library/published.ts","../src/block-library/catalogue.ts"],"mappings":";;;cAEa,kBAAA;AAAA,cAEA,wBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAaD,sBAAA,WAAiC,wBAAA;AAAA,KAEjC,gBAAA;;;;;cAMC,mBAAA;AAAA,KAuBD,gBAAA,WAA2B,mBAAA;AAAA,U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AAiB,iBAAA,KAChB,OAAA,CAAQ,MAAA,SAAe,eAAA;;;UCjBT,mBAAA;EACf,MAAA,YAAkB,iBAAA;EAClB,WAAA,GAAc,IAAA;AAAA;AAAA,UAGC,iBAAA;EACf,SAAA,YAAqB,eAAA;EHlDV;EGoDX,OAAA,YAAmB,kBAAA;;EAEnB,MAAA,YAAkB,kBAAA;EAClB,KAAA;AAAA;;;;;;;;;;iBAcc,qBAAA,CAAsB,MAAA,YAAiB,iBAAA,KAA2B,iBAAA;AAAA,iBASlE,wBAAA,CAAyB,OAAA,EAAS,mBAAA,GAAsB,eAAA;;;;;;;;iBAuBxD,iBAAA,CAAkB,KAAA,WAAgB,OAAA,EAAS,mBAAA,GAAsB,eAAA;;AHxFjF;;;;;AAEA;;;;;iBG+HgB,0BAAA,CACd,GAAA,EAAK,eAAA,qBACL,MAAA,YAAiB,iBAAA,KAChB,MAAA,SAAe,eAAA;;;;;AHrGlB;;iBGqIsB,oBAAA,CACpB,KAAA,WACA,OAAA,EAAS,mBAAA,EACT,KAAA,GAAO,iBAAA,GACN,OAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as PACKAGE_BLOCK_SLUGS, C as BlockLibraryDoc, D as BlockLibraryKind, E as BlockLibraryHolder, O as BlockLibraryRow, S as BlockLibraryCategoryId, T as BlockLibraryEntry, _ as SectionControls, a as sectionControlsFromLibrary, b as BLOCK_LIBRARY_CATEGORIES, c as BlockLibraryReader, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as SectionControlKey, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, k as BlockLibraryUsage, l as blockLibraryEntriesFromConfig, m as SECTION_CONTROL_KEYS, n as BlockLibraryOptions, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, u as getSectionControls, v as defaultSectionControls, w as BlockLibraryDraftHolder, x as BLOCK_LIBRARY_SLUG, y as sectionControlsOf } from "./catalogue-
|
|
1
|
+
import { A as PACKAGE_BLOCK_SLUGS, C as BlockLibraryDoc, D as BlockLibraryKind, E as BlockLibraryHolder, O as BlockLibraryRow, S as BlockLibraryCategoryId, T as BlockLibraryEntry, _ as SectionControls, a as sectionControlsFromLibrary, b as BLOCK_LIBRARY_CATEGORIES, c as BlockLibraryReader, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as SectionControlKey, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, k as BlockLibraryUsage, l as blockLibraryEntriesFromConfig, m as SECTION_CONTROL_KEYS, n as BlockLibraryOptions, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, u as getSectionControls, v as defaultSectionControls, w as BlockLibraryDraftHolder, x as BLOCK_LIBRARY_SLUG, y as sectionControlsOf } from "./catalogue-BC_A9eLc.mjs";
|
|
2
2
|
import { a as SeoImageSize, i as SeoImageDoc, n as titleTemplate, o as SeoImageValue, r as MediaId, s as SeoMeta, t as documentTitle } from "./title-BvjHeRo5.mjs";
|
|
3
3
|
import { A as ThemeDoc, B as ColorUsagesOption, C as SystemColorKey, D as THEME_SLUG, E as THEME_IDENTITY_SLUG, F as ResolvedThemeIdentity, H as rewriteColorUsages, I as ThemeIdentityFallback, L as resolveThemeIdentity, N as ThemeLibraryColorDoc, O as THEME_TYPOGRAPHY_SLUG, P as ThemeUploadDoc, R as ColorUsage, S as SYSTEM_COLOR_KEYS, T as THEME_COLORS_SLUG, V as findColorUsages, _ as deleteLibraryColor, a as PageEditorSystemKey, b as CreateThemeOptions, c as pageEditorTokens, d as LookFieldOptions, f as colorTokenField, g as rewriteColorTokens, h as findColorTokens, i as PAGE_EDITOR_SYSTEM_KEYS, k as ThemeColorDoc, l as themeLibraryFromDoc, m as ColorTokenHit, n as ColorSwatch, o as pageEditorLooks, p as lookField, r as LookOption, s as pageEditorSwatches, t as THEME_PREVIEW_BREAKPOINTS, u as LookFieldMode, v as rewriteColorToken, w as THEME_APPEARANCE_SLUG, x as EditableTheme, y as themeColorKeys, z as ColorUsagesList } from "./preview-D-G8PEEB.mjs";
|
|
4
4
|
import { n as facetField, t as FacetEntry } from "./facet-field-DKzRCYrh.mjs";
|