@vectoriox/iox-ui 5.37.0 → 5.38.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.
Files changed (38) hide show
  1. package/actions-core/index.d.ts +6 -1
  2. package/composite-core/index.d.ts +294 -14
  3. package/design-core/index.d.ts +130 -3
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +9 -3
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +694 -59
  7. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs +172 -3
  9. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +410 -10
  11. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-media-core.mjs +571 -0
  13. package/fesm2022/vectoriox-iox-ui-media-core.mjs.map +1 -0
  14. package/fesm2022/vectoriox-iox-ui.mjs +478 -118
  15. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  16. package/generation-core/index.d.ts +167 -4
  17. package/index.d.ts +206 -24
  18. package/media-core/index.d.ts +277 -0
  19. package/media-core/package.json +3 -0
  20. package/package.json +5 -1
  21. package/src/actions-core/element-actions.ts +9 -2
  22. package/src/composite-core/composite-node.ts +4 -0
  23. package/src/composite-core/lightbox.ts +192 -0
  24. package/src/composite-core/public-api.ts +3 -0
  25. package/src/composite-core/slider-runtime.ts +180 -0
  26. package/src/composite-core/slider.ts +378 -0
  27. package/src/composite-core/structure.ts +17 -4
  28. package/src/design-core/element-styles.ts +27 -0
  29. package/src/design-core/flavor-spec.generated.ts +146 -2
  30. package/src/generation-core/baseline-roles.ts +2 -0
  31. package/src/generation-core/compose-site.ts +80 -4
  32. package/src/generation-core/node-baselines.generated.ts +148 -4
  33. package/src/generation-core/patterns.ts +17 -0
  34. package/src/generation-core/site-spec.generated.ts +164 -0
  35. package/src/media-core/public-api.ts +9 -0
  36. package/src/media-core/video-runtime.ts +239 -0
  37. package/src/media-core/video.ts +443 -0
  38. package/styles/iox-design.css +96 -0
@@ -1 +1 @@
1
- {"version":3,"file":"vectoriox-iox-ui-composite-core.mjs","sources":["../../../projects/iox-ui/src/composite-core/composite-node.ts","../../../projects/iox-ui/src/composite-core/composite-kinds.ts","../../../projects/iox-ui/src/composite-core/accordion.ts","../../../projects/iox-ui/src/composite-core/accordion-runtime.ts","../../../projects/iox-ui/src/composite-core/disclosure.ts","../../../projects/iox-ui/src/composite-core/badge.ts","../../../projects/iox-ui/src/composite-core/card.ts","../../../projects/iox-ui/src/composite-core/structure.ts","../../../projects/iox-ui/src/composite-core/public-api.ts","../../../projects/iox-ui/src/composite-core/vectoriox-iox-ui-composite-core.ts"],"sourcesContent":["import { ElementStyleTarget, readOwnedTrait, writeOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\n/**\n * The node shape composite-core reads and writes — both a builder `ComponentNode` (values in\n * `traits[].default` / `styleTraits`) and a saved layout node (flat `props` / `styleProps`), the same\n * dual shape design-core's element styles already speak. A composite is a tree of ORDINARY nodes\n * (composite-components plan §1): this module only adds the `role` each part carries.\n */\nexport interface CompositeTrait {\n name: string;\n default?: unknown;\n}\n\nexport interface CompositeLayer {\n styleProps?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface CompositeNode extends ElementStyleTarget {\n id?: string;\n /** The part this node plays in its composite (`card.title`). Additive; saved; read by the shared CSS\n * (`iox-role-<role>`), the structure guard and the composite's own editors. */\n role?: string;\n /** An item's identity inside its composite (Accordion `k1`… — composite plan §3, `itemKey`). Additive; saved.\n * From content, a row's key is the row's own id and the template carries none. */\n itemKey?: string;\n /** For a targeted state (`trigger-on`): the node whose state drives it. */\n stateTriggers?: Partial<Record<string, string>>;\n label?: string;\n props?: Record<string, unknown>;\n traits?: CompositeTrait[];\n responsive?: Partial<Record<string, CompositeLayer>>;\n children?: CompositeNode[];\n}\n\n/** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one\n * (the builder's `createConfig`, generation-core's `createSerializedNode`), with these props and this\n * element style. `key` is stable per recipe node — a consumer that needs deterministic ids builds them\n * from it (generation-core: `<root id>-<key>`). */\nexport interface CompositeNodeSpec {\n key: string;\n type: string;\n props?: Readonly<Record<string, unknown>>;\n elementStyle?: string | null;\n}\n\nexport type CompositeNodeFactory = (spec: CompositeNodeSpec) => CompositeNode;\n\n/** A recipe part: a NEW node (`create`) playing `role` under `label`, with the layout `base` styles its recipe\n * gives it — its LOOK is its element style. Shared by every recipe (Accordion, Disclosure). */\nexport function makeCompositePart(create: CompositeNodeFactory, spec: CompositeNodeSpec, role: string | null, label: string | undefined,\n base?: Readonly<Record<string, string>>): CompositeNode {\n const node = create(spec);\n if (role) node.role = role;\n if (label) node.label = label;\n if (base) writeStyles(node, base);\n return node;\n}\n\nconst usesTraits = (node: CompositeNode): boolean => Array.isArray(node.traits);\n\n/** A content trait's value — `traits[].default` on a builder node, `props[name]` on a saved one. */\nexport function readProp(node: CompositeNode, name: string): unknown {\n return usesTraits(node) ? node.traits!.find(t => t.name === name)?.default : node.props?.[name];\n}\n\n/** Write a content trait. False when a builder node has no such trait (the value would be dropped). */\nexport function writeProp(node: CompositeNode, name: string, value: unknown): boolean {\n if (usesTraits(node)) {\n const trait = node.traits!.find(t => t.name === name);\n if (!trait) return false;\n trait.default = value;\n return true;\n }\n node.props = { ...(node.props ?? {}), [name]: value };\n return true;\n}\n\n/** A base style value (the node's own, either shape). */\nexport function readStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n\n/** Write base style values; returns the names the node has no slot for (a builder node drops them). */\nexport function writeStyles(node: CompositeNode, values: Readonly<Record<string, string>>): string[] {\n const missing: string[] = [];\n for (const [name, value] of Object.entries(values)) {\n if (!writeOwnedTrait(node, { trait: name }, value)) missing.push(name);\n }\n return missing;\n}\n\n/** Set style values in one breakpoint layer (`responsive[bp].styleProps`, the shape both renderers'\n * shared `planResponsiveRules` reads). */\nexport function writeLayerStyles(node: CompositeNode, breakpoint: string, values: Readonly<Record<string, string>>): void {\n const responsive = { ...(node.responsive ?? {}) };\n const layer: CompositeLayer = { ...(responsive[breakpoint] ?? {}) };\n layer.styleProps = { ...(layer.styleProps ?? {}), ...values };\n responsive[breakpoint] = layer;\n node.responsive = responsive;\n}\n\n/** Remove style keys from one breakpoint layer; an emptied layer (and an emptied map) is dropped. */\nexport function clearLayerStyles(node: CompositeNode, breakpoint: string, names: ReadonlyArray<string>): void {\n const layer = node.responsive?.[breakpoint];\n if (!layer?.styleProps) return;\n const styleProps = { ...layer.styleProps };\n for (const name of names) delete styleProps[name];\n const next: CompositeLayer = { ...layer };\n if (Object.keys(styleProps).length) next.styleProps = styleProps;\n else delete next.styleProps;\n const responsive = { ...(node.responsive ?? {}) };\n if (Object.keys(next).length) responsive[breakpoint] = next;\n else delete responsive[breakpoint];\n node.responsive = Object.keys(responsive).length ? responsive : undefined;\n}\n\n/** A breakpoint layer's own value for one style key. */\nexport function readLayerStyle(node: CompositeNode, breakpoint: string, name: string): unknown {\n return node.responsive?.[breakpoint]?.styleProps?.[name];\n}\n\n/** Depth-first: `node`, then every descendant. */\nexport function walkComposite(node: CompositeNode, visit: (node: CompositeNode, parent: CompositeNode | null) => void, parent: CompositeNode | null = null): void {\n visit(node, parent);\n for (const child of node.children ?? []) walkComposite(child, visit, node);\n}\n\n/**\n * The first descendant of `root` playing `role`. Never descends into a NESTED composite of the same\n * root role (a card inside a card's content keeps its own parts).\n */\nexport function findByRole(root: CompositeNode, role: string): CompositeNode | undefined {\n for (const child of root.children ?? []) {\n if (child.role === role) return child;\n if (child.role === root.role && root.role) continue;\n const hit = findByRole(child, role);\n if (hit) return hit;\n }\n return undefined;\n}\n\n/** The node's parent inside `root`, or null. */\nexport function parentInComposite(root: CompositeNode, node: CompositeNode): CompositeNode | null {\n for (const child of root.children ?? []) {\n if (child === node) return root;\n const hit = parentInComposite(child, node);\n if (hit) return hit;\n }\n return null;\n}\n\n/** Detach `node` from its parent inside `root`. True when it was found. */\nexport function removeFromComposite(root: CompositeNode, node: CompositeNode): boolean {\n const parent = parentInComposite(root, node);\n if (!parent?.children) return false;\n parent.children.splice(parent.children.indexOf(node), 1);\n return true;\n}\n","/**\n * The open/close composites' kinds and roles (CC2 Accordion, CC2.1 Disclosure — composite plan T9 / T21). ONE\n * family: a Disclosure is a one-item accordion whose ROOT is its item, so both run the same state machine, the\n * same attribute planners and the same runtime (`accordion-runtime.ts`). Every consumer that treats \"an item\",\n * \"a header\" or \"a panel\" alike asks these predicates, never a role literal.\n */\n\nexport enum CompositeKind {\n Accordion = 'accordion',\n Disclosure = 'disclosure',\n}\n\nexport enum AccordionRole {\n Accordion = 'accordion',\n Item = 'accordion.item',\n Trigger = 'accordion.trigger',\n Icon = 'accordion.icon',\n Panel = 'accordion.panel',\n}\n\n/**\n * DISCLOSURE (\"Read more\") — one trigger, one panel. The root IS its item (it carries the item key and\n * `data-iox-on`); the trigger holds two words, the one shown while closed (`more`) and the one shown while open\n * (`less`), swapped by the Item open state — never by script.\n */\nexport enum DisclosureRole {\n Disclosure = 'disclosure',\n Trigger = 'disclosure.trigger',\n More = 'disclosure.more',\n Less = 'disclosure.less',\n Icon = 'disclosure.icon',\n Panel = 'disclosure.panel',\n}\n\ninterface RoleLike { role?: string | null }\n\n/** The roles each kind plays in the shared runtime. */\nexport interface CompositeKindRoles {\n root: string;\n item: string;\n trigger: string;\n panel: string;\n icon: string;\n}\n\nexport const COMPOSITE_KIND_ROLES: Readonly<Record<CompositeKind, CompositeKindRoles>> = {\n [CompositeKind.Accordion]: { root: AccordionRole.Accordion, item: AccordionRole.Item, trigger: AccordionRole.Trigger, panel: AccordionRole.Panel, icon: AccordionRole.Icon },\n [CompositeKind.Disclosure]: { root: DisclosureRole.Disclosure, item: DisclosureRole.Disclosure, trigger: DisclosureRole.Trigger, panel: DisclosureRole.Panel, icon: DisclosureRole.Icon },\n};\n\nconst KINDS = Object.values(CompositeKind);\nconst rolesOf = (pick: keyof CompositeKindRoles): ReadonlySet<string> => new Set(KINDS.map(k => COMPOSITE_KIND_ROLES[k][pick]));\nconst ROOT_ROLES = rolesOf('root');\nconst ITEM_ROLES = rolesOf('item');\nconst TRIGGER_ROLES = rolesOf('trigger');\nconst PANEL_ROLES = rolesOf('panel');\n\n/** The kind a role belongs to (`disclosure.panel` → Disclosure), or null for any other role. */\nexport function compositeKindOfRole(role: string | null | undefined): CompositeKind | null {\n const head = role?.split('.')[0];\n return (KINDS as string[]).includes(head ?? '') ? head as CompositeKind : null;\n}\n\n/** A root that runs the open/close runtime (an Accordion or a Disclosure). */\nexport function isCompositeRoot(node: RoleLike | null | undefined): boolean {\n return !!node?.role && ROOT_ROLES.has(node.role);\n}\n\n/** An ITEM — an accordion's item, or a disclosure (its own item). */\nexport function isCompositeItem(node: RoleLike | null | undefined): boolean {\n return !!node?.role && ITEM_ROLES.has(node.role);\n}\n\n/** A trigger — rendered as a `<button>` that opens its item, never a link. */\nexport function isCompositeTrigger(node: RoleLike | null | undefined): boolean {\n return !!node?.role && TRIGGER_ROLES.has(node.role);\n}\n\n/** A panel — rendered inside the track + region the one hiding rule collapses. */\nexport function isCompositePanel(node: RoleLike | null | undefined): boolean {\n return !!node?.role && PANEL_ROLES.has(node.role);\n}\n\nexport function isDisclosureRoot(node: RoleLike | null | undefined): boolean {\n return node?.role === DisclosureRole.Disclosure;\n}\n\n/** True for any part of a disclosure (its root included). */\nexport function isDisclosurePart(node: RoleLike | null | undefined): boolean {\n return compositeKindOfRole(node?.role) === CompositeKind.Disclosure;\n}\n\n/** The composite root a node belongs to: the nearest ancestor (or the node itself) that is one. `path` = the\n * node's ancestors, root first. */\nexport function compositeRootOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isCompositeRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCompositeRoot(path[i])) return path[i];\n return null;\n}\n\n/** The item a node sits in — the nearest item of either kind (itself when it is one) — or null. An accordion\n * root ends the walk (its items are below it). */\nexport function compositeItemOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isCompositeItem(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (isCompositeItem(path[i])) return path[i];\n if (isCompositeRoot(path[i])) return null;\n }\n return null;\n}\n","import { readOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\nimport {\n AccordionRole, COMPOSITE_KIND_ROLES, CompositeKind, compositeKindOfRole,\n} from './composite-kinds';\nimport {\n CompositeNode, CompositeNodeFactory, findByRole, makeCompositePart, readProp, removeFromComposite, walkComposite, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * ACCORDION (CC2 — composite K1; complex-components boards 3, 4 and 9, APPROVED 2026-10-20). Not a\n * component: a recipe of ordinary nodes, each part carrying a role, so every part is selectable on the\n * canvas, in the layer tree and the breadcrumb, and wears its own element style (R2).\n *\n * Container `box` role accordion traits multiple · defaultOn (Manual)\n * — or a Repeater bound to a list role accordion ONE template item (From content, R3)\n * └─ Container `accordion-item` role accordion.item itemKey k1 … (Manual) · the row's id (From content)\n * ├─ LinkedContainer `accordion-trigger` role accordion.trigger → <hN><button> (the question's level)\n * │ ├─ Heading `h3` the question (rendered as phrasing inside the button)\n * │ └─ Icon `icon` role accordion.icon Item open → rotate\n * └─ Container `accordion-panel` role accordion.panel inside a hidden=\"until-found\" region\n * └─ Text `body` the answer\n *\n * The behaviour is BUILT IN (composite plan D1 = B): which items are open is one state machine\n * (`nextAccordionState`), the ARIA and DOM state one planner (`accordionItemState` and the attribute\n * functions), the keyboard one key map — read by the builder canvas, both engine paths and the composer.\n */\n\n/** The behaviour options a composite root stores as ordinary TRAITS (composite plan §3). */\nexport enum CompositeBehaviourTrait {\n /** Several items may be open at once (\"Allow several open\"). */\n Multiple = 'multiple',\n /** Which items open by default: first · none · all. */\n DefaultOn = 'defaultOn',\n}\n\nexport enum AccordionDefaultOn {\n First = 'first',\n None = 'none',\n All = 'all',\n}\n\nexport const ACCORDION_DEFAULT_ONS: ReadonlyArray<AccordionDefaultOn> = [AccordionDefaultOn.First, AccordionDefaultOn.None, AccordionDefaultOn.All];\n\n/** Behaviour ▸ Icon — a preset over the items' icons, never a stored trait (detected from the icons). */\nexport enum AccordionIcon {\n Chevron = 'chevron',\n Plus = 'plus',\n None = 'none',\n}\n\nexport const ACCORDION_ICONS: ReadonlyArray<AccordionIcon> = [AccordionIcon.Chevron, AccordionIcon.Plus, AccordionIcon.None];\n\n/** Each icon's glyph and how far it turns when its item opens (board 4: a chevron flips, a plus becomes ×). */\nexport const ACCORDION_ICON_GLYPH: Readonly<Record<Exclude<AccordionIcon, AccordionIcon.None>, { iconClass: string; turn: string }>> = {\n [AccordionIcon.Chevron]: { iconClass: 'ph ph-caret-down', turn: '180deg' },\n [AccordionIcon.Plus]: { iconClass: 'ph ph-plus', turn: '45deg' },\n};\n\n/** The item-open style state (a part INSIDE an item, styled by its item being open — board 9 \"Item open\"). */\nexport const ITEM_OPEN_STATE = 'trigger-on';\n/** A part that IS on (an item, its header, its panel — board 9 \"Open\"). */\nexport const ON_STATE = 'on';\n\n/** Items from content default to twenty rows (board 9 Q13). */\nexport const ACCORDION_CONTENT_LIMIT = 20;\n\nexport interface AccordionWords {\n question: string;\n answer: string;\n}\n\n/** The words a fresh accordion starts with — generic, the author's to replace (as Card v2's are). */\nexport const ACCORDION_WORDS: ReadonlyArray<AccordionWords> = [\n { question: 'Write the first question people ask', answer: 'Answer it plainly, in two or three short sentences.' },\n { question: 'Write the second question', answer: 'Answer it plainly, in two or three short sentences.' },\n { question: 'Write the third question', answer: 'Answer it plainly, in two or three short sentences.' },\n];\nexport const ACCORDION_NEW_ITEM_WORDS: Readonly<AccordionWords> = { question: 'Write a new question', answer: 'Answer it plainly, in two or three short sentences.' };\n\nenum Type {\n Container = 'Container',\n LinkedContainer = 'LinkedContainer',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n Repeater = 'Repeater',\n}\n\nenum Style {\n Root = 'box',\n Item = 'accordion-item',\n Trigger = 'accordion-trigger',\n Question = 'h3',\n Icon = 'icon',\n Panel = 'accordion-panel',\n Answer = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\nconst HEADING_LEVELS = ['h2', 'h3', 'h4', 'h5', 'h6'];\nconst DEFAULT_LEVEL = 'h3';\n/** A linked trait the header must never carry: it is a button, not a link. */\nconst LINK_TYPE = 'linkType';\n\n/** What each part holds in the recipe — layout only; its LOOK is its element style. */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // The items are a column a token apart (`accordion-gap`: 0 for a divider list, 12px for cards).\n [AccordionRole.Accordion]: { display: 'flex', flexDirection: 'column', gap: 'var(--iox-accordion-gap)', width: '100%', minHeight: 'auto', height: 'auto' },\n [AccordionRole.Item]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n // The header is the whole row: the question takes the line, the icon sits at its end (board 4).\n [AccordionRole.Trigger]: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', width: '100%', minHeight: 'auto', height: 'auto', textAlign: 'start', cursor: 'pointer' },\n [AccordionRole.Icon]: { flexShrink: '0', fontSize: '22px', transitionDuration: 'var(--iox-dur-base)', transitionTimingFunction: 'var(--iox-ease-standard)' },\n [AccordionRole.Panel]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n};\n/** The question INHERITS the header's ink (board 4's wears table: the Question reads no colour token), so the\n * header's hover ink reaches the words; and it sits in the row with no margin of its own. */\nconst QUESTION_BASE: Readonly<Record<string, string>> = { color: 'inherit', margin: ZERO_BOX, flexGrow: '1', minWidth: '0px' };\nconst ANSWER_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n\n// ── recipe ──────────────────────────────────────────────────────────────────────────────────────\n\nexport interface AccordionOptions {\n /** The items' words (three generic items by default). */\n items?: ReadonlyArray<AccordionWords>;\n multiple?: boolean;\n defaultOn?: AccordionDefaultOn;\n icon?: AccordionIcon;\n}\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: AccordionRole | null, style: string,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n return makeCompositePart(create, { key, type, props, elementStyle: style }, role, label, role ? PART_BASE[role] : undefined);\n}\n\n/** The icon of an item (an accordion's, or a disclosure's — `role`); its Item-open state (the turn) is driven by\n * ITS item (`stateTriggers`). ONE builder for both kinds. */\nexport function buildCompositeIcon(create: CompositeNodeFactory, key: string, icon: Exclude<AccordionIcon, AccordionIcon.None>, itemId?: string,\n role: string = AccordionRole.Icon): CompositeNode {\n const glyph = ACCORDION_ICON_GLYPH[icon];\n const node = makeCompositePart(create, { key, type: Type.Icon, props: { iconClass: glyph.iconClass }, elementStyle: Style.Icon }, role, 'Icon', PART_BASE[AccordionRole.Icon]);\n node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { rotate: glyph.turn } };\n if (itemId) node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: itemId };\n return node;\n}\n\n/** One item: header (question + icon) and panel (answer). `key` makes every part's recipe key unique. */\nexport function buildAccordionItem(create: CompositeNodeFactory, words: AccordionWords, itemKey: string, icon: AccordionIcon = AccordionIcon.Chevron): CompositeNode {\n const item = make(create, `${itemKey}`, Type.Container, AccordionRole.Item, Style.Item, {}, 'Item');\n item.itemKey = itemKey;\n const trigger = make(create, `${itemKey}-trigger`, Type.LinkedContainer, AccordionRole.Trigger, Style.Trigger, {}, 'Header');\n const question = make(create, `${itemKey}-question`, Type.Heading, null, Style.Question, { content: words.question, level: DEFAULT_LEVEL }, 'Heading');\n writeStyles(question, QUESTION_BASE);\n trigger.children = [question, ...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, `${itemKey}-icon`, icon, item.id)])];\n const panel = make(create, `${itemKey}-panel`, Type.Container, AccordionRole.Panel, Style.Panel, {}, 'Panel');\n const answer = make(create, `${itemKey}-answer`, Type.Text, null, Style.Answer, { content: words.answer, tag: 'p' }, 'Text');\n writeStyles(answer, ANSWER_BASE);\n panel.children = [answer];\n item.children = [trigger, panel];\n return item;\n}\n\n/** A fresh Accordion: three items, one open at a time, the first open by default (board 4). */\nexport function buildAccordionRecipe(create: CompositeNodeFactory, options: AccordionOptions = {}): CompositeNode {\n const root = make(create, 'accordion', Type.Container, AccordionRole.Accordion, Style.Root, {}, 'Accordion');\n writeProp(root, CompositeBehaviourTrait.Multiple, options.multiple ?? false);\n writeProp(root, CompositeBehaviourTrait.DefaultOn, options.defaultOn ?? AccordionDefaultOn.First);\n const words = options.items ?? ACCORDION_WORDS;\n root.children = words.map((w, i) => buildAccordionItem(create, w, `k${i + 1}`, options.icon ?? AccordionIcon.Chevron));\n return root;\n}\n\n// ── reading a tree ──────────────────────────────────────────────────────────────────────────────\n\nexport function isAccordionRoot(node: { role?: string | null } | null | undefined): boolean {\n return node?.role === AccordionRole.Accordion;\n}\n\n/** True for any part of an accordion (its root included). */\nexport function isAccordionPart(node: { role?: string | null } | null | undefined): boolean {\n return !!node?.role && (node.role === AccordionRole.Accordion || node.role.startsWith(`${AccordionRole.Accordion}.`));\n}\n\n/** The accordion a node belongs to: the nearest ancestor (or the node itself) playing `accordion`.\n * `path` = the node's ancestors, root first. */\nexport function accordionRootOf<T extends { role?: string | null }>(node: T, path: ReadonlyArray<T>): T | null {\n if (isAccordionRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isAccordionRoot(path[i])) return path[i];\n return null;\n}\n\n/** The item a node sits in (the node itself when it is one), or null. */\nexport function accordionItemOf<T extends { role?: string | null }>(node: T, path: ReadonlyArray<T>): T | null {\n if (node.role === AccordionRole.Item) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (path[i].role === AccordionRole.Item) return path[i];\n if (isAccordionRoot(path[i])) return null;\n }\n return null;\n}\n\n/** True when the root takes its items from content (a Repeater bound to a list, R3). */\nexport function isAccordionFromContent(root: CompositeNode | null | undefined): boolean {\n return !!root && root.type === Type.Repeater;\n}\n\n/** The root's items in order — every item (Manual), or the one template item (From content). */\nexport function accordionItems(root: CompositeNode): CompositeNode[] {\n return (root.children ?? []).filter(c => c.role === AccordionRole.Item);\n}\n\nexport interface AccordionBehaviour {\n multiple: boolean;\n defaultOn: AccordionDefaultOn;\n}\n\nconst asBool = (v: unknown) => v === true || v === 'true';\n\n/** The root's behaviour (an unset trait reads its default: one at a time, the first open). */\nexport function accordionBehaviour(root: CompositeNode | null | undefined): AccordionBehaviour {\n const raw = root ? readProp(root, CompositeBehaviourTrait.DefaultOn) : undefined;\n const defaultOn = ACCORDION_DEFAULT_ONS.includes(raw as AccordionDefaultOn) ? raw as AccordionDefaultOn : AccordionDefaultOn.First;\n return { multiple: root ? asBool(readProp(root, CompositeBehaviourTrait.Multiple)) : false, defaultOn };\n}\n\n/** Behaviour ▸ Allow several open / Open by default. False when the node has no such trait. */\nexport function setAccordionBehaviour(root: CompositeNode, patch: Partial<AccordionBehaviour>): boolean {\n let ok = true;\n if (patch.multiple !== undefined) ok = writeProp(root, CompositeBehaviourTrait.Multiple, patch.multiple) && ok;\n if (patch.defaultOn !== undefined) ok = writeProp(root, CompositeBehaviourTrait.DefaultOn, patch.defaultOn) && ok;\n return ok;\n}\n\n/** The roles of the kind an item belongs to (an accordion item, or a disclosure — its own item). */\nfunction kindRolesOf(node: CompositeNode) {\n return COMPOSITE_KIND_ROLES[compositeKindOfRole(node.role) ?? CompositeKind.Accordion];\n}\n\n/** The header of an item (either kind). */\nexport function accordionTriggerOf(item: CompositeNode): CompositeNode | undefined {\n return findByRole(item, kindRolesOf(item).trigger);\n}\n\n/** The panel of an item (either kind). */\nexport function accordionPanelOf(item: CompositeNode): CompositeNode | undefined {\n return findByRole(item, kindRolesOf(item).panel);\n}\n\n/** A root's items — an accordion's (`accordionItems`), or a disclosure, which is its own one item. */\nexport function compositeItems(root: CompositeNode): CompositeNode[] {\n return compositeKindOfRole(root.role) === CompositeKind.Disclosure ? [root] : accordionItems(root);\n}\n\n/** The question: the first Heading inside the header — a disclosure's toggle holds no heading, so its first word\n * (the Text shown while closed, \"Read more\"). */\nexport function accordionQuestionOf(item: CompositeNode): CompositeNode | undefined {\n const trigger = accordionTriggerOf(item);\n let hit: CompositeNode | undefined;\n let text: CompositeNode | undefined;\n if (trigger) walkComposite(trigger, n => {\n if (!hit && n.type === Type.Heading) hit = n;\n if (!text && n.type === Type.Text) text = n;\n });\n return hit ?? text;\n}\n\n/** The answer: the first Text inside the panel. */\nexport function accordionAnswerOf(item: CompositeNode): CompositeNode | undefined {\n const panel = accordionPanelOf(item);\n let hit: CompositeNode | undefined;\n if (panel) walkComposite(panel, n => { if (!hit && n.type === Type.Text) hit = n; });\n return hit;\n}\n\nconst stripTags = (v: unknown) => String(v ?? '').replace(/<[^>]*>/g, '').trim();\n\n/** An item's name in the Items list and the layer tree: its question's words. */\nexport function accordionItemLabel(item: CompositeNode): string {\n const q = accordionQuestionOf(item);\n return q ? stripTags(readProp(q, 'content')) : '';\n}\n\n/** Items ▸ rename: the question's words. */\nexport function renameAccordionItem(item: CompositeNode, question: string): boolean {\n const q = accordionQuestionOf(item);\n return !!q && writeProp(q, 'content', question);\n}\n\n/** The heading level the header's wrapper renders (`<h3><button>`): its question's level. */\nexport function accordionHeadingLevel(trigger: { children?: ReadonlyArray<CompositeNode> | null } | null | undefined): string {\n let level: unknown;\n const visit = (n: CompositeNode) => {\n if (level !== undefined) return;\n if (n.type === Type.Heading) { level = readProp(n, 'level'); return; }\n for (const c of n.children ?? []) visit(c);\n };\n for (const c of trigger?.children ?? []) visit(c);\n return HEADING_LEVELS.includes(level as string) ? level as string : DEFAULT_LEVEL;\n}\n\n// ── editing (Items list, selection toolbar, Behaviour ▸ Icon) ──────────────────────────────────\n\n/** A key no item of `root` holds yet (`k4`…). */\nexport function nextItemKey(root: CompositeNode): string {\n const taken = new Set(accordionItems(root).map(i => i.itemKey).filter(Boolean));\n let n = taken.size + 1;\n while (taken.has(`k${n}`)) n++;\n return `k${n}`;\n}\n\n/** Items ▸ Add item (and the toolbar's \"Add item\"): a fresh item after `after` (or at the end), wearing the\n * accordion's current icon. Returns the new item. */\nexport function addAccordionItem(root: CompositeNode, create: CompositeNodeFactory, after?: CompositeNode | null, words: AccordionWords = ACCORDION_NEW_ITEM_WORDS): CompositeNode {\n const key = nextItemKey(root);\n const item = buildAccordionItem(create, words, key, detectAccordionIcon(root));\n const children = [...(root.children ?? [])];\n const at = after ? children.indexOf(after) : -1;\n children.splice(at < 0 ? children.length : at + 1, 0, item);\n root.children = children;\n return item;\n}\n\n/** Items ▸ drag to reorder: move an item to `toIndex` among the items. False when it is not an item of `root`. */\nexport function moveAccordionItem(root: CompositeNode, item: CompositeNode, toIndex: number): boolean {\n const children = [...(root.children ?? [])];\n const from = children.indexOf(item);\n if (from < 0 || item.role !== AccordionRole.Item) return false;\n children.splice(from, 1);\n const items = children.filter(c => c.role === AccordionRole.Item);\n const anchor = items[Math.max(0, Math.min(toIndex, items.length))];\n const at = anchor ? children.indexOf(anchor) : children.length;\n children.splice(at, 0, item);\n root.children = children;\n return true;\n}\n\nexport enum AccordionEditRefusal {\n /** An accordion keeps at least one item (composite plan T11). */\n LastItem = 'last-item',\n}\n\n/** Why removing `item` from `root` is refused, or null. */\nexport function accordionRemovalRefusal(root: CompositeNode | null | undefined, item: CompositeNode | null | undefined): AccordionEditRefusal | null {\n if (!root || item?.role !== AccordionRole.Item) return null;\n return accordionItems(root).length <= 1 ? AccordionEditRefusal.LastItem : null;\n}\n\n/** The icon the composite's items wear now (the first item's; None when it has no icon). Either kind. */\nexport function detectAccordionIcon(root: CompositeNode): AccordionIcon {\n const first = compositeItems(root)[0];\n const icon = first ? findByRole(first, kindRolesOf(root).icon) : undefined;\n if (!icon) return first ? AccordionIcon.None : AccordionIcon.Chevron;\n const cls = String(readProp(icon, 'iconClass') ?? '');\n return cls.includes(ACCORDION_ICON_GLYPH[AccordionIcon.Plus].iconClass.split(' ')[1]) ? AccordionIcon.Plus : AccordionIcon.Chevron;\n}\n\n/**\n * Behaviour ▸ Icon: every item's header shows the chevron, the plus, or no icon. A switch between glyphs\n * keeps the icon NODE (its styles and interactions) and changes its glyph and turn; None removes it, and a\n * glyph after None stamps it back from the recipe. Returns how many items changed.\n */\nexport function setAccordionIcon(root: CompositeNode, icon: AccordionIcon, create?: CompositeNodeFactory): number {\n let changed = 0;\n const iconRole = kindRolesOf(root).icon;\n for (const item of compositeItems(root)) {\n const trigger = accordionTriggerOf(item);\n if (!trigger) continue;\n const existing = findByRole(trigger, iconRole);\n if (icon === AccordionIcon.None) {\n if (existing && removeFromComposite(trigger, existing)) changed++;\n continue;\n }\n const glyph = ACCORDION_ICON_GLYPH[icon];\n if (existing) {\n writeProp(existing, 'iconClass', glyph.iconClass);\n existing.stateStyles = { ...(existing.stateStyles ?? {}), [ITEM_OPEN_STATE]: { ...(existing.stateStyles?.[ITEM_OPEN_STATE] ?? {}), rotate: glyph.turn } };\n changed++;\n } else if (create) {\n trigger.children = [...(trigger.children ?? []), buildCompositeIcon(create, `${item.itemKey ?? 'item'}-icon`, icon, item.id, iconRole)];\n changed++;\n }\n }\n return changed;\n}\n\n/** The node id every `trigger-on` state inside an item points at: its ITEM (`stateTriggers['trigger-on']`). */\nexport function itemOpenTriggerIds(root: CompositeNode): void {\n for (const item of accordionItems(root)) {\n if (!item.id) continue;\n walkComposite(item, n => {\n if (n === item || !n.stateStyles?.[ITEM_OPEN_STATE]) return;\n n.stateTriggers = { ...(n.stateTriggers ?? {}), [ITEM_OPEN_STATE]: item.id! };\n });\n }\n}\n\n// ── state machine ───────────────────────────────────────────────────────────────────────────────\n\n/** The keys open on first render: the first item, none, or all (From content: resolved against the rows). */\nexport function initialAccordionOpen(keys: ReadonlyArray<string>, defaultOn: AccordionDefaultOn): Set<string> {\n if (defaultOn === AccordionDefaultOn.None || !keys.length) return new Set();\n if (defaultOn === AccordionDefaultOn.All) return new Set(keys);\n return new Set([keys[0]]);\n}\n\n/** The open keys after toggling `key`: one at a time closes the others; several leaves them. */\nexport function nextAccordionState(open: ReadonlySet<string>, key: string, behaviour: Pick<AccordionBehaviour, 'multiple'>): Set<string> {\n if (open.has(key)) {\n const next = new Set(open);\n next.delete(key);\n return next;\n }\n return behaviour.multiple ? new Set([...open, key]) : new Set([key]);\n}\n\n/** The open keys after OPENING `key` (find-in-page, selecting into a closed panel, the `openItem` action). */\nexport function openAccordionItem(open: ReadonlySet<string>, key: string, behaviour: Pick<AccordionBehaviour, 'multiple'>): Set<string> {\n return open.has(key) ? new Set(open) : nextAccordionState(open, key, behaviour);\n}\n\n/** The open keys after CLOSING `key` (the `closeItem` action). */\nexport function closeAccordionItem(open: ReadonlySet<string>, key: string): Set<string> {\n const next = new Set(open);\n next.delete(key);\n return next;\n}\n\nexport enum AccordionKeyAction {\n Next = 'next',\n Previous = 'previous',\n First = 'first',\n Last = 'last',\n}\n\n/** The APG accordion's keys on a header: ↓ ↑ move (and wrap), Home / End jump. Enter and Space are the\n * button's own. */\nconst KEY_ACTIONS: Readonly<Record<string, AccordionKeyAction>> = {\n ArrowDown: AccordionKeyAction.Next,\n ArrowUp: AccordionKeyAction.Previous,\n Home: AccordionKeyAction.First,\n End: AccordionKeyAction.Last,\n};\n\nexport function accordionKeyAction(key: string): AccordionKeyAction | null {\n return KEY_ACTIONS[key] ?? null;\n}\n\n/** The header index `action` moves focus to, from `current` among `count` headers (↓ ↑ wrap). */\nexport function accordionFocusIndex(action: AccordionKeyAction, current: number, count: number): number {\n if (count <= 0) return -1;\n switch (action) {\n case AccordionKeyAction.Next: return (current + 1) % count;\n case AccordionKeyAction.Previous: return (current - 1 + count) % count;\n case AccordionKeyAction.First: return 0;\n case AccordionKeyAction.Last: return count - 1;\n }\n}\n\n// ── identity, ids and attributes (both renderers, SSR included) ────────────────────────────────\n\n/** A key safe in an element id. */\nexport function domSafeKey(raw: unknown): string {\n return String(raw ?? '').replace(/[^A-Za-z0-9_-]/g, '-');\n}\n\n/** A content row's identity: its own id (never its index — a reorder in the CMS must never pair a header with\n * another row's panel, R3); the index only for a row that has none. */\nexport function rowItemKey(row: unknown, index: number): string {\n const r = row as { _id?: unknown; id?: unknown } | null;\n const id = r && typeof r === 'object' ? (r._id ?? r.id) : undefined;\n return id !== undefined && id !== null && id !== '' ? domSafeKey(id) : `row-${index}`;\n}\n\nexport interface AccordionDomIds {\n trigger: string;\n panel: string;\n}\n\nconst DOM_ID_PREFIX: Readonly<Record<CompositeKind, string>> = {\n [CompositeKind.Accordion]: 'iox-acc',\n [CompositeKind.Disclosure]: 'iox-dis',\n};\n\n/** The ARIA pairing ids of an item: unique per composite (its SCOPE id — `compositeScopeId`) and per item (its key). */\nexport function accordionDomIds(rootId: string, itemKey: string, kind: CompositeKind = CompositeKind.Accordion): AccordionDomIds {\n const base = `${DOM_ID_PREFIX[kind]}-${domSafeKey(rootId)}-${domSafeKey(itemKey)}`;\n return { trigger: `${base}-h`, panel: `${base}-p` };\n}\n\n/**\n * The id a rendered composite's ARIA ids are built from: its node id, and — when it sits inside repeated rows —\n * every enclosing row's identity, outermost first (vectoriox/iox-ui#20: an accordion repeated per card used to\n * pair every row's header with the FIRST row's panel). The engine folds each row's `rowItemKey`; the builder\n * canvas its preview row's index. Unrepeated, it is the node id unchanged.\n */\nexport function compositeScopeId(rootId: string, rowKeys: ReadonlyArray<string> = []): string {\n return rowKeys.length ? [rootId, ...rowKeys.map(domSafeKey)].join('-') : rootId;\n}\n\n/** One item's render state: its identity, whether it is open, and its ARIA ids. */\nexport interface AccordionItemState {\n kind: CompositeKind;\n key: string;\n index: number;\n on: boolean;\n ids: AccordionDomIds;\n}\n\n/** The render scope of one composite: its kind, scope id, behaviour and every item key in order. */\nexport interface AccordionScope {\n kind: CompositeKind;\n rootId: string;\n behaviour: AccordionBehaviour;\n keys: ReadonlyArray<string>;\n open: ReadonlySet<string>;\n}\n\nexport function accordionScope(rootId: string, behaviour: AccordionBehaviour, keys: ReadonlyArray<string>, kind: CompositeKind = CompositeKind.Accordion): AccordionScope {\n return { kind, rootId, behaviour, keys, open: initialAccordionOpen(keys, behaviour.defaultOn) };\n}\n\nexport function accordionItemState(scope: AccordionScope, index: number): AccordionItemState {\n const key = scope.keys[index] ?? `item-${index}`;\n return { kind: scope.kind, key, index, on: scope.open.has(key), ids: accordionDomIds(scope.rootId, key, scope.kind) };\n}\n\n/** Attribute values: a string, or '' for a present boolean attribute. Absent attributes are left out. */\nexport type DomAttributes = Record<string, string>;\n\n/** `data-iox-on` — the ONE attribute every \"on\" style keys on (Open, Item open). */\nexport const ON_ATTRIBUTE = 'data-iox-on';\nexport const ITEM_KEY_ATTRIBUTE = 'data-iox-item-key';\nexport const COMPOSITE_ATTRIBUTE = 'data-iox-composite';\nexport const MULTIPLE_ATTRIBUTE = 'data-iox-multiple';\nexport const DEFAULT_ON_ATTRIBUTE = 'data-iox-default-on';\n/** The scope id the ARIA ids are built from (`compositeScopeId`), written by the engine so the runtime re-stamps\n * exactly the ids the server rendered. */\nexport const SCOPE_ATTRIBUTE = 'data-iox-scope';\n/** The value a closed panel's region carries: find-in-page can still reveal it (D9, board 4). */\nexport const UNTIL_FOUND = 'until-found';\n\n/** The structural classes the renderers write around an accordion's parts (no node owns them). */\nexport enum AccordionClass {\n Heading = 'iox-accordion-heading',\n Button = 'iox-accordion-button',\n Track = 'iox-accordion-track',\n Region = 'iox-accordion-region',\n}\n\nexport function accordionRootAttributes(behaviour: AccordionBehaviour, kind: CompositeKind = CompositeKind.Accordion, scopeId?: string): DomAttributes {\n return {\n [COMPOSITE_ATTRIBUTE]: kind,\n [DEFAULT_ON_ATTRIBUTE]: behaviour.defaultOn,\n ...(behaviour.multiple && kind === CompositeKind.Accordion ? { [MULTIPLE_ATTRIBUTE]: '' } : {}),\n ...(scopeId ? { [SCOPE_ATTRIBUTE]: scopeId } : {}),\n };\n}\n\nexport function accordionItemAttributes(state: AccordionItemState): DomAttributes {\n return { [ITEM_KEY_ATTRIBUTE]: state.key, ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}) };\n}\n\nexport function accordionTriggerAttributes(state: AccordionItemState): DomAttributes {\n return {\n type: 'button',\n id: state.ids.trigger,\n 'aria-expanded': state.on ? 'true' : 'false',\n 'aria-controls': state.ids.panel,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}),\n };\n}\n\n/** The track wrapping a panel: its row collapses to 0 while closed (the ONE hiding rule, iox-design.css). */\nexport function accordionTrackAttributes(state: AccordionItemState): DomAttributes {\n return state.on ? { [ON_ATTRIBUTE]: '' } : {};\n}\n\n/** The region the panel sits in: `hidden=\"until-found\"` while closed, so its words stay in the page. An accordion's\n * is a labelled `region` (APG accordion); a disclosure's is a plain block (APG disclosure: the button names it). */\nexport function accordionRegionAttributes(state: AccordionItemState): DomAttributes {\n const labelled = hasLabelledRegion(state.kind);\n return {\n ...(labelled ? { role: 'region' } : {}),\n id: state.ids.panel,\n ...(labelled ? { 'aria-labelledby': state.ids.trigger } : {}),\n ...(state.on ? {} : { hidden: UNTIL_FOUND }),\n };\n}\n\n/** True when a region of this kind is a labelled `role=region`. */\nexport function hasLabelledRegion(kind: CompositeKind): boolean {\n return kind === CompositeKind.Accordion;\n}\n\nexport function accordionPanelAttributes(state: AccordionItemState): DomAttributes {\n return state.on ? { [ON_ATTRIBUTE]: '' } : {};\n}\n\n/** `attrs` as an HTML attribute string (` a=\"b\" c`), values escaped by `esc`. */\nexport function serializeDomAttributes(attrs: DomAttributes, esc: (v: string) => string): string {\n return Object.entries(attrs).map(([k, v]) => (v === '' ? ` ${k}` : ` ${k}=\"${esc(v)}\"`)).join('');\n}\n\n// ── Items from content (R3) ─────────────────────────────────────────────────────────────────────\n\n/** A field of a content type, as both the CMS schema and a site plan describe it. */\nexport interface ContentFieldLike {\n name: string;\n type?: string;\n controller?: string;\n}\n\nconst SHORT_TEXT = new Set(['text']);\nconst LONG_TEXT = new Set(['textarea', 'richText', 'editor']);\n\nexport interface AccordionAutoBinds {\n /** The first short-text field: the question. */\n question: string | null;\n /** The first long-text field: the answer. */\n answer: string | null;\n}\n\n/** R3 (board 9 Q19): switching to From content binds the question to the first short-text field and the\n * answer to the first long-text field. ONE rule for the builder's switch and the composer. */\nexport function pickAccordionAutoBinds(fields: ReadonlyArray<ContentFieldLike>): AccordionAutoBinds {\n const isString = (f: ContentFieldLike) => !f.type || f.type === 'string';\n const question = fields.find(f => isString(f) && SHORT_TEXT.has(String(f.controller ?? 'text')))?.name ?? null;\n const answer = fields.find(f => isString(f) && LONG_TEXT.has(String(f.controller ?? '')) && f.name !== question)?.name ?? null;\n return { question, answer };\n}\n\n/** The bound props of the question and the answer (each a content trait). */\nexport const ACCORDION_BIND_PROP = 'content';\n\n/**\n * Manual → From content (board 9 \"Items: Manual · From content\"): the root becomes `repeater` (a Repeater node\n * the caller created with the same id, role, label, element style and styles — a type change is the\n * consumer's), the FIRST item becomes the one template (its parts, styles and interactions kept; its key\n * dropped — a row's key is its id) and the others are removed. Returns the removed items.\n */\nexport function accordionToContent(root: CompositeNode, repeater: CompositeNode): CompositeNode[] {\n const items = accordionItems(root);\n const [template, ...rest] = items;\n if (template) delete template.itemKey;\n repeater.role = AccordionRole.Accordion;\n repeater.children = template ? [template] : [];\n writeProp(repeater, CompositeBehaviourTrait.Multiple, accordionBehaviour(root).multiple);\n writeProp(repeater, CompositeBehaviourTrait.DefaultOn, accordionBehaviour(root).defaultOn);\n return rest;\n}\n\n/**\n * From content → Manual: the rows come in as static items — each a copy of the template (`cloneItem`, which\n * gives the copy fresh ids) whose bound words are written in as its own and whose bindings are dropped.\n * `container` is the manual root the caller created. Returns the new items.\n */\nexport function accordionToManual(root: CompositeNode, container: CompositeNode, rows: ReadonlyArray<unknown>,\n cloneItem: (template: CompositeNode) => CompositeNode, resolve: (row: unknown, binding: CompositeBinding) => unknown): CompositeNode[] {\n const template = accordionItems(root)[0];\n container.role = AccordionRole.Accordion;\n writeProp(container, CompositeBehaviourTrait.Multiple, accordionBehaviour(root).multiple);\n writeProp(container, CompositeBehaviourTrait.DefaultOn, accordionBehaviour(root).defaultOn);\n const items = template ? rows.map((row, i) => {\n const item = cloneItem(template);\n item.itemKey = `k${i + 1}`;\n walkComposite(item, n => {\n const bindings = (n as BoundNode).bindings ?? [];\n for (const b of bindings) {\n const value = resolve(row, b);\n if (value !== undefined && value !== null) writeProp(n, b.prop, value);\n }\n if (bindings.length) (n as BoundNode).bindings = [];\n });\n return item;\n }) : [];\n container.children = items;\n return items;\n}\n\nexport interface CompositeBinding {\n prop: string;\n source: string;\n path?: string;\n pipes?: unknown[];\n}\n\ninterface BoundNode extends CompositeNode {\n bindings?: CompositeBinding[];\n}\n\n/** The style a part holds for `name` (both node shapes) — exported for the consumers' detectors. */\nexport function accordionPartStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n","import {\n AccordionBehaviour, AccordionClass, AccordionDefaultOn, accordionDomIds, accordionFocusIndex, accordionKeyAction,\n ACCORDION_DEFAULT_ONS, closeAccordionItem, COMPOSITE_ATTRIBUTE, DEFAULT_ON_ATTRIBUTE, hasLabelledRegion, initialAccordionOpen, ITEM_KEY_ATTRIBUTE,\n MULTIPLE_ATTRIBUTE, nextAccordionState, ON_ATTRIBUTE, openAccordionItem, SCOPE_ATTRIBUTE, UNTIL_FOUND,\n} from './accordion';\nimport { CompositeKind } from './composite-kinds';\n\n/**\n * The Accordion's RUNTIME (CC2) — ONE copy, DOM only, for the builder canvas and the live site (both engine\n * paths render the same markup). It reads the markup the renderers write (iox-design.css + accordion.ts's\n * attribute planners), so the server's first paint and every later state agree:\n *\n * [root] data-iox-composite=\"accordion\" data-iox-default-on [data-iox-multiple] [data-iox-scope] (the node's\n * own element — its role class may sit on a wrapper host, as the engine's component-path Repeater draws it)\n * .iox-role-accordion-item data-iox-item-key [data-iox-on]\n * hN.iox-accordion-heading > button.iox-accordion-button id aria-expanded aria-controls\n * .iox-accordion-track [data-iox-on] > .iox-accordion-region role=region [hidden=until-found]\n * .iox-role-accordion-panel\n *\n * The DISCLOSURE (CC2.1) runs on this same runtime: `data-iox-composite=\"disclosure\"` on a root that IS its one\n * item (it carries the key and `data-iox-on`), its button straight inside it (no heading), its panel in the same\n * track + region (a plain block — no `role=region`), and no arrow keys (one button).\n *\n * It owns: a click on a header toggles its item; ↓ ↑ Home End move between the headers of THIS accordion\n * (a nested one keeps its own); find-in-page (`beforematch`) opens the item that holds the match; a closed\n * panel gets `hidden=\"until-found\"` after its track has collapsed (at once under reduced motion). Every\n * change dispatches `iox-item-on` / `iox-item-off` on the item, the `itemOn` / `itemOff` interaction\n * triggers. The open set is LIVE ∪ FORCED: the builder forces items open (a selection inside a closed panel,\n * \"All open\"); the live site forces nothing.\n */\n\nexport const ITEM_ON_EVENT = 'iox-item-on';\nexport const ITEM_OFF_EVENT = 'iox-item-off';\n\nconst KIND_ROOT = (kind: CompositeKind) => `[${COMPOSITE_ATTRIBUTE}=\"${kind}\"]`;\nconst ROOT_SELECTOR = Object.values(CompositeKind).map(KIND_ROOT).join(', ');\n/** An accordion's items are its `.iox-role-accordion-item` children; a disclosure is its own item. */\nconst ACCORDION_ITEM_SELECTOR = '.iox-role-accordion-item';\nconst ITEM_SELECTOR = `${ACCORDION_ITEM_SELECTOR}, ${KIND_ROOT(CompositeKind.Disclosure)}`;\nconst PANEL_SELECTOR = '.iox-role-accordion-panel, .iox-role-disclosure-panel';\nconst BUTTON_SELECTOR = `.${AccordionClass.Button}`;\nconst TRACK_SELECTOR = `.${AccordionClass.Track}`;\nconst REGION_SELECTOR = `.${AccordionClass.Region}`;\n/** How long a closing track may take before its region is hidden (dur-base is 200–320ms in every pack). */\nconst MAX_CLOSE_MS = 600;\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\nexport interface AccordionRuntimeOptions {\n /** The composite's scope id — the ARIA ids' prefix (else the root's `data-iox-scope`, else its `iox-node-<id>`). A\n * function is read at every stamp (the builder canvas: a preview row's index is known once it is in the page). */\n rootId?: string | (() => string);\n /** Accordion or Disclosure (else read from the root's `data-iox-composite`). */\n kind?: CompositeKind;\n /** The behaviour (else read from the root's data attributes). */\n behaviour?: AccordionBehaviour;\n /** Keys forced open on top of the live state (the builder's design state). */\n forced?: () => ReadonlySet<string>;\n /** Re-stamp when the markup under the root changes (the builder canvas re-renders parts). */\n observe?: boolean;\n /** True to stop motion (default: the visitor's reduced-motion setting). */\n reducedMotion?: () => boolean;\n}\n\n/** The composite (accordion or disclosure) an element belongs to (the element itself when it is a root). */\nexport function closestAccordion(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ROOT_SELECTOR) as HTMLElement | null) ?? null;\n}\n\n/** The item an element sits in (itself when it is one) — an accordion item, or a disclosure. */\nexport function closestAccordionItem(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ITEM_SELECTOR) as HTMLElement | null) ?? null;\n}\n\nconst kindOf = (root: Element): CompositeKind =>\n root.getAttribute(COMPOSITE_ATTRIBUTE) === CompositeKind.Disclosure ? CompositeKind.Disclosure : CompositeKind.Accordion;\n\n/** The composite root whose items an item belongs to: a disclosure is its own root. */\nfunction rootOfItem(item: HTMLElement): HTMLElement | null {\n return kindOf(item) === CompositeKind.Disclosure && item.matches(KIND_ROOT(CompositeKind.Disclosure)) ? item : closestAccordion(item.parentElement);\n}\n\n/** Subscribe to an item turning on / off — what the `itemOn` / `itemOff` interaction triggers listen to. The\n * item is the element's own item (the element itself when it is one). Returns the unsubscribe. */\nexport function onAccordionItemState(el: Element, on: boolean, handler: () => void): () => void {\n const item = closestAccordionItem(el);\n if (!item) return () => undefined;\n const type = on ? ITEM_ON_EVENT : ITEM_OFF_EVENT;\n item.addEventListener(type, handler);\n return () => item.removeEventListener(type, handler);\n}\n\n/** True when the element's item is open now. */\nexport function isAccordionItemOn(el: Element): boolean {\n return !!closestAccordionItem(el)?.hasAttribute(ON_ATTRIBUTE);\n}\n\nconst nodeIdOf = (el: Element): string => {\n for (const c of Array.from(el.classList)) if (c.startsWith('iox-node-')) return c.slice('iox-node-'.length);\n return '';\n};\n\nfunction behaviourOf(root: Element): AccordionBehaviour {\n const raw = root.getAttribute(DEFAULT_ON_ATTRIBUTE);\n return {\n multiple: root.hasAttribute(MULTIPLE_ATTRIBUTE),\n defaultOn: ACCORDION_DEFAULT_ONS.includes(raw as AccordionDefaultOn) ? raw as AccordionDefaultOn : AccordionDefaultOn.First,\n };\n}\n\nfunction setAttr(el: Element | null | undefined, name: string, value: string | null): void {\n if (!el) return;\n if (value === null) { if (el.hasAttribute(name)) el.removeAttribute(name); }\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n}\n\nexport class AccordionRuntime {\n private live: Set<string>;\n private shown = new Set<string>();\n private readonly closing = new Map<string, ReturnType<typeof setTimeout>>();\n private observer: MutationObserver | null = null;\n private stampQueued = false;\n private behaviourValue: AccordionBehaviour;\n /** The builder attaches a root before its items render: the saved default is applied once they do. */\n private awaitingItems = false;\n readonly kind: CompositeKind;\n\n constructor(readonly root: HTMLElement, private readonly options: AccordionRuntimeOptions = {}) {\n this.kind = options.kind ?? kindOf(root);\n this.behaviourValue = options.behaviour ?? behaviourOf(root);\n root.setAttribute(COMPOSITE_ATTRIBUTE, this.kind);\n RUNTIMES.set(root, this);\n // The server rendered the first state; with no server state the root's default decides.\n // (The builder passes the behaviour and starts from the saved default; on the live site the server\n // stamped every item's key and state, and that is the truth.)\n const items = this.items();\n const serverStamped = !options.behaviour && items.some(i => i.hasAttribute(ITEM_KEY_ATTRIBUTE));\n this.live = serverStamped\n ? new Set(items.filter(i => i.hasAttribute(ON_ATTRIBUTE)).map(i => this.keyOf(i, items)))\n : initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n this.awaitingItems = !serverStamped && !items.length;\n this.shown = new Set(this.live);\n // Capture: on the builder canvas every part's own listener stops the click (it selects that part), and\n // the header must still toggle — the canvas is a live runtime.\n root.addEventListener('click', this.onClick, true);\n root.addEventListener('keydown', this.onKeydown);\n root.addEventListener('beforematch', this.onBeforeMatch, true);\n if (options.observe && typeof MutationObserver !== 'undefined') {\n this.observer = new MutationObserver(() => this.queueStamp());\n this.observer.observe(root, { childList: true, subtree: true });\n }\n this.stamp(true);\n }\n\n get behaviour(): AccordionBehaviour {\n return this.behaviourValue;\n }\n\n /** The behaviour changed in the panel: re-read, and start from the new default. */\n setBehaviour(behaviour: AccordionBehaviour): void {\n const changedDefault = behaviour.defaultOn !== this.behaviourValue.defaultOn;\n this.behaviourValue = behaviour;\n if (behaviour.multiple) this.root.setAttribute(MULTIPLE_ATTRIBUTE, '');\n else this.root.removeAttribute(MULTIPLE_ATTRIBUTE);\n this.root.setAttribute(DEFAULT_ON_ATTRIBUTE, behaviour.defaultOn);\n if (changedDefault) this.resetLive();\n else this.stamp();\n }\n\n /** THIS composite's items, in document order (a nested composite's items are its own); a disclosure's is itself. */\n items(): HTMLElement[] {\n if (this.kind === CompositeKind.Disclosure) return [this.root];\n return Array.from(this.root.querySelectorAll<HTMLElement>(ACCORDION_ITEM_SELECTOR)).filter(i => closestAccordion(i.parentElement) === this.root);\n }\n\n /** The open keys the live state holds (before anything forced). */\n get liveKeys(): ReadonlySet<string> {\n return this.live;\n }\n\n /** The keys showing open right now. */\n get openKeys(): ReadonlySet<string> {\n return this.shown;\n }\n\n keyOf(item: Element, items: HTMLElement[] = this.items()): string {\n return item.getAttribute(ITEM_KEY_ATTRIBUTE) || `item-${items.indexOf(item as HTMLElement)}`;\n }\n\n toggle(key: string): void {\n this.live = nextAccordionState(this.live, key, this.behaviourValue);\n this.stamp();\n }\n\n open(key: string): void {\n this.live = openAccordionItem(this.live, key, this.behaviourValue);\n this.stamp();\n }\n\n close(key: string): void {\n this.live = closeAccordionItem(this.live, key);\n this.stamp();\n }\n\n /** Run an item action (`openItem` / `closeItem` / `toggleItem`, T14) on `key`. True when it shows open after. */\n run(action: CompositeItemAction, key: string): boolean {\n if (action === CompositeItemAction.Open) this.open(key);\n else if (action === CompositeItemAction.Close) this.close(key);\n else this.toggle(key);\n return this.shown.has(key);\n }\n\n /** Back to the saved default (\"Showing on canvas ▸ As saved\"). */\n resetLive(): void {\n const items = this.items();\n this.live = initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n this.stamp();\n }\n\n /** The forced set changed (builder design state): show it. */\n refresh(): void {\n this.stamp();\n }\n\n destroy(): void {\n if (RUNTIMES.get(this.root) === this) RUNTIMES.delete(this.root);\n this.root.removeEventListener('click', this.onClick, true);\n this.root.removeEventListener('keydown', this.onKeydown);\n this.root.removeEventListener('beforematch', this.onBeforeMatch, true);\n this.observer?.disconnect();\n this.observer = null;\n for (const t of this.closing.values()) clearTimeout(t);\n this.closing.clear();\n }\n\n private queueStamp(): void {\n if (this.stampQueued) return;\n this.stampQueued = true;\n const run = () => { this.stampQueued = false; this.stamp(); };\n if (typeof queueMicrotask === 'function') queueMicrotask(run); else Promise.resolve().then(run);\n }\n\n private reduced(): boolean {\n if (this.options.reducedMotion) return this.options.reducedMotion();\n try { return typeof matchMedia === 'function' && matchMedia(REDUCED_MOTION).matches; } catch { return false; }\n }\n\n /** Write every item's state into its markup; announce what changed. */\n private stamp(first = false): void {\n // Our own writes must not wake the observer (they are attributes; it watches the child lists only).\n const items = this.items();\n if (this.awaitingItems && items.length) {\n this.awaitingItems = false;\n this.live = initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n first = true;\n }\n const forced = this.options.forced?.() ?? new Set<string>();\n const own = this.options.rootId;\n const rootId = (typeof own === 'function' ? own() : own) ?? this.root.getAttribute(SCOPE_ATTRIBUTE) ?? nodeIdOf(this.root);\n const next = new Set<string>();\n items.forEach((item, index) => {\n const key = this.keyOf(item, items);\n const on = this.live.has(key) || forced.has(key);\n if (on) next.add(key);\n this.stampItem(item, key, index, on, rootId, first);\n });\n const was = first ? new Set<string>() : this.shown;\n this.shown = next;\n // On the first stamp an item open by default HAS opened: its `itemOn` listeners attached so far hear it\n // (the builder renders an item's parts, and attaches their interactions, before its root's runtime; the\n // live engine attaches the runtime first and its interactions run an already-open item's at once).\n for (const item of items) {\n const key = this.keyOf(item, items);\n if (next.has(key) && !was.has(key)) dispatch(item, ITEM_ON_EVENT);\n else if (!next.has(key) && was.has(key)) dispatch(item, ITEM_OFF_EVENT);\n }\n }\n\n private stampItem(item: HTMLElement, key: string, index: number, on: boolean, rootId: string, first: boolean): void {\n const ids = accordionDomIds(rootId, key, this.kind);\n if (!item.hasAttribute(ITEM_KEY_ATTRIBUTE)) item.setAttribute(ITEM_KEY_ATTRIBUTE, key);\n setAttr(item, ON_ATTRIBUTE, on ? '' : null);\n const button = this.own(item, BUTTON_SELECTOR);\n const track = this.own(item, TRACK_SELECTOR);\n const region = this.own(item, REGION_SELECTOR);\n const panel = this.own(item, PANEL_SELECTOR);\n setAttr(button, 'type', 'button');\n setAttr(button, 'id', ids.trigger);\n setAttr(button, 'aria-expanded', on ? 'true' : 'false');\n setAttr(button, 'aria-controls', ids.panel);\n setAttr(button, ON_ATTRIBUTE, on ? '' : null);\n setAttr(track, ON_ATTRIBUTE, on ? '' : null);\n setAttr(panel, ON_ATTRIBUTE, on ? '' : null);\n const labelled = hasLabelledRegion(this.kind);\n setAttr(region, 'role', labelled ? 'region' : null);\n setAttr(region, 'id', ids.panel);\n setAttr(region, 'aria-labelledby', labelled ? ids.trigger : null);\n if (!region) return;\n const pending = this.closing.get(key);\n if (on) {\n if (pending) { clearTimeout(pending); this.closing.delete(key); }\n setAttr(region, 'hidden', null);\n return;\n }\n if (region.hasAttribute('hidden') || pending) return;\n // Closing: the track collapses first (its transition), THEN the region is hidden — hiding it at once\n // would collapse it with no motion. At first paint, or under reduced motion, it is hidden at once.\n if (first || this.reduced()) { setAttr(region, 'hidden', UNTIL_FOUND); return; }\n const hide = () => {\n this.closing.delete(key);\n if (!item.hasAttribute(ON_ATTRIBUTE)) setAttr(region, 'hidden', UNTIL_FOUND);\n };\n this.closing.set(key, setTimeout(hide, this.closeDelay(track)));\n }\n\n private closeDelay(track: Element | null): number {\n try {\n const view = track?.ownerDocument?.defaultView;\n const raw = track && view ? view.getComputedStyle(track).transitionDuration : '';\n const ms = Math.max(0, ...String(raw).split(',').map(s => (s.trim().endsWith('ms') ? parseFloat(s) : parseFloat(s) * 1000)).filter(n => !isNaN(n)));\n return Math.min(MAX_CLOSE_MS, ms + 20);\n } catch { return 0; }\n }\n\n /** The element `selector` matches inside `item` that belongs to it, not to an item nested in it. */\n private own(item: HTMLElement, selector: string): HTMLElement | null {\n return Array.from(item.querySelectorAll<HTMLElement>(selector)).find(el => closestAccordionItem(el) === item) ?? null;\n }\n\n private buttons(): HTMLElement[] {\n return this.items().map(i => this.own(i, BUTTON_SELECTOR)).filter((b): b is HTMLElement => !!b);\n }\n\n private readonly onClick = (event: Event): void => {\n const button = (event.target as Element | null)?.closest?.(BUTTON_SELECTOR);\n if (!button || closestAccordion(button) !== this.root) return;\n const item = closestAccordionItem(button);\n if (!item) return;\n event.preventDefault();\n this.toggle(this.keyOf(item));\n };\n\n private readonly onKeydown = (event: Event): void => {\n // A disclosure has one button: Enter / Space are the button's own, and there is nowhere to move.\n if (this.kind !== CompositeKind.Accordion) return;\n const e = event as KeyboardEvent;\n const action = accordionKeyAction(e.key);\n const button = (e.target as Element | null)?.closest?.(BUTTON_SELECTOR);\n if (!action || !button || closestAccordion(button) !== this.root) return;\n const buttons = this.buttons();\n const at = buttons.indexOf(button as HTMLElement);\n const target = buttons[accordionFocusIndex(action, at, buttons.length)];\n if (!target) return;\n e.preventDefault();\n target.focus();\n };\n\n private readonly onBeforeMatch = (event: Event): void => {\n const region = (event.target as Element | null)?.closest?.(REGION_SELECTOR);\n const item = closestAccordionItem(region);\n const items = this.items();\n if (!item || !items.includes(item)) return;\n this.open(this.keyOf(item, items));\n };\n}\n\nfunction dispatch(el: Element, type: string): void {\n const Ctor = (globalThis as { CustomEvent?: typeof CustomEvent }).CustomEvent;\n if (Ctor) el.dispatchEvent(new Ctor(type, { bubbles: false }));\n}\n\n/** Attach the runtime to one rendered composite root, unless it already runs one. Returns the NEW runtime, or\n * null when the root already had one (so a caller destroys only what it created). */\nexport function attachAccordionAt(root: HTMLElement, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> = {}): AccordionRuntime | null {\n if (RUNTIMES.has(root)) return null;\n return new AccordionRuntime(root, options);\n}\n\n/** Attach the runtime to every accordion under `container` that has none yet. Returns the new runtimes. */\nexport function attachAccordions(container: ParentNode, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> = {}): AccordionRuntime[] {\n const out: AccordionRuntime[] = [];\n container.querySelectorAll<HTMLElement>(ROOT_SELECTOR).forEach(root => {\n const runtime = attachAccordionAt(root, options);\n if (runtime) out.push(runtime);\n });\n return out;\n}\n\n/** Detach a runtime `attachAccordions` created. */\nexport function detachAccordion(runtime: AccordionRuntime): void {\n runtime.destroy();\n}\n\n/** Every live runtime by its root — the canvas's and the site's alike (a runtime registers itself and leaves on\n * destroy), so an item action finds the runtime of whatever item it targets. */\nconst RUNTIMES = new WeakMap<Element, AccordionRuntime>();\n\nconst ROW_INDEX_ATTRIBUTE = 'data-iox-row-idx';\n\n/** The repeated rows an element sits in, outermost first — each row's index as its row wrappers stamp it\n * (`data-iox-row-idx`: the builder's Repeater rows, the engine's component path). The builder folds them into a\n * composite's scope id (`compositeScopeId`, vectoriox/iox-ui#20); the element itself is not counted. */\nexport function compositeRowKeys(el: Element | null | undefined): string[] {\n const keys: string[] = [];\n for (let at = el?.parentElement?.closest?.(`[${ROW_INDEX_ATTRIBUTE}]`); at; at = at.parentElement?.closest(`[${ROW_INDEX_ATTRIBUTE}]`)) {\n keys.unshift(at.getAttribute(ROW_INDEX_ATTRIBUTE) ?? '');\n }\n return keys;\n}\n\n/** The runtime running a composite root, or null. */\nexport function accordionRuntimeOf(root: Element | null | undefined): AccordionRuntime | null {\n return (root && RUNTIMES.get(root)) || null;\n}\n\n// ── T14: open / close / toggle an item from anywhere ─────────────────────────────────────────────\n\n/** What an item action does to its target item (actions-core `openItem` / `closeItem` / `toggleItem`). */\nexport enum CompositeItemAction {\n Open = 'open',\n Close = 'close',\n Toggle = 'toggle',\n}\n\n/**\n * Run an item action on the element of an ITEM (an accordion item, or a disclosure) — the `openItem` /\n * `closeItem` / `toggleItem` interaction actions, on the canvas and on the live site through this one function.\n * Returns whether the item shows open afterwards, or null when `el` is in no running composite.\n */\nexport function runCompositeItemAction(el: Element | null | undefined, action: CompositeItemAction): boolean | null {\n const item = closestAccordionItem(el);\n const runtime = item ? accordionRuntimeOf(rootOfItem(item)) : null;\n if (!item || !runtime) return null;\n return runtime.run(action, runtime.keyOf(item));\n}\n\n/** How much of an opened item must already be on screen for the action NOT to scroll to it (its header row). */\nconst VISIBLE_HEAD_PX = 48;\n\n/** True when an item an action just opened is out of view and the page should scroll to it (T14: \"opens that item\n * and scrolls to it\") — never when its head is already on screen, so a button beside it does not jolt the page. */\nexport function shouldScrollToItem(top: number, viewportHeight: number): boolean {\n return top < 0 || top + VISIBLE_HEAD_PX > viewportHeight;\n}\n","import { accordionBehaviour, AccordionDefaultOn, AccordionIcon, buildCompositeIcon, CompositeBehaviourTrait, ITEM_OPEN_STATE } from './accordion';\nimport { DisclosureRole } from './composite-kinds';\nimport { CompositeNode, CompositeNodeFactory, makeCompositePart, writeProp, writeStyles } from './composite-node';\n\n/**\n * DISCLOSURE / \"Read more\" (CC2.1 — composite T21). Not a component: a recipe of ordinary nodes on the\n * ACCORDION's machinery — a disclosure is a one-item accordion whose root is its item, so it runs the same\n * state machine, attribute planners and runtime (`accordion-runtime.ts`), on the canvas and on the live site.\n *\n * Container `box` role disclosure itemKey k1 · trait defaultOn (none | first)\n * ├─ LinkedContainer `accordion-trigger` role disclosure.trigger → <button aria-expanded aria-controls>\n * │ ├─ Text `body` (span) role disclosure.more \"Read more\" — hidden while open\n * │ ├─ Text `body` (span) role disclosure.less \"Read less\" — shown only while open\n * │ └─ Icon `icon` role disclosure.icon Item open → turns\n * └─ Container `accordion-panel` role disclosure.panel inside a hidden=\"until-found\" track\n * └─ Text `body` the rest of the text\n *\n * The words swap through the ordinary Item open state (`trigger-on` → the root), so the label an author sees on\n * the canvas is the one the visitor gets, with no script and nothing to break. The look is the accordion's own\n * element styles (no `disclosure-*` contract: the boards draw none) — the header's ink, hover ink and focus ring;\n * the panel's padding and muted ink — and the words are `body` text: the site's body type, with `color: inherit`, so\n * the toggle's ink and its hover ink reach them.\n */\n\nexport interface DisclosureWords {\n more: string;\n less: string;\n body: string;\n}\n\n/** The words a fresh disclosure starts with — generic, the author's to replace. */\nexport const DISCLOSURE_WORDS: Readonly<DisclosureWords> = {\n more: 'Read more',\n less: 'Read less',\n body: 'Write the rest of the story here. It stays out of the way until someone asks for it.',\n};\n\nexport interface DisclosureOptions {\n words?: Partial<DisclosureWords>;\n /** Open on first render (default: closed). */\n open?: boolean;\n icon?: AccordionIcon;\n}\n\n/** A disclosure's one item key — its root IS its item. */\nexport const DISCLOSURE_ITEM_KEY = 'k1';\n\nenum Type {\n Container = 'Container',\n LinkedContainer = 'LinkedContainer',\n Text = 'Text',\n}\n\nenum Style {\n Root = 'box',\n Trigger = 'accordion-trigger',\n Word = 'body',\n Panel = 'accordion-panel',\n Body = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\nconst HIDDEN = 'none';\nconst INHERIT = 'inherit';\n/** A word is a flex item of the toggle — `block` (never `inline`: the compiler drops a value equal to the CSS initial,\n * and the Text's own default would come back in its place). */\nconst SHOWN = 'block';\n\n/** What each part holds — layout only; its LOOK is its element style. The trigger sizes to its words (a button in\n * the flow, not a full-width header row — `fit-content` keeps it from stretching) and the panel spans the root. The\n * trigger is `flex`, not `inline-flex`: it is a flex item of the root, which blockifies it on the site anyway. */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n [DisclosureRole.Disclosure]: { display: 'flex', flexDirection: 'column', width: '100%', minHeight: 'auto', height: 'auto' },\n // The toggle reads the text around it (the page's body type, through the root) — a LinkedContainer is born with\n // its own literal font, which an accordion's heading masks and a disclosure's words would show.\n [DisclosureRole.Trigger]: {\n display: 'flex', alignItems: 'center', gap: '8px', width: 'fit-content', minHeight: 'auto', height: 'auto', textAlign: 'start', cursor: 'pointer',\n fontFamily: INHERIT, fontSize: INHERIT, fontWeight: INHERIT, lineHeight: INHERIT,\n },\n // A word is just its words: none of a Text's own box (its type's 10px padding, its full width) — the toggle's\n // padding is the click target.\n [DisclosureRole.More]: { display: SHOWN, margin: ZERO_BOX, padding: ZERO_BOX, width: 'auto' },\n [DisclosureRole.Less]: { display: HIDDEN, margin: ZERO_BOX, padding: ZERO_BOX, width: 'auto' },\n [DisclosureRole.Panel]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n};\nconst BODY_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: DisclosureRole | null, style: string,\n props: Record<string, unknown>, label: string): CompositeNode {\n return makeCompositePart(create, { key, type, props, elementStyle: style }, role, label, role ? PART_BASE[role] : undefined);\n}\n\n/** One of the trigger's two words: shown while the disclosure is closed (`more`) or open (`less`). */\nfunction buildWord(create: CompositeNodeFactory, role: DisclosureRole.More | DisclosureRole.Less, words: string, rootId?: string): CompositeNode {\n const node = make(create, role === DisclosureRole.More ? 'more' : 'less', Type.Text, role, Style.Word, { content: words, tag: 'span' }, 'Text');\n node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { display: role === DisclosureRole.More ? HIDDEN : SHOWN } };\n if (rootId) node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: rootId };\n return node;\n}\n\n/** A fresh Disclosure: \"Read more\" opens the text below and reads \"Read less\" while it is open; closed by default. */\nexport function buildDisclosureRecipe(create: CompositeNodeFactory, options: DisclosureOptions = {}): CompositeNode {\n const words = { ...DISCLOSURE_WORDS, ...(options.words ?? {}) };\n const root = make(create, 'disclosure', Type.Container, DisclosureRole.Disclosure, Style.Root, {}, 'Disclosure');\n root.itemKey = DISCLOSURE_ITEM_KEY;\n writeProp(root, CompositeBehaviourTrait.DefaultOn, options.open ? AccordionDefaultOn.First : AccordionDefaultOn.None);\n const icon = options.icon ?? AccordionIcon.Chevron;\n const trigger = make(create, 'trigger', Type.LinkedContainer, DisclosureRole.Trigger, Style.Trigger, {}, 'Toggle');\n trigger.children = [\n buildWord(create, DisclosureRole.More, words.more, root.id),\n buildWord(create, DisclosureRole.Less, words.less, root.id),\n ...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, 'icon', icon, root.id, DisclosureRole.Icon)]),\n ];\n const panel = make(create, 'panel', Type.Container, DisclosureRole.Panel, Style.Panel, {}, 'Panel');\n const body = make(create, 'body', Type.Text, null, Style.Body, { content: words.body, tag: 'p' }, 'Text');\n writeStyles(body, BODY_BASE);\n panel.children = [body];\n root.children = [trigger, panel];\n return root;\n}\n\n/** Behaviour ▸ Open by default (a disclosure: on or off). */\nexport function disclosureOpenByDefault(root: CompositeNode): boolean {\n return accordionBehaviour(root).defaultOn !== AccordionDefaultOn.None;\n}\n","import { elementStyleById, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { CompositeNode, CompositeNodeFactory, writeStyles } from './composite-node';\n\n/**\n * BADGE + CHIP (composite T25; complex-components board 8). A Badge is a Container wearing\n * `badge-<tone>` › Icon + Text; its TONE is its element style, so Badge ▸ Tone writes the style and\n * nothing else, and a re-theme restyles every badge. A Chip is the outlined static style only (no\n * behaviour until the K5 Data view). Inside a card the badge plays `card.badge`; anywhere else it is\n * recognised by its style.\n */\n\nexport enum BadgeTone {\n Neutral = 'neutral',\n Success = 'success',\n Warning = 'warning',\n Accent = 'accent',\n}\n\nexport const BADGE_TONES: ReadonlyArray<BadgeTone> = [BadgeTone.Neutral, BadgeTone.Success, BadgeTone.Warning, BadgeTone.Accent];\n\n/** The tone's element style (`badge-<tone>`, the contract's). */\nexport function badgeStyleId(tone: BadgeTone): string {\n return `badge-${tone}`;\n}\n\nexport const CHIP_STYLE = 'chip';\n\n/** The glyph a fresh badge of each tone shows (the board's tone grid). */\nexport const BADGE_TONE_ICONS: Readonly<Record<BadgeTone, string>> = {\n [BadgeTone.Neutral]: 'ph ph-tag',\n [BadgeTone.Success]: 'ph ph-check',\n [BadgeTone.Warning]: 'ph ph-warning',\n [BadgeTone.Accent]: 'ph ph-sparkle',\n};\nexport const CHIP_ICON = 'ph ph-tag';\n\nconst TONE_BY_STYLE = new Map(BADGE_TONES.map(tone => [badgeStyleId(tone), tone]));\n\n/** The badge tone a node wears, or null when it is no badge. */\nexport function badgeToneOf(node: { elementStyle?: string | null } | null | undefined): BadgeTone | null {\n return TONE_BY_STYLE.get(node?.elementStyle ?? '') ?? null;\n}\n\n/** True for a node wearing a badge tone or the chip style — the pills (their Icon reads their ink). */\nexport function isPillNode(node: { elementStyle?: string | null } | null | undefined): boolean {\n return badgeToneOf(node) !== null || node?.elementStyle === CHIP_STYLE;\n}\n\n/**\n * Badge ▸ Tone: move the badge to another tone's element style (an edit the author made to the old\n * tone's look is kept, design-core's switch rule). Nothing else changes — not the icon, not the words.\n */\nexport function setBadgeTone(node: CompositeNode, tone: BadgeTone, baseline: Readonly<Record<string, unknown>> = {}): boolean {\n const current = node.elementStyle ?? null;\n const next = badgeStyleId(tone);\n if (!badgeToneOf(node) || current === next || !elementStyleById(next)) return false;\n const result = switchElementStyle(node, current, next, baseline);\n if (result.applied) node.elementStyle = next;\n return result.applied;\n}\n\n/** A pill's box: hugs its words, never stretches in a column. */\nconst PILL_BASE: Readonly<Record<string, string>> = {\n display: 'inline-flex', alignItems: 'center', gap: '5px', width: 'auto', minHeight: 'auto', alignSelf: 'flex-start', lineHeight: '1.4',\n};\nconst PILL_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\nconst PILL_WORDS: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: '0px 0px 0px 0px', margin: '0px 0px 0px 0px' };\n/** The pill's words wear the pill's OWN label style (Card v2.1): its type from the badge tokens, its leading,\n * tracking, case and ink inherited from the pill — never the button's label style. */\nexport const PILL_LABEL_STYLE = 'badge-label';\n\nexport interface PillOptions {\n text?: string;\n icon?: string;\n /** Key prefix for the consumer's ids (`badge` → `badge`, `badge-icon`, `badge-text`). */\n key?: string;\n}\n\nfunction buildPill(create: CompositeNodeFactory, elementStyle: string, text: string, icon: string, key: string): CompositeNode {\n const pill = create({ key, type: 'Container', elementStyle });\n writeStyles(pill, PILL_BASE);\n const glyph = create({ key: `${key}-icon`, type: 'Icon', props: { iconClass: icon }, elementStyle: 'icon' });\n writeStyles(glyph, PILL_ICON);\n const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle: PILL_LABEL_STYLE });\n writeStyles(words, PILL_WORDS);\n pill.children = [glyph, words];\n return pill;\n}\n\n/** A fresh Badge: Container `badge-<tone>` › Icon + Text. */\nexport function buildBadge(create: CompositeNodeFactory, options: PillOptions & { tone?: BadgeTone } = {}): CompositeNode {\n const tone = options.tone ?? BadgeTone.Accent;\n const badge = buildPill(create, badgeStyleId(tone), options.text ?? 'New', options.icon ?? BADGE_TONE_ICONS[tone], options.key ?? 'badge');\n badge.label = 'Badge';\n return badge;\n}\n\n/** A fresh Chip: Container `chip` › Icon + Text (outlined, static). */\nexport function buildChip(create: CompositeNodeFactory, options: PillOptions = {}): CompositeNode {\n const chip = buildPill(create, CHIP_STYLE, options.text ?? 'Chip', options.icon ?? CHIP_ICON, options.key ?? 'chip');\n chip.label = 'Chip';\n return chip;\n}\n","import { COLOR_SCHEME_TRAIT, elementStyleById, LinkType, setColorScheme, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { BadgeTone, buildBadge } from './badge';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, findByRole, parentInComposite, readLayerStyle, readProp, readStyle,\n removeFromComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * CARD v2 (composite T23; complex-components board 8, APPROVED 2026-10-20). Not a component: a recipe of\n * ordinary nodes, each part carrying a role, so every part is selectable on the canvas, in the layer tree\n * and the breadcrumb, wears its own element style and is edited on its own (R2). No runtime and no design\n * state — nothing is hidden at rest.\n *\n * Container `card` role card\n * ├─ Container `box` role card.media (optional: Image)\n * │ ├─ Image `media`\n * │ └─ Container `badge-accent` role card.badge (optional) › Icon + Text\n * └─ Container `box` role card.content (locked)\n * ├─ Text `eyebrow` role card.eyebrow (optional)\n * ├─ Heading h3 `h3` role card.title (locked — the card's link when linked)\n * ├─ Text `body` role card.text (optional)\n * └─ Container `box` role card.actions (optional) › ButtonBlock primary + ghost\n *\n * One recipe for every consumer: the builder's palette (its `createConfig`), generation-core's composer\n * (its `createSerializedNode`) and the site build — each passes its own node factory.\n */\n\nexport enum CardRole {\n Card = 'card',\n Media = 'card.media',\n Badge = 'card.badge',\n Content = 'card.content',\n Eyebrow = 'card.eyebrow',\n Title = 'card.title',\n Text = 'card.text',\n Actions = 'card.actions',\n}\n\n/** The optional parts — Card ▸ Parts, one switch each, in the board's order. Title and Content are locked. */\nexport enum CardPart {\n Media = 'media',\n Badge = 'badge',\n Eyebrow = 'eyebrow',\n Text = 'text',\n Actions = 'actions',\n}\n\nexport const CARD_PARTS: ReadonlyArray<CardPart> = [CardPart.Media, CardPart.Badge, CardPart.Eyebrow, CardPart.Text, CardPart.Actions];\n\nexport const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {\n [CardPart.Media]: CardRole.Media,\n [CardPart.Badge]: CardRole.Badge,\n [CardPart.Eyebrow]: CardRole.Eyebrow,\n [CardPart.Text]: CardRole.Text,\n [CardPart.Actions]: CardRole.Actions,\n};\n\n/** Card ▸ Layout — a preset, never a stored trait: `applyCardLayout` writes the card's layout styles. */\nexport enum CardLayout {\n Top = 'top',\n Side = 'side',\n Overlay = 'overlay',\n Compact = 'compact',\n}\n\nexport const CARD_LAYOUTS: ReadonlyArray<CardLayout> = [CardLayout.Top, CardLayout.Side, CardLayout.Overlay, CardLayout.Compact];\n/** What Card ▸ Layout shows once the author has changed the layout styles by hand. */\nexport const CARD_LAYOUT_CUSTOM = 'custom';\nexport type CardLayoutState = CardLayout | typeof CARD_LAYOUT_CUSTOM;\n\n/** The words a fresh card starts with — the author's to replace (or a bound field's). */\nexport interface CardWords {\n eyebrow: string;\n title: string;\n text: string;\n primary: string;\n secondary: string;\n badge: string;\n}\n\nexport const CARD_WORDS: Readonly<CardWords> = {\n eyebrow: 'Category',\n title: 'Card title',\n text: 'One or two sentences about this item.',\n primary: 'Learn more',\n secondary: 'Save',\n badge: 'New',\n};\n\n/** The breakpoint whose layer stacks an \"Image side\" card (Breakpoint.Mobile, ≤767px). */\nexport const CARD_STACK_BREAKPOINT = 'mobile';\n\nenum Type {\n Container = 'Container',\n Image = 'Image',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n ButtonBlock = 'ButtonBlock',\n}\n\nenum Style {\n Card = 'card',\n Box = 'box',\n Media = 'media',\n Eyebrow = 'eyebrow',\n Title = 'h3',\n Body = 'body',\n Label = 'button-label',\n Primary = 'button-primary',\n Ghost = 'button-ghost',\n Icon = 'icon',\n Scrim = 'media-scrim',\n}\n\nenum Scheme {\n Default = 'default',\n Inverse = 'inverse',\n}\n\nconst LINK_TYPE = 'linkType';\nconst SAVE_ICON = 'ph ph-bookmark-simple';\n\n/** A value an element style writes — read from the contract, never retyped. */\nconst styleValue = (style: string, trait: string): string => String(elementStyleById(style)?.base[trait] ?? '');\nconst CARD_PAD = styleValue(Style.Card, 'padding');\nconst IMAGE_RADIUS = styleValue(Style.Media, 'borderRadius');\nconst TITLE_SIZE = styleValue(Style.Title, 'fontSize');\nconst LEAD_SIZE = 'var(--iox-size-lead)';\nconst ZERO_BOX = '0px 0px 0px 0px';\n\n/** What every card part holds in every layout — the recipe's box. */\nconst CARD_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // No height: a card is a grid or flex item, and the cell's stretch is what makes a row's cards equal.\n // A percentage height resolved against whatever held the card (a tall section) and grew it to that.\n [CardRole.Card]: { display: 'flex', gap: '14px', width: '100%', minWidth: '0px', overflow: 'hidden', position: 'relative' },\n [CardRole.Media]: { display: 'block', width: '100%', minHeight: 'auto', flexGrow: '0', flexShrink: '0' },\n [CardRole.Content]: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%', minWidth: '0px', minHeight: 'auto' },\n [CardRole.Eyebrow]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n [CardRole.Title]: { margin: ZERO_BOX },\n [CardRole.Text]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n // Buttons pinned to the bottom (board 8 Q: equal heights + buttons pinned): the content column grows,\n // and the row's auto top margin takes the slack.\n [CardRole.Actions]: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '8px', margin: 'auto 0px 0px 0px', padding: '6px 0px 0px 0px', width: '100%', minHeight: 'auto' },\n};\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%' };\n/** A button's label and a pill's words: inherit the type and ink of what holds them. */\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst INLINE_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\n\n/** One layout preset: the style values it writes per role (every layout writes the same keys, so\n * switching is clean and detection exact), where the badge sits, and what it switches off. */\ninterface CardLayoutSpec {\n card: Readonly<Record<string, string>>;\n media: Readonly<Record<string, string>>;\n image: Readonly<Record<string, string>>;\n content: Readonly<Record<string, string>>;\n contentStyle: Style;\n contentScheme: Scheme;\n title: Readonly<Record<string, string>>;\n badgeOnMedia: boolean;\n /** The stacking layer (Image side only); every other layout clears these keys from it. */\n stack?: { card: Readonly<Record<string, string>>; media: Readonly<Record<string, string>>; image: Readonly<Record<string, string>> };\n partsOff?: ReadonlyArray<CardPart>;\n}\n\nconst IN_FLOW = { position: 'relative', top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' };\nconst GROWING_CONTENT = { position: 'static', flexGrow: '1', flexShrink: '1', flexBasis: '0%', padding: ZERO_BOX };\n\nconst LAYOUTS: Readonly<Record<CardLayout, CardLayoutSpec>> = {\n [CardLayout.Top]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n },\n [CardLayout.Side]: {\n card: { flexDirection: 'row', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '42%' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: '180px', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n stack: {\n card: { flexDirection: 'column' },\n media: { flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' },\n },\n },\n [CardLayout.Overlay]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-end', minHeight: '340px', padding: ZERO_BOX },\n media: { position: 'absolute', top: '0px', right: '0px', bottom: '0px', left: '0px', flexBasis: 'auto' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: 'auto', borderRadius: '0px' },\n content: { position: 'relative', flexGrow: '0', flexShrink: '0', flexBasis: 'auto', padding: `72px ${CARD_PAD} ${CARD_PAD} ${CARD_PAD}` },\n contentStyle: Style.Scrim, contentScheme: Scheme.Inverse,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: false,\n },\n [CardLayout.Compact]: {\n card: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '72px' },\n image: { aspectRatio: '1 / 1', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: LEAD_SIZE },\n badgeOnMedia: false,\n partsOff: [CardPart.Text, CardPart.Actions],\n },\n};\n\nconst STACK_KEYS = {\n card: Object.keys(LAYOUTS[CardLayout.Side].stack!.card),\n media: Object.keys(LAYOUTS[CardLayout.Side].stack!.media),\n image: Object.keys(LAYOUTS[CardLayout.Side].stack!.image),\n};\n\n/** What a type's UNSTYLED node holds — passed so a style switch (Content ⇄ the scrim) hands the old\n * style's values back to the type, never to `undefined`. */\nexport type BaselineStyles = (type: string) => Readonly<Record<string, unknown>>;\n\nexport interface CardEditOptions {\n baselineStyles?: BaselineStyles;\n}\n\nexport interface CardOptions extends CardEditOptions {\n layout?: CardLayout;\n /** Which optional parts the card starts with (all, by default). */\n parts?: Partial<Record<CardPart, boolean>>;\n words?: Partial<CardWords>;\n badgeTone?: BadgeTone;\n}\n\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: CardRole | null, elementStyle: string | null,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n const node = create({ key, type, props, elementStyle });\n if (role) node.role = role;\n if (label) node.label = label;\n writeStyles(node, role ? CARD_BASE[role] ?? {} : {});\n return node;\n}\n\nfunction buttonLabel(create: CompositeNodeFactory, key: string, words: string): CompositeNode {\n const label = make(create, key, Type.Text, null, Style.Label, { content: words, tag: 'span' });\n writeStyles(label, LABEL_BASE);\n return label;\n}\n\n/** Each optional part (and the locked title) as the recipe builds it. */\nconst PART_BUILDERS: Readonly<Record<CardPart, (create: CompositeNodeFactory, words: CardWords, tone: BadgeTone) => CompositeNode>> = {\n [CardPart.Media]: (create) => {\n const media = make(create, 'media', Type.Container, CardRole.Media, Style.Box, {}, 'Media');\n const image = make(create, 'image', Type.Image, null, Style.Media, { src: '', alt: '' });\n writeStyles(image, IMAGE_BASE);\n media.children = [image];\n return media;\n },\n [CardPart.Badge]: (create, words, tone) => {\n const badge = buildBadge(create, { tone, text: words.badge, key: 'badge' });\n badge.role = CardRole.Badge;\n badge.label = 'Badge';\n return badge;\n },\n [CardPart.Eyebrow]: (create, words) => make(create, 'eyebrow', Type.Text, CardRole.Eyebrow, Style.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),\n [CardPart.Text]: (create, words) => make(create, 'text', Type.Text, CardRole.Text, Style.Body, { content: words.text, tag: 'p' }, 'Text'),\n [CardPart.Actions]: (create, words) => {\n const actions = make(create, 'actions', Type.Container, CardRole.Actions, Style.Box, {}, 'Buttons');\n const primary = make(create, 'primary', Type.ButtonBlock, null, Style.Primary);\n primary.children = [buttonLabel(create, 'primary-label', words.primary)];\n const ghost = make(create, 'secondary', Type.ButtonBlock, null, Style.Ghost);\n const icon = make(create, 'secondary-icon', Type.Icon, null, Style.Icon, { iconClass: SAVE_ICON });\n writeStyles(icon, INLINE_ICON);\n ghost.children = [icon, buttonLabel(create, 'secondary-label', words.secondary)];\n actions.children = [primary, ghost];\n return actions;\n },\n};\n\nfunction buildTitle(create: CompositeNodeFactory, words: CardWords): CompositeNode {\n return make(create, 'title', Type.Heading, CardRole.Title, Style.Title, { content: words.title, level: 'h3', [LINK_TYPE]: LinkType.None }, 'Title');\n}\n\n/** A fresh Card v2: every part a node with its role and element style, laid out by `options.layout`. */\nexport function buildCardRecipe(create: CompositeNodeFactory, options: CardOptions = {}): CompositeNode {\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const tone = options.badgeTone ?? BadgeTone.Accent;\n const on = (part: CardPart) => options.parts?.[part] !== false;\n const card = make(create, 'card', Type.Container, CardRole.Card, Style.Card, {}, 'Card');\n const content = make(create, 'content', Type.Container, CardRole.Content, Style.Box, {}, 'Content');\n content.children = [\n ...(on(CardPart.Eyebrow) ? [PART_BUILDERS[CardPart.Eyebrow](create, words, tone)] : []),\n buildTitle(create, words),\n ...(on(CardPart.Text) ? [PART_BUILDERS[CardPart.Text](create, words, tone)] : []),\n ...(on(CardPart.Actions) ? [PART_BUILDERS[CardPart.Actions](create, words, tone)] : []),\n ];\n card.children = [...(on(CardPart.Media) ? [PART_BUILDERS[CardPart.Media](create, words, tone)] : []), content];\n if (on(CardPart.Badge)) placeBadge(card, PART_BUILDERS[CardPart.Badge](create, words, tone), true);\n applyCardLayout(card, options.layout ?? CardLayout.Top, options);\n return card;\n}\n\n/** True when `node` is a Card v2 root. */\nexport function isCardRoot(node: CompositeNode | null | undefined): boolean {\n return node?.role === CardRole.Card;\n}\n\n/** The Card a part belongs to: the nearest ancestor (or the node itself) playing `card`. `path` = the\n * node's ancestors, root first. */\nexport function cardRootOf(node: CompositeNode, path: ReadonlyArray<CompositeNode>): CompositeNode | null {\n if (isCardRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCardRoot(path[i])) return path[i];\n return null;\n}\n\n/** Card ▸ Parts: which optional parts the card holds now. */\nexport function cardPartsOf(card: CompositeNode): Record<CardPart, boolean> {\n return Object.fromEntries(CARD_PARTS.map(part => [part, !!findByRole(card, CARD_PART_ROLE[part])])) as Record<CardPart, boolean>;\n}\n\nconst imageOf = (media: CompositeNode | undefined): CompositeNode | undefined => media?.children?.find(c => c.type === Type.Image);\n\n/** Put the badge where the layout says: the Media's top corner, or the head of the content column\n * (Image behind text, Compact, or no Media at all). The corner's insets are logical, in iox-design.css\n * (mirrored in RTL); `position` is the node's own, because the editing canvas forces every node's\n * position from its style props. */\nfunction placeBadge(card: CompositeNode, badge: CompositeNode, onMedia: boolean): void {\n const media = findByRole(card, CardRole.Media);\n const content = findByRole(card, CardRole.Content);\n removeFromComposite(card, badge);\n const overMedia = onMedia && !!media;\n if (overMedia) media!.children = [...(media!.children ?? []), badge];\n else if (content) content.children = [badge, ...(content.children ?? [])];\n writeStyles(badge, { position: overMedia ? 'absolute' : 'static' });\n}\n\n/** Through design-core's ONE scheme writer — the same setting Section colours edits everywhere. */\nfunction writeScheme(node: CompositeNode, scheme: Scheme): void {\n setColorScheme(node, scheme);\n}\n\n/** Write one role's layout values from a spec (base + layers). */\nfunction applyPartLayout(card: CompositeNode, spec: CardLayoutSpec, part: CompositeNode, baseline: BaselineStyles): void {\n switch (part.role) {\n case CardRole.Card:\n writeStyles(part, { ...CARD_BASE[CardRole.Card], ...spec.card });\n setStack(part, spec.stack?.card, STACK_KEYS.card);\n return;\n case CardRole.Media: {\n writeStyles(part, { ...CARD_BASE[CardRole.Media], ...spec.media });\n setStack(part, spec.stack?.media, STACK_KEYS.media);\n const image = imageOf(part);\n if (image) {\n writeStyles(image, { ...IMAGE_BASE, ...spec.image });\n setStack(image, spec.stack?.image, STACK_KEYS.image);\n }\n return;\n }\n case CardRole.Content: {\n const current = part.elementStyle;\n if (current !== spec.contentStyle) {\n switchElementStyle(part, current, spec.contentStyle, baseline(part.type));\n part.elementStyle = spec.contentStyle;\n }\n writeStyles(part, { ...CARD_BASE[CardRole.Content], ...spec.content });\n writeScheme(part, spec.contentScheme);\n return;\n }\n case CardRole.Title:\n writeStyles(part, spec.title);\n return;\n default:\n return;\n }\n}\n\nfunction setStack(node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>): void {\n if (values) writeLayerStyles(node, CARD_STACK_BREAKPOINT, values);\n else clearLayerStyles(node, CARD_STACK_BREAKPOINT, keys);\n}\n\nexport interface CardLayoutResult {\n layout: CardLayout;\n /** Parts the preset switched off (Compact: Text and Buttons). */\n removed: CardPart[];\n}\n\n/**\n * Card ▸ Layout. Rewrites the card's LAYOUT styles for `layout` — the card's direction and box, the\n * Media's placement, the Image's aspect, the content block (Image behind text: the `media-scrim` style +\n * the Inverse scheme), the title size (Compact) and, for Image side, a Mobile layer that stacks it — and\n * moves the badge to where the layout puts it. Nothing else on any part. One undo step for the caller.\n */\nexport function applyCardLayout(card: CompositeNode, layout: CardLayout, options: CardEditOptions = {}): CardLayoutResult {\n const spec = LAYOUTS[layout];\n const baseline = options.baselineStyles ?? (() => ({}));\n const removed: CardPart[] = [];\n for (const part of spec.partsOff ?? []) if (setCardPart(card, part, false)) removed.push(part);\n applyPartLayout(card, spec, card, baseline);\n for (const role of [CardRole.Media, CardRole.Content, CardRole.Title]) {\n const part = findByRole(card, role);\n if (part) applyPartLayout(card, spec, part, baseline);\n }\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n return { layout, removed };\n}\n\nconst same = (a: unknown, b: unknown) => String(a ?? '').trim() === String(b ?? '').trim();\nconst holds = (node: CompositeNode, values: Readonly<Record<string, string>>) => Object.entries(values).every(([k, v]) => same(readStyle(node, k), v));\nconst holdsLayer = (node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>) =>\n values ? Object.entries(values).every(([k, v]) => same(readLayerStyle(node, CARD_STACK_BREAKPOINT, k), v))\n : keys.every(k => readLayerStyle(node, CARD_STACK_BREAKPOINT, k) === undefined);\n\nfunction matches(card: CompositeNode, spec: CardLayoutSpec): boolean {\n if (!holds(card, spec.card) || !holdsLayer(card, spec.stack?.card, STACK_KEYS.card)) return false;\n const media = findByRole(card, CardRole.Media);\n if (media) {\n if (!holds(media, spec.media) || !holdsLayer(media, spec.stack?.media, STACK_KEYS.media)) return false;\n const image = imageOf(media);\n if (image && (!holds(image, spec.image) || !holdsLayer(image, spec.stack?.image, STACK_KEYS.image))) return false;\n }\n const content = findByRole(card, CardRole.Content);\n if (content) {\n if (content.elementStyle !== spec.contentStyle || !holds(content, spec.content)) return false;\n if (!same(readProp(content, COLOR_SCHEME_TRAIT) ?? Scheme.Default, spec.contentScheme)) return false;\n }\n const title = findByRole(card, CardRole.Title);\n if (title && !holds(title, spec.title)) return false;\n const badge = findByRole(card, CardRole.Badge);\n if (badge && media) {\n const onMedia = parentInComposite(card, badge) === media;\n if (onMedia !== spec.badgeOnMedia) return false;\n }\n return true;\n}\n\n/** The layout the card's styles hold now, or `custom` once they were changed by hand (Card ▸ Layout). */\nexport function detectCardLayout(card: CompositeNode): CardLayoutState {\n return CARD_LAYOUTS.find(layout => matches(card, LAYOUTS[layout])) ?? CARD_LAYOUT_CUSTOM;\n}\n\nexport interface CardPartChange {\n part: CardPart;\n /** The node removed (off) or stamped (on); null when there was nothing to do. */\n node: CompositeNode | null;\n}\n\n/**\n * Card ▸ Parts. Off removes the part (the badge first moves out of a removed Media); on stamps it back\n * from the recipe into its role's slot, wearing its element style and laid out like the rest of the card\n * (the card's current layout; Image top when it is Custom). Returns the node touched, or null when the\n * card already was that way. Title and Content are not parts: they are locked (structure guard).\n */\nexport function setCardPart(card: CompositeNode, part: CardPart, on: boolean, create?: CompositeNodeFactory, options: CardOptions = {}): CompositeNode | null {\n const role = CARD_PART_ROLE[part];\n const existing = findByRole(card, role);\n if (!on) {\n if (!existing) return null;\n if (part === CardPart.Media) {\n const badge = findByRole(existing, CardRole.Badge);\n if (badge) placeBadge(card, badge, false);\n }\n removeFromComposite(card, existing);\n return existing;\n }\n if (existing || !create) return null;\n const layout = detectCardLayout(card);\n const spec = LAYOUTS[layout === CARD_LAYOUT_CUSTOM ? CardLayout.Top : layout];\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const node = PART_BUILDERS[part](create, words, options.badgeTone ?? BadgeTone.Accent);\n const content = findByRole(card, CardRole.Content);\n switch (part) {\n case CardPart.Media: {\n card.children = [node, ...(card.children ?? [])];\n applyPartLayout(card, spec, node, () => ({}));\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n break;\n }\n case CardPart.Badge:\n placeBadge(card, node, spec.badgeOnMedia);\n break;\n default:\n if (content) insertInContent(content, part, node);\n break;\n }\n return node;\n}\n\n/** The content column's order: [badge], eyebrow, title, text, buttons. */\nconst CONTENT_ORDER: ReadonlyArray<string> = [CardRole.Badge, CardRole.Eyebrow, CardRole.Title, CardRole.Text, CardRole.Actions];\n\nfunction insertInContent(content: CompositeNode, part: CardPart, node: CompositeNode): void {\n const rank = (n: CompositeNode) => { const i = CONTENT_ORDER.indexOf(n.role ?? ''); return i < 0 ? CONTENT_ORDER.length : i; };\n const children = [...(content.children ?? [])];\n const own = rank(node);\n const at = children.findIndex(c => rank(c) > own);\n children.splice(at < 0 ? children.length : at, 0, node);\n content.children = children;\n}\n\n// ── Link the whole card ──────────────────────────────────────────────────────────────────────\n\n/** The card's title — what \"Link the whole card\" makes the link (its words are the link's name). */\nexport function cardTitleOf(card: CompositeNode): CompositeNode | undefined {\n return findByRole(card, CardRole.Title);\n}\n\n/** True when the card links as a whole: its title carries a link (the stretched link renders from it). */\nexport function isCardLinked(card: CompositeNode): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const type = readProp(title, LINK_TYPE);\n return type === LinkType.Page || type === LinkType.External;\n}\n\n/**\n * Card ▸ Link ▸ \"Link the whole card\". On: the title links (to a website page, unless it already pointed\n * at a URL — the target it held is kept); off: the title links nowhere (its target is kept for the next\n * time). The stretched link itself is the shared CSS (iox-design.css), keyed on the title's anchor.\n */\nexport function setCardLinked(card: CompositeNode, on: boolean): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const current = readProp(title, LINK_TYPE);\n const next = on ? (current === LinkType.External ? LinkType.External : LinkType.Page) : LinkType.None;\n return writeProp(title, LINK_TYPE, next);\n}\n","import { AccordionRole, DisclosureRole } from './composite-kinds';\nimport { CardPart, CardRole } from './card';\n\n/**\n * The structure every composite declares (composite-components plan §3a `RoleSpec`): where a role may\n * live and whether it is LOCKED (a structural part that cannot be deleted or moved out — a card always\n * has its content column and its title). Optional parts carry the Parts switch that re-adds them.\n * The builder's delete paths and its drop/paste rule ask `structureRefusal` — ONE answer for all of them.\n */\nexport interface CompositeRoleSpec {\n /** The role of the part's parent; null for a composite root. */\n readonly parent: string | null;\n readonly locked?: boolean;\n readonly part?: CardPart;\n}\n\nexport const COMPOSITE_ROLE_SPECS: Readonly<Record<string, CompositeRoleSpec>> = {\n [CardRole.Card]: { parent: null },\n [CardRole.Media]: { parent: CardRole.Card, part: CardPart.Media },\n [CardRole.Badge]: { parent: null, part: CardPart.Badge },\n [CardRole.Content]: { parent: CardRole.Card, locked: true },\n [CardRole.Eyebrow]: { parent: CardRole.Content, part: CardPart.Eyebrow },\n [CardRole.Title]: { parent: CardRole.Content, locked: true },\n [CardRole.Text]: { parent: CardRole.Content, part: CardPart.Text },\n [CardRole.Actions]: { parent: CardRole.Content, part: CardPart.Actions },\n // CC2 — an item always keeps its header and its panel; the icon is Behaviour ▸ Icon's.\n [AccordionRole.Accordion]: { parent: null },\n [AccordionRole.Item]: { parent: AccordionRole.Accordion },\n [AccordionRole.Trigger]: { parent: AccordionRole.Item, locked: true },\n [AccordionRole.Panel]: { parent: AccordionRole.Item, locked: true },\n [AccordionRole.Icon]: { parent: AccordionRole.Trigger },\n // CC2.1 — a disclosure always keeps its toggle and its panel; the words and the icon are the author's.\n [DisclosureRole.Disclosure]: { parent: null },\n [DisclosureRole.Trigger]: { parent: DisclosureRole.Disclosure, locked: true },\n [DisclosureRole.Panel]: { parent: DisclosureRole.Disclosure, locked: true },\n [DisclosureRole.More]: { parent: DisclosureRole.Trigger },\n [DisclosureRole.Less]: { parent: DisclosureRole.Trigger },\n [DisclosureRole.Icon]: { parent: DisclosureRole.Trigger },\n};\n\nexport enum StructureEdit {\n Delete = 'delete',\n /** A drop, paste or wrap that would put the node somewhere new. */\n Move = 'move',\n}\n\nexport enum StructureRefusal {\n /** A locked part cannot be deleted (the card's Content and Title). */\n LockedPart = 'locked-part',\n /** A locked part can only live directly inside its own parent role. */\n LockedPlacement = 'locked-placement',\n}\n\ninterface RoleLike { role?: string | null }\n\n/**\n * Why the structure guard refuses `edit` on `node`, or null when it is allowed. `ancestors` (Move only) =\n * the new parent chain, root first, the direct parent last.\n */\nexport function structureRefusal(node: RoleLike | null | undefined, edit: StructureEdit, ancestors: ReadonlyArray<RoleLike> = []): StructureRefusal | null {\n const spec = node?.role ? COMPOSITE_ROLE_SPECS[node.role] : undefined;\n if (!spec?.locked) return null;\n if (edit === StructureEdit.Delete) return StructureRefusal.LockedPart;\n const parent = ancestors[ancestors.length - 1];\n return parent?.role === spec.parent ? null : StructureRefusal.LockedPlacement;\n}\n\n/** True when `node` is a locked part (shown with a lock and no delete in the layer tree). Deleting a whole\n * composite is always allowed — only its locked parts are refused. */\nexport function isLockedPart(node: RoleLike | null | undefined): boolean {\n return !!(node?.role && COMPOSITE_ROLE_SPECS[node.role]?.locked);\n}\n","/**\n * @vectoriox/iox-ui/composite-core — composites built from the builder's own parts (composite-components\n * plan §3a). FRAMEWORK-FREE: the builder, the SSR engine and iox-cms (generation-core's composer, the site\n * build) read the same recipes, roles and structure rules. Card v2 + Badge / Chip (T23 / T25) are the\n * first; the Accordion (CC2) adds the first composite RUNTIME (accordion-runtime.ts — DOM only, no\n * framework), which the Disclosure (CC2.1) runs too — a one-item accordion whose root is its item; Tabs join with\n * their own phase.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './composite-node';\nexport * from './composite-kinds';\nexport * from './accordion';\nexport * from './accordion-runtime';\nexport * from './disclosure';\nexport * from './badge';\nexport * from './card';\nexport * from './structure';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Type","Style","ZERO_BOX","LINK_TYPE","PART_BASE","make"],"mappings":";;AAgDA;AACgG;AAC1F,SAAU,iBAAiB,CAAC,MAA4B,EAAE,IAAuB,EAAE,IAAmB,EAAE,KAAyB,EACnI,IAAuC,EAAA;AACvC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AACzB,IAAA,IAAI,IAAI;AAAE,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAC1B,IAAA,IAAI,KAAK;AAAE,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAC7B,IAAA,IAAI,IAAI;AAAE,QAAA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,EAAA,CAAA,CAAA;IAMb;AAAZ,CAAA,UAAY,gBAAgB,EAAA;;AAExB,IAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,aAA0B;;AAE1B,IAAA,gBAAA,CAAA,iBAAA,CAAA,GAAA,kBAAoC;AACxC,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;AAS5B;;;AAGG;AACG,SAAU,gBAAgB,CAAC,IAAiC,EAAE,IAAmB,EAAE,YAAqC,EAAE,EAAA;AAC5H,IAAA,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS;IACrE,IAAI,CAAC,IAAI,EAAE,MAAM;AAAE,QAAA,OAAO,IAAI;AAC9B,IAAA,IAAI,IAAI,KAAK,aAAa,CAAC,MAAM;QAAE,OAAO,gBAAgB,CAAC,UAAU;IACrE,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9C,IAAA,OAAO,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAAC,eAAe;AACjF;AAEA;AACuE;AACjE,SAAU,YAAY,CAAC,IAAiC,EAAA;AAC1D,IAAA,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;AACpE;;ACvEA;;;;;;;;AAQG;;ACRH;;AAEG;;;;"}
1
+ {"version":3,"file":"vectoriox-iox-ui-composite-core.mjs","sources":["../../../projects/iox-ui/src/composite-core/composite-node.ts","../../../projects/iox-ui/src/composite-core/composite-kinds.ts","../../../projects/iox-ui/src/composite-core/accordion.ts","../../../projects/iox-ui/src/composite-core/accordion-runtime.ts","../../../projects/iox-ui/src/composite-core/disclosure.ts","../../../projects/iox-ui/src/composite-core/badge.ts","../../../projects/iox-ui/src/composite-core/card.ts","../../../projects/iox-ui/src/composite-core/slider.ts","../../../projects/iox-ui/src/composite-core/structure.ts","../../../projects/iox-ui/src/composite-core/slider-runtime.ts","../../../projects/iox-ui/src/composite-core/lightbox.ts","../../../projects/iox-ui/src/composite-core/public-api.ts","../../../projects/iox-ui/src/composite-core/vectoriox-iox-ui-composite-core.ts"],"sourcesContent":["import { ElementStyleTarget, readOwnedTrait, writeOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\n/**\n * The node shape composite-core reads and writes — both a builder `ComponentNode` (values in\n * `traits[].default` / `styleTraits`) and a saved layout node (flat `props` / `styleProps`), the same\n * dual shape design-core's element styles already speak. A composite is a tree of ORDINARY nodes\n * (composite-components plan §1): this module only adds the `role` each part carries.\n */\nexport interface CompositeTrait {\n name: string;\n default?: unknown;\n}\n\nexport interface CompositeLayer {\n styleProps?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface CompositeNode extends ElementStyleTarget {\n id?: string;\n /** The part this node plays in its composite (`card.title`). Additive; saved; read by the shared CSS\n * (`iox-role-<role>`), the structure guard and the composite's own editors. */\n role?: string;\n /** An item's identity inside its composite (Accordion `k1`… — composite plan §3, `itemKey`). Additive; saved.\n * From content, a row's key is the row's own id and the template carries none. */\n itemKey?: string;\n /** For a targeted state (`trigger-on`): the node whose state drives it. */\n stateTriggers?: Partial<Record<string, string>>;\n label?: string;\n props?: Record<string, unknown>;\n traits?: CompositeTrait[];\n responsive?: Partial<Record<string, CompositeLayer>>;\n children?: CompositeNode[];\n}\n\n/** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one\n * (the builder's `createConfig`, generation-core's `createSerializedNode`), with these props and this\n * element style. `key` is stable per recipe node — a consumer that needs deterministic ids builds them\n * from it (generation-core: `<root id>-<key>`). */\n/** `elementStyle: NO_ELEMENT_STYLE` asks for a node that wears NO element style (undefined / null = the type's default,\n * as both node factories have always read it): a migrated slider's bare chevrons, a lightbox's slide (CC3). */\nexport const NO_ELEMENT_STYLE = '';\n\nexport interface CompositeNodeSpec {\n key: string;\n type: string;\n props?: Readonly<Record<string, unknown>>;\n elementStyle?: string | null;\n}\n\nexport type CompositeNodeFactory = (spec: CompositeNodeSpec) => CompositeNode;\n\n/** A recipe part: a NEW node (`create`) playing `role` under `label`, with the layout `base` styles its recipe\n * gives it — its LOOK is its element style. Shared by every recipe (Accordion, Disclosure). */\nexport function makeCompositePart(create: CompositeNodeFactory, spec: CompositeNodeSpec, role: string | null, label: string | undefined,\n base?: Readonly<Record<string, string>>): CompositeNode {\n const node = create(spec);\n if (role) node.role = role;\n if (label) node.label = label;\n if (base) writeStyles(node, base);\n return node;\n}\n\nconst usesTraits = (node: CompositeNode): boolean => Array.isArray(node.traits);\n\n/** A content trait's value — `traits[].default` on a builder node, `props[name]` on a saved one. */\nexport function readProp(node: CompositeNode, name: string): unknown {\n return usesTraits(node) ? node.traits!.find(t => t.name === name)?.default : node.props?.[name];\n}\n\n/** Write a content trait. False when a builder node has no such trait (the value would be dropped). */\nexport function writeProp(node: CompositeNode, name: string, value: unknown): boolean {\n if (usesTraits(node)) {\n const trait = node.traits!.find(t => t.name === name);\n if (!trait) return false;\n trait.default = value;\n return true;\n }\n node.props = { ...(node.props ?? {}), [name]: value };\n return true;\n}\n\n/** A base style value (the node's own, either shape). */\nexport function readStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n\n/** Write base style values; returns the names the node has no slot for (a builder node drops them). */\nexport function writeStyles(node: CompositeNode, values: Readonly<Record<string, string>>): string[] {\n const missing: string[] = [];\n for (const [name, value] of Object.entries(values)) {\n if (!writeOwnedTrait(node, { trait: name }, value)) missing.push(name);\n }\n return missing;\n}\n\n/** Set style values in one breakpoint layer (`responsive[bp].styleProps`, the shape both renderers'\n * shared `planResponsiveRules` reads). */\nexport function writeLayerStyles(node: CompositeNode, breakpoint: string, values: Readonly<Record<string, string>>): void {\n const responsive = { ...(node.responsive ?? {}) };\n const layer: CompositeLayer = { ...(responsive[breakpoint] ?? {}) };\n layer.styleProps = { ...(layer.styleProps ?? {}), ...values };\n responsive[breakpoint] = layer;\n node.responsive = responsive;\n}\n\n/** Remove style keys from one breakpoint layer; an emptied layer (and an emptied map) is dropped. */\nexport function clearLayerStyles(node: CompositeNode, breakpoint: string, names: ReadonlyArray<string>): void {\n const layer = node.responsive?.[breakpoint];\n if (!layer?.styleProps) return;\n const styleProps = { ...layer.styleProps };\n for (const name of names) delete styleProps[name];\n const next: CompositeLayer = { ...layer };\n if (Object.keys(styleProps).length) next.styleProps = styleProps;\n else delete next.styleProps;\n const responsive = { ...(node.responsive ?? {}) };\n if (Object.keys(next).length) responsive[breakpoint] = next;\n else delete responsive[breakpoint];\n node.responsive = Object.keys(responsive).length ? responsive : undefined;\n}\n\n/** A breakpoint layer's own value for one style key. */\nexport function readLayerStyle(node: CompositeNode, breakpoint: string, name: string): unknown {\n return node.responsive?.[breakpoint]?.styleProps?.[name];\n}\n\n/** Depth-first: `node`, then every descendant. */\nexport function walkComposite(node: CompositeNode, visit: (node: CompositeNode, parent: CompositeNode | null) => void, parent: CompositeNode | null = null): void {\n visit(node, parent);\n for (const child of node.children ?? []) walkComposite(child, visit, node);\n}\n\n/**\n * The first descendant of `root` playing `role`. Never descends into a NESTED composite of the same\n * root role (a card inside a card's content keeps its own parts).\n */\nexport function findByRole(root: CompositeNode, role: string): CompositeNode | undefined {\n for (const child of root.children ?? []) {\n if (child.role === role) return child;\n if (child.role === root.role && root.role) continue;\n const hit = findByRole(child, role);\n if (hit) return hit;\n }\n return undefined;\n}\n\n/** The node's parent inside `root`, or null. */\nexport function parentInComposite(root: CompositeNode, node: CompositeNode): CompositeNode | null {\n for (const child of root.children ?? []) {\n if (child === node) return root;\n const hit = parentInComposite(child, node);\n if (hit) return hit;\n }\n return null;\n}\n\n/** Detach `node` from its parent inside `root`. True when it was found. */\nexport function removeFromComposite(root: CompositeNode, node: CompositeNode): boolean {\n const parent = parentInComposite(root, node);\n if (!parent?.children) return false;\n parent.children.splice(parent.children.indexOf(node), 1);\n return true;\n}\n","/**\n * The open/close composites' kinds and roles (CC2 Accordion, CC2.1 Disclosure — composite plan T9 / T21). ONE\n * family: a Disclosure is a one-item accordion whose ROOT is its item, so both run the same state machine, the\n * same attribute planners and the same runtime (`accordion-runtime.ts`). Every consumer that treats \"an item\",\n * \"a header\" or \"a panel\" alike asks these predicates, never a role literal.\n */\n\nexport enum CompositeKind {\n Accordion = 'accordion',\n Disclosure = 'disclosure',\n}\n\nexport enum AccordionRole {\n Accordion = 'accordion',\n Item = 'accordion.item',\n Trigger = 'accordion.trigger',\n Icon = 'accordion.icon',\n Panel = 'accordion.panel',\n}\n\n/**\n * DISCLOSURE (\"Read more\") — one trigger, one panel. The root IS its item (it carries the item key and\n * `data-iox-on`); the trigger holds two words, the one shown while closed (`more`) and the one shown while open\n * (`less`), swapped by the Item open state — never by script.\n */\nexport enum DisclosureRole {\n Disclosure = 'disclosure',\n Trigger = 'disclosure.trigger',\n More = 'disclosure.more',\n Less = 'disclosure.less',\n Icon = 'disclosure.icon',\n Panel = 'disclosure.panel',\n}\n\ninterface RoleLike { role?: string | null }\n\n/** The roles each kind plays in the shared runtime. */\nexport interface CompositeKindRoles {\n root: string;\n item: string;\n trigger: string;\n panel: string;\n icon: string;\n}\n\nexport const COMPOSITE_KIND_ROLES: Readonly<Record<CompositeKind, CompositeKindRoles>> = {\n [CompositeKind.Accordion]: { root: AccordionRole.Accordion, item: AccordionRole.Item, trigger: AccordionRole.Trigger, panel: AccordionRole.Panel, icon: AccordionRole.Icon },\n [CompositeKind.Disclosure]: { root: DisclosureRole.Disclosure, item: DisclosureRole.Disclosure, trigger: DisclosureRole.Trigger, panel: DisclosureRole.Panel, icon: DisclosureRole.Icon },\n};\n\nconst KINDS = Object.values(CompositeKind);\nconst rolesOf = (pick: keyof CompositeKindRoles): ReadonlySet<string> => new Set(KINDS.map(k => COMPOSITE_KIND_ROLES[k][pick]));\nconst ROOT_ROLES = rolesOf('root');\nconst ITEM_ROLES = rolesOf('item');\nconst TRIGGER_ROLES = rolesOf('trigger');\nconst PANEL_ROLES = rolesOf('panel');\n\n/** The kind a role belongs to (`disclosure.panel` → Disclosure), or null for any other role. */\nexport function compositeKindOfRole(role: string | null | undefined): CompositeKind | null {\n const head = role?.split('.')[0];\n return (KINDS as string[]).includes(head ?? '') ? head as CompositeKind : null;\n}\n\n/** A root that runs the open/close runtime (an Accordion or a Disclosure). */\nexport function isCompositeRoot(node: RoleLike | null | undefined): boolean {\n return !!node?.role && ROOT_ROLES.has(node.role);\n}\n\n/** An ITEM — an accordion's item, or a disclosure (its own item). */\nexport function isCompositeItem(node: RoleLike | null | undefined): boolean {\n return !!node?.role && ITEM_ROLES.has(node.role);\n}\n\n/** A trigger — rendered as a `<button>` that opens its item, never a link. */\nexport function isCompositeTrigger(node: RoleLike | null | undefined): boolean {\n return !!node?.role && TRIGGER_ROLES.has(node.role);\n}\n\n/** A panel — rendered inside the track + region the one hiding rule collapses. */\nexport function isCompositePanel(node: RoleLike | null | undefined): boolean {\n return !!node?.role && PANEL_ROLES.has(node.role);\n}\n\nexport function isDisclosureRoot(node: RoleLike | null | undefined): boolean {\n return node?.role === DisclosureRole.Disclosure;\n}\n\n/** True for any part of a disclosure (its root included). */\nexport function isDisclosurePart(node: RoleLike | null | undefined): boolean {\n return compositeKindOfRole(node?.role) === CompositeKind.Disclosure;\n}\n\n/** The composite root a node belongs to: the nearest ancestor (or the node itself) that is one. `path` = the\n * node's ancestors, root first. */\nexport function compositeRootOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isCompositeRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCompositeRoot(path[i])) return path[i];\n return null;\n}\n\n/** The item a node sits in — the nearest item of either kind (itself when it is one) — or null. An accordion\n * root ends the walk (its items are below it). */\nexport function compositeItemOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isCompositeItem(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (isCompositeItem(path[i])) return path[i];\n if (isCompositeRoot(path[i])) return null;\n }\n return null;\n}\n","import { readOwnedTrait } from '@vectoriox/iox-ui/design-core';\n\nimport {\n AccordionRole, COMPOSITE_KIND_ROLES, CompositeKind, compositeKindOfRole,\n} from './composite-kinds';\nimport {\n CompositeNode, CompositeNodeFactory, findByRole, makeCompositePart, readProp, removeFromComposite, walkComposite, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * ACCORDION (CC2 — composite K1; complex-components boards 3, 4 and 9, APPROVED 2026-10-20). Not a\n * component: a recipe of ordinary nodes, each part carrying a role, so every part is selectable on the\n * canvas, in the layer tree and the breadcrumb, and wears its own element style (R2).\n *\n * Container `box` role accordion traits multiple · defaultOn (Manual)\n * — or a Repeater bound to a list role accordion ONE template item (From content, R3)\n * └─ Container `accordion-item` role accordion.item itemKey k1 … (Manual) · the row's id (From content)\n * ├─ LinkedContainer `accordion-trigger` role accordion.trigger → <hN><button> (the question's level)\n * │ ├─ Heading `h3` the question (rendered as phrasing inside the button)\n * │ └─ Icon `icon` role accordion.icon Item open → rotate\n * └─ Container `accordion-panel` role accordion.panel inside a hidden=\"until-found\" region\n * └─ Text `body` the answer\n *\n * The behaviour is BUILT IN (composite plan D1 = B): which items are open is one state machine\n * (`nextAccordionState`), the ARIA and DOM state one planner (`accordionItemState` and the attribute\n * functions), the keyboard one key map — read by the builder canvas, both engine paths and the composer.\n */\n\n/** The behaviour options a composite root stores as ordinary TRAITS (composite plan §3). */\nexport enum CompositeBehaviourTrait {\n /** Several items may be open at once (\"Allow several open\"). */\n Multiple = 'multiple',\n /** Which items open by default: first · none · all. */\n DefaultOn = 'defaultOn',\n}\n\nexport enum AccordionDefaultOn {\n First = 'first',\n None = 'none',\n All = 'all',\n}\n\nexport const ACCORDION_DEFAULT_ONS: ReadonlyArray<AccordionDefaultOn> = [AccordionDefaultOn.First, AccordionDefaultOn.None, AccordionDefaultOn.All];\n\n/** Behaviour ▸ Icon — a preset over the items' icons, never a stored trait (detected from the icons). */\nexport enum AccordionIcon {\n Chevron = 'chevron',\n Plus = 'plus',\n None = 'none',\n}\n\nexport const ACCORDION_ICONS: ReadonlyArray<AccordionIcon> = [AccordionIcon.Chevron, AccordionIcon.Plus, AccordionIcon.None];\n\n/** Each icon's glyph and how far it turns when its item opens (board 4: a chevron flips, a plus becomes ×). */\nexport const ACCORDION_ICON_GLYPH: Readonly<Record<Exclude<AccordionIcon, AccordionIcon.None>, { iconClass: string; turn: string }>> = {\n [AccordionIcon.Chevron]: { iconClass: 'ph ph-caret-down', turn: '180deg' },\n [AccordionIcon.Plus]: { iconClass: 'ph ph-plus', turn: '45deg' },\n};\n\n/** The item-open style state (a part INSIDE an item, styled by its item being open — board 9 \"Item open\"). */\nexport const ITEM_OPEN_STATE = 'trigger-on';\n/** A part that IS on (an item, its header, its panel — board 9 \"Open\"). */\nexport const ON_STATE = 'on';\n\n/** Items from content default to twenty rows (board 9 Q13). */\nexport const ACCORDION_CONTENT_LIMIT = 20;\n\nexport interface AccordionWords {\n question: string;\n answer: string;\n}\n\n/** The words a fresh accordion starts with — generic, the author's to replace (as Card v2's are). */\nexport const ACCORDION_WORDS: ReadonlyArray<AccordionWords> = [\n { question: 'Write the first question people ask', answer: 'Answer it plainly, in two or three short sentences.' },\n { question: 'Write the second question', answer: 'Answer it plainly, in two or three short sentences.' },\n { question: 'Write the third question', answer: 'Answer it plainly, in two or three short sentences.' },\n];\nexport const ACCORDION_NEW_ITEM_WORDS: Readonly<AccordionWords> = { question: 'Write a new question', answer: 'Answer it plainly, in two or three short sentences.' };\n\nenum Type {\n Container = 'Container',\n LinkedContainer = 'LinkedContainer',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n Repeater = 'Repeater',\n}\n\nenum Style {\n Root = 'box',\n Item = 'accordion-item',\n Trigger = 'accordion-trigger',\n Question = 'h3',\n Icon = 'icon',\n Panel = 'accordion-panel',\n Answer = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\nconst HEADING_LEVELS = ['h2', 'h3', 'h4', 'h5', 'h6'];\nconst DEFAULT_LEVEL = 'h3';\n/** A linked trait the header must never carry: it is a button, not a link. */\nconst LINK_TYPE = 'linkType';\n\n/** What each part holds in the recipe — layout only; its LOOK is its element style. */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // The items are a column a token apart (`accordion-gap`: 0 for a divider list, 12px for cards).\n [AccordionRole.Accordion]: { display: 'flex', flexDirection: 'column', gap: 'var(--iox-accordion-gap)', width: '100%', minHeight: 'auto', height: 'auto' },\n [AccordionRole.Item]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n // The header is the whole row: the question takes the line, the icon sits at its end (board 4).\n [AccordionRole.Trigger]: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', width: '100%', minHeight: 'auto', height: 'auto', textAlign: 'start', cursor: 'pointer' },\n [AccordionRole.Icon]: { flexShrink: '0', fontSize: '22px', transitionDuration: 'var(--iox-dur-base)', transitionTimingFunction: 'var(--iox-ease-standard)' },\n [AccordionRole.Panel]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n};\n/** The question INHERITS the header's ink (board 4's wears table: the Question reads no colour token), so the\n * header's hover ink reaches the words; and it sits in the row with no margin of its own. */\nconst QUESTION_BASE: Readonly<Record<string, string>> = { color: 'inherit', margin: ZERO_BOX, flexGrow: '1', minWidth: '0px' };\nconst ANSWER_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n\n// ── recipe ──────────────────────────────────────────────────────────────────────────────────────\n\nexport interface AccordionOptions {\n /** The items' words (three generic items by default). */\n items?: ReadonlyArray<AccordionWords>;\n multiple?: boolean;\n defaultOn?: AccordionDefaultOn;\n icon?: AccordionIcon;\n}\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: AccordionRole | null, style: string,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n return makeCompositePart(create, { key, type, props, elementStyle: style }, role, label, role ? PART_BASE[role] : undefined);\n}\n\n/** The icon of an item (an accordion's, or a disclosure's — `role`); its Item-open state (the turn) is driven by\n * ITS item (`stateTriggers`). ONE builder for both kinds. */\nexport function buildCompositeIcon(create: CompositeNodeFactory, key: string, icon: Exclude<AccordionIcon, AccordionIcon.None>, itemId?: string,\n role: string = AccordionRole.Icon): CompositeNode {\n const glyph = ACCORDION_ICON_GLYPH[icon];\n const node = makeCompositePart(create, { key, type: Type.Icon, props: { iconClass: glyph.iconClass }, elementStyle: Style.Icon }, role, 'Icon', PART_BASE[AccordionRole.Icon]);\n node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { rotate: glyph.turn } };\n if (itemId) node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: itemId };\n return node;\n}\n\n/** One item: header (question + icon) and panel (answer). `key` makes every part's recipe key unique. */\nexport function buildAccordionItem(create: CompositeNodeFactory, words: AccordionWords, itemKey: string, icon: AccordionIcon = AccordionIcon.Chevron): CompositeNode {\n const item = make(create, `${itemKey}`, Type.Container, AccordionRole.Item, Style.Item, {}, 'Item');\n item.itemKey = itemKey;\n const trigger = make(create, `${itemKey}-trigger`, Type.LinkedContainer, AccordionRole.Trigger, Style.Trigger, {}, 'Header');\n const question = make(create, `${itemKey}-question`, Type.Heading, null, Style.Question, { content: words.question, level: DEFAULT_LEVEL }, 'Heading');\n writeStyles(question, QUESTION_BASE);\n trigger.children = [question, ...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, `${itemKey}-icon`, icon, item.id)])];\n const panel = make(create, `${itemKey}-panel`, Type.Container, AccordionRole.Panel, Style.Panel, {}, 'Panel');\n const answer = make(create, `${itemKey}-answer`, Type.Text, null, Style.Answer, { content: words.answer, tag: 'p' }, 'Text');\n writeStyles(answer, ANSWER_BASE);\n panel.children = [answer];\n item.children = [trigger, panel];\n return item;\n}\n\n/** A fresh Accordion: three items, one open at a time, the first open by default (board 4). */\nexport function buildAccordionRecipe(create: CompositeNodeFactory, options: AccordionOptions = {}): CompositeNode {\n const root = make(create, 'accordion', Type.Container, AccordionRole.Accordion, Style.Root, {}, 'Accordion');\n writeProp(root, CompositeBehaviourTrait.Multiple, options.multiple ?? false);\n writeProp(root, CompositeBehaviourTrait.DefaultOn, options.defaultOn ?? AccordionDefaultOn.First);\n const words = options.items ?? ACCORDION_WORDS;\n root.children = words.map((w, i) => buildAccordionItem(create, w, `k${i + 1}`, options.icon ?? AccordionIcon.Chevron));\n return root;\n}\n\n// ── reading a tree ──────────────────────────────────────────────────────────────────────────────\n\nexport function isAccordionRoot(node: { role?: string | null } | null | undefined): boolean {\n return node?.role === AccordionRole.Accordion;\n}\n\n/** True for any part of an accordion (its root included). */\nexport function isAccordionPart(node: { role?: string | null } | null | undefined): boolean {\n return !!node?.role && (node.role === AccordionRole.Accordion || node.role.startsWith(`${AccordionRole.Accordion}.`));\n}\n\n/** The accordion a node belongs to: the nearest ancestor (or the node itself) playing `accordion`.\n * `path` = the node's ancestors, root first. */\nexport function accordionRootOf<T extends { role?: string | null }>(node: T, path: ReadonlyArray<T>): T | null {\n if (isAccordionRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isAccordionRoot(path[i])) return path[i];\n return null;\n}\n\n/** The item a node sits in (the node itself when it is one), or null. */\nexport function accordionItemOf<T extends { role?: string | null }>(node: T, path: ReadonlyArray<T>): T | null {\n if (node.role === AccordionRole.Item) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (path[i].role === AccordionRole.Item) return path[i];\n if (isAccordionRoot(path[i])) return null;\n }\n return null;\n}\n\n/** True when the root takes its items from content (a Repeater bound to a list, R3). */\nexport function isAccordionFromContent(root: CompositeNode | null | undefined): boolean {\n return !!root && root.type === Type.Repeater;\n}\n\n/** The root's items in order — every item (Manual), or the one template item (From content). */\nexport function accordionItems(root: CompositeNode): CompositeNode[] {\n return (root.children ?? []).filter(c => c.role === AccordionRole.Item);\n}\n\nexport interface AccordionBehaviour {\n multiple: boolean;\n defaultOn: AccordionDefaultOn;\n}\n\nconst asBool = (v: unknown) => v === true || v === 'true';\n\n/** The root's behaviour (an unset trait reads its default: one at a time, the first open). */\nexport function accordionBehaviour(root: CompositeNode | null | undefined): AccordionBehaviour {\n const raw = root ? readProp(root, CompositeBehaviourTrait.DefaultOn) : undefined;\n const defaultOn = ACCORDION_DEFAULT_ONS.includes(raw as AccordionDefaultOn) ? raw as AccordionDefaultOn : AccordionDefaultOn.First;\n return { multiple: root ? asBool(readProp(root, CompositeBehaviourTrait.Multiple)) : false, defaultOn };\n}\n\n/** Behaviour ▸ Allow several open / Open by default. False when the node has no such trait. */\nexport function setAccordionBehaviour(root: CompositeNode, patch: Partial<AccordionBehaviour>): boolean {\n let ok = true;\n if (patch.multiple !== undefined) ok = writeProp(root, CompositeBehaviourTrait.Multiple, patch.multiple) && ok;\n if (patch.defaultOn !== undefined) ok = writeProp(root, CompositeBehaviourTrait.DefaultOn, patch.defaultOn) && ok;\n return ok;\n}\n\n/** The roles of the kind an item belongs to (an accordion item, or a disclosure — its own item). */\nfunction kindRolesOf(node: CompositeNode) {\n return COMPOSITE_KIND_ROLES[compositeKindOfRole(node.role) ?? CompositeKind.Accordion];\n}\n\n/** The header of an item (either kind). */\nexport function accordionTriggerOf(item: CompositeNode): CompositeNode | undefined {\n return findByRole(item, kindRolesOf(item).trigger);\n}\n\n/** The panel of an item (either kind). */\nexport function accordionPanelOf(item: CompositeNode): CompositeNode | undefined {\n return findByRole(item, kindRolesOf(item).panel);\n}\n\n/** A root's items — an accordion's (`accordionItems`), or a disclosure, which is its own one item. */\nexport function compositeItems(root: CompositeNode): CompositeNode[] {\n return compositeKindOfRole(root.role) === CompositeKind.Disclosure ? [root] : accordionItems(root);\n}\n\n/** The question: the first Heading inside the header — a disclosure's toggle holds no heading, so its first word\n * (the Text shown while closed, \"Read more\"). */\nexport function accordionQuestionOf(item: CompositeNode): CompositeNode | undefined {\n const trigger = accordionTriggerOf(item);\n let hit: CompositeNode | undefined;\n let text: CompositeNode | undefined;\n if (trigger) walkComposite(trigger, n => {\n if (!hit && n.type === Type.Heading) hit = n;\n if (!text && n.type === Type.Text) text = n;\n });\n return hit ?? text;\n}\n\n/** The answer: the first Text inside the panel. */\nexport function accordionAnswerOf(item: CompositeNode): CompositeNode | undefined {\n const panel = accordionPanelOf(item);\n let hit: CompositeNode | undefined;\n if (panel) walkComposite(panel, n => { if (!hit && n.type === Type.Text) hit = n; });\n return hit;\n}\n\nconst stripTags = (v: unknown) => String(v ?? '').replace(/<[^>]*>/g, '').trim();\n\n/** An item's name in the Items list and the layer tree: its question's words. */\nexport function accordionItemLabel(item: CompositeNode): string {\n const q = accordionQuestionOf(item);\n return q ? stripTags(readProp(q, 'content')) : '';\n}\n\n/** Items ▸ rename: the question's words. */\nexport function renameAccordionItem(item: CompositeNode, question: string): boolean {\n const q = accordionQuestionOf(item);\n return !!q && writeProp(q, 'content', question);\n}\n\n/** The heading level the header's wrapper renders (`<h3><button>`): its question's level. */\nexport function accordionHeadingLevel(trigger: { children?: ReadonlyArray<CompositeNode> | null } | null | undefined): string {\n let level: unknown;\n const visit = (n: CompositeNode) => {\n if (level !== undefined) return;\n if (n.type === Type.Heading) { level = readProp(n, 'level'); return; }\n for (const c of n.children ?? []) visit(c);\n };\n for (const c of trigger?.children ?? []) visit(c);\n return HEADING_LEVELS.includes(level as string) ? level as string : DEFAULT_LEVEL;\n}\n\n// ── editing (Items list, selection toolbar, Behaviour ▸ Icon) ──────────────────────────────────\n\n/** A key no item of `root` holds yet (`k4`…). */\nexport function nextItemKey(root: CompositeNode): string {\n const taken = new Set(accordionItems(root).map(i => i.itemKey).filter(Boolean));\n let n = taken.size + 1;\n while (taken.has(`k${n}`)) n++;\n return `k${n}`;\n}\n\n/** Items ▸ Add item (and the toolbar's \"Add item\"): a fresh item after `after` (or at the end), wearing the\n * accordion's current icon. Returns the new item. */\nexport function addAccordionItem(root: CompositeNode, create: CompositeNodeFactory, after?: CompositeNode | null, words: AccordionWords = ACCORDION_NEW_ITEM_WORDS): CompositeNode {\n const key = nextItemKey(root);\n const item = buildAccordionItem(create, words, key, detectAccordionIcon(root));\n const children = [...(root.children ?? [])];\n const at = after ? children.indexOf(after) : -1;\n children.splice(at < 0 ? children.length : at + 1, 0, item);\n root.children = children;\n return item;\n}\n\n/** Items ▸ drag to reorder: move an item to `toIndex` among the items. False when it is not an item of `root`. */\nexport function moveAccordionItem(root: CompositeNode, item: CompositeNode, toIndex: number): boolean {\n const children = [...(root.children ?? [])];\n const from = children.indexOf(item);\n if (from < 0 || item.role !== AccordionRole.Item) return false;\n children.splice(from, 1);\n const items = children.filter(c => c.role === AccordionRole.Item);\n const anchor = items[Math.max(0, Math.min(toIndex, items.length))];\n const at = anchor ? children.indexOf(anchor) : children.length;\n children.splice(at, 0, item);\n root.children = children;\n return true;\n}\n\nexport enum AccordionEditRefusal {\n /** An accordion keeps at least one item (composite plan T11). */\n LastItem = 'last-item',\n}\n\n/** Why removing `item` from `root` is refused, or null. */\nexport function accordionRemovalRefusal(root: CompositeNode | null | undefined, item: CompositeNode | null | undefined): AccordionEditRefusal | null {\n if (!root || item?.role !== AccordionRole.Item) return null;\n return accordionItems(root).length <= 1 ? AccordionEditRefusal.LastItem : null;\n}\n\n/** The icon the composite's items wear now (the first item's; None when it has no icon). Either kind. */\nexport function detectAccordionIcon(root: CompositeNode): AccordionIcon {\n const first = compositeItems(root)[0];\n const icon = first ? findByRole(first, kindRolesOf(root).icon) : undefined;\n if (!icon) return first ? AccordionIcon.None : AccordionIcon.Chevron;\n const cls = String(readProp(icon, 'iconClass') ?? '');\n return cls.includes(ACCORDION_ICON_GLYPH[AccordionIcon.Plus].iconClass.split(' ')[1]) ? AccordionIcon.Plus : AccordionIcon.Chevron;\n}\n\n/**\n * Behaviour ▸ Icon: every item's header shows the chevron, the plus, or no icon. A switch between glyphs\n * keeps the icon NODE (its styles and interactions) and changes its glyph and turn; None removes it, and a\n * glyph after None stamps it back from the recipe. Returns how many items changed.\n */\nexport function setAccordionIcon(root: CompositeNode, icon: AccordionIcon, create?: CompositeNodeFactory): number {\n let changed = 0;\n const iconRole = kindRolesOf(root).icon;\n for (const item of compositeItems(root)) {\n const trigger = accordionTriggerOf(item);\n if (!trigger) continue;\n const existing = findByRole(trigger, iconRole);\n if (icon === AccordionIcon.None) {\n if (existing && removeFromComposite(trigger, existing)) changed++;\n continue;\n }\n const glyph = ACCORDION_ICON_GLYPH[icon];\n if (existing) {\n writeProp(existing, 'iconClass', glyph.iconClass);\n existing.stateStyles = { ...(existing.stateStyles ?? {}), [ITEM_OPEN_STATE]: { ...(existing.stateStyles?.[ITEM_OPEN_STATE] ?? {}), rotate: glyph.turn } };\n changed++;\n } else if (create) {\n trigger.children = [...(trigger.children ?? []), buildCompositeIcon(create, `${item.itemKey ?? 'item'}-icon`, icon, item.id, iconRole)];\n changed++;\n }\n }\n return changed;\n}\n\n/** The node id every `trigger-on` state inside an item points at: its ITEM (`stateTriggers['trigger-on']`). */\nexport function itemOpenTriggerIds(root: CompositeNode): void {\n for (const item of accordionItems(root)) {\n if (!item.id) continue;\n walkComposite(item, n => {\n if (n === item || !n.stateStyles?.[ITEM_OPEN_STATE]) return;\n n.stateTriggers = { ...(n.stateTriggers ?? {}), [ITEM_OPEN_STATE]: item.id! };\n });\n }\n}\n\n// ── state machine ───────────────────────────────────────────────────────────────────────────────\n\n/** The keys open on first render: the first item, none, or all (From content: resolved against the rows). */\nexport function initialAccordionOpen(keys: ReadonlyArray<string>, defaultOn: AccordionDefaultOn): Set<string> {\n if (defaultOn === AccordionDefaultOn.None || !keys.length) return new Set();\n if (defaultOn === AccordionDefaultOn.All) return new Set(keys);\n return new Set([keys[0]]);\n}\n\n/** The open keys after toggling `key`: one at a time closes the others; several leaves them. */\nexport function nextAccordionState(open: ReadonlySet<string>, key: string, behaviour: Pick<AccordionBehaviour, 'multiple'>): Set<string> {\n if (open.has(key)) {\n const next = new Set(open);\n next.delete(key);\n return next;\n }\n return behaviour.multiple ? new Set([...open, key]) : new Set([key]);\n}\n\n/** The open keys after OPENING `key` (find-in-page, selecting into a closed panel, the `openItem` action). */\nexport function openAccordionItem(open: ReadonlySet<string>, key: string, behaviour: Pick<AccordionBehaviour, 'multiple'>): Set<string> {\n return open.has(key) ? new Set(open) : nextAccordionState(open, key, behaviour);\n}\n\n/** The open keys after CLOSING `key` (the `closeItem` action). */\nexport function closeAccordionItem(open: ReadonlySet<string>, key: string): Set<string> {\n const next = new Set(open);\n next.delete(key);\n return next;\n}\n\nexport enum AccordionKeyAction {\n Next = 'next',\n Previous = 'previous',\n First = 'first',\n Last = 'last',\n}\n\n/** The APG accordion's keys on a header: ↓ ↑ move (and wrap), Home / End jump. Enter and Space are the\n * button's own. */\nconst KEY_ACTIONS: Readonly<Record<string, AccordionKeyAction>> = {\n ArrowDown: AccordionKeyAction.Next,\n ArrowUp: AccordionKeyAction.Previous,\n Home: AccordionKeyAction.First,\n End: AccordionKeyAction.Last,\n};\n\nexport function accordionKeyAction(key: string): AccordionKeyAction | null {\n return KEY_ACTIONS[key] ?? null;\n}\n\n/** The header index `action` moves focus to, from `current` among `count` headers (↓ ↑ wrap). */\nexport function accordionFocusIndex(action: AccordionKeyAction, current: number, count: number): number {\n if (count <= 0) return -1;\n switch (action) {\n case AccordionKeyAction.Next: return (current + 1) % count;\n case AccordionKeyAction.Previous: return (current - 1 + count) % count;\n case AccordionKeyAction.First: return 0;\n case AccordionKeyAction.Last: return count - 1;\n }\n}\n\n// ── identity, ids and attributes (both renderers, SSR included) ────────────────────────────────\n\n/** A key safe in an element id. */\nexport function domSafeKey(raw: unknown): string {\n return String(raw ?? '').replace(/[^A-Za-z0-9_-]/g, '-');\n}\n\n/** A content row's identity: its own id (never its index — a reorder in the CMS must never pair a header with\n * another row's panel, R3); the index only for a row that has none. */\nexport function rowItemKey(row: unknown, index: number): string {\n const r = row as { _id?: unknown; id?: unknown } | null;\n const id = r && typeof r === 'object' ? (r._id ?? r.id) : undefined;\n return id !== undefined && id !== null && id !== '' ? domSafeKey(id) : `row-${index}`;\n}\n\nexport interface AccordionDomIds {\n trigger: string;\n panel: string;\n}\n\nconst DOM_ID_PREFIX: Readonly<Record<CompositeKind, string>> = {\n [CompositeKind.Accordion]: 'iox-acc',\n [CompositeKind.Disclosure]: 'iox-dis',\n};\n\n/** The ARIA pairing ids of an item: unique per composite (its SCOPE id — `compositeScopeId`) and per item (its key). */\nexport function accordionDomIds(rootId: string, itemKey: string, kind: CompositeKind = CompositeKind.Accordion): AccordionDomIds {\n const base = `${DOM_ID_PREFIX[kind]}-${domSafeKey(rootId)}-${domSafeKey(itemKey)}`;\n return { trigger: `${base}-h`, panel: `${base}-p` };\n}\n\n/**\n * The id a rendered composite's ARIA ids are built from: its node id, and — when it sits inside repeated rows —\n * every enclosing row's identity, outermost first (vectoriox/iox-ui#20: an accordion repeated per card used to\n * pair every row's header with the FIRST row's panel). The engine folds each row's `rowItemKey`; the builder\n * canvas its preview row's index. Unrepeated, it is the node id unchanged.\n */\nexport function compositeScopeId(rootId: string, rowKeys: ReadonlyArray<string> = []): string {\n return rowKeys.length ? [rootId, ...rowKeys.map(domSafeKey)].join('-') : rootId;\n}\n\n/** One item's render state: its identity, whether it is open, and its ARIA ids. */\nexport interface AccordionItemState {\n kind: CompositeKind;\n key: string;\n index: number;\n on: boolean;\n ids: AccordionDomIds;\n}\n\n/** The render scope of one composite: its kind, scope id, behaviour and every item key in order. */\nexport interface AccordionScope {\n kind: CompositeKind;\n rootId: string;\n behaviour: AccordionBehaviour;\n keys: ReadonlyArray<string>;\n open: ReadonlySet<string>;\n}\n\nexport function accordionScope(rootId: string, behaviour: AccordionBehaviour, keys: ReadonlyArray<string>, kind: CompositeKind = CompositeKind.Accordion): AccordionScope {\n return { kind, rootId, behaviour, keys, open: initialAccordionOpen(keys, behaviour.defaultOn) };\n}\n\nexport function accordionItemState(scope: AccordionScope, index: number): AccordionItemState {\n const key = scope.keys[index] ?? `item-${index}`;\n return { kind: scope.kind, key, index, on: scope.open.has(key), ids: accordionDomIds(scope.rootId, key, scope.kind) };\n}\n\n/** Attribute values: a string, or '' for a present boolean attribute. Absent attributes are left out. */\nexport type DomAttributes = Record<string, string>;\n\n/** `data-iox-on` — the ONE attribute every \"on\" style keys on (Open, Item open). */\nexport const ON_ATTRIBUTE = 'data-iox-on';\nexport const ITEM_KEY_ATTRIBUTE = 'data-iox-item-key';\nexport const COMPOSITE_ATTRIBUTE = 'data-iox-composite';\nexport const MULTIPLE_ATTRIBUTE = 'data-iox-multiple';\nexport const DEFAULT_ON_ATTRIBUTE = 'data-iox-default-on';\n/** The scope id the ARIA ids are built from (`compositeScopeId`), written by the engine so the runtime re-stamps\n * exactly the ids the server rendered. */\nexport const SCOPE_ATTRIBUTE = 'data-iox-scope';\n/** The value a closed panel's region carries: find-in-page can still reveal it (D9, board 4). */\nexport const UNTIL_FOUND = 'until-found';\n\n/** The structural classes the renderers write around an accordion's parts (no node owns them). */\nexport enum AccordionClass {\n Heading = 'iox-accordion-heading',\n Button = 'iox-accordion-button',\n Track = 'iox-accordion-track',\n Region = 'iox-accordion-region',\n}\n\nexport function accordionRootAttributes(behaviour: AccordionBehaviour, kind: CompositeKind = CompositeKind.Accordion, scopeId?: string): DomAttributes {\n return {\n [COMPOSITE_ATTRIBUTE]: kind,\n [DEFAULT_ON_ATTRIBUTE]: behaviour.defaultOn,\n ...(behaviour.multiple && kind === CompositeKind.Accordion ? { [MULTIPLE_ATTRIBUTE]: '' } : {}),\n ...(scopeId ? { [SCOPE_ATTRIBUTE]: scopeId } : {}),\n };\n}\n\nexport function accordionItemAttributes(state: AccordionItemState): DomAttributes {\n return { [ITEM_KEY_ATTRIBUTE]: state.key, ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}) };\n}\n\nexport function accordionTriggerAttributes(state: AccordionItemState): DomAttributes {\n return {\n type: 'button',\n id: state.ids.trigger,\n 'aria-expanded': state.on ? 'true' : 'false',\n 'aria-controls': state.ids.panel,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}),\n };\n}\n\n/** The track wrapping a panel: its row collapses to 0 while closed (the ONE hiding rule, iox-design.css). */\nexport function accordionTrackAttributes(state: AccordionItemState): DomAttributes {\n return state.on ? { [ON_ATTRIBUTE]: '' } : {};\n}\n\n/** The region the panel sits in: `hidden=\"until-found\"` while closed, so its words stay in the page. An accordion's\n * is a labelled `region` (APG accordion); a disclosure's is a plain block (APG disclosure: the button names it). */\nexport function accordionRegionAttributes(state: AccordionItemState): DomAttributes {\n const labelled = hasLabelledRegion(state.kind);\n return {\n ...(labelled ? { role: 'region' } : {}),\n id: state.ids.panel,\n ...(labelled ? { 'aria-labelledby': state.ids.trigger } : {}),\n ...(state.on ? {} : { hidden: UNTIL_FOUND }),\n };\n}\n\n/** True when a region of this kind is a labelled `role=region`. */\nexport function hasLabelledRegion(kind: CompositeKind): boolean {\n return kind === CompositeKind.Accordion;\n}\n\nexport function accordionPanelAttributes(state: AccordionItemState): DomAttributes {\n return state.on ? { [ON_ATTRIBUTE]: '' } : {};\n}\n\n/** `attrs` as an HTML attribute string (` a=\"b\" c`), values escaped by `esc`. */\nexport function serializeDomAttributes(attrs: DomAttributes, esc: (v: string) => string): string {\n return Object.entries(attrs).map(([k, v]) => (v === '' ? ` ${k}` : ` ${k}=\"${esc(v)}\"`)).join('');\n}\n\n// ── Items from content (R3) ─────────────────────────────────────────────────────────────────────\n\n/** A field of a content type, as both the CMS schema and a site plan describe it. */\nexport interface ContentFieldLike {\n name: string;\n type?: string;\n controller?: string;\n}\n\nconst SHORT_TEXT = new Set(['text']);\nconst LONG_TEXT = new Set(['textarea', 'richText', 'editor']);\n\nexport interface AccordionAutoBinds {\n /** The first short-text field: the question. */\n question: string | null;\n /** The first long-text field: the answer. */\n answer: string | null;\n}\n\n/** R3 (board 9 Q19): switching to From content binds the question to the first short-text field and the\n * answer to the first long-text field. ONE rule for the builder's switch and the composer. */\nexport function pickAccordionAutoBinds(fields: ReadonlyArray<ContentFieldLike>): AccordionAutoBinds {\n const isString = (f: ContentFieldLike) => !f.type || f.type === 'string';\n const question = fields.find(f => isString(f) && SHORT_TEXT.has(String(f.controller ?? 'text')))?.name ?? null;\n const answer = fields.find(f => isString(f) && LONG_TEXT.has(String(f.controller ?? '')) && f.name !== question)?.name ?? null;\n return { question, answer };\n}\n\n/** The bound props of the question and the answer (each a content trait). */\nexport const ACCORDION_BIND_PROP = 'content';\n\n/**\n * Manual → From content (board 9 \"Items: Manual · From content\"): the root becomes `repeater` (a Repeater node\n * the caller created with the same id, role, label, element style and styles — a type change is the\n * consumer's), the FIRST item becomes the one template (its parts, styles and interactions kept; its key\n * dropped — a row's key is its id) and the others are removed. Returns the removed items.\n */\nexport function accordionToContent(root: CompositeNode, repeater: CompositeNode): CompositeNode[] {\n const items = accordionItems(root);\n const [template, ...rest] = items;\n if (template) delete template.itemKey;\n repeater.role = AccordionRole.Accordion;\n repeater.children = template ? [template] : [];\n writeProp(repeater, CompositeBehaviourTrait.Multiple, accordionBehaviour(root).multiple);\n writeProp(repeater, CompositeBehaviourTrait.DefaultOn, accordionBehaviour(root).defaultOn);\n return rest;\n}\n\n/**\n * From content → Manual: the rows come in as static items — each a copy of the template (`cloneItem`, which\n * gives the copy fresh ids) whose bound words are written in as its own and whose bindings are dropped.\n * `container` is the manual root the caller created. Returns the new items.\n */\nexport function accordionToManual(root: CompositeNode, container: CompositeNode, rows: ReadonlyArray<unknown>,\n cloneItem: (template: CompositeNode) => CompositeNode, resolve: (row: unknown, binding: CompositeBinding) => unknown): CompositeNode[] {\n const template = accordionItems(root)[0];\n container.role = AccordionRole.Accordion;\n writeProp(container, CompositeBehaviourTrait.Multiple, accordionBehaviour(root).multiple);\n writeProp(container, CompositeBehaviourTrait.DefaultOn, accordionBehaviour(root).defaultOn);\n const items = template ? rows.map((row, i) => {\n const item = cloneItem(template);\n item.itemKey = `k${i + 1}`;\n walkComposite(item, n => {\n const bindings = (n as BoundNode).bindings ?? [];\n for (const b of bindings) {\n const value = resolve(row, b);\n if (value !== undefined && value !== null) writeProp(n, b.prop, value);\n }\n if (bindings.length) (n as BoundNode).bindings = [];\n });\n return item;\n }) : [];\n container.children = items;\n return items;\n}\n\nexport interface CompositeBinding {\n prop: string;\n source: string;\n path?: string;\n pipes?: unknown[];\n}\n\ninterface BoundNode extends CompositeNode {\n bindings?: CompositeBinding[];\n}\n\n/** The style a part holds for `name` (both node shapes) — exported for the consumers' detectors. */\nexport function accordionPartStyle(node: CompositeNode, name: string): unknown {\n return readOwnedTrait(node, { trait: name });\n}\n","import {\n AccordionBehaviour, AccordionClass, AccordionDefaultOn, accordionDomIds, accordionFocusIndex, accordionKeyAction,\n ACCORDION_DEFAULT_ONS, closeAccordionItem, COMPOSITE_ATTRIBUTE, DEFAULT_ON_ATTRIBUTE, hasLabelledRegion, initialAccordionOpen, ITEM_KEY_ATTRIBUTE,\n MULTIPLE_ATTRIBUTE, nextAccordionState, ON_ATTRIBUTE, openAccordionItem, SCOPE_ATTRIBUTE, UNTIL_FOUND,\n} from './accordion';\nimport { CompositeKind } from './composite-kinds';\n\n/**\n * The Accordion's RUNTIME (CC2) — ONE copy, DOM only, for the builder canvas and the live site (both engine\n * paths render the same markup). It reads the markup the renderers write (iox-design.css + accordion.ts's\n * attribute planners), so the server's first paint and every later state agree:\n *\n * [root] data-iox-composite=\"accordion\" data-iox-default-on [data-iox-multiple] [data-iox-scope] (the node's\n * own element — its role class may sit on a wrapper host, as the engine's component-path Repeater draws it)\n * .iox-role-accordion-item data-iox-item-key [data-iox-on]\n * hN.iox-accordion-heading > button.iox-accordion-button id aria-expanded aria-controls\n * .iox-accordion-track [data-iox-on] > .iox-accordion-region role=region [hidden=until-found]\n * .iox-role-accordion-panel\n *\n * The DISCLOSURE (CC2.1) runs on this same runtime: `data-iox-composite=\"disclosure\"` on a root that IS its one\n * item (it carries the key and `data-iox-on`), its button straight inside it (no heading), its panel in the same\n * track + region (a plain block — no `role=region`), and no arrow keys (one button).\n *\n * It owns: a click on a header toggles its item; ↓ ↑ Home End move between the headers of THIS accordion\n * (a nested one keeps its own); find-in-page (`beforematch`) opens the item that holds the match; a closed\n * panel gets `hidden=\"until-found\"` after its track has collapsed (at once under reduced motion). Every\n * change dispatches `iox-item-on` / `iox-item-off` on the item, the `itemOn` / `itemOff` interaction\n * triggers. The open set is LIVE ∪ FORCED: the builder forces items open (a selection inside a closed panel,\n * \"All open\"); the live site forces nothing.\n */\n\nexport const ITEM_ON_EVENT = 'iox-item-on';\nexport const ITEM_OFF_EVENT = 'iox-item-off';\n\nconst KIND_ROOT = (kind: CompositeKind) => `[${COMPOSITE_ATTRIBUTE}=\"${kind}\"]`;\nconst ROOT_SELECTOR = Object.values(CompositeKind).map(KIND_ROOT).join(', ');\n/** An accordion's items are its `.iox-role-accordion-item` children; a disclosure is its own item. */\nconst ACCORDION_ITEM_SELECTOR = '.iox-role-accordion-item';\nconst ITEM_SELECTOR = `${ACCORDION_ITEM_SELECTOR}, ${KIND_ROOT(CompositeKind.Disclosure)}`;\nconst PANEL_SELECTOR = '.iox-role-accordion-panel, .iox-role-disclosure-panel';\nconst BUTTON_SELECTOR = `.${AccordionClass.Button}`;\nconst TRACK_SELECTOR = `.${AccordionClass.Track}`;\nconst REGION_SELECTOR = `.${AccordionClass.Region}`;\n/** How long a closing track may take before its region is hidden (dur-base is 200–320ms in every pack). */\nconst MAX_CLOSE_MS = 600;\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\nexport interface AccordionRuntimeOptions {\n /** The composite's scope id — the ARIA ids' prefix (else the root's `data-iox-scope`, else its `iox-node-<id>`). A\n * function is read at every stamp (the builder canvas: a preview row's index is known once it is in the page). */\n rootId?: string | (() => string);\n /** Accordion or Disclosure (else read from the root's `data-iox-composite`). */\n kind?: CompositeKind;\n /** The behaviour (else read from the root's data attributes). */\n behaviour?: AccordionBehaviour;\n /** Keys forced open on top of the live state (the builder's design state). */\n forced?: () => ReadonlySet<string>;\n /** Re-stamp when the markup under the root changes (the builder canvas re-renders parts). */\n observe?: boolean;\n /** True to stop motion (default: the visitor's reduced-motion setting). */\n reducedMotion?: () => boolean;\n}\n\n/** The composite (accordion or disclosure) an element belongs to (the element itself when it is a root). */\nexport function closestAccordion(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ROOT_SELECTOR) as HTMLElement | null) ?? null;\n}\n\n/** The item an element sits in (itself when it is one) — an accordion item, or a disclosure. */\nexport function closestAccordionItem(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ITEM_SELECTOR) as HTMLElement | null) ?? null;\n}\n\nconst kindOf = (root: Element): CompositeKind =>\n root.getAttribute(COMPOSITE_ATTRIBUTE) === CompositeKind.Disclosure ? CompositeKind.Disclosure : CompositeKind.Accordion;\n\n/** The composite root whose items an item belongs to: a disclosure is its own root. */\nfunction rootOfItem(item: HTMLElement): HTMLElement | null {\n return kindOf(item) === CompositeKind.Disclosure && item.matches(KIND_ROOT(CompositeKind.Disclosure)) ? item : closestAccordion(item.parentElement);\n}\n\n/** Subscribe to an item turning on / off — what the `itemOn` / `itemOff` interaction triggers listen to. The\n * item is the element's own item (the element itself when it is one). Returns the unsubscribe. */\nexport function onAccordionItemState(el: Element, on: boolean, handler: () => void): () => void {\n const item = closestAccordionItem(el);\n if (!item) return () => undefined;\n const type = on ? ITEM_ON_EVENT : ITEM_OFF_EVENT;\n item.addEventListener(type, handler);\n return () => item.removeEventListener(type, handler);\n}\n\n/** True when the element's item is open now. */\nexport function isAccordionItemOn(el: Element): boolean {\n return !!closestAccordionItem(el)?.hasAttribute(ON_ATTRIBUTE);\n}\n\nconst nodeIdOf = (el: Element): string => {\n for (const c of Array.from(el.classList)) if (c.startsWith('iox-node-')) return c.slice('iox-node-'.length);\n return '';\n};\n\nfunction behaviourOf(root: Element): AccordionBehaviour {\n const raw = root.getAttribute(DEFAULT_ON_ATTRIBUTE);\n return {\n multiple: root.hasAttribute(MULTIPLE_ATTRIBUTE),\n defaultOn: ACCORDION_DEFAULT_ONS.includes(raw as AccordionDefaultOn) ? raw as AccordionDefaultOn : AccordionDefaultOn.First,\n };\n}\n\nfunction setAttr(el: Element | null | undefined, name: string, value: string | null): void {\n if (!el) return;\n if (value === null) { if (el.hasAttribute(name)) el.removeAttribute(name); }\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n}\n\nexport class AccordionRuntime {\n private live: Set<string>;\n private shown = new Set<string>();\n private readonly closing = new Map<string, ReturnType<typeof setTimeout>>();\n private observer: MutationObserver | null = null;\n private stampQueued = false;\n private behaviourValue: AccordionBehaviour;\n /** The builder attaches a root before its items render: the saved default is applied once they do. */\n private awaitingItems = false;\n readonly kind: CompositeKind;\n\n constructor(readonly root: HTMLElement, private readonly options: AccordionRuntimeOptions = {}) {\n this.kind = options.kind ?? kindOf(root);\n this.behaviourValue = options.behaviour ?? behaviourOf(root);\n root.setAttribute(COMPOSITE_ATTRIBUTE, this.kind);\n RUNTIMES.set(root, this);\n // The server rendered the first state; with no server state the root's default decides.\n // (The builder passes the behaviour and starts from the saved default; on the live site the server\n // stamped every item's key and state, and that is the truth.)\n const items = this.items();\n const serverStamped = !options.behaviour && items.some(i => i.hasAttribute(ITEM_KEY_ATTRIBUTE));\n this.live = serverStamped\n ? new Set(items.filter(i => i.hasAttribute(ON_ATTRIBUTE)).map(i => this.keyOf(i, items)))\n : initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n this.awaitingItems = !serverStamped && !items.length;\n this.shown = new Set(this.live);\n // Capture: on the builder canvas every part's own listener stops the click (it selects that part), and\n // the header must still toggle — the canvas is a live runtime.\n root.addEventListener('click', this.onClick, true);\n root.addEventListener('keydown', this.onKeydown);\n root.addEventListener('beforematch', this.onBeforeMatch, true);\n if (options.observe && typeof MutationObserver !== 'undefined') {\n this.observer = new MutationObserver(() => this.queueStamp());\n this.observer.observe(root, { childList: true, subtree: true });\n }\n this.stamp(true);\n }\n\n get behaviour(): AccordionBehaviour {\n return this.behaviourValue;\n }\n\n /** The behaviour changed in the panel: re-read, and start from the new default. */\n setBehaviour(behaviour: AccordionBehaviour): void {\n const changedDefault = behaviour.defaultOn !== this.behaviourValue.defaultOn;\n this.behaviourValue = behaviour;\n if (behaviour.multiple) this.root.setAttribute(MULTIPLE_ATTRIBUTE, '');\n else this.root.removeAttribute(MULTIPLE_ATTRIBUTE);\n this.root.setAttribute(DEFAULT_ON_ATTRIBUTE, behaviour.defaultOn);\n if (changedDefault) this.resetLive();\n else this.stamp();\n }\n\n /** THIS composite's items, in document order (a nested composite's items are its own); a disclosure's is itself. */\n items(): HTMLElement[] {\n if (this.kind === CompositeKind.Disclosure) return [this.root];\n return Array.from(this.root.querySelectorAll<HTMLElement>(ACCORDION_ITEM_SELECTOR)).filter(i => closestAccordion(i.parentElement) === this.root);\n }\n\n /** The open keys the live state holds (before anything forced). */\n get liveKeys(): ReadonlySet<string> {\n return this.live;\n }\n\n /** The keys showing open right now. */\n get openKeys(): ReadonlySet<string> {\n return this.shown;\n }\n\n keyOf(item: Element, items: HTMLElement[] = this.items()): string {\n return item.getAttribute(ITEM_KEY_ATTRIBUTE) || `item-${items.indexOf(item as HTMLElement)}`;\n }\n\n toggle(key: string): void {\n this.live = nextAccordionState(this.live, key, this.behaviourValue);\n this.stamp();\n }\n\n open(key: string): void {\n this.live = openAccordionItem(this.live, key, this.behaviourValue);\n this.stamp();\n }\n\n close(key: string): void {\n this.live = closeAccordionItem(this.live, key);\n this.stamp();\n }\n\n /** Run an item action (`openItem` / `closeItem` / `toggleItem`, T14) on `key`. True when it shows open after. */\n run(action: CompositeItemAction, key: string): boolean {\n if (action === CompositeItemAction.Open) this.open(key);\n else if (action === CompositeItemAction.Close) this.close(key);\n else this.toggle(key);\n return this.shown.has(key);\n }\n\n /** Back to the saved default (\"Showing on canvas ▸ As saved\"). */\n resetLive(): void {\n const items = this.items();\n this.live = initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n this.stamp();\n }\n\n /** The forced set changed (builder design state): show it. */\n refresh(): void {\n this.stamp();\n }\n\n destroy(): void {\n if (RUNTIMES.get(this.root) === this) RUNTIMES.delete(this.root);\n this.root.removeEventListener('click', this.onClick, true);\n this.root.removeEventListener('keydown', this.onKeydown);\n this.root.removeEventListener('beforematch', this.onBeforeMatch, true);\n this.observer?.disconnect();\n this.observer = null;\n for (const t of this.closing.values()) clearTimeout(t);\n this.closing.clear();\n }\n\n private queueStamp(): void {\n if (this.stampQueued) return;\n this.stampQueued = true;\n const run = () => { this.stampQueued = false; this.stamp(); };\n if (typeof queueMicrotask === 'function') queueMicrotask(run); else Promise.resolve().then(run);\n }\n\n private reduced(): boolean {\n if (this.options.reducedMotion) return this.options.reducedMotion();\n try { return typeof matchMedia === 'function' && matchMedia(REDUCED_MOTION).matches; } catch { return false; }\n }\n\n /** Write every item's state into its markup; announce what changed. */\n private stamp(first = false): void {\n // Our own writes must not wake the observer (they are attributes; it watches the child lists only).\n const items = this.items();\n if (this.awaitingItems && items.length) {\n this.awaitingItems = false;\n this.live = initialAccordionOpen(items.map(i => this.keyOf(i, items)), this.behaviourValue.defaultOn);\n first = true;\n }\n const forced = this.options.forced?.() ?? new Set<string>();\n const own = this.options.rootId;\n const rootId = (typeof own === 'function' ? own() : own) ?? this.root.getAttribute(SCOPE_ATTRIBUTE) ?? nodeIdOf(this.root);\n const next = new Set<string>();\n items.forEach((item, index) => {\n const key = this.keyOf(item, items);\n const on = this.live.has(key) || forced.has(key);\n if (on) next.add(key);\n this.stampItem(item, key, index, on, rootId, first);\n });\n const was = first ? new Set<string>() : this.shown;\n this.shown = next;\n // On the first stamp an item open by default HAS opened: its `itemOn` listeners attached so far hear it\n // (the builder renders an item's parts, and attaches their interactions, before its root's runtime; the\n // live engine attaches the runtime first and its interactions run an already-open item's at once).\n for (const item of items) {\n const key = this.keyOf(item, items);\n if (next.has(key) && !was.has(key)) dispatch(item, ITEM_ON_EVENT);\n else if (!next.has(key) && was.has(key)) dispatch(item, ITEM_OFF_EVENT);\n }\n }\n\n private stampItem(item: HTMLElement, key: string, index: number, on: boolean, rootId: string, first: boolean): void {\n const ids = accordionDomIds(rootId, key, this.kind);\n if (!item.hasAttribute(ITEM_KEY_ATTRIBUTE)) item.setAttribute(ITEM_KEY_ATTRIBUTE, key);\n setAttr(item, ON_ATTRIBUTE, on ? '' : null);\n const button = this.own(item, BUTTON_SELECTOR);\n const track = this.own(item, TRACK_SELECTOR);\n const region = this.own(item, REGION_SELECTOR);\n const panel = this.own(item, PANEL_SELECTOR);\n setAttr(button, 'type', 'button');\n setAttr(button, 'id', ids.trigger);\n setAttr(button, 'aria-expanded', on ? 'true' : 'false');\n setAttr(button, 'aria-controls', ids.panel);\n setAttr(button, ON_ATTRIBUTE, on ? '' : null);\n setAttr(track, ON_ATTRIBUTE, on ? '' : null);\n setAttr(panel, ON_ATTRIBUTE, on ? '' : null);\n const labelled = hasLabelledRegion(this.kind);\n setAttr(region, 'role', labelled ? 'region' : null);\n setAttr(region, 'id', ids.panel);\n setAttr(region, 'aria-labelledby', labelled ? ids.trigger : null);\n if (!region) return;\n const pending = this.closing.get(key);\n if (on) {\n if (pending) { clearTimeout(pending); this.closing.delete(key); }\n setAttr(region, 'hidden', null);\n return;\n }\n if (region.hasAttribute('hidden') || pending) return;\n // Closing: the track collapses first (its transition), THEN the region is hidden — hiding it at once\n // would collapse it with no motion. At first paint, or under reduced motion, it is hidden at once.\n if (first || this.reduced()) { setAttr(region, 'hidden', UNTIL_FOUND); return; }\n const hide = () => {\n this.closing.delete(key);\n if (!item.hasAttribute(ON_ATTRIBUTE)) setAttr(region, 'hidden', UNTIL_FOUND);\n };\n this.closing.set(key, setTimeout(hide, this.closeDelay(track)));\n }\n\n private closeDelay(track: Element | null): number {\n try {\n const view = track?.ownerDocument?.defaultView;\n const raw = track && view ? view.getComputedStyle(track).transitionDuration : '';\n const ms = Math.max(0, ...String(raw).split(',').map(s => (s.trim().endsWith('ms') ? parseFloat(s) : parseFloat(s) * 1000)).filter(n => !isNaN(n)));\n return Math.min(MAX_CLOSE_MS, ms + 20);\n } catch { return 0; }\n }\n\n /** The element `selector` matches inside `item` that belongs to it, not to an item nested in it. */\n private own(item: HTMLElement, selector: string): HTMLElement | null {\n return Array.from(item.querySelectorAll<HTMLElement>(selector)).find(el => closestAccordionItem(el) === item) ?? null;\n }\n\n private buttons(): HTMLElement[] {\n return this.items().map(i => this.own(i, BUTTON_SELECTOR)).filter((b): b is HTMLElement => !!b);\n }\n\n private readonly onClick = (event: Event): void => {\n const button = (event.target as Element | null)?.closest?.(BUTTON_SELECTOR);\n if (!button || closestAccordion(button) !== this.root) return;\n const item = closestAccordionItem(button);\n if (!item) return;\n event.preventDefault();\n this.toggle(this.keyOf(item));\n };\n\n private readonly onKeydown = (event: Event): void => {\n // A disclosure has one button: Enter / Space are the button's own, and there is nowhere to move.\n if (this.kind !== CompositeKind.Accordion) return;\n const e = event as KeyboardEvent;\n const action = accordionKeyAction(e.key);\n const button = (e.target as Element | null)?.closest?.(BUTTON_SELECTOR);\n if (!action || !button || closestAccordion(button) !== this.root) return;\n const buttons = this.buttons();\n const at = buttons.indexOf(button as HTMLElement);\n const target = buttons[accordionFocusIndex(action, at, buttons.length)];\n if (!target) return;\n e.preventDefault();\n target.focus();\n };\n\n private readonly onBeforeMatch = (event: Event): void => {\n const region = (event.target as Element | null)?.closest?.(REGION_SELECTOR);\n const item = closestAccordionItem(region);\n const items = this.items();\n if (!item || !items.includes(item)) return;\n this.open(this.keyOf(item, items));\n };\n}\n\nfunction dispatch(el: Element, type: string): void {\n const Ctor = (globalThis as { CustomEvent?: typeof CustomEvent }).CustomEvent;\n if (Ctor) el.dispatchEvent(new Ctor(type, { bubbles: false }));\n}\n\n/** Attach the runtime to one rendered composite root, unless it already runs one. Returns the NEW runtime, or\n * null when the root already had one (so a caller destroys only what it created). */\nexport function attachAccordionAt(root: HTMLElement, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> = {}): AccordionRuntime | null {\n if (RUNTIMES.has(root)) return null;\n return new AccordionRuntime(root, options);\n}\n\n/** Attach the runtime to every accordion under `container` that has none yet. Returns the new runtimes. */\nexport function attachAccordions(container: ParentNode, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> = {}): AccordionRuntime[] {\n const out: AccordionRuntime[] = [];\n container.querySelectorAll<HTMLElement>(ROOT_SELECTOR).forEach(root => {\n const runtime = attachAccordionAt(root, options);\n if (runtime) out.push(runtime);\n });\n return out;\n}\n\n/** Detach a runtime `attachAccordions` created. */\nexport function detachAccordion(runtime: AccordionRuntime): void {\n runtime.destroy();\n}\n\n/** Every live runtime by its root — the canvas's and the site's alike (a runtime registers itself and leaves on\n * destroy), so an item action finds the runtime of whatever item it targets. */\nconst RUNTIMES = new WeakMap<Element, AccordionRuntime>();\n\nconst ROW_INDEX_ATTRIBUTE = 'data-iox-row-idx';\n\n/** The repeated rows an element sits in, outermost first — each row's index as its row wrappers stamp it\n * (`data-iox-row-idx`: the builder's Repeater rows, the engine's component path). The builder folds them into a\n * composite's scope id (`compositeScopeId`, vectoriox/iox-ui#20); the element itself is not counted. */\nexport function compositeRowKeys(el: Element | null | undefined): string[] {\n const keys: string[] = [];\n for (let at = el?.parentElement?.closest?.(`[${ROW_INDEX_ATTRIBUTE}]`); at; at = at.parentElement?.closest(`[${ROW_INDEX_ATTRIBUTE}]`)) {\n keys.unshift(at.getAttribute(ROW_INDEX_ATTRIBUTE) ?? '');\n }\n return keys;\n}\n\n/** The runtime running a composite root, or null. */\nexport function accordionRuntimeOf(root: Element | null | undefined): AccordionRuntime | null {\n return (root && RUNTIMES.get(root)) || null;\n}\n\n// ── T14: open / close / toggle an item from anywhere ─────────────────────────────────────────────\n\n/** What an item action does to its target item (actions-core `openItem` / `closeItem` / `toggleItem`). */\nexport enum CompositeItemAction {\n Open = 'open',\n Close = 'close',\n Toggle = 'toggle',\n}\n\n/**\n * Run an item action on the element of an ITEM (an accordion item, or a disclosure) — the `openItem` /\n * `closeItem` / `toggleItem` interaction actions, on the canvas and on the live site through this one function.\n * Returns whether the item shows open afterwards, or null when `el` is in no running composite.\n */\nexport function runCompositeItemAction(el: Element | null | undefined, action: CompositeItemAction): boolean | null {\n const item = closestAccordionItem(el);\n const runtime = item ? accordionRuntimeOf(rootOfItem(item)) : null;\n if (!item || !runtime) return null;\n return runtime.run(action, runtime.keyOf(item));\n}\n\n/** How much of an opened item must already be on screen for the action NOT to scroll to it (its header row). */\nconst VISIBLE_HEAD_PX = 48;\n\n/** True when an item an action just opened is out of view and the page should scroll to it (T14: \"opens that item\n * and scrolls to it\") — never when its head is already on screen, so a button beside it does not jolt the page. */\nexport function shouldScrollToItem(top: number, viewportHeight: number): boolean {\n return top < 0 || top + VISIBLE_HEAD_PX > viewportHeight;\n}\n","import { accordionBehaviour, AccordionDefaultOn, AccordionIcon, buildCompositeIcon, CompositeBehaviourTrait, ITEM_OPEN_STATE } from './accordion';\nimport { DisclosureRole } from './composite-kinds';\nimport { CompositeNode, CompositeNodeFactory, makeCompositePart, writeProp, writeStyles } from './composite-node';\n\n/**\n * DISCLOSURE / \"Read more\" (CC2.1 — composite T21). Not a component: a recipe of ordinary nodes on the\n * ACCORDION's machinery — a disclosure is a one-item accordion whose root is its item, so it runs the same\n * state machine, attribute planners and runtime (`accordion-runtime.ts`), on the canvas and on the live site.\n *\n * Container `box` role disclosure itemKey k1 · trait defaultOn (none | first)\n * ├─ LinkedContainer `accordion-trigger` role disclosure.trigger → <button aria-expanded aria-controls>\n * │ ├─ Text `body` (span) role disclosure.more \"Read more\" — hidden while open\n * │ ├─ Text `body` (span) role disclosure.less \"Read less\" — shown only while open\n * │ └─ Icon `icon` role disclosure.icon Item open → turns\n * └─ Container `accordion-panel` role disclosure.panel inside a hidden=\"until-found\" track\n * └─ Text `body` the rest of the text\n *\n * The words swap through the ordinary Item open state (`trigger-on` → the root), so the label an author sees on\n * the canvas is the one the visitor gets, with no script and nothing to break. The look is the accordion's own\n * element styles (no `disclosure-*` contract: the boards draw none) — the header's ink, hover ink and focus ring;\n * the panel's padding and muted ink — and the words are `body` text: the site's body type, with `color: inherit`, so\n * the toggle's ink and its hover ink reach them.\n */\n\nexport interface DisclosureWords {\n more: string;\n less: string;\n body: string;\n}\n\n/** The words a fresh disclosure starts with — generic, the author's to replace. */\nexport const DISCLOSURE_WORDS: Readonly<DisclosureWords> = {\n more: 'Read more',\n less: 'Read less',\n body: 'Write the rest of the story here. It stays out of the way until someone asks for it.',\n};\n\nexport interface DisclosureOptions {\n words?: Partial<DisclosureWords>;\n /** Open on first render (default: closed). */\n open?: boolean;\n icon?: AccordionIcon;\n}\n\n/** A disclosure's one item key — its root IS its item. */\nexport const DISCLOSURE_ITEM_KEY = 'k1';\n\nenum Type {\n Container = 'Container',\n LinkedContainer = 'LinkedContainer',\n Text = 'Text',\n}\n\nenum Style {\n Root = 'box',\n Trigger = 'accordion-trigger',\n Word = 'body',\n Panel = 'accordion-panel',\n Body = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\nconst HIDDEN = 'none';\nconst INHERIT = 'inherit';\n/** A word is a flex item of the toggle — `block` (never `inline`: the compiler drops a value equal to the CSS initial,\n * and the Text's own default would come back in its place). */\nconst SHOWN = 'block';\n\n/** What each part holds — layout only; its LOOK is its element style. The trigger sizes to its words (a button in\n * the flow, not a full-width header row — `fit-content` keeps it from stretching) and the panel spans the root. The\n * trigger is `flex`, not `inline-flex`: it is a flex item of the root, which blockifies it on the site anyway. */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n [DisclosureRole.Disclosure]: { display: 'flex', flexDirection: 'column', width: '100%', minHeight: 'auto', height: 'auto' },\n // The toggle reads the text around it (the page's body type, through the root) — a LinkedContainer is born with\n // its own literal font, which an accordion's heading masks and a disclosure's words would show.\n [DisclosureRole.Trigger]: {\n display: 'flex', alignItems: 'center', gap: '8px', width: 'fit-content', minHeight: 'auto', height: 'auto', textAlign: 'start', cursor: 'pointer',\n fontFamily: INHERIT, fontSize: INHERIT, fontWeight: INHERIT, lineHeight: INHERIT,\n },\n // A word is just its words: none of a Text's own box (its type's 10px padding, its full width) — the toggle's\n // padding is the click target.\n [DisclosureRole.More]: { display: SHOWN, margin: ZERO_BOX, padding: ZERO_BOX, width: 'auto' },\n [DisclosureRole.Less]: { display: HIDDEN, margin: ZERO_BOX, padding: ZERO_BOX, width: 'auto' },\n [DisclosureRole.Panel]: { display: 'block', width: '100%', minHeight: 'auto', height: 'auto' },\n};\nconst BODY_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: DisclosureRole | null, style: string,\n props: Record<string, unknown>, label: string): CompositeNode {\n return makeCompositePart(create, { key, type, props, elementStyle: style }, role, label, role ? PART_BASE[role] : undefined);\n}\n\n/** One of the trigger's two words: shown while the disclosure is closed (`more`) or open (`less`). */\nfunction buildWord(create: CompositeNodeFactory, role: DisclosureRole.More | DisclosureRole.Less, words: string, rootId?: string): CompositeNode {\n const node = make(create, role === DisclosureRole.More ? 'more' : 'less', Type.Text, role, Style.Word, { content: words, tag: 'span' }, 'Text');\n node.stateStyles = { ...(node.stateStyles ?? {}), [ITEM_OPEN_STATE]: { display: role === DisclosureRole.More ? HIDDEN : SHOWN } };\n if (rootId) node.stateTriggers = { ...(node.stateTriggers ?? {}), [ITEM_OPEN_STATE]: rootId };\n return node;\n}\n\n/** A fresh Disclosure: \"Read more\" opens the text below and reads \"Read less\" while it is open; closed by default. */\nexport function buildDisclosureRecipe(create: CompositeNodeFactory, options: DisclosureOptions = {}): CompositeNode {\n const words = { ...DISCLOSURE_WORDS, ...(options.words ?? {}) };\n const root = make(create, 'disclosure', Type.Container, DisclosureRole.Disclosure, Style.Root, {}, 'Disclosure');\n root.itemKey = DISCLOSURE_ITEM_KEY;\n writeProp(root, CompositeBehaviourTrait.DefaultOn, options.open ? AccordionDefaultOn.First : AccordionDefaultOn.None);\n const icon = options.icon ?? AccordionIcon.Chevron;\n const trigger = make(create, 'trigger', Type.LinkedContainer, DisclosureRole.Trigger, Style.Trigger, {}, 'Toggle');\n trigger.children = [\n buildWord(create, DisclosureRole.More, words.more, root.id),\n buildWord(create, DisclosureRole.Less, words.less, root.id),\n ...(icon === AccordionIcon.None ? [] : [buildCompositeIcon(create, 'icon', icon, root.id, DisclosureRole.Icon)]),\n ];\n const panel = make(create, 'panel', Type.Container, DisclosureRole.Panel, Style.Panel, {}, 'Panel');\n const body = make(create, 'body', Type.Text, null, Style.Body, { content: words.body, tag: 'p' }, 'Text');\n writeStyles(body, BODY_BASE);\n panel.children = [body];\n root.children = [trigger, panel];\n return root;\n}\n\n/** Behaviour ▸ Open by default (a disclosure: on or off). */\nexport function disclosureOpenByDefault(root: CompositeNode): boolean {\n return accordionBehaviour(root).defaultOn !== AccordionDefaultOn.None;\n}\n","import { elementStyleById, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { CompositeNode, CompositeNodeFactory, writeStyles } from './composite-node';\n\n/**\n * BADGE + CHIP (composite T25; complex-components board 8). A Badge is a Container wearing\n * `badge-<tone>` › Icon + Text; its TONE is its element style, so Badge ▸ Tone writes the style and\n * nothing else, and a re-theme restyles every badge. A Chip is the outlined static style only (no\n * behaviour until the K5 Data view). Inside a card the badge plays `card.badge`; anywhere else it is\n * recognised by its style.\n */\n\nexport enum BadgeTone {\n Neutral = 'neutral',\n Success = 'success',\n Warning = 'warning',\n Accent = 'accent',\n}\n\nexport const BADGE_TONES: ReadonlyArray<BadgeTone> = [BadgeTone.Neutral, BadgeTone.Success, BadgeTone.Warning, BadgeTone.Accent];\n\n/** The tone's element style (`badge-<tone>`, the contract's). */\nexport function badgeStyleId(tone: BadgeTone): string {\n return `badge-${tone}`;\n}\n\nexport const CHIP_STYLE = 'chip';\n\n/** The glyph a fresh badge of each tone shows (the board's tone grid). */\nexport const BADGE_TONE_ICONS: Readonly<Record<BadgeTone, string>> = {\n [BadgeTone.Neutral]: 'ph ph-tag',\n [BadgeTone.Success]: 'ph ph-check',\n [BadgeTone.Warning]: 'ph ph-warning',\n [BadgeTone.Accent]: 'ph ph-sparkle',\n};\nexport const CHIP_ICON = 'ph ph-tag';\n\nconst TONE_BY_STYLE = new Map(BADGE_TONES.map(tone => [badgeStyleId(tone), tone]));\n\n/** The badge tone a node wears, or null when it is no badge. */\nexport function badgeToneOf(node: { elementStyle?: string | null } | null | undefined): BadgeTone | null {\n return TONE_BY_STYLE.get(node?.elementStyle ?? '') ?? null;\n}\n\n/** True for a node wearing a badge tone or the chip style — the pills (their Icon reads their ink). */\nexport function isPillNode(node: { elementStyle?: string | null } | null | undefined): boolean {\n return badgeToneOf(node) !== null || node?.elementStyle === CHIP_STYLE;\n}\n\n/**\n * Badge ▸ Tone: move the badge to another tone's element style (an edit the author made to the old\n * tone's look is kept, design-core's switch rule). Nothing else changes — not the icon, not the words.\n */\nexport function setBadgeTone(node: CompositeNode, tone: BadgeTone, baseline: Readonly<Record<string, unknown>> = {}): boolean {\n const current = node.elementStyle ?? null;\n const next = badgeStyleId(tone);\n if (!badgeToneOf(node) || current === next || !elementStyleById(next)) return false;\n const result = switchElementStyle(node, current, next, baseline);\n if (result.applied) node.elementStyle = next;\n return result.applied;\n}\n\n/** A pill's box: hugs its words, never stretches in a column. */\nconst PILL_BASE: Readonly<Record<string, string>> = {\n display: 'inline-flex', alignItems: 'center', gap: '5px', width: 'auto', minHeight: 'auto', alignSelf: 'flex-start', lineHeight: '1.4',\n};\nconst PILL_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\nconst PILL_WORDS: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: '0px 0px 0px 0px', margin: '0px 0px 0px 0px' };\n/** The pill's words wear the pill's OWN label style (Card v2.1): its type from the badge tokens, its leading,\n * tracking, case and ink inherited from the pill — never the button's label style. */\nexport const PILL_LABEL_STYLE = 'badge-label';\n\nexport interface PillOptions {\n text?: string;\n icon?: string;\n /** Key prefix for the consumer's ids (`badge` → `badge`, `badge-icon`, `badge-text`). */\n key?: string;\n}\n\nfunction buildPill(create: CompositeNodeFactory, elementStyle: string, text: string, icon: string, key: string): CompositeNode {\n const pill = create({ key, type: 'Container', elementStyle });\n writeStyles(pill, PILL_BASE);\n const glyph = create({ key: `${key}-icon`, type: 'Icon', props: { iconClass: icon }, elementStyle: 'icon' });\n writeStyles(glyph, PILL_ICON);\n const words = create({ key: `${key}-text`, type: 'Text', props: { content: text, tag: 'span' }, elementStyle: PILL_LABEL_STYLE });\n writeStyles(words, PILL_WORDS);\n pill.children = [glyph, words];\n return pill;\n}\n\n/** A fresh Badge: Container `badge-<tone>` › Icon + Text. */\nexport function buildBadge(create: CompositeNodeFactory, options: PillOptions & { tone?: BadgeTone } = {}): CompositeNode {\n const tone = options.tone ?? BadgeTone.Accent;\n const badge = buildPill(create, badgeStyleId(tone), options.text ?? 'New', options.icon ?? BADGE_TONE_ICONS[tone], options.key ?? 'badge');\n badge.label = 'Badge';\n return badge;\n}\n\n/** A fresh Chip: Container `chip` › Icon + Text (outlined, static). */\nexport function buildChip(create: CompositeNodeFactory, options: PillOptions = {}): CompositeNode {\n const chip = buildPill(create, CHIP_STYLE, options.text ?? 'Chip', options.icon ?? CHIP_ICON, options.key ?? 'chip');\n chip.label = 'Chip';\n return chip;\n}\n","import { COLOR_SCHEME_TRAIT, elementStyleById, LinkType, setColorScheme, switchElementStyle } from '@vectoriox/iox-ui/design-core';\n\nimport { BadgeTone, buildBadge } from './badge';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, findByRole, parentInComposite, readLayerStyle, readProp, readStyle,\n removeFromComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * CARD v2 (composite T23; complex-components board 8, APPROVED 2026-10-20). Not a component: a recipe of\n * ordinary nodes, each part carrying a role, so every part is selectable on the canvas, in the layer tree\n * and the breadcrumb, wears its own element style and is edited on its own (R2). No runtime and no design\n * state — nothing is hidden at rest.\n *\n * Container `card` role card\n * ├─ Container `box` role card.media (optional: Image)\n * │ ├─ Image `media`\n * │ └─ Container `badge-accent` role card.badge (optional) › Icon + Text\n * └─ Container `box` role card.content (locked)\n * ├─ Text `eyebrow` role card.eyebrow (optional)\n * ├─ Heading h3 `h3` role card.title (locked — the card's link when linked)\n * ├─ Text `body` role card.text (optional)\n * └─ Container `box` role card.actions (optional) › ButtonBlock primary + ghost\n *\n * One recipe for every consumer: the builder's palette (its `createConfig`), generation-core's composer\n * (its `createSerializedNode`) and the site build — each passes its own node factory.\n */\n\nexport enum CardRole {\n Card = 'card',\n Media = 'card.media',\n Badge = 'card.badge',\n Content = 'card.content',\n Eyebrow = 'card.eyebrow',\n Title = 'card.title',\n Text = 'card.text',\n Actions = 'card.actions',\n}\n\n/** The optional parts — Card ▸ Parts, one switch each, in the board's order. Title and Content are locked. */\nexport enum CardPart {\n Media = 'media',\n Badge = 'badge',\n Eyebrow = 'eyebrow',\n Text = 'text',\n Actions = 'actions',\n}\n\nexport const CARD_PARTS: ReadonlyArray<CardPart> = [CardPart.Media, CardPart.Badge, CardPart.Eyebrow, CardPart.Text, CardPart.Actions];\n\nexport const CARD_PART_ROLE: Readonly<Record<CardPart, CardRole>> = {\n [CardPart.Media]: CardRole.Media,\n [CardPart.Badge]: CardRole.Badge,\n [CardPart.Eyebrow]: CardRole.Eyebrow,\n [CardPart.Text]: CardRole.Text,\n [CardPart.Actions]: CardRole.Actions,\n};\n\n/** Card ▸ Layout — a preset, never a stored trait: `applyCardLayout` writes the card's layout styles. */\nexport enum CardLayout {\n Top = 'top',\n Side = 'side',\n Overlay = 'overlay',\n Compact = 'compact',\n}\n\nexport const CARD_LAYOUTS: ReadonlyArray<CardLayout> = [CardLayout.Top, CardLayout.Side, CardLayout.Overlay, CardLayout.Compact];\n/** What Card ▸ Layout shows once the author has changed the layout styles by hand. */\nexport const CARD_LAYOUT_CUSTOM = 'custom';\nexport type CardLayoutState = CardLayout | typeof CARD_LAYOUT_CUSTOM;\n\n/** The words a fresh card starts with — the author's to replace (or a bound field's). */\nexport interface CardWords {\n eyebrow: string;\n title: string;\n text: string;\n primary: string;\n secondary: string;\n badge: string;\n}\n\nexport const CARD_WORDS: Readonly<CardWords> = {\n eyebrow: 'Category',\n title: 'Card title',\n text: 'One or two sentences about this item.',\n primary: 'Learn more',\n secondary: 'Save',\n badge: 'New',\n};\n\n/** The breakpoint whose layer stacks an \"Image side\" card (Breakpoint.Mobile, ≤767px). */\nexport const CARD_STACK_BREAKPOINT = 'mobile';\n\nenum Type {\n Container = 'Container',\n Image = 'Image',\n Heading = 'Heading',\n Text = 'Text',\n Icon = 'Icon',\n ButtonBlock = 'ButtonBlock',\n}\n\nenum Style {\n Card = 'card',\n Box = 'box',\n Media = 'media',\n Eyebrow = 'eyebrow',\n Title = 'h3',\n Body = 'body',\n Label = 'button-label',\n Primary = 'button-primary',\n Ghost = 'button-ghost',\n Icon = 'icon',\n Scrim = 'media-scrim',\n}\n\nenum Scheme {\n Default = 'default',\n Inverse = 'inverse',\n}\n\nconst LINK_TYPE = 'linkType';\nconst SAVE_ICON = 'ph ph-bookmark-simple';\n\n/** A value an element style writes — read from the contract, never retyped. */\nconst styleValue = (style: string, trait: string): string => String(elementStyleById(style)?.base[trait] ?? '');\nconst CARD_PAD = styleValue(Style.Card, 'padding');\nconst IMAGE_RADIUS = styleValue(Style.Media, 'borderRadius');\nconst TITLE_SIZE = styleValue(Style.Title, 'fontSize');\nconst LEAD_SIZE = 'var(--iox-size-lead)';\nconst ZERO_BOX = '0px 0px 0px 0px';\n\n/** What every card part holds in every layout — the recipe's box. */\nconst CARD_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n // No height: a card is a grid or flex item, and the cell's stretch is what makes a row's cards equal.\n // A percentage height resolved against whatever held the card (a tall section) and grew it to that.\n [CardRole.Card]: { display: 'flex', gap: '14px', width: '100%', minWidth: '0px', overflow: 'hidden', position: 'relative' },\n [CardRole.Media]: { display: 'block', width: '100%', minHeight: 'auto', flexGrow: '0', flexShrink: '0' },\n [CardRole.Content]: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%', minWidth: '0px', minHeight: 'auto' },\n [CardRole.Eyebrow]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n [CardRole.Title]: { margin: ZERO_BOX },\n [CardRole.Text]: { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' },\n // Buttons pinned to the bottom (board 8 Q: equal heights + buttons pinned): the content column grows,\n // and the row's auto top margin takes the slack.\n [CardRole.Actions]: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '8px', margin: 'auto 0px 0px 0px', padding: '6px 0px 0px 0px', width: '100%', minHeight: 'auto' },\n};\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%' };\n/** A button's label and a pill's words: inherit the type and ink of what holds them. */\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst INLINE_ICON: Readonly<Record<string, string>> = { fontSize: '1em' };\n\n/** One layout preset: the style values it writes per role (every layout writes the same keys, so\n * switching is clean and detection exact), where the badge sits, and what it switches off. */\ninterface CardLayoutSpec {\n card: Readonly<Record<string, string>>;\n media: Readonly<Record<string, string>>;\n image: Readonly<Record<string, string>>;\n content: Readonly<Record<string, string>>;\n contentStyle: Style;\n contentScheme: Scheme;\n title: Readonly<Record<string, string>>;\n badgeOnMedia: boolean;\n /** The stacking layer (Image side only); every other layout clears these keys from it. */\n stack?: { card: Readonly<Record<string, string>>; media: Readonly<Record<string, string>>; image: Readonly<Record<string, string>> };\n partsOff?: ReadonlyArray<CardPart>;\n}\n\nconst IN_FLOW = { position: 'relative', top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' };\nconst GROWING_CONTENT = { position: 'static', flexGrow: '1', flexShrink: '1', flexBasis: '0%', padding: ZERO_BOX };\n\nconst LAYOUTS: Readonly<Record<CardLayout, CardLayoutSpec>> = {\n [CardLayout.Top]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n },\n [CardLayout.Side]: {\n card: { flexDirection: 'row', alignItems: 'stretch', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '42%' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: '180px', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: true,\n stack: {\n card: { flexDirection: 'column' },\n media: { flexBasis: 'auto' },\n image: { aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' },\n },\n },\n [CardLayout.Overlay]: {\n card: { flexDirection: 'column', alignItems: 'stretch', justifyContent: 'flex-end', minHeight: '340px', padding: ZERO_BOX },\n media: { position: 'absolute', top: '0px', right: '0px', bottom: '0px', left: '0px', flexBasis: 'auto' },\n image: { aspectRatio: 'auto', height: '100%', minHeight: 'auto', borderRadius: '0px' },\n content: { position: 'relative', flexGrow: '0', flexShrink: '0', flexBasis: 'auto', padding: `72px ${CARD_PAD} ${CARD_PAD} ${CARD_PAD}` },\n contentStyle: Style.Scrim, contentScheme: Scheme.Inverse,\n title: { fontSize: TITLE_SIZE },\n badgeOnMedia: false,\n },\n [CardLayout.Compact]: {\n card: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', minHeight: 'auto', padding: CARD_PAD },\n media: { ...IN_FLOW, flexBasis: '72px' },\n image: { aspectRatio: '1 / 1', height: 'auto', minHeight: 'auto', borderRadius: IMAGE_RADIUS },\n content: GROWING_CONTENT, contentStyle: Style.Box, contentScheme: Scheme.Default,\n title: { fontSize: LEAD_SIZE },\n badgeOnMedia: false,\n partsOff: [CardPart.Text, CardPart.Actions],\n },\n};\n\nconst STACK_KEYS = {\n card: Object.keys(LAYOUTS[CardLayout.Side].stack!.card),\n media: Object.keys(LAYOUTS[CardLayout.Side].stack!.media),\n image: Object.keys(LAYOUTS[CardLayout.Side].stack!.image),\n};\n\n/** What a type's UNSTYLED node holds — passed so a style switch (Content ⇄ the scrim) hands the old\n * style's values back to the type, never to `undefined`. */\nexport type BaselineStyles = (type: string) => Readonly<Record<string, unknown>>;\n\nexport interface CardEditOptions {\n baselineStyles?: BaselineStyles;\n}\n\nexport interface CardOptions extends CardEditOptions {\n layout?: CardLayout;\n /** Which optional parts the card starts with (all, by default). */\n parts?: Partial<Record<CardPart, boolean>>;\n words?: Partial<CardWords>;\n badgeTone?: BadgeTone;\n}\n\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: CardRole | null, elementStyle: string | null,\n props: Record<string, unknown> = {}, label?: string): CompositeNode {\n const node = create({ key, type, props, elementStyle });\n if (role) node.role = role;\n if (label) node.label = label;\n writeStyles(node, role ? CARD_BASE[role] ?? {} : {});\n return node;\n}\n\nfunction buttonLabel(create: CompositeNodeFactory, key: string, words: string): CompositeNode {\n const label = make(create, key, Type.Text, null, Style.Label, { content: words, tag: 'span' });\n writeStyles(label, LABEL_BASE);\n return label;\n}\n\n/** Each optional part (and the locked title) as the recipe builds it. */\nconst PART_BUILDERS: Readonly<Record<CardPart, (create: CompositeNodeFactory, words: CardWords, tone: BadgeTone) => CompositeNode>> = {\n [CardPart.Media]: (create) => {\n const media = make(create, 'media', Type.Container, CardRole.Media, Style.Box, {}, 'Media');\n const image = make(create, 'image', Type.Image, null, Style.Media, { src: '', alt: '' });\n writeStyles(image, IMAGE_BASE);\n media.children = [image];\n return media;\n },\n [CardPart.Badge]: (create, words, tone) => {\n const badge = buildBadge(create, { tone, text: words.badge, key: 'badge' });\n badge.role = CardRole.Badge;\n badge.label = 'Badge';\n return badge;\n },\n [CardPart.Eyebrow]: (create, words) => make(create, 'eyebrow', Type.Text, CardRole.Eyebrow, Style.Eyebrow, { content: words.eyebrow, tag: 'p' }, 'Eyebrow'),\n [CardPart.Text]: (create, words) => make(create, 'text', Type.Text, CardRole.Text, Style.Body, { content: words.text, tag: 'p' }, 'Text'),\n [CardPart.Actions]: (create, words) => {\n const actions = make(create, 'actions', Type.Container, CardRole.Actions, Style.Box, {}, 'Buttons');\n const primary = make(create, 'primary', Type.ButtonBlock, null, Style.Primary);\n primary.children = [buttonLabel(create, 'primary-label', words.primary)];\n const ghost = make(create, 'secondary', Type.ButtonBlock, null, Style.Ghost);\n const icon = make(create, 'secondary-icon', Type.Icon, null, Style.Icon, { iconClass: SAVE_ICON });\n writeStyles(icon, INLINE_ICON);\n ghost.children = [icon, buttonLabel(create, 'secondary-label', words.secondary)];\n actions.children = [primary, ghost];\n return actions;\n },\n};\n\nfunction buildTitle(create: CompositeNodeFactory, words: CardWords): CompositeNode {\n return make(create, 'title', Type.Heading, CardRole.Title, Style.Title, { content: words.title, level: 'h3', [LINK_TYPE]: LinkType.None }, 'Title');\n}\n\n/** A fresh Card v2: every part a node with its role and element style, laid out by `options.layout`. */\nexport function buildCardRecipe(create: CompositeNodeFactory, options: CardOptions = {}): CompositeNode {\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const tone = options.badgeTone ?? BadgeTone.Accent;\n const on = (part: CardPart) => options.parts?.[part] !== false;\n const card = make(create, 'card', Type.Container, CardRole.Card, Style.Card, {}, 'Card');\n const content = make(create, 'content', Type.Container, CardRole.Content, Style.Box, {}, 'Content');\n content.children = [\n ...(on(CardPart.Eyebrow) ? [PART_BUILDERS[CardPart.Eyebrow](create, words, tone)] : []),\n buildTitle(create, words),\n ...(on(CardPart.Text) ? [PART_BUILDERS[CardPart.Text](create, words, tone)] : []),\n ...(on(CardPart.Actions) ? [PART_BUILDERS[CardPart.Actions](create, words, tone)] : []),\n ];\n card.children = [...(on(CardPart.Media) ? [PART_BUILDERS[CardPart.Media](create, words, tone)] : []), content];\n if (on(CardPart.Badge)) placeBadge(card, PART_BUILDERS[CardPart.Badge](create, words, tone), true);\n applyCardLayout(card, options.layout ?? CardLayout.Top, options);\n return card;\n}\n\n/** True when `node` is a Card v2 root. */\nexport function isCardRoot(node: CompositeNode | null | undefined): boolean {\n return node?.role === CardRole.Card;\n}\n\n/** The Card a part belongs to: the nearest ancestor (or the node itself) playing `card`. `path` = the\n * node's ancestors, root first. */\nexport function cardRootOf(node: CompositeNode, path: ReadonlyArray<CompositeNode>): CompositeNode | null {\n if (isCardRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isCardRoot(path[i])) return path[i];\n return null;\n}\n\n/** Card ▸ Parts: which optional parts the card holds now. */\nexport function cardPartsOf(card: CompositeNode): Record<CardPart, boolean> {\n return Object.fromEntries(CARD_PARTS.map(part => [part, !!findByRole(card, CARD_PART_ROLE[part])])) as Record<CardPart, boolean>;\n}\n\nconst imageOf = (media: CompositeNode | undefined): CompositeNode | undefined => media?.children?.find(c => c.type === Type.Image);\n\n/** Put the badge where the layout says: the Media's top corner, or the head of the content column\n * (Image behind text, Compact, or no Media at all). The corner's insets are logical, in iox-design.css\n * (mirrored in RTL); `position` is the node's own, because the editing canvas forces every node's\n * position from its style props. */\nfunction placeBadge(card: CompositeNode, badge: CompositeNode, onMedia: boolean): void {\n const media = findByRole(card, CardRole.Media);\n const content = findByRole(card, CardRole.Content);\n removeFromComposite(card, badge);\n const overMedia = onMedia && !!media;\n if (overMedia) media!.children = [...(media!.children ?? []), badge];\n else if (content) content.children = [badge, ...(content.children ?? [])];\n writeStyles(badge, { position: overMedia ? 'absolute' : 'static' });\n}\n\n/** Through design-core's ONE scheme writer — the same setting Section colours edits everywhere. */\nfunction writeScheme(node: CompositeNode, scheme: Scheme): void {\n setColorScheme(node, scheme);\n}\n\n/** Write one role's layout values from a spec (base + layers). */\nfunction applyPartLayout(card: CompositeNode, spec: CardLayoutSpec, part: CompositeNode, baseline: BaselineStyles): void {\n switch (part.role) {\n case CardRole.Card:\n writeStyles(part, { ...CARD_BASE[CardRole.Card], ...spec.card });\n setStack(part, spec.stack?.card, STACK_KEYS.card);\n return;\n case CardRole.Media: {\n writeStyles(part, { ...CARD_BASE[CardRole.Media], ...spec.media });\n setStack(part, spec.stack?.media, STACK_KEYS.media);\n const image = imageOf(part);\n if (image) {\n writeStyles(image, { ...IMAGE_BASE, ...spec.image });\n setStack(image, spec.stack?.image, STACK_KEYS.image);\n }\n return;\n }\n case CardRole.Content: {\n const current = part.elementStyle;\n if (current !== spec.contentStyle) {\n switchElementStyle(part, current, spec.contentStyle, baseline(part.type));\n part.elementStyle = spec.contentStyle;\n }\n writeStyles(part, { ...CARD_BASE[CardRole.Content], ...spec.content });\n writeScheme(part, spec.contentScheme);\n return;\n }\n case CardRole.Title:\n writeStyles(part, spec.title);\n return;\n default:\n return;\n }\n}\n\nfunction setStack(node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>): void {\n if (values) writeLayerStyles(node, CARD_STACK_BREAKPOINT, values);\n else clearLayerStyles(node, CARD_STACK_BREAKPOINT, keys);\n}\n\nexport interface CardLayoutResult {\n layout: CardLayout;\n /** Parts the preset switched off (Compact: Text and Buttons). */\n removed: CardPart[];\n}\n\n/**\n * Card ▸ Layout. Rewrites the card's LAYOUT styles for `layout` — the card's direction and box, the\n * Media's placement, the Image's aspect, the content block (Image behind text: the `media-scrim` style +\n * the Inverse scheme), the title size (Compact) and, for Image side, a Mobile layer that stacks it — and\n * moves the badge to where the layout puts it. Nothing else on any part. One undo step for the caller.\n */\nexport function applyCardLayout(card: CompositeNode, layout: CardLayout, options: CardEditOptions = {}): CardLayoutResult {\n const spec = LAYOUTS[layout];\n const baseline = options.baselineStyles ?? (() => ({}));\n const removed: CardPart[] = [];\n for (const part of spec.partsOff ?? []) if (setCardPart(card, part, false)) removed.push(part);\n applyPartLayout(card, spec, card, baseline);\n for (const role of [CardRole.Media, CardRole.Content, CardRole.Title]) {\n const part = findByRole(card, role);\n if (part) applyPartLayout(card, spec, part, baseline);\n }\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n return { layout, removed };\n}\n\nconst same = (a: unknown, b: unknown) => String(a ?? '').trim() === String(b ?? '').trim();\nconst holds = (node: CompositeNode, values: Readonly<Record<string, string>>) => Object.entries(values).every(([k, v]) => same(readStyle(node, k), v));\nconst holdsLayer = (node: CompositeNode, values: Readonly<Record<string, string>> | undefined, keys: ReadonlyArray<string>) =>\n values ? Object.entries(values).every(([k, v]) => same(readLayerStyle(node, CARD_STACK_BREAKPOINT, k), v))\n : keys.every(k => readLayerStyle(node, CARD_STACK_BREAKPOINT, k) === undefined);\n\nfunction matches(card: CompositeNode, spec: CardLayoutSpec): boolean {\n if (!holds(card, spec.card) || !holdsLayer(card, spec.stack?.card, STACK_KEYS.card)) return false;\n const media = findByRole(card, CardRole.Media);\n if (media) {\n if (!holds(media, spec.media) || !holdsLayer(media, spec.stack?.media, STACK_KEYS.media)) return false;\n const image = imageOf(media);\n if (image && (!holds(image, spec.image) || !holdsLayer(image, spec.stack?.image, STACK_KEYS.image))) return false;\n }\n const content = findByRole(card, CardRole.Content);\n if (content) {\n if (content.elementStyle !== spec.contentStyle || !holds(content, spec.content)) return false;\n if (!same(readProp(content, COLOR_SCHEME_TRAIT) ?? Scheme.Default, spec.contentScheme)) return false;\n }\n const title = findByRole(card, CardRole.Title);\n if (title && !holds(title, spec.title)) return false;\n const badge = findByRole(card, CardRole.Badge);\n if (badge && media) {\n const onMedia = parentInComposite(card, badge) === media;\n if (onMedia !== spec.badgeOnMedia) return false;\n }\n return true;\n}\n\n/** The layout the card's styles hold now, or `custom` once they were changed by hand (Card ▸ Layout). */\nexport function detectCardLayout(card: CompositeNode): CardLayoutState {\n return CARD_LAYOUTS.find(layout => matches(card, LAYOUTS[layout])) ?? CARD_LAYOUT_CUSTOM;\n}\n\nexport interface CardPartChange {\n part: CardPart;\n /** The node removed (off) or stamped (on); null when there was nothing to do. */\n node: CompositeNode | null;\n}\n\n/**\n * Card ▸ Parts. Off removes the part (the badge first moves out of a removed Media); on stamps it back\n * from the recipe into its role's slot, wearing its element style and laid out like the rest of the card\n * (the card's current layout; Image top when it is Custom). Returns the node touched, or null when the\n * card already was that way. Title and Content are not parts: they are locked (structure guard).\n */\nexport function setCardPart(card: CompositeNode, part: CardPart, on: boolean, create?: CompositeNodeFactory, options: CardOptions = {}): CompositeNode | null {\n const role = CARD_PART_ROLE[part];\n const existing = findByRole(card, role);\n if (!on) {\n if (!existing) return null;\n if (part === CardPart.Media) {\n const badge = findByRole(existing, CardRole.Badge);\n if (badge) placeBadge(card, badge, false);\n }\n removeFromComposite(card, existing);\n return existing;\n }\n if (existing || !create) return null;\n const layout = detectCardLayout(card);\n const spec = LAYOUTS[layout === CARD_LAYOUT_CUSTOM ? CardLayout.Top : layout];\n const words: CardWords = { ...CARD_WORDS, ...(options.words ?? {}) };\n const node = PART_BUILDERS[part](create, words, options.badgeTone ?? BadgeTone.Accent);\n const content = findByRole(card, CardRole.Content);\n switch (part) {\n case CardPart.Media: {\n card.children = [node, ...(card.children ?? [])];\n applyPartLayout(card, spec, node, () => ({}));\n const badge = findByRole(card, CardRole.Badge);\n if (badge) placeBadge(card, badge, spec.badgeOnMedia);\n break;\n }\n case CardPart.Badge:\n placeBadge(card, node, spec.badgeOnMedia);\n break;\n default:\n if (content) insertInContent(content, part, node);\n break;\n }\n return node;\n}\n\n/** The content column's order: [badge], eyebrow, title, text, buttons. */\nconst CONTENT_ORDER: ReadonlyArray<string> = [CardRole.Badge, CardRole.Eyebrow, CardRole.Title, CardRole.Text, CardRole.Actions];\n\nfunction insertInContent(content: CompositeNode, part: CardPart, node: CompositeNode): void {\n const rank = (n: CompositeNode) => { const i = CONTENT_ORDER.indexOf(n.role ?? ''); return i < 0 ? CONTENT_ORDER.length : i; };\n const children = [...(content.children ?? [])];\n const own = rank(node);\n const at = children.findIndex(c => rank(c) > own);\n children.splice(at < 0 ? children.length : at, 0, node);\n content.children = children;\n}\n\n// ── Link the whole card ──────────────────────────────────────────────────────────────────────\n\n/** The card's title — what \"Link the whole card\" makes the link (its words are the link's name). */\nexport function cardTitleOf(card: CompositeNode): CompositeNode | undefined {\n return findByRole(card, CardRole.Title);\n}\n\n/** True when the card links as a whole: its title carries a link (the stretched link renders from it). */\nexport function isCardLinked(card: CompositeNode): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const type = readProp(title, LINK_TYPE);\n return type === LinkType.Page || type === LinkType.External;\n}\n\n/**\n * Card ▸ Link ▸ \"Link the whole card\". On: the title links (to a website page, unless it already pointed\n * at a URL — the target it held is kept); off: the title links nowhere (its target is kept for the next\n * time). The stretched link itself is the shared CSS (iox-design.css), keyed on the title's anchor.\n */\nexport function setCardLinked(card: CompositeNode, on: boolean): boolean {\n const title = cardTitleOf(card);\n if (!title) return false;\n const current = readProp(title, LINK_TYPE);\n const next = on ? (current === LinkType.External ? LinkType.External : LinkType.Page) : LinkType.None;\n return writeProp(title, LINK_TYPE, next);\n}\n","import { CompositeNode, CompositeNodeFactory, makeCompositePart, NO_ELEMENT_STYLE, readProp, writeProp, writeStyles } from './composite-node';\n\n/**\n * THE ACCESSIBLE CAROUSEL (CC3 — complex-components plan §7c, board 6; board 9 Q13). The Slider's controls are no\n * longer drawn by Swiper: Previous, Next, Pause and Pagination are REAL nodes with roles — selectable on the canvas,\n * in the layer tree and the breadcrumb, and styled on their own (R2) — handed to Swiper as its navigation and\n * pagination elements.\n *\n * SliderContainer (.swiper)\n * ├─ ButtonBlock `button-secondary` role slider.pause FIRST focus stop; present while Autoplay is on, locked\n * ├─ ButtonBlock `button-secondary` role slider.prev › Icon caret (points the reading way in RTL)\n * ├─ ButtonBlock `button-secondary` role slider.next › Icon caret\n * ├─ (the slides — `.swiper-wrapper` › SliderSlide …)\n * └─ Container role slider.pagination Swiper draws the dots (or \"3 / 6\") inside it\n *\n * The parts render INSIDE the `.swiper` element, never inside `.swiper-wrapper` (slider.md: a `.swiper-slide` must be\n * the wrapper's direct child): the parts that come before the first slide in the tree render before the wrapper, the\n * rest after it. By default they sit over the slides like Swiper's own controls (the shared CSS, iox-design.css, at\n * zero specificity — a part's own styles win), so a saved slider migrated from Swiper-drawn controls keeps its look.\n *\n * The Bindings switches stay the source of truth: Navigation arrows ⇔ Previous + Next, Pagination ⇔ Pagination,\n * Autoplay ⇔ Pause (WCAG 2.2.2 — \"added while Autoplay is on, cannot be removed\"). `syncSliderParts` is the one edit.\n */\n\nexport enum SliderRole {\n Pause = 'slider.pause',\n Prev = 'slider.prev',\n Next = 'slider.next',\n Pagination = 'slider.pagination',\n}\n\n/** Parts in the order they are stamped: the pause control first (APG: the first focus stop), the dots last. */\nexport const SLIDER_PART_ROLES: ReadonlyArray<SliderRole> = [SliderRole.Pause, SliderRole.Prev, SliderRole.Next, SliderRole.Pagination];\n\nexport const SLIDER_TYPE = 'SliderContainer';\nexport const SLIDE_TYPE = 'SliderSlide';\n\n/** The Bindings switches that own the parts. */\nexport enum SliderFlag {\n Navigation = 'enableNavigation',\n Pagination = 'enablePagination',\n Autoplay = 'enableAutoplay',\n}\n\nconst FLAG_PARTS: ReadonlyArray<readonly [SliderFlag, ReadonlyArray<SliderRole>]> = [\n [SliderFlag.Autoplay, [SliderRole.Pause]],\n [SliderFlag.Navigation, [SliderRole.Prev, SliderRole.Next]],\n [SliderFlag.Pagination, [SliderRole.Pagination]],\n];\n\n/** The trait that names the carousel (Slider ▸ Accessibility ▸ Carousel name) — the A11y trait every named part uses. */\nexport const SLIDER_NAME_TRAIT = 'ariaLabel';\n\ninterface RoleLike { role?: string | null; type?: string }\n\nexport function isSliderPart(node: RoleLike | null | undefined): boolean {\n return !!node?.role && (SLIDER_PART_ROLES as ReadonlyArray<string>).includes(node.role);\n}\n\nexport function isSlider(node: RoleLike | null | undefined): boolean {\n return node?.type === SLIDER_TYPE;\n}\n\n/** The slider's own part playing `role` (a direct child), or undefined. */\nexport function sliderPart<T extends RoleLike>(slider: { children?: T[] | null }, role: SliderRole): T | undefined {\n return (slider.children ?? []).find(c => c?.role === role);\n}\n\n/** True when the slider's controls are parts (it was created or migrated in CC3) — Swiper then draws none of its own. */\nexport function hasSliderParts(slider: { children?: ReadonlyArray<RoleLike> | null }): boolean {\n return (slider.children ?? []).some(isSliderPart);\n}\n\n/** A slider's children split as they render: parts before the first slide, the slides (into `.swiper-wrapper`), and\n * the parts after it. */\nexport function splitSliderChildren<T extends RoleLike>(children: ReadonlyArray<T> | null | undefined): { lead: T[]; slides: T[]; trail: T[] } {\n const lead: T[] = [];\n const slides: T[] = [];\n const trail: T[] = [];\n for (const child of children ?? []) {\n if (!isSliderPart(child)) slides.push(child);\n else (slides.length ? trail : lead).push(child);\n }\n return { lead, slides, trail };\n}\n\n/** The slides only (the template slide of a bound slider is `sliderSlides(children)[0]`). */\nexport function sliderSlides<T extends RoleLike>(children: ReadonlyArray<T> | null | undefined): T[] {\n return (children ?? []).filter(c => !isSliderPart(c));\n}\n\n// ── the parts' recipe ───────────────────────────────────────────────────────────────────────────────\n\nenum Type {\n ButtonBlock = 'ButtonBlock',\n Icon = 'Icon',\n Container = 'Container',\n}\n\nenum Style {\n Control = 'button-secondary',\n Icon = 'icon',\n}\n\n/** Each part's glyph (Phosphor) and its default accessible name. */\nexport const SLIDER_PART_GLYPH: Readonly<Record<Exclude<SliderRole, SliderRole.Pagination>, string>> = {\n [SliderRole.Pause]: 'ph ph-pause',\n [SliderRole.Prev]: 'ph ph-caret-left',\n [SliderRole.Next]: 'ph ph-caret-right',\n};\nexport const SLIDER_PLAY_GLYPH = 'ph-fill ph-play';\n\nconst PART_LABEL: Readonly<Record<SliderRole, string>> = {\n [SliderRole.Pause]: 'Pause',\n [SliderRole.Prev]: 'Previous',\n [SliderRole.Next]: 'Next',\n [SliderRole.Pagination]: 'Pagination',\n};\n\nconst ZERO = '0px 0px 0px 0px';\n/** A round 44px control (board 6 `.st-ctl`), over the slides (z above `.swiper-wrapper`). The PLACE (which edge) is the\n * shared CSS's, in logical insets, so a carousel reads the same way in RTL. */\nconst CONTROL_BASE: Readonly<Record<string, string>> = {\n position: 'absolute', zIndex: '10', display: 'flex', alignItems: 'center', justifyContent: 'center',\n width: '44px', height: '44px', minWidth: '44px', padding: ZERO, margin: ZERO, borderRadius: '999px',\n};\nconst ICON_BASE: Readonly<Record<string, string>> = { fontSize: '20px', color: 'inherit' };\n/** The arrows' vertical middle over the slides: half the 44px control above the centre line. */\nconst ARROW_TOP = 'calc(50% - 22px)';\nconst PAGINATION_BASE: Readonly<Record<string, string>> = {\n position: 'absolute', zIndex: '10', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '8px',\n width: 'auto', minHeight: 'auto', height: 'auto', padding: ZERO, margin: ZERO, color: 'var(--iox-accent)',\n};\n\n/**\n * What a saved slider drew through Swiper before CC3, carried into its parts by the migration so it looks the same:\n * bare chevrons in the author's arrow colour and size, the dots in the author's colour. Swiper's own default colour\n * is its theme blue — what the live site drew, because the engine never applied the colour traits.\n */\nexport interface LegacySliderLook {\n navigationColor?: string;\n navigationSize?: number;\n paginationColor?: string;\n}\n\nexport const SWIPER_THEME_COLOR = '#007aff';\n\nfunction legacyLookOf(slider: CompositeNode): LegacySliderLook {\n const color = readProp(slider, 'navigationColor');\n const size = Number(readProp(slider, 'navigationSize'));\n const dots = readProp(slider, 'paginationColor');\n return {\n navigationColor: typeof color === 'string' && color ? color : SWIPER_THEME_COLOR,\n navigationSize: Number.isFinite(size) && size > 0 ? size : 44,\n paginationColor: typeof dots === 'string' && dots ? dots : SWIPER_THEME_COLOR,\n };\n}\n\n/** One part, from the recipe (board 6: `button-secondary` controls, token dots) or in a migrated slider's legacy look. */\nexport function buildSliderPart(create: CompositeNodeFactory, role: SliderRole, legacy?: LegacySliderLook): CompositeNode {\n if (role === SliderRole.Pagination) {\n const dots = makeCompositePart(create, { key: 'pagination', type: Type.Container, props: {}, elementStyle: NO_ELEMENT_STYLE }, role, PART_LABEL[role],\n legacy?.paginationColor ? { ...PAGINATION_BASE, color: legacy.paginationColor } : PAGINATION_BASE);\n dots.children = [];\n return dots;\n }\n const key = role.split('.')[1];\n // Previous / Next sit at the vertical middle (their own `top`, so a part set back in flow drops it); the inline edge\n // is the shared CSS's, logical, so the arrows swap sides in RTL.\n const placed = role === SliderRole.Pause ? CONTROL_BASE : { ...CONTROL_BASE, top: ARROW_TOP };\n const base = legacy\n ? { ...placed, backgroundColor: 'transparent', borderWidth: ZERO, color: legacy.navigationColor ?? SWIPER_THEME_COLOR, boxShadow: 'none' }\n : placed;\n // Previous / Next carry their accessible name (Swiper's A11y module reads it); the pause control's name is its\n // runtime's — it says what pressing it will do.\n const props: Record<string, unknown> = { tag: 'button', type: 'button' };\n if (role !== SliderRole.Pause) props[SLIDER_NAME_TRAIT] = role === SliderRole.Prev ? SLIDER_WORDS.en.prev : SLIDER_WORDS.en.next;\n const button = makeCompositePart(create, { key, type: Type.ButtonBlock, props, elementStyle: legacy ? NO_ELEMENT_STYLE : Style.Control },\n role, PART_LABEL[role], base);\n const iconBase = legacy ? { ...ICON_BASE, fontSize: `${Math.round((legacy.navigationSize ?? 44) * 0.6)}px` } : ICON_BASE;\n const icon = makeCompositePart(create, { key: `${key}-icon`, type: Type.Icon, props: { iconClass: SLIDER_PART_GLYPH[role] }, elementStyle: legacy ? NO_ELEMENT_STYLE : Style.Icon },\n null, 'Icon', iconBase);\n button.children = [icon];\n return button;\n}\n\nconst truthy = (v: unknown): boolean => v === true || v === 'true';\n\n/** The parts the slider's switches call for, in stamping order. */\nexport function wantedSliderParts(slider: CompositeNode): SliderRole[] {\n return FLAG_PARTS.filter(([flag]) => truthy(readProp(slider, flag))).flatMap(([, roles]) => roles);\n}\n\nexport interface SliderPartsChange {\n added: CompositeNode[];\n removed: CompositeNode[];\n}\n\n/**\n * Make the slider's parts match its switches — ONE edit (a palette switch, the migration, the composer). Missing\n * parts are stamped from the recipe (or, `legacy`, in the migrated look) at their place: the pause control, Previous\n * and Next before the first slide, the pagination after the last; parts whose switch is off are removed. Everything\n * else (the slides, the author's edits to an existing part) is kept.\n */\nexport function syncSliderParts(slider: CompositeNode, create: CompositeNodeFactory, legacy?: LegacySliderLook): SliderPartsChange {\n const wanted = new Set(wantedSliderParts(slider));\n const children = [...(slider.children ?? [])];\n const removed = children.filter(c => isSliderPart(c) && !wanted.has(c.role as SliderRole));\n const kept = children.filter(c => !removed.includes(c));\n const added: CompositeNode[] = [];\n for (const role of SLIDER_PART_ROLES) {\n if (!wanted.has(role) || kept.some(c => c.role === role)) continue;\n const part = buildSliderPart(create, role, legacy);\n added.push(part);\n if (role === SliderRole.Pagination) {\n kept.push(part);\n } else {\n // Before the first slide, after the parts that come before it in stamping order.\n const order = SLIDER_PART_ROLES.indexOf(role);\n const firstSlide = kept.findIndex(c => !isSliderPart(c));\n let at = firstSlide < 0 ? kept.length : firstSlide;\n for (let i = 0; i < kept.length; i++) {\n const r = kept[i].role as SliderRole;\n if (isSliderPart(kept[i]) && SLIDER_PART_ROLES.indexOf(r) > order && i < at) { at = i; break; }\n }\n kept.splice(at, 0, part);\n }\n }\n if (added.length || removed.length) slider.children = kept;\n return { added, removed };\n}\n\n/** True when a saved slider still relies on Swiper-drawn controls: a switch is on and no part exists yet. */\nexport function needsSliderMigration(slider: CompositeNode | null | undefined): boolean {\n return !!slider && isSlider(slider) && !hasSliderParts(slider) && wantedSliderParts(slider).length > 0;\n}\n\n/**\n * The migration of a saved slider (board 9 Q13): its Swiper-drawn arrows, dots — and, when Autoplay is on, the pause\n * control WCAG 2.2.2 requires — become parts, in the place and the colours Swiper drew them. Idempotent: a slider\n * that already has parts is left alone. True when it changed.\n */\nexport function migrateSliderControls(slider: CompositeNode, create: CompositeNodeFactory): boolean {\n if (!needsSliderMigration(slider)) return false;\n const change = syncSliderParts(slider, create, legacyLookOf(slider));\n return change.added.length > 0;\n}\n\n/**\n * A switch flipped in the panel: on a slider still on Swiper-drawn controls, migrate it first (so its other controls\n * keep their look), then stamp / remove the parts the new switch calls for. ONE edit.\n */\nexport function setSliderFlag(slider: CompositeNode, flag: SliderFlag, on: boolean, create: CompositeNodeFactory): SliderPartsChange {\n const wasLegacy = !hasSliderParts(slider);\n const before = wantedSliderParts(slider);\n const migrated: CompositeNode[] = [];\n if (wasLegacy && before.length) {\n syncSliderParts(slider, create, legacyLookOf(slider)).added.forEach(p => migrated.push(p));\n }\n writeProp(slider, flag, on);\n const change = syncSliderParts(slider, create);\n return { added: [...migrated, ...change.added], removed: change.removed };\n}\n\n// ── accessibility vocabulary (both runtimes) ───────────────────────────────────────────────────────\n\nexport interface SliderWords {\n stop: string;\n start: string;\n prev: string;\n next: string;\n carousel: string;\n slide: string;\n /** `{{index}}` and `{{slidesLength}}`, Swiper's placeholders. */\n slideLabel: string;\n goTo: string;\n}\n\nexport const SLIDER_WORDS: Readonly<Record<'en' | 'he', SliderWords>> = {\n en: {\n stop: 'Stop automatic slide show', start: 'Start automatic slide show', prev: 'Previous slide', next: 'Next slide',\n carousel: 'carousel', slide: 'slide', slideLabel: '{{index}} of {{slidesLength}}', goTo: 'Go to slide {{index}}',\n },\n he: {\n stop: 'עצירת המצגת האוטומטית', start: 'הפעלת המצגת האוטומטית', prev: 'השקופית הקודמת', next: 'השקופית הבאה',\n carousel: 'קרוסלה', slide: 'שקופית', slideLabel: '{{index}} מתוך {{slidesLength}}', goTo: 'מעבר לשקופית {{index}}',\n },\n};\n\nexport function sliderWords(lang?: string | null): SliderWords {\n return (lang ?? '').toLowerCase().startsWith('he') ? SLIDER_WORDS.he : SLIDER_WORDS.en;\n}\n\n/** The wrapper's live region (APG): silent while the slides move on their own, polite otherwise. */\nexport function sliderLiveRegion(rotating: boolean): 'off' | 'polite' {\n return rotating ? 'off' : 'polite';\n}\n\n/**\n * The pause control's state (APG carousel): its NAME says what it will do (\"Stop automatic slide show\" while it\n * rotates, \"Start automatic slide show\" when stopped). An author who named the control keeps the name, and the\n * state is `aria-pressed` instead (pressed = stopped).\n */\nexport function sliderPauseAttributes(rotating: boolean, words: SliderWords = SLIDER_WORDS.en, authorName?: string | null): Record<string, string> {\n const name = (authorName ?? '').trim();\n return name\n ? { 'aria-label': name, 'aria-pressed': rotating ? 'false' : 'true' }\n : { 'aria-label': rotating ? words.stop : words.start };\n}\n\n/** The pause control's glyph: pause while it rotates, play when stopped. */\nexport function sliderPauseGlyph(rotating: boolean): string {\n return rotating ? SLIDER_PART_GLYPH[SliderRole.Pause] : SLIDER_PLAY_GLYPH;\n}\n\n// ── the testimonial carousel (board 6; generation-core `proof.testimonial-carousel`) ─────────────────\n\nexport interface CarouselQuote {\n quote: string;\n who: string;\n}\n\n/** Board 6's sample quotes — PLACEHOLDERS: testimonials are facts the studio gives, never invented. */\nexport const CAROUSEL_QUOTES: ReadonlyArray<CarouselQuote> = [\n { quote: 'A sample quote, two lines long, in the client’s own words.', who: '[Client name] · [Project, city]' },\n { quote: 'Testimonials are facts: replace these with words a client actually said.', who: '[Client name] · [Project, city]' },\n { quote: 'A third sample quote so the rotation has somewhere to go.', who: '[Client name] · [Project, city]' },\n];\n\nexport interface CarouselOptions {\n /** The carousel's accessible name (a `region` landmark). */\n name?: string;\n quotes?: ReadonlyArray<CarouselQuote>;\n}\n\n/** A quote card. The carousel's controls sit in a ROW above the slides and the dots below them (board 6), so the\n * card needs no room kept for an overlay. */\nconst QUOTE_SLIDE_BASE: Readonly<Record<string, string>> = {\n width: '100%', aspectRatio: 'auto', minHeight: 'auto', height: 'auto', display: 'flex', flexDirection: 'column', gap: '12px', padding: '32px 32px 32px 32px',\n};\n/** Board 6's carousel: the pause control, Previous and Next in one row above the slides (in flow — they read in the\n * page's direction), the dots under them. */\nconst ROW_CONTROL_BASE: Readonly<Record<string, string>> = { position: 'static', display: 'inline-flex', margin: '0px 4px 12px 4px' };\nconst ROW_DOTS_BASE: Readonly<Record<string, string>> = { position: 'static', margin: '12px 0px 0px 0px' };\nconst QUOTE_TEXT_BASE: Readonly<Record<string, string>> = { margin: ZERO, padding: ZERO, minHeight: 'auto', width: 'auto' };\n\n/**\n * The testimonial carousel (board 6): a named Slider, one quote per slide (each a `card`), rotating every 5s with its\n * control parts — the pause control first, Previous · Next, the dots. ONE recipe for the composer and the builder.\n */\nexport function buildCarouselRecipe(create: CompositeNodeFactory, options: CarouselOptions = {}): CompositeNode {\n const slider = makeCompositePart(create, { key: 'carousel', type: SLIDER_TYPE, props: {}, elementStyle: NO_ELEMENT_STYLE }, null, 'Carousel', { width: '100%' });\n for (const [name, value] of Object.entries({\n // Rewind: Previous and Next are always there to press (board 6) — neither greys out at an end.\n slidesPerView: 1, spaceBetween: 0, loop: 'rewind', enableNavigation: true, enablePagination: true, enableAutoplay: true, autoplayDelay: 5000,\n autoplayPauseOnMouseEnter: true, autoHeight: true, [SLIDER_NAME_TRAIT]: options.name ?? 'What clients say',\n })) writeProp(slider, name, value);\n slider.children = (options.quotes ?? CAROUSEL_QUOTES).map((q, i) => {\n const slide = makeCompositePart(create, { key: `slide-${i + 1}`, type: SLIDE_TYPE, props: {}, elementStyle: 'card' }, null, 'Slide', QUOTE_SLIDE_BASE);\n slide.children = [\n makeCompositePart(create, { key: `quote-${i + 1}`, type: 'Text', props: { content: q.quote, tag: 'p' }, elementStyle: 'lead' }, null, 'Quote', QUOTE_TEXT_BASE),\n makeCompositePart(create, { key: `who-${i + 1}`, type: 'Text', props: { content: q.who, tag: 'p' }, elementStyle: 'small' }, null, 'Client', QUOTE_TEXT_BASE),\n ];\n return slide;\n });\n syncSliderParts(slider, create);\n for (const part of slider.children ?? []) {\n if (part.role === SliderRole.Pagination) writeStyles(part, ROW_DOTS_BASE);\n else if (isSliderPart(part)) writeStyles(part, ROW_CONTROL_BASE);\n }\n return slider;\n}\n\n/** The slide a lightbox opens at for the clicked row (clamped to the slides there are). */\nexport function slideIndexForRow(rowIndex: number, slideCount: number): number {\n if (!Number.isFinite(rowIndex) || rowIndex < 0 || slideCount <= 0) return 0;\n return Math.min(Math.floor(rowIndex), slideCount - 1);\n}\n","import { AccordionRole, DisclosureRole } from './composite-kinds';\nimport { CardPart, CardRole } from './card';\nimport { SLIDER_TYPE, SliderRole } from './slider';\n\n/**\n * The structure every composite declares (composite-components plan §3a `RoleSpec`): where a role may\n * live and whether it is LOCKED (a structural part that cannot be deleted or moved out — a card always\n * has its content column and its title). Optional parts carry the Parts switch that re-adds them.\n * The builder's delete paths and its drop/paste rule ask `structureRefusal` — ONE answer for all of them.\n */\nexport interface CompositeRoleSpec {\n /** The role of the part's parent; null for a composite root. */\n readonly parent: string | null;\n /** The TYPE of the part's parent, for a part whose parent carries no role (a Slider's controls). */\n readonly parentType?: string;\n readonly locked?: boolean;\n /** May be deleted, but never moved out of its parent (a Slider's controls work only as its direct children). */\n readonly pinned?: boolean;\n readonly part?: CardPart;\n}\n\nexport const COMPOSITE_ROLE_SPECS: Readonly<Record<string, CompositeRoleSpec>> = {\n [CardRole.Card]: { parent: null },\n [CardRole.Media]: { parent: CardRole.Card, part: CardPart.Media },\n [CardRole.Badge]: { parent: null, part: CardPart.Badge },\n [CardRole.Content]: { parent: CardRole.Card, locked: true },\n [CardRole.Eyebrow]: { parent: CardRole.Content, part: CardPart.Eyebrow },\n [CardRole.Title]: { parent: CardRole.Content, locked: true },\n [CardRole.Text]: { parent: CardRole.Content, part: CardPart.Text },\n [CardRole.Actions]: { parent: CardRole.Content, part: CardPart.Actions },\n // CC2 — an item always keeps its header and its panel; the icon is Behaviour ▸ Icon's.\n [AccordionRole.Accordion]: { parent: null },\n [AccordionRole.Item]: { parent: AccordionRole.Accordion },\n [AccordionRole.Trigger]: { parent: AccordionRole.Item, locked: true },\n [AccordionRole.Panel]: { parent: AccordionRole.Item, locked: true },\n [AccordionRole.Icon]: { parent: AccordionRole.Trigger },\n // CC2.1 — a disclosure always keeps its toggle and its panel; the words and the icon are the author's.\n [DisclosureRole.Disclosure]: { parent: null },\n [DisclosureRole.Trigger]: { parent: DisclosureRole.Disclosure, locked: true },\n [DisclosureRole.Panel]: { parent: DisclosureRole.Disclosure, locked: true },\n [DisclosureRole.More]: { parent: DisclosureRole.Trigger },\n [DisclosureRole.Less]: { parent: DisclosureRole.Trigger },\n [DisclosureRole.Icon]: { parent: DisclosureRole.Trigger },\n // CC3 — a Slider's controls are its own direct children (Swiper is handed them). The pause control stays while\n // Autoplay is on (WCAG 2.2.2): the Autoplay switch removes it, never Delete. The arrows and the dots follow\n // their switches and may be deleted.\n [SliderRole.Pause]: { parent: null, parentType: SLIDER_TYPE, locked: true },\n [SliderRole.Prev]: { parent: null, parentType: SLIDER_TYPE, pinned: true },\n [SliderRole.Next]: { parent: null, parentType: SLIDER_TYPE, pinned: true },\n [SliderRole.Pagination]: { parent: null, parentType: SLIDER_TYPE, pinned: true },\n};\n\nexport enum StructureEdit {\n Delete = 'delete',\n /** A drop, paste or wrap that would put the node somewhere new. */\n Move = 'move',\n}\n\nexport enum StructureRefusal {\n /** A locked part cannot be deleted (the card's Content and Title). */\n LockedPart = 'locked-part',\n /** A locked part can only live directly inside its own parent role. */\n LockedPlacement = 'locked-placement',\n}\n\ninterface RoleLike { role?: string | null; type?: string }\n\n/**\n * Why the structure guard refuses `edit` on `node`, or null when it is allowed. `ancestors` (Move only) =\n * the new parent chain, root first, the direct parent last.\n */\nexport function structureRefusal(node: RoleLike | null | undefined, edit: StructureEdit, ancestors: ReadonlyArray<RoleLike> = []): StructureRefusal | null {\n const spec = node?.role ? COMPOSITE_ROLE_SPECS[node.role] : undefined;\n if (!spec?.locked && !spec?.pinned) return null;\n if (edit === StructureEdit.Delete) return spec.locked ? StructureRefusal.LockedPart : null;\n const parent = ancestors[ancestors.length - 1];\n const placed = spec.parentType ? parent?.type === spec.parentType : parent?.role === spec.parent;\n return placed ? null : StructureRefusal.LockedPlacement;\n}\n\n/** True when `node` is a locked part (shown with a lock and no delete in the layer tree). Deleting a whole\n * composite is always allowed — only its locked parts are refused. */\nexport function isLockedPart(node: RoleLike | null | undefined): boolean {\n return !!(node?.role && COMPOSITE_ROLE_SPECS[node.role]?.locked);\n}\n","import { sliderLiveRegion, sliderPauseAttributes, sliderPauseGlyph, SliderRole, SliderWords, sliderWords } from './slider';\n\n/**\n * The accessible carousel's RUNTIME (CC3, board 6; closes vectoriox/iox-ui#13) — DOM only, over a running Swiper,\n * ONE copy for the engine (both paths) and the admin's Preview. Swiper's A11y module gives the container\n * `aria-roledescription=\"carousel\"`, every slide `role=group` + \"slide\" + \"n of m\"; this adds what the APG\n * carousel needs on top:\n * - the PAUSE control (role `slider.pause`, rendered first): it stops rotation for good and starts it again; its\n * name says what it will do, its glyph swaps;\n * - rotation PAUSES while focus is anywhere inside (hover is Swiper's `pauseOnMouseEnter`) and resumes when it\n * leaves — unless the visitor pressed pause;\n * - the wrapper's live region is `off` while the slides move on their own and `polite` otherwise;\n * - slides that are not in view are `inert` (and hidden from assistive technology), so Tab never lands in one.\n * The builder's EDIT canvas never attaches it (no autoplay there, and a slide must stay clickable).\n */\n\n/** The parts of the Swiper instance this runtime reads — a real Swiper, or a stub in a spec. */\nexport interface CarouselSwiper {\n el: HTMLElement;\n wrapperEl: HTMLElement;\n slides: HTMLElement[];\n activeIndex: number;\n destroyed?: boolean;\n params?: { slidesPerView?: number | 'auto'; autoplay?: { pauseOnMouseEnter?: boolean } | boolean };\n autoplay?: { running: boolean; paused?: boolean; start(): void; stop(): void; pause(): void; resume(): void };\n on(event: string, handler: (...args: unknown[]) => void): void;\n off(event: string, handler: (...args: unknown[]) => void): void;\n}\n\nexport interface CarouselA11yOptions {\n words?: SliderWords;\n}\n\nconst SLIDE_VISIBLE = 'swiper-slide-visible';\nconst RUNTIME_KEY = '__ioxCarousel';\nconst ROTATION_EVENTS = 'autoplayStart autoplayStop autoplayPause autoplayResume';\nconst SLIDE_EVENTS = 'slideChange transitionEnd resize slidesLengthChange';\n\nconst AUTHOR_NAME_KEY = '__ioxAuthorName';\n\n/** The name the AUTHOR gave the pause control (its rendered `aria-label` before this runtime first relabelled it). */\nfunction authorNameOf(el: HTMLElement | null): string | null {\n if (!el) return null;\n const host = el as unknown as Record<string, unknown>;\n if (host[AUTHOR_NAME_KEY] === undefined) host[AUTHOR_NAME_KEY] = el.getAttribute('aria-label') ?? '';\n return (host[AUTHOR_NAME_KEY] as string) || null;\n}\n\n/** The part of `role` that belongs to THIS slider (never one of a slider nested in a slide). */\nexport function sliderPartElement(sliderEl: Element, role: SliderRole): HTMLElement | null {\n const cls = `iox-role-${role.replace('.', '-')}`;\n for (const el of Array.from(sliderEl.querySelectorAll<HTMLElement>(`.${cls}`))) {\n if (el.closest('.swiper') === sliderEl && !el.closest('.swiper-wrapper')) return el;\n }\n return null;\n}\n\nexport class CarouselA11y {\n /** The visitor pressed pause: rotation stays stopped until they press it again. */\n private stoppedByVisitor = false;\n private focusInside = false;\n /** The pointer is over the carousel and Swiper holds rotation for it (`pauseOnMouseEnter`). */\n private hovering = false;\n private readonly cleanups: Array<() => void> = [];\n private readonly words: SliderWords;\n private readonly pause: HTMLElement | null;\n private readonly authorName: string | null;\n\n constructor(private readonly swiper: CarouselSwiper, options: CarouselA11yOptions = {}) {\n const el = swiper.el;\n this.words = options.words ?? sliderWords(el.ownerDocument?.documentElement?.getAttribute('lang'));\n this.pause = sliderPartElement(el, SliderRole.Pause);\n this.authorName = authorNameOf(this.pause);\n this.listen(el, 'focusin', () => this.onFocusIn());\n this.listen(el, 'pointerenter', () => { this.hovering = this.hoverPauses; this.sync(); });\n this.listen(el, 'pointerleave', () => { this.hovering = false; this.sync(); });\n this.listen(el, 'focusout', (e) => this.onFocusOut(e as FocusEvent));\n if (this.pause) this.listen(this.pause, 'click', (e) => { e.preventDefault(); this.togglePause(); });\n const sync = () => this.sync();\n swiper.on(ROTATION_EVENTS, sync);\n swiper.on(SLIDE_EVENTS, sync);\n this.cleanups.push(() => { swiper.off(ROTATION_EVENTS, sync); swiper.off(SLIDE_EVENTS, sync); });\n (el as unknown as Record<string, unknown>)[RUNTIME_KEY] = this;\n this.sync();\n }\n\n /** True while the slides move on their own: autoplay runs and nothing holds it — not focus inside, not the\n * pointer over it. (Swiper's own `paused` also flips during every transition, so it is not read here.) */\n get rotating(): boolean {\n return !!this.swiper.autoplay?.running && !this.focusInside && !this.hovering;\n }\n\n private get hoverPauses(): boolean {\n const autoplay = this.swiper.params?.autoplay;\n return typeof autoplay === 'object' && !!autoplay?.pauseOnMouseEnter;\n }\n\n /** The pause control: stop rotation for good, or start it again. */\n togglePause(): void {\n const a = this.swiper.autoplay;\n if (!a) return;\n if (a.running) {\n this.stoppedByVisitor = true;\n a.stop();\n } else {\n this.stoppedByVisitor = false;\n a.start();\n // Focus is on the pause control itself — inside the carousel: the rotation it just started waits until\n // focus leaves (APG), but the control already reads \"stop\".\n if (this.focusInside) a.pause();\n }\n this.sync();\n }\n\n destroy(): void {\n this.cleanups.splice(0).forEach(fn => fn());\n delete (this.swiper.el as unknown as Record<string, unknown>)[RUNTIME_KEY];\n }\n\n private listen(target: EventTarget, type: string, fn: (e: Event) => void): void {\n target.addEventListener(type, fn);\n this.cleanups.push(() => target.removeEventListener(type, fn));\n }\n\n private onFocusIn(): void {\n this.focusInside = true;\n if (this.swiper.autoplay?.running && !this.swiper.autoplay.paused) this.swiper.autoplay.pause();\n this.sync();\n }\n\n private onFocusOut(e: FocusEvent): void {\n const next = e.relatedTarget as Node | null;\n if (next && this.swiper.el.contains(next)) return;\n this.focusInside = false;\n if (!this.stoppedByVisitor && this.swiper.autoplay?.running && this.swiper.autoplay.paused) this.swiper.autoplay.resume();\n this.sync();\n }\n\n /** Re-state the carousel: the live region, the pause control, the slides out of view. */\n sync(): void {\n if (this.swiper.destroyed) return;\n const rotating = this.rotating;\n this.swiper.wrapperEl?.setAttribute('aria-live', sliderLiveRegion(rotating));\n if (this.pause) {\n const running = !!this.swiper.autoplay?.running;\n const attrs = sliderPauseAttributes(running, this.words, this.authorName);\n for (const [name, value] of Object.entries(attrs)) this.pause.setAttribute(name, value);\n if (!('aria-pressed' in attrs)) this.pause.removeAttribute('aria-pressed');\n const icon = this.pause.querySelector('i');\n if (icon) icon.className = `${sliderPauseGlyph(running)} ${Array.from(icon.classList).filter(c => !c.startsWith('ph')).join(' ')}`.trim();\n }\n this.syncHiddenSlides();\n }\n\n private syncHiddenSlides(): void {\n const slides = this.swiper.slides ?? [];\n const anyVisibleMarked = slides.some(s => s.classList?.contains(SLIDE_VISIBLE));\n slides.forEach((slide, i) => {\n const visible = anyVisibleMarked ? slide.classList.contains(SLIDE_VISIBLE) : i === this.swiper.activeIndex;\n if (visible) {\n slide.removeAttribute('inert');\n slide.removeAttribute('aria-hidden');\n } else {\n slide.setAttribute('inert', '');\n slide.setAttribute('aria-hidden', 'true');\n }\n });\n }\n}\n\n/** The carousel runtime attached to a slider element, if any. */\nexport function carouselOf(el: Element | null | undefined): CarouselA11y | null {\n return ((el as unknown as Record<string, unknown> | null)?.[RUNTIME_KEY] as CarouselA11y | undefined) ?? null;\n}\n\n/** Attach once per Swiper (a re-init gets a fresh runtime). */\nexport function attachCarouselA11y(swiper: CarouselSwiper, options: CarouselA11yOptions = {}): CarouselA11y {\n carouselOf(swiper.el)?.destroy();\n return new CarouselA11y(swiper, options);\n}\n","import { setColorScheme } from '@vectoriox/iox-ui/design-core';\n\nimport { CompositeNode, CompositeNodeFactory, makeCompositePart, NO_ELEMENT_STYLE, readProp, writeProp, writeStyles } from './composite-node';\nimport { buildSliderPart, SLIDE_TYPE, SLIDER_TYPE, SliderRole } from './slider';\n\n/**\n * THE LIGHTBOX (CC3 — complex-components plan §7d, board 6). Not a component: a Dialog holding a Slider bound to the\n * SAME source as the grid of thumbnails. The one new thing is `openDialog`'s \"Open at the clicked item\"\n * (`slideTo: 'row'`): a thumbnail in a repeater row opens the lightbox at ITS slide.\n *\n * Dialog `dialog` · centre · full viewport · Inverse scheme \"Lightbox\" (a free-standing Dialog: board A4)\n * ├─ ButtonBlock `button-ghost` \"Close\" › Icon × click → closeDialog\n * └─ SliderContainer one slide in view · keyboard · the source's rows\n * ├─ Previous · Next (slider.prev / slider.next, button-secondary) hidden on a phone (swipe)\n * ├─ SliderSlide › Image `media` (contain, keeps its alt) + Text `small` caption\n * └─ Pagination (slider.pagination) — the counter \"3 / 6\"\n *\n * Keyboard ← → are the Slider's Keyboard module; Esc and the focus trap are the `<dialog>`'s; focus returns to the\n * thumbnail that opened it (the dialog opener's own rule).\n */\n\nexport const SLIDE_TO_ROW = 'row';\n/** The attribute a renderer writes on every repeated row (the context-state provenance, both engine paths, the canvas). */\nexport const ROW_INDEX_ATTRIBUTE = 'data-iox-row-idx';\nexport const LIGHTBOX_LABEL = 'Lightbox';\nconst DIALOG = 'Dialog';\nconst REPEATER = 'Repeater';\nconst SOURCE = 'source';\nconst SOURCE_PATH = 'sourcePath';\n\nexport interface LightboxOptions {\n /** The list the slides come from (the grid's own source). Empty = three manual slides. */\n source?: string;\n sourcePath?: string;\n /** The row field each slide's image and caption read (`item` = the row itself, a bare URL). */\n imageField?: string;\n captionField?: string;\n /** The image's alt binding; '' = decorative (a bare URL row has no words of its own). */\n altField?: string;\n}\n\nconst ZERO = '0px 0px 0px 0px';\nconst DIALOG_BASE: Readonly<Record<string, string>> = {\n width: '100vw', maxWidth: '100vw', height: '100dvh', maxHeight: '100dvh', borderRadius: '0px', padding: '18px 18px 18px 18px',\n display: 'flex', flexDirection: 'column', gap: '0px',\n};\n/** The top row (board 6): the counter at its start, Close at its end — Close sits above the slider, which rises into\n * the row so its counter shares it. */\nconst CLOSE_BASE: Readonly<Record<string, string>> = {\n display: 'flex', alignItems: 'center', justifyContent: 'center', width: '44px', height: '44px', minWidth: '44px',\n padding: ZERO, margin: ZERO, borderRadius: '999px', alignSelf: 'flex-end', flexShrink: '0', position: 'relative', zIndex: '20',\n};\nconst SLIDER_BASE: Readonly<Record<string, string>> = { width: '100%', height: '100%', minHeight: '0px', flexGrow: '1', margin: '-44px 0px 0px 0px' };\nconst SLIDE_BASE: Readonly<Record<string, string>> = {\n width: '100%', height: '100%', aspectRatio: 'auto', display: 'flex', flexDirection: 'column', alignItems: 'center',\n justifyContent: 'center', gap: '12px', padding: '56px 64px 16px 64px',\n};\nconst IMAGE_BASE: Readonly<Record<string, string>> = { width: '100%', height: 'auto', maxHeight: '72dvh', minHeight: '0px', objectFit: 'contain', aspectRatio: '4 / 3', flexShrink: '1' };\nconst CAPTION_BASE: Readonly<Record<string, string>> = { textAlign: 'center', margin: ZERO, padding: ZERO, minHeight: 'auto', width: 'auto' };\n/** The counter \"3 / 6\" sits at the START of the top row, Close at its end (board 6). */\nconst COUNTER_BASE: Readonly<Record<string, string>> = { color: 'var(--iox-text-muted)', top: '12px', alignItems: 'flex-start', justifyContent: 'flex-start' };\n/** On a phone the arrows give way to a swipe (board 6, \"the arrows hide on touch-only widths\"). */\nexport const LIGHTBOX_ARROWS_HIDE_AT = 'mobile';\n\ninterface WithInteractions { interactions?: unknown[] }\n\n/** A click on `node` runs one instant action on `target`. */\nfunction onClick(node: CompositeNode, type: string, target: string, params?: Record<string, unknown>): void {\n (node as WithInteractions).interactions = [{\n id: `${node.id ?? 'node'}-click`, trigger: 'click',\n actions: [{ type, target, duration: 0, delay: 0, easing: 'ease', ...(params ? { params } : {}) }],\n }];\n}\n\n/** A binding of `prop` to the row field `field` of `source` (`item` = the row itself). */\nfunction bindRow(node: CompositeNode, prop: string, source: string, field: string): void {\n const bindings = ((node as { bindings?: unknown[] }).bindings ?? []).filter((b) => (b as { prop?: string }).prop !== prop);\n bindings.push({ prop, source, path: field === 'item' ? '' : field });\n (node as { bindings?: unknown[] }).bindings = bindings;\n}\n\nfunction buildSlide(create: CompositeNodeFactory, key: string, options: LightboxOptions, rowAlias: string | null): CompositeNode {\n const slide = makeCompositePart(create, { key, type: SLIDE_TYPE, props: {}, elementStyle: NO_ELEMENT_STYLE }, null, 'Slide', SLIDE_BASE);\n const image = makeCompositePart(create, { key: `${key}-image`, type: 'Image', props: { src: '', alt: '' }, elementStyle: 'media' }, null, 'Image', IMAGE_BASE);\n const caption = makeCompositePart(create, { key: `${key}-caption`, type: 'Text', props: { content: 'Caption', tag: 'p' }, elementStyle: 'small' }, null, 'Caption', CAPTION_BASE);\n if (rowAlias) {\n bindRow(image, 'src', rowAlias, options.imageField ?? 'item');\n if (options.altField) bindRow(image, 'alt', rowAlias, options.altField);\n if (options.captionField) bindRow(caption, 'content', rowAlias, options.captionField);\n }\n slide.children = options.captionField || !rowAlias ? [image, caption] : [image];\n return slide;\n}\n\n/** A fresh lightbox: the Dialog, its Close part and the Slider (bound to `source`, or three manual slides). */\nexport function buildLightboxRecipe(create: CompositeNodeFactory, options: LightboxOptions = {}): CompositeNode {\n const dialog = makeCompositePart(create, { key: 'lightbox', type: DIALOG, props: {}, elementStyle: 'dialog' }, null, LIGHTBOX_LABEL, DIALOG_BASE);\n writeProp(dialog, 'placement', 'center');\n writeProp(dialog, 'closeOnBackdrop', true);\n writeProp(dialog, 'showCloseButton', false);\n writeProp(dialog, 'ariaLabel', 'Gallery');\n setColorScheme(dialog, 'inverse');\n\n const close = makeCompositePart(create, { key: 'close', type: 'ButtonBlock', props: { tag: 'button', type: 'button', ariaLabel: 'Close' }, elementStyle: 'button-ghost' }, null, 'Close', CLOSE_BASE);\n close.children = [makeCompositePart(create, { key: 'close-icon', type: 'Icon', props: { iconClass: 'ph ph-x' }, elementStyle: 'icon' }, null, 'Icon', { fontSize: '22px', color: 'inherit' })];\n onClick(close, 'closeDialog', dialog.id ?? '');\n\n const slider = makeCompositePart(create, { key: 'slider', type: SLIDER_TYPE, props: {}, elementStyle: NO_ELEMENT_STYLE }, null, 'Slider', SLIDER_BASE);\n for (const [name, value] of Object.entries({\n slidesPerView: 1, spaceBetween: 0, loop: 'off', enableNavigation: true, enablePagination: true, paginationType: 'fraction',\n enableKeyboard: true, ariaLabel: 'Gallery', limit: 50,\n })) writeProp(slider, name, value);\n const rowAlias = options.source ? lastSegment(options.sourcePath) || options.source : null;\n if (options.source) {\n writeProp(slider, SOURCE, options.source);\n if (options.sourcePath) writeProp(slider, SOURCE_PATH, options.sourcePath);\n }\n const prev = buildSliderPart(create, SliderRole.Prev);\n const next = buildSliderPart(create, SliderRole.Next);\n for (const arrow of [prev, next]) {\n const layers = { ...(arrow.responsive ?? {}) };\n layers[LIGHTBOX_ARROWS_HIDE_AT] = { styleProps: { display: 'none' } };\n arrow.responsive = layers;\n }\n const counter = buildSliderPart(create, SliderRole.Pagination);\n counter.label = 'Counter';\n writeStyles(counter, COUNTER_BASE);\n const slides = rowAlias ? [buildSlide(create, 'slide', options, rowAlias)] : [1, 2, 3].map(n => buildSlide(create, `slide-${n}`, options, null));\n slider.children = [prev, next, ...slides, counter];\n dialog.children = [close, slider];\n return dialog;\n}\n\nconst lastSegment = (path: string | undefined): string => (path ? String(path).split('.').filter(Boolean).pop() ?? '' : '');\n\n// ── \"Open at the clicked item\" ─────────────────────────────────────────────────────────────────────\n\nexport interface RepeatSource {\n source: string;\n path: string;\n}\n\n/** What a Repeater (its `source` binding) or a bound Slider (its `source` / `sourcePath` traits) repeats over. */\nexport function repeatSourceOf(node: CompositeNode | null | undefined): RepeatSource | null {\n if (!node || (node.type !== REPEATER && node.type !== SLIDER_TYPE)) return null;\n const binding = ((node as { bindings?: Array<{ prop?: string; source?: string; path?: string }> }).bindings ?? []).find(b => b?.prop === SOURCE);\n if (binding?.source) return { source: binding.source, path: binding.path ?? '' };\n const source = readProp(node, SOURCE);\n if (typeof source !== 'string' || !source) return null;\n const path = readProp(node, SOURCE_PATH);\n return { source, path: typeof path === 'string' ? path : '' };\n}\n\nexport function sameRepeatSource(a: RepeatSource | null, b: RepeatSource | null): boolean {\n return !!a && !!b && a.source === b.source && (a.path ?? '') === (b.path ?? '');\n}\n\n/** The Slider a lightbox Dialog holds (the first one, depth first), or null. */\nexport function lightboxSliderOf(dialog: CompositeNode | null | undefined): CompositeNode | null {\n for (const child of dialog?.children ?? []) {\n if (child.type === SLIDER_TYPE) return child;\n const below = lightboxSliderOf(child);\n if (below) return below;\n }\n return null;\n}\n\n/** The repeated rows the element is in: the nearest Repeater or bound Slider among its ancestors (`path` = root → the\n * element, inclusive). */\nexport function rowSourceOf(path: ReadonlyArray<CompositeNode>): RepeatSource | null {\n for (let i = path.length - 2; i >= 0; i--) {\n const source = repeatSourceOf(path[i]);\n if (source) return source;\n }\n return null;\n}\n\n/**\n * Interactions ▸ openDialog ▸ \"Open at the clicked item\" is offered only when it can work (board 9): the clicked\n * element sits in a repeater row AND the target Dialog holds a Slider bound to the same source.\n */\nexport function canOpenAtClickedItem(ownerPath: ReadonlyArray<CompositeNode>, dialog: CompositeNode | null | undefined): boolean {\n if (!dialog || dialog.type !== DIALOG) return false;\n return sameRepeatSource(rowSourceOf(ownerPath), repeatSourceOf(lightboxSliderOf(dialog)));\n}\n\n/** The repeated row an element sits in (its row index), 0 when it is in none (the canvas' template row). */\nexport function rowIndexOf(el: Element | null | undefined): number {\n const row = el?.closest?.(`[${ROW_INDEX_ATTRIBUTE}]`);\n const index = Number(row?.getAttribute(ROW_INDEX_ATTRIBUTE));\n return Number.isInteger(index) && index >= 0 ? index : 0;\n}\n","/**\n * @vectoriox/iox-ui/composite-core — composites built from the builder's own parts (composite-components\n * plan §3a). FRAMEWORK-FREE: the builder, the SSR engine and iox-cms (generation-core's composer, the site\n * build) read the same recipes, roles and structure rules. Card v2 + Badge / Chip (T23 / T25) are the\n * first; the Accordion (CC2) adds the first composite RUNTIME (accordion-runtime.ts — DOM only, no\n * framework), which the Disclosure (CC2.1) runs too — a one-item accordion whose root is its item; Tabs join with\n * their own phase.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './composite-node';\nexport * from './composite-kinds';\nexport * from './accordion';\nexport * from './accordion-runtime';\nexport * from './disclosure';\nexport * from './badge';\nexport * from './card';\nexport * from './structure';\nexport * from './slider';\nexport * from './slider-runtime';\nexport * from './lightbox';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Type","Style","ZERO_BOX","LINK_TYPE","PART_BASE","make","ROW_INDEX_ATTRIBUTE","IMAGE_BASE","ZERO"],"mappings":";;A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