Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7ad64230a | ||
|
|
5af5033148 |
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { rowLabel } from 'src/modules/admin-ui/rowLabel.js';
|
import { rowLabel } from '../admin-ui/rowLabel.js';
|
||||||
const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/;
|
const URL_PATTERN = /^(?:https?:\/\/|mailto:|tel:|#)/;
|
||||||
/**
|
/**
|
||||||
* The ONE link shape for a project: a page, an external URL (also mailto:,
|
* The ONE link shape for a project: a page, an external URL (also mailto:,
|
||||||
* tel:, #anchor) or an uploaded file — plus label, new-tab flag and visual
|
* tel:, #anchor) or an uploaded file — plus label, new-tab flag and visual
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
*/ /** Query parameter on the sitemap URL that returns the stylesheet instead of XML. */ export const SITEMAP_STYLE_PARAM = 'style';
|
*/ /** Query parameter on the sitemap URL that returns the stylesheet instead of XML. */ export const SITEMAP_STYLE_PARAM = 'style';
|
||||||
export const DEFAULT_SITEMAP_CREDIT = 'Technology by Intecion.com';
|
export const DEFAULT_SITEMAP_CREDIT = 'Technology by Intecion.com';
|
||||||
/** CSS `content: "…"` value — escapes backslashes, quotes and newlines. */ const cssString = (s)=>`"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/[\r\n]+/g, ' ')}"`;
|
/** CSS `content: "…"` value — escapes backslashes, quotes and newlines. */ const cssString = (s)=>`"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/[\r\n]+/g, ' ')}"`;
|
||||||
/** Only plain colour values — the option ends up inside a stylesheet. */ const safeColor = (c, fallback)=>c && /^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback;
|
/** Only plain colour values — the option ends up inside a stylesheet. */ const safeColor = (c, fallback)=>c && /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback;
|
||||||
export function buildSitemapCss({ accent, credit, title } = {}) {
|
export function buildSitemapCss({ accent, credit, title } = {}) {
|
||||||
const heading = title?.trim() || 'XML Sitemap';
|
const heading = title?.trim() || 'XML Sitemap';
|
||||||
const note = credit === false ? '' : (credit ?? DEFAULT_SITEMAP_CREDIT).trim();
|
const note = credit === false ? '' : (credit ?? DEFAULT_SITEMAP_CREDIT).trim();
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@intecion/ipal-kit",
|
"name": "@intecion/ipal-kit",
|
||||||
"version": "1.8.5",
|
"version": "1.8.6",
|
||||||
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { ArrayField, Field, GroupField } from 'payload'
|
import type { ArrayField, Field, GroupField } from 'payload'
|
||||||
|
|
||||||
import { rowLabel } from 'src/modules/admin-ui/rowLabel.js'
|
import { rowLabel } from '../admin-ui/rowLabel.js'
|
||||||
|
|
||||||
export type LinkAppearance = 'link' | 'primary' | 'secondary'
|
export type LinkAppearance = 'link' | 'primary' | 'secondary'
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ export type BuildLinkFieldOptions = {
|
|||||||
uploadTo?: string
|
uploadTo?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/
|
const URL_PATTERN = /^(?:https?:\/\/|mailto:|tel:|#)/
|
||||||
|
|
||||||
type SiblingWithType = { type?: string } | undefined
|
type SiblingWithType = { type?: string } | undefined
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const cssString = (s: string) => `"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"
|
|||||||
|
|
||||||
/** Only plain colour values — the option ends up inside a stylesheet. */
|
/** Only plain colour values — the option ends up inside a stylesheet. */
|
||||||
const safeColor = (c: string | undefined, fallback: string) =>
|
const safeColor = (c: string | undefined, fallback: string) =>
|
||||||
c && /^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
|
c && /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
|
||||||
|
|
||||||
export function buildSitemapCss({ accent, credit, title }: SitemapStyleOptions = {}): string {
|
export function buildSitemapCss({ accent, credit, title }: SitemapStyleOptions = {}): string {
|
||||||
const heading = title?.trim() || 'XML Sitemap'
|
const heading = title?.trim() || 'XML Sitemap'
|
||||||
|
|||||||
Reference in New Issue
Block a user