@rulecms/source-components-angular 0.1.0 → 0.2.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/fesm2022/rulecms-source-components-angular.mjs +203 -10
- package/fesm2022/rulecms-source-components-angular.mjs.map +1 -1
- package/lib/base-components/display/components/r-button/button-css-variables.d.ts +12 -0
- package/lib/base-components/display/components/r-button/button-css-variables.d.ts.map +1 -1
- package/lib/base-components/display/components/r-button/button-library-stylesheet.d.ts +16 -0
- package/lib/base-components/display/components/r-button/button-library-stylesheet.d.ts.map +1 -0
- package/lib/base-components/display/components/r-button/button-preset-styles.d.ts +17 -1
- package/lib/base-components/display/components/r-button/button-preset-styles.d.ts.map +1 -1
- package/lib/base-components/display/components/r-button/button-presets.d.ts +3 -4
- package/lib/base-components/display/components/r-button/button-presets.d.ts.map +1 -1
- package/lib/base-components/display/components/r-button/r-button.component.d.ts +1 -1
- package/lib/base-components/display/components/r-button/r-button.component.d.ts.map +1 -1
- package/lib/component-library-module.d.ts +6 -0
- package/lib/component-library-module.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -3
- package/public-api.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rulecms-source-components-angular.mjs","sources":["../../src/lib/base-components/display/components/r-text/default-attribute-values.ts","../../src/lib/base-components/display/components/r-text/enclosing-tags.ts","../../src/lib/base-components/display/components/r-text/resolve-enclosing-tag.ts","../../src/lib/shared/links/link-item.ts","../../src/lib/shared/links/is-safe-href.ts","../../src/lib/shared/links/resolve-link-attributes.ts","../../src/lib/shared/inline-markup/parse-inline-markers.ts","../../src/lib/shared/inline-markup/inline-markup.component.ts","../../src/lib/shared/html-tag.component.ts","../../src/lib/base-components/display/components/r-text/r-text.component.ts","../../src/lib/base-components/display/components/r-text/resolve-no-container.ts","../../src/lib/base-components/display/components/r-text/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-text/attribute-edit-mode-configs.ts","../../src/lib/component-identifiers.ts","../../src/lib/base-components/display/components/r-text/display-card-entry.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/build-cloudinary-image-urls.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/cloudinary-advanced-image.component.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/resolve-no-container.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/default-attribute-values.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/display-card-entry.ts","../../src/lib/base-components/display/components/r-video/build-video-delivery-urls.ts","../../src/lib/base-components/display/components/r-video/r-video.component.ts","../../src/lib/base-components/display/components/r-video/resolve-no-container.ts","../../src/lib/base-components/display/components/r-video/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-video/default-attribute-values.ts","../../src/lib/base-components/display/components/r-video/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-video/display-card-entry.ts","../../src/lib/base-components/display/components/r-icon/icon-attribute-value.ts","../../src/lib/shared/icons/append-icon-children.ts","../../src/lib/shared/icons/svg-icon.component.ts","../../src/lib/base-components/display/components/r-icon/r-icon.component.ts","../../src/lib/base-components/display/components/r-icon/resolve-no-container.ts","../../src/lib/base-components/display/components/r-icon/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-icon/default-attribute-values.ts","../../src/lib/base-components/display/components/r-icon/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-icon/display-card-entry.ts","../../src/lib/shared/links/parse-inline-link-markers.ts","../../src/lib/base-components/display/components/r-button/button-presets.ts","../../src/lib/base-components/display/components/r-button/button-css-variables.ts","../../src/lib/base-components/display/components/r-button/button-preset-styles.ts","../../src/lib/base-components/display/components/r-button/button-instance-props.ts","../../src/lib/base-components/display/components/r-button/resolve-button-preset.ts","../../src/lib/base-components/display/components/r-button/button-attributes.ts","../../src/lib/base-components/display/components/r-button/r-button.component.ts","../../src/lib/base-components/display/components/r-button/resolve-no-container.ts","../../src/lib/base-components/display/components/r-button/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-button/default-attribute-values.ts","../../src/lib/base-components/display/components/r-button/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-button/display-card-entry.ts","../../src/lib/base-components/display/components/r-divider/divider-attributes.ts","../../src/lib/base-components/display/components/r-divider/divider-styles.ts","../../src/lib/base-components/display/components/r-divider/r-divider.component.ts","../../src/lib/base-components/display/components/r-divider/resolve-no-container.ts","../../src/lib/base-components/display/components/r-divider/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-divider/default-attribute-values.ts","../../src/lib/base-components/display/components/r-divider/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-divider/display-card-entry.ts","../../src/lib/base-components/display/components/r-embed/embed-attributes.ts","../../src/lib/base-components/display/components/r-embed/embed-providers.ts","../../src/lib/base-components/display/components/r-embed/resolve-embed.ts","../../src/lib/base-components/display/components/r-embed/r-embed.component.ts","../../src/lib/base-components/display/components/r-embed/resolve-no-container.ts","../../src/lib/base-components/display/components/r-embed/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-embed/default-attribute-values.ts","../../src/lib/base-components/display/components/r-embed/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-embed/display-card-entry.ts","../../src/lib/base-components/display/components/r-list/list-attributes.ts","../../src/lib/base-components/display/components/r-list/r-list.component.ts","../../src/lib/base-components/display/components/r-list/resolve-no-container.ts","../../src/lib/base-components/display/components/r-list/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-list/default-attribute-values.ts","../../src/lib/base-components/display/components/r-list/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-list/display-card-entry.ts","../../src/lib/base-components/display/components/r-accordion/accordion-attributes.ts","../../src/lib/base-components/display/components/r-accordion/r-accordion.component.ts","../../src/lib/base-components/display/components/r-accordion/resolve-no-container.ts","../../src/lib/base-components/display/components/r-accordion/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-accordion/default-attribute-values.ts","../../src/lib/base-components/display/components/r-accordion/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-accordion/display-card-entry.ts","../../src/lib/base-components/display/card-entries/card-entries.ts","../../src/lib/base-components/display/card-groups.ts","../../src/lib/get-source-components-plugin.ts","../../src/lib/base-components/display/component-attributes/component-name-to-modify-attribute.ts","../../src/lib/base-components/display/component-attributes/attribute-list-for-component-types.ts","../../src/lib/get-component-metadata-for-editing.ts","../../src/lib/base-components/editor-preview/card-entries/card-entries.ts","../../src/lib/base-components/editor-preview/card-groups.ts","../../src/lib/get-preview-components.ts","../../src/lib/component-library-module.ts","../../src/lib/shared/inline-markup/serialize-inline-markers.ts","../../src/rulecms-source-components-angular.ts"],"sourcesContent":["import { DefaultAttributeValue } from '../../../../types';\n\nexport const DEFAULT_CONTENT_TEXT =\n 'This is a text block. Click to edit and add your own content.';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'content-text-3-resolutions',\n defaultValues: {\n all: DEFAULT_CONTENT_TEXT,\n },\n },\n {\n name: 'enclosing-tag-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'links-3-resolutions',\n defaultValues: {},\n },\n];\n","/**\n * HTML tags the RText component is allowed to enclose its text content in,\n * ordered from most common to least common.\n *\n * Every entry is a standard HTML element that can directly contain text\n * without changing how that text behaves. Deliberately excluded:\n * - Interactive / behavior-changing tags: a, button, label, summary, option,\n * textarea, select, details, dialog\n * - Void elements that cannot enclose text: br, wbr, hr, img, input\n * - Tags only valid inside a specific parent: li, dt, dd, td, th, caption,\n * legend, figcaption, rt, rp, optgroup\n * - Raw-text / metadata tags: script, style, title, template\n * - Live-region / form-output tags that alter assistive-technology behavior:\n * output\n */\nexport const ENCLOSING_TAGS = [\n // Common block-level text containers\n 'p',\n 'div',\n // Generic inline container\n 'span',\n // Headings\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n // Common inline emphasis and importance\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n // Common text presentation\n 'small',\n 'mark',\n // Preformatted and code text\n 'pre',\n 'code',\n // Quotations\n 'blockquote',\n 'q',\n // Subscript and superscript\n 'sub',\n 'sup',\n // Edits and strikethrough\n 's',\n 'del',\n 'ins',\n // Citations, definitions and abbreviations\n 'cite',\n 'abbr',\n 'dfn',\n // Computer I/O text\n 'kbd',\n 'samp',\n 'var',\n // Machine-readable text\n 'time',\n 'data',\n // Contact information\n 'address',\n // Bidirectional text\n 'bdi',\n 'bdo',\n // Sectioning and grouping containers\n 'figure',\n 'article',\n 'section',\n 'aside',\n 'header',\n 'footer',\n 'main',\n 'nav',\n] as const;\n\nexport type EnclosingTag = (typeof ENCLOSING_TAGS)[number];\n\n/**\n * The tags above whose default CSS display is block-level.\n *\n * Box styles — margin, padding, width, border — behave as authored on these\n * elements, so RText can carry the column's styles on the tag itself and\n * needs no wrapper div (see `resolve-no-container.ts`).\n */\nexport const BLOCK_ENCLOSING_TAGS: readonly EnclosingTag[] = [\n 'p',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'pre',\n 'blockquote',\n 'address',\n 'figure',\n 'article',\n 'section',\n 'aside',\n 'header',\n 'footer',\n 'main',\n 'nav',\n];\n\n/**\n * The tags above that default to `display: inline`, where vertical\n * margin/padding and width/height are ignored by the layout engine. Column\n * box styles must go on a wrapper element instead of on the tag.\n *\n * Kept as an explicit list rather than derived from BLOCK_ENCLOSING_TAGS so\n * adding a tag to ENCLOSING_TAGS forces a deliberate block-or-inline call;\n * the coverage test in `__tests__/enclosing-tags.test.ts` fails otherwise.\n */\nexport const INLINE_ENCLOSING_TAGS: readonly EnclosingTag[] = [\n 'span',\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n 'small',\n 'mark',\n 'code',\n 'q',\n 'sub',\n 'sup',\n 's',\n 'del',\n 'ins',\n 'cite',\n 'abbr',\n 'dfn',\n 'kbd',\n 'samp',\n 'var',\n 'time',\n 'data',\n 'bdi',\n 'bdo',\n];\n\n/**\n * Runtime guard for values arriving through componentAttributes (untyped\n * editor-authored data). Unknown values are rejected so a bad persisted value\n * can never render an unexpected element.\n */\nexport function isEnclosingTag(value: unknown): value is EnclosingTag {\n return (\n typeof value === 'string' &&\n (ENCLOSING_TAGS as readonly string[]).includes(value)\n );\n}\n\n/**\n * True when the tag renders as a block-level box. Unknown values count as\n * non-block: the safe answer, because it routes box styles to a wrapper\n * element where they are guaranteed to apply.\n */\nexport function isBlockEnclosingTag(value: unknown): boolean {\n return (\n isEnclosingTag(value) &&\n (BLOCK_ENCLOSING_TAGS as readonly string[]).includes(value)\n );\n}\n","import { isEnclosingTag } from './enclosing-tags';\nimport type { EnclosingTag } from './enclosing-tags';\n\n/** Editor-authored attribute holding the tag, flattened per device resolution. */\nexport const ENCLOSING_TAG_ATTRIBUTE = 'enclosing-tag-3-resolutions';\n\n/**\n * The single source of truth for which tag RText will render.\n *\n * Both the component and `resolveNoContainer` go through here: if they\n * disagreed, widget-react would wrap a block element in a redundant div or\n * hand box styles to an inline element that ignores them.\n *\n * The editor-authored attribute wins over the caller's prop. Attribute values\n * are untyped, so an unrecognised value falls back to the prop, then to no\n * enclosing tag at all.\n */\nexport function resolveEnclosingTag(\n componentAttributes?: { [key: string]: any },\n fallback?: EnclosingTag\n): EnclosingTag | undefined {\n const userAssignedTag = componentAttributes?.[ENCLOSING_TAG_ATTRIBUTE];\n return isEnclosingTag(userAssignedTag) ? userAssignedTag : fallback;\n}\n","/**\n * One link entry as the composer stores it. Shared by every component that\n * links (text markers today, icons next), so nothing here knows about text.\n */\nexport type LinkItem = {\n href?: string;\n /** Author-facing name for identifying the entry in the composer. Never rendered. */\n label?: string;\n target?: string;\n rel?: string;\n title?: string;\n ariaLabel?: string;\n /** `true` = bare download attribute; string = suggested filename. */\n download?: string | boolean;\n hreflang?: string;\n referrerPolicy?: string;\n};\n\n/**\n * Runtime guard for entries arriving through componentAttributes (untyped,\n * editor-authored data).\n *\n * Only object shape is checked. Field types are not: a single bad field must\n * cost that field, not the whole entry, so per-field validation belongs to\n * `resolveLinkAttributes` where each value is turned into an attribute.\n */\nexport function isLinkItem(value: unknown): value is LinkItem {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * True for a cleared slot. Clearing a link stores `{}` rather than removing\n * the array element, because marker indexes are 1-based positions: dropping an\n * element would silently repoint every later marker.\n */\nexport function isEmptyLinkItem(item: unknown): boolean {\n if (!isLinkItem(item)) {\n return true;\n }\n return Object.values(item).every(\n (value) =>\n value === undefined ||\n value === null ||\n (typeof value === 'string' && value.trim() === '')\n );\n}\n\n/**\n * The entry a `{n|…}` marker points at, by 1-based position. Tolerant of bad\n * data on every axis — a non-array list, a fractional or out-of-range index,\n * a hole in the array — because none of it may throw during a render.\n */\nexport function getLinkItemAt(links: unknown, oneBasedIndex: number): LinkItem | undefined {\n if (!Array.isArray(links)) {\n return undefined;\n }\n if (!Number.isInteger(oneBasedIndex) || oneBasedIndex < 1) {\n return undefined;\n }\n const entry = links[oneBasedIndex - 1];\n return isLinkItem(entry) ? entry : undefined;\n}\n","/**\n * Schemes that can execute or smuggle a payload. Mirrors the denylist in\n * RuleCMS `text-safety/validate-text-content.ts`; the two must stay in step,\n * because that one warns at save and this one is the guarantee at render.\n */\nexport const REJECTED_HREF_SCHEMES: readonly string[] = [\n 'javascript',\n // Netscape-era aliases for javascript:. No browser in use today runs them,\n // but RuleCMS refuses them in prose, and an href accepting what the text\n // field rejects is the kind of gap that outlives the reason for it.\n 'livescript',\n 'mocha',\n 'vbscript',\n 'data',\n 'file',\n 'blob',\n];\n\nconst SCHEME = /^([a-z][a-z0-9+.-]*):/;\n\n/**\n * Characters a browser ignores while reading a scheme. Stripped before the\n * scheme is matched so `java\\tscript:` and a leading NUL cannot hide one.\n */\nconst isIgnoredWhenReadingAScheme = (charCode: number): boolean =>\n charCode <= 0x20 || charCode === 0x7f;\n\nconst schemeProbe = (value: string): string => {\n let probe = '';\n for (let index = 0; index < value.length; index += 1) {\n if (!isIgnoredWhenReadingAScheme(value.charCodeAt(index))) {\n probe += value[index];\n }\n }\n return probe.toLowerCase();\n};\n\n/**\n * Whether a value is safe to put in an `href`.\n *\n * A denylist, not an allowlist. Customers link with git and ssh URLs, mobile\n * deep links, `mailto:`, `tel:`, `sms:`, custom app schemes, protocol-relative\n * `//host/path`, and bare `/path`, `#anchor`, `?q=1`, `./rel` — all of which\n * are accepted. A host is not required and neither is http/https. Only the\n * schemes that turn a link into code or an opaque payload are turned away.\n *\n * Rejection happens at render, never at save: the composer may use this for a\n * non-blocking warning, but stored content is not trusted content.\n */\nexport function isSafeHref(value: unknown): boolean {\n if (typeof value !== 'string' || value.trim() === '') {\n return false;\n }\n\n const match = SCHEME.exec(schemeProbe(value));\n // No scheme at all: relative, fragment, query, or protocol-relative.\n if (!match) {\n return true;\n }\n\n return !REJECTED_HREF_SCHEMES.includes(match[1]);\n}\n","import { isLinkItem } from './link-item';\nimport type { LinkItem } from './link-item';\nimport { isSafeHref } from './is-safe-href';\n\nexport type AnchorAttributes = {\n href: string;\n target?: string;\n rel?: string;\n title?: string;\n 'aria-label'?: string;\n download?: string | true;\n hrefLang?: string;\n referrerPolicy?: string;\n};\n\nconst BLANK_TARGET = '_blank';\n\nconst IMPLIED_REL_FOR_BLANK_TARGET = ['noopener', 'noreferrer'];\n\nconst cleanString = (value: unknown): string | undefined => {\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed === '' ? undefined : trimmed;\n};\n\nconst resolveRel = (authorRel: string | undefined, target: string | undefined): string | undefined => {\n const tokens = authorRel ? authorRel.split(/\\s+/) : [];\n\n if (target?.toLowerCase() !== BLANK_TARGET) {\n return tokens.length > 0 ? tokens.join(' ') : undefined;\n }\n\n const present = new Set(tokens.map((token) => token.toLowerCase()));\n const merged = [...tokens];\n IMPLIED_REL_FOR_BLANK_TARGET.forEach((token) => {\n if (!present.has(token)) {\n merged.push(token);\n }\n });\n return merged.join(' ');\n};\n\nconst resolveDownload = (download: LinkItem['download']): string | true | undefined => {\n if (download === true) {\n return true;\n }\n return cleanString(download);\n};\n\nexport function resolveLinkAttributes(item: LinkItem | undefined): AnchorAttributes | undefined {\n if (!isLinkItem(item)) {\n return undefined;\n }\n\n const href = cleanString(item.href);\n if (!isSafeHref(href)) {\n return undefined;\n }\n\n const target = cleanString(item.target);\n const rel = resolveRel(cleanString(item.rel), target);\n const title = cleanString(item.title);\n const ariaLabel = cleanString(item.ariaLabel);\n const download = resolveDownload(item.download);\n const hrefLang = cleanString(item.hreflang);\n const referrerPolicy = cleanString(item.referrerPolicy);\n\n return {\n href: href as string,\n ...(target !== undefined ? { target } : {}),\n ...(rel !== undefined ? { rel } : {}),\n ...(title !== undefined ? { title } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(download !== undefined ? { download } : {}),\n ...(hrefLang !== undefined ? { hrefLang } : {}),\n ...(referrerPolicy !== undefined ? { referrerPolicy } : {}),\n };\n}\n","/**\n * The formatting one marker can carry. Independent flags rather than a union,\n * because a span can be bold and italic and struck at once.\n */\nexport type InlineMarks = { bold: boolean; italic: boolean; strike: boolean };\n\nexport type MarkupTextRun = { kind: 'text'; text: string };\n\nexport type MarkupSpanRun = {\n kind: 'span';\n text: string;\n /**\n * 1-based position in the link list, when the marker carried an index. A\n * span can be marked without linking (`{b|word}`) and linked without marks\n * (`{1|word}`), so this is optional and the marks are always present.\n */\n index?: number;\n marks: InlineMarks;\n};\n\nexport type MarkupBreakRun = { kind: 'break' };\n\nexport type MarkupRun = MarkupTextRun | MarkupSpanRun | MarkupBreakRun;\n\n/**\n * `{` + optional mark letters + optional index + `|` + text + `}`.\n *\n * Sticky, so it can be tried at one position without slicing the string. The\n * text is everything up to the first `}`, which is what makes markers\n * non-nesting.\n */\nconst MARKER = /\\{([a-z]*)(\\d*)\\|([^}]*)\\}/y;\n\n/**\n * One letter per mark. Order is not significant (`{bi1|x}` and `{ib1|x}` are\n * the same span) and repeats are harmless, because the letters resolve to a\n * set.\n *\n * **`r` must never become a mark letter.** `br` is the line-break token below,\n * and it is only unambiguous while `r` cannot appear in a mark sequence.\n */\nconst MARK_LETTERS: Readonly<Record<string, keyof InlineMarks>> = {\n b: 'bold',\n i: 'italic',\n s: 'strike',\n};\n\n/** The one marker that carries no text: `{br|}`. */\nconst BREAK_TOKEN = 'br';\n\nconst NO_MARKS: InlineMarks = { bold: false, italic: false, strike: false };\n\n/**\n * Letters to a mark set, or `undefined` when any letter is not a mark. An\n * unknown letter makes the whole marker literal text rather than a span with\n * the bad letter ignored: an author who mistypes should see it.\n */\nconst resolveMarks = (letters: string): InlineMarks | undefined => {\n if (letters === '') {\n return { ...NO_MARKS };\n }\n\n const marks: InlineMarks = { ...NO_MARKS };\n for (const letter of letters) {\n const mark = MARK_LETTERS[letter];\n if (mark === undefined) {\n return undefined;\n }\n marks[mark] = true;\n }\n return marks;\n};\n\n/**\n * Splits authored text into plain runs, marked/linked spans, and line breaks.\n *\n * The grammar, and everything it deliberately leaves as literal text, is\n * specified in `rulecms/__docs__/__ARCHITECTURE__/INLINE_MARKUP_ARCHITECTURE.md`.\n * In short: a marker is `{`, then lowercase mark letters, then a link index,\n * then `|`, then its text, then `}`. At least one of the letters and the index\n * must be present, and everything that does not match that shape stays\n * verbatim — `{name}`, `{99}`, a lone `{`, JSON fragments, an unterminated\n * marker, an unknown mark letter, and empty span text.\n *\n * Indexes are 1-based and normalize through a base-10 parse, so `{01|x}` and\n * `{1|x}` point at the same entry. Resolving an index to an entry is the\n * caller's job; this stays pure and free of React.\n */\nexport function parseInlineMarkers(value: string): MarkupRun[] {\n if (typeof value !== 'string' || value === '') {\n return [];\n }\n\n const runs: MarkupRun[] = [];\n let pendingText = '';\n let cursor = 0;\n\n const flushPendingText = () => {\n if (pendingText !== '') {\n runs.push({ kind: 'text', text: pendingText });\n pendingText = '';\n }\n };\n\n while (cursor < value.length) {\n const open = value.indexOf('{', cursor);\n if (open === -1) {\n pendingText += value.slice(cursor);\n break;\n }\n\n MARKER.lastIndex = open;\n const match = MARKER.exec(value);\n const run = match ? resolveRun(match[1], match[2], match[3]) : undefined;\n\n if (run === undefined) {\n // Not a marker: keep the brace as text and look for the next one.\n pendingText += value.slice(cursor, open + 1);\n cursor = open + 1;\n continue;\n }\n\n pendingText += value.slice(cursor, open);\n flushPendingText();\n runs.push(run);\n cursor = open + (match as RegExpExecArray)[0].length;\n }\n\n flushPendingText();\n\n return runs;\n}\n\n/**\n * One matched `{…|…}` to the run it means, or `undefined` when the match is\n * not a marker after all and its opening brace is literal text.\n */\nconst resolveRun = (letters: string, digits: string, text: string): MarkupRun | undefined => {\n if (letters === BREAK_TOKEN) {\n // A break carries nothing. `{br|x}` is a mistake, not a break with text.\n return digits === '' && text === '' ? { kind: 'break' } : undefined;\n }\n\n if (letters === '' && digits === '') {\n return undefined;\n }\n\n // Empty text has no words to mark or link, and staying literal is what shows\n // the author the mistake instead of swallowing the marker.\n if (text === '') {\n return undefined;\n }\n\n const marks = resolveMarks(letters);\n if (marks === undefined) {\n return undefined;\n }\n\n return {\n kind: 'span',\n text,\n ...(digits === '' ? {} : { index: Number.parseInt(digits, 10) }),\n marks,\n };\n};\n","import {\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n} from '@angular/core';\nimport { getLinkItemAt } from '../links/link-item';\nimport { resolveLinkAttributes } from '../links/resolve-link-attributes';\nimport type { AnchorAttributes } from '../links/resolve-link-attributes';\nimport { parseInlineMarkers } from './parse-inline-markers';\nimport type { InlineMarks, MarkupRun, MarkupSpanRun } from './parse-inline-markers';\n\nconst MARK_TAGS: ReadonlyArray<readonly [keyof InlineMarks, string]> = [\n ['bold', 'strong'],\n ['italic', 'em'],\n ['strike', 's'],\n];\n\nconst hasMark = (marks: InlineMarks): boolean => marks.bold || marks.italic || marks.strike;\n\nconst plainTextOf = (run: MarkupRun): string => (run.kind === 'break' ? '' : run.text);\n\n@Component({\n selector: 'rulecms-inline-markup',\n standalone: true,\n template: '',\n host: { style: 'display: contents' },\n})\nexport class InlineMarkupComponent implements OnChanges {\n @Input() text = '';\n @Input() links: unknown;\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2\n ) {}\n\n ngOnChanges(): void {\n this.clear();\n const runs = parseInlineMarkers(this.text);\n const anchors = runs.map((run) =>\n run.kind === 'span' && run.index !== undefined\n ? resolveLinkAttributes(getLinkItemAt(this.links, run.index))\n : undefined\n );\n const needsElement = runs.some(\n (run, position) =>\n run.kind === 'break' ||\n (run.kind === 'span' && (anchors[position] !== undefined || hasMark(run.marks)))\n );\n\n if (!needsElement) {\n this.renderer.appendChild(\n this.host.nativeElement,\n this.renderer.createText(runs.map(plainTextOf).join(''))\n );\n return;\n }\n\n runs.forEach((run, position) => {\n if (run.kind === 'text') {\n this.renderer.appendChild(this.host.nativeElement, this.renderer.createText(run.text));\n return;\n }\n if (run.kind === 'break') {\n this.renderer.appendChild(this.host.nativeElement, this.renderer.createElement('br'));\n return;\n }\n this.renderer.appendChild(this.host.nativeElement, this.renderSpan(run, anchors[position]));\n });\n }\n\n private renderSpan(run: MarkupSpanRun, anchor: AnchorAttributes | undefined): Node {\n let node: Node =\n anchor === undefined\n ? this.renderer.createText(run.text)\n : this.createAnchor(anchor, run.text);\n\n for (let position = MARK_TAGS.length - 1; position >= 0; position -= 1) {\n const [mark, tag] = MARK_TAGS[position];\n if (run.marks[mark]) {\n const wrapper = this.renderer.createElement(tag);\n this.renderer.appendChild(wrapper, node);\n node = wrapper;\n }\n }\n return node;\n }\n\n private createAnchor(anchor: AnchorAttributes, text: string): Node {\n const el = this.renderer.createElement('a');\n this.renderer.setAttribute(el, 'href', anchor.href);\n if (anchor.target) this.renderer.setAttribute(el, 'target', anchor.target);\n if (anchor.rel) this.renderer.setAttribute(el, 'rel', anchor.rel);\n if (anchor.title) this.renderer.setAttribute(el, 'title', anchor.title);\n if (anchor['aria-label']) this.renderer.setAttribute(el, 'aria-label', anchor['aria-label']);\n if (anchor.download === true) this.renderer.setAttribute(el, 'download', '');\n else if (typeof anchor.download === 'string') this.renderer.setAttribute(el, 'download', anchor.download);\n if (anchor.hrefLang) this.renderer.setAttribute(el, 'hreflang', anchor.hrefLang);\n if (anchor.referrerPolicy) this.renderer.setAttribute(el, 'referrerpolicy', anchor.referrerPolicy);\n this.renderer.appendChild(el, this.renderer.createText(text));\n return el;\n }\n\n private clear(): void {\n const el = this.host.nativeElement;\n while (el.firstChild) {\n this.renderer.removeChild(el, el.firstChild);\n }\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n ViewChild,\n ViewContainerRef,\n TemplateRef,\n} from '@angular/core';\n\n@Component({\n selector: 'rulecms-html-tag',\n standalone: true,\n template: `\n <ng-template #projected>\n <ng-content />\n </ng-template>\n `,\n host: { style: 'display: contents' },\n})\nexport class HtmlTagComponent implements AfterViewInit, OnChanges {\n @Input({ required: true }) tag!: string;\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n @ViewChild('projected', { static: true }) projected!: TemplateRef<unknown>;\n\n private created: HTMLElement | null = null;\n private viewReady = false;\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2,\n private readonly vcr: ViewContainerRef\n ) {}\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.render();\n }\n\n ngOnChanges(): void {\n if (this.viewReady) {\n this.render();\n }\n }\n\n private render(): void {\n if (this.created) {\n this.renderer.removeChild(this.host.nativeElement, this.created);\n this.created = null;\n }\n const el = this.renderer.createElement(this.tag) as HTMLElement;\n if (this.className !== undefined) {\n this.renderer.setAttribute(el, 'class', this.className);\n }\n if (this.styleProps) {\n Object.entries(this.styleProps).forEach(([key, value]) => {\n if (value !== undefined && value !== null && value !== '') {\n this.renderer.setStyle(el, key, String(value));\n }\n });\n }\n const view = this.vcr.createEmbeddedView(this.projected);\n view.rootNodes.forEach((node) => this.renderer.appendChild(el, node));\n this.renderer.appendChild(this.host.nativeElement, el);\n this.created = el;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { DEFAULT_CONTENT_TEXT } from './default-attribute-values';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport { HtmlTagComponent } from '../../../../shared/html-tag.component';\n\n@Component({\n selector: 'rulecms-r-text',\n standalone: true,\n imports: [InlineMarkupComponent, HtmlTagComponent],\n template: `\n @if (tag) {\n <rulecms-html-tag [tag]=\"tag\" [styleProps]=\"styleProps\" [className]=\"className\">\n <rulecms-inline-markup [text]=\"content\" [links]=\"links\" />\n </rulecms-html-tag>\n } @else {\n <rulecms-inline-markup [text]=\"content\" [links]=\"links\" />\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RTextComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get content(): string {\n const contentVal = this.componentAttributes?.['content-text-3-resolutions'] ?? DEFAULT_CONTENT_TEXT;\n return typeof contentVal === 'string' ? contentVal : String(contentVal ?? '');\n }\n\n get links(): unknown {\n return this.componentAttributes?.['links-3-resolutions'];\n }\n\n get tag(): string | undefined {\n return resolveEnclosingTag(this.componentAttributes);\n }\n}\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { isBlockEnclosingTag } from './enclosing-tags';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\n\n/**\n * RText needs a wrapper div for the column's box styles unless it is about to\n * render a block-level element that can hold those styles itself.\n *\n * - No enclosing tag: bare text with no element to style → wrapper needed.\n * - Inline tag (`span`, `em`, `code`, …): vertical margin/padding and width\n * are ignored on inline boxes → wrapper needed.\n * - Block tag (`p`, `div`, `h1`, `section`, …): RText puts styleProps on the\n * tag itself → no wrapper, one less element in the DOM.\n */\nexport const resolveNoContainer = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean =>\n !isBlockEnclosingTag(resolveEnclosingTag(componentAttributes));\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\n\n/**\n * True when RText is about to render an element that can carry a className —\n * any enclosing tag, block or inline. Bare text has no element, so false.\n *\n * Shares `resolveEnclosingTag` with RText and `resolveNoContainer`: if this\n * disagreed with what the component renders, a class would either land on\n * nothing or force a redundant wrapper.\n */\nexport const resolveRendersOwnElement = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean => !!resolveEnclosingTag(componentAttributes);\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'content-text-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'enclosing-tag-3-resolutions',\n heading: 'Enclosing Tag',\n subHeading:\n 'HTML tag to enclose the text in (e.g. p, h1, span); see ENCLOSING_TAGS for the allowed values, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'links-3-resolutions',\n heading: 'Links',\n subHeading:\n 'Links this text can point at. To link part of the text, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","type ComponentIdentifier =\n | 'r-text'\n | 'something-else'\n | 'cloudinary-advanced-image'\n | 'r-video'\n | 'r-icon'\n | 'r-button'\n | 'r-divider'\n | 'r-embed'\n | 'r-list'\n | 'r-accordion';\n\nexport const ComponentIdentifiers: Record<string, ComponentIdentifier> = {\n rText: 'r-text',\n somethingElse: 'something-else',\n cloudinaryAdvancedImage: 'cloudinary-advanced-image',\n rVideo: 'r-video',\n rIcon: 'r-icon',\n rButton: 'r-button',\n rDivider: 'r-divider',\n rEmbed: 'r-embed',\n rList: 'r-list',\n rAccordion: 'r-accordion',\n} as const;\n","import { RTextComponent } from './r-text.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rText,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RTextComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","// Builds Cloudinary delivery URLs directly so the component renders a complete\n// <img src/srcSet> during server rendering (no browser-only Cloudinary SDK).\n// `f_auto,q_auto` lets Cloudinary pick format/quality; `c_limit` scales down\n// but never upscales beyond the original asset.\n\n// A Cloudinary transformation component as an object, e.g.\n// { c: 'fill', g: 'auto', ar: '4:3' } serializes to \"c_fill,g_auto,ar_4:3\"\nexport type CloudinaryTransformations = { [key: string]: string | number };\n\n// Covers phone through large desktop displays, including 2x DPR on common\n// viewport widths. Upper bound keeps multi-thousand-pixel originals in check.\nexport const cloudinarySrcSetWidths = [480, 768, 1080, 1600, 2400];\n\n// Mid-size fallback for browsers/tools that ignore srcset.\nconst fallbackSrcWidth = 1080;\n\nconst defaultTransformations: CloudinaryTransformations = {\n f: 'auto',\n q: 'auto',\n c: 'limit',\n};\n\nfunction serializeTransformations(transformations: CloudinaryTransformations): string {\n return Object.entries(transformations)\n .map(([key, value]) => `${key}_${value}`)\n .join(',');\n}\n\n// Accepts the raw Cloudinary string form (\"c_fill,g_auto,ar_4:3\") and parses\n// it into an object so it merges over the defaults the same way object input\n// does (e.g. a user c_fill cleanly replaces the default c_limit)\nfunction parseTransformationString(value: string): CloudinaryTransformations {\n const result: CloudinaryTransformations = {};\n value.split(',').forEach((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n return;\n }\n const separatorIndex = trimmed.indexOf('_');\n if (separatorIndex <= 0) {\n return;\n }\n result[trimmed.slice(0, separatorIndex)] = trimmed.slice(separatorIndex + 1);\n });\n return result;\n}\n\nfunction buildCloudinaryImageUrl(\n cloudName: string,\n publicId: string,\n width: number,\n transformations?: CloudinaryTransformations | string\n): string {\n const userTransformations =\n typeof transformations === 'string'\n ? parseTransformationString(transformations)\n : transformations;\n\n // User keys override defaults (object spread = \"split the object onto the\n // configuration\"). `w` is always component-managed so srcset width variants\n // stay correct; combined with user ar/c/g values Cloudinary produces\n // consistent crops at every width.\n const merged: CloudinaryTransformations = {\n ...defaultTransformations,\n ...userTransformations,\n w: width,\n };\n\n // encodeURI preserves the slashes that are part of Cloudinary public IDs\n // (e.g. \"images/<uuid>/<id>\") while escaping unsafe characters\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/image/upload/${serializeTransformations(merged)}/${publicId}`\n );\n}\n\nexport function buildCloudinarySrc(\n cloudName: string,\n publicId: string,\n transformations?: CloudinaryTransformations | string\n): string {\n return buildCloudinaryImageUrl(cloudName, publicId, fallbackSrcWidth, transformations);\n}\n\nexport function buildCloudinarySrcSet(\n cloudName: string,\n publicId: string,\n transformations?: CloudinaryTransformations | string\n): string {\n return cloudinarySrcSetWidths\n .map((width) => `${buildCloudinaryImageUrl(cloudName, publicId, width, transformations)} ${width}w`)\n .join(', ');\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { buildCloudinarySrc, buildCloudinarySrcSet } from './build-cloudinary-image-urls';\nimport type { CloudinaryTransformations } from './build-cloudinary-image-urls';\n\n@Component({\n selector: 'rulecms-cloudinary-image',\n standalone: true,\n imports: [NgStyle],\n template: `\n <img\n [src]=\"src\"\n [srcset]=\"srcSet\"\n [attr.alt]=\"imageAttributes['alt']\"\n [attr.decoding]=\"imageAttributes['decoding']\"\n [attr.sizes]=\"imageAttributes['sizes']\"\n [attr.loading]=\"imageAttributes['loading']\"\n [attr.fetchpriority]=\"imageAttributes['fetchpriority']\"\n [attr.width]=\"imageAttributes['width']\"\n [attr.height]=\"imageAttributes['height']\"\n [class]=\"mergedClassName\"\n [ngStyle]=\"mergedStyles\"\n />\n `,\n host: { style: 'display: contents' },\n})\nexport class CloudinaryAdvancedImageComponent {\n @Input() cloudName = 'rulecms';\n @Input() publicId = 'main-sample';\n @Input() alt = 'RuleCMS Component';\n @Input() transformations?: CloudinaryTransformations | string;\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get finalCloudName() {\n return this.componentAttributes?.['cloudinary-cloud-name'] || this.cloudName;\n }\n get finalPublicId() {\n return (\n this.componentAttributes?.['media-selector-3-resolutions'] ||\n this.componentAttributes?.['cloudinary-public-id'] ||\n this.publicId\n );\n }\n get finalTransformations() {\n return this.componentAttributes?.['cloudinary-transformations-3-resolutions'] || this.transformations;\n }\n get src() {\n return buildCloudinarySrc(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n get srcSet() {\n return buildCloudinarySrcSet(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n\n get imageAttributes(): { [key: string]: any } {\n const imageAttributes: { [key: string]: any } = {\n alt: this.alt,\n decoding: 'async',\n sizes: '100vw',\n };\n const imageStyles: { [key: string]: any } = { height: 'auto' };\n if (this.componentAttributes) {\n Object.keys(this.componentAttributes).forEach((keyWithDimensionSuffix) => {\n const value = this.componentAttributes![keyWithDimensionSuffix];\n if (value === undefined || value === null) {\n return;\n }\n const key = keyWithDimensionSuffix.endsWith('-3-resolutions')\n ? keyWithDimensionSuffix.slice(0, -'-3-resolutions'.length)\n : keyWithDimensionSuffix;\n if (key.startsWith('pass-through-image-attributes-style-')) {\n imageStyles[key.slice('pass-through-image-attributes-style-'.length)] = value;\n } else if (key.startsWith('pass-through-image-attributes-')) {\n imageAttributes[key.slice('pass-through-image-attributes-'.length)] = value;\n }\n });\n }\n (imageAttributes as any).__styles = imageStyles;\n return imageAttributes;\n }\n\n get mergedClassName(): string | undefined {\n const { className: passThroughClassName } = this.imageAttributes;\n return [passThroughClassName, this.className].filter(Boolean).join(' ') || undefined;\n }\n\n get mergedStyles() {\n return { ...(this.imageAttributes as any).__styles, ...this.styleProps };\n }\n}\n","/**\n * The component spreads styleProps onto its `<img>`, a replaced element that\n * honors min/max sizing, margin and padding directly — a wrapper div would\n * only add a redundant element. There is no configuration that changes this,\n * so the answer is the same for every render.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * Always renders an `<img>`, which can carry a className. There is no\n * configuration that changes this.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'cloudinary-cloud-name',\n defaultValues: {},\n },\n {\n name: 'cloudinary-public-id',\n defaultValues: {},\n },\n {\n name: 'media-selector-3-resolutions',\n defaultValues: {\n all: 'main-sample',\n },\n },\n {\n name: 'pass-through-image-attributes-alt-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-width-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-height-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-sizes-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-loading-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-fetchpriority-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'cloudinary-transformations-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'cloudinary-cloud-name',\n heading: 'Cloudinary Cloud Name',\n subHeading: 'Set the Cloudinary cloud name for 3 different device resolutions',\n defaultValues: {},\n // Filled by Media Selector / team defaults — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'cloudinary-public-id',\n heading: 'Image Public ID',\n subHeading: 'Set the Cloudinary image public ID for 3 different device resolutions',\n defaultValues: {},\n // Filled by Media Selector — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'media-selector-3-resolutions',\n heading: 'Media Selector',\n subHeading: 'Select media for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-alt-3-resolutions',\n heading: 'Image Alt Text',\n subHeading: 'Set the image alt text for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-width-3-resolutions',\n heading: 'Image Intrinsic Width',\n subHeading: 'Set the intrinsic pixel width (with height, reserves layout space before the image loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-height-3-resolutions',\n heading: 'Image Intrinsic Height',\n subHeading: 'Set the intrinsic pixel height (with width, reserves layout space before the image loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-sizes-3-resolutions',\n heading: 'Image Sizes',\n subHeading: 'Set the sizes attribute (e.g. \"(max-width: 600px) 100vw, 600px\") so the browser downloads the right srcset variant, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-loading-3-resolutions',\n heading: 'Image Loading',\n subHeading: 'Set to \"lazy\" for below-the-fold images (never for the main hero image), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-fetchpriority-3-resolutions',\n heading: 'Image Fetch Priority',\n subHeading: 'Set to \"high\" for the most important image on the page (e.g. the hero), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'cloudinary-transformations-3-resolutions',\n heading: 'Cloudinary Transformations',\n subHeading: 'Set extra Cloudinary transformations (e.g. \"c_fill,g_auto,ar_4:3\"); merged over the defaults f_auto,q_auto,c_limit, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { CloudinaryAdvancedImageComponent } from './cloudinary-advanced-image.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.cloudinaryAdvancedImage,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: CloudinaryAdvancedImageComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","// Builds media-host delivery URLs directly so the component renders a complete\n// <video src/poster> during server rendering (no browser-only SDK).\n//\n// Delivery choices for web video:\n// - `.mp4` extension: every uploaded source format (webm, mov, …) is\n// transcoded to progressive MP4, which plays in every browser.\n// - `vc_auto,q_auto`: the host picks the best codec and quality for the\n// requested container.\n// - `c_limit,w_1920`: scales oversized originals down to a web-appropriate\n// width but never upscales.\n\n// A transformation component as an object, e.g.\n// { c: 'fill', ar: '16:9' } serializes to \"c_fill,ar_16:9\"\nexport type VideoTransformations = { [key: string]: string | number };\n\nconst defaultVideoTransformations: VideoTransformations = {\n q: 'auto',\n vc: 'auto',\n c: 'limit',\n w: 1920,\n};\n\n// Poster is a single still frame: take the first frame (so_0), same\n// downscale cap as the video itself. Format comes from the .jpg extension.\nconst defaultPosterTransformations: VideoTransformations = {\n so: 0,\n q: 'auto',\n c: 'limit',\n w: 1920,\n};\n\n// Custom posters are uploaded images, so they get the image pipeline's\n// automatic format/quality.\nconst defaultCustomPosterTransformations: VideoTransformations = {\n f: 'auto',\n q: 'auto',\n c: 'limit',\n w: 1920,\n};\n\nfunction serializeTransformations(transformations: VideoTransformations): string {\n return Object.entries(transformations)\n .map(([key, value]) => (value === '' ? key : `${key}_${value}`))\n .join(',');\n}\n\n// Accepts the raw string form (\"c_fill,ar_16:9\") and parses it into an object\n// so it merges over the defaults the same way object input does.\nfunction parseTransformationString(value: string): VideoTransformations {\n const result: VideoTransformations = {};\n value.split(',').forEach((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n return;\n }\n const separatorIndex = trimmed.indexOf('_');\n if (separatorIndex <= 0) {\n // Flag-style component with no value (e.g. \"so_0\" handled above; keep\n // unknown flags as bare keys so they serialize unchanged).\n result[trimmed] = '';\n return;\n }\n result[trimmed.slice(0, separatorIndex)] = trimmed.slice(separatorIndex + 1);\n });\n return result;\n}\n\nfunction mergeTransformations(\n defaults: VideoTransformations,\n transformations?: VideoTransformations | string\n): VideoTransformations {\n const userTransformations =\n typeof transformations === 'string'\n ? parseTransformationString(transformations)\n : transformations;\n return { ...defaults, ...userTransformations };\n}\n\nexport function buildVideoSrc(\n cloudName: string,\n publicId: string,\n transformations?: VideoTransformations | string\n): string {\n const merged = mergeTransformations(defaultVideoTransformations, transformations);\n // encodeURI preserves the slashes that are part of public IDs\n // (e.g. \"videos/<uuid>/<id>\") while escaping unsafe characters\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/video/upload/${serializeTransformations(merged)}/${publicId}.mp4`\n );\n}\n\n// First frame of the video itself — the zero-configuration poster.\nexport function buildVideoPosterSrc(cloudName: string, publicId: string): string {\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/video/upload/${serializeTransformations(defaultPosterTransformations)}/${publicId}.jpg`\n );\n}\n\n// A separately uploaded image chosen as the poster.\nexport function buildCustomPosterSrc(cloudName: string, posterPublicId: string): string {\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/image/upload/${serializeTransformations(defaultCustomPosterTransformations)}/${posterPublicId}`\n );\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport {\n buildVideoSrc,\n buildVideoPosterSrc,\n buildCustomPosterSrc,\n} from './build-video-delivery-urls';\nimport type { VideoTransformations } from './build-video-delivery-urls';\n\nconst BOOLEAN_VIDEO_ATTRIBUTES = new Set(['controls', 'autoplay', 'loop', 'muted', 'playsinline']);\nconst coerceBoolean = (value: any): boolean => value === true || value === 'true';\n\n@Component({\n selector: 'rulecms-r-video',\n standalone: true,\n imports: [NgStyle],\n template: `\n <video\n [src]=\"src\"\n [attr.poster]=\"videoAttributes['poster']\"\n [attr.controls]=\"videoAttributes['controls'] ? true : null\"\n [attr.autoplay]=\"videoAttributes['autoplay'] ? true : null\"\n [attr.loop]=\"videoAttributes['loop'] ? true : null\"\n [attr.muted]=\"videoAttributes['muted'] ? true : null\"\n [attr.playsinline]=\"videoAttributes['playsinline'] ? true : null\"\n [attr.preload]=\"videoAttributes['preload']\"\n [attr.width]=\"videoAttributes['width']\"\n [attr.height]=\"videoAttributes['height']\"\n [class]=\"mergedClassName\"\n [ngStyle]=\"mergedStyles\"\n ></video>\n `,\n host: { style: 'display: contents' },\n})\nexport class RVideoComponent {\n @Input() cloudName = 'rulecms';\n @Input() publicId = 'main-sample-video';\n @Input() transformations?: VideoTransformations | string;\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get finalCloudName() {\n return this.componentAttributes?.['video-host-cloud-name'] || this.cloudName;\n }\n get finalPublicId() {\n return (\n this.componentAttributes?.['video-selector-3-resolutions'] ||\n this.componentAttributes?.['video-public-id'] ||\n this.publicId\n );\n }\n get finalTransformations() {\n return this.componentAttributes?.['video-transformations-3-resolutions'] || this.transformations;\n }\n get src() {\n return buildVideoSrc(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n\n get videoAttributes(): { [key: string]: any } {\n const posterPublicId = this.componentAttributes?.['video-poster-selector-3-resolutions'];\n const videoAttributes: { [key: string]: any } = {\n controls: true,\n playsinline: true,\n preload: 'metadata',\n poster: posterPublicId\n ? buildCustomPosterSrc(this.finalCloudName, posterPublicId)\n : buildVideoPosterSrc(this.finalCloudName, this.finalPublicId),\n };\n const videoStyles: { [key: string]: any } = {\n maxWidth: '100%',\n height: 'auto',\n };\n if (this.componentAttributes) {\n Object.keys(this.componentAttributes).forEach((keyWithDimensionSuffix) => {\n const value = this.componentAttributes![keyWithDimensionSuffix];\n if (value === undefined || value === null) {\n return;\n }\n const key = keyWithDimensionSuffix.endsWith('-3-resolutions')\n ? keyWithDimensionSuffix.slice(0, -'-3-resolutions'.length)\n : keyWithDimensionSuffix;\n if (key.startsWith('pass-through-video-attributes-style-')) {\n videoStyles[key.slice('pass-through-video-attributes-style-'.length)] = value;\n } else if (key.startsWith('pass-through-video-attributes-')) {\n const attributeName = key.slice('pass-through-video-attributes-'.length);\n if (BOOLEAN_VIDEO_ATTRIBUTES.has(attributeName)) {\n if (coerceBoolean(value)) {\n videoAttributes[attributeName] = true;\n } else {\n delete videoAttributes[attributeName];\n }\n return;\n }\n videoAttributes[attributeName] = value;\n }\n });\n }\n (videoAttributes as any).__styles = videoStyles;\n return videoAttributes;\n }\n\n get mergedClassName(): string | undefined {\n const { className: passThroughClassName } = this.videoAttributes;\n return [passThroughClassName, this.className].filter(Boolean).join(' ') || undefined;\n }\n\n get mergedStyles() {\n return { ...(this.videoAttributes as any).__styles, ...this.styleProps };\n }\n}\n","/**\n * The component spreads styleProps onto its `<video>`, a replaced element that\n * honors min/max sizing, margin and padding directly — a wrapper div would\n * only add a redundant element. There is no configuration that changes this,\n * so the answer is the same for every render.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * Always renders a `<video>`, which can carry a className. There is no\n * configuration that changes this.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'video-host-cloud-name',\n defaultValues: {},\n },\n {\n name: 'video-public-id',\n defaultValues: {},\n },\n {\n name: 'video-selector-3-resolutions',\n defaultValues: {\n all: 'main-sample-video',\n },\n },\n {\n name: 'video-poster-selector-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-controls-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-autoplay-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-loop-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-muted-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-playsinline-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-preload-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-width-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-height-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'video-transformations-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'video-host-cloud-name',\n heading: 'Video Host Cloud Name',\n subHeading: 'Set the media host cloud name for 3 different device resolutions',\n defaultValues: {},\n // Filled by Video Selector / team defaults — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'video-public-id',\n heading: 'Video Public ID',\n subHeading: 'Set the video public ID for 3 different device resolutions',\n defaultValues: {},\n // Filled by Video Selector — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'video-selector-3-resolutions',\n heading: 'Video Selector',\n subHeading: 'Select a video for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'video-poster-selector-3-resolutions',\n heading: 'Poster Image',\n subHeading: 'Select an uploaded image shown before playback; defaults to the video\\'s first frame, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-controls-3-resolutions',\n heading: 'Video Controls',\n subHeading: 'Show the browser playback controls (default \"true\"; set \"false\" for background/ambient video), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-autoplay-3-resolutions',\n heading: 'Video Autoplay',\n subHeading: 'Start playback automatically (browsers require muted \"true\" for autoplay to work), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-loop-3-resolutions',\n heading: 'Video Loop',\n subHeading: 'Restart the video automatically when it ends, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-muted-3-resolutions',\n heading: 'Video Muted',\n subHeading: 'Start with the audio muted (required by browsers for autoplay), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-playsinline-3-resolutions',\n heading: 'Video Plays Inline',\n subHeading: 'Play within the page on mobile instead of forcing fullscreen (default \"true\"), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-preload-3-resolutions',\n heading: 'Video Preload',\n subHeading: 'How much to download before playback: \"none\", \"metadata\" (default) or \"auto\", for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-width-3-resolutions',\n heading: 'Video Intrinsic Width',\n subHeading: 'Set the intrinsic pixel width (with height, reserves layout space before the video loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-height-3-resolutions',\n heading: 'Video Intrinsic Height',\n subHeading: 'Set the intrinsic pixel height (with width, reserves layout space before the video loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'video-transformations-3-resolutions',\n heading: 'Video Transformations',\n subHeading: 'Set extra delivery transformations (e.g. \"c_fill,ar_16:9\"); merged over the defaults q_auto,vc_auto,c_limit,w_1920, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RVideoComponent } from './r-video.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rVideo,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RVideoComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import type { IconAttributeValue, IconNode } from '../../../../types';\n\n/**\n * The placeholder a freshly dropped icon shows before the author picks one:\n * Lucide's `shapes`, inlined as a literal.\n *\n * It is a literal rather than a registry lookup on purpose. Nothing on the\n * render path may import `lucide-static` — the default library is registered\n * eagerly by every consumer, so its bundle reaches every customer page.\n * `__tests__/default-attribute-values.test.ts` checks this literal still\n * matches the registry, so a drift shows up as a test failure rather than a\n * placeholder that quietly stops matching the real icon.\n */\nexport const PLACEHOLDER_ICON_NAME = 'shapes';\n\nexport const PLACEHOLDER_ICON_NODE: IconNode = [\n [\n 'path',\n { d: 'M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z' },\n ],\n ['rect', { x: '3', y: '14', width: '7', height: '7', rx: '1' }],\n ['circle', { cx: '17.5', cy: '17.5', r: '3.5' }],\n];\n\nexport const PLACEHOLDER_ICON: IconAttributeValue = {\n name: PLACEHOLDER_ICON_NAME,\n iconNode: PLACEHOLDER_ICON_NODE,\n};\n\nconst isIconNode = (value: unknown): value is IconNode =>\n Array.isArray(value) &&\n value.length > 0 &&\n value.every(\n (entry) =>\n Array.isArray(entry) &&\n entry.length >= 2 &&\n typeof entry[0] === 'string' &&\n entry[1] != null &&\n typeof entry[1] === 'object' &&\n !Array.isArray(entry[1])\n );\n\n/**\n * Read geometry out of a persisted icon attribute.\n *\n * The composer writes `{ name, iconNode }` when the author picks an icon, so\n * every surface renders from the value alone and never needs the registry.\n * Anything else — a bare name string from a hand-edited config, a half-written\n * value — yields null and renders nothing, which is the specified behaviour\n * for an unresolvable icon on a published page.\n */\nexport const resolveIconAttributeValue = (value: unknown): IconNode | null => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n\n const { iconNode } = value as { iconNode?: unknown };\n return isIconNode(iconNode) ? iconNode : null;\n};\n","import { Renderer2 } from '@angular/core';\nimport type { IconNode } from '../../types';\n\n/** Turns persisted Lucide geometry into SVG children on `svg`. */\nexport function appendIconChildren(\n renderer: Renderer2,\n svg: Element,\n iconNode: IconNode\n): void {\n iconNode.forEach(([tag, attributes]) => {\n const child = renderer.createElement(tag, 'svg');\n Object.entries(attributes).forEach(([name, value]) => {\n if (name !== 'key') {\n renderer.setAttribute(child, name, value);\n }\n });\n renderer.appendChild(svg, child);\n });\n}\n","import {\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n} from '@angular/core';\nimport type { IconNode } from '../../types';\nimport { appendIconChildren } from './append-icon-children';\n\n@Component({\n selector: 'rulecms-svg-icon',\n standalone: true,\n template: '',\n host: { style: 'display: contents' },\n})\nexport class SvgIconComponent implements OnChanges {\n @Input({ required: true }) iconNode!: IconNode;\n @Input() width: string | number = 24;\n @Input() height: string | number = 24;\n @Input() className?: string;\n @Input() styleProps?: { [key: string]: any };\n @Input() ariaHidden = true;\n @Input() a11yProps: Record<string, string> = {};\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2\n ) {}\n\n ngOnChanges(): void {\n const el = this.host.nativeElement;\n while (el.firstChild) {\n this.renderer.removeChild(el, el.firstChild);\n }\n const svg = this.renderer.createElement('svg', 'svg');\n this.renderer.setAttribute(svg, 'xmlns', 'http://www.w3.org/2000/svg');\n this.renderer.setAttribute(svg, 'width', String(this.width));\n this.renderer.setAttribute(svg, 'height', String(this.height));\n this.renderer.setAttribute(svg, 'viewBox', '0 0 24 24');\n this.renderer.setAttribute(svg, 'fill', 'none');\n this.renderer.setAttribute(svg, 'stroke', 'currentColor');\n this.renderer.setAttribute(svg, 'stroke-width', '2');\n this.renderer.setAttribute(svg, 'stroke-linecap', 'round');\n this.renderer.setAttribute(svg, 'stroke-linejoin', 'round');\n if (this.className !== undefined) {\n this.renderer.setAttribute(svg, 'class', this.className);\n }\n if (this.styleProps) {\n Object.entries(this.styleProps).forEach(([key, value]) => {\n if (value !== undefined && value !== null && value !== '') {\n this.renderer.setStyle(svg, key, String(value));\n }\n });\n }\n Object.entries(this.a11yProps).forEach(([key, value]) => {\n this.renderer.setAttribute(svg, key, value);\n });\n if (this.ariaHidden && Object.keys(this.a11yProps).length === 0) {\n this.renderer.setAttribute(svg, 'aria-hidden', 'true');\n }\n appendIconChildren(this.renderer, svg, this.iconNode);\n this.renderer.appendChild(el, svg);\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { PLACEHOLDER_ICON_NODE, resolveIconAttributeValue } from './icon-attribute-value';\nimport { SvgIconComponent } from '../../../../shared/icons/svg-icon.component';\n\nconst A11Y_ATTR_KEYS = [\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'role',\n 'title',\n] as const;\n\n@Component({\n selector: 'rulecms-r-icon',\n standalone: true,\n imports: [SvgIconComponent],\n template: `\n @if (iconNode) {\n <rulecms-svg-icon\n [iconNode]=\"iconNode\"\n [className]=\"className\"\n [styleProps]=\"styleProps\"\n [a11yProps]=\"a11yProps\"\n [ariaHidden]=\"!hasA11yProp\"\n />\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RIconComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get iconNode() {\n const value = this.componentAttributes?.['icon-name-3-resolutions'];\n return value == null ? PLACEHOLDER_ICON_NODE : resolveIconAttributeValue(value);\n }\n\n get a11yProps(): Record<string, string> {\n if (!this.componentAttributes) return {};\n const a11yProps: Record<string, string> = {};\n for (const key of A11Y_ATTR_KEYS) {\n const value = this.componentAttributes[key];\n if (typeof value === 'string' && value.length > 0) {\n a11yProps[key] = value;\n }\n }\n return a11yProps;\n }\n\n get hasA11yProp(): boolean {\n return Object.keys(this.a11yProps).length > 0;\n }\n}\n","/**\n * Always renders an `<svg>`, a replaced element that honours sizing, margin\n * and colour (via currentColor) directly, so a wrapper div would only add a\n * redundant element. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * The `<svg>` carries the className. An unresolvable attribute renders no\n * element at all, but that is a data error rather than a different root type,\n * so the configured happy path is what this answers for.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport { PLACEHOLDER_ICON } from './icon-attribute-value';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n // Holds `{ name, iconNode }`, not a bare name: the composer stamps the\n // geometry when the author picks the icon so the render path never needs\n // the icon registry.\n name: 'icon-name-3-resolutions',\n defaultValues: {\n all: PLACEHOLDER_ICON,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport { PLACEHOLDER_ICON } from './icon-attribute-value';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'icon-name-3-resolutions',\n heading: 'Icon',\n subHeading:\n 'Search by name or by what the icon depicts (e.g. \"launch\" finds the rocket), for 3 different device resolutions',\n defaultValues: {\n all: PLACEHOLDER_ICON,\n },\n },\n];\n","import { RIconComponent } from './r-icon.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rIcon,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RIconComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import { parseInlineMarkers } from '../inline-markup/parse-inline-markers';\n\nexport type InlineTextRun = { kind: 'text'; text: string };\nexport type InlineLinkRun = { kind: 'link'; index: number; text: string };\nexport type InlineRun = InlineTextRun | InlineLinkRun;\n\n/**\n * @deprecated Use `parseInlineMarkers` from `shared/inline-markup`.\n *\n * The link-only view of the grammar, kept because it is public API. Markers now\n * also carry marks (`{b|word}`) and line breaks (`{br|}`), which this shape\n * cannot express, so anything that is not a linked span is flattened into text:\n * marked spans contribute their words without the marks, and a break\n * contributes a newline. That is exactly what a caller stripping markers out of\n * a string wants — `resolveAccordionSummary` is the one in this package — and\n * it is wrong for anything that means to render them.\n *\n * Adjacent text is merged, so text with no linked spans is still one run.\n */\nexport function parseInlineLinkMarkers(value: string): InlineRun[] {\n const runs: InlineRun[] = [];\n let pendingText = '';\n\n const flushPendingText = () => {\n if (pendingText !== '') {\n runs.push({ kind: 'text', text: pendingText });\n pendingText = '';\n }\n };\n\n for (const run of parseInlineMarkers(value)) {\n if (run.kind === 'span' && run.index !== undefined) {\n flushPendingText();\n runs.push({ kind: 'link', index: run.index, text: run.text });\n continue;\n }\n pendingText += run.kind === 'break' ? '\\n' : run.text;\n }\n\n flushPendingText();\n\n return runs;\n}\n","/**\n * The preset vocabulary for `r-button`.\n *\n * Three independent axes rather than one flat list of named buttons: five\n * variants times four tones times five sizes is a hundred looks from three\n * short tables, and an author picks each axis without us having to have\n * anticipated the combination.\n *\n * Every preset name here is persisted customer data, exactly like an icon\n * name. A name that has shipped is never deleted or repurposed — add a new\n * one and alias the old one, or published pages change appearance on upgrade.\n */\n\n/** How the button is filled and bordered. */\nexport const BUTTON_VARIANTS = ['solid', 'soft', 'outline', 'ghost', 'link'] as const;\n\n/** Which colour family the variant draws from. */\nexport const BUTTON_TONES = ['brand', 'neutral', 'danger', 'success'] as const;\n\n/** Type scale, padding and control height, smallest to largest. */\nexport const BUTTON_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number];\nexport type ButtonTone = (typeof BUTTON_TONES)[number];\nexport type ButtonSize = (typeof BUTTON_SIZES)[number];\n\nexport type ButtonPreset = {\n variant: ButtonVariant;\n tone: ButtonTone;\n size: ButtonSize;\n};\n\n/**\n * What an unconfigured button looks like. Dropping the component on a canvas\n * and touching nothing must already produce something shippable.\n */\nexport const DEFAULT_BUTTON_PRESET: ButtonPreset = {\n variant: 'solid',\n tone: 'brand',\n size: 'md',\n};\n\nexport const isButtonVariant = (value: unknown): value is ButtonVariant =>\n BUTTON_VARIANTS.includes(value as ButtonVariant);\n\nexport const isButtonTone = (value: unknown): value is ButtonTone =>\n BUTTON_TONES.includes(value as ButtonTone);\n\nexport const isButtonSize = (value: unknown): value is ButtonSize =>\n BUTTON_SIZES.includes(value as ButtonSize);\n\n/**\n * The colour slots a tone fills.\n *\n * `hover` / `active` / `softHover` are defined but not yet rendered: a source\n * component cannot ship a `:hover` rule to a customer's page today, so there\n * is nothing to attach them to. They live here so that adding the stylesheet\n * later is a delivery change rather than a redesign of every tone.\n */\nexport type TonePalette = {\n /** Solid fill, and the text colour for outline / ghost / link. */\n base: string;\n hover: string;\n active: string;\n /** Text placed on top of `base`. */\n contrast: string;\n /** Outline border, kept separate so neutral can be lighter than its text. */\n border: string;\n /** Tinted fill for the soft variant. */\n soft: string;\n softHover: string;\n /** Text placed on top of `soft`. */\n softContrast: string;\n};\n\n/**\n * Defaults only. Every one of these reaches the page as the fallback half of a\n * `var(--rulecms-button-…, default)`, so a customer rebrands every button on\n * their site by defining the custom property once, with no per-button edits\n * and no composer access. See `button-css-variables.ts`.\n */\nexport const TONE_PALETTES: Record<ButtonTone, TonePalette> = {\n brand: {\n base: '#2563eb',\n hover: '#1d4ed8',\n active: '#1e40af',\n contrast: '#ffffff',\n border: '#2563eb',\n soft: '#eff6ff',\n softHover: '#dbeafe',\n softContrast: '#1d4ed8',\n },\n neutral: {\n base: '#334155',\n hover: '#1e293b',\n active: '#0f172a',\n contrast: '#ffffff',\n // Deliberately lighter than `base`: a secondary button whose border matches\n // its dark label text reads as heavy as a primary one.\n border: '#cbd5e1',\n soft: '#f1f5f9',\n softHover: '#e2e8f0',\n softContrast: '#334155',\n },\n danger: {\n base: '#dc2626',\n hover: '#b91c1c',\n active: '#991b1b',\n contrast: '#ffffff',\n border: '#dc2626',\n soft: '#fef2f2',\n softHover: '#fee2e2',\n softContrast: '#b91c1c',\n },\n success: {\n base: '#16a34a',\n hover: '#15803d',\n active: '#166534',\n contrast: '#ffffff',\n border: '#16a34a',\n soft: '#f0fdf4',\n softHover: '#dcfce7',\n softContrast: '#15803d',\n },\n};\n\nexport type SizeScale = {\n fontSize: string;\n /** Floor for the control height. WCAG 2.2 AA wants at least 24px. */\n minHeight: string;\n paddingInline: string;\n paddingBlock: string;\n borderRadius: string;\n /** Space between an icon and the label. */\n gap: string;\n};\n\nexport const SIZE_SCALES: Record<ButtonSize, SizeScale> = {\n xs: {\n fontSize: '12px',\n minHeight: '28px',\n paddingInline: '10px',\n paddingBlock: '4px',\n borderRadius: '4px',\n gap: '4px',\n },\n sm: {\n fontSize: '14px',\n minHeight: '34px',\n paddingInline: '12px',\n paddingBlock: '6px',\n borderRadius: '6px',\n gap: '6px',\n },\n md: {\n fontSize: '16px',\n minHeight: '40px',\n paddingInline: '16px',\n paddingBlock: '8px',\n borderRadius: '8px',\n gap: '8px',\n },\n lg: {\n fontSize: '18px',\n minHeight: '48px',\n paddingInline: '20px',\n paddingBlock: '10px',\n borderRadius: '10px',\n gap: '8px',\n },\n xl: {\n fontSize: '20px',\n minHeight: '56px',\n paddingInline: '24px',\n paddingBlock: '12px',\n borderRadius: '12px',\n gap: '10px',\n },\n};\n","import type { ButtonTone } from './button-presets';\n\n/**\n * Every colour a preset emits goes out as `var(--rulecms-button-…, default)`.\n *\n * This is the whole white-label story for buttons. A customer who sets\n *\n * :root { --rulecms-button-brand: #c8102e; }\n *\n * once in their own stylesheet rebrands every RuleCMS button on the site,\n * without touching a widget, without composer access, and without us shipping\n * a theme provider or a design system to their page. Authors who want one\n * button to differ still override it per column, as before.\n */\nexport const BUTTON_CSS_VARIABLE_PREFIX = '--rulecms-button';\n\n/**\n * The suffixes on a tone's custom properties. `''` is the tone's main colour,\n * e.g. `--rulecms-button-brand`.\n */\nexport type ToneVariableSlot =\n | ''\n | 'hover'\n | 'active'\n | 'contrast'\n | 'border'\n | 'soft'\n | 'soft-hover'\n | 'soft-contrast';\n\nexport const toneCssVariable = (tone: ButtonTone, slot: ToneVariableSlot = ''): string =>\n slot === ''\n ? `${BUTTON_CSS_VARIABLE_PREFIX}-${tone}`\n : `${BUTTON_CSS_VARIABLE_PREFIX}-${tone}-${slot}`;\n\n/**\n * A `var()` reference carrying our default as the fallback, so the button is\n * fully styled whether or not the host defines anything.\n */\nexport const cssVarWithFallback = (variableName: string, fallback: string): string =>\n `var(${variableName}, ${fallback})`;\n\n/** Shorthand for the common case: one tone slot with its palette default. */\nexport const toneColor = (\n tone: ButtonTone,\n slot: ToneVariableSlot,\n fallback: string\n): string => cssVarWithFallback(toneCssVariable(tone, slot), fallback);\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport { SIZE_SCALES, TONE_PALETTES } from './button-presets';\nimport type { ButtonPreset, ButtonTone } from './button-presets';\nimport { toneColor } from './button-css-variables';\n\n/**\n * The rules that stop a native `<button>` looking like a native `<button>`.\n *\n * Two of these do most of the work. `appearance: none` removes the platform\n * chrome iOS Safari still paints on form controls, and `fontFamily: inherit`\n * opts out of the browser's refusal to inherit typography into form controls —\n * which is the single biggest reason an unstyled button looks foreign on a\n * designed page. Inheriting means the button picks up the customer's brand\n * typeface with no configuration at all.\n */\nconst structuralStyles: CSSProperties = {\n appearance: 'none',\n WebkitAppearance: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n textDecoration: 'none',\n cursor: 'pointer',\n userSelect: 'none',\n WebkitUserSelect: 'none',\n verticalAlign: 'middle',\n borderStyle: 'solid',\n fontFamily: 'inherit',\n fontWeight: 600,\n lineHeight: 1.25,\n // Inert until something changes state. Kept because the host's own `:hover`\n // rule — the only hover mechanism available to a widget today — then eases\n // for free instead of snapping.\n transition: 'background-color 150ms ease, border-color 150ms ease, color 150ms ease',\n};\n\nconst sizeStyles = (preset: ButtonPreset): CSSProperties => {\n const scale = SIZE_SCALES[preset.size];\n return {\n fontSize: scale.fontSize,\n minHeight: scale.minHeight,\n // Logical properties so a right-to-left page mirrors correctly.\n paddingInline: scale.paddingInline,\n paddingBlock: scale.paddingBlock,\n borderRadius: scale.borderRadius,\n gap: scale.gap,\n };\n};\n\n/**\n * Every variant keeps a 1px border, transparent where it is not wanted, so\n * switching preset never changes the button's box and never nudges the layout\n * around it.\n */\nconst variantStyles = (preset: ButtonPreset): CSSProperties => {\n const palette = TONE_PALETTES[preset.tone];\n const tone: ButtonTone = preset.tone;\n\n switch (preset.variant) {\n case 'solid':\n return {\n borderWidth: '1px',\n backgroundColor: toneColor(tone, '', palette.base),\n borderColor: toneColor(tone, '', palette.base),\n color: toneColor(tone, 'contrast', palette.contrast),\n };\n case 'soft':\n return {\n borderWidth: '1px',\n backgroundColor: toneColor(tone, 'soft', palette.soft),\n borderColor: 'transparent',\n color: toneColor(tone, 'soft-contrast', palette.softContrast),\n };\n case 'outline':\n return {\n borderWidth: '1px',\n backgroundColor: 'transparent',\n borderColor: toneColor(tone, 'border', palette.border),\n color: toneColor(tone, '', palette.base),\n };\n case 'ghost':\n return {\n borderWidth: '1px',\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: toneColor(tone, '', palette.base),\n };\n case 'link':\n default:\n // Reads as prose, not as a control: the size scale's box is stripped\n // back off so it can sit in a sentence without a padded hit area.\n return {\n borderWidth: 0,\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: toneColor(tone, '', palette.base),\n minHeight: 0,\n paddingInline: 0,\n paddingBlock: 0,\n borderRadius: 0,\n textDecoration: 'underline',\n textUnderlineOffset: '0.2em',\n };\n }\n};\n\n/**\n * The preset's contribution to the button's inline style.\n *\n * Callers spread column `styleProps` *after* this, which is what makes the\n * preset a set of defaults rather than a set of rules: anything the author\n * touched in Column Styles lands later in the object and wins.\n */\nexport function buildButtonPresetStyles(preset: ButtonPreset): CSSProperties {\n return {\n ...structuralStyles,\n ...sizeStyles(preset),\n ...variantStyles(preset),\n };\n}\n\n/** Applied on top when the button is disabled, before column styles. */\nexport const disabledStyles: CSSProperties = {\n opacity: 0.5,\n cursor: 'not-allowed',\n};\n","import type { WidgetInstanceProps } from '../../../../types';\n\n/** The only key `r-button` reads out of the host's per-instance props. */\nexport const BUTTON_CLICK_HANDLER_PROP = 'onClick';\n\nexport type ButtonClickHandler = (event: Event) => void;\n\n/**\n * The host's click handler for this instance, or `undefined` when there is\n * nothing to attach.\n *\n * Two reasons to answer `undefined` even when the host supplied something:\n *\n * - **Disabled wins.** A disabled plain `<button>` is inert natively, but a\n * disabled *linked* button renders `<a role=\"link\" aria-disabled=\"true\">`,\n * which has no native inertness at all — a handler left on it would fire on\n * every click and make \"disabled\" a lie.\n * - **The bag is untyped.** It crosses a package boundary as\n * `{ [key: string]: any }`, so a host that passes a string here should get a\n * button that does nothing rather than a React crash on the customer's page.\n */\nexport const resolveButtonClickHandler = ({\n widgetInstanceProps,\n disabled,\n}: {\n widgetInstanceProps?: WidgetInstanceProps;\n disabled: boolean;\n}): ButtonClickHandler | undefined => {\n if (disabled) {\n return undefined;\n }\n const handler = widgetInstanceProps?.[BUTTON_CLICK_HANDLER_PROP];\n return typeof handler === 'function' ? (handler as ButtonClickHandler) : undefined;\n};\n","import {\n DEFAULT_BUTTON_PRESET,\n isButtonSize,\n isButtonTone,\n isButtonVariant,\n} from './button-presets';\nimport type { ButtonPreset } from './button-presets';\n\n/**\n * Turns whatever the composer stored into a complete preset.\n *\n * Tolerant on every axis independently: a value saved by a newer composer, a\n * half-written object, or an outright wrong type costs that one axis and\n * nothing else. A published page must never fail to render a button because\n * one field went stale.\n */\nexport function resolveButtonPreset(value: unknown): ButtonPreset {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return DEFAULT_BUTTON_PRESET;\n }\n\n const candidate = value as Partial<Record<keyof ButtonPreset, unknown>>;\n\n return {\n variant: isButtonVariant(candidate.variant)\n ? candidate.variant\n : DEFAULT_BUTTON_PRESET.variant,\n tone: isButtonTone(candidate.tone) ? candidate.tone : DEFAULT_BUTTON_PRESET.tone,\n size: isButtonSize(candidate.size) ? candidate.size : DEFAULT_BUTTON_PRESET.size,\n };\n}\n","/**\n * The attribute names `r-button` reads.\n *\n * Every one is button-specific, including the label and the icon, which are\n * conceptually the same thing `r-text` and `r-icon` already offer. Sharing\n * their attribute names would have saved two lines of editor wiring and cost\n * the documentation contract: RuleCMS publishes one page per component-scope\n * attribute and requires exactly one owning component, so a shared name has\n * no single page to link to from the drawer.\n *\n * Reuse happens a level down instead. The composer resolves an attribute to\n * an *editor* by name, and several names already share one editor, so these\n * point at the existing text field and the existing Lucide picker without\n * either component having to give up ownership of its own settings.\n *\n * Nothing here duplicates a column style attribute. Colour, border, radius,\n * spacing and width already have editors that write into the same bag, and a\n * second way to set the same CSS property would only create a question about\n * which one wins.\n */\nexport const BUTTON_PRESET_ATTRIBUTE = 'button-preset-3-resolutions';\nexport const BUTTON_LABEL_ATTRIBUTE = 'button-label-3-resolutions';\nexport const BUTTON_LINK_ATTRIBUTE = 'button-link-3-resolutions';\nexport const BUTTON_DISABLED_ATTRIBUTE = 'button-disabled-3-resolutions';\nexport const BUTTON_ICON_ATTRIBUTE = 'button-icon-3-resolutions';\nexport const BUTTON_ICON_POSITION_ATTRIBUTE = 'button-icon-position-3-resolutions';\nexport const BUTTON_ARIA_LABEL_ATTRIBUTE = 'aria-label';\n\n/** What a freshly dropped button says before the author types anything. */\nexport const DEFAULT_BUTTON_LABEL = 'Button';\n\nexport const ICON_POSITIONS = ['leading', 'trailing'] as const;\nexport type IconPosition = (typeof ICON_POSITIONS)[number];\n\nexport const DEFAULT_ICON_POSITION: IconPosition = 'leading';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * An unset label falls back to the placeholder, but a label the author\n * deliberately cleared stays cleared — that is how an icon-only button is\n * made, so an empty string cannot be treated as \"nothing set\".\n */\nexport const resolveButtonLabel = (componentAttributes: Attributes): string => {\n const value = componentAttributes?.[BUTTON_LABEL_ATTRIBUTE];\n if (value === undefined || value === null) {\n return DEFAULT_BUTTON_LABEL;\n }\n return typeof value === 'string' ? value : String(value);\n};\n\n/**\n * Select editors in the composer store `'true'` / `'false'` as strings, while\n * a hand-written or migrated config may carry a real boolean. Both mean the\n * same thing here.\n */\nexport const resolveButtonDisabled = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[BUTTON_DISABLED_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n\nexport const resolveIconPosition = (componentAttributes: Attributes): IconPosition => {\n const value = componentAttributes?.[BUTTON_ICON_POSITION_ATTRIBUTE];\n return value === 'trailing' ? 'trailing' : DEFAULT_ICON_POSITION;\n};\n\nexport const resolveButtonAriaLabel = (componentAttributes: Attributes): string | undefined => {\n const value = componentAttributes?.[BUTTON_ARIA_LABEL_ATTRIBUTE];\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed === '' ? undefined : trimmed;\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { resolveLinkAttributes } from '../../../../shared/links';\nimport { SvgIconComponent } from '../../../../shared/icons/svg-icon.component';\nimport type { IconNode, WidgetInstanceProps } from '../../../../types';\nimport { resolveIconAttributeValue } from '../r-icon/icon-attribute-value';\nimport { buildButtonPresetStyles, disabledStyles } from './button-preset-styles';\nimport { resolveButtonClickHandler } from './button-instance-props';\nimport { resolveButtonPreset } from './resolve-button-preset';\nimport {\n BUTTON_ICON_ATTRIBUTE,\n BUTTON_LINK_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n resolveButtonAriaLabel,\n resolveButtonDisabled,\n resolveButtonLabel,\n resolveIconPosition,\n} from './button-attributes';\n\n@Component({\n selector: 'rulecms-r-button',\n standalone: true,\n imports: [NgStyle, SvgIconComponent],\n template: `\n @if (link && disabled) {\n <a [ngStyle]=\"style\" [class]=\"className || undefined\" role=\"link\" aria-disabled=\"true\" [attr.aria-label]=\"ariaLabel\">\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </a>\n } @else if (link) {\n <a\n [attr.href]=\"link.href\"\n [attr.target]=\"link.target\"\n [attr.rel]=\"link.rel\"\n [attr.title]=\"link.title\"\n [attr.aria-label]=\"link['aria-label'] ?? ariaLabel\"\n [attr.download]=\"link.download === true ? '' : link.download\"\n [attr.hreflang]=\"link.hrefLang\"\n [attr.referrerpolicy]=\"link.referrerPolicy\"\n [ngStyle]=\"style\"\n [class]=\"className || undefined\"\n (click)=\"handleClick($event)\"\n >\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </a>\n } @else {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [ngStyle]=\"style\"\n [class]=\"className || undefined\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"handleClick($event)\"\n >\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </button>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RButtonComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n @Input() widgetInstanceProps?: WidgetInstanceProps;\n\n get preset() {\n return resolveButtonPreset(this.componentAttributes?.[BUTTON_PRESET_ATTRIBUTE]);\n }\n get disabled() {\n return resolveButtonDisabled(this.componentAttributes);\n }\n get style() {\n return {\n ...buildButtonPresetStyles(this.preset),\n ...(this.disabled ? disabledStyles : {}),\n ...this.styleProps,\n };\n }\n get label() {\n return resolveButtonLabel(this.componentAttributes);\n }\n get ariaLabel() {\n return resolveButtonAriaLabel(this.componentAttributes);\n }\n get link() {\n return resolveLinkAttributes(this.componentAttributes?.[BUTTON_LINK_ATTRIBUTE]);\n }\n get iconNode(): IconNode | null {\n return resolveIconAttributeValue(this.componentAttributes?.[BUTTON_ICON_ATTRIBUTE]);\n }\n get iconPosition() {\n return resolveIconPosition(this.componentAttributes);\n }\n\n handleClick(event: Event): void {\n const onClick = resolveButtonClickHandler({\n widgetInstanceProps: this.widgetInstanceProps,\n disabled: this.disabled,\n });\n onClick?.(event);\n }\n}\n","/**\n * Always renders a `<button>` or an `<a>`, both of which take padding, border,\n * background and sizing directly. A wrapper div would add an element that does\n * nothing, and would put the column's background behind the button rather than\n * on it. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * There is always a root element to carry the class: the button is the\n * component, so no configuration leaves it without one.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport { DEFAULT_BUTTON_PRESET } from './button-presets';\nimport {\n BUTTON_LABEL_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n DEFAULT_BUTTON_LABEL,\n} from './button-attributes';\n\n/**\n * Seeds the button's own semantics only.\n *\n * No style attribute may be seeded here, and the omission is load-bearing\n * rather than an oversight. Defaults are merged into the column's attribute\n * bag before styles are computed, so a seeded `border-radius-3-resolutions`\n * would be present on every button and would override the preset's radius\n * forever — the preset would appear to have no effect on anything a default\n * happened to cover. Leaving the bag empty is what lets \"unset means preset\"\n * be true.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: BUTTON_PRESET_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_BUTTON_PRESET,\n },\n },\n {\n name: BUTTON_LABEL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_BUTTON_LABEL,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport { DEFAULT_BUTTON_PRESET } from './button-presets';\nimport {\n BUTTON_DISABLED_ATTRIBUTE,\n BUTTON_ICON_ATTRIBUTE,\n BUTTON_ICON_POSITION_ATTRIBUTE,\n BUTTON_LABEL_ATTRIBUTE,\n BUTTON_LINK_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n DEFAULT_ICON_POSITION,\n} from './button-attributes';\n\n/**\n * Every setting the button offers, in the order the Modify drawer shows them:\n * how it looks, what it says, where it goes, then the two refinements most\n * buttons never need.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: BUTTON_PRESET_ATTRIBUTE,\n heading: 'Button Style',\n subHeading:\n 'Variant, tone and size. Sets how the button looks when Column Styles leave it alone — anything set there wins, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_BUTTON_PRESET },\n },\n {\n name: BUTTON_LABEL_ATTRIBUTE,\n heading: 'Label',\n subHeading: 'Text shown on the button. Clear it for an icon-only button',\n defaultValues: {},\n },\n {\n name: BUTTON_LINK_ATTRIBUTE,\n heading: 'Link',\n subHeading:\n 'Where the button goes. Setting it renders an anchor styled as a button; leaving it empty renders a plain button, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: BUTTON_ICON_ATTRIBUTE,\n heading: 'Icon',\n subHeading:\n 'Optional icon shown beside the label. Search by name or by what the icon depicts (e.g. \"launch\" finds the rocket), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: BUTTON_ICON_POSITION_ATTRIBUTE,\n heading: 'Icon Position',\n subHeading: 'Whether the icon sits before or after the label',\n defaultValues: { all: DEFAULT_ICON_POSITION },\n },\n {\n name: BUTTON_DISABLED_ATTRIBUTE,\n heading: 'Disabled',\n subHeading: 'Renders the button dimmed and non-interactive',\n defaultValues: {},\n },\n];\n","import { RButtonComponent } from './r-button.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rButton,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RButtonComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-divider` reads.\n *\n * There are two, and the list is short on purpose. A divider is a line, and a\n * line has four things about it worth setting: how thick it is, whether it is\n * broken up, what colour it is, and how far across the column it runs. Only\n * the first two are here.\n *\n * Colour and width are missing because they already exist. The line is drawn\n * in `currentColor`, so Text Color on the column sets it the same way it sets\n * the colour of an icon, and the element is the column's own box, so Width on\n * the column shortens it. Offering a second control for either would only\n * raise the question of which one wins — the same reasoning that keeps colour\n * and border off `r-button`.\n *\n * Both remaining attributes are closed sets rather than free text, which is\n * what lets them go through the composer's shared select and lets the render\n * path treat anything unrecognised as unset. A stored value reaches a CSS\n * property here, so an allowlist is the boundary that keeps it from being\n * whatever a request happened to write.\n */\nexport const DIVIDER_STYLE_ATTRIBUTE = 'divider-style-3-resolutions';\nexport const DIVIDER_THICKNESS_ATTRIBUTE = 'divider-thickness-3-resolutions';\n\nexport const DIVIDER_STYLES = ['solid', 'dashed', 'dotted'] as const;\nexport type DividerStyle = (typeof DIVIDER_STYLES)[number];\nexport const DEFAULT_DIVIDER_STYLE: DividerStyle = 'solid';\n\n/**\n * Weights rather than a free measurement. Anything under a pixel disappears on\n * a low-density screen and anything much over eight reads as a band rather\n * than a rule, so the useful range is small enough to offer whole.\n */\nexport const DIVIDER_THICKNESSES = ['1px', '2px', '3px', '4px', '8px'] as const;\nexport type DividerThickness = (typeof DIVIDER_THICKNESSES)[number];\nexport const DEFAULT_DIVIDER_THICKNESS: DividerThickness = '1px';\n\ntype Attributes = { [key: string]: any } | undefined;\n\nexport const resolveDividerStyle = (componentAttributes: Attributes): DividerStyle => {\n const value = componentAttributes?.[DIVIDER_STYLE_ATTRIBUTE];\n return DIVIDER_STYLES.includes(value) ? value : DEFAULT_DIVIDER_STYLE;\n};\n\nexport const resolveDividerThickness = (componentAttributes: Attributes): DividerThickness => {\n const value = componentAttributes?.[DIVIDER_THICKNESS_ATTRIBUTE];\n return DIVIDER_THICKNESSES.includes(value) ? value : DEFAULT_DIVIDER_THICKNESS;\n};\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport { resolveDividerStyle, resolveDividerThickness } from './divider-attributes';\n\n/**\n * The rules that stop a host page's CSS reset having an opinion about the line.\n *\n * Every popular reset has already decided what an `<hr>` looks like, and they\n * disagree: Bootstrap draws one at a quarter opacity, older versions paint it\n * as a background bar with no border at all, browsers with no reset at all\n * still paint the inset 3D groove from the days of Netscape. A widget is\n * dropped into a page whose stylesheet it has never seen, so the only line\n * that renders the same everywhere is one whose box is stated outright.\n *\n * These are inline styles, so they win against anything the host declares —\n * and column styles are spread over them afterwards, so they lose to anything\n * the author sets.\n */\nconst hostResetStyles: CSSProperties = {\n boxSizing: 'border-box',\n // The line is the top border. The element itself has no content, and the\n // other three sides are what the browser's own inset groove is made of.\n height: 0,\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n backgroundColor: 'transparent',\n opacity: 1,\n // Spacing around a divider belongs to the row's gap and the column's margin,\n // the same as it does for every other component. Zero here is a decision,\n // not an omission: the alternative is spacing that depends on which reset\n // the host page happens to load.\n marginBlock: 0,\n // Only visible once the author narrows the column: an inset rule centres\n // rather than hugging the left edge, which is what a shortened divider is\n // almost always for.\n marginInline: 'auto',\n};\n\n/**\n * The divider's contribution to its own inline style.\n *\n * Written entirely in per-side longhands. Column styles arrive as the\n * all-sides `borderWidth` / `borderStyle` / `borderColor` — different keys,\n * which is what matters: spread later they are appended after these rather\n * than replacing them in place, so an author who sets Border on the column\n * gets a border and not a silent no-op.\n */\nexport function buildDividerStyles(componentAttributes?: {\n [key: string]: any;\n}): CSSProperties {\n return {\n ...hostResetStyles,\n borderTopStyle: resolveDividerStyle(componentAttributes),\n borderTopWidth: resolveDividerThickness(componentAttributes),\n // Inherited, so Text Color on the column colours the line — and a column\n // that says nothing gets a rule in the same ink as the words around it.\n borderTopColor: 'currentColor',\n };\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { buildDividerStyles } from './divider-styles';\n\n@Component({\n selector: 'rulecms-r-divider',\n standalone: true,\n imports: [NgStyle],\n template: `<hr [ngStyle]=\"style\" [class]=\"className || undefined\" />`,\n host: { style: 'display: contents' },\n})\nexport class RDividerComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get style() {\n return {\n ...buildDividerStyles(this.componentAttributes),\n ...this.styleProps,\n };\n }\n}\n","/**\n * Always renders an `<hr>`, a block-level element that holds margin, padding,\n * width and border on itself, so a wrapper div would only add a redundant\n * element. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * The `<hr>` carries the className. There is always exactly one element and it\n * is always the root, so there is nothing for this to depend on.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport {\n DEFAULT_DIVIDER_STYLE,\n DEFAULT_DIVIDER_THICKNESS,\n DIVIDER_STYLE_ATTRIBUTE,\n DIVIDER_THICKNESS_ATTRIBUTE,\n} from './divider-attributes';\n\n/**\n * Seeds the divider's own two settings so the drawer opens on the values a\n * fresh divider is already drawn with, rather than on two empty pickers.\n *\n * Seeding them is safe here in a way it would not be for `r-button`: these\n * names are the divider's own, so nothing in Column Styles writes to them and\n * a seeded value can never shadow a style the author set.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: DIVIDER_STYLE_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_DIVIDER_STYLE,\n },\n },\n {\n name: DIVIDER_THICKNESS_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_DIVIDER_THICKNESS,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n DEFAULT_DIVIDER_STYLE,\n DEFAULT_DIVIDER_THICKNESS,\n DIVIDER_STYLE_ATTRIBUTE,\n DIVIDER_THICKNESS_ATTRIBUTE,\n} from './divider-attributes';\n\n/**\n * Both settings the divider offers, in the order the Modify drawer shows them.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: DIVIDER_STYLE_ATTRIBUTE,\n heading: 'Line Style',\n subHeading:\n 'Whether the rule is unbroken or broken up. Colour comes from Text Color on the column, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_DIVIDER_STYLE },\n },\n {\n name: DIVIDER_THICKNESS_ATTRIBUTE,\n heading: 'Thickness',\n subHeading: 'How heavy the rule is, from a hairline to a band',\n defaultValues: { all: DEFAULT_DIVIDER_THICKNESS },\n },\n];\n","import { RDividerComponent } from './r-divider.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rDivider,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RDividerComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-embed` reads.\n *\n * Four, and the shortest list that still produces a usable embed: what to\n * frame, what to call it, what shape it is, and whether it loads before the\n * visitor scrolls to it.\n *\n * There is no provider attribute. The provider is derived from the URL, so\n * pasting is the whole interaction and an author cannot pick YouTube and then\n * paste a Vimeo link. There is no width, colour, border or radius either —\n * those are column settings, and a second route to the same CSS property only\n * raises the question of which one is in force.\n *\n * Nothing here can influence the frame's privileges. `sandbox`, `allow` and\n * `referrerpolicy` are fixed per provider in `embed-providers.ts` and are not\n * attributes at all, which is also why this component deliberately has no\n * `pass-through-embed-attributes-*` convention.\n */\nexport const EMBED_URL_ATTRIBUTE = 'embed-url-3-resolutions';\nexport const EMBED_TITLE_ATTRIBUTE = 'embed-title-3-resolutions';\nexport const EMBED_ASPECT_RATIO_ATTRIBUTE = 'embed-aspect-ratio-3-resolutions';\nexport const EMBED_LOADING_ATTRIBUTE = 'embed-loading-3-resolutions';\n\n/**\n * Shapes rather than dimensions. An iframe has no intrinsic size to preserve,\n * so something has to state the proportion or the box collapses to the\n * browser's 300×150 default — and a ratio does it without the author having to\n * work out a height for every screen width.\n *\n * `none` is the escape hatch for content that has no natural shape, a booking\n * form being the obvious one. It is the only value that hands sizing back to\n * the column's Height setting.\n */\nexport const EMBED_ASPECT_RATIOS = ['16:9', '4:3', '1:1', '9:16', '21:9', 'none'] as const;\nexport type EmbedAspectRatio = (typeof EMBED_ASPECT_RATIOS)[number];\n\n/**\n * What an unshaped embed is tall by default. Applied by the component rather\n * than seeded onto the column, so the column's Height still overrides it and\n * clearing that returns the embed to a height that works — the same\n * \"unset means the component's default\" arrangement `r-button` uses for its\n * preset. Sized for a Calendly month view, which is the content that needs it.\n */\nexport const EMBED_UNSHAPED_HEIGHT = '700px';\n\nexport const EMBED_LOADING_VALUES = ['lazy', 'eager'] as const;\nexport type EmbedLoading = (typeof EMBED_LOADING_VALUES)[number];\n\n/**\n * Lazy by default. An embed is a whole third-party document — for YouTube,\n * comfortably more than the rest of the page around it — and most of them sit\n * below the fold. `eager` exists for the ones that do not.\n */\nexport const DEFAULT_EMBED_LOADING: EmbedLoading = 'lazy';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * The aspect ratio, or `undefined` when the author has not chosen one and the\n * provider's own default should apply. Anything unrecognised is treated as\n * unset rather than passed through: this value reaches a CSS property.\n */\nexport const resolveEmbedAspectRatio = (\n componentAttributes: Attributes\n): EmbedAspectRatio | undefined => {\n const value = componentAttributes?.[EMBED_ASPECT_RATIO_ATTRIBUTE];\n return EMBED_ASPECT_RATIOS.includes(value) ? value : undefined;\n};\n\nexport const resolveEmbedLoading = (componentAttributes: Attributes): EmbedLoading => {\n const value = componentAttributes?.[EMBED_LOADING_ATTRIBUTE];\n return value === 'eager' ? 'eager' : DEFAULT_EMBED_LOADING;\n};\n\n/**\n * An iframe's accessible name. A screen reader reaching an untitled frame\n * announces it as \"frame\" and nothing else, so this never returns empty — an\n * author who clears the field gets the provider's name back rather than a\n * silent frame.\n */\nexport const resolveEmbedTitle = (\n componentAttributes: Attributes,\n fallback: string\n): string => {\n const value = componentAttributes?.[EMBED_TITLE_ATTRIBUTE];\n if (typeof value !== 'string') {\n return fallback;\n }\n const trimmed = value.trim();\n return trimmed === '' ? fallback : trimmed;\n};\n\n/** CSS `aspect-ratio` wants `16 / 9`; the attribute stores the familiar `16:9`. */\nexport const toCssAspectRatio = (ratio: EmbedAspectRatio): string | undefined =>\n ratio === 'none' ? undefined : ratio.replace(':', ' / ');\n","/**\n * The providers `r-embed` will frame, and the only thing standing between an\n * author's paste box and an iframe on a customer's page.\n *\n * This is an allowlist, not a denylist — the opposite of `is-safe-href`, and\n * deliberately so. A link navigates away; an iframe runs a third party's\n * document inside the page the widget was dropped on, with whatever\n * permissions the embedding page grants it. There is no set of dangerous\n * schemes to enumerate here, because everything that is not a provider we have\n * looked at is dangerous.\n *\n * Two consequences worth stating outright:\n *\n * **The `src` is rebuilt, never passed through.** A provider takes the URL the\n * author pasted, extracts the one or two identifiers it recognises, and\n * composes a fresh URL from a hardcoded origin. Nothing an author types\n * reaches the `src` except an id that matched a narrow pattern. A watch page,\n * a share link and an already-embeddable URL all converge on the same output.\n *\n * **The frame's privileges are the provider's, not the author's.** `sandbox`\n * and `allow` are properties of the entry below, not attributes an author can\n * set, which is also why this component has no pass-through convention. A\n * `pass-through-embed-attributes-sandbox` key would hand away every guarantee\n * on this page for the sake of consistency with `r-video`.\n */\nimport type { EmbedAspectRatio } from './embed-attributes';\n\nexport type EmbedProviderId = 'youtube' | 'vimeo' | 'google-maps' | 'calendly';\n\nexport type EmbedProvider = {\n id: EmbedProviderId;\n /** Provider name for the composer and for the docs. */\n label: string;\n /**\n * Hosts an author may paste, already normalised (lowercase, no `www.`).\n * Matching one of these only earns the URL a look at `toEmbedUrl`.\n */\n inputHosts: readonly string[];\n /**\n * Builds the URL that actually goes in the `src`, or returns `null` when the\n * URL is on the right host but is not something this provider can frame.\n * The origin it returns is hardcoded here, never taken from the input.\n */\n toEmbedUrl: (url: URL) => string | null;\n /** Tokens for the iframe's `sandbox`. Fixed per provider; never author-set. */\n sandbox: readonly string[];\n /** Permissions-policy tokens for the iframe's `allow`. */\n allow: readonly string[];\n allowFullScreen: boolean;\n /** The shape this provider's content wants before an author says otherwise. */\n defaultAspectRatio: EmbedAspectRatio;\n /** The iframe's accessible name when the author has not written one. */\n defaultTitle: string;\n};\n\n/**\n * `allow-scripts` with `allow-same-origin` looks like it cancels the sandbox,\n * and for a same-origin frame it would. Here the framed document is\n * cross-origin, so \"same origin\" means youtube.com's own origin, not ours: the\n * frame gets its own storage and cookies and still cannot reach into the\n * embedding page. Dropping `allow-same-origin` does not harden anything — it\n * gives the frame an opaque origin, which breaks every one of these providers\n * outright.\n */\nconst FRAMED_APP_SANDBOX = ['allow-scripts', 'allow-same-origin'] as const;\n\nconst YOUTUBE_ID = /^[A-Za-z0-9_-]{11}$/;\nconst VIMEO_ID = /^[0-9]+$/;\nconst VIMEO_PRIVACY_HASH = /^[A-Za-z0-9]+$/;\nconst CALENDLY_SEGMENT = /^[A-Za-z0-9_-]+$/;\nconst GOOGLE_MAPS_PB = /^[A-Za-z0-9!*'().~_-]+$/;\n\n/**\n * Calendly paths that are the scheduling app rather than someone's booking\n * page. Framing one gets a login screen, so they fail closed here instead.\n */\nconst CALENDLY_RESERVED_SEGMENTS = new Set([\n 'app',\n 'event_types',\n 'login',\n 'signup',\n 'pages',\n 'api',\n 'help',\n 'blog',\n 'pricing',\n]);\n\n/**\n * Calendly's own appearance and prefill options, which authors legitimately\n * copy along with the booking URL. Anything else in the query is dropped\n * rather than forwarded — the point of rebuilding the URL is that only things\n * on a list get through.\n */\nconst CALENDLY_ALLOWED_PARAMS = [\n 'hide_gdpr_banner',\n 'hide_event_type_details',\n 'hide_landing_page_details',\n 'primary_color',\n 'background_color',\n 'text_color',\n 'month',\n 'date',\n] as const;\n\n/** Lowercase and drop a leading `www.`, so host matching is not a trick question. */\nexport const normaliseHost = (hostname: string): string =>\n hostname.toLowerCase().replace(/^www\\./, '');\n\nconst pathSegments = (url: URL): string[] =>\n url.pathname.split('/').filter((segment) => segment !== '');\n\n/**\n * Every YouTube URL an author is likely to have in the clipboard — the watch\n * page, the share link, a Short, a live stream, and an embed URL someone\n * copied out of another site's markup — reduced to the video id.\n */\nconst youTubeVideoId = (url: URL): string | null => {\n const segments = pathSegments(url);\n const host = normaliseHost(url.hostname);\n\n if (host === 'youtu.be') {\n return segments[0] ?? null;\n }\n\n if (segments[0] === 'watch') {\n return url.searchParams.get('v');\n }\n\n if (segments.length === 2 && ['embed', 'shorts', 'live', 'v'].includes(segments[0])) {\n return segments[1];\n }\n\n return null;\n};\n\nexport const EMBED_PROVIDERS: readonly EmbedProvider[] = [\n {\n id: 'youtube',\n label: 'YouTube',\n inputHosts: ['youtube.com', 'm.youtube.com', 'youtu.be', 'youtube-nocookie.com'],\n toEmbedUrl: (url) => {\n const videoId = youTubeVideoId(url);\n if (!videoId || !YOUTUBE_ID.test(videoId)) {\n return null;\n }\n // youtube-nocookie.com is the same player without the tracking cookies\n // it would otherwise set on a visitor who never pressed play. Nothing\n // about the embed needs them, and a widget that quietly adds third-party\n // cookies to a customer's site is a consent problem we would be handing\n // them.\n return `https://www.youtube-nocookie.com/embed/${videoId}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-presentation', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: ['accelerometer', 'clipboard-write', 'encrypted-media', 'gyroscope', 'picture-in-picture'],\n allowFullScreen: true,\n defaultAspectRatio: '16:9',\n defaultTitle: 'YouTube video player',\n },\n {\n id: 'vimeo',\n label: 'Vimeo',\n inputHosts: ['vimeo.com', 'player.vimeo.com'],\n toEmbedUrl: (url) => {\n const segments = pathSegments(url);\n // player.vimeo.com/video/123, vimeo.com/123, vimeo.com/channels/staffpicks/123\n const withoutPrefix = segments[0] === 'video' ? segments.slice(1) : segments;\n const numeric = withoutPrefix.filter((segment) => VIMEO_ID.test(segment));\n const videoId = numeric[0];\n if (!videoId) {\n return null;\n }\n\n // An unlisted video carries a hash, either as a trailing path segment\n // (vimeo.com/123/abc123) or as ?h=. Without it the player refuses to\n // load, so it is the one piece of the input besides the id that is\n // carried across.\n const trailing = withoutPrefix[withoutPrefix.indexOf(videoId) + 1];\n const hash = url.searchParams.get('h') ?? trailing;\n const privacyHash = hash && VIMEO_PRIVACY_HASH.test(hash) ? hash : null;\n\n return privacyHash\n ? `https://player.vimeo.com/video/${videoId}?h=${privacyHash}`\n : `https://player.vimeo.com/video/${videoId}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-presentation', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: ['autoplay', 'clipboard-write', 'encrypted-media', 'picture-in-picture'],\n allowFullScreen: true,\n defaultAspectRatio: '16:9',\n defaultTitle: 'Vimeo video player',\n },\n {\n id: 'google-maps',\n label: 'Google Maps',\n inputHosts: ['google.com', 'maps.google.com'],\n toEmbedUrl: (url) => {\n // Only the URL from \"Share → Embed a map\" is accepted, because it is the\n // only one that can be framed at all: Google serves an ordinary maps\n // link with X-Frame-Options and the visitor gets a blank box. Failing\n // here means the author is told to copy the other URL, rather than\n // shipping a page with a hole in it.\n if (pathSegments(url).join('/') !== 'maps/embed') {\n return null;\n }\n const pb = url.searchParams.get('pb');\n // `pb` is Google's own opaque camera-and-place blob. It is carried\n // across verbatim rather than re-encoded, because it is the one input\n // this file cannot regenerate from an id — so instead it is held to a\n // charset with no way out of a query string. Everything that could end\n // one, or start an attribute, is absent from this list.\n if (!pb || !GOOGLE_MAPS_PB.test(pb)) {\n return null;\n }\n return `https://www.google.com/maps/embed?pb=${pb}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: [],\n allowFullScreen: true,\n defaultAspectRatio: '4:3',\n defaultTitle: 'Map',\n },\n {\n id: 'calendly',\n label: 'Calendly',\n inputHosts: ['calendly.com'],\n toEmbedUrl: (url) => {\n const segments = pathSegments(url);\n if (segments.length === 0 || segments.length > 2) {\n return null;\n }\n if (!segments.every((segment) => CALENDLY_SEGMENT.test(segment))) {\n return null;\n }\n if (CALENDLY_RESERVED_SEGMENTS.has(segments[0].toLowerCase())) {\n return null;\n }\n\n const options = new URLSearchParams();\n for (const parameter of CALENDLY_ALLOWED_PARAMS) {\n const value = url.searchParams.get(parameter);\n if (value !== null) {\n options.set(parameter, value);\n }\n }\n\n const query = options.toString();\n const path = segments.join('/');\n return query ? `https://calendly.com/${path}?${query}` : `https://calendly.com/${path}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-forms', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: [],\n allowFullScreen: false,\n // A booking widget is a form of unpredictable length, not a picture with a\n // shape. It gets a height instead of a ratio; see `embed-attributes.ts`.\n defaultAspectRatio: 'none',\n defaultTitle: 'Booking calendar',\n },\n];\n\nexport type ResolvedEmbedUrl = {\n provider: EmbedProvider;\n /** The rebuilt URL. Never the author's string. */\n src: string;\n};\n\n/**\n * The single place an embed URL is checked against the allowlist.\n *\n * Every caller — the component, both container resolvers, and the composer's\n * URL editor through the package's public exports — comes through here rather\n * than reading `EMBED_PROVIDERS` and matching for itself. That is what keeps\n * a per-app allowlist a change to one function's argument later on, instead of\n * a hunt for call sites: see\n * `rulecms/__docs__/__TODO__/__COMPONENTS__/TODO_PLATFORM_EMBED_ALLOWLIST_PER_APP.md`.\n *\n * Returns `null` for anything it cannot vouch for, which is the fail-closed\n * behaviour the component depends on. It never throws: a malformed URL in a\n * stored widget must not take down the page it was published to.\n */\nexport function resolveEmbedUrl(\n value: unknown,\n providers: readonly EmbedProvider[] = EMBED_PROVIDERS\n): ResolvedEmbedUrl | null {\n if (typeof value !== 'string' || value.trim() === '') {\n return null;\n }\n\n let url: URL;\n try {\n url = new URL(value.trim());\n } catch {\n return null;\n }\n\n // https only. Every provider here serves it, and requiring it disposes of\n // javascript:, data:, blob: and file: as a class rather than one at a time.\n if (url.protocol !== 'https:') {\n return null;\n }\n\n // `https://youtube.com@evil.example/` parses with `evil.example` as the host\n // and the rest as credentials. The host check below is not fooled by it, but\n // a URL carrying credentials at all is not one an author pasted from a\n // provider, so it is refused outright.\n if (url.username !== '' || url.password !== '') {\n return null;\n }\n\n const host = normaliseHost(url.hostname);\n const provider = providers.find((candidate) => candidate.inputHosts.includes(host));\n if (!provider) {\n return null;\n }\n\n const src = provider.toEmbedUrl(url);\n return src ? { provider, src } : null;\n}\n\n/** Whether a URL would render. The composer's editor uses this for its hint. */\nexport const isAllowedEmbedUrl = (\n value: unknown,\n providers: readonly EmbedProvider[] = EMBED_PROVIDERS\n): boolean => resolveEmbedUrl(value, providers) !== null;\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport {\n EMBED_UNSHAPED_HEIGHT,\n EMBED_URL_ATTRIBUTE,\n resolveEmbedAspectRatio,\n resolveEmbedLoading,\n resolveEmbedTitle,\n toCssAspectRatio,\n} from './embed-attributes';\nimport type { EmbedAspectRatio, EmbedLoading } from './embed-attributes';\nimport { resolveEmbedUrl } from './embed-providers';\nimport type { EmbedProvider } from './embed-providers';\n\n/**\n * One render's worth of embed: everything `REmbed` needs, and nothing that\n * needs deciding twice.\n */\nexport type ResolvedEmbed = {\n provider: EmbedProvider;\n /** The rebuilt provider URL — see `embed-providers.ts`. */\n src: string;\n title: string;\n aspectRatio: EmbedAspectRatio;\n loading: EmbedLoading;\n};\n\n/**\n * The single resolution path, shared by `REmbed` and by both container\n * resolvers, in the way `r-text` shares `resolveEnclosingTag`.\n *\n * Sharing it is not tidiness. `resolveNoContainer` and\n * `resolveRendersOwnElement` both answer questions about an element that only\n * exists when a URL passed the allowlist, so if they decided that\n * independently of the component, a rejected URL would have the renderer\n * either handing column styles to an element that was never rendered or\n * wrapping nothing in a styled div. Neither would look wrong in the drawer, in\n * Redux, or in the stored JSON.\n *\n * `null` means nothing will be rendered: no URL, or one the allowlist refused.\n */\nexport function resolveEmbed(componentAttributes?: { [key: string]: any }): ResolvedEmbed | null {\n const resolved = resolveEmbedUrl(componentAttributes?.[EMBED_URL_ATTRIBUTE]);\n if (!resolved) {\n return null;\n }\n\n const { provider, src } = resolved;\n\n return {\n provider,\n src,\n title: resolveEmbedTitle(componentAttributes, provider.defaultTitle),\n // An author's choice wins; otherwise the provider's own shape, which is\n // what makes a pasted map 4:3 and a pasted video 16:9 without anyone\n // having to know that is what they wanted.\n aspectRatio: resolveEmbedAspectRatio(componentAttributes) ?? provider.defaultAspectRatio,\n loading: resolveEmbedLoading(componentAttributes),\n };\n}\n\n/**\n * The frame's own appearance, before column styles are laid over it.\n *\n * `display: block` removes the descender gap an inline replaced element leaves\n * under itself, and the zero border removes the 2px inset ridge every browser\n * still draws around an iframe by default.\n */\nexport const buildEmbedStyles = (aspectRatio: EmbedAspectRatio): CSSProperties => ({\n display: 'block',\n width: '100%',\n border: 0,\n ...(aspectRatio === 'none'\n ? { height: EMBED_UNSHAPED_HEIGHT }\n : { aspectRatio: toCssAspectRatio(aspectRatio) }),\n});\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { buildEmbedStyles, resolveEmbed } from './resolve-embed';\n\n@Component({\n selector: 'rulecms-r-embed',\n standalone: true,\n imports: [NgStyle],\n template: `\n @if (embed) {\n <iframe\n [src]=\"safeSrc\"\n [title]=\"embed.title\"\n [ngStyle]=\"style\"\n [attr.sandbox]=\"embed.provider.sandbox.join(' ')\"\n [attr.allow]=\"embed.provider.allow.length > 0 ? embed.provider.allow.join('; ') : null\"\n [attr.allowfullscreen]=\"embed.provider.allowFullScreen ? true : null\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n [attr.loading]=\"embed.loading\"\n [class]=\"className || undefined\"\n ></iframe>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class REmbedComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n constructor(private readonly sanitizer: DomSanitizer) {}\n\n get embed() {\n return resolveEmbed(this.componentAttributes);\n }\n\n get safeSrc(): SafeResourceUrl | null {\n const embed = this.embed;\n return embed ? this.sanitizer.bypassSecurityTrustResourceUrl(embed.src) : null;\n }\n\n get style() {\n const embed = this.embed;\n if (!embed) {\n return this.styleProps;\n }\n return { ...buildEmbedStyles(embed.aspectRatio), ...this.styleProps };\n }\n}\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEmbed } from './resolve-embed';\n\n/**\n * `false` whenever an iframe is rendered: it is a replaced element that holds\n * margin, padding, width and height on itself, so a wrapper div would only add\n * an element that does nothing.\n *\n * `true` when the URL is missing or the allowlist refused it, because then\n * there is no element at all — the same answer `r-text` gives for bare text.\n * Deciding this from `resolveEmbed`, rather than from the fact that this\n * component \"is an iframe component\", is what keeps the two in step.\n */\nexport const resolveNoContainer = ({ componentAttributes }: NoContainerResolverContext): boolean =>\n resolveEmbed(componentAttributes) === null;\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEmbed } from './resolve-embed';\n\n/**\n * The iframe carries the className — when there is one. A rejected or unset\n * URL renders nothing, and a class handed to a component that renders nothing\n * disappears without trace, so this answers from the same resolution the\n * component uses.\n */\nexport const resolveRendersOwnElement = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean => resolveEmbed(componentAttributes) !== null;\n","import { DefaultAttributeValue } from '../../../../types';\n\n/**\n * Nothing is seeded, including the URL.\n *\n * A freshly dropped embed renders nothing until an author pastes something,\n * which is the honest result: the alternative is shipping a placeholder video\n * that a customer's page would publish if anyone forgot to replace it. The\n * palette card and the empty drawer say what to do instead.\n *\n * Aspect ratio is left unset on purpose too, so it resolves from the provider\n * — a map is 4:3 and a video is 16:9 without either being written down here.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'embed-url-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-title-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-aspect-ratio-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-loading-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\n/**\n * Drawer order, which is also the order the documentation pages are listed in:\n * the URL first because nothing renders without it, then the three settings\n * that only matter once something does.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'embed-url-3-resolutions',\n heading: 'Embed URL',\n subHeading:\n 'Paste the address of a YouTube or Vimeo video, a Google Maps \"Embed a map\" link, or a Calendly booking page, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-title-3-resolutions',\n heading: 'Embed Title',\n subHeading:\n 'Describe what is being embedded, for screen readers; defaults to the provider name, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-aspect-ratio-3-resolutions',\n heading: 'Embed Aspect Ratio',\n subHeading:\n 'The shape of the embed — \"16:9\" for video, \"4:3\" for maps, or \"none\" to set the height on the column instead, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-loading-3-resolutions',\n heading: 'Embed Loading',\n subHeading:\n 'Whether the embed loads with the page (\"eager\") or waits until the visitor scrolls near it (\"lazy\", the default), for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { REmbedComponent } from './r-embed.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rEmbed,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: REmbedComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-list` reads.\n *\n * Every one is list-specific, including the links, which are conceptually the\n * same numbered list `r-text` already offers. Sharing that attribute name\n * would have saved one line of editor wiring and cost the documentation\n * contract: RuleCMS publishes one page per component-scope attribute and\n * requires exactly one owning component, so a shared name has no single page\n * to link to from the drawer. Reuse happens a level down instead — the\n * composer resolves an attribute to an *editor* by name, and `list-links`\n * points at the editor `links-3-resolutions` already resolves to.\n *\n * Nothing here duplicates a column style attribute. Spacing, colour and\n * typography come from Column Styles on the root element and inherit into\n * the items; the attributes below are only what is specific to a list —\n * which element it is, what the markers look like, and where numbering\n * starts. Kind and marker are closed sets rather than free text, which is\n * what lets them go through the composer's shared select and lets the render\n * path treat anything unrecognised as unset.\n */\nexport const LIST_ITEMS_ATTRIBUTE = 'list-items-3-resolutions';\nexport const LIST_KIND_ATTRIBUTE = 'list-kind-3-resolutions';\nexport const LIST_MARKER_ATTRIBUTE = 'list-marker-3-resolutions';\nexport const LIST_START_ATTRIBUTE = 'list-start-3-resolutions';\nexport const LIST_REVERSED_ATTRIBUTE = 'list-reversed-3-resolutions';\nexport const LIST_LINKS_ATTRIBUTE = 'list-links-3-resolutions';\n\n/** What a freshly dropped list shows before the author types anything. */\nexport const DEFAULT_LIST_ITEMS = 'First item\\nSecond item\\nThird item';\n\nexport const LIST_KINDS = ['unordered', 'ordered'] as const;\nexport type ListKind = (typeof LIST_KINDS)[number];\nexport const DEFAULT_LIST_KIND: ListKind = 'unordered';\n\n/**\n * `list-style-type` values worth offering. Every entry is valid CSS on both\n * `<ul>` and `<ol>`, so the marker survives the author switching kind rather\n * than resetting. Unset means the browser default — disc for unordered,\n * decimal for ordered — which is why there is no default constant here: not\n * setting the property at all is the default.\n */\nexport const LIST_MARKERS = [\n 'disc',\n 'circle',\n 'square',\n 'decimal',\n 'lower-alpha',\n 'upper-alpha',\n 'lower-roman',\n 'upper-roman',\n 'none',\n] as const;\nexport type ListMarker = (typeof LIST_MARKERS)[number];\n\ntype Attributes = { [key: string]: any } | undefined;\n\nexport const resolveListKind = (componentAttributes: Attributes): ListKind => {\n const value = componentAttributes?.[LIST_KIND_ATTRIBUTE];\n return LIST_KINDS.includes(value) ? value : DEFAULT_LIST_KIND;\n};\n\n/**\n * A stored value reaches a CSS property here, so the allowlist is the\n * boundary that keeps it from being whatever a request happened to write.\n * Unrecognised values mean \"unset\" and the browser default applies.\n */\nexport const resolveListMarker = (componentAttributes: Attributes): ListMarker | undefined => {\n const value = componentAttributes?.[LIST_MARKER_ATTRIBUTE];\n return LIST_MARKERS.includes(value) ? value : undefined;\n};\n\n/**\n * One item per line of the authored text, blank lines dropped. An unset\n * attribute falls back to the placeholder items, but text the author\n * deliberately cleared stays cleared — an empty list element still carries\n * the column's styles and stays selectable in the composer.\n */\nexport const resolveListItems = (componentAttributes: Attributes): string[] => {\n const value = componentAttributes?.[LIST_ITEMS_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_LIST_ITEMS\n : typeof value === 'string'\n ? value\n : String(value);\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line !== '');\n};\n\n/**\n * HTML's `start` takes any integer, including negative ones. The editor\n * stores a number, but a hand-written or migrated config may carry a numeric\n * string; both mean the same thing here. Anything else is unset, and only an\n * ordered list ever reads it.\n */\nexport const resolveListStart = (componentAttributes: Attributes): number | undefined => {\n const value = componentAttributes?.[LIST_START_ATTRIBUTE];\n if (typeof value === 'number' && Number.isInteger(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const parsed = Number(value.trim());\n if (Number.isInteger(parsed)) {\n return parsed;\n }\n }\n return undefined;\n};\n\n/**\n * Select editors in the composer store `'true'` / `'false'` as strings, while\n * a hand-written or migrated config may carry a real boolean. Both mean the\n * same thing here. Only an ordered list ever reads it.\n */\nexport const resolveListReversed = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[LIST_REVERSED_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport {\n LIST_LINKS_ATTRIBUTE,\n resolveListItems,\n resolveListKind,\n resolveListMarker,\n resolveListReversed,\n resolveListStart,\n} from './list-attributes';\n\n@Component({\n selector: 'rulecms-r-list',\n standalone: true,\n imports: [NgStyle, InlineMarkupComponent],\n template: `\n @if (kind === 'ordered') {\n <ol [ngStyle]=\"style\" [class]=\"className || undefined\" [attr.start]=\"start\" [attr.reversed]=\"reversed ? true : null\">\n @for (item of items; track $index) {\n <li>\n <rulecms-inline-markup [text]=\"item\" [links]=\"links\" />\n </li>\n }\n </ol>\n } @else {\n <ul [ngStyle]=\"style\" [class]=\"className || undefined\">\n @for (item of items; track $index) {\n <li>\n <rulecms-inline-markup [text]=\"item\" [links]=\"links\" />\n </li>\n }\n </ul>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RListComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get marker() {\n return resolveListMarker(this.componentAttributes);\n }\n get links() {\n return this.componentAttributes?.[LIST_LINKS_ATTRIBUTE];\n }\n get style() {\n return {\n ...(this.marker !== undefined ? { listStyleType: this.marker } : {}),\n ...this.styleProps,\n };\n }\n get items() {\n return resolveListItems(this.componentAttributes);\n }\n get kind() {\n return resolveListKind(this.componentAttributes);\n }\n get start() {\n return resolveListStart(this.componentAttributes);\n }\n get reversed() {\n return resolveListReversed(this.componentAttributes);\n }\n}\n","/**\n * RList always renders a `<ul>` or `<ol>` — both block-level elements that\n * hold margin, padding, width and border as authored — and puts styleProps on\n * that element itself. No configuration changes the answer, so no wrapper\n * div, ever.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * RList's root is always a real element — `<ul>` or `<ol>` — so it can always\n * carry the column's className, and the component applies the one it\n * receives.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\nimport {\n DEFAULT_LIST_ITEMS,\n DEFAULT_LIST_KIND,\n LIST_ITEMS_ATTRIBUTE,\n LIST_KIND_ATTRIBUTE,\n LIST_LINKS_ATTRIBUTE,\n LIST_MARKER_ATTRIBUTE,\n LIST_REVERSED_ATTRIBUTE,\n LIST_START_ATTRIBUTE,\n} from './list-attributes';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: LIST_ITEMS_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_LIST_ITEMS,\n },\n },\n {\n name: LIST_KIND_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_LIST_KIND,\n },\n },\n // Marker, start and reversed default to unset on purpose: the browser\n // already renders disc for unordered and 1, 2, 3 for ordered, and an\n // attribute that is not set is one the render path does not emit.\n {\n name: LIST_MARKER_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_START_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_REVERSED_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_LINKS_ATTRIBUTE,\n defaultValues: {},\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n DEFAULT_LIST_KIND,\n LIST_ITEMS_ATTRIBUTE,\n LIST_KIND_ATTRIBUTE,\n LIST_LINKS_ATTRIBUTE,\n LIST_MARKER_ATTRIBUTE,\n LIST_REVERSED_ATTRIBUTE,\n LIST_START_ATTRIBUTE,\n} from './list-attributes';\n\n/**\n * Every setting the list offers, in the order the Modify drawer shows them.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: LIST_ITEMS_ATTRIBUTE,\n heading: 'List Items',\n subHeading:\n 'The items, one per line — each line becomes its own entry in the list. Blank lines are skipped, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_KIND_ATTRIBUTE,\n heading: 'List Kind',\n subHeading:\n 'Bulleted (unordered) or numbered (ordered). Numbered lists can also set where counting starts and whether it counts down, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_LIST_KIND },\n },\n {\n name: LIST_MARKER_ATTRIBUTE,\n heading: 'Marker Style',\n subHeading:\n 'What sits in front of each item: a disc, circle or square for bullets; numbers, letters or Roman numerals for numbering; or none to hide the markers. Unset uses the browser default for the list kind, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_START_ATTRIBUTE,\n heading: 'Numbering Start',\n subHeading:\n 'The number the first item counts from. Only a numbered list reads this; leave unset to count from 1, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_REVERSED_ATTRIBUTE,\n heading: 'Reversed Numbering',\n subHeading:\n 'Whether a numbered list counts down instead of up, e.g. a top-10 countdown. Only a numbered list reads this, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_LINKS_ATTRIBUTE,\n heading: 'Links',\n subHeading:\n 'Links the items can point at. To link part of an item, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RListComponent } from './r-list.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rList,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RListComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import { parseInlineLinkMarkers } from '../../../../shared/links';\n\n/**\n * The attribute names `r-accordion` reads.\n *\n * The component is a disclosure and nothing more specific than that: a summary\n * a reader clicks and the detail it expands to. An FAQ is one thing to build\n * out of it, a shipping policy or a \"show more\" under a truncated bio are\n * others, and the settings are named after the two halves of the element —\n * `<summary>` and the detail inside `<details>` — rather than after any one of\n * those uses.\n *\n * One accordion is one disclosure, rather than a component holding N\n * collapsible sections. A repeating-group attribute would need an editor this\n * library does not have, and several sections in one component leave the\n * nested-content slot with no single detail to belong to (see\n * `rulecms/__docs__/__ARCHITECTURE__/ACCORDION_COMPONENT_ARCHITECTURE.md`).\n * Several of these in a column is the multi-section case, which is also how an\n * author reorders one.\n *\n * Every name is accordion-specific, including the links, which are the same\n * numbered list `r-text` already offers. Sharing that attribute name would\n * have saved a line of editor wiring and cost the documentation contract:\n * RuleCMS publishes one page per component-scope attribute and requires\n * exactly one owning component. Reuse happens a level down, where the composer\n * resolves an attribute to an *editor* by name — the same arrangement `r-list`\n * uses.\n *\n * Nothing here duplicates a column style attribute. Spacing, colour and\n * typography come from Column Styles on the `<details>` element and inherit\n * into the summary and the detail; the attributes below are only what is\n * specific to a disclosure — what it says closed, what it says open, whether\n * it starts open, and whether the summary also belongs in the page outline.\n */\nexport const ACCORDION_SUMMARY_ATTRIBUTE = 'accordion-summary-3-resolutions';\nexport const ACCORDION_DETAIL_ATTRIBUTE = 'accordion-detail-3-resolutions';\nexport const ACCORDION_LINKS_ATTRIBUTE = 'accordion-links-3-resolutions';\nexport const ACCORDION_OPEN_ATTRIBUTE = 'accordion-open-3-resolutions';\nexport const ACCORDION_HEADING_LEVEL_ATTRIBUTE = 'accordion-heading-level-3-resolutions';\n\n/** What a freshly dropped accordion shows before the author types anything. */\nexport const DEFAULT_ACCORDION_SUMMARY = 'Summary';\nexport const DEFAULT_ACCORDION_DETAIL =\n 'The detail this summary expands to. Each line becomes its own paragraph.';\n\n/**\n * Heading levels the summary can be given, plus `none` for the common case.\n *\n * `h1` is deliberately absent: the page already has one, and ten disclosures\n * down the page would otherwise offer ten ways to compete with it. Levels\n * start at `h2` because a summary sits under whatever heading introduces the\n * section it is in.\n *\n * `none` is a real option rather than an unset value so the picker always has\n * a definite selection — there is no way to clear a select back to nothing —\n * and it is the default because a disclosure is not automatically part of the\n * document outline.\n */\nexport const ACCORDION_HEADING_LEVELS = ['none', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type AccordionHeadingLevel = (typeof ACCORDION_HEADING_LEVELS)[number];\nexport const DEFAULT_ACCORDION_HEADING_LEVEL: AccordionHeadingLevel = 'none';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * The summary, on one line. An unset attribute falls back to the placeholder,\n * but text the author deliberately cleared stays cleared: an empty `<summary>`\n * still draws its marker and still toggles, and the composer needs the element\n * to stay selectable on the canvas. Same distinction `r-list` draws for its\n * items and `r-button` for its label.\n *\n * Authored newlines collapse to single spaces. The editor behind this\n * attribute is the shared multi-line text field, and `<summary>` is a single\n * line of prose — HTML would collapse the whitespace anyway, so the resolved\n * value says so rather than leaving it to the browser.\n *\n * `{n|…}` markers contribute their inner text and nothing else. The summary\n * takes no links — inside a `<summary>` a click both follows the anchor and\n * toggles the disclosure — but the editor behind it is the same field that\n * offers the marker grammar for the detail, so an author will type one here.\n * Degrading it to prose is what the rest of the library does with a marker it\n * cannot resolve; leaving the braces on screen is the one outcome nobody wants.\n */\nexport const resolveAccordionSummary = (componentAttributes: Attributes): string => {\n const value = componentAttributes?.[ACCORDION_SUMMARY_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_ACCORDION_SUMMARY\n : typeof value === 'string'\n ? value\n : String(value);\n return parseInlineLinkMarkers(text)\n .map((run) => run.text)\n .join('')\n .replace(/\\s+/g, ' ')\n .trim();\n};\n\n/**\n * The detail, as one paragraph per authored line with blank lines dropped —\n * the same grammar `r-list` uses for its items, so an author who has met one\n * has met both. An unset attribute falls back to the placeholder; text the\n * author deliberately cleared stays cleared and the disclosure opens onto\n * whatever else is in it, or onto nothing.\n */\nexport const resolveAccordionDetail = (componentAttributes: Attributes): string[] => {\n const value = componentAttributes?.[ACCORDION_DETAIL_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_ACCORDION_DETAIL\n : typeof value === 'string'\n ? value\n : String(value);\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line !== '');\n};\n\n/**\n * Whether the disclosure renders already open. Select editors in the composer\n * store `'true'` / `'false'` as strings, while a hand-written or migrated\n * config may carry a real boolean; both mean the same thing here.\n *\n * This is an attribute rather than runtime state on purpose: `open` has to be\n * right in the server's HTML, because a disclosure a search engine or a\n * no-JavaScript reader should see expanded cannot wait for hydration.\n */\nexport const resolveAccordionOpen = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[ACCORDION_OPEN_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n\n/**\n * The heading tag to wrap the summary in, or `undefined` for no heading.\n *\n * A stored value reaches an element name here, so the allowlist is the\n * boundary that keeps it from being whatever a request happened to write.\n * `none` and anything unrecognised both mean \"no heading\", which is also the\n * safe answer: a plain `<summary>` is a valid disclosure, while an invented\n * tag inside one is not.\n */\nexport const resolveAccordionHeadingLevel = (\n componentAttributes: Attributes\n): Exclude<AccordionHeadingLevel, 'none'> | undefined => {\n const value = componentAttributes?.[ACCORDION_HEADING_LEVEL_ATTRIBUTE];\n if (value === 'none' || !(ACCORDION_HEADING_LEVELS as readonly unknown[]).includes(value)) {\n return undefined;\n }\n return value;\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport { HtmlTagComponent } from '../../../../shared/html-tag.component';\nimport {\n ACCORDION_LINKS_ATTRIBUTE,\n resolveAccordionDetail,\n resolveAccordionHeadingLevel,\n resolveAccordionOpen,\n resolveAccordionSummary,\n} from './accordion-attributes';\n\nconst SUMMARY_LAYOUT_STYLE = {\n display: 'list-item',\n width: '100%',\n boxSizing: 'border-box',\n};\n\nconst SUMMARY_HEADING_STYLE = {\n display: 'inline',\n margin: 0,\n};\n\n@Component({\n selector: 'rulecms-r-accordion',\n standalone: true,\n imports: [NgStyle, InlineMarkupComponent, HtmlTagComponent],\n template: `\n <details [ngStyle]=\"styleProps\" [class]=\"className || undefined\" [attr.open]=\"open ? true : null\">\n <summary [ngStyle]=\"summaryLayoutStyle\">\n @if (headingLevel) {\n <rulecms-html-tag [tag]=\"headingLevel\" [styleProps]=\"summaryHeadingStyle\">\n {{ summary }}\n </rulecms-html-tag>\n } @else {\n {{ summary }}\n }\n </summary>\n @for (paragraph of detail; track $index) {\n <p>\n <rulecms-inline-markup [text]=\"paragraph\" [links]=\"links\" />\n </p>\n }\n <ng-content />\n </details>\n `,\n host: { style: 'display: contents' },\n})\nexport class RAccordionComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n readonly summaryLayoutStyle = SUMMARY_LAYOUT_STYLE;\n readonly summaryHeadingStyle = SUMMARY_HEADING_STYLE;\n\n get summary() {\n return resolveAccordionSummary(this.componentAttributes);\n }\n get headingLevel() {\n return resolveAccordionHeadingLevel(this.componentAttributes);\n }\n get links() {\n return this.componentAttributes?.[ACCORDION_LINKS_ATTRIBUTE];\n }\n get open() {\n return resolveAccordionOpen(this.componentAttributes);\n }\n get detail() {\n return resolveAccordionDetail(this.componentAttributes);\n }\n}\n","/**\n * RAccordion always renders a `<details>` — a block-level element that holds\n * margin, padding, width and border as authored — and puts styleProps on that\n * element itself. No configuration changes the answer, so no wrapper div,\n * ever.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * RAccordion's root is always a real element — `<details>` — so it can always\n * carry the column's className, and the component applies the one it receives.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\nimport {\n ACCORDION_DETAIL_ATTRIBUTE,\n ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n ACCORDION_LINKS_ATTRIBUTE,\n ACCORDION_OPEN_ATTRIBUTE,\n ACCORDION_SUMMARY_ATTRIBUTE,\n DEFAULT_ACCORDION_DETAIL,\n DEFAULT_ACCORDION_HEADING_LEVEL,\n DEFAULT_ACCORDION_SUMMARY,\n} from './accordion-attributes';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: ACCORDION_SUMMARY_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_SUMMARY,\n },\n },\n {\n name: ACCORDION_DETAIL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_DETAIL,\n },\n },\n // Closed by default, and unset rather than 'false': a disclosure the author\n // has not thought about should start collapsed, which is what an absent\n // `open` attribute already means in HTML.\n {\n name: ACCORDION_OPEN_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_HEADING_LEVEL,\n },\n },\n {\n name: ACCORDION_LINKS_ATTRIBUTE,\n defaultValues: {},\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n ACCORDION_DETAIL_ATTRIBUTE,\n ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n ACCORDION_LINKS_ATTRIBUTE,\n ACCORDION_OPEN_ATTRIBUTE,\n ACCORDION_SUMMARY_ATTRIBUTE,\n DEFAULT_ACCORDION_HEADING_LEVEL,\n} from './accordion-attributes';\n\n/**\n * Every setting the accordion offers, in the order the Modify drawer shows\n * them.\n *\n * Headings name the two halves of the element — Summary and Detail — not one\n * use of it. An author building an FAQ reads \"Summary\" as the question without\n * being told to; an author building a \"show more\" would have had to translate\n * \"Question\" into something it is not.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: ACCORDION_SUMMARY_ATTRIBUTE,\n heading: 'Summary',\n subHeading:\n 'The line a reader sees closed and clicks to expand. One line — extra lines collapse into it, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_DETAIL_ATTRIBUTE,\n heading: 'Detail',\n subHeading:\n 'What the summary expands to, one paragraph per line. Blank lines are skipped, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_OPEN_ATTRIBUTE,\n heading: 'Open by Default',\n subHeading:\n 'Whether the detail is already expanded when the page loads. A reader can still collapse it, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n heading: 'Summary Heading Level',\n subHeading:\n 'Whether the summary also counts as a heading in the page outline, and at which level. Leave it at none unless these summaries are the structure of the page, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_ACCORDION_HEADING_LEVEL },\n },\n {\n name: ACCORDION_LINKS_ATTRIBUTE,\n heading: 'Links',\n subHeading:\n 'Links the detail can point at. To link part of the detail, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RAccordionComponent } from './r-accordion.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rAccordion,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RAccordionComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import type { DisplayCardEntry } from '../../../types';\nimport { displayCardEntry as rTextCardEntry } from '../components/r-text/display-card-entry';\nimport { displayCardEntry as cloudinaryAdvancedImageCardEntry } from '../components/cloudinary-advanced-image/display-card-entry';\nimport { displayCardEntry as rVideoCardEntry } from '../components/r-video/display-card-entry';\nimport { displayCardEntry as rIconCardEntry } from '../components/r-icon/display-card-entry';\nimport { displayCardEntry as rButtonCardEntry } from '../components/r-button/display-card-entry';\nimport { displayCardEntry as rDividerCardEntry } from '../components/r-divider/display-card-entry';\nimport { displayCardEntry as rEmbedCardEntry } from '../components/r-embed/display-card-entry';\nimport { displayCardEntry as rListCardEntry } from '../components/r-list/display-card-entry';\nimport { displayCardEntry as rAccordionCardEntry } from '../components/r-accordion/display-card-entry';\n\nexport const cardEntries: DisplayCardEntry[] = [\n rTextCardEntry,\n cloudinaryAdvancedImageCardEntry,\n rVideoCardEntry,\n rIconCardEntry,\n rButtonCardEntry,\n rDividerCardEntry,\n rEmbedCardEntry,\n rListCardEntry,\n rAccordionCardEntry,\n];\n","import { CardGroup } from '../../types';\nimport { cardEntries } from './card-entries/card-entries';\n\nexport const cardGroups: CardGroup[] = [\n { title: 'Cards', cards: [{ title: 'Cards', entries: cardEntries }] },\n];\n","import { cardGroups } from './base-components/display/card-groups';\nimport { CardGroup, Card, RenderCardEntry, DisplayCardEntry } from './types';\n\nlet cachedSourceComponentsPlugin: { components: Record<string, RenderCardEntry> } | undefined;\n\nconst getComponentsFromRenderCardGroups = (group: CardGroup[]): Record<string, RenderCardEntry> => {\n const entries = group.reduce<DisplayCardEntry[]>(\n (all, current) =>\n all.concat(current.cards.reduce<DisplayCardEntry[]>((cards, card: Card) => cards.concat(card.entries as DisplayCardEntry[]), [])),\n []\n );\n return entries.reduce(\n (acc, entry) => {\n acc[entry.id] = {\n id: entry.id,\n card: entry.card,\n defaultAttributeValues: entry.defaultAttributeValues,\n ...(entry.resolveNoContainer !== undefined ? { resolveNoContainer: entry.resolveNoContainer } : {}),\n ...(entry.noContainer !== undefined ? { noContainer: entry.noContainer } : {}),\n ...(entry.resolveRendersOwnElement !== undefined\n ? { resolveRendersOwnElement: entry.resolveRendersOwnElement }\n : {}),\n }\n return acc;\n },\n {} as Record<string, RenderCardEntry>\n );\n};\n\n/**\n * Returns the source components plugin with a lookup map of render components.\n * Results are cached after the first call.\n */\nexport const getSourceComponentsPlugin = () => {\n if (cachedSourceComponentsPlugin) {\n return cachedSourceComponentsPlugin;\n }\n\n const components = getComponentsFromRenderCardGroups(cardGroups);\n\n cachedSourceComponentsPlugin = {\n components,\n };\n\n return cachedSourceComponentsPlugin;\n};","import { ComponentNameToModifyAttribute } from '../../../types';\n\n/**\n * Mapping of attribute names to their corresponding editor components.\n *\n * The RuleCMS editor dynamically loads the appropriate editor component for each attribute\n * that users can edit. This mapping ensures that the correct component is loaded when\n * editing a given attribute.\n *\n * The attributes defined here are shared across all source components available for user modification.\n */\nexport const componentNameToModifyAttribute: ComponentNameToModifyAttribute = {\n 'icon-name-3-resolutions': 'icon-name-3-resolutions',\n 'content-text-3-resolutions': 'content-text-3-resolutions',\n // r-button owns its own label and icon attributes — one component per\n // documented setting — but reuses the editors those names already resolve\n // to, so no new editor component is needed for either.\n 'button-label-3-resolutions': 'content-text-3-resolutions',\n 'button-icon-3-resolutions': 'icon-name-3-resolutions',\n // The preset is an object of three axes rather than one scalar, and the\n // button takes a single link rather than the numbered list rich text uses,\n // so neither fits an existing editor. Position and disabled are plain\n // two-value choices and go through the shared select.\n 'button-preset-3-resolutions': 'button-preset-3-resolutions',\n 'button-link-3-resolutions': 'button-link-3-resolutions',\n 'button-icon-position-3-resolutions': 'button-icon-position-3-resolutions',\n 'button-disabled-3-resolutions': 'button-disabled-3-resolutions',\n // Both of the divider's settings are closed sets of a handful of values, so\n // both go through the shared select and neither needs an editor built for it.\n 'divider-style-3-resolutions': 'divider-style-3-resolutions',\n 'divider-thickness-3-resolutions': 'divider-thickness-3-resolutions',\n // The embed URL is the one field in the library whose value is accepted or\n // refused rather than merely stored, so it gets an editor that can say which\n // it was while the author is still looking at the field. Its title is plain\n // text, and the other two are closed sets.\n 'embed-url-3-resolutions': 'embed-url-3-resolutions',\n 'embed-title-3-resolutions': 'image-text-3-resolutions',\n 'embed-aspect-ratio-3-resolutions': 'embed-aspect-ratio-3-resolutions',\n 'embed-loading-3-resolutions': 'embed-loading-3-resolutions',\n 'enclosing-tag-3-resolutions': 'enclosing-tag-3-resolutions',\n 'links-3-resolutions': 'links-3-resolutions',\n // r-list owns its own attribute names — one component per documented\n // setting — but reuses existing editors wherever one fits: the multi-line\n // text field for its items, the numbered link list for its links, and the\n // plain text field for where numbering starts (the number editor is\n // pixel-specific, and a numbering start is not a length). Kind, marker and\n // reversed are closed sets and go through the shared select.\n 'list-items-3-resolutions': 'content-text-3-resolutions',\n 'list-kind-3-resolutions': 'list-kind-3-resolutions',\n 'list-marker-3-resolutions': 'list-marker-3-resolutions',\n 'list-start-3-resolutions': 'image-text-3-resolutions',\n 'list-reversed-3-resolutions': 'list-reversed-3-resolutions',\n 'list-links-3-resolutions': 'links-3-resolutions',\n // r-accordion owns its own attribute names — one component per documented\n // setting — and reuses existing editors for everything that fits: the\n // multi-line text field for the summary and the detail, and the numbered\n // link list for the detail's links. Whether it starts open and whether the\n // summary is a heading are closed sets and go through the shared select.\n 'accordion-summary-3-resolutions': 'content-text-3-resolutions',\n 'accordion-detail-3-resolutions': 'content-text-3-resolutions',\n 'accordion-open-3-resolutions': 'accordion-open-3-resolutions',\n 'accordion-heading-level-3-resolutions': 'accordion-heading-level-3-resolutions',\n 'accordion-links-3-resolutions': 'links-3-resolutions',\n 'content-title-3-resolutions': 'content-title-3-resolutions',\n 'media-selector-3-resolutions': 'media-selector-3-resolutions',\n 'pass-through-image-attributes-alt-3-resolutions': 'image-alt-text-3-resolutions',\n 'pass-through-image-attributes-width-3-resolutions': 'image-intrinsic-width-3-resolutions',\n 'pass-through-image-attributes-height-3-resolutions': 'image-intrinsic-height-3-resolutions',\n 'pass-through-image-attributes-sizes-3-resolutions': 'image-sizes-3-resolutions',\n 'pass-through-image-attributes-loading-3-resolutions': 'image-loading-3-resolutions',\n 'pass-through-image-attributes-fetchpriority-3-resolutions': 'image-fetchpriority-3-resolutions',\n 'cloudinary-transformations-3-resolutions': 'cloudinary-transformations-3-resolutions',\n 'video-selector-3-resolutions': 'video-selector-3-resolutions',\n 'video-poster-selector-3-resolutions': 'video-poster-selector-3-resolutions',\n 'pass-through-video-attributes-controls-3-resolutions': 'video-controls-3-resolutions',\n 'pass-through-video-attributes-autoplay-3-resolutions': 'video-autoplay-3-resolutions',\n 'pass-through-video-attributes-loop-3-resolutions': 'video-loop-3-resolutions',\n 'pass-through-video-attributes-muted-3-resolutions': 'video-muted-3-resolutions',\n 'pass-through-video-attributes-playsinline-3-resolutions': 'video-playsinline-3-resolutions',\n 'pass-through-video-attributes-preload-3-resolutions': 'video-preload-3-resolutions',\n 'pass-through-video-attributes-width-3-resolutions': 'video-intrinsic-width-3-resolutions',\n 'pass-through-video-attributes-height-3-resolutions': 'video-intrinsic-height-3-resolutions',\n 'video-transformations-3-resolutions': 'video-transformations-3-resolutions',\n};\n","import { AttributeListForComponentTypes } from '../../../types';\n\n/**\n * Mapping of component IDs to their supported modifiable attributes.\n *\n * Each component type can have a specific list of attributes that users are allowed to modify\n * in the editor. This mapping defines which attributes are available for each component type.\n *\n * Note: This defines which attributes each component supports, while component-name-to-modify-attribute.ts\n * defines which editor component should be used to modify each attribute type.\n * todo: this is a little confusing and might require a deeper look into how RuleCMS uses this.\n */\n/**\n * Empty on purpose. Every component this library ships declares its editable\n * attributes through its own `attribute-edit-mode-configs.ts`, which is the\n * path the composer's Modify drawer reads. Listing an attribute here as well\n * shows it twice — once through the legacy shared-attribute editor, which has\n * no entry for modern `-3-resolutions` names and renders an empty section.\n */\nexport const attributeListForComponentTypes: AttributeListForComponentTypes = {};\n","import { cardGroups } from './base-components/display/card-groups';\nimport { Card, ComponentMetadata, ComponentMetadataForEditing, DisplayCardEntry } from './types';\nimport { componentNameToModifyAttribute } from './base-components/display/component-attributes/component-name-to-modify-attribute';\nimport { attributeListForComponentTypes } from './base-components/display/component-attributes/attribute-list-for-component-types';\n\nlet returnValue: ComponentMetadataForEditing | undefined;\n\n// Flatten nested card groups and cards into a flat array of entries, then converts to a lookup map by entry ID\nexport const getComponentMetadataForEditing = () => {\n if (returnValue) {\n return returnValue;\n }\n const entries = cardGroups.reduce<DisplayCardEntry[]>(\n (all, current) =>\n all.concat(current.cards.reduce<DisplayCardEntry[]>((cards, card: Card) => cards.concat(card.entries as DisplayCardEntry[]), [])),\n []\n );\n const componentMetadata: Record<string, ComponentMetadata> = entries.reduce(\n (acc, entry) => {\n acc[entry.id] = {\n defaultAttributeValues: entry.defaultAttributeValues,\n attributeEditModeConfigs: entry.attributeEditModeConfigs,\n };\n return acc;\n },\n {} as Record<string, ComponentMetadata>\n );\n returnValue = {\n attributeListForComponentTypes,\n componentNameToModifyAttribute,\n componentMetadata,\n };\n return returnValue;\n};\n\n","import type { EditorPreviewCardEntry } from '../../../types';\nimport { ComponentIdentifiers } from '../../../component-identifiers';\n\nexport const cardEntries: EditorPreviewCardEntry[] = [\n { id: ComponentIdentifiers.rText, icon: 'T', label: 'Text' },\n { id: ComponentIdentifiers.cloudinaryAdvancedImage, icon: '🖼️', label: 'Image' },\n { id: ComponentIdentifiers.rVideo, icon: '🎬', label: 'Video' },\n { id: ComponentIdentifiers.rIcon, icon: '◆', label: 'Icon' },\n { id: ComponentIdentifiers.rButton, icon: '⬭', label: 'Button' },\n { id: ComponentIdentifiers.rDivider, icon: '━', label: 'Divider' },\n { id: ComponentIdentifiers.rEmbed, icon: '⧉', label: 'Embed' },\n { id: ComponentIdentifiers.rList, icon: '☰', label: 'List' },\n { id: ComponentIdentifiers.rAccordion, icon: '▸', label: 'Accordion' },\n];\n","import type { EditorPreviewCardGroup } from '../../types';\nimport { cardEntries } from './card-entries/card-entries';\n\nexport const cardGroups: EditorPreviewCardGroup[] = [\n {\n title: 'Elements',\n showInitially: true,\n cards: [{ title: 'Base Elements', entries: cardEntries }],\n },\n];\n","import type { PreviewComponents, EditorPreviewCardGroup } from './types';\nimport { cardGroups } from './base-components/editor-preview/card-groups';\n\nlet cachedPreviewComponents: PreviewComponents | undefined;\n\n/**\n * Returns the preview card groups for drag and drop functionality.\n * This replaces the dragDropPreviewCardGroups export.\n */\nexport const getPreviewCardGroups = (): EditorPreviewCardGroup[] => {\n return cardGroups;\n};\n\n/**\n * Returns a lookup map of preview components by entry ID.\n * Results are cached after the first call.\n */\nexport const getPreviewComponents = (): PreviewComponents => {\n if (cachedPreviewComponents) {\n return cachedPreviewComponents;\n }\n\n // Flatten nested card groups and cards into a flat array of entries\n const entries: EditorPreviewCardGroup['cards'][number]['entries'] = [];\n for (const group of cardGroups) {\n for (const card of group.cards) {\n entries.push(...card.entries);\n }\n }\n\n // Convert to a lookup map by entry ID\n cachedPreviewComponents = entries.reduce(\n (acc, entry) => {\n acc[entry.id] = entry;\n return acc;\n },\n {} as PreviewComponents\n );\n\n return cachedPreviewComponents;\n};\n","import { getSourceComponentsPlugin } from './get-source-components-plugin';\nimport { getComponentMetadataForEditing } from './get-component-metadata-for-editing';\nimport { getPreviewComponents, getPreviewCardGroups } from './get-preview-components';\n\n/**\n * ComponentLibraryModule conformance (the @rulecms/widget-angular contract).\n *\n * This package is the DEFAULT component library. It conforms to the contract\n * STRUCTURALLY — it has no runtime dependency on @rulecms/widget-angular.\n * Consumers register it, e.g.:\n *\n * libraries: { default: () => import('@rulecms/source-components-angular') }\n *\n * or statically import the module for SSR pages.\n */\n\nexport const manifest = {\n id: 'default',\n version: '0.1.0',\n angularPeerRange: '>=17.0.0',\n};\n\n/** The render surface: component type → renderable entry. */\nexport const components = getSourceComponentsPlugin().components;\n\n/** The editor surface: palette + attribute metadata for the RuleCMS composer. */\nexport const editor = {\n previewComponents: getPreviewComponents(),\n previewCardGroups: getPreviewCardGroups(),\n componentMetadata: getComponentMetadataForEditing(),\n};\n","import type { InlineMarks, MarkupRun, MarkupSpanRun } from './parse-inline-markers';\n\n/**\n * Canonical letter order, so the same span always serializes the same way and\n * a source-mode author sees `{bi1|…}` rather than whichever order an editor\n * happened to apply the marks in.\n */\nconst MARK_LETTERS: ReadonlyArray<readonly [keyof InlineMarks, string]> = [\n ['bold', 'b'],\n ['italic', 'i'],\n ['strike', 's'],\n];\n\nconst markLetters = (marks: InlineMarks): string =>\n MARK_LETTERS.filter(([mark]) => marks[mark])\n .map(([, letter]) => letter)\n .join('');\n\n/**\n * A span back to its marker. Text that carries neither marks nor an index is\n * emitted bare: a marker with nothing to say would only be noise an author has\n * to read past, and it round-trips to the same runs either way.\n */\nconst formatSpan = (run: MarkupSpanRun): string => {\n const letters = markLetters(run.marks);\n const index = run.index === undefined ? '' : `${run.index}`;\n\n if (letters === '' && index === '') {\n return run.text;\n }\n return `{${letters}${index}|${run.text}}`;\n};\n\n/** One run as authored text. */\nexport function formatInlineMarker(run: MarkupRun): string {\n switch (run.kind) {\n case 'text':\n return run.text;\n case 'break':\n return '{br|}';\n default:\n return formatSpan(run);\n }\n}\n\n/**\n * Runs back to the string they were parsed from.\n *\n * This is the writer half of the grammar, and it lives beside the parser so\n * that an editor never hand-assembles marker syntax. `parseInlineMarkers` and\n * this function are inverses for anything the parser produces, which is what\n * lets a rich editor round-trip through source mode without rewriting content\n * the author did not touch.\n */\nexport function serializeInlineMarkers(runs: readonly MarkupRun[]): string {\n return runs.map(formatInlineMarker).join('');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defaultAttributeValues","MARK_LETTERS","resolveNoContainer","resolveRendersOwnElement","attributeEditModeConfigs","displayCardEntry","serializeTransformations","parseTransformationString","cardEntries","rTextCardEntry","cloudinaryAdvancedImageCardEntry","rVideoCardEntry","rIconCardEntry","rButtonCardEntry","rDividerCardEntry","rEmbedCardEntry","rListCardEntry","rAccordionCardEntry","cardGroups"],"m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,CAAC;CAChB;AAED,MAAM,WAAW,GAAG,CAAC,KAAkB,KACrC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC;KACxC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;KAC1B,IAAI,CAAC,EAAE,CAAC;AAEb;;;;AAIG;AACH,MAAM,UAAU,GAAG,CAAC,GAAkB,KAAY;IAChD,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;AACtC,IAAA,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,CAAA,EAAG,GAAG,CAAC,KAAK,EAAE;IAE3D,IAAI,OAAO,KAAK,EAAE,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,OAAO,GAAG,CAAC,IAAI;IACjB;IACA,OAAO,CAAA,CAAA,EAAI,OAAO,CAAA,EAAG,KAAK,IAAI,GAAG,CAAC,IAAI,CAAA,CAAA,CAAG;AAC3C,CAAC;AAED;AACM,SAAU,kBAAkB,CAAC,GAAc,EAAA;AAC/C,IAAA,QAAQ,GAAG,CAAC,IAAI;AACd,QAAA,KAAK,MAAM;YACT,OAAO,GAAG,CAAC,IAAI;AACjB,QAAA,KAAK,OAAO;AACV,YAAA,OAAO,OAAO;AAChB,QAAA;AACE,YAAA,OAAO,UAAU,CAAC,GAAG,CAAC;;AAE5B;AAEA;;;;;;;;AAQG;AACG,SAAU,sBAAsB,CAAC,IAA0B,EAAA;IAC/D,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC9C;;ACxDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rulecms-source-components-angular.mjs","sources":["../../src/lib/base-components/display/components/r-text/default-attribute-values.ts","../../src/lib/base-components/display/components/r-text/enclosing-tags.ts","../../src/lib/base-components/display/components/r-text/resolve-enclosing-tag.ts","../../src/lib/shared/links/link-item.ts","../../src/lib/shared/links/is-safe-href.ts","../../src/lib/shared/links/resolve-link-attributes.ts","../../src/lib/shared/inline-markup/parse-inline-markers.ts","../../src/lib/shared/inline-markup/inline-markup.component.ts","../../src/lib/shared/html-tag.component.ts","../../src/lib/base-components/display/components/r-text/r-text.component.ts","../../src/lib/base-components/display/components/r-text/resolve-no-container.ts","../../src/lib/base-components/display/components/r-text/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-text/attribute-edit-mode-configs.ts","../../src/lib/component-identifiers.ts","../../src/lib/base-components/display/components/r-text/display-card-entry.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/build-cloudinary-image-urls.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/cloudinary-advanced-image.component.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/resolve-no-container.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/default-attribute-values.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/cloudinary-advanced-image/display-card-entry.ts","../../src/lib/base-components/display/components/r-video/build-video-delivery-urls.ts","../../src/lib/base-components/display/components/r-video/r-video.component.ts","../../src/lib/base-components/display/components/r-video/resolve-no-container.ts","../../src/lib/base-components/display/components/r-video/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-video/default-attribute-values.ts","../../src/lib/base-components/display/components/r-video/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-video/display-card-entry.ts","../../src/lib/base-components/display/components/r-icon/icon-attribute-value.ts","../../src/lib/shared/icons/append-icon-children.ts","../../src/lib/shared/icons/svg-icon.component.ts","../../src/lib/base-components/display/components/r-icon/r-icon.component.ts","../../src/lib/base-components/display/components/r-icon/resolve-no-container.ts","../../src/lib/base-components/display/components/r-icon/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-icon/default-attribute-values.ts","../../src/lib/base-components/display/components/r-icon/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-icon/display-card-entry.ts","../../src/lib/shared/links/parse-inline-link-markers.ts","../../src/lib/base-components/display/components/r-button/button-presets.ts","../../src/lib/base-components/display/components/r-button/button-css-variables.ts","../../src/lib/base-components/display/components/r-button/button-preset-styles.ts","../../src/lib/base-components/display/components/r-button/button-instance-props.ts","../../src/lib/base-components/display/components/r-button/resolve-button-preset.ts","../../src/lib/base-components/display/components/r-button/button-attributes.ts","../../src/lib/base-components/display/components/r-button/r-button.component.ts","../../src/lib/base-components/display/components/r-button/resolve-no-container.ts","../../src/lib/base-components/display/components/r-button/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-button/default-attribute-values.ts","../../src/lib/base-components/display/components/r-button/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-button/display-card-entry.ts","../../src/lib/base-components/display/components/r-divider/divider-attributes.ts","../../src/lib/base-components/display/components/r-divider/divider-styles.ts","../../src/lib/base-components/display/components/r-divider/r-divider.component.ts","../../src/lib/base-components/display/components/r-divider/resolve-no-container.ts","../../src/lib/base-components/display/components/r-divider/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-divider/default-attribute-values.ts","../../src/lib/base-components/display/components/r-divider/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-divider/display-card-entry.ts","../../src/lib/base-components/display/components/r-embed/embed-attributes.ts","../../src/lib/base-components/display/components/r-embed/embed-providers.ts","../../src/lib/base-components/display/components/r-embed/resolve-embed.ts","../../src/lib/base-components/display/components/r-embed/r-embed.component.ts","../../src/lib/base-components/display/components/r-embed/resolve-no-container.ts","../../src/lib/base-components/display/components/r-embed/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-embed/default-attribute-values.ts","../../src/lib/base-components/display/components/r-embed/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-embed/display-card-entry.ts","../../src/lib/base-components/display/components/r-list/list-attributes.ts","../../src/lib/base-components/display/components/r-list/r-list.component.ts","../../src/lib/base-components/display/components/r-list/resolve-no-container.ts","../../src/lib/base-components/display/components/r-list/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-list/default-attribute-values.ts","../../src/lib/base-components/display/components/r-list/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-list/display-card-entry.ts","../../src/lib/base-components/display/components/r-accordion/accordion-attributes.ts","../../src/lib/base-components/display/components/r-accordion/r-accordion.component.ts","../../src/lib/base-components/display/components/r-accordion/resolve-no-container.ts","../../src/lib/base-components/display/components/r-accordion/resolve-renders-own-element.ts","../../src/lib/base-components/display/components/r-accordion/default-attribute-values.ts","../../src/lib/base-components/display/components/r-accordion/attribute-edit-mode-configs.ts","../../src/lib/base-components/display/components/r-accordion/display-card-entry.ts","../../src/lib/base-components/display/card-entries/card-entries.ts","../../src/lib/base-components/display/card-groups.ts","../../src/lib/get-source-components-plugin.ts","../../src/lib/base-components/display/component-attributes/component-name-to-modify-attribute.ts","../../src/lib/base-components/display/component-attributes/attribute-list-for-component-types.ts","../../src/lib/get-component-metadata-for-editing.ts","../../src/lib/base-components/editor-preview/card-entries/card-entries.ts","../../src/lib/base-components/editor-preview/card-groups.ts","../../src/lib/get-preview-components.ts","../../src/lib/base-components/display/components/r-button/button-library-stylesheet.ts","../../src/lib/component-library-module.ts","../../src/lib/shared/inline-markup/serialize-inline-markers.ts","../../src/rulecms-source-components-angular.ts"],"sourcesContent":["import { DefaultAttributeValue } from '../../../../types';\n\nexport const DEFAULT_CONTENT_TEXT =\n 'This is a text block. Click to edit and add your own content.';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'content-text-3-resolutions',\n defaultValues: {\n all: DEFAULT_CONTENT_TEXT,\n },\n },\n {\n name: 'enclosing-tag-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'links-3-resolutions',\n defaultValues: {},\n },\n];\n","/**\n * HTML tags the RText component is allowed to enclose its text content in,\n * ordered from most common to least common.\n *\n * Every entry is a standard HTML element that can directly contain text\n * without changing how that text behaves. Deliberately excluded:\n * - Interactive / behavior-changing tags: a, button, label, summary, option,\n * textarea, select, details, dialog\n * - Void elements that cannot enclose text: br, wbr, hr, img, input\n * - Tags only valid inside a specific parent: li, dt, dd, td, th, caption,\n * legend, figcaption, rt, rp, optgroup\n * - Raw-text / metadata tags: script, style, title, template\n * - Live-region / form-output tags that alter assistive-technology behavior:\n * output\n */\nexport const ENCLOSING_TAGS = [\n // Common block-level text containers\n 'p',\n 'div',\n // Generic inline container\n 'span',\n // Headings\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n // Common inline emphasis and importance\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n // Common text presentation\n 'small',\n 'mark',\n // Preformatted and code text\n 'pre',\n 'code',\n // Quotations\n 'blockquote',\n 'q',\n // Subscript and superscript\n 'sub',\n 'sup',\n // Edits and strikethrough\n 's',\n 'del',\n 'ins',\n // Citations, definitions and abbreviations\n 'cite',\n 'abbr',\n 'dfn',\n // Computer I/O text\n 'kbd',\n 'samp',\n 'var',\n // Machine-readable text\n 'time',\n 'data',\n // Contact information\n 'address',\n // Bidirectional text\n 'bdi',\n 'bdo',\n // Sectioning and grouping containers\n 'figure',\n 'article',\n 'section',\n 'aside',\n 'header',\n 'footer',\n 'main',\n 'nav',\n] as const;\n\nexport type EnclosingTag = (typeof ENCLOSING_TAGS)[number];\n\n/**\n * The tags above whose default CSS display is block-level.\n *\n * Box styles — margin, padding, width, border — behave as authored on these\n * elements, so RText can carry the column's styles on the tag itself and\n * needs no wrapper div (see `resolve-no-container.ts`).\n */\nexport const BLOCK_ENCLOSING_TAGS: readonly EnclosingTag[] = [\n 'p',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'pre',\n 'blockquote',\n 'address',\n 'figure',\n 'article',\n 'section',\n 'aside',\n 'header',\n 'footer',\n 'main',\n 'nav',\n];\n\n/**\n * The tags above that default to `display: inline`, where vertical\n * margin/padding and width/height are ignored by the layout engine. Column\n * box styles must go on a wrapper element instead of on the tag.\n *\n * Kept as an explicit list rather than derived from BLOCK_ENCLOSING_TAGS so\n * adding a tag to ENCLOSING_TAGS forces a deliberate block-or-inline call;\n * the coverage test in `__tests__/enclosing-tags.test.ts` fails otherwise.\n */\nexport const INLINE_ENCLOSING_TAGS: readonly EnclosingTag[] = [\n 'span',\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n 'small',\n 'mark',\n 'code',\n 'q',\n 'sub',\n 'sup',\n 's',\n 'del',\n 'ins',\n 'cite',\n 'abbr',\n 'dfn',\n 'kbd',\n 'samp',\n 'var',\n 'time',\n 'data',\n 'bdi',\n 'bdo',\n];\n\n/**\n * Runtime guard for values arriving through componentAttributes (untyped\n * editor-authored data). Unknown values are rejected so a bad persisted value\n * can never render an unexpected element.\n */\nexport function isEnclosingTag(value: unknown): value is EnclosingTag {\n return (\n typeof value === 'string' &&\n (ENCLOSING_TAGS as readonly string[]).includes(value)\n );\n}\n\n/**\n * True when the tag renders as a block-level box. Unknown values count as\n * non-block: the safe answer, because it routes box styles to a wrapper\n * element where they are guaranteed to apply.\n */\nexport function isBlockEnclosingTag(value: unknown): boolean {\n return (\n isEnclosingTag(value) &&\n (BLOCK_ENCLOSING_TAGS as readonly string[]).includes(value)\n );\n}\n","import { isEnclosingTag } from './enclosing-tags';\nimport type { EnclosingTag } from './enclosing-tags';\n\n/** Editor-authored attribute holding the tag, flattened per device resolution. */\nexport const ENCLOSING_TAG_ATTRIBUTE = 'enclosing-tag-3-resolutions';\n\n/**\n * The single source of truth for which tag RText will render.\n *\n * Both the component and `resolveNoContainer` go through here: if they\n * disagreed, widget-react would wrap a block element in a redundant div or\n * hand box styles to an inline element that ignores them.\n *\n * The editor-authored attribute wins over the caller's prop. Attribute values\n * are untyped, so an unrecognised value falls back to the prop, then to no\n * enclosing tag at all.\n */\nexport function resolveEnclosingTag(\n componentAttributes?: { [key: string]: any },\n fallback?: EnclosingTag\n): EnclosingTag | undefined {\n const userAssignedTag = componentAttributes?.[ENCLOSING_TAG_ATTRIBUTE];\n return isEnclosingTag(userAssignedTag) ? userAssignedTag : fallback;\n}\n","/**\n * One link entry as the composer stores it. Shared by every component that\n * links (text markers today, icons next), so nothing here knows about text.\n */\nexport type LinkItem = {\n href?: string;\n /** Author-facing name for identifying the entry in the composer. Never rendered. */\n label?: string;\n target?: string;\n rel?: string;\n title?: string;\n ariaLabel?: string;\n /** `true` = bare download attribute; string = suggested filename. */\n download?: string | boolean;\n hreflang?: string;\n referrerPolicy?: string;\n};\n\n/**\n * Runtime guard for entries arriving through componentAttributes (untyped,\n * editor-authored data).\n *\n * Only object shape is checked. Field types are not: a single bad field must\n * cost that field, not the whole entry, so per-field validation belongs to\n * `resolveLinkAttributes` where each value is turned into an attribute.\n */\nexport function isLinkItem(value: unknown): value is LinkItem {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * True for a cleared slot. Clearing a link stores `{}` rather than removing\n * the array element, because marker indexes are 1-based positions: dropping an\n * element would silently repoint every later marker.\n */\nexport function isEmptyLinkItem(item: unknown): boolean {\n if (!isLinkItem(item)) {\n return true;\n }\n return Object.values(item).every(\n (value) =>\n value === undefined ||\n value === null ||\n (typeof value === 'string' && value.trim() === '')\n );\n}\n\n/**\n * The entry a `{n|…}` marker points at, by 1-based position. Tolerant of bad\n * data on every axis — a non-array list, a fractional or out-of-range index,\n * a hole in the array — because none of it may throw during a render.\n */\nexport function getLinkItemAt(links: unknown, oneBasedIndex: number): LinkItem | undefined {\n if (!Array.isArray(links)) {\n return undefined;\n }\n if (!Number.isInteger(oneBasedIndex) || oneBasedIndex < 1) {\n return undefined;\n }\n const entry = links[oneBasedIndex - 1];\n return isLinkItem(entry) ? entry : undefined;\n}\n","/**\n * Schemes that can execute or smuggle a payload. Mirrors the denylist in\n * RuleCMS `text-safety/validate-text-content.ts`; the two must stay in step,\n * because that one warns at save and this one is the guarantee at render.\n */\nexport const REJECTED_HREF_SCHEMES: readonly string[] = [\n 'javascript',\n // Netscape-era aliases for javascript:. No browser in use today runs them,\n // but RuleCMS refuses them in prose, and an href accepting what the text\n // field rejects is the kind of gap that outlives the reason for it.\n 'livescript',\n 'mocha',\n 'vbscript',\n 'data',\n 'file',\n 'blob',\n];\n\nconst SCHEME = /^([a-z][a-z0-9+.-]*):/;\n\n/**\n * Characters a browser ignores while reading a scheme. Stripped before the\n * scheme is matched so `java\\tscript:` and a leading NUL cannot hide one.\n */\nconst isIgnoredWhenReadingAScheme = (charCode: number): boolean =>\n charCode <= 0x20 || charCode === 0x7f;\n\nconst schemeProbe = (value: string): string => {\n let probe = '';\n for (let index = 0; index < value.length; index += 1) {\n if (!isIgnoredWhenReadingAScheme(value.charCodeAt(index))) {\n probe += value[index];\n }\n }\n return probe.toLowerCase();\n};\n\n/**\n * Whether a value is safe to put in an `href`.\n *\n * A denylist, not an allowlist. Customers link with git and ssh URLs, mobile\n * deep links, `mailto:`, `tel:`, `sms:`, custom app schemes, protocol-relative\n * `//host/path`, and bare `/path`, `#anchor`, `?q=1`, `./rel` — all of which\n * are accepted. A host is not required and neither is http/https. Only the\n * schemes that turn a link into code or an opaque payload are turned away.\n *\n * Rejection happens at render, never at save: the composer may use this for a\n * non-blocking warning, but stored content is not trusted content.\n */\nexport function isSafeHref(value: unknown): boolean {\n if (typeof value !== 'string' || value.trim() === '') {\n return false;\n }\n\n const match = SCHEME.exec(schemeProbe(value));\n // No scheme at all: relative, fragment, query, or protocol-relative.\n if (!match) {\n return true;\n }\n\n return !REJECTED_HREF_SCHEMES.includes(match[1]);\n}\n","import { isLinkItem } from './link-item';\nimport type { LinkItem } from './link-item';\nimport { isSafeHref } from './is-safe-href';\n\nexport type AnchorAttributes = {\n href: string;\n target?: string;\n rel?: string;\n title?: string;\n 'aria-label'?: string;\n download?: string | true;\n hrefLang?: string;\n referrerPolicy?: string;\n};\n\nconst BLANK_TARGET = '_blank';\n\nconst IMPLIED_REL_FOR_BLANK_TARGET = ['noopener', 'noreferrer'];\n\nconst cleanString = (value: unknown): string | undefined => {\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed === '' ? undefined : trimmed;\n};\n\nconst resolveRel = (authorRel: string | undefined, target: string | undefined): string | undefined => {\n const tokens = authorRel ? authorRel.split(/\\s+/) : [];\n\n if (target?.toLowerCase() !== BLANK_TARGET) {\n return tokens.length > 0 ? tokens.join(' ') : undefined;\n }\n\n const present = new Set(tokens.map((token) => token.toLowerCase()));\n const merged = [...tokens];\n IMPLIED_REL_FOR_BLANK_TARGET.forEach((token) => {\n if (!present.has(token)) {\n merged.push(token);\n }\n });\n return merged.join(' ');\n};\n\nconst resolveDownload = (download: LinkItem['download']): string | true | undefined => {\n if (download === true) {\n return true;\n }\n return cleanString(download);\n};\n\nexport function resolveLinkAttributes(item: LinkItem | undefined): AnchorAttributes | undefined {\n if (!isLinkItem(item)) {\n return undefined;\n }\n\n const href = cleanString(item.href);\n if (!isSafeHref(href)) {\n return undefined;\n }\n\n const target = cleanString(item.target);\n const rel = resolveRel(cleanString(item.rel), target);\n const title = cleanString(item.title);\n const ariaLabel = cleanString(item.ariaLabel);\n const download = resolveDownload(item.download);\n const hrefLang = cleanString(item.hreflang);\n const referrerPolicy = cleanString(item.referrerPolicy);\n\n return {\n href: href as string,\n ...(target !== undefined ? { target } : {}),\n ...(rel !== undefined ? { rel } : {}),\n ...(title !== undefined ? { title } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(download !== undefined ? { download } : {}),\n ...(hrefLang !== undefined ? { hrefLang } : {}),\n ...(referrerPolicy !== undefined ? { referrerPolicy } : {}),\n };\n}\n","/**\n * The formatting one marker can carry. Independent flags rather than a union,\n * because a span can be bold and italic and struck at once.\n */\nexport type InlineMarks = { bold: boolean; italic: boolean; strike: boolean };\n\nexport type MarkupTextRun = { kind: 'text'; text: string };\n\nexport type MarkupSpanRun = {\n kind: 'span';\n text: string;\n /**\n * 1-based position in the link list, when the marker carried an index. A\n * span can be marked without linking (`{b|word}`) and linked without marks\n * (`{1|word}`), so this is optional and the marks are always present.\n */\n index?: number;\n marks: InlineMarks;\n};\n\nexport type MarkupBreakRun = { kind: 'break' };\n\nexport type MarkupRun = MarkupTextRun | MarkupSpanRun | MarkupBreakRun;\n\n/**\n * `{` + optional mark letters + optional index + `|` + text + `}`.\n *\n * Sticky, so it can be tried at one position without slicing the string. The\n * text is everything up to the first `}`, which is what makes markers\n * non-nesting.\n */\nconst MARKER = /\\{([a-z]*)(\\d*)\\|([^}]*)\\}/y;\n\n/**\n * One letter per mark. Order is not significant (`{bi1|x}` and `{ib1|x}` are\n * the same span) and repeats are harmless, because the letters resolve to a\n * set.\n *\n * **`r` must never become a mark letter.** `br` is the line-break token below,\n * and it is only unambiguous while `r` cannot appear in a mark sequence.\n */\nconst MARK_LETTERS: Readonly<Record<string, keyof InlineMarks>> = {\n b: 'bold',\n i: 'italic',\n s: 'strike',\n};\n\n/** The one marker that carries no text: `{br|}`. */\nconst BREAK_TOKEN = 'br';\n\nconst NO_MARKS: InlineMarks = { bold: false, italic: false, strike: false };\n\n/**\n * Letters to a mark set, or `undefined` when any letter is not a mark. An\n * unknown letter makes the whole marker literal text rather than a span with\n * the bad letter ignored: an author who mistypes should see it.\n */\nconst resolveMarks = (letters: string): InlineMarks | undefined => {\n if (letters === '') {\n return { ...NO_MARKS };\n }\n\n const marks: InlineMarks = { ...NO_MARKS };\n for (const letter of letters) {\n const mark = MARK_LETTERS[letter];\n if (mark === undefined) {\n return undefined;\n }\n marks[mark] = true;\n }\n return marks;\n};\n\n/**\n * Splits authored text into plain runs, marked/linked spans, and line breaks.\n *\n * The grammar, and everything it deliberately leaves as literal text, is\n * specified in `rulecms/__docs__/__ARCHITECTURE__/INLINE_MARKUP_ARCHITECTURE.md`.\n * In short: a marker is `{`, then lowercase mark letters, then a link index,\n * then `|`, then its text, then `}`. At least one of the letters and the index\n * must be present, and everything that does not match that shape stays\n * verbatim — `{name}`, `{99}`, a lone `{`, JSON fragments, an unterminated\n * marker, an unknown mark letter, and empty span text.\n *\n * Indexes are 1-based and normalize through a base-10 parse, so `{01|x}` and\n * `{1|x}` point at the same entry. Resolving an index to an entry is the\n * caller's job; this stays pure and free of React.\n */\nexport function parseInlineMarkers(value: string): MarkupRun[] {\n if (typeof value !== 'string' || value === '') {\n return [];\n }\n\n const runs: MarkupRun[] = [];\n let pendingText = '';\n let cursor = 0;\n\n const flushPendingText = () => {\n if (pendingText !== '') {\n runs.push({ kind: 'text', text: pendingText });\n pendingText = '';\n }\n };\n\n while (cursor < value.length) {\n const open = value.indexOf('{', cursor);\n if (open === -1) {\n pendingText += value.slice(cursor);\n break;\n }\n\n MARKER.lastIndex = open;\n const match = MARKER.exec(value);\n const run = match ? resolveRun(match[1], match[2], match[3]) : undefined;\n\n if (run === undefined) {\n // Not a marker: keep the brace as text and look for the next one.\n pendingText += value.slice(cursor, open + 1);\n cursor = open + 1;\n continue;\n }\n\n pendingText += value.slice(cursor, open);\n flushPendingText();\n runs.push(run);\n cursor = open + (match as RegExpExecArray)[0].length;\n }\n\n flushPendingText();\n\n return runs;\n}\n\n/**\n * One matched `{…|…}` to the run it means, or `undefined` when the match is\n * not a marker after all and its opening brace is literal text.\n */\nconst resolveRun = (letters: string, digits: string, text: string): MarkupRun | undefined => {\n if (letters === BREAK_TOKEN) {\n // A break carries nothing. `{br|x}` is a mistake, not a break with text.\n return digits === '' && text === '' ? { kind: 'break' } : undefined;\n }\n\n if (letters === '' && digits === '') {\n return undefined;\n }\n\n // Empty text has no words to mark or link, and staying literal is what shows\n // the author the mistake instead of swallowing the marker.\n if (text === '') {\n return undefined;\n }\n\n const marks = resolveMarks(letters);\n if (marks === undefined) {\n return undefined;\n }\n\n return {\n kind: 'span',\n text,\n ...(digits === '' ? {} : { index: Number.parseInt(digits, 10) }),\n marks,\n };\n};\n","import {\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n} from '@angular/core';\nimport { getLinkItemAt } from '../links/link-item';\nimport { resolveLinkAttributes } from '../links/resolve-link-attributes';\nimport type { AnchorAttributes } from '../links/resolve-link-attributes';\nimport { parseInlineMarkers } from './parse-inline-markers';\nimport type { InlineMarks, MarkupRun, MarkupSpanRun } from './parse-inline-markers';\n\nconst MARK_TAGS: ReadonlyArray<readonly [keyof InlineMarks, string]> = [\n ['bold', 'strong'],\n ['italic', 'em'],\n ['strike', 's'],\n];\n\nconst hasMark = (marks: InlineMarks): boolean => marks.bold || marks.italic || marks.strike;\n\nconst plainTextOf = (run: MarkupRun): string => (run.kind === 'break' ? '' : run.text);\n\n@Component({\n selector: 'rulecms-inline-markup',\n standalone: true,\n template: '',\n host: { style: 'display: contents' },\n})\nexport class InlineMarkupComponent implements OnChanges {\n @Input() text = '';\n @Input() links: unknown;\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2\n ) {}\n\n ngOnChanges(): void {\n this.clear();\n const runs = parseInlineMarkers(this.text);\n const anchors = runs.map((run) =>\n run.kind === 'span' && run.index !== undefined\n ? resolveLinkAttributes(getLinkItemAt(this.links, run.index))\n : undefined\n );\n const needsElement = runs.some(\n (run, position) =>\n run.kind === 'break' ||\n (run.kind === 'span' && (anchors[position] !== undefined || hasMark(run.marks)))\n );\n\n if (!needsElement) {\n this.renderer.appendChild(\n this.host.nativeElement,\n this.renderer.createText(runs.map(plainTextOf).join(''))\n );\n return;\n }\n\n runs.forEach((run, position) => {\n if (run.kind === 'text') {\n this.renderer.appendChild(this.host.nativeElement, this.renderer.createText(run.text));\n return;\n }\n if (run.kind === 'break') {\n this.renderer.appendChild(this.host.nativeElement, this.renderer.createElement('br'));\n return;\n }\n this.renderer.appendChild(this.host.nativeElement, this.renderSpan(run, anchors[position]));\n });\n }\n\n private renderSpan(run: MarkupSpanRun, anchor: AnchorAttributes | undefined): Node {\n let node: Node =\n anchor === undefined\n ? this.renderer.createText(run.text)\n : this.createAnchor(anchor, run.text);\n\n for (let position = MARK_TAGS.length - 1; position >= 0; position -= 1) {\n const [mark, tag] = MARK_TAGS[position];\n if (run.marks[mark]) {\n const wrapper = this.renderer.createElement(tag);\n this.renderer.appendChild(wrapper, node);\n node = wrapper;\n }\n }\n return node;\n }\n\n private createAnchor(anchor: AnchorAttributes, text: string): Node {\n const el = this.renderer.createElement('a');\n this.renderer.setAttribute(el, 'href', anchor.href);\n if (anchor.target) this.renderer.setAttribute(el, 'target', anchor.target);\n if (anchor.rel) this.renderer.setAttribute(el, 'rel', anchor.rel);\n if (anchor.title) this.renderer.setAttribute(el, 'title', anchor.title);\n if (anchor['aria-label']) this.renderer.setAttribute(el, 'aria-label', anchor['aria-label']);\n if (anchor.download === true) this.renderer.setAttribute(el, 'download', '');\n else if (typeof anchor.download === 'string') this.renderer.setAttribute(el, 'download', anchor.download);\n if (anchor.hrefLang) this.renderer.setAttribute(el, 'hreflang', anchor.hrefLang);\n if (anchor.referrerPolicy) this.renderer.setAttribute(el, 'referrerpolicy', anchor.referrerPolicy);\n this.renderer.appendChild(el, this.renderer.createText(text));\n return el;\n }\n\n private clear(): void {\n const el = this.host.nativeElement;\n while (el.firstChild) {\n this.renderer.removeChild(el, el.firstChild);\n }\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n ViewChild,\n ViewContainerRef,\n TemplateRef,\n} from '@angular/core';\n\n@Component({\n selector: 'rulecms-html-tag',\n standalone: true,\n template: `\n <ng-template #projected>\n <ng-content />\n </ng-template>\n `,\n host: { style: 'display: contents' },\n})\nexport class HtmlTagComponent implements AfterViewInit, OnChanges {\n @Input({ required: true }) tag!: string;\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n @ViewChild('projected', { static: true }) projected!: TemplateRef<unknown>;\n\n private created: HTMLElement | null = null;\n private viewReady = false;\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2,\n private readonly vcr: ViewContainerRef\n ) {}\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.render();\n }\n\n ngOnChanges(): void {\n if (this.viewReady) {\n this.render();\n }\n }\n\n private render(): void {\n if (this.created) {\n this.renderer.removeChild(this.host.nativeElement, this.created);\n this.created = null;\n }\n const el = this.renderer.createElement(this.tag) as HTMLElement;\n if (this.className !== undefined) {\n this.renderer.setAttribute(el, 'class', this.className);\n }\n if (this.styleProps) {\n Object.entries(this.styleProps).forEach(([key, value]) => {\n if (value !== undefined && value !== null && value !== '') {\n this.renderer.setStyle(el, key, String(value));\n }\n });\n }\n const view = this.vcr.createEmbeddedView(this.projected);\n view.rootNodes.forEach((node) => this.renderer.appendChild(el, node));\n this.renderer.appendChild(this.host.nativeElement, el);\n this.created = el;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { DEFAULT_CONTENT_TEXT } from './default-attribute-values';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport { HtmlTagComponent } from '../../../../shared/html-tag.component';\n\n@Component({\n selector: 'rulecms-r-text',\n standalone: true,\n imports: [InlineMarkupComponent, HtmlTagComponent],\n template: `\n @if (tag) {\n <rulecms-html-tag [tag]=\"tag\" [styleProps]=\"styleProps\" [className]=\"className\">\n <rulecms-inline-markup [text]=\"content\" [links]=\"links\" />\n </rulecms-html-tag>\n } @else {\n <rulecms-inline-markup [text]=\"content\" [links]=\"links\" />\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RTextComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get content(): string {\n const contentVal = this.componentAttributes?.['content-text-3-resolutions'] ?? DEFAULT_CONTENT_TEXT;\n return typeof contentVal === 'string' ? contentVal : String(contentVal ?? '');\n }\n\n get links(): unknown {\n return this.componentAttributes?.['links-3-resolutions'];\n }\n\n get tag(): string | undefined {\n return resolveEnclosingTag(this.componentAttributes);\n }\n}\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { isBlockEnclosingTag } from './enclosing-tags';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\n\n/**\n * RText needs a wrapper div for the column's box styles unless it is about to\n * render a block-level element that can hold those styles itself.\n *\n * - No enclosing tag: bare text with no element to style → wrapper needed.\n * - Inline tag (`span`, `em`, `code`, …): vertical margin/padding and width\n * are ignored on inline boxes → wrapper needed.\n * - Block tag (`p`, `div`, `h1`, `section`, …): RText puts styleProps on the\n * tag itself → no wrapper, one less element in the DOM.\n */\nexport const resolveNoContainer = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean =>\n !isBlockEnclosingTag(resolveEnclosingTag(componentAttributes));\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEnclosingTag } from './resolve-enclosing-tag';\n\n/**\n * True when RText is about to render an element that can carry a className —\n * any enclosing tag, block or inline. Bare text has no element, so false.\n *\n * Shares `resolveEnclosingTag` with RText and `resolveNoContainer`: if this\n * disagreed with what the component renders, a class would either land on\n * nothing or force a redundant wrapper.\n */\nexport const resolveRendersOwnElement = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean => !!resolveEnclosingTag(componentAttributes);\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'content-text-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'enclosing-tag-3-resolutions',\n heading: 'Enclosing Tag',\n subHeading:\n 'HTML tag to enclose the text in (e.g. p, h1, span); see ENCLOSING_TAGS for the allowed values, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'links-3-resolutions',\n heading: 'Links',\n subHeading:\n 'Links this text can point at. To link part of the text, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","type ComponentIdentifier =\n | 'r-text'\n | 'something-else'\n | 'cloudinary-advanced-image'\n | 'r-video'\n | 'r-icon'\n | 'r-button'\n | 'r-divider'\n | 'r-embed'\n | 'r-list'\n | 'r-accordion';\n\nexport const ComponentIdentifiers: Record<string, ComponentIdentifier> = {\n rText: 'r-text',\n somethingElse: 'something-else',\n cloudinaryAdvancedImage: 'cloudinary-advanced-image',\n rVideo: 'r-video',\n rIcon: 'r-icon',\n rButton: 'r-button',\n rDivider: 'r-divider',\n rEmbed: 'r-embed',\n rList: 'r-list',\n rAccordion: 'r-accordion',\n} as const;\n","import { RTextComponent } from './r-text.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rText,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RTextComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","// Builds Cloudinary delivery URLs directly so the component renders a complete\n// <img src/srcSet> during server rendering (no browser-only Cloudinary SDK).\n// `f_auto,q_auto` lets Cloudinary pick format/quality; `c_limit` scales down\n// but never upscales beyond the original asset.\n\n// A Cloudinary transformation component as an object, e.g.\n// { c: 'fill', g: 'auto', ar: '4:3' } serializes to \"c_fill,g_auto,ar_4:3\"\nexport type CloudinaryTransformations = { [key: string]: string | number };\n\n// Covers phone through large desktop displays, including 2x DPR on common\n// viewport widths. Upper bound keeps multi-thousand-pixel originals in check.\nexport const cloudinarySrcSetWidths = [480, 768, 1080, 1600, 2400];\n\n// Mid-size fallback for browsers/tools that ignore srcset.\nconst fallbackSrcWidth = 1080;\n\nconst defaultTransformations: CloudinaryTransformations = {\n f: 'auto',\n q: 'auto',\n c: 'limit',\n};\n\nfunction serializeTransformations(transformations: CloudinaryTransformations): string {\n return Object.entries(transformations)\n .map(([key, value]) => `${key}_${value}`)\n .join(',');\n}\n\n// Accepts the raw Cloudinary string form (\"c_fill,g_auto,ar_4:3\") and parses\n// it into an object so it merges over the defaults the same way object input\n// does (e.g. a user c_fill cleanly replaces the default c_limit)\nfunction parseTransformationString(value: string): CloudinaryTransformations {\n const result: CloudinaryTransformations = {};\n value.split(',').forEach((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n return;\n }\n const separatorIndex = trimmed.indexOf('_');\n if (separatorIndex <= 0) {\n return;\n }\n result[trimmed.slice(0, separatorIndex)] = trimmed.slice(separatorIndex + 1);\n });\n return result;\n}\n\nfunction buildCloudinaryImageUrl(\n cloudName: string,\n publicId: string,\n width: number,\n transformations?: CloudinaryTransformations | string\n): string {\n const userTransformations =\n typeof transformations === 'string'\n ? parseTransformationString(transformations)\n : transformations;\n\n // User keys override defaults (object spread = \"split the object onto the\n // configuration\"). `w` is always component-managed so srcset width variants\n // stay correct; combined with user ar/c/g values Cloudinary produces\n // consistent crops at every width.\n const merged: CloudinaryTransformations = {\n ...defaultTransformations,\n ...userTransformations,\n w: width,\n };\n\n // encodeURI preserves the slashes that are part of Cloudinary public IDs\n // (e.g. \"images/<uuid>/<id>\") while escaping unsafe characters\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/image/upload/${serializeTransformations(merged)}/${publicId}`\n );\n}\n\nexport function buildCloudinarySrc(\n cloudName: string,\n publicId: string,\n transformations?: CloudinaryTransformations | string\n): string {\n return buildCloudinaryImageUrl(cloudName, publicId, fallbackSrcWidth, transformations);\n}\n\nexport function buildCloudinarySrcSet(\n cloudName: string,\n publicId: string,\n transformations?: CloudinaryTransformations | string\n): string {\n return cloudinarySrcSetWidths\n .map((width) => `${buildCloudinaryImageUrl(cloudName, publicId, width, transformations)} ${width}w`)\n .join(', ');\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { buildCloudinarySrc, buildCloudinarySrcSet } from './build-cloudinary-image-urls';\nimport type { CloudinaryTransformations } from './build-cloudinary-image-urls';\n\n@Component({\n selector: 'rulecms-cloudinary-image',\n standalone: true,\n imports: [NgStyle],\n template: `\n <img\n [src]=\"src\"\n [srcset]=\"srcSet\"\n [attr.alt]=\"imageAttributes['alt']\"\n [attr.decoding]=\"imageAttributes['decoding']\"\n [attr.sizes]=\"imageAttributes['sizes']\"\n [attr.loading]=\"imageAttributes['loading']\"\n [attr.fetchpriority]=\"imageAttributes['fetchpriority']\"\n [attr.width]=\"imageAttributes['width']\"\n [attr.height]=\"imageAttributes['height']\"\n [class]=\"mergedClassName\"\n [ngStyle]=\"mergedStyles\"\n />\n `,\n host: { style: 'display: contents' },\n})\nexport class CloudinaryAdvancedImageComponent {\n @Input() cloudName = 'rulecms';\n @Input() publicId = 'main-sample';\n @Input() alt = 'RuleCMS Component';\n @Input() transformations?: CloudinaryTransformations | string;\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get finalCloudName() {\n return this.componentAttributes?.['cloudinary-cloud-name'] || this.cloudName;\n }\n get finalPublicId() {\n return (\n this.componentAttributes?.['media-selector-3-resolutions'] ||\n this.componentAttributes?.['cloudinary-public-id'] ||\n this.publicId\n );\n }\n get finalTransformations() {\n return this.componentAttributes?.['cloudinary-transformations-3-resolutions'] || this.transformations;\n }\n get src() {\n return buildCloudinarySrc(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n get srcSet() {\n return buildCloudinarySrcSet(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n\n get imageAttributes(): { [key: string]: any } {\n const imageAttributes: { [key: string]: any } = {\n alt: this.alt,\n decoding: 'async',\n sizes: '100vw',\n };\n const imageStyles: { [key: string]: any } = { height: 'auto' };\n if (this.componentAttributes) {\n Object.keys(this.componentAttributes).forEach((keyWithDimensionSuffix) => {\n const value = this.componentAttributes![keyWithDimensionSuffix];\n if (value === undefined || value === null) {\n return;\n }\n const key = keyWithDimensionSuffix.endsWith('-3-resolutions')\n ? keyWithDimensionSuffix.slice(0, -'-3-resolutions'.length)\n : keyWithDimensionSuffix;\n if (key.startsWith('pass-through-image-attributes-style-')) {\n imageStyles[key.slice('pass-through-image-attributes-style-'.length)] = value;\n } else if (key.startsWith('pass-through-image-attributes-')) {\n imageAttributes[key.slice('pass-through-image-attributes-'.length)] = value;\n }\n });\n }\n (imageAttributes as any).__styles = imageStyles;\n return imageAttributes;\n }\n\n get mergedClassName(): string | undefined {\n const { className: passThroughClassName } = this.imageAttributes;\n return [passThroughClassName, this.className].filter(Boolean).join(' ') || undefined;\n }\n\n get mergedStyles() {\n return { ...(this.imageAttributes as any).__styles, ...this.styleProps };\n }\n}\n","/**\n * The component spreads styleProps onto its `<img>`, a replaced element that\n * honors min/max sizing, margin and padding directly — a wrapper div would\n * only add a redundant element. There is no configuration that changes this,\n * so the answer is the same for every render.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * Always renders an `<img>`, which can carry a className. There is no\n * configuration that changes this.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'cloudinary-cloud-name',\n defaultValues: {},\n },\n {\n name: 'cloudinary-public-id',\n defaultValues: {},\n },\n {\n name: 'media-selector-3-resolutions',\n defaultValues: {\n all: 'main-sample',\n },\n },\n {\n name: 'pass-through-image-attributes-alt-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-width-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-height-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-sizes-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-loading-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-fetchpriority-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'cloudinary-transformations-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'cloudinary-cloud-name',\n heading: 'Cloudinary Cloud Name',\n subHeading: 'Set the Cloudinary cloud name for 3 different device resolutions',\n defaultValues: {},\n // Filled by Media Selector / team defaults — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'cloudinary-public-id',\n heading: 'Image Public ID',\n subHeading: 'Set the Cloudinary image public ID for 3 different device resolutions',\n defaultValues: {},\n // Filled by Media Selector — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'media-selector-3-resolutions',\n heading: 'Media Selector',\n subHeading: 'Select media for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-alt-3-resolutions',\n heading: 'Image Alt Text',\n subHeading: 'Set the image alt text for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-width-3-resolutions',\n heading: 'Image Intrinsic Width',\n subHeading: 'Set the intrinsic pixel width (with height, reserves layout space before the image loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-height-3-resolutions',\n heading: 'Image Intrinsic Height',\n subHeading: 'Set the intrinsic pixel height (with width, reserves layout space before the image loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-sizes-3-resolutions',\n heading: 'Image Sizes',\n subHeading: 'Set the sizes attribute (e.g. \"(max-width: 600px) 100vw, 600px\") so the browser downloads the right srcset variant, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-loading-3-resolutions',\n heading: 'Image Loading',\n subHeading: 'Set to \"lazy\" for below-the-fold images (never for the main hero image), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-image-attributes-fetchpriority-3-resolutions',\n heading: 'Image Fetch Priority',\n subHeading: 'Set to \"high\" for the most important image on the page (e.g. the hero), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'cloudinary-transformations-3-resolutions',\n heading: 'Cloudinary Transformations',\n subHeading: 'Set extra Cloudinary transformations (e.g. \"c_fill,g_auto,ar_4:3\"); merged over the defaults f_auto,q_auto,c_limit, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { CloudinaryAdvancedImageComponent } from './cloudinary-advanced-image.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.cloudinaryAdvancedImage,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: CloudinaryAdvancedImageComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","// Builds media-host delivery URLs directly so the component renders a complete\n// <video src/poster> during server rendering (no browser-only SDK).\n//\n// Delivery choices for web video:\n// - `.mp4` extension: every uploaded source format (webm, mov, …) is\n// transcoded to progressive MP4, which plays in every browser.\n// - `vc_auto,q_auto`: the host picks the best codec and quality for the\n// requested container.\n// - `c_limit,w_1920`: scales oversized originals down to a web-appropriate\n// width but never upscales.\n\n// A transformation component as an object, e.g.\n// { c: 'fill', ar: '16:9' } serializes to \"c_fill,ar_16:9\"\nexport type VideoTransformations = { [key: string]: string | number };\n\nconst defaultVideoTransformations: VideoTransformations = {\n q: 'auto',\n vc: 'auto',\n c: 'limit',\n w: 1920,\n};\n\n// Poster is a single still frame: take the first frame (so_0), same\n// downscale cap as the video itself. Format comes from the .jpg extension.\nconst defaultPosterTransformations: VideoTransformations = {\n so: 0,\n q: 'auto',\n c: 'limit',\n w: 1920,\n};\n\n// Custom posters are uploaded images, so they get the image pipeline's\n// automatic format/quality.\nconst defaultCustomPosterTransformations: VideoTransformations = {\n f: 'auto',\n q: 'auto',\n c: 'limit',\n w: 1920,\n};\n\nfunction serializeTransformations(transformations: VideoTransformations): string {\n return Object.entries(transformations)\n .map(([key, value]) => (value === '' ? key : `${key}_${value}`))\n .join(',');\n}\n\n// Accepts the raw string form (\"c_fill,ar_16:9\") and parses it into an object\n// so it merges over the defaults the same way object input does.\nfunction parseTransformationString(value: string): VideoTransformations {\n const result: VideoTransformations = {};\n value.split(',').forEach((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n return;\n }\n const separatorIndex = trimmed.indexOf('_');\n if (separatorIndex <= 0) {\n // Flag-style component with no value (e.g. \"so_0\" handled above; keep\n // unknown flags as bare keys so they serialize unchanged).\n result[trimmed] = '';\n return;\n }\n result[trimmed.slice(0, separatorIndex)] = trimmed.slice(separatorIndex + 1);\n });\n return result;\n}\n\nfunction mergeTransformations(\n defaults: VideoTransformations,\n transformations?: VideoTransformations | string\n): VideoTransformations {\n const userTransformations =\n typeof transformations === 'string'\n ? parseTransformationString(transformations)\n : transformations;\n return { ...defaults, ...userTransformations };\n}\n\nexport function buildVideoSrc(\n cloudName: string,\n publicId: string,\n transformations?: VideoTransformations | string\n): string {\n const merged = mergeTransformations(defaultVideoTransformations, transformations);\n // encodeURI preserves the slashes that are part of public IDs\n // (e.g. \"videos/<uuid>/<id>\") while escaping unsafe characters\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/video/upload/${serializeTransformations(merged)}/${publicId}.mp4`\n );\n}\n\n// First frame of the video itself — the zero-configuration poster.\nexport function buildVideoPosterSrc(cloudName: string, publicId: string): string {\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/video/upload/${serializeTransformations(defaultPosterTransformations)}/${publicId}.jpg`\n );\n}\n\n// A separately uploaded image chosen as the poster.\nexport function buildCustomPosterSrc(cloudName: string, posterPublicId: string): string {\n return encodeURI(\n `https://res.cloudinary.com/${cloudName}/image/upload/${serializeTransformations(defaultCustomPosterTransformations)}/${posterPublicId}`\n );\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport {\n buildVideoSrc,\n buildVideoPosterSrc,\n buildCustomPosterSrc,\n} from './build-video-delivery-urls';\nimport type { VideoTransformations } from './build-video-delivery-urls';\n\nconst BOOLEAN_VIDEO_ATTRIBUTES = new Set(['controls', 'autoplay', 'loop', 'muted', 'playsinline']);\nconst coerceBoolean = (value: any): boolean => value === true || value === 'true';\n\n@Component({\n selector: 'rulecms-r-video',\n standalone: true,\n imports: [NgStyle],\n template: `\n <video\n [src]=\"src\"\n [attr.poster]=\"videoAttributes['poster']\"\n [attr.controls]=\"videoAttributes['controls'] ? true : null\"\n [attr.autoplay]=\"videoAttributes['autoplay'] ? true : null\"\n [attr.loop]=\"videoAttributes['loop'] ? true : null\"\n [attr.muted]=\"videoAttributes['muted'] ? true : null\"\n [attr.playsinline]=\"videoAttributes['playsinline'] ? true : null\"\n [attr.preload]=\"videoAttributes['preload']\"\n [attr.width]=\"videoAttributes['width']\"\n [attr.height]=\"videoAttributes['height']\"\n [class]=\"mergedClassName\"\n [ngStyle]=\"mergedStyles\"\n ></video>\n `,\n host: { style: 'display: contents' },\n})\nexport class RVideoComponent {\n @Input() cloudName = 'rulecms';\n @Input() publicId = 'main-sample-video';\n @Input() transformations?: VideoTransformations | string;\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get finalCloudName() {\n return this.componentAttributes?.['video-host-cloud-name'] || this.cloudName;\n }\n get finalPublicId() {\n return (\n this.componentAttributes?.['video-selector-3-resolutions'] ||\n this.componentAttributes?.['video-public-id'] ||\n this.publicId\n );\n }\n get finalTransformations() {\n return this.componentAttributes?.['video-transformations-3-resolutions'] || this.transformations;\n }\n get src() {\n return buildVideoSrc(this.finalCloudName, this.finalPublicId, this.finalTransformations);\n }\n\n get videoAttributes(): { [key: string]: any } {\n const posterPublicId = this.componentAttributes?.['video-poster-selector-3-resolutions'];\n const videoAttributes: { [key: string]: any } = {\n controls: true,\n playsinline: true,\n preload: 'metadata',\n poster: posterPublicId\n ? buildCustomPosterSrc(this.finalCloudName, posterPublicId)\n : buildVideoPosterSrc(this.finalCloudName, this.finalPublicId),\n };\n const videoStyles: { [key: string]: any } = {\n maxWidth: '100%',\n height: 'auto',\n };\n if (this.componentAttributes) {\n Object.keys(this.componentAttributes).forEach((keyWithDimensionSuffix) => {\n const value = this.componentAttributes![keyWithDimensionSuffix];\n if (value === undefined || value === null) {\n return;\n }\n const key = keyWithDimensionSuffix.endsWith('-3-resolutions')\n ? keyWithDimensionSuffix.slice(0, -'-3-resolutions'.length)\n : keyWithDimensionSuffix;\n if (key.startsWith('pass-through-video-attributes-style-')) {\n videoStyles[key.slice('pass-through-video-attributes-style-'.length)] = value;\n } else if (key.startsWith('pass-through-video-attributes-')) {\n const attributeName = key.slice('pass-through-video-attributes-'.length);\n if (BOOLEAN_VIDEO_ATTRIBUTES.has(attributeName)) {\n if (coerceBoolean(value)) {\n videoAttributes[attributeName] = true;\n } else {\n delete videoAttributes[attributeName];\n }\n return;\n }\n videoAttributes[attributeName] = value;\n }\n });\n }\n (videoAttributes as any).__styles = videoStyles;\n return videoAttributes;\n }\n\n get mergedClassName(): string | undefined {\n const { className: passThroughClassName } = this.videoAttributes;\n return [passThroughClassName, this.className].filter(Boolean).join(' ') || undefined;\n }\n\n get mergedStyles() {\n return { ...(this.videoAttributes as any).__styles, ...this.styleProps };\n }\n}\n","/**\n * The component spreads styleProps onto its `<video>`, a replaced element that\n * honors min/max sizing, margin and padding directly — a wrapper div would\n * only add a redundant element. There is no configuration that changes this,\n * so the answer is the same for every render.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * Always renders a `<video>`, which can carry a className. There is no\n * configuration that changes this.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'video-host-cloud-name',\n defaultValues: {},\n },\n {\n name: 'video-public-id',\n defaultValues: {},\n },\n {\n name: 'video-selector-3-resolutions',\n defaultValues: {\n all: 'main-sample-video',\n },\n },\n {\n name: 'video-poster-selector-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-controls-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-autoplay-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-loop-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-muted-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-playsinline-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-preload-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-width-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-height-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'video-transformations-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'video-host-cloud-name',\n heading: 'Video Host Cloud Name',\n subHeading: 'Set the media host cloud name for 3 different device resolutions',\n defaultValues: {},\n // Filled by Video Selector / team defaults — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'video-public-id',\n heading: 'Video Public ID',\n subHeading: 'Set the video public ID for 3 different device resolutions',\n defaultValues: {},\n // Filled by Video Selector — not something marketers edit by hand.\n hiddenToUser: true,\n },\n {\n name: 'video-selector-3-resolutions',\n heading: 'Video Selector',\n subHeading: 'Select a video for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'video-poster-selector-3-resolutions',\n heading: 'Poster Image',\n subHeading: 'Select an uploaded image shown before playback; defaults to the video\\'s first frame, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-controls-3-resolutions',\n heading: 'Video Controls',\n subHeading: 'Show the browser playback controls (default \"true\"; set \"false\" for background/ambient video), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-autoplay-3-resolutions',\n heading: 'Video Autoplay',\n subHeading: 'Start playback automatically (browsers require muted \"true\" for autoplay to work), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-loop-3-resolutions',\n heading: 'Video Loop',\n subHeading: 'Restart the video automatically when it ends, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-muted-3-resolutions',\n heading: 'Video Muted',\n subHeading: 'Start with the audio muted (required by browsers for autoplay), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-playsinline-3-resolutions',\n heading: 'Video Plays Inline',\n subHeading: 'Play within the page on mobile instead of forcing fullscreen (default \"true\"), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-preload-3-resolutions',\n heading: 'Video Preload',\n subHeading: 'How much to download before playback: \"none\", \"metadata\" (default) or \"auto\", for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-width-3-resolutions',\n heading: 'Video Intrinsic Width',\n subHeading: 'Set the intrinsic pixel width (with height, reserves layout space before the video loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'pass-through-video-attributes-height-3-resolutions',\n heading: 'Video Intrinsic Height',\n subHeading: 'Set the intrinsic pixel height (with width, reserves layout space before the video loads) for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'video-transformations-3-resolutions',\n heading: 'Video Transformations',\n subHeading: 'Set extra delivery transformations (e.g. \"c_fill,ar_16:9\"); merged over the defaults q_auto,vc_auto,c_limit,w_1920, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RVideoComponent } from './r-video.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rVideo,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RVideoComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import type { IconAttributeValue, IconNode } from '../../../../types';\n\n/**\n * The placeholder a freshly dropped icon shows before the author picks one:\n * Lucide's `shapes`, inlined as a literal.\n *\n * It is a literal rather than a registry lookup on purpose. Nothing on the\n * render path may import `lucide-static` — the default library is registered\n * eagerly by every consumer, so its bundle reaches every customer page.\n * `__tests__/default-attribute-values.test.ts` checks this literal still\n * matches the registry, so a drift shows up as a test failure rather than a\n * placeholder that quietly stops matching the real icon.\n */\nexport const PLACEHOLDER_ICON_NAME = 'shapes';\n\nexport const PLACEHOLDER_ICON_NODE: IconNode = [\n [\n 'path',\n { d: 'M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z' },\n ],\n ['rect', { x: '3', y: '14', width: '7', height: '7', rx: '1' }],\n ['circle', { cx: '17.5', cy: '17.5', r: '3.5' }],\n];\n\nexport const PLACEHOLDER_ICON: IconAttributeValue = {\n name: PLACEHOLDER_ICON_NAME,\n iconNode: PLACEHOLDER_ICON_NODE,\n};\n\nconst isIconNode = (value: unknown): value is IconNode =>\n Array.isArray(value) &&\n value.length > 0 &&\n value.every(\n (entry) =>\n Array.isArray(entry) &&\n entry.length >= 2 &&\n typeof entry[0] === 'string' &&\n entry[1] != null &&\n typeof entry[1] === 'object' &&\n !Array.isArray(entry[1])\n );\n\n/**\n * Read geometry out of a persisted icon attribute.\n *\n * The composer writes `{ name, iconNode }` when the author picks an icon, so\n * every surface renders from the value alone and never needs the registry.\n * Anything else — a bare name string from a hand-edited config, a half-written\n * value — yields null and renders nothing, which is the specified behaviour\n * for an unresolvable icon on a published page.\n */\nexport const resolveIconAttributeValue = (value: unknown): IconNode | null => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n\n const { iconNode } = value as { iconNode?: unknown };\n return isIconNode(iconNode) ? iconNode : null;\n};\n","import { Renderer2 } from '@angular/core';\nimport type { IconNode } from '../../types';\n\n/** Turns persisted Lucide geometry into SVG children on `svg`. */\nexport function appendIconChildren(\n renderer: Renderer2,\n svg: Element,\n iconNode: IconNode\n): void {\n iconNode.forEach(([tag, attributes]) => {\n const child = renderer.createElement(tag, 'svg');\n Object.entries(attributes).forEach(([name, value]) => {\n if (name !== 'key') {\n renderer.setAttribute(child, name, value);\n }\n });\n renderer.appendChild(svg, child);\n });\n}\n","import {\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n} from '@angular/core';\nimport type { IconNode } from '../../types';\nimport { appendIconChildren } from './append-icon-children';\n\n@Component({\n selector: 'rulecms-svg-icon',\n standalone: true,\n template: '',\n host: { style: 'display: contents' },\n})\nexport class SvgIconComponent implements OnChanges {\n @Input({ required: true }) iconNode!: IconNode;\n @Input() width: string | number = 24;\n @Input() height: string | number = 24;\n @Input() className?: string;\n @Input() styleProps?: { [key: string]: any };\n @Input() ariaHidden = true;\n @Input() a11yProps: Record<string, string> = {};\n\n constructor(\n private readonly host: ElementRef<HTMLElement>,\n private readonly renderer: Renderer2\n ) {}\n\n ngOnChanges(): void {\n const el = this.host.nativeElement;\n while (el.firstChild) {\n this.renderer.removeChild(el, el.firstChild);\n }\n const svg = this.renderer.createElement('svg', 'svg');\n this.renderer.setAttribute(svg, 'xmlns', 'http://www.w3.org/2000/svg');\n this.renderer.setAttribute(svg, 'width', String(this.width));\n this.renderer.setAttribute(svg, 'height', String(this.height));\n this.renderer.setAttribute(svg, 'viewBox', '0 0 24 24');\n this.renderer.setAttribute(svg, 'fill', 'none');\n this.renderer.setAttribute(svg, 'stroke', 'currentColor');\n this.renderer.setAttribute(svg, 'stroke-width', '2');\n this.renderer.setAttribute(svg, 'stroke-linecap', 'round');\n this.renderer.setAttribute(svg, 'stroke-linejoin', 'round');\n if (this.className !== undefined) {\n this.renderer.setAttribute(svg, 'class', this.className);\n }\n if (this.styleProps) {\n Object.entries(this.styleProps).forEach(([key, value]) => {\n if (value !== undefined && value !== null && value !== '') {\n this.renderer.setStyle(svg, key, String(value));\n }\n });\n }\n Object.entries(this.a11yProps).forEach(([key, value]) => {\n this.renderer.setAttribute(svg, key, value);\n });\n if (this.ariaHidden && Object.keys(this.a11yProps).length === 0) {\n this.renderer.setAttribute(svg, 'aria-hidden', 'true');\n }\n appendIconChildren(this.renderer, svg, this.iconNode);\n this.renderer.appendChild(el, svg);\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { PLACEHOLDER_ICON_NODE, resolveIconAttributeValue } from './icon-attribute-value';\nimport { SvgIconComponent } from '../../../../shared/icons/svg-icon.component';\n\nconst A11Y_ATTR_KEYS = [\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'role',\n 'title',\n] as const;\n\n@Component({\n selector: 'rulecms-r-icon',\n standalone: true,\n imports: [SvgIconComponent],\n template: `\n @if (iconNode) {\n <rulecms-svg-icon\n [iconNode]=\"iconNode\"\n [className]=\"className\"\n [styleProps]=\"styleProps\"\n [a11yProps]=\"a11yProps\"\n [ariaHidden]=\"!hasA11yProp\"\n />\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RIconComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get iconNode() {\n const value = this.componentAttributes?.['icon-name-3-resolutions'];\n return value == null ? PLACEHOLDER_ICON_NODE : resolveIconAttributeValue(value);\n }\n\n get a11yProps(): Record<string, string> {\n if (!this.componentAttributes) return {};\n const a11yProps: Record<string, string> = {};\n for (const key of A11Y_ATTR_KEYS) {\n const value = this.componentAttributes[key];\n if (typeof value === 'string' && value.length > 0) {\n a11yProps[key] = value;\n }\n }\n return a11yProps;\n }\n\n get hasA11yProp(): boolean {\n return Object.keys(this.a11yProps).length > 0;\n }\n}\n","/**\n * Always renders an `<svg>`, a replaced element that honours sizing, margin\n * and colour (via currentColor) directly, so a wrapper div would only add a\n * redundant element. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * The `<svg>` carries the className. An unresolvable attribute renders no\n * element at all, but that is a data error rather than a different root type,\n * so the configured happy path is what this answers for.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport { PLACEHOLDER_ICON } from './icon-attribute-value';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n // Holds `{ name, iconNode }`, not a bare name: the composer stamps the\n // geometry when the author picks the icon so the render path never needs\n // the icon registry.\n name: 'icon-name-3-resolutions',\n defaultValues: {\n all: PLACEHOLDER_ICON,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport { PLACEHOLDER_ICON } from './icon-attribute-value';\n\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'icon-name-3-resolutions',\n heading: 'Icon',\n subHeading:\n 'Search by name or by what the icon depicts (e.g. \"launch\" finds the rocket), for 3 different device resolutions',\n defaultValues: {\n all: PLACEHOLDER_ICON,\n },\n },\n];\n","import { RIconComponent } from './r-icon.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rIcon,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RIconComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import { parseInlineMarkers } from '../inline-markup/parse-inline-markers';\n\nexport type InlineTextRun = { kind: 'text'; text: string };\nexport type InlineLinkRun = { kind: 'link'; index: number; text: string };\nexport type InlineRun = InlineTextRun | InlineLinkRun;\n\n/**\n * @deprecated Use `parseInlineMarkers` from `shared/inline-markup`.\n *\n * The link-only view of the grammar, kept because it is public API. Markers now\n * also carry marks (`{b|word}`) and line breaks (`{br|}`), which this shape\n * cannot express, so anything that is not a linked span is flattened into text:\n * marked spans contribute their words without the marks, and a break\n * contributes a newline. That is exactly what a caller stripping markers out of\n * a string wants — `resolveAccordionSummary` is the one in this package — and\n * it is wrong for anything that means to render them.\n *\n * Adjacent text is merged, so text with no linked spans is still one run.\n */\nexport function parseInlineLinkMarkers(value: string): InlineRun[] {\n const runs: InlineRun[] = [];\n let pendingText = '';\n\n const flushPendingText = () => {\n if (pendingText !== '') {\n runs.push({ kind: 'text', text: pendingText });\n pendingText = '';\n }\n };\n\n for (const run of parseInlineMarkers(value)) {\n if (run.kind === 'span' && run.index !== undefined) {\n flushPendingText();\n runs.push({ kind: 'link', index: run.index, text: run.text });\n continue;\n }\n pendingText += run.kind === 'break' ? '\\n' : run.text;\n }\n\n flushPendingText();\n\n return runs;\n}\n","/**\n * The preset vocabulary for `r-button`.\n *\n * Three independent axes rather than one flat list of named buttons: five\n * variants times four tones times five sizes is a hundred looks from three\n * short tables, and an author picks each axis without us having to have\n * anticipated the combination.\n *\n * Every preset name here is persisted customer data, exactly like an icon\n * name. A name that has shipped is never deleted or repurposed — add a new\n * one and alias the old one, or published pages change appearance on upgrade.\n */\n\n/** How the button is filled and bordered. */\nexport const BUTTON_VARIANTS = ['solid', 'soft', 'outline', 'ghost', 'link'] as const;\n\n/** Which colour family the variant draws from. */\nexport const BUTTON_TONES = ['brand', 'neutral', 'danger', 'success'] as const;\n\n/** Type scale, padding and control height, smallest to largest. */\nexport const BUTTON_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number];\nexport type ButtonTone = (typeof BUTTON_TONES)[number];\nexport type ButtonSize = (typeof BUTTON_SIZES)[number];\n\nexport type ButtonPreset = {\n variant: ButtonVariant;\n tone: ButtonTone;\n size: ButtonSize;\n};\n\n/**\n * What an unconfigured button looks like. Dropping the component on a canvas\n * and touching nothing must already produce something shippable.\n */\nexport const DEFAULT_BUTTON_PRESET: ButtonPreset = {\n variant: 'solid',\n tone: 'brand',\n size: 'md',\n};\n\nexport const isButtonVariant = (value: unknown): value is ButtonVariant =>\n BUTTON_VARIANTS.includes(value as ButtonVariant);\n\nexport const isButtonTone = (value: unknown): value is ButtonTone =>\n BUTTON_TONES.includes(value as ButtonTone);\n\nexport const isButtonSize = (value: unknown): value is ButtonSize =>\n BUTTON_SIZES.includes(value as ButtonSize);\n\n/**\n * The colour slots a tone fills.\n *\n * `hover` / `active` / `softHover` are consumed by the library stylesheet\n * (`button-library-stylesheet.ts`) via the per-instance fill slots. Changing\n * a tone here is still a palette change, not a delivery change.\n */\nexport type TonePalette = {\n /** Solid fill, and the text colour for outline / ghost / link. */\n base: string;\n hover: string;\n active: string;\n /** Text placed on top of `base`. */\n contrast: string;\n /** Outline border, kept separate so neutral can be lighter than its text. */\n border: string;\n /** Tinted fill for the soft variant. */\n soft: string;\n softHover: string;\n /** Text placed on top of `soft`. */\n softContrast: string;\n};\n\n/**\n * Defaults only. Every one of these reaches the page as the fallback half of a\n * `var(--rulecms-button-…, default)`, so a customer rebrands every button on\n * their site by defining the custom property once, with no per-button edits\n * and no composer access. See `button-css-variables.ts`.\n */\nexport const TONE_PALETTES: Record<ButtonTone, TonePalette> = {\n brand: {\n base: '#2563eb',\n hover: '#1d4ed8',\n active: '#1e40af',\n contrast: '#ffffff',\n border: '#2563eb',\n soft: '#eff6ff',\n softHover: '#dbeafe',\n softContrast: '#1d4ed8',\n },\n neutral: {\n base: '#334155',\n hover: '#1e293b',\n active: '#0f172a',\n contrast: '#ffffff',\n // Deliberately lighter than `base`: a secondary button whose border matches\n // its dark label text reads as heavy as a primary one.\n border: '#cbd5e1',\n soft: '#f1f5f9',\n softHover: '#e2e8f0',\n softContrast: '#334155',\n },\n danger: {\n base: '#dc2626',\n hover: '#b91c1c',\n active: '#991b1b',\n contrast: '#ffffff',\n border: '#dc2626',\n soft: '#fef2f2',\n softHover: '#fee2e2',\n softContrast: '#b91c1c',\n },\n success: {\n base: '#16a34a',\n hover: '#15803d',\n active: '#166534',\n contrast: '#ffffff',\n border: '#16a34a',\n soft: '#f0fdf4',\n softHover: '#dcfce7',\n softContrast: '#15803d',\n },\n};\n\nexport type SizeScale = {\n fontSize: string;\n /** Floor for the control height. WCAG 2.2 AA wants at least 24px. */\n minHeight: string;\n paddingInline: string;\n paddingBlock: string;\n borderRadius: string;\n /** Space between an icon and the label. */\n gap: string;\n};\n\nexport const SIZE_SCALES: Record<ButtonSize, SizeScale> = {\n xs: {\n fontSize: '12px',\n minHeight: '28px',\n paddingInline: '10px',\n paddingBlock: '4px',\n borderRadius: '4px',\n gap: '4px',\n },\n sm: {\n fontSize: '14px',\n minHeight: '34px',\n paddingInline: '12px',\n paddingBlock: '6px',\n borderRadius: '6px',\n gap: '6px',\n },\n md: {\n fontSize: '16px',\n minHeight: '40px',\n paddingInline: '16px',\n paddingBlock: '8px',\n borderRadius: '8px',\n gap: '8px',\n },\n lg: {\n fontSize: '18px',\n minHeight: '48px',\n paddingInline: '20px',\n paddingBlock: '10px',\n borderRadius: '10px',\n gap: '8px',\n },\n xl: {\n fontSize: '20px',\n minHeight: '56px',\n paddingInline: '24px',\n paddingBlock: '12px',\n borderRadius: '12px',\n gap: '10px',\n },\n};\n","import type { ButtonTone } from './button-presets';\n\n/**\n * Every colour a preset emits goes out as `var(--rulecms-button-…, default)`.\n *\n * This is the whole white-label story for buttons. A customer who sets\n *\n * :root { --rulecms-button-brand: #c8102e; }\n *\n * once in their own stylesheet rebrands every RuleCMS button on the site,\n * without touching a widget, without composer access, and without us shipping\n * a theme provider or a design system to their page. Authors who want one\n * button to differ still override it per column, as before.\n */\nexport const BUTTON_CSS_VARIABLE_PREFIX = '--rulecms-button';\n\n/**\n * Per-instance slots the library stylesheet reads. The preset writes these on\n * the element; a column `backgroundColor` rewrite and a future widget-level\n * token both land on the same names.\n */\nexport const BUTTON_FILL_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-fill`;\nexport const BUTTON_FILL_HOVER_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-fill-hover`;\nexport const BUTTON_FILL_ACTIVE_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-fill-active`;\nexport const BUTTON_INK_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-ink`;\nexport const BUTTON_INK_HOVER_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-ink-hover`;\nexport const BUTTON_BORDER_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-border`;\nexport const BUTTON_RING_VARIABLE = `${BUTTON_CSS_VARIABLE_PREFIX}-ring`;\n\n/**\n * The suffixes on a tone's custom properties. `''` is the tone's main colour,\n * e.g. `--rulecms-button-brand`.\n */\nexport type ToneVariableSlot =\n | ''\n | 'hover'\n | 'active'\n | 'contrast'\n | 'border'\n | 'soft'\n | 'soft-hover'\n | 'soft-contrast';\n\nexport const toneCssVariable = (tone: ButtonTone, slot: ToneVariableSlot = ''): string =>\n slot === ''\n ? `${BUTTON_CSS_VARIABLE_PREFIX}-${tone}`\n : `${BUTTON_CSS_VARIABLE_PREFIX}-${tone}-${slot}`;\n\n/**\n * A `var()` reference carrying our default as the fallback, so the button is\n * fully styled whether or not the host defines anything.\n */\nexport const cssVarWithFallback = (variableName: string, fallback: string): string =>\n `var(${variableName}, ${fallback})`;\n\n/** Shorthand for the common case: one tone slot with its palette default. */\nexport const toneColor = (\n tone: ButtonTone,\n slot: ToneVariableSlot,\n fallback: string\n): string => cssVarWithFallback(toneCssVariable(tone, slot), fallback);\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport { SIZE_SCALES, TONE_PALETTES } from './button-presets';\nimport type { ButtonPreset, ButtonTone } from './button-presets';\nimport {\n BUTTON_BORDER_VARIABLE,\n BUTTON_FILL_ACTIVE_VARIABLE,\n BUTTON_FILL_HOVER_VARIABLE,\n BUTTON_FILL_VARIABLE,\n BUTTON_INK_HOVER_VARIABLE,\n BUTTON_INK_VARIABLE,\n BUTTON_RING_VARIABLE,\n toneColor,\n} from './button-css-variables';\n\nconst asVars = (vars: Record<string, string>): CSSProperties => vars as CSSProperties;\n\n/**\n * The rules that stop a native `<button>` looking like a native `<button>`.\n *\n * Two of these do most of the work. `appearance: none` removes the platform\n * chrome iOS Safari still paints on form controls, and `fontFamily: inherit`\n * opts out of the browser's refusal to inherit typography into form controls —\n * which is the single biggest reason an unstyled button looks foreign on a\n * designed page. Inheriting means the button picks up the customer's brand\n * typeface with no configuration at all.\n */\nconst structuralStyles: CSSProperties = {\n appearance: 'none',\n WebkitAppearance: 'none',\n boxSizing: 'border-box',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n textDecoration: 'none',\n cursor: 'pointer',\n userSelect: 'none',\n WebkitUserSelect: 'none',\n verticalAlign: 'middle',\n borderStyle: 'solid',\n fontFamily: 'inherit',\n fontWeight: 600,\n lineHeight: 1.25,\n // Eases the library stylesheet's :hover / :active colour change.\n transition: 'background-color 150ms ease, border-color 150ms ease, color 150ms ease',\n};\n\nconst sizeStyles = (preset: ButtonPreset): CSSProperties => {\n const scale = SIZE_SCALES[preset.size];\n return {\n fontSize: scale.fontSize,\n minHeight: scale.minHeight,\n // Logical properties so a right-to-left page mirrors correctly.\n paddingInline: scale.paddingInline,\n paddingBlock: scale.paddingBlock,\n borderRadius: scale.borderRadius,\n gap: scale.gap,\n };\n};\n\n/**\n * Every variant keeps a 1px border, transparent where it is not wanted, so\n * switching preset never changes the button's box and never nudges the layout\n * around it.\n */\nconst variantStyles = (preset: ButtonPreset): CSSProperties => {\n const palette = TONE_PALETTES[preset.tone];\n const tone: ButtonTone = preset.tone;\n\n switch (preset.variant) {\n case 'solid':\n return {\n borderWidth: '1px',\n backgroundColor: toneColor(tone, '', palette.base),\n borderColor: toneColor(tone, '', palette.base),\n color: toneColor(tone, 'contrast', palette.contrast),\n };\n case 'soft':\n return {\n borderWidth: '1px',\n backgroundColor: toneColor(tone, 'soft', palette.soft),\n borderColor: 'transparent',\n color: toneColor(tone, 'soft-contrast', palette.softContrast),\n };\n case 'outline':\n return {\n borderWidth: '1px',\n backgroundColor: 'transparent',\n borderColor: toneColor(tone, 'border', palette.border),\n color: toneColor(tone, '', palette.base),\n };\n case 'ghost':\n return {\n borderWidth: '1px',\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: toneColor(tone, '', palette.base),\n };\n case 'link':\n default:\n // Reads as prose, not as a control: the size scale's box is stripped\n // back off so it can sit in a sentence without a padded hit area.\n return {\n borderWidth: 0,\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: toneColor(tone, '', palette.base),\n minHeight: 0,\n paddingInline: 0,\n paddingBlock: 0,\n borderRadius: 0,\n textDecoration: 'underline',\n textUnderlineOffset: '0.2em',\n };\n }\n};\n\n/**\n * Per-instance colour slots the library stylesheet reads. Tone tokens stay\n * in the `var(--rulecms-button-brand, fallback)` form so a host `:root`\n * rebrand still wins.\n */\nconst variantCssVariables = (preset: ButtonPreset): CSSProperties => {\n const palette = TONE_PALETTES[preset.tone];\n const tone: ButtonTone = preset.tone;\n const ink = toneColor(tone, '', palette.base);\n const inkHover = toneColor(tone, 'hover', palette.hover);\n const contrast = toneColor(tone, 'contrast', palette.contrast);\n\n switch (preset.variant) {\n case 'solid':\n return asVars({\n [BUTTON_FILL_VARIABLE]: toneColor(tone, '', palette.base),\n [BUTTON_FILL_HOVER_VARIABLE]: toneColor(tone, 'hover', palette.hover),\n [BUTTON_FILL_ACTIVE_VARIABLE]: toneColor(tone, 'active', palette.active),\n [BUTTON_INK_VARIABLE]: contrast,\n [BUTTON_INK_HOVER_VARIABLE]: contrast,\n [BUTTON_BORDER_VARIABLE]: toneColor(tone, '', palette.base),\n [BUTTON_RING_VARIABLE]: ink,\n });\n case 'soft':\n return asVars({\n [BUTTON_FILL_VARIABLE]: toneColor(tone, 'soft', palette.soft),\n [BUTTON_FILL_HOVER_VARIABLE]: toneColor(tone, 'soft-hover', palette.softHover),\n [BUTTON_FILL_ACTIVE_VARIABLE]: `color-mix(in srgb, ${toneColor(tone, 'soft-hover', palette.softHover)} 88%, black)`,\n [BUTTON_INK_VARIABLE]: toneColor(tone, 'soft-contrast', palette.softContrast),\n [BUTTON_INK_HOVER_VARIABLE]: toneColor(tone, 'soft-contrast', palette.softContrast),\n [BUTTON_BORDER_VARIABLE]: 'transparent',\n [BUTTON_RING_VARIABLE]: ink,\n });\n case 'outline':\n return asVars({\n [BUTTON_FILL_VARIABLE]: 'transparent',\n [BUTTON_FILL_HOVER_VARIABLE]: toneColor(tone, 'soft', palette.soft),\n [BUTTON_FILL_ACTIVE_VARIABLE]: toneColor(tone, 'soft-hover', palette.softHover),\n [BUTTON_INK_VARIABLE]: ink,\n [BUTTON_INK_HOVER_VARIABLE]: inkHover,\n [BUTTON_BORDER_VARIABLE]: toneColor(tone, 'border', palette.border),\n [BUTTON_RING_VARIABLE]: ink,\n });\n case 'ghost':\n return asVars({\n [BUTTON_FILL_VARIABLE]: 'transparent',\n [BUTTON_FILL_HOVER_VARIABLE]: toneColor(tone, 'soft', palette.soft),\n [BUTTON_FILL_ACTIVE_VARIABLE]: toneColor(tone, 'soft-hover', palette.softHover),\n [BUTTON_INK_VARIABLE]: ink,\n [BUTTON_INK_HOVER_VARIABLE]: inkHover,\n [BUTTON_BORDER_VARIABLE]: 'transparent',\n [BUTTON_RING_VARIABLE]: ink,\n });\n case 'link':\n default:\n return asVars({\n [BUTTON_FILL_VARIABLE]: 'transparent',\n [BUTTON_FILL_HOVER_VARIABLE]: 'transparent',\n [BUTTON_FILL_ACTIVE_VARIABLE]: 'transparent',\n [BUTTON_INK_VARIABLE]: ink,\n [BUTTON_INK_HOVER_VARIABLE]: inkHover,\n [BUTTON_BORDER_VARIABLE]: 'transparent',\n [BUTTON_RING_VARIABLE]: ink,\n });\n }\n};\n\nconst COLOR_STYLE_KEYS = ['backgroundColor', 'color', 'borderColor'] as const;\n\n/**\n * The preset's contribution to the button's inline style, including resting\n * colours as real CSS properties. The composer picker uses this so a swatch\n * looks right without the library stylesheet.\n *\n * Callers spread column `styleProps` *after* this, which is what makes the\n * preset a set of defaults rather than a set of rules: anything the author\n * touched in Column Styles lands later in the object and wins.\n */\nexport function buildButtonPresetStyles(preset: ButtonPreset): CSSProperties {\n return {\n ...structuralStyles,\n ...sizeStyles(preset),\n ...variantStyles(preset),\n ...variantCssVariables(preset),\n };\n}\n\n/**\n * What `RButton` puts on the element. Same as the picker styles, minus the\n * colour properties the library stylesheet owns — those stay on the element\n * only as custom properties so `:hover` can change them.\n */\nexport function buildButtonRenderStyles(preset: ButtonPreset): CSSProperties {\n const styles = { ...buildButtonPresetStyles(preset) };\n for (const key of COLOR_STYLE_KEYS) {\n delete styles[key];\n }\n return styles;\n}\n\n/**\n * Column styles still win on everything except `backgroundColor`, which is\n * remapped onto the fill slots so hover/active follow the authored colour\n * instead of the preset's blue-family hover.\n */\nexport function applyButtonColumnStyles(\n styleProps?: CSSProperties | { [key: string]: unknown }\n): CSSProperties {\n if (!styleProps) {\n return {};\n }\n const { backgroundColor, ...rest } = styleProps as CSSProperties & {\n backgroundColor?: string;\n };\n if (backgroundColor === undefined || backgroundColor === '') {\n return rest;\n }\n return {\n ...rest,\n ...asVars({\n [BUTTON_FILL_VARIABLE]: backgroundColor,\n [BUTTON_FILL_HOVER_VARIABLE]: `color-mix(in srgb, ${backgroundColor} 82%, black)`,\n [BUTTON_FILL_ACTIVE_VARIABLE]: `color-mix(in srgb, ${backgroundColor} 70%, black)`,\n }),\n };\n}\n\n/** Applied on top when the button is disabled, before column styles. */\nexport const disabledStyles: CSSProperties = {\n opacity: 0.5,\n cursor: 'not-allowed',\n};\n","import type { WidgetInstanceProps } from '../../../../types';\n\n/** The only key `r-button` reads out of the host's per-instance props. */\nexport const BUTTON_CLICK_HANDLER_PROP = 'onClick';\n\nexport type ButtonClickHandler = (event: Event) => void;\n\n/**\n * The host's click handler for this instance, or `undefined` when there is\n * nothing to attach.\n *\n * Two reasons to answer `undefined` even when the host supplied something:\n *\n * - **Disabled wins.** A disabled plain `<button>` is inert natively, but a\n * disabled *linked* button renders `<a role=\"link\" aria-disabled=\"true\">`,\n * which has no native inertness at all — a handler left on it would fire on\n * every click and make \"disabled\" a lie.\n * - **The bag is untyped.** It crosses a package boundary as\n * `{ [key: string]: any }`, so a host that passes a string here should get a\n * button that does nothing rather than a React crash on the customer's page.\n */\nexport const resolveButtonClickHandler = ({\n widgetInstanceProps,\n disabled,\n}: {\n widgetInstanceProps?: WidgetInstanceProps;\n disabled: boolean;\n}): ButtonClickHandler | undefined => {\n if (disabled) {\n return undefined;\n }\n const handler = widgetInstanceProps?.[BUTTON_CLICK_HANDLER_PROP];\n return typeof handler === 'function' ? (handler as ButtonClickHandler) : undefined;\n};\n","import {\n DEFAULT_BUTTON_PRESET,\n isButtonSize,\n isButtonTone,\n isButtonVariant,\n} from './button-presets';\nimport type { ButtonPreset } from './button-presets';\n\n/**\n * Turns whatever the composer stored into a complete preset.\n *\n * Tolerant on every axis independently: a value saved by a newer composer, a\n * half-written object, or an outright wrong type costs that one axis and\n * nothing else. A published page must never fail to render a button because\n * one field went stale.\n */\nexport function resolveButtonPreset(value: unknown): ButtonPreset {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return DEFAULT_BUTTON_PRESET;\n }\n\n const candidate = value as Partial<Record<keyof ButtonPreset, unknown>>;\n\n return {\n variant: isButtonVariant(candidate.variant)\n ? candidate.variant\n : DEFAULT_BUTTON_PRESET.variant,\n tone: isButtonTone(candidate.tone) ? candidate.tone : DEFAULT_BUTTON_PRESET.tone,\n size: isButtonSize(candidate.size) ? candidate.size : DEFAULT_BUTTON_PRESET.size,\n };\n}\n","/**\n * The attribute names `r-button` reads.\n *\n * Every one is button-specific, including the label and the icon, which are\n * conceptually the same thing `r-text` and `r-icon` already offer. Sharing\n * their attribute names would have saved two lines of editor wiring and cost\n * the documentation contract: RuleCMS publishes one page per component-scope\n * attribute and requires exactly one owning component, so a shared name has\n * no single page to link to from the drawer.\n *\n * Reuse happens a level down instead. The composer resolves an attribute to\n * an *editor* by name, and several names already share one editor, so these\n * point at the existing text field and the existing Lucide picker without\n * either component having to give up ownership of its own settings.\n *\n * Nothing here duplicates a column style attribute. Colour, border, radius,\n * spacing and width already have editors that write into the same bag, and a\n * second way to set the same CSS property would only create a question about\n * which one wins.\n */\nexport const BUTTON_PRESET_ATTRIBUTE = 'button-preset-3-resolutions';\nexport const BUTTON_LABEL_ATTRIBUTE = 'button-label-3-resolutions';\nexport const BUTTON_LINK_ATTRIBUTE = 'button-link-3-resolutions';\nexport const BUTTON_DISABLED_ATTRIBUTE = 'button-disabled-3-resolutions';\nexport const BUTTON_ICON_ATTRIBUTE = 'button-icon-3-resolutions';\nexport const BUTTON_ICON_POSITION_ATTRIBUTE = 'button-icon-position-3-resolutions';\nexport const BUTTON_ARIA_LABEL_ATTRIBUTE = 'aria-label';\n\n/** What a freshly dropped button says before the author types anything. */\nexport const DEFAULT_BUTTON_LABEL = 'Button';\n\nexport const ICON_POSITIONS = ['leading', 'trailing'] as const;\nexport type IconPosition = (typeof ICON_POSITIONS)[number];\n\nexport const DEFAULT_ICON_POSITION: IconPosition = 'leading';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * An unset label falls back to the placeholder, but a label the author\n * deliberately cleared stays cleared — that is how an icon-only button is\n * made, so an empty string cannot be treated as \"nothing set\".\n */\nexport const resolveButtonLabel = (componentAttributes: Attributes): string => {\n const value = componentAttributes?.[BUTTON_LABEL_ATTRIBUTE];\n if (value === undefined || value === null) {\n return DEFAULT_BUTTON_LABEL;\n }\n return typeof value === 'string' ? value : String(value);\n};\n\n/**\n * Select editors in the composer store `'true'` / `'false'` as strings, while\n * a hand-written or migrated config may carry a real boolean. Both mean the\n * same thing here.\n */\nexport const resolveButtonDisabled = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[BUTTON_DISABLED_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n\nexport const resolveIconPosition = (componentAttributes: Attributes): IconPosition => {\n const value = componentAttributes?.[BUTTON_ICON_POSITION_ATTRIBUTE];\n return value === 'trailing' ? 'trailing' : DEFAULT_ICON_POSITION;\n};\n\nexport const resolveButtonAriaLabel = (componentAttributes: Attributes): string | undefined => {\n const value = componentAttributes?.[BUTTON_ARIA_LABEL_ATTRIBUTE];\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed === '' ? undefined : trimmed;\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { resolveLinkAttributes } from '../../../../shared/links';\nimport { SvgIconComponent } from '../../../../shared/icons/svg-icon.component';\nimport type { IconNode, WidgetInstanceProps } from '../../../../types';\nimport { resolveIconAttributeValue } from '../r-icon/icon-attribute-value';\nimport {\n applyButtonColumnStyles,\n buildButtonRenderStyles,\n disabledStyles,\n} from './button-preset-styles';\nimport { resolveButtonClickHandler } from './button-instance-props';\nimport { resolveButtonPreset } from './resolve-button-preset';\nimport {\n BUTTON_ICON_ATTRIBUTE,\n BUTTON_LINK_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n resolveButtonAriaLabel,\n resolveButtonDisabled,\n resolveButtonLabel,\n resolveIconPosition,\n} from './button-attributes';\n\n@Component({\n selector: 'rulecms-r-button',\n standalone: true,\n imports: [NgStyle, SvgIconComponent],\n template: `\n @if (link && disabled) {\n <a\n data-rulecms-button\n [attr.data-rulecms-button-variant]=\"preset.variant\"\n [attr.data-rulecms-button-tone]=\"preset.tone\"\n [ngStyle]=\"style\"\n [class]=\"className || undefined\"\n role=\"link\"\n aria-disabled=\"true\"\n [attr.aria-label]=\"ariaLabel\"\n >\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </a>\n } @else if (link) {\n <a\n data-rulecms-button\n [attr.data-rulecms-button-variant]=\"preset.variant\"\n [attr.data-rulecms-button-tone]=\"preset.tone\"\n [attr.href]=\"link.href\"\n [attr.target]=\"link.target\"\n [attr.rel]=\"link.rel\"\n [attr.title]=\"link.title\"\n [attr.aria-label]=\"link['aria-label'] ?? ariaLabel\"\n [attr.download]=\"link.download === true ? '' : link.download\"\n [attr.hreflang]=\"link.hrefLang\"\n [attr.referrerpolicy]=\"link.referrerPolicy\"\n [ngStyle]=\"style\"\n [class]=\"className || undefined\"\n (click)=\"handleClick($event)\"\n >\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-rulecms-button\n [attr.data-rulecms-button-variant]=\"preset.variant\"\n [attr.data-rulecms-button-tone]=\"preset.tone\"\n [disabled]=\"disabled\"\n [ngStyle]=\"style\"\n [class]=\"className || undefined\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"handleClick($event)\"\n >\n @if (iconNode && iconPosition !== 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n {{ label }}\n @if (iconNode && iconPosition === 'trailing') {\n <rulecms-svg-icon [iconNode]=\"iconNode\" width=\"1em\" height=\"1em\" [styleProps]=\"{ flexShrink: 0 }\" />\n }\n </button>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RButtonComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n @Input() widgetInstanceProps?: WidgetInstanceProps;\n\n get preset() {\n return resolveButtonPreset(this.componentAttributes?.[BUTTON_PRESET_ATTRIBUTE]);\n }\n get disabled() {\n return resolveButtonDisabled(this.componentAttributes);\n }\n get style() {\n return {\n ...buildButtonRenderStyles(this.preset),\n ...(this.disabled ? disabledStyles : {}),\n ...applyButtonColumnStyles(this.styleProps),\n };\n }\n get label() {\n return resolveButtonLabel(this.componentAttributes);\n }\n get ariaLabel() {\n return resolveButtonAriaLabel(this.componentAttributes);\n }\n get link() {\n return resolveLinkAttributes(this.componentAttributes?.[BUTTON_LINK_ATTRIBUTE]);\n }\n get iconNode(): IconNode | null {\n return resolveIconAttributeValue(this.componentAttributes?.[BUTTON_ICON_ATTRIBUTE]);\n }\n get iconPosition() {\n return resolveIconPosition(this.componentAttributes);\n }\n\n handleClick(event: Event): void {\n const onClick = resolveButtonClickHandler({\n widgetInstanceProps: this.widgetInstanceProps,\n disabled: this.disabled,\n });\n onClick?.(event);\n }\n}\n","/**\n * Always renders a `<button>` or an `<a>`, both of which take padding, border,\n * background and sizing directly. A wrapper div would add an element that does\n * nothing, and would put the column's background behind the button rather than\n * on it. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * There is always a root element to carry the class: the button is the\n * component, so no configuration leaves it without one.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport { DEFAULT_BUTTON_PRESET } from './button-presets';\nimport {\n BUTTON_LABEL_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n DEFAULT_BUTTON_LABEL,\n} from './button-attributes';\n\n/**\n * Seeds the button's own semantics only.\n *\n * No style attribute may be seeded here, and the omission is load-bearing\n * rather than an oversight. Defaults are merged into the column's attribute\n * bag before styles are computed, so a seeded `border-radius-3-resolutions`\n * would be present on every button and would override the preset's radius\n * forever — the preset would appear to have no effect on anything a default\n * happened to cover. Leaving the bag empty is what lets \"unset means preset\"\n * be true.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: BUTTON_PRESET_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_BUTTON_PRESET,\n },\n },\n {\n name: BUTTON_LABEL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_BUTTON_LABEL,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport { DEFAULT_BUTTON_PRESET } from './button-presets';\nimport {\n BUTTON_DISABLED_ATTRIBUTE,\n BUTTON_ICON_ATTRIBUTE,\n BUTTON_ICON_POSITION_ATTRIBUTE,\n BUTTON_LABEL_ATTRIBUTE,\n BUTTON_LINK_ATTRIBUTE,\n BUTTON_PRESET_ATTRIBUTE,\n DEFAULT_ICON_POSITION,\n} from './button-attributes';\n\n/**\n * Every setting the button offers, in the order the Modify drawer shows them:\n * how it looks, what it says, where it goes, then the two refinements most\n * buttons never need.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: BUTTON_PRESET_ATTRIBUTE,\n heading: 'Button Style',\n subHeading:\n 'Variant, tone and size. Sets how the button looks when Column Styles leave it alone — anything set there wins, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_BUTTON_PRESET },\n },\n {\n name: BUTTON_LABEL_ATTRIBUTE,\n heading: 'Label',\n subHeading: 'Text shown on the button. Clear it for an icon-only button',\n defaultValues: {},\n },\n {\n name: BUTTON_LINK_ATTRIBUTE,\n heading: 'Link',\n subHeading:\n 'Where the button goes. Setting it renders an anchor styled as a button; leaving it empty renders a plain button, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: BUTTON_ICON_ATTRIBUTE,\n heading: 'Icon',\n subHeading:\n 'Optional icon shown beside the label. Search by name or by what the icon depicts (e.g. \"launch\" finds the rocket), for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: BUTTON_ICON_POSITION_ATTRIBUTE,\n heading: 'Icon Position',\n subHeading: 'Whether the icon sits before or after the label',\n defaultValues: { all: DEFAULT_ICON_POSITION },\n },\n {\n name: BUTTON_DISABLED_ATTRIBUTE,\n heading: 'Disabled',\n subHeading: 'Renders the button dimmed and non-interactive',\n defaultValues: {},\n },\n];\n","import { RButtonComponent } from './r-button.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rButton,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RButtonComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-divider` reads.\n *\n * There are two, and the list is short on purpose. A divider is a line, and a\n * line has four things about it worth setting: how thick it is, whether it is\n * broken up, what colour it is, and how far across the column it runs. Only\n * the first two are here.\n *\n * Colour and width are missing because they already exist. The line is drawn\n * in `currentColor`, so Text Color on the column sets it the same way it sets\n * the colour of an icon, and the element is the column's own box, so Width on\n * the column shortens it. Offering a second control for either would only\n * raise the question of which one wins — the same reasoning that keeps colour\n * and border off `r-button`.\n *\n * Both remaining attributes are closed sets rather than free text, which is\n * what lets them go through the composer's shared select and lets the render\n * path treat anything unrecognised as unset. A stored value reaches a CSS\n * property here, so an allowlist is the boundary that keeps it from being\n * whatever a request happened to write.\n */\nexport const DIVIDER_STYLE_ATTRIBUTE = 'divider-style-3-resolutions';\nexport const DIVIDER_THICKNESS_ATTRIBUTE = 'divider-thickness-3-resolutions';\n\nexport const DIVIDER_STYLES = ['solid', 'dashed', 'dotted'] as const;\nexport type DividerStyle = (typeof DIVIDER_STYLES)[number];\nexport const DEFAULT_DIVIDER_STYLE: DividerStyle = 'solid';\n\n/**\n * Weights rather than a free measurement. Anything under a pixel disappears on\n * a low-density screen and anything much over eight reads as a band rather\n * than a rule, so the useful range is small enough to offer whole.\n */\nexport const DIVIDER_THICKNESSES = ['1px', '2px', '3px', '4px', '8px'] as const;\nexport type DividerThickness = (typeof DIVIDER_THICKNESSES)[number];\nexport const DEFAULT_DIVIDER_THICKNESS: DividerThickness = '1px';\n\ntype Attributes = { [key: string]: any } | undefined;\n\nexport const resolveDividerStyle = (componentAttributes: Attributes): DividerStyle => {\n const value = componentAttributes?.[DIVIDER_STYLE_ATTRIBUTE];\n return DIVIDER_STYLES.includes(value) ? value : DEFAULT_DIVIDER_STYLE;\n};\n\nexport const resolveDividerThickness = (componentAttributes: Attributes): DividerThickness => {\n const value = componentAttributes?.[DIVIDER_THICKNESS_ATTRIBUTE];\n return DIVIDER_THICKNESSES.includes(value) ? value : DEFAULT_DIVIDER_THICKNESS;\n};\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport { resolveDividerStyle, resolveDividerThickness } from './divider-attributes';\n\n/**\n * The rules that stop a host page's CSS reset having an opinion about the line.\n *\n * Every popular reset has already decided what an `<hr>` looks like, and they\n * disagree: Bootstrap draws one at a quarter opacity, older versions paint it\n * as a background bar with no border at all, browsers with no reset at all\n * still paint the inset 3D groove from the days of Netscape. A widget is\n * dropped into a page whose stylesheet it has never seen, so the only line\n * that renders the same everywhere is one whose box is stated outright.\n *\n * These are inline styles, so they win against anything the host declares —\n * and column styles are spread over them afterwards, so they lose to anything\n * the author sets.\n */\nconst hostResetStyles: CSSProperties = {\n boxSizing: 'border-box',\n // The line is the top border. The element itself has no content, and the\n // other three sides are what the browser's own inset groove is made of.\n height: 0,\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n backgroundColor: 'transparent',\n opacity: 1,\n // Spacing around a divider belongs to the row's gap and the column's margin,\n // the same as it does for every other component. Zero here is a decision,\n // not an omission: the alternative is spacing that depends on which reset\n // the host page happens to load.\n marginBlock: 0,\n // Only visible once the author narrows the column: an inset rule centres\n // rather than hugging the left edge, which is what a shortened divider is\n // almost always for.\n marginInline: 'auto',\n};\n\n/**\n * The divider's contribution to its own inline style.\n *\n * Written entirely in per-side longhands. Column styles arrive as the\n * all-sides `borderWidth` / `borderStyle` / `borderColor` — different keys,\n * which is what matters: spread later they are appended after these rather\n * than replacing them in place, so an author who sets Border on the column\n * gets a border and not a silent no-op.\n */\nexport function buildDividerStyles(componentAttributes?: {\n [key: string]: any;\n}): CSSProperties {\n return {\n ...hostResetStyles,\n borderTopStyle: resolveDividerStyle(componentAttributes),\n borderTopWidth: resolveDividerThickness(componentAttributes),\n // Inherited, so Text Color on the column colours the line — and a column\n // that says nothing gets a rule in the same ink as the words around it.\n borderTopColor: 'currentColor',\n };\n}\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { buildDividerStyles } from './divider-styles';\n\n@Component({\n selector: 'rulecms-r-divider',\n standalone: true,\n imports: [NgStyle],\n template: `<hr [ngStyle]=\"style\" [class]=\"className || undefined\" />`,\n host: { style: 'display: contents' },\n})\nexport class RDividerComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get style() {\n return {\n ...buildDividerStyles(this.componentAttributes),\n ...this.styleProps,\n };\n }\n}\n","/**\n * Always renders an `<hr>`, a block-level element that holds margin, padding,\n * width and border on itself, so a wrapper div would only add a redundant\n * element. No configuration changes that.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * The `<hr>` carries the className. There is always exactly one element and it\n * is always the root, so there is nothing for this to depend on.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import type { DefaultAttributeValue } from '../../../../types';\nimport {\n DEFAULT_DIVIDER_STYLE,\n DEFAULT_DIVIDER_THICKNESS,\n DIVIDER_STYLE_ATTRIBUTE,\n DIVIDER_THICKNESS_ATTRIBUTE,\n} from './divider-attributes';\n\n/**\n * Seeds the divider's own two settings so the drawer opens on the values a\n * fresh divider is already drawn with, rather than on two empty pickers.\n *\n * Seeding them is safe here in a way it would not be for `r-button`: these\n * names are the divider's own, so nothing in Column Styles writes to them and\n * a seeded value can never shadow a style the author set.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: DIVIDER_STYLE_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_DIVIDER_STYLE,\n },\n },\n {\n name: DIVIDER_THICKNESS_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_DIVIDER_THICKNESS,\n },\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n DEFAULT_DIVIDER_STYLE,\n DEFAULT_DIVIDER_THICKNESS,\n DIVIDER_STYLE_ATTRIBUTE,\n DIVIDER_THICKNESS_ATTRIBUTE,\n} from './divider-attributes';\n\n/**\n * Both settings the divider offers, in the order the Modify drawer shows them.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: DIVIDER_STYLE_ATTRIBUTE,\n heading: 'Line Style',\n subHeading:\n 'Whether the rule is unbroken or broken up. Colour comes from Text Color on the column, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_DIVIDER_STYLE },\n },\n {\n name: DIVIDER_THICKNESS_ATTRIBUTE,\n heading: 'Thickness',\n subHeading: 'How heavy the rule is, from a hairline to a band',\n defaultValues: { all: DEFAULT_DIVIDER_THICKNESS },\n },\n];\n","import { RDividerComponent } from './r-divider.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rDivider,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RDividerComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-embed` reads.\n *\n * Four, and the shortest list that still produces a usable embed: what to\n * frame, what to call it, what shape it is, and whether it loads before the\n * visitor scrolls to it.\n *\n * There is no provider attribute. The provider is derived from the URL, so\n * pasting is the whole interaction and an author cannot pick YouTube and then\n * paste a Vimeo link. There is no width, colour, border or radius either —\n * those are column settings, and a second route to the same CSS property only\n * raises the question of which one is in force.\n *\n * Nothing here can influence the frame's privileges. `sandbox`, `allow` and\n * `referrerpolicy` are fixed per provider in `embed-providers.ts` and are not\n * attributes at all, which is also why this component deliberately has no\n * `pass-through-embed-attributes-*` convention.\n */\nexport const EMBED_URL_ATTRIBUTE = 'embed-url-3-resolutions';\nexport const EMBED_TITLE_ATTRIBUTE = 'embed-title-3-resolutions';\nexport const EMBED_ASPECT_RATIO_ATTRIBUTE = 'embed-aspect-ratio-3-resolutions';\nexport const EMBED_LOADING_ATTRIBUTE = 'embed-loading-3-resolutions';\n\n/**\n * Shapes rather than dimensions. An iframe has no intrinsic size to preserve,\n * so something has to state the proportion or the box collapses to the\n * browser's 300×150 default — and a ratio does it without the author having to\n * work out a height for every screen width.\n *\n * `none` is the escape hatch for content that has no natural shape, a booking\n * form being the obvious one. It is the only value that hands sizing back to\n * the column's Height setting.\n */\nexport const EMBED_ASPECT_RATIOS = ['16:9', '4:3', '1:1', '9:16', '21:9', 'none'] as const;\nexport type EmbedAspectRatio = (typeof EMBED_ASPECT_RATIOS)[number];\n\n/**\n * What an unshaped embed is tall by default. Applied by the component rather\n * than seeded onto the column, so the column's Height still overrides it and\n * clearing that returns the embed to a height that works — the same\n * \"unset means the component's default\" arrangement `r-button` uses for its\n * preset. Sized for a Calendly month view, which is the content that needs it.\n */\nexport const EMBED_UNSHAPED_HEIGHT = '700px';\n\nexport const EMBED_LOADING_VALUES = ['lazy', 'eager'] as const;\nexport type EmbedLoading = (typeof EMBED_LOADING_VALUES)[number];\n\n/**\n * Lazy by default. An embed is a whole third-party document — for YouTube,\n * comfortably more than the rest of the page around it — and most of them sit\n * below the fold. `eager` exists for the ones that do not.\n */\nexport const DEFAULT_EMBED_LOADING: EmbedLoading = 'lazy';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * The aspect ratio, or `undefined` when the author has not chosen one and the\n * provider's own default should apply. Anything unrecognised is treated as\n * unset rather than passed through: this value reaches a CSS property.\n */\nexport const resolveEmbedAspectRatio = (\n componentAttributes: Attributes\n): EmbedAspectRatio | undefined => {\n const value = componentAttributes?.[EMBED_ASPECT_RATIO_ATTRIBUTE];\n return EMBED_ASPECT_RATIOS.includes(value) ? value : undefined;\n};\n\nexport const resolveEmbedLoading = (componentAttributes: Attributes): EmbedLoading => {\n const value = componentAttributes?.[EMBED_LOADING_ATTRIBUTE];\n return value === 'eager' ? 'eager' : DEFAULT_EMBED_LOADING;\n};\n\n/**\n * An iframe's accessible name. A screen reader reaching an untitled frame\n * announces it as \"frame\" and nothing else, so this never returns empty — an\n * author who clears the field gets the provider's name back rather than a\n * silent frame.\n */\nexport const resolveEmbedTitle = (\n componentAttributes: Attributes,\n fallback: string\n): string => {\n const value = componentAttributes?.[EMBED_TITLE_ATTRIBUTE];\n if (typeof value !== 'string') {\n return fallback;\n }\n const trimmed = value.trim();\n return trimmed === '' ? fallback : trimmed;\n};\n\n/** CSS `aspect-ratio` wants `16 / 9`; the attribute stores the familiar `16:9`. */\nexport const toCssAspectRatio = (ratio: EmbedAspectRatio): string | undefined =>\n ratio === 'none' ? undefined : ratio.replace(':', ' / ');\n","/**\n * The providers `r-embed` will frame, and the only thing standing between an\n * author's paste box and an iframe on a customer's page.\n *\n * This is an allowlist, not a denylist — the opposite of `is-safe-href`, and\n * deliberately so. A link navigates away; an iframe runs a third party's\n * document inside the page the widget was dropped on, with whatever\n * permissions the embedding page grants it. There is no set of dangerous\n * schemes to enumerate here, because everything that is not a provider we have\n * looked at is dangerous.\n *\n * Two consequences worth stating outright:\n *\n * **The `src` is rebuilt, never passed through.** A provider takes the URL the\n * author pasted, extracts the one or two identifiers it recognises, and\n * composes a fresh URL from a hardcoded origin. Nothing an author types\n * reaches the `src` except an id that matched a narrow pattern. A watch page,\n * a share link and an already-embeddable URL all converge on the same output.\n *\n * **The frame's privileges are the provider's, not the author's.** `sandbox`\n * and `allow` are properties of the entry below, not attributes an author can\n * set, which is also why this component has no pass-through convention. A\n * `pass-through-embed-attributes-sandbox` key would hand away every guarantee\n * on this page for the sake of consistency with `r-video`.\n */\nimport type { EmbedAspectRatio } from './embed-attributes';\n\nexport type EmbedProviderId = 'youtube' | 'vimeo' | 'google-maps' | 'calendly';\n\nexport type EmbedProvider = {\n id: EmbedProviderId;\n /** Provider name for the composer and for the docs. */\n label: string;\n /**\n * Hosts an author may paste, already normalised (lowercase, no `www.`).\n * Matching one of these only earns the URL a look at `toEmbedUrl`.\n */\n inputHosts: readonly string[];\n /**\n * Builds the URL that actually goes in the `src`, or returns `null` when the\n * URL is on the right host but is not something this provider can frame.\n * The origin it returns is hardcoded here, never taken from the input.\n */\n toEmbedUrl: (url: URL) => string | null;\n /** Tokens for the iframe's `sandbox`. Fixed per provider; never author-set. */\n sandbox: readonly string[];\n /** Permissions-policy tokens for the iframe's `allow`. */\n allow: readonly string[];\n allowFullScreen: boolean;\n /** The shape this provider's content wants before an author says otherwise. */\n defaultAspectRatio: EmbedAspectRatio;\n /** The iframe's accessible name when the author has not written one. */\n defaultTitle: string;\n};\n\n/**\n * `allow-scripts` with `allow-same-origin` looks like it cancels the sandbox,\n * and for a same-origin frame it would. Here the framed document is\n * cross-origin, so \"same origin\" means youtube.com's own origin, not ours: the\n * frame gets its own storage and cookies and still cannot reach into the\n * embedding page. Dropping `allow-same-origin` does not harden anything — it\n * gives the frame an opaque origin, which breaks every one of these providers\n * outright.\n */\nconst FRAMED_APP_SANDBOX = ['allow-scripts', 'allow-same-origin'] as const;\n\nconst YOUTUBE_ID = /^[A-Za-z0-9_-]{11}$/;\nconst VIMEO_ID = /^[0-9]+$/;\nconst VIMEO_PRIVACY_HASH = /^[A-Za-z0-9]+$/;\nconst CALENDLY_SEGMENT = /^[A-Za-z0-9_-]+$/;\nconst GOOGLE_MAPS_PB = /^[A-Za-z0-9!*'().~_-]+$/;\n\n/**\n * Calendly paths that are the scheduling app rather than someone's booking\n * page. Framing one gets a login screen, so they fail closed here instead.\n */\nconst CALENDLY_RESERVED_SEGMENTS = new Set([\n 'app',\n 'event_types',\n 'login',\n 'signup',\n 'pages',\n 'api',\n 'help',\n 'blog',\n 'pricing',\n]);\n\n/**\n * Calendly's own appearance and prefill options, which authors legitimately\n * copy along with the booking URL. Anything else in the query is dropped\n * rather than forwarded — the point of rebuilding the URL is that only things\n * on a list get through.\n */\nconst CALENDLY_ALLOWED_PARAMS = [\n 'hide_gdpr_banner',\n 'hide_event_type_details',\n 'hide_landing_page_details',\n 'primary_color',\n 'background_color',\n 'text_color',\n 'month',\n 'date',\n] as const;\n\n/** Lowercase and drop a leading `www.`, so host matching is not a trick question. */\nexport const normaliseHost = (hostname: string): string =>\n hostname.toLowerCase().replace(/^www\\./, '');\n\nconst pathSegments = (url: URL): string[] =>\n url.pathname.split('/').filter((segment) => segment !== '');\n\n/**\n * Every YouTube URL an author is likely to have in the clipboard — the watch\n * page, the share link, a Short, a live stream, and an embed URL someone\n * copied out of another site's markup — reduced to the video id.\n */\nconst youTubeVideoId = (url: URL): string | null => {\n const segments = pathSegments(url);\n const host = normaliseHost(url.hostname);\n\n if (host === 'youtu.be') {\n return segments[0] ?? null;\n }\n\n if (segments[0] === 'watch') {\n return url.searchParams.get('v');\n }\n\n if (segments.length === 2 && ['embed', 'shorts', 'live', 'v'].includes(segments[0])) {\n return segments[1];\n }\n\n return null;\n};\n\nexport const EMBED_PROVIDERS: readonly EmbedProvider[] = [\n {\n id: 'youtube',\n label: 'YouTube',\n inputHosts: ['youtube.com', 'm.youtube.com', 'youtu.be', 'youtube-nocookie.com'],\n toEmbedUrl: (url) => {\n const videoId = youTubeVideoId(url);\n if (!videoId || !YOUTUBE_ID.test(videoId)) {\n return null;\n }\n // youtube-nocookie.com is the same player without the tracking cookies\n // it would otherwise set on a visitor who never pressed play. Nothing\n // about the embed needs them, and a widget that quietly adds third-party\n // cookies to a customer's site is a consent problem we would be handing\n // them.\n return `https://www.youtube-nocookie.com/embed/${videoId}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-presentation', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: ['accelerometer', 'clipboard-write', 'encrypted-media', 'gyroscope', 'picture-in-picture'],\n allowFullScreen: true,\n defaultAspectRatio: '16:9',\n defaultTitle: 'YouTube video player',\n },\n {\n id: 'vimeo',\n label: 'Vimeo',\n inputHosts: ['vimeo.com', 'player.vimeo.com'],\n toEmbedUrl: (url) => {\n const segments = pathSegments(url);\n // player.vimeo.com/video/123, vimeo.com/123, vimeo.com/channels/staffpicks/123\n const withoutPrefix = segments[0] === 'video' ? segments.slice(1) : segments;\n const numeric = withoutPrefix.filter((segment) => VIMEO_ID.test(segment));\n const videoId = numeric[0];\n if (!videoId) {\n return null;\n }\n\n // An unlisted video carries a hash, either as a trailing path segment\n // (vimeo.com/123/abc123) or as ?h=. Without it the player refuses to\n // load, so it is the one piece of the input besides the id that is\n // carried across.\n const trailing = withoutPrefix[withoutPrefix.indexOf(videoId) + 1];\n const hash = url.searchParams.get('h') ?? trailing;\n const privacyHash = hash && VIMEO_PRIVACY_HASH.test(hash) ? hash : null;\n\n return privacyHash\n ? `https://player.vimeo.com/video/${videoId}?h=${privacyHash}`\n : `https://player.vimeo.com/video/${videoId}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-presentation', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: ['autoplay', 'clipboard-write', 'encrypted-media', 'picture-in-picture'],\n allowFullScreen: true,\n defaultAspectRatio: '16:9',\n defaultTitle: 'Vimeo video player',\n },\n {\n id: 'google-maps',\n label: 'Google Maps',\n inputHosts: ['google.com', 'maps.google.com'],\n toEmbedUrl: (url) => {\n // Only the URL from \"Share → Embed a map\" is accepted, because it is the\n // only one that can be framed at all: Google serves an ordinary maps\n // link with X-Frame-Options and the visitor gets a blank box. Failing\n // here means the author is told to copy the other URL, rather than\n // shipping a page with a hole in it.\n if (pathSegments(url).join('/') !== 'maps/embed') {\n return null;\n }\n const pb = url.searchParams.get('pb');\n // `pb` is Google's own opaque camera-and-place blob. It is carried\n // across verbatim rather than re-encoded, because it is the one input\n // this file cannot regenerate from an id — so instead it is held to a\n // charset with no way out of a query string. Everything that could end\n // one, or start an attribute, is absent from this list.\n if (!pb || !GOOGLE_MAPS_PB.test(pb)) {\n return null;\n }\n return `https://www.google.com/maps/embed?pb=${pb}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: [],\n allowFullScreen: true,\n defaultAspectRatio: '4:3',\n defaultTitle: 'Map',\n },\n {\n id: 'calendly',\n label: 'Calendly',\n inputHosts: ['calendly.com'],\n toEmbedUrl: (url) => {\n const segments = pathSegments(url);\n if (segments.length === 0 || segments.length > 2) {\n return null;\n }\n if (!segments.every((segment) => CALENDLY_SEGMENT.test(segment))) {\n return null;\n }\n if (CALENDLY_RESERVED_SEGMENTS.has(segments[0].toLowerCase())) {\n return null;\n }\n\n const options = new URLSearchParams();\n for (const parameter of CALENDLY_ALLOWED_PARAMS) {\n const value = url.searchParams.get(parameter);\n if (value !== null) {\n options.set(parameter, value);\n }\n }\n\n const query = options.toString();\n const path = segments.join('/');\n return query ? `https://calendly.com/${path}?${query}` : `https://calendly.com/${path}`;\n },\n sandbox: [...FRAMED_APP_SANDBOX, 'allow-forms', 'allow-popups', 'allow-popups-to-escape-sandbox'],\n allow: [],\n allowFullScreen: false,\n // A booking widget is a form of unpredictable length, not a picture with a\n // shape. It gets a height instead of a ratio; see `embed-attributes.ts`.\n defaultAspectRatio: 'none',\n defaultTitle: 'Booking calendar',\n },\n];\n\nexport type ResolvedEmbedUrl = {\n provider: EmbedProvider;\n /** The rebuilt URL. Never the author's string. */\n src: string;\n};\n\n/**\n * The single place an embed URL is checked against the allowlist.\n *\n * Every caller — the component, both container resolvers, and the composer's\n * URL editor through the package's public exports — comes through here rather\n * than reading `EMBED_PROVIDERS` and matching for itself. That is what keeps\n * a per-app allowlist a change to one function's argument later on, instead of\n * a hunt for call sites: see\n * `rulecms/__docs__/__TODO__/__COMPONENTS__/TODO_PLATFORM_EMBED_ALLOWLIST_PER_APP.md`.\n *\n * Returns `null` for anything it cannot vouch for, which is the fail-closed\n * behaviour the component depends on. It never throws: a malformed URL in a\n * stored widget must not take down the page it was published to.\n */\nexport function resolveEmbedUrl(\n value: unknown,\n providers: readonly EmbedProvider[] = EMBED_PROVIDERS\n): ResolvedEmbedUrl | null {\n if (typeof value !== 'string' || value.trim() === '') {\n return null;\n }\n\n let url: URL;\n try {\n url = new URL(value.trim());\n } catch {\n return null;\n }\n\n // https only. Every provider here serves it, and requiring it disposes of\n // javascript:, data:, blob: and file: as a class rather than one at a time.\n if (url.protocol !== 'https:') {\n return null;\n }\n\n // `https://youtube.com@evil.example/` parses with `evil.example` as the host\n // and the rest as credentials. The host check below is not fooled by it, but\n // a URL carrying credentials at all is not one an author pasted from a\n // provider, so it is refused outright.\n if (url.username !== '' || url.password !== '') {\n return null;\n }\n\n const host = normaliseHost(url.hostname);\n const provider = providers.find((candidate) => candidate.inputHosts.includes(host));\n if (!provider) {\n return null;\n }\n\n const src = provider.toEmbedUrl(url);\n return src ? { provider, src } : null;\n}\n\n/** Whether a URL would render. The composer's editor uses this for its hint. */\nexport const isAllowedEmbedUrl = (\n value: unknown,\n providers: readonly EmbedProvider[] = EMBED_PROVIDERS\n): boolean => resolveEmbedUrl(value, providers) !== null;\n","import type { CssStyleMap as CSSProperties } from '../../../../types';\nimport {\n EMBED_UNSHAPED_HEIGHT,\n EMBED_URL_ATTRIBUTE,\n resolveEmbedAspectRatio,\n resolveEmbedLoading,\n resolveEmbedTitle,\n toCssAspectRatio,\n} from './embed-attributes';\nimport type { EmbedAspectRatio, EmbedLoading } from './embed-attributes';\nimport { resolveEmbedUrl } from './embed-providers';\nimport type { EmbedProvider } from './embed-providers';\n\n/**\n * One render's worth of embed: everything `REmbed` needs, and nothing that\n * needs deciding twice.\n */\nexport type ResolvedEmbed = {\n provider: EmbedProvider;\n /** The rebuilt provider URL — see `embed-providers.ts`. */\n src: string;\n title: string;\n aspectRatio: EmbedAspectRatio;\n loading: EmbedLoading;\n};\n\n/**\n * The single resolution path, shared by `REmbed` and by both container\n * resolvers, in the way `r-text` shares `resolveEnclosingTag`.\n *\n * Sharing it is not tidiness. `resolveNoContainer` and\n * `resolveRendersOwnElement` both answer questions about an element that only\n * exists when a URL passed the allowlist, so if they decided that\n * independently of the component, a rejected URL would have the renderer\n * either handing column styles to an element that was never rendered or\n * wrapping nothing in a styled div. Neither would look wrong in the drawer, in\n * Redux, or in the stored JSON.\n *\n * `null` means nothing will be rendered: no URL, or one the allowlist refused.\n */\nexport function resolveEmbed(componentAttributes?: { [key: string]: any }): ResolvedEmbed | null {\n const resolved = resolveEmbedUrl(componentAttributes?.[EMBED_URL_ATTRIBUTE]);\n if (!resolved) {\n return null;\n }\n\n const { provider, src } = resolved;\n\n return {\n provider,\n src,\n title: resolveEmbedTitle(componentAttributes, provider.defaultTitle),\n // An author's choice wins; otherwise the provider's own shape, which is\n // what makes a pasted map 4:3 and a pasted video 16:9 without anyone\n // having to know that is what they wanted.\n aspectRatio: resolveEmbedAspectRatio(componentAttributes) ?? provider.defaultAspectRatio,\n loading: resolveEmbedLoading(componentAttributes),\n };\n}\n\n/**\n * The frame's own appearance, before column styles are laid over it.\n *\n * `display: block` removes the descender gap an inline replaced element leaves\n * under itself, and the zero border removes the 2px inset ridge every browser\n * still draws around an iframe by default.\n */\nexport const buildEmbedStyles = (aspectRatio: EmbedAspectRatio): CSSProperties => ({\n display: 'block',\n width: '100%',\n border: 0,\n ...(aspectRatio === 'none'\n ? { height: EMBED_UNSHAPED_HEIGHT }\n : { aspectRatio: toCssAspectRatio(aspectRatio) }),\n});\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\nimport { buildEmbedStyles, resolveEmbed } from './resolve-embed';\n\n@Component({\n selector: 'rulecms-r-embed',\n standalone: true,\n imports: [NgStyle],\n template: `\n @if (embed) {\n <iframe\n [src]=\"safeSrc\"\n [title]=\"embed.title\"\n [ngStyle]=\"style\"\n [attr.sandbox]=\"embed.provider.sandbox.join(' ')\"\n [attr.allow]=\"embed.provider.allow.length > 0 ? embed.provider.allow.join('; ') : null\"\n [attr.allowfullscreen]=\"embed.provider.allowFullScreen ? true : null\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n [attr.loading]=\"embed.loading\"\n [class]=\"className || undefined\"\n ></iframe>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class REmbedComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n constructor(private readonly sanitizer: DomSanitizer) {}\n\n get embed() {\n return resolveEmbed(this.componentAttributes);\n }\n\n get safeSrc(): SafeResourceUrl | null {\n const embed = this.embed;\n return embed ? this.sanitizer.bypassSecurityTrustResourceUrl(embed.src) : null;\n }\n\n get style() {\n const embed = this.embed;\n if (!embed) {\n return this.styleProps;\n }\n return { ...buildEmbedStyles(embed.aspectRatio), ...this.styleProps };\n }\n}\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEmbed } from './resolve-embed';\n\n/**\n * `false` whenever an iframe is rendered: it is a replaced element that holds\n * margin, padding, width and height on itself, so a wrapper div would only add\n * an element that does nothing.\n *\n * `true` when the URL is missing or the allowlist refused it, because then\n * there is no element at all — the same answer `r-text` gives for bare text.\n * Deciding this from `resolveEmbed`, rather than from the fact that this\n * component \"is an iframe component\", is what keeps the two in step.\n */\nexport const resolveNoContainer = ({ componentAttributes }: NoContainerResolverContext): boolean =>\n resolveEmbed(componentAttributes) === null;\n","import type { NoContainerResolverContext } from '../../../../types';\nimport { resolveEmbed } from './resolve-embed';\n\n/**\n * The iframe carries the className — when there is one. A rejected or unset\n * URL renders nothing, and a class handed to a component that renders nothing\n * disappears without trace, so this answers from the same resolution the\n * component uses.\n */\nexport const resolveRendersOwnElement = ({\n componentAttributes,\n}: NoContainerResolverContext): boolean => resolveEmbed(componentAttributes) !== null;\n","import { DefaultAttributeValue } from '../../../../types';\n\n/**\n * Nothing is seeded, including the URL.\n *\n * A freshly dropped embed renders nothing until an author pastes something,\n * which is the honest result: the alternative is shipping a placeholder video\n * that a customer's page would publish if anyone forgot to replace it. The\n * palette card and the empty drawer say what to do instead.\n *\n * Aspect ratio is left unset on purpose too, so it resolves from the provider\n * — a map is 4:3 and a video is 16:9 without either being written down here.\n */\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: 'embed-url-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-title-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-aspect-ratio-3-resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-loading-3-resolutions',\n defaultValues: {},\n },\n];\n","import { AttributeEditModeConfig } from '../../../../types';\n\n/**\n * Drawer order, which is also the order the documentation pages are listed in:\n * the URL first because nothing renders without it, then the three settings\n * that only matter once something does.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: 'embed-url-3-resolutions',\n heading: 'Embed URL',\n subHeading:\n 'Paste the address of a YouTube or Vimeo video, a Google Maps \"Embed a map\" link, or a Calendly booking page, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-title-3-resolutions',\n heading: 'Embed Title',\n subHeading:\n 'Describe what is being embedded, for screen readers; defaults to the provider name, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-aspect-ratio-3-resolutions',\n heading: 'Embed Aspect Ratio',\n subHeading:\n 'The shape of the embed — \"16:9\" for video, \"4:3\" for maps, or \"none\" to set the height on the column instead, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: 'embed-loading-3-resolutions',\n heading: 'Embed Loading',\n subHeading:\n 'Whether the embed loads with the page (\"eager\") or waits until the visitor scrolls near it (\"lazy\", the default), for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { REmbedComponent } from './r-embed.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rEmbed,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: REmbedComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","/**\n * The attribute names `r-list` reads.\n *\n * Every one is list-specific, including the links, which are conceptually the\n * same numbered list `r-text` already offers. Sharing that attribute name\n * would have saved one line of editor wiring and cost the documentation\n * contract: RuleCMS publishes one page per component-scope attribute and\n * requires exactly one owning component, so a shared name has no single page\n * to link to from the drawer. Reuse happens a level down instead — the\n * composer resolves an attribute to an *editor* by name, and `list-links`\n * points at the editor `links-3-resolutions` already resolves to.\n *\n * Nothing here duplicates a column style attribute. Spacing, colour and\n * typography come from Column Styles on the root element and inherit into\n * the items; the attributes below are only what is specific to a list —\n * which element it is, what the markers look like, and where numbering\n * starts. Kind and marker are closed sets rather than free text, which is\n * what lets them go through the composer's shared select and lets the render\n * path treat anything unrecognised as unset.\n */\nexport const LIST_ITEMS_ATTRIBUTE = 'list-items-3-resolutions';\nexport const LIST_KIND_ATTRIBUTE = 'list-kind-3-resolutions';\nexport const LIST_MARKER_ATTRIBUTE = 'list-marker-3-resolutions';\nexport const LIST_START_ATTRIBUTE = 'list-start-3-resolutions';\nexport const LIST_REVERSED_ATTRIBUTE = 'list-reversed-3-resolutions';\nexport const LIST_LINKS_ATTRIBUTE = 'list-links-3-resolutions';\n\n/** What a freshly dropped list shows before the author types anything. */\nexport const DEFAULT_LIST_ITEMS = 'First item\\nSecond item\\nThird item';\n\nexport const LIST_KINDS = ['unordered', 'ordered'] as const;\nexport type ListKind = (typeof LIST_KINDS)[number];\nexport const DEFAULT_LIST_KIND: ListKind = 'unordered';\n\n/**\n * `list-style-type` values worth offering. Every entry is valid CSS on both\n * `<ul>` and `<ol>`, so the marker survives the author switching kind rather\n * than resetting. Unset means the browser default — disc for unordered,\n * decimal for ordered — which is why there is no default constant here: not\n * setting the property at all is the default.\n */\nexport const LIST_MARKERS = [\n 'disc',\n 'circle',\n 'square',\n 'decimal',\n 'lower-alpha',\n 'upper-alpha',\n 'lower-roman',\n 'upper-roman',\n 'none',\n] as const;\nexport type ListMarker = (typeof LIST_MARKERS)[number];\n\ntype Attributes = { [key: string]: any } | undefined;\n\nexport const resolveListKind = (componentAttributes: Attributes): ListKind => {\n const value = componentAttributes?.[LIST_KIND_ATTRIBUTE];\n return LIST_KINDS.includes(value) ? value : DEFAULT_LIST_KIND;\n};\n\n/**\n * A stored value reaches a CSS property here, so the allowlist is the\n * boundary that keeps it from being whatever a request happened to write.\n * Unrecognised values mean \"unset\" and the browser default applies.\n */\nexport const resolveListMarker = (componentAttributes: Attributes): ListMarker | undefined => {\n const value = componentAttributes?.[LIST_MARKER_ATTRIBUTE];\n return LIST_MARKERS.includes(value) ? value : undefined;\n};\n\n/**\n * One item per line of the authored text, blank lines dropped. An unset\n * attribute falls back to the placeholder items, but text the author\n * deliberately cleared stays cleared — an empty list element still carries\n * the column's styles and stays selectable in the composer.\n */\nexport const resolveListItems = (componentAttributes: Attributes): string[] => {\n const value = componentAttributes?.[LIST_ITEMS_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_LIST_ITEMS\n : typeof value === 'string'\n ? value\n : String(value);\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line !== '');\n};\n\n/**\n * HTML's `start` takes any integer, including negative ones. The editor\n * stores a number, but a hand-written or migrated config may carry a numeric\n * string; both mean the same thing here. Anything else is unset, and only an\n * ordered list ever reads it.\n */\nexport const resolveListStart = (componentAttributes: Attributes): number | undefined => {\n const value = componentAttributes?.[LIST_START_ATTRIBUTE];\n if (typeof value === 'number' && Number.isInteger(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const parsed = Number(value.trim());\n if (Number.isInteger(parsed)) {\n return parsed;\n }\n }\n return undefined;\n};\n\n/**\n * Select editors in the composer store `'true'` / `'false'` as strings, while\n * a hand-written or migrated config may carry a real boolean. Both mean the\n * same thing here. Only an ordered list ever reads it.\n */\nexport const resolveListReversed = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[LIST_REVERSED_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport {\n LIST_LINKS_ATTRIBUTE,\n resolveListItems,\n resolveListKind,\n resolveListMarker,\n resolveListReversed,\n resolveListStart,\n} from './list-attributes';\n\n@Component({\n selector: 'rulecms-r-list',\n standalone: true,\n imports: [NgStyle, InlineMarkupComponent],\n template: `\n @if (kind === 'ordered') {\n <ol [ngStyle]=\"style\" [class]=\"className || undefined\" [attr.start]=\"start\" [attr.reversed]=\"reversed ? true : null\">\n @for (item of items; track $index) {\n <li>\n <rulecms-inline-markup [text]=\"item\" [links]=\"links\" />\n </li>\n }\n </ol>\n } @else {\n <ul [ngStyle]=\"style\" [class]=\"className || undefined\">\n @for (item of items; track $index) {\n <li>\n <rulecms-inline-markup [text]=\"item\" [links]=\"links\" />\n </li>\n }\n </ul>\n }\n `,\n host: { style: 'display: contents' },\n})\nexport class RListComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n get marker() {\n return resolveListMarker(this.componentAttributes);\n }\n get links() {\n return this.componentAttributes?.[LIST_LINKS_ATTRIBUTE];\n }\n get style() {\n return {\n ...(this.marker !== undefined ? { listStyleType: this.marker } : {}),\n ...this.styleProps,\n };\n }\n get items() {\n return resolveListItems(this.componentAttributes);\n }\n get kind() {\n return resolveListKind(this.componentAttributes);\n }\n get start() {\n return resolveListStart(this.componentAttributes);\n }\n get reversed() {\n return resolveListReversed(this.componentAttributes);\n }\n}\n","/**\n * RList always renders a `<ul>` or `<ol>` — both block-level elements that\n * hold margin, padding, width and border as authored — and puts styleProps on\n * that element itself. No configuration changes the answer, so no wrapper\n * div, ever.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * RList's root is always a real element — `<ul>` or `<ol>` — so it can always\n * carry the column's className, and the component applies the one it\n * receives.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\nimport {\n DEFAULT_LIST_ITEMS,\n DEFAULT_LIST_KIND,\n LIST_ITEMS_ATTRIBUTE,\n LIST_KIND_ATTRIBUTE,\n LIST_LINKS_ATTRIBUTE,\n LIST_MARKER_ATTRIBUTE,\n LIST_REVERSED_ATTRIBUTE,\n LIST_START_ATTRIBUTE,\n} from './list-attributes';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: LIST_ITEMS_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_LIST_ITEMS,\n },\n },\n {\n name: LIST_KIND_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_LIST_KIND,\n },\n },\n // Marker, start and reversed default to unset on purpose: the browser\n // already renders disc for unordered and 1, 2, 3 for ordered, and an\n // attribute that is not set is one the render path does not emit.\n {\n name: LIST_MARKER_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_START_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_REVERSED_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: LIST_LINKS_ATTRIBUTE,\n defaultValues: {},\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n DEFAULT_LIST_KIND,\n LIST_ITEMS_ATTRIBUTE,\n LIST_KIND_ATTRIBUTE,\n LIST_LINKS_ATTRIBUTE,\n LIST_MARKER_ATTRIBUTE,\n LIST_REVERSED_ATTRIBUTE,\n LIST_START_ATTRIBUTE,\n} from './list-attributes';\n\n/**\n * Every setting the list offers, in the order the Modify drawer shows them.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: LIST_ITEMS_ATTRIBUTE,\n heading: 'List Items',\n subHeading:\n 'The items, one per line — each line becomes its own entry in the list. Blank lines are skipped, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_KIND_ATTRIBUTE,\n heading: 'List Kind',\n subHeading:\n 'Bulleted (unordered) or numbered (ordered). Numbered lists can also set where counting starts and whether it counts down, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_LIST_KIND },\n },\n {\n name: LIST_MARKER_ATTRIBUTE,\n heading: 'Marker Style',\n subHeading:\n 'What sits in front of each item: a disc, circle or square for bullets; numbers, letters or Roman numerals for numbering; or none to hide the markers. Unset uses the browser default for the list kind, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_START_ATTRIBUTE,\n heading: 'Numbering Start',\n subHeading:\n 'The number the first item counts from. Only a numbered list reads this; leave unset to count from 1, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_REVERSED_ATTRIBUTE,\n heading: 'Reversed Numbering',\n subHeading:\n 'Whether a numbered list counts down instead of up, e.g. a top-10 countdown. Only a numbered list reads this, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: LIST_LINKS_ATTRIBUTE,\n heading: 'Links',\n subHeading:\n 'Links the items can point at. To link part of an item, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RListComponent } from './r-list.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rList,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RListComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import { parseInlineLinkMarkers } from '../../../../shared/links';\n\n/**\n * The attribute names `r-accordion` reads.\n *\n * The component is a disclosure and nothing more specific than that: a summary\n * a reader clicks and the detail it expands to. An FAQ is one thing to build\n * out of it, a shipping policy or a \"show more\" under a truncated bio are\n * others, and the settings are named after the two halves of the element —\n * `<summary>` and the detail inside `<details>` — rather than after any one of\n * those uses.\n *\n * One accordion is one disclosure, rather than a component holding N\n * collapsible sections. A repeating-group attribute would need an editor this\n * library does not have, and several sections in one component leave the\n * nested-content slot with no single detail to belong to (see\n * `rulecms/__docs__/__ARCHITECTURE__/ACCORDION_COMPONENT_ARCHITECTURE.md`).\n * Several of these in a column is the multi-section case, which is also how an\n * author reorders one.\n *\n * Every name is accordion-specific, including the links, which are the same\n * numbered list `r-text` already offers. Sharing that attribute name would\n * have saved a line of editor wiring and cost the documentation contract:\n * RuleCMS publishes one page per component-scope attribute and requires\n * exactly one owning component. Reuse happens a level down, where the composer\n * resolves an attribute to an *editor* by name — the same arrangement `r-list`\n * uses.\n *\n * Nothing here duplicates a column style attribute. Spacing, colour and\n * typography come from Column Styles on the `<details>` element and inherit\n * into the summary and the detail; the attributes below are only what is\n * specific to a disclosure — what it says closed, what it says open, whether\n * it starts open, and whether the summary also belongs in the page outline.\n */\nexport const ACCORDION_SUMMARY_ATTRIBUTE = 'accordion-summary-3-resolutions';\nexport const ACCORDION_DETAIL_ATTRIBUTE = 'accordion-detail-3-resolutions';\nexport const ACCORDION_LINKS_ATTRIBUTE = 'accordion-links-3-resolutions';\nexport const ACCORDION_OPEN_ATTRIBUTE = 'accordion-open-3-resolutions';\nexport const ACCORDION_HEADING_LEVEL_ATTRIBUTE = 'accordion-heading-level-3-resolutions';\n\n/** What a freshly dropped accordion shows before the author types anything. */\nexport const DEFAULT_ACCORDION_SUMMARY = 'Summary';\nexport const DEFAULT_ACCORDION_DETAIL =\n 'The detail this summary expands to. Each line becomes its own paragraph.';\n\n/**\n * Heading levels the summary can be given, plus `none` for the common case.\n *\n * `h1` is deliberately absent: the page already has one, and ten disclosures\n * down the page would otherwise offer ten ways to compete with it. Levels\n * start at `h2` because a summary sits under whatever heading introduces the\n * section it is in.\n *\n * `none` is a real option rather than an unset value so the picker always has\n * a definite selection — there is no way to clear a select back to nothing —\n * and it is the default because a disclosure is not automatically part of the\n * document outline.\n */\nexport const ACCORDION_HEADING_LEVELS = ['none', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type AccordionHeadingLevel = (typeof ACCORDION_HEADING_LEVELS)[number];\nexport const DEFAULT_ACCORDION_HEADING_LEVEL: AccordionHeadingLevel = 'none';\n\ntype Attributes = { [key: string]: any } | undefined;\n\n/**\n * The summary, on one line. An unset attribute falls back to the placeholder,\n * but text the author deliberately cleared stays cleared: an empty `<summary>`\n * still draws its marker and still toggles, and the composer needs the element\n * to stay selectable on the canvas. Same distinction `r-list` draws for its\n * items and `r-button` for its label.\n *\n * Authored newlines collapse to single spaces. The editor behind this\n * attribute is the shared multi-line text field, and `<summary>` is a single\n * line of prose — HTML would collapse the whitespace anyway, so the resolved\n * value says so rather than leaving it to the browser.\n *\n * `{n|…}` markers contribute their inner text and nothing else. The summary\n * takes no links — inside a `<summary>` a click both follows the anchor and\n * toggles the disclosure — but the editor behind it is the same field that\n * offers the marker grammar for the detail, so an author will type one here.\n * Degrading it to prose is what the rest of the library does with a marker it\n * cannot resolve; leaving the braces on screen is the one outcome nobody wants.\n */\nexport const resolveAccordionSummary = (componentAttributes: Attributes): string => {\n const value = componentAttributes?.[ACCORDION_SUMMARY_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_ACCORDION_SUMMARY\n : typeof value === 'string'\n ? value\n : String(value);\n return parseInlineLinkMarkers(text)\n .map((run) => run.text)\n .join('')\n .replace(/\\s+/g, ' ')\n .trim();\n};\n\n/**\n * The detail, as one paragraph per authored line with blank lines dropped —\n * the same grammar `r-list` uses for its items, so an author who has met one\n * has met both. An unset attribute falls back to the placeholder; text the\n * author deliberately cleared stays cleared and the disclosure opens onto\n * whatever else is in it, or onto nothing.\n */\nexport const resolveAccordionDetail = (componentAttributes: Attributes): string[] => {\n const value = componentAttributes?.[ACCORDION_DETAIL_ATTRIBUTE];\n const text =\n value === undefined || value === null\n ? DEFAULT_ACCORDION_DETAIL\n : typeof value === 'string'\n ? value\n : String(value);\n return text\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line !== '');\n};\n\n/**\n * Whether the disclosure renders already open. Select editors in the composer\n * store `'true'` / `'false'` as strings, while a hand-written or migrated\n * config may carry a real boolean; both mean the same thing here.\n *\n * This is an attribute rather than runtime state on purpose: `open` has to be\n * right in the server's HTML, because a disclosure a search engine or a\n * no-JavaScript reader should see expanded cannot wait for hydration.\n */\nexport const resolveAccordionOpen = (componentAttributes: Attributes): boolean => {\n const value = componentAttributes?.[ACCORDION_OPEN_ATTRIBUTE];\n if (typeof value === 'boolean') {\n return value;\n }\n return typeof value === 'string' && value.trim().toLowerCase() === 'true';\n};\n\n/**\n * The heading tag to wrap the summary in, or `undefined` for no heading.\n *\n * A stored value reaches an element name here, so the allowlist is the\n * boundary that keeps it from being whatever a request happened to write.\n * `none` and anything unrecognised both mean \"no heading\", which is also the\n * safe answer: a plain `<summary>` is a valid disclosure, while an invented\n * tag inside one is not.\n */\nexport const resolveAccordionHeadingLevel = (\n componentAttributes: Attributes\n): Exclude<AccordionHeadingLevel, 'none'> | undefined => {\n const value = componentAttributes?.[ACCORDION_HEADING_LEVEL_ATTRIBUTE];\n if (value === 'none' || !(ACCORDION_HEADING_LEVELS as readonly unknown[]).includes(value)) {\n return undefined;\n }\n return value;\n};\n","import { Component, Input } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { InlineMarkupComponent } from '../../../../shared/inline-markup/inline-markup.component';\nimport { HtmlTagComponent } from '../../../../shared/html-tag.component';\nimport {\n ACCORDION_LINKS_ATTRIBUTE,\n resolveAccordionDetail,\n resolveAccordionHeadingLevel,\n resolveAccordionOpen,\n resolveAccordionSummary,\n} from './accordion-attributes';\n\nconst SUMMARY_LAYOUT_STYLE = {\n display: 'list-item',\n width: '100%',\n boxSizing: 'border-box',\n};\n\nconst SUMMARY_HEADING_STYLE = {\n display: 'inline',\n margin: 0,\n};\n\n@Component({\n selector: 'rulecms-r-accordion',\n standalone: true,\n imports: [NgStyle, InlineMarkupComponent, HtmlTagComponent],\n template: `\n <details [ngStyle]=\"styleProps\" [class]=\"className || undefined\" [attr.open]=\"open ? true : null\">\n <summary [ngStyle]=\"summaryLayoutStyle\">\n @if (headingLevel) {\n <rulecms-html-tag [tag]=\"headingLevel\" [styleProps]=\"summaryHeadingStyle\">\n {{ summary }}\n </rulecms-html-tag>\n } @else {\n {{ summary }}\n }\n </summary>\n @for (paragraph of detail; track $index) {\n <p>\n <rulecms-inline-markup [text]=\"paragraph\" [links]=\"links\" />\n </p>\n }\n <ng-content />\n </details>\n `,\n host: { style: 'display: contents' },\n})\nexport class RAccordionComponent {\n @Input() componentAttributes?: { [key: string]: any };\n @Input() styleProps?: { [key: string]: any };\n @Input() className?: string;\n\n readonly summaryLayoutStyle = SUMMARY_LAYOUT_STYLE;\n readonly summaryHeadingStyle = SUMMARY_HEADING_STYLE;\n\n get summary() {\n return resolveAccordionSummary(this.componentAttributes);\n }\n get headingLevel() {\n return resolveAccordionHeadingLevel(this.componentAttributes);\n }\n get links() {\n return this.componentAttributes?.[ACCORDION_LINKS_ATTRIBUTE];\n }\n get open() {\n return resolveAccordionOpen(this.componentAttributes);\n }\n get detail() {\n return resolveAccordionDetail(this.componentAttributes);\n }\n}\n","/**\n * RAccordion always renders a `<details>` — a block-level element that holds\n * margin, padding, width and border as authored — and puts styleProps on that\n * element itself. No configuration changes the answer, so no wrapper div,\n * ever.\n */\nexport const resolveNoContainer = (): boolean => false;\n","/**\n * RAccordion's root is always a real element — `<details>` — so it can always\n * carry the column's className, and the component applies the one it receives.\n */\nexport const resolveRendersOwnElement = (): boolean => true;\n","import { DefaultAttributeValue } from '../../../../types';\nimport {\n ACCORDION_DETAIL_ATTRIBUTE,\n ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n ACCORDION_LINKS_ATTRIBUTE,\n ACCORDION_OPEN_ATTRIBUTE,\n ACCORDION_SUMMARY_ATTRIBUTE,\n DEFAULT_ACCORDION_DETAIL,\n DEFAULT_ACCORDION_HEADING_LEVEL,\n DEFAULT_ACCORDION_SUMMARY,\n} from './accordion-attributes';\n\nexport const defaultAttributeValues: DefaultAttributeValue[] = [\n {\n name: ACCORDION_SUMMARY_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_SUMMARY,\n },\n },\n {\n name: ACCORDION_DETAIL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_DETAIL,\n },\n },\n // Closed by default, and unset rather than 'false': a disclosure the author\n // has not thought about should start collapsed, which is what an absent\n // `open` attribute already means in HTML.\n {\n name: ACCORDION_OPEN_ATTRIBUTE,\n defaultValues: {},\n },\n {\n name: ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n defaultValues: {\n all: DEFAULT_ACCORDION_HEADING_LEVEL,\n },\n },\n {\n name: ACCORDION_LINKS_ATTRIBUTE,\n defaultValues: {},\n },\n];\n","import type { AttributeEditModeConfig } from '../../../../types';\nimport {\n ACCORDION_DETAIL_ATTRIBUTE,\n ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n ACCORDION_LINKS_ATTRIBUTE,\n ACCORDION_OPEN_ATTRIBUTE,\n ACCORDION_SUMMARY_ATTRIBUTE,\n DEFAULT_ACCORDION_HEADING_LEVEL,\n} from './accordion-attributes';\n\n/**\n * Every setting the accordion offers, in the order the Modify drawer shows\n * them.\n *\n * Headings name the two halves of the element — Summary and Detail — not one\n * use of it. An author building an FAQ reads \"Summary\" as the question without\n * being told to; an author building a \"show more\" would have had to translate\n * \"Question\" into something it is not.\n *\n * Order is not cosmetic. The drawer renders these top to bottom and the\n * documentation registry asserts its pages match that sequence, so moving an\n * entry here moves it in both places at once.\n */\nexport const attributeEditModeConfigs: AttributeEditModeConfig[] = [\n {\n name: ACCORDION_SUMMARY_ATTRIBUTE,\n heading: 'Summary',\n subHeading:\n 'The line a reader sees closed and clicks to expand. One line — extra lines collapse into it, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_DETAIL_ATTRIBUTE,\n heading: 'Detail',\n subHeading:\n 'What the summary expands to, one paragraph per line. Blank lines are skipped, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_OPEN_ATTRIBUTE,\n heading: 'Open by Default',\n subHeading:\n 'Whether the detail is already expanded when the page loads. A reader can still collapse it, for 3 different device resolutions',\n defaultValues: {},\n },\n {\n name: ACCORDION_HEADING_LEVEL_ATTRIBUTE,\n heading: 'Summary Heading Level',\n subHeading:\n 'Whether the summary also counts as a heading in the page outline, and at which level. Leave it at none unless these summaries are the structure of the page, for 3 different device resolutions',\n defaultValues: { all: DEFAULT_ACCORDION_HEADING_LEVEL },\n },\n {\n name: ACCORDION_LINKS_ATTRIBUTE,\n heading: 'Links',\n subHeading:\n 'Links the detail can point at. To link part of the detail, wrap those words in {1|linked text}, where the number is the position of the entry in this list counting from 1; clearing an entry leaves its position in place so the other numbers keep pointing where they did, for 3 different device resolutions',\n defaultValues: {},\n },\n];\n","import { RAccordionComponent } from './r-accordion.component';\nimport { resolveNoContainer } from './resolve-no-container';\nimport { resolveRendersOwnElement } from './resolve-renders-own-element';\nimport { defaultAttributeValues } from './default-attribute-values';\nimport { attributeEditModeConfigs } from './attribute-edit-mode-configs';\nimport type { DisplayCardEntry } from '../../../../types';\nimport { ComponentIdentifiers } from '../../../../component-identifiers';\n\nexport const displayCardEntry: DisplayCardEntry = {\n id: ComponentIdentifiers.rAccordion,\n resolveNoContainer,\n resolveRendersOwnElement,\n card: RAccordionComponent,\n defaultAttributeValues,\n attributeEditModeConfigs,\n};\n","import type { DisplayCardEntry } from '../../../types';\nimport { displayCardEntry as rTextCardEntry } from '../components/r-text/display-card-entry';\nimport { displayCardEntry as cloudinaryAdvancedImageCardEntry } from '../components/cloudinary-advanced-image/display-card-entry';\nimport { displayCardEntry as rVideoCardEntry } from '../components/r-video/display-card-entry';\nimport { displayCardEntry as rIconCardEntry } from '../components/r-icon/display-card-entry';\nimport { displayCardEntry as rButtonCardEntry } from '../components/r-button/display-card-entry';\nimport { displayCardEntry as rDividerCardEntry } from '../components/r-divider/display-card-entry';\nimport { displayCardEntry as rEmbedCardEntry } from '../components/r-embed/display-card-entry';\nimport { displayCardEntry as rListCardEntry } from '../components/r-list/display-card-entry';\nimport { displayCardEntry as rAccordionCardEntry } from '../components/r-accordion/display-card-entry';\n\nexport const cardEntries: DisplayCardEntry[] = [\n rTextCardEntry,\n cloudinaryAdvancedImageCardEntry,\n rVideoCardEntry,\n rIconCardEntry,\n rButtonCardEntry,\n rDividerCardEntry,\n rEmbedCardEntry,\n rListCardEntry,\n rAccordionCardEntry,\n];\n","import { CardGroup } from '../../types';\nimport { cardEntries } from './card-entries/card-entries';\n\nexport const cardGroups: CardGroup[] = [\n { title: 'Cards', cards: [{ title: 'Cards', entries: cardEntries }] },\n];\n","import { cardGroups } from './base-components/display/card-groups';\nimport { CardGroup, Card, RenderCardEntry, DisplayCardEntry } from './types';\n\nlet cachedSourceComponentsPlugin: { components: Record<string, RenderCardEntry> } | undefined;\n\nconst getComponentsFromRenderCardGroups = (group: CardGroup[]): Record<string, RenderCardEntry> => {\n const entries = group.reduce<DisplayCardEntry[]>(\n (all, current) =>\n all.concat(current.cards.reduce<DisplayCardEntry[]>((cards, card: Card) => cards.concat(card.entries as DisplayCardEntry[]), [])),\n []\n );\n return entries.reduce(\n (acc, entry) => {\n acc[entry.id] = {\n id: entry.id,\n card: entry.card,\n defaultAttributeValues: entry.defaultAttributeValues,\n ...(entry.resolveNoContainer !== undefined ? { resolveNoContainer: entry.resolveNoContainer } : {}),\n ...(entry.noContainer !== undefined ? { noContainer: entry.noContainer } : {}),\n ...(entry.resolveRendersOwnElement !== undefined\n ? { resolveRendersOwnElement: entry.resolveRendersOwnElement }\n : {}),\n }\n return acc;\n },\n {} as Record<string, RenderCardEntry>\n );\n};\n\n/**\n * Returns the source components plugin with a lookup map of render components.\n * Results are cached after the first call.\n */\nexport const getSourceComponentsPlugin = () => {\n if (cachedSourceComponentsPlugin) {\n return cachedSourceComponentsPlugin;\n }\n\n const components = getComponentsFromRenderCardGroups(cardGroups);\n\n cachedSourceComponentsPlugin = {\n components,\n };\n\n return cachedSourceComponentsPlugin;\n};","import { ComponentNameToModifyAttribute } from '../../../types';\n\n/**\n * Mapping of attribute names to their corresponding editor components.\n *\n * The RuleCMS editor dynamically loads the appropriate editor component for each attribute\n * that users can edit. This mapping ensures that the correct component is loaded when\n * editing a given attribute.\n *\n * The attributes defined here are shared across all source components available for user modification.\n */\nexport const componentNameToModifyAttribute: ComponentNameToModifyAttribute = {\n 'icon-name-3-resolutions': 'icon-name-3-resolutions',\n 'content-text-3-resolutions': 'content-text-3-resolutions',\n // r-button owns its own label and icon attributes — one component per\n // documented setting — but reuses the editors those names already resolve\n // to, so no new editor component is needed for either.\n 'button-label-3-resolutions': 'content-text-3-resolutions',\n 'button-icon-3-resolutions': 'icon-name-3-resolutions',\n // The preset is an object of three axes rather than one scalar, and the\n // button takes a single link rather than the numbered list rich text uses,\n // so neither fits an existing editor. Position and disabled are plain\n // two-value choices and go through the shared select.\n 'button-preset-3-resolutions': 'button-preset-3-resolutions',\n 'button-link-3-resolutions': 'button-link-3-resolutions',\n 'button-icon-position-3-resolutions': 'button-icon-position-3-resolutions',\n 'button-disabled-3-resolutions': 'button-disabled-3-resolutions',\n // Both of the divider's settings are closed sets of a handful of values, so\n // both go through the shared select and neither needs an editor built for it.\n 'divider-style-3-resolutions': 'divider-style-3-resolutions',\n 'divider-thickness-3-resolutions': 'divider-thickness-3-resolutions',\n // The embed URL is the one field in the library whose value is accepted or\n // refused rather than merely stored, so it gets an editor that can say which\n // it was while the author is still looking at the field. Its title is plain\n // text, and the other two are closed sets.\n 'embed-url-3-resolutions': 'embed-url-3-resolutions',\n 'embed-title-3-resolutions': 'image-text-3-resolutions',\n 'embed-aspect-ratio-3-resolutions': 'embed-aspect-ratio-3-resolutions',\n 'embed-loading-3-resolutions': 'embed-loading-3-resolutions',\n 'enclosing-tag-3-resolutions': 'enclosing-tag-3-resolutions',\n 'links-3-resolutions': 'links-3-resolutions',\n // r-list owns its own attribute names — one component per documented\n // setting — but reuses existing editors wherever one fits: the multi-line\n // text field for its items, the numbered link list for its links, and the\n // plain text field for where numbering starts (the number editor is\n // pixel-specific, and a numbering start is not a length). Kind, marker and\n // reversed are closed sets and go through the shared select.\n 'list-items-3-resolutions': 'content-text-3-resolutions',\n 'list-kind-3-resolutions': 'list-kind-3-resolutions',\n 'list-marker-3-resolutions': 'list-marker-3-resolutions',\n 'list-start-3-resolutions': 'image-text-3-resolutions',\n 'list-reversed-3-resolutions': 'list-reversed-3-resolutions',\n 'list-links-3-resolutions': 'links-3-resolutions',\n // r-accordion owns its own attribute names — one component per documented\n // setting — and reuses existing editors for everything that fits: the\n // multi-line text field for the summary and the detail, and the numbered\n // link list for the detail's links. Whether it starts open and whether the\n // summary is a heading are closed sets and go through the shared select.\n 'accordion-summary-3-resolutions': 'content-text-3-resolutions',\n 'accordion-detail-3-resolutions': 'content-text-3-resolutions',\n 'accordion-open-3-resolutions': 'accordion-open-3-resolutions',\n 'accordion-heading-level-3-resolutions': 'accordion-heading-level-3-resolutions',\n 'accordion-links-3-resolutions': 'links-3-resolutions',\n 'content-title-3-resolutions': 'content-title-3-resolutions',\n 'media-selector-3-resolutions': 'media-selector-3-resolutions',\n 'pass-through-image-attributes-alt-3-resolutions': 'image-alt-text-3-resolutions',\n 'pass-through-image-attributes-width-3-resolutions': 'image-intrinsic-width-3-resolutions',\n 'pass-through-image-attributes-height-3-resolutions': 'image-intrinsic-height-3-resolutions',\n 'pass-through-image-attributes-sizes-3-resolutions': 'image-sizes-3-resolutions',\n 'pass-through-image-attributes-loading-3-resolutions': 'image-loading-3-resolutions',\n 'pass-through-image-attributes-fetchpriority-3-resolutions': 'image-fetchpriority-3-resolutions',\n 'cloudinary-transformations-3-resolutions': 'cloudinary-transformations-3-resolutions',\n 'video-selector-3-resolutions': 'video-selector-3-resolutions',\n 'video-poster-selector-3-resolutions': 'video-poster-selector-3-resolutions',\n 'pass-through-video-attributes-controls-3-resolutions': 'video-controls-3-resolutions',\n 'pass-through-video-attributes-autoplay-3-resolutions': 'video-autoplay-3-resolutions',\n 'pass-through-video-attributes-loop-3-resolutions': 'video-loop-3-resolutions',\n 'pass-through-video-attributes-muted-3-resolutions': 'video-muted-3-resolutions',\n 'pass-through-video-attributes-playsinline-3-resolutions': 'video-playsinline-3-resolutions',\n 'pass-through-video-attributes-preload-3-resolutions': 'video-preload-3-resolutions',\n 'pass-through-video-attributes-width-3-resolutions': 'video-intrinsic-width-3-resolutions',\n 'pass-through-video-attributes-height-3-resolutions': 'video-intrinsic-height-3-resolutions',\n 'video-transformations-3-resolutions': 'video-transformations-3-resolutions',\n};\n","import { AttributeListForComponentTypes } from '../../../types';\n\n/**\n * Mapping of component IDs to their supported modifiable attributes.\n *\n * Each component type can have a specific list of attributes that users are allowed to modify\n * in the editor. This mapping defines which attributes are available for each component type.\n *\n * Note: This defines which attributes each component supports, while component-name-to-modify-attribute.ts\n * defines which editor component should be used to modify each attribute type.\n * todo: this is a little confusing and might require a deeper look into how RuleCMS uses this.\n */\n/**\n * Empty on purpose. Every component this library ships declares its editable\n * attributes through its own `attribute-edit-mode-configs.ts`, which is the\n * path the composer's Modify drawer reads. Listing an attribute here as well\n * shows it twice — once through the legacy shared-attribute editor, which has\n * no entry for modern `-3-resolutions` names and renders an empty section.\n */\nexport const attributeListForComponentTypes: AttributeListForComponentTypes = {};\n","import { cardGroups } from './base-components/display/card-groups';\nimport { Card, ComponentMetadata, ComponentMetadataForEditing, DisplayCardEntry } from './types';\nimport { componentNameToModifyAttribute } from './base-components/display/component-attributes/component-name-to-modify-attribute';\nimport { attributeListForComponentTypes } from './base-components/display/component-attributes/attribute-list-for-component-types';\n\nlet returnValue: ComponentMetadataForEditing | undefined;\n\n// Flatten nested card groups and cards into a flat array of entries, then converts to a lookup map by entry ID\nexport const getComponentMetadataForEditing = () => {\n if (returnValue) {\n return returnValue;\n }\n const entries = cardGroups.reduce<DisplayCardEntry[]>(\n (all, current) =>\n all.concat(current.cards.reduce<DisplayCardEntry[]>((cards, card: Card) => cards.concat(card.entries as DisplayCardEntry[]), [])),\n []\n );\n const componentMetadata: Record<string, ComponentMetadata> = entries.reduce(\n (acc, entry) => {\n acc[entry.id] = {\n defaultAttributeValues: entry.defaultAttributeValues,\n attributeEditModeConfigs: entry.attributeEditModeConfigs,\n };\n return acc;\n },\n {} as Record<string, ComponentMetadata>\n );\n returnValue = {\n attributeListForComponentTypes,\n componentNameToModifyAttribute,\n componentMetadata,\n };\n return returnValue;\n};\n\n","import type { EditorPreviewCardEntry } from '../../../types';\nimport { ComponentIdentifiers } from '../../../component-identifiers';\n\nexport const cardEntries: EditorPreviewCardEntry[] = [\n { id: ComponentIdentifiers.rText, icon: 'T', label: 'Text' },\n { id: ComponentIdentifiers.cloudinaryAdvancedImage, icon: '🖼️', label: 'Image' },\n { id: ComponentIdentifiers.rVideo, icon: '🎬', label: 'Video' },\n { id: ComponentIdentifiers.rIcon, icon: '◆', label: 'Icon' },\n { id: ComponentIdentifiers.rButton, icon: '⬭', label: 'Button' },\n { id: ComponentIdentifiers.rDivider, icon: '━', label: 'Divider' },\n { id: ComponentIdentifiers.rEmbed, icon: '⧉', label: 'Embed' },\n { id: ComponentIdentifiers.rList, icon: '☰', label: 'List' },\n { id: ComponentIdentifiers.rAccordion, icon: '▸', label: 'Accordion' },\n];\n","import type { EditorPreviewCardGroup } from '../../types';\nimport { cardEntries } from './card-entries/card-entries';\n\nexport const cardGroups: EditorPreviewCardGroup[] = [\n {\n title: 'Elements',\n showInitially: true,\n cards: [{ title: 'Base Elements', entries: cardEntries }],\n },\n];\n","import type { PreviewComponents, EditorPreviewCardGroup } from './types';\nimport { cardGroups } from './base-components/editor-preview/card-groups';\n\nlet cachedPreviewComponents: PreviewComponents | undefined;\n\n/**\n * Returns the preview card groups for drag and drop functionality.\n * This replaces the dragDropPreviewCardGroups export.\n */\nexport const getPreviewCardGroups = (): EditorPreviewCardGroup[] => {\n return cardGroups;\n};\n\n/**\n * Returns a lookup map of preview components by entry ID.\n * Results are cached after the first call.\n */\nexport const getPreviewComponents = (): PreviewComponents => {\n if (cachedPreviewComponents) {\n return cachedPreviewComponents;\n }\n\n // Flatten nested card groups and cards into a flat array of entries\n const entries: EditorPreviewCardGroup['cards'][number]['entries'] = [];\n for (const group of cardGroups) {\n for (const card of group.cards) {\n entries.push(...card.entries);\n }\n }\n\n // Convert to a lookup map by entry ID\n cachedPreviewComponents = entries.reduce(\n (acc, entry) => {\n acc[entry.id] = entry;\n return acc;\n },\n {} as PreviewComponents\n );\n\n return cachedPreviewComponents;\n};\n","/**\n * SSR-safe rules for `r-button` pseudo-classes.\n *\n * widget-angular injects this once per library via `ComponentLibraryModule.stylesheet`.\n * The sheet owns `background-color`, `color`, and `border-color` so `:hover`\n * can win — those properties on an inline style beat any stylesheet rule.\n * Resting values arrive as `--rulecms-button-fill` / `-ink` / `-border` on\n * the element. A column background override rewrites the fill slots and\n * derives hover/active with `color-mix`, so an arbitrary red does not keep\n * the brand-blue hover.\n *\n * Outline is never cleared: the designed ring is a `box-shadow` on\n * `:focus-visible`, on top of the browser's native focus outline.\n */\nexport const BUTTON_LIBRARY_STYLESHEET = `\n[data-rulecms-button] {\n background-color: var(--rulecms-button-fill);\n color: var(--rulecms-button-ink);\n border-color: var(--rulecms-button-border, var(--rulecms-button-fill));\n}\n[data-rulecms-button]:hover:not(:disabled):not([aria-disabled=\"true\"]) {\n background-color: var(--rulecms-button-fill-hover);\n color: var(--rulecms-button-ink-hover, var(--rulecms-button-ink));\n border-color: var(--rulecms-button-fill-hover);\n}\n[data-rulecms-button]:active:not(:disabled):not([aria-disabled=\"true\"]) {\n background-color: var(--rulecms-button-fill-active);\n border-color: var(--rulecms-button-fill-active);\n}\n[data-rulecms-button][data-rulecms-button-variant=\"outline\"]:hover:not(:disabled):not([aria-disabled=\"true\"]),\n[data-rulecms-button][data-rulecms-button-variant=\"ghost\"]:hover:not(:disabled):not([aria-disabled=\"true\"]) {\n border-color: var(--rulecms-button-border, var(--rulecms-button-ink));\n}\n[data-rulecms-button][data-rulecms-button-variant=\"link\"]:hover:not(:disabled):not([aria-disabled=\"true\"]),\n[data-rulecms-button][data-rulecms-button-variant=\"link\"]:active:not(:disabled):not([aria-disabled=\"true\"]) {\n background-color: transparent;\n border-color: transparent;\n}\n[data-rulecms-button]:focus-visible {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--rulecms-button-ring, var(--rulecms-button-ink)) 40%, transparent);\n}\n`.trim();\n","import { getSourceComponentsPlugin } from './get-source-components-plugin';\nimport { getComponentMetadataForEditing } from './get-component-metadata-for-editing';\nimport { getPreviewComponents, getPreviewCardGroups } from './get-preview-components';\nimport { BUTTON_LIBRARY_STYLESHEET } from './base-components/display/components/r-button/button-library-stylesheet';\n\n/**\n * ComponentLibraryModule conformance (the @rulecms/widget-angular contract).\n *\n * This package is the DEFAULT component library. It conforms to the contract\n * STRUCTURALLY — it has no runtime dependency on @rulecms/widget-angular.\n * Consumers register it, e.g.:\n *\n * libraries: { default: () => import('@rulecms/source-components-angular') }\n *\n * or statically import the module for SSR pages.\n */\n\nexport const manifest = {\n id: 'default',\n version: '0.2.0',\n angularPeerRange: '>=17.0.0',\n};\n\n/** The render surface: component type → renderable entry. */\nexport const components = getSourceComponentsPlugin().components;\n\n/**\n * Optional `ComponentLibraryModule.stylesheet`. widget-angular injects this\n * once per library as an SSR `<style>` tag. v1 is the button hover / focus /\n * active rules; later interactive cards append here.\n */\nexport const stylesheet = BUTTON_LIBRARY_STYLESHEET;\n\n/** The editor surface: palette + attribute metadata for the RuleCMS composer. */\nexport const editor = {\n previewComponents: getPreviewComponents(),\n previewCardGroups: getPreviewCardGroups(),\n componentMetadata: getComponentMetadataForEditing(),\n};\n","import type { InlineMarks, MarkupRun, MarkupSpanRun } from './parse-inline-markers';\n\n/**\n * Canonical letter order, so the same span always serializes the same way and\n * a source-mode author sees `{bi1|…}` rather than whichever order an editor\n * happened to apply the marks in.\n */\nconst MARK_LETTERS: ReadonlyArray<readonly [keyof InlineMarks, string]> = [\n ['bold', 'b'],\n ['italic', 'i'],\n ['strike', 's'],\n];\n\nconst markLetters = (marks: InlineMarks): string =>\n MARK_LETTERS.filter(([mark]) => marks[mark])\n .map(([, letter]) => letter)\n .join('');\n\n/**\n * A span back to its marker. Text that carries neither marks nor an index is\n * emitted bare: a marker with nothing to say would only be noise an author has\n * to read past, and it round-trips to the same runs either way.\n */\nconst formatSpan = (run: MarkupSpanRun): string => {\n const letters = markLetters(run.marks);\n const index = run.index === undefined ? '' : `${run.index}`;\n\n if (letters === '' && index === '') {\n return run.text;\n }\n return `{${letters}${index}|${run.text}}`;\n};\n\n/** One run as authored text. */\nexport function formatInlineMarker(run: MarkupRun): string {\n switch (run.kind) {\n case 'text':\n return run.text;\n case 'break':\n return '{br|}';\n default:\n return formatSpan(run);\n }\n}\n\n/**\n * Runs back to the string they were parsed from.\n *\n * This is the writer half of the grammar, and it lives beside the parser so\n * that an editor never hand-assembles marker syntax. `parseInlineMarkers` and\n * this function are inverses for anything the parser produces, which is what\n * lets a rich editor round-trip through source mode without rewriting content\n * the author did not touch.\n */\nexport function serializeInlineMarkers(runs: readonly MarkupRun[]): string {\n return runs.map(formatInlineMarker).join('');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defaultAttributeValues","MARK_LETTERS","resolveNoContainer","resolveRendersOwnElement","attributeEditModeConfigs","displayCardEntry","serializeTransformations","parseTransformationString","cardEntries","rTextCardEntry","cloudinaryAdvancedImageCardEntry","rVideoCardEntry","rIconCardEntry","rButtonCardEntry","rDividerCardEntry","rEmbedCardEntry","rListCardEntry","rAccordionCardEntry","cardGroups"],"mappings":";;;;;AAEO,MAAM,oBAAoB,GAC/B,+DAA+D;AAE1D,MAAMA,wBAAsB,GAA4B;AAC7D,IAAA;AACE,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,aAAa,EAAE;AACb,YAAA,GAAG,EAAE,oBAAoB;AAC1B,SAAA;AACF,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,6BAA6B;AACnC,QAAA,aAAa,EAAE,EAAE;AAClB,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,qBAAqB;AAC3B,QAAA,aAAa,EAAE,EAAE;AAClB,KAAA;CACF;;ACpBD;;;;;;;;;;;;;;AAcG;AACI,MAAM,cAAc,GAAG;;IAE5B,GAAG;IACH,KAAK;;IAEL,MAAM;;IAEN,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;;IAEJ,QAAQ;IACR,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;;IAEH,OAAO;IACP,MAAM;;IAEN,KAAK;IACL,MAAM;;IAEN,YAAY;IACZ,GAAG;;IAEH,KAAK;IACL,KAAK;;IAEL,GAAG;IACH,KAAK;IACL,KAAK;;IAEL,MAAM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