@bison-lab/payload-core 3.15.0 → 3.16.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 CHANGED
@@ -173,10 +173,7 @@ export default buildConfig({
173
173
  mark: { url: "/logo-mark.svg", alt: "Acme mark" },
174
174
  },
175
175
  },
176
- colorUsages: {
177
- collections: ["pages"],
178
- globals: ["navigation"],
179
- },
176
+ colorUsages: true,
180
177
  onPublish: async () => {
181
178
  revalidateTag("theme");
182
179
  },
@@ -186,13 +183,15 @@ export default buildConfig({
186
183
  ```
187
184
 
188
185
  **Color usages.** `createTheme({ colorUsages })` is the only site wiring for
189
- "is this custom color assigned?" Name every collection and global that
190
- stores a `lookField` / `colorTokenField` (or a string token those fields
191
- wrote). The package scans those documents drafts included — and
192
- rewrites tokens when Colors Delete needs a replacement. Omit the option,
193
- or pass empty arrays, and every additional color is unused and deletes
194
- immediately. A new look surface is added to `colorUsages`, not copied
195
- into a site helper. Site adopt names the slugs (SPI-93).
186
+ "is this custom color assigned?" Pass `true` to scan every collection and
187
+ global Payload has registered when Colors Delete runs drafts included,
188
+ blocks included. Payload internals (`payload-*`) and Theme itself are
189
+ skipped, so the library row being deleted is not treated as a use, and a
190
+ later Navigation or Territories global joins without a site change. A
191
+ `{ collections, globals }` list still names slugs when a site wants a
192
+ narrower walk. Omit the option, or pass empty arrays, and every
193
+ additional color is unused and deletes immediately. The site does not
194
+ copy `findColorTokens`.
196
195
 
197
196
  Then `payload generate:importmap` (the Theme fields resolve from
198
197
  `@bison-lab/payload-core/admin`), `payload generate:types`, and