@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 +10 -11
- package/dist/admin.mjs.map +1 -1
- package/dist/identity-LAzSeorC.mjs.map +1 -1
- package/dist/index.d.mts +2 -55
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +51 -24
- package/dist/index.mjs.map +1 -1
- package/dist/looks-BbL309kO.mjs.map +1 -1
- package/dist/{looks-C6kTjvk3.d.mts → looks-Dk0l0mif.d.mts} +79 -11
- package/dist/looks-Dk0l0mif.d.mts.map +1 -0
- package/dist/theme.d.mts +1 -1
- package/package.json +1 -1
- package/dist/looks-C6kTjvk3.d.mts.map +0 -1
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?"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|