Added more agent skills

This commit is contained in:
2026-10-13 19:07:03 +02:00
parent 0ccc7e5064
commit 80d8b7102c
80 changed files with 2802 additions and 390 deletions
+9 -1
View File
@@ -27,6 +27,14 @@ export type BuildLinkFieldOptions = {
*/
export declare function buildLinkField({ name, appearances, disableLabel, relationTo, required, uploadTo, }?: BuildLinkFieldOptions): GroupField;
export type BuildLinksFieldOptions = {
/**
* What one row is called in the panel — the add button reads "Add <singular>".
* Default { singular: 'Button', plural: 'Buttons' }; e.g. { singular: 'Link', plural: 'Links' } for a link list.
*/
labels?: {
plural: string;
singular: string;
};
/** Max number of buttons. Default 2. */
maxRows?: number;
/** Field name. Default 'links'. */
@@ -36,4 +44,4 @@ export type BuildLinksFieldOptions = {
* 0..N buttons — use for every "CTA(s)" of a section. Each row holds one
* `link` (buildLinkField). Render: `links.map(({ id, link }) => <CMSLink … />)`.
*/
export declare function buildLinksField({ name, maxRows, ...linkOptions }?: BuildLinksFieldOptions): ArrayField;
export declare function buildLinksField({ name, labels, maxRows, ...linkOptions }?: BuildLinksFieldOptions): ArrayField;
+13 -2
View File
@@ -1,3 +1,4 @@
import { rowLabel } from 'src/modules/admin-ui/rowLabel.js';
const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/;
/**
* The ONE link shape for a project: a page, an external URL (also mailto:,
@@ -117,16 +118,26 @@ const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/;
/**
* 0..N buttons — use for every "CTA(s)" of a section. Each row holds one
* `link` (buildLinkField). Render: `links.map(({ id, link }) => <CMSLink … />)`.
*/ export function buildLinksField({ name = 'links', maxRows = 2, ...linkOptions } = {}) {
*/ export function buildLinksField({ name = 'links', labels = {
plural: 'Buttons',
singular: 'Button'
}, maxRows = 2, ...linkOptions } = {}) {
return {
name,
type: 'array',
admin: {
initCollapsed: true
initCollapsed: true,
// Rows read "Contact us" / "Download catalogue", not "Button 01". Needs the importMap entry.
components: rowLabel([
'link.label',
'link.url'
], labels.singular)
},
fields: [
buildLinkField(linkOptions)
],
label: labels.plural,
labels,
maxRows
};
}
File diff suppressed because one or more lines are too long