@bison-lab/payload-blocks 3.21.0 → 3.23.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/README.md +22 -22
- package/dist/admin.d.mts +10 -2
- package/dist/admin.d.mts.map +1 -1
- package/dist/admin.mjs +1072 -469
- package/dist/admin.mjs.map +1 -1
- package/dist/{header-CV7K-3yB.mjs → header-CTMSB4C0.mjs} +28 -25
- package/dist/header-CTMSB4C0.mjs.map +1 -0
- package/dist/index.d.mts +15 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +12 -60
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +7 -3
- package/dist/react.d.mts.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/rich-text.d.mts +1 -1
- package/dist/{types-BurBx5me.d.mts → types-BwWCwKJ4.d.mts} +7 -8
- package/dist/types-BwWCwKJ4.d.mts.map +1 -0
- package/package.json +5 -4
- package/dist/header-CV7K-3yB.mjs.map +0 -1
- package/dist/types-BurBx5me.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -365,21 +365,21 @@ globals: [
|
|
|
365
365
|
|
|
366
366
|
Then `payload generate:types`, `payload generate:importmap`, and
|
|
367
367
|
`payload migrate:create`. Until the import map includes
|
|
368
|
-
`@bison-lab/payload-blocks/admin#NavItemsField
|
|
368
|
+
`@bison-lab/payload-blocks/admin#NavItemsField` and
|
|
369
|
+
`@bison-lab/payload-blocks/admin#AdminWorkspace`, those slots render
|
|
369
370
|
as nothing, not the stock blocks UI.
|
|
370
371
|
|
|
371
|
-
An editor sees
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
`
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
372
|
+
An editor opening Header sees the admin workspace: title strip (Payload
|
|
373
|
+
status / Save draft / Publish), a 300px item rail, and a canvas with a
|
|
374
|
+
sticky kit preview of the bar (Theme Identity lockup when one exists). Destinations
|
|
375
|
+
go through `LINK_FIELD`. The Header button is the rail slot that
|
|
376
|
+
writes `header.cta` (off until the editor enables it; label and destination
|
|
377
|
+
are required to save while it is on). Column widths, read as fractions, must add up to
|
|
378
|
+
100%: the rule is the array's own `validate`, so the editor sees
|
|
378
379
|
"The columns add up to 75%. They need to add up to 100%." as they build,
|
|
379
|
-
and the global's publish refuses the same.
|
|
380
|
-
mega trigger's landing page is
|
|
381
|
-
picker as every other destination
|
|
382
|
-
`payload migrate:create`.
|
|
380
|
+
and the global's publish refuses the same. A panel is narrow, standard,
|
|
381
|
+
or wide. The mega trigger's landing page is the same `type` / `page` /
|
|
382
|
+
`href` picker as every other destination.
|
|
383
383
|
|
|
384
384
|
In the site header, one call turns the fetched Header global into
|
|
385
385
|
`FloatingNavBlock` props. Looks come from chrome roles
|
|
@@ -410,19 +410,19 @@ export function SiteHeader({ doc }: { doc: Navigation }) {
|
|
|
410
410
|
}
|
|
411
411
|
```
|
|
412
412
|
|
|
413
|
-
`headerItemsFromBlocks` is still the items half
|
|
414
|
-
|
|
413
|
+
`headerItemsFromBlocks` is still the items half. Public headers must
|
|
414
|
+
call `headerFromNavigation` so hidden `bar` defaults reach the bar.
|
|
415
415
|
|
|
416
416
|
## Navigation settings
|
|
417
417
|
|
|
418
|
-
Bar behaviour
|
|
419
|
-
`bar.viewport`,
|
|
420
|
-
|
|
421
|
-
holds the edited mega row open
|
|
422
|
-
|
|
423
|
-
(BIS-85 / SPI-89) — Header has no `variants` array.
|
|
424
|
-
|
|
425
|
-
|
|
418
|
+
Bar behaviour stays on the Header schema (`bar.hideOnScroll`,
|
|
419
|
+
`bar.viewport`, `bar.defaultMaxWidth`) and is hidden in the admin.
|
|
420
|
+
The workspace canvas is the Header preview — do not leave a split
|
|
421
|
+
live-preview iframe. The kit editor holds the edited mega row open
|
|
422
|
+
through `openItem`. Featured looks stay on the chrome-role registry
|
|
423
|
+
(BIS-85 / SPI-89) — Header has no `variants` array. The Spinal consume
|
|
424
|
+
is SPI-99. After this schema change run `payload generate:importmap`,
|
|
425
|
+
`payload generate:types`, and `payload migrate:create`.
|
|
426
426
|
|
|
427
427
|
`MegaMenuBlockRenderer` renders one panel on its own, which is what a live
|
|
428
428
|
preview of the row wants; it is not a page block and has no place in the
|
package/dist/admin.d.mts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { ArrayFieldClientComponent, BlocksFieldClientComponent, DocumentViewClientProps, RowFieldClientComponent } from "payload";
|
|
3
4
|
|
|
5
|
+
//#region src/admin/admin-workspace.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Wraps Payload's DefaultEditView so Header (and later kit editors)
|
|
8
|
+
* become the mockup workspace. Does not mount a second Form.
|
|
9
|
+
*/
|
|
10
|
+
declare function AdminWorkspace(props: DocumentViewClientProps): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region src/admin/link-field.d.ts
|
|
5
13
|
declare const LinkField: RowFieldClientComponent;
|
|
6
14
|
//#endregion
|
|
@@ -29,5 +37,5 @@ declare const MinRowsArrayField: ArrayFieldClientComponent;
|
|
|
29
37
|
//#region src/admin/nav-items-field.d.ts
|
|
30
38
|
declare const NavItemsField: BlocksFieldClientComponent;
|
|
31
39
|
//#endregion
|
|
32
|
-
export { LinkField, MinRowsArrayField, NavItemsField };
|
|
40
|
+
export { AdminWorkspace, LinkField, MinRowsArrayField, NavItemsField };
|
|
33
41
|
//# sourceMappingURL=admin.d.mts.map
|
package/dist/admin.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.mts","names":[],"sources":["../src/admin/link-field.tsx","../src/admin/min-rows-array-field.tsx","../src/admin/nav-items-field.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin.d.mts","names":[],"sources":["../src/admin/admin-workspace.tsx","../src/admin/link-field.tsx","../src/admin/min-rows-array-field.tsx","../src/admin/nav-items-field.tsx"],"mappings":";;;;;;;;AAWA;iBAAgB,cAAA,CAAe,KAAA,EAAO,uBAAA,GAAuB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;cC4DhD,SAAA,EAAW,uBAAA;;;;;;AD5DxB;;;;;;;;;;;;;AC4DA;;;cChDa,iBAAA,EAAmB,yBAAA;;;cC6NnB,aAAA,EAAe,0BAAA"}
|