@bison-lab/payload-core 3.21.0 → 3.24.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.
@@ -1,2 +1,2 @@
1
- import { a as NAVIGATION_FOOTER_DB_NAME, c as NavigationBar, d as NavigationHeader, l as NavigationDoc, o as NAVIGATION_FOOTER_SLUG, r as NAVIGATION_DB_NAME, s as NAVIGATION_SLUG, t as getNavigation, u as NavigationFooter } from "./published-qFPVvTk_.mjs";
1
+ import { a as NAVIGATION_FOOTER_DB_NAME, c as NavigationBar, d as NavigationHeader, l as NavigationDoc, o as NAVIGATION_FOOTER_SLUG, r as NAVIGATION_DB_NAME, s as NAVIGATION_SLUG, t as getNavigation, u as NavigationFooter } from "./published-BtEiv0lH.mjs";
2
2
  export { NAVIGATION_DB_NAME, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, type NavigationBar, type NavigationDoc, type NavigationFooter, type NavigationHeader, getNavigation };
@@ -1,2 +1,2 @@
1
- import { a as NAVIGATION_FOOTER_SLUG, i as NAVIGATION_FOOTER_DB_NAME, n as NAVIGATION_DB_NAME, o as NAVIGATION_SLUG, t as getNavigation } from "./published-CFYwqnZI.mjs";
1
+ import { a as NAVIGATION_FOOTER_SLUG, i as NAVIGATION_FOOTER_DB_NAME, n as NAVIGATION_DB_NAME, o as NAVIGATION_SLUG, t as getNavigation } from "./published-Chd5PFhw.mjs";
2
2
  export { NAVIGATION_DB_NAME, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, getNavigation };
@@ -62,8 +62,8 @@ interface GetNavigationArgs {
62
62
  //#region src/navigation/published.d.ts
63
63
  /**
64
64
  * Reads Header and Footer and returns one `{ header, footer, bar }`. A
65
- * site header does not learn two slugs. `bar` is the Header Settings
66
- * group (hide on scroll, viewport, default panel width). `draft: true`
65
+ * site header does not learn two slugs. `bar` is the hidden Header group
66
+ * (hide on scroll, viewport, default panel width). `draft: true`
67
67
  * reads the newest version; omit it (or pass false) for the published
68
68
  * documents.
69
69
  */
@@ -73,4 +73,4 @@ declare function getNavigation({
73
73
  }: GetNavigationArgs): Promise<NavigationDoc>;
74
74
  //#endregion
75
75
  export { NAVIGATION_FOOTER_DB_NAME as a, NavigationBar as c, NavigationHeader as d, NAVIGATION_FEATURE as i, NavigationDoc as l, CreateNavigationOptions as n, NAVIGATION_FOOTER_SLUG as o, NAVIGATION_DB_NAME as r, NAVIGATION_SLUG as s, getNavigation as t, NavigationFooter as u };
76
- //# sourceMappingURL=published-qFPVvTk_.d.mts.map
76
+ //# sourceMappingURL=published-BtEiv0lH.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"published-qFPVvTk_.d.mts","names":[],"sources":["../src/navigation/types.ts","../src/navigation/published.ts"],"mappings":";;;cAWa,eAAA;AAAA,cACA,kBAAA;AAAA,cACA,sBAAA;AAAA,cACA,yBAAA;AAAA,cAEA,kBAAA;AAAA,UAEI,uBAAA;;;;AAJjB;EASE,MAAA,EAAQ,KAAA;;EAER,oBAAA;EAXoC;EAapC,kBAAA;EAX6B;;;;EAgB7B,OAAA,GAAU,WAAA,CAAY,WAAA,CAAY,YAAA;EAClC,WAAA,GAAc,WAAA,CAAY,WAAA,CAAY,YAAA;;;;;EAKtC,aAAA;EALsC;EAOtC,eAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA;EACA,GAAA;AAAA;AAAA,UAGe,aAAA;EACf,YAAA;EACA,QAAA;EACA,eAAA;AAAA;AAAA,UAGe,gBAAA;EACf,OAAA;AAAA;AAAA,UAGe,aAAA;EACf,MAAA,EAAQ,gBAAA;EACR,MAAA,EAAQ,gBAAA;EACR,GAAA,EAAK,aAAA;AAAA;AAAA,UAGU,iBAAA;EACf,OAAA;IACE,UAAA,GAAa,IAAA;MACX,IAAA;MACA,KAAA;MACA,cAAA;MACA,KAAA;IAAA,MACI,OAAA;EAAA;EAER,KAAA;AAAA;;;;;AA9DF;;;;;iBC4BsB,aAAA,CAAA;EAAgB,OAAA;EAAS;AAAA,GAAiB,iBAAA,GAAoB,OAAA,CAAQ,aAAA"}
1
+ {"version":3,"file":"published-BtEiv0lH.d.mts","names":[],"sources":["../src/navigation/types.ts","../src/navigation/published.ts"],"mappings":";;;cAWa,eAAA;AAAA,cACA,kBAAA;AAAA,cACA,sBAAA;AAAA,cACA,yBAAA;AAAA,cAEA,kBAAA;AAAA,UAEI,uBAAA;;;;AAJjB;EASE,MAAA,EAAQ,KAAA;;EAER,oBAAA;EAXoC;EAapC,kBAAA;EAX6B;;;;EAgB7B,OAAA,GAAU,WAAA,CAAY,WAAA,CAAY,YAAA;EAClC,WAAA,GAAc,WAAA,CAAY,WAAA,CAAY,YAAA;;;;;EAKtC,aAAA;EALsC;EAOtC,eAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA;EACA,GAAA;AAAA;AAAA,UAGe,aAAA;EACf,YAAA;EACA,QAAA;EACA,eAAA;AAAA;AAAA,UAGe,gBAAA;EACf,OAAA;AAAA;AAAA,UAGe,aAAA;EACf,MAAA,EAAQ,gBAAA;EACR,MAAA,EAAQ,gBAAA;EACR,GAAA,EAAK,aAAA;AAAA;AAAA,UAGU,iBAAA;EACf,OAAA;IACE,UAAA,GAAa,IAAA;MACX,IAAA;MACA,KAAA;MACA,cAAA;MACA,KAAA;IAAA,MACI,OAAA;EAAA;EAER,KAAA;AAAA;;;;;AA9DF;;;;;iBC4BsB,aAAA,CAAA;EAAgB,OAAA;EAAS;AAAA,GAAiB,iBAAA,GAAoB,OAAA,CAAQ,aAAA"}
@@ -23,8 +23,8 @@ function barOf(doc) {
23
23
  }
24
24
  /**
25
25
  * Reads Header and Footer and returns one `{ header, footer, bar }`. A
26
- * site header does not learn two slugs. `bar` is the Header Settings
27
- * group (hide on scroll, viewport, default panel width). `draft: true`
26
+ * site header does not learn two slugs. `bar` is the hidden Header group
27
+ * (hide on scroll, viewport, default panel width). `draft: true`
28
28
  * reads the newest version; omit it (or pass false) for the published
29
29
  * documents.
30
30
  */
@@ -47,4 +47,4 @@ async function getNavigation({ payload, draft = false }) {
47
47
  //#endregion
48
48
  export { NAVIGATION_FOOTER_SLUG as a, NAVIGATION_FOOTER_DB_NAME as i, NAVIGATION_DB_NAME as n, NAVIGATION_SLUG as o, NAVIGATION_FEATURE as r, getNavigation as t };
49
49
 
50
- //# sourceMappingURL=published-CFYwqnZI.mjs.map
50
+ //# sourceMappingURL=published-Chd5PFhw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"published-Chd5PFhw.mjs","names":[],"sources":["../src/navigation/types.ts","../src/navigation/published.ts"],"sourcesContent":["/**\n * Public Header and Footer as two Globals so each has its own Save /\n * Publish / drafts. Bar behaviour (`bar` on Header) stays in the schema\n * with `admin.hidden`; it is not a Settings tab. Featured looks stay on\n * chrome roles (BIS-85 / SPI-89), not a Header array. The items kit\n * editor is the workspace field (BIS-119 / BIS-121). Payload's left nav\n * stays until BIS-90. The Spinal bump is SPI-99.\n */\n\nimport type { Block, GlobalConfig } from \"payload\";\n\nexport const NAVIGATION_SLUG = \"navigation\";\nexport const NAVIGATION_DB_NAME = \"nav\";\nexport const NAVIGATION_FOOTER_SLUG = \"navigation-footer\";\nexport const NAVIGATION_FOOTER_DB_NAME = \"navf\";\n\nexport const NAVIGATION_FEATURE = \"navigation\";\n\nexport interface CreateNavigationOptions {\n /**\n * Header bar blocks this site offers. The field stays a blocks array —\n * a later nav block is appended here, not a mega-menu-only shape.\n */\n blocks: Block[];\n /** Accordion title for each footer column. */\n footerColumnRowLabel?: string;\n /** Accordion title for each footer link row. */\n footerLinkRowLabel?: string;\n /**\n * Preview URL for both documents. The site owns the path — this factory\n * does not invent a route.\n */\n preview?: NonNullable<NonNullable<GlobalConfig[\"admin\"]>[\"preview\"]>;\n livePreview?: NonNullable<NonNullable<GlobalConfig[\"admin\"]>[\"livePreview\"]>;\n /**\n * Component path for Payload's Preview button, as a key into the site's\n * committed `importMap.js`.\n */\n previewButton?: string;\n /** The collection a page link points into. Defaults to `pages`. */\n pagesCollection?: string;\n}\n\nexport interface NavigationHeader {\n items?: unknown;\n cta?: unknown;\n}\n\nexport interface NavigationBar {\n hideOnScroll?: boolean | null;\n viewport?: boolean | null;\n defaultMaxWidth?: (\"narrow\" | \"standard\" | \"wide\") | null;\n}\n\nexport interface NavigationFooter {\n columns?: unknown;\n}\n\nexport interface NavigationDoc {\n header: NavigationHeader;\n footer: NavigationFooter;\n bar: NavigationBar;\n}\n\nexport interface GetNavigationArgs {\n payload: {\n findGlobal: (args: {\n slug: string;\n draft?: boolean;\n overrideAccess?: boolean;\n depth?: number;\n }) => Promise<unknown>;\n };\n draft?: boolean;\n}\n","import {\n NAVIGATION_FOOTER_SLUG,\n NAVIGATION_SLUG,\n type GetNavigationArgs,\n type NavigationBar,\n type NavigationDoc,\n type NavigationFooter,\n type NavigationHeader,\n} from \"./types\";\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" ? (value as Record<string, unknown>) : null;\n}\n\nfunction headerOf(doc: unknown): NavigationHeader {\n const record = asRecord(doc);\n const header = record && \"header\" in record ? asRecord(record.header) : null;\n return header ?? {};\n}\n\nfunction footerOf(doc: unknown): NavigationFooter {\n const record = asRecord(doc);\n const footer = record && \"footer\" in record ? asRecord(record.footer) : null;\n return footer ?? {};\n}\n\nfunction barOf(doc: unknown): NavigationBar {\n const record = asRecord(doc);\n const bar = record && \"bar\" in record ? asRecord(record.bar) : null;\n return bar ?? {};\n}\n\n/**\n * Reads Header and Footer and returns one `{ header, footer, bar }`. A\n * site header does not learn two slugs. `bar` is the hidden Header group\n * (hide on scroll, viewport, default panel width). `draft: true`\n * reads the newest version; omit it (or pass false) for the published\n * documents.\n */\nexport async function getNavigation({ payload, draft = false }: GetNavigationArgs): Promise<NavigationDoc> {\n const [headerDoc, footerDoc] = await Promise.all([\n payload.findGlobal({ slug: NAVIGATION_SLUG, draft, depth: 1 }),\n payload.findGlobal({ slug: NAVIGATION_FOOTER_SLUG, draft, depth: 1 }),\n ]);\n return { header: headerOf(headerDoc), footer: footerOf(footerDoc), bar: barOf(headerDoc) };\n}\n"],"mappings":";AAWA,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;AACtC,MAAa,4BAA4B;AAEzC,MAAa,qBAAqB;;;ACNlC,SAAS,SAAS,OAAgD;AAChE,QAAO,SAAS,OAAO,UAAU,WAAY,QAAoC;;AAGnF,SAAS,SAAS,KAAgC;CAChD,MAAM,SAAS,SAAS,IAAI;AAE5B,SADe,UAAU,YAAY,SAAS,SAAS,OAAO,OAAO,GAAG,SACvD,EAAE;;AAGrB,SAAS,SAAS,KAAgC;CAChD,MAAM,SAAS,SAAS,IAAI;AAE5B,SADe,UAAU,YAAY,SAAS,SAAS,OAAO,OAAO,GAAG,SACvD,EAAE;;AAGrB,SAAS,MAAM,KAA6B;CAC1C,MAAM,SAAS,SAAS,IAAI;AAE5B,SADY,UAAU,SAAS,SAAS,SAAS,OAAO,IAAI,GAAG,SACjD,EAAE;;;;;;;;;AAUlB,eAAsB,cAAc,EAAE,SAAS,QAAQ,SAAoD;CACzG,MAAM,CAAC,WAAW,aAAa,MAAM,QAAQ,IAAI,CAC/C,QAAQ,WAAW;EAAE,MAAM;EAAiB;EAAO,OAAO;EAAG,CAAC,EAC9D,QAAQ,WAAW;EAAE,MAAM;EAAwB;EAAO,OAAO;EAAG,CAAC,CACtE,CAAC;AACF,QAAO;EAAE,QAAQ,SAAS,UAAU;EAAE,QAAQ,SAAS,UAAU;EAAE,KAAK,MAAM,UAAU;EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bison-lab/payload-core",
3
- "version": "3.21.0",
3
+ "version": "3.24.0",
4
4
  "description": "Site-agnostic Payload CMS configuration for Bison Lab sites: the SEO tab, the Theme global, the Roles Global, the brand-assets cupboard, and the metadata and theme readers for the pages they describe",
5
5
  "homepage": "https://components.bisonlab.ai",
6
6
  "repository": {
@@ -43,6 +43,10 @@
43
43
  "files": [
44
44
  "dist"
45
45
  ],
46
+ "dependencies": {
47
+ "react-colorful": "^5.8.1",
48
+ "@bison-lab/admin-ui": "3.24.0"
49
+ },
46
50
  "peerDependencies": {
47
51
  "@bison-lab/fonts": "^3.0.0",
48
52
  "@bison-lab/tokens": "^3.0.0",
@@ -89,8 +93,8 @@
89
93
  "typescript": "^5.9.3",
90
94
  "vitest": "^4.1.2",
91
95
  "@bison-lab/fonts": "3.6.0",
92
- "@bison-lab/ui": "3.11.0",
93
- "@bison-lab/tokens": "3.11.0"
96
+ "@bison-lab/tokens": "3.11.0",
97
+ "@bison-lab/ui": "3.22.0"
94
98
  },
95
99
  "publishConfig": {
96
100
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"file":"published-CFYwqnZI.mjs","names":[],"sources":["../src/navigation/types.ts","../src/navigation/published.ts"],"sourcesContent":["/**\n * Public Header and Footer as two Globals so each has its own Save /\n * Publish / drafts. Bar behaviour (`bar` on Header) ships here; a site\n * without the consume bump (SPI-99) never sees the Settings tab.\n * Featured looks stay on chrome roles (BIS-85 / SPI-89), not a Header\n * array. The items kit editor is BIS-119. Payload's left nav stays\n * until BIS-90.\n */\n\nimport type { Block, GlobalConfig } from \"payload\";\n\nexport const NAVIGATION_SLUG = \"navigation\";\nexport const NAVIGATION_DB_NAME = \"nav\";\nexport const NAVIGATION_FOOTER_SLUG = \"navigation-footer\";\nexport const NAVIGATION_FOOTER_DB_NAME = \"navf\";\n\nexport const NAVIGATION_FEATURE = \"navigation\";\n\nexport interface CreateNavigationOptions {\n /**\n * Header bar blocks this site offers. The field stays a blocks array —\n * a later nav block is appended here, not a mega-menu-only shape.\n */\n blocks: Block[];\n /** Accordion title for each footer column. */\n footerColumnRowLabel?: string;\n /** Accordion title for each footer link row. */\n footerLinkRowLabel?: string;\n /**\n * Preview URL for both documents. The site owns the path — this factory\n * does not invent a route.\n */\n preview?: NonNullable<NonNullable<GlobalConfig[\"admin\"]>[\"preview\"]>;\n livePreview?: NonNullable<NonNullable<GlobalConfig[\"admin\"]>[\"livePreview\"]>;\n /**\n * Component path for Payload's Preview button, as a key into the site's\n * committed `importMap.js`.\n */\n previewButton?: string;\n /** The collection a page link points into. Defaults to `pages`. */\n pagesCollection?: string;\n}\n\nexport interface NavigationHeader {\n items?: unknown;\n cta?: unknown;\n}\n\nexport interface NavigationBar {\n hideOnScroll?: boolean | null;\n viewport?: boolean | null;\n defaultMaxWidth?: (\"narrow\" | \"standard\" | \"wide\") | null;\n}\n\nexport interface NavigationFooter {\n columns?: unknown;\n}\n\nexport interface NavigationDoc {\n header: NavigationHeader;\n footer: NavigationFooter;\n bar: NavigationBar;\n}\n\nexport interface GetNavigationArgs {\n payload: {\n findGlobal: (args: {\n slug: string;\n draft?: boolean;\n overrideAccess?: boolean;\n depth?: number;\n }) => Promise<unknown>;\n };\n draft?: boolean;\n}\n","import {\n NAVIGATION_FOOTER_SLUG,\n NAVIGATION_SLUG,\n type GetNavigationArgs,\n type NavigationBar,\n type NavigationDoc,\n type NavigationFooter,\n type NavigationHeader,\n} from \"./types\";\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" ? (value as Record<string, unknown>) : null;\n}\n\nfunction headerOf(doc: unknown): NavigationHeader {\n const record = asRecord(doc);\n const header = record && \"header\" in record ? asRecord(record.header) : null;\n return header ?? {};\n}\n\nfunction footerOf(doc: unknown): NavigationFooter {\n const record = asRecord(doc);\n const footer = record && \"footer\" in record ? asRecord(record.footer) : null;\n return footer ?? {};\n}\n\nfunction barOf(doc: unknown): NavigationBar {\n const record = asRecord(doc);\n const bar = record && \"bar\" in record ? asRecord(record.bar) : null;\n return bar ?? {};\n}\n\n/**\n * Reads Header and Footer and returns one `{ header, footer, bar }`. A\n * site header does not learn two slugs. `bar` is the Header Settings\n * group (hide on scroll, viewport, default panel width). `draft: true`\n * reads the newest version; omit it (or pass false) for the published\n * documents.\n */\nexport async function getNavigation({ payload, draft = false }: GetNavigationArgs): Promise<NavigationDoc> {\n const [headerDoc, footerDoc] = await Promise.all([\n payload.findGlobal({ slug: NAVIGATION_SLUG, draft, depth: 1 }),\n payload.findGlobal({ slug: NAVIGATION_FOOTER_SLUG, draft, depth: 1 }),\n ]);\n return { header: headerOf(headerDoc), footer: footerOf(footerDoc), bar: barOf(headerDoc) };\n}\n"],"mappings":";AAWA,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;AACtC,MAAa,4BAA4B;AAEzC,MAAa,qBAAqB;;;ACNlC,SAAS,SAAS,OAAgD;AAChE,QAAO,SAAS,OAAO,UAAU,WAAY,QAAoC;;AAGnF,SAAS,SAAS,KAAgC;CAChD,MAAM,SAAS,SAAS,IAAI;AAE5B,SADe,UAAU,YAAY,SAAS,SAAS,OAAO,OAAO,GAAG,SACvD,EAAE;;AAGrB,SAAS,SAAS,KAAgC;CAChD,MAAM,SAAS,SAAS,IAAI;AAE5B,SADe,UAAU,YAAY,SAAS,SAAS,OAAO,OAAO,GAAG,SACvD,EAAE;;AAGrB,SAAS,MAAM,KAA6B;CAC1C,MAAM,SAAS,SAAS,IAAI;AAE5B,SADY,UAAU,SAAS,SAAS,SAAS,OAAO,IAAI,GAAG,SACjD,EAAE;;;;;;;;;AAUlB,eAAsB,cAAc,EAAE,SAAS,QAAQ,SAAoD;CACzG,MAAM,CAAC,WAAW,aAAa,MAAM,QAAQ,IAAI,CAC/C,QAAQ,WAAW;EAAE,MAAM;EAAiB;EAAO,OAAO;EAAG,CAAC,EAC9D,QAAQ,WAAW;EAAE,MAAM;EAAwB;EAAO,OAAO;EAAG,CAAC,CACtE,CAAC;AACF,QAAO;EAAE,QAAQ,SAAS,UAAU;EAAE,QAAQ,SAAS,UAAU;EAAE,KAAK,MAAM,UAAU;EAAE"}