@vectoriox/iox-ui 5.40.0 → 5.41.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 (31) hide show
  1. package/composite-core/index.d.ts +210 -12
  2. package/design-core/index.d.ts +694 -17
  3. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +4 -3
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +535 -121
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-design-core.mjs +843 -45
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +801 -17
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui.mjs +3945 -3914
  12. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  13. package/generation-core/index.d.ts +563 -4
  14. package/index.d.ts +22 -1
  15. package/package.json +1 -1
  16. package/src/actions-core/element-actions.ts +4 -3
  17. package/src/composite-core/accordion.ts +1 -0
  18. package/src/composite-core/composite-kinds.ts +42 -6
  19. package/src/composite-core/exclusive-runtime.ts +60 -10
  20. package/src/composite-core/exclusive.ts +64 -0
  21. package/src/composite-core/public-api.ts +5 -2
  22. package/src/composite-core/segmented.ts +349 -0
  23. package/src/composite-core/structure.ts +6 -1
  24. package/src/composite-core/tabs.ts +6 -3
  25. package/src/design-core/contrast-audit.ts +8 -3
  26. package/src/design-core/flavor-spec.generated.ts +832 -41
  27. package/src/generation-core/compose-site.ts +169 -12
  28. package/src/generation-core/node-baselines.generated.ts +49 -0
  29. package/src/generation-core/patterns.ts +20 -0
  30. package/src/generation-core/site-spec.generated.ts +595 -0
  31. package/styles/iox-design.css +19 -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/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/tabs.ts","../../../projects/iox-ui/src/composite-core/exclusive-runtime.ts","../../../projects/iox-ui/src/composite-core/composite-runtime.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 composites' kinds and roles. Two families:\n * - OPEN/CLOSE (CC2 Accordion, CC2.1 Disclosure — composite plan T9 / T21): a Disclosure is a one-item accordion whose\n * ROOT is its item, so both run the same state machine, attribute planners and runtime (`accordion-runtime.ts`);\n * - EXCLUSIVE (CC4 Tabs — composite T17; the Segmented control joins in CC4b): exactly one item is on, a trigger and\n * its panel paired by `itemKey` (`tabs.ts`, `exclusive-runtime.ts`).\n * Every consumer that treats \"an item\", \"a trigger\" or \"a panel\" alike asks these predicates, never a role literal.\n */\n\nexport enum CompositeKind {\n Accordion = 'accordion',\n Disclosure = 'disclosure',\n Tabs = 'tabs',\n}\n\n/** The kinds the open/close runtime runs (`AccordionRuntime`). */\nexport type ToggleCompositeKind = CompositeKind.Accordion | CompositeKind.Disclosure;\n/** The kinds the exclusive runtime runs (`ExclusiveRuntime`): one item on at a time, always one. */\nexport type ExclusiveCompositeKind = CompositeKind.Tabs;\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\n/**\n * TABS (CC4a — composite T17). The tab LIST holds the triggers, the PANELS holder holds the panels; a tab and its panel\n * share an `itemKey` (never their index — moving a tab keeps its own panel). From content (R3) the list and the panels\n * holder are both Repeaters over the SAME source, one row giving its tab AND its panel (paired by the row's id).\n */\nexport enum TabsRole {\n Tabs = 'tabs',\n List = 'tabs.list',\n Trigger = 'tabs.trigger',\n Panels = 'tabs.panels',\n Panel = 'tabs.panel',\n}\n\ninterface RoleLike { role?: string | null }\n\n/** The roles each open/close 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<ToggleCompositeKind, 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\n/** The roles each EXCLUSIVE kind plays: its root, the holder of its triggers, its triggers, and — when its items show\n * a panel (Tabs; a Segmented control has none) — the holder of its panels and the panels. */\nexport interface ExclusiveKindRoles {\n root: string;\n list: string;\n trigger: string;\n panels: string | null;\n panel: string | null;\n}\n\nexport const EXCLUSIVE_KIND_ROLES: Readonly<Record<ExclusiveCompositeKind, ExclusiveKindRoles>> = {\n [CompositeKind.Tabs]: { root: TabsRole.Tabs, list: TabsRole.List, trigger: TabsRole.Trigger, panels: TabsRole.Panels, panel: TabsRole.Panel },\n};\n\nconst KINDS = Object.values(CompositeKind);\nconst TOGGLE_KINDS = Object.keys(COMPOSITE_KIND_ROLES) as ToggleCompositeKind[];\nconst EXCLUSIVE_KINDS = Object.keys(EXCLUSIVE_KIND_ROLES) as ExclusiveCompositeKind[];\nconst rolesOf = (pick: keyof CompositeKindRoles): ReadonlySet<string> => new Set(TOGGLE_KINDS.map(k => COMPOSITE_KIND_ROLES[k][pick]));\nconst exclusiveRolesOf = (pick: keyof ExclusiveKindRoles): ReadonlySet<string> =>\n new Set(EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r): r is string => !!r));\nconst ROOT_ROLES = rolesOf('root');\nconst ITEM_ROLES = rolesOf('item');\nconst TRIGGER_ROLES = rolesOf('trigger');\nconst PANEL_ROLES = rolesOf('panel');\nconst EXCLUSIVE_ROOT_ROLES = exclusiveRolesOf('root');\nconst EXCLUSIVE_LIST_ROLES = exclusiveRolesOf('list');\nconst EXCLUSIVE_TRIGGER_ROLES = exclusiveRolesOf('trigger');\nconst EXCLUSIVE_PANELS_ROLES = exclusiveRolesOf('panels');\nconst EXCLUSIVE_PANEL_ROLES = exclusiveRolesOf('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/** True for a kind the open/close runtime runs. */\nexport function isToggleKind(kind: CompositeKind | null | undefined): kind is ToggleCompositeKind {\n return !!kind && (TOGGLE_KINDS as string[]).includes(kind);\n}\n\n/** True for a kind the exclusive runtime runs. */\nexport function isExclusiveKind(kind: CompositeKind | null | undefined): kind is ExclusiveCompositeKind {\n return !!kind && (EXCLUSIVE_KINDS as string[]).includes(kind);\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\n// ── the exclusive family (CC4a Tabs) ───────────────────────────────────────────────────────────\n\n/** A root that runs the exclusive runtime (Tabs). */\nexport function isExclusiveRoot(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_ROOT_ROLES.has(node.role);\n}\n\n/** The holder of an exclusive composite's triggers (a tab list): it takes only triggers. */\nexport function isExclusiveList(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_LIST_ROLES.has(node.role);\n}\n\n/** One of an exclusive composite's triggers (a tab): pressing it turns its item on. */\nexport function isExclusiveTrigger(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_TRIGGER_ROLES.has(node.role);\n}\n\n/** The holder of an exclusive composite's panels: it takes only panels. */\nexport function isExclusivePanels(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_PANELS_ROLES.has(node.role);\n}\n\n/** One of an exclusive composite's panels (a tab panel): shown only while its item is on. */\nexport function isExclusivePanel(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_PANEL_ROLES.has(node.role);\n}\n\n/** True for a trigger or a panel — a part that IS one item of an exclusive composite (it carries the `itemKey`). */\nexport function isExclusiveItemPart(node: RoleLike | null | undefined): boolean {\n return isExclusiveTrigger(node) || isExclusivePanel(node);\n}\n\n/** True for any part of a Tabs (its root included). */\nexport function isTabsPart(node: RoleLike | null | undefined): boolean {\n return compositeKindOfRole(node?.role) === CompositeKind.Tabs;\n}\n\n/** A root of either family — anything that runs a composite runtime. */\nexport function isAnyCompositeRoot(node: RoleLike | null | undefined): boolean {\n return isCompositeRoot(node) || isExclusiveRoot(node);\n}\n\n/** The exclusive root a node belongs to (the node itself when it is one), or null. `path` = its ancestors, root first. */\nexport function exclusiveRootOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isExclusiveRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isExclusiveRoot(path[i])) return path[i];\n return null;\n}\n\n/** The trigger or panel a node sits in (itself when it is one) inside an exclusive composite, or null. A nested\n * exclusive root ends the walk. */\nexport function exclusiveItemPartOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isExclusiveItemPart(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (isExclusiveItemPart(path[i])) return path[i];\n if (isExclusiveRoot(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, isToggleKind,\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 const kind = compositeKindOfRole(node.role);\n return COMPOSITE_KIND_ROLES[isToggleKind(kind) ? kind : 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 [CompositeKind.Tabs]: 'iox-tab',\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 { COMPOSITE_KIND_ROLES, CompositeKind, ToggleCompositeKind } 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.keys(COMPOSITE_KIND_ROLES) as ToggleCompositeKind[]).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. */\nexport function accordionRootOfItem(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/** 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, TabsRole } 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 /** The only roles that may be dropped INTO this part (a tab list takes tabs, a panels holder takes panels). */\n readonly accepts?: ReadonlyArray<string>;\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 // CC4a — a Tabs always keeps its tab list and its panels holder; a tab lives in the list and a panel in the\n // holder (each may be deleted — with its pair — but never moved out); the list takes only tabs, the holder only\n // panels, and a panel takes anything.\n [TabsRole.Tabs]: { parent: null },\n [TabsRole.List]: { parent: TabsRole.Tabs, locked: true, accepts: [TabsRole.Trigger] },\n [TabsRole.Panels]: { parent: TabsRole.Tabs, locked: true, accepts: [TabsRole.Panel] },\n [TabsRole.Trigger]: { parent: TabsRole.List, pinned: true },\n [TabsRole.Panel]: { parent: TabsRole.Panels, pinned: true },\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 /** The new parent takes only certain roles (a tab list takes only tabs, CC4a). */\n NotAccepted = 'not-accepted',\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 const parent = ancestors[ancestors.length - 1];\n if (edit === StructureEdit.Move && acceptsRefusal(node, parent)) return StructureRefusal.NotAccepted;\n if (!spec?.locked && !spec?.pinned) return null;\n if (edit === StructureEdit.Delete) return spec.locked ? StructureRefusal.LockedPart : null;\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\n/** Why `parent` refuses `node` as a child (it takes only certain roles), or null. */\nexport function acceptsRefusal(node: RoleLike | null | undefined, parent: RoleLike | null | undefined): StructureRefusal | null {\n const accepts = parent?.role ? COMPOSITE_ROLE_SPECS[parent.role]?.accepts : undefined;\n if (!accepts) return null;\n return node?.role && accepts.includes(node.role) ? null : StructureRefusal.NotAccepted;\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","import { elementStyleById } from '@vectoriox/iox-ui/design-core';\n\nimport {\n AccordionDomIds, accordionDomIds, AccordionKeyAction, CompositeBinding, compositeScopeId, ContentFieldLike, COMPOSITE_ATTRIBUTE, DomAttributes,\n ITEM_KEY_ATTRIBUTE, ITEM_OPEN_STATE, ON_ATTRIBUTE, rowItemKey, SCOPE_ATTRIBUTE,\n} from './accordion';\nimport { CARD_STACK_BREAKPOINT } from './card';\nimport { CompositeKind, TabsRole } from './composite-kinds';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, makeCompositePart, readProp, walkComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * TABS (CC4a — composite K2 T17–T20; complex-components boards 3 and 9, APPROVED 2026-10-20). Not a component: a\n * recipe of ordinary nodes, each part carrying a role, so every tab and every panel is selectable on the canvas, in\n * the layer tree and the breadcrumb, and wears its own element style (R2).\n *\n * Container `box` role tabs traits activateOn · orientation · ariaLabel (the list's name)\n * ├─ Container `tab-list` role tabs.list → role=tablist (locked) — or a Repeater (From content)\n * │ └─ ButtonBlock `tab` ×3 role tabs.trigger itemKey k1… → <button role=tab> › Text `button-label`\n * └─ Container `box` role tabs.panels (locked) — or a Repeater (From content)\n * └─ Container `box` ×3 role tabs.panel the SAME itemKey as its tab → role=tabpanel, hidden while off\n * ├─ Image `media` 4 / 3\n * └─ Text `body`\n *\n * A tab and its panel are a PAIR by `itemKey` — never by index, so a tab moved to the end still shows its own panel.\n * The behaviour is BUILT IN (composite plan D1 = B): exactly one item is on (`exclusive`), the APG tabs pattern with\n * AUTOMATIC activation (arrows move focus and activate, roving tabindex) — one runtime (`exclusive-runtime.ts`) on the\n * builder canvas and both engine paths, from the attribute planners below.\n */\n\nexport enum TabsBehaviourTrait {\n /** Which pointer gesture turns a tab on: a click (always) or also a hover. */\n ActivateOn = 'activateOn',\n /** The tab list across the top, or beside the panels. */\n Orientation = 'orientation',\n /** The tab list's accessible name (`aria-label` on the role=tablist element) — the root's, edited in Accessibility. */\n Label = 'ariaLabel',\n}\n\nexport enum TabsActivateOn {\n Click = 'click',\n Hover = 'hover',\n}\n\nexport enum TabsOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\nexport const TABS_ACTIVATE_ONS: ReadonlyArray<TabsActivateOn> = [TabsActivateOn.Click, TabsActivateOn.Hover];\nexport const TABS_ORIENTATIONS: ReadonlyArray<TabsOrientation> = [TabsOrientation.Horizontal, TabsOrientation.Vertical];\n\n/** Tabs from content default to six rows: more tabs do not fit a row (board 9 Q13). */\nexport const TABS_CONTENT_LIMIT = 6;\n\n/** The breakpoint whose layer stacks a VERTICAL tabs (the list above the panels) and a panel's picture above its words. */\nexport const TABS_STACK_BREAKPOINT = CARD_STACK_BREAKPOINT;\n\nexport interface TabWords {\n label: string;\n text: string;\n}\n\n/** The words a fresh Tabs starts with — generic, the author's to replace (Card v2.1: never invented facts). */\nexport const TABS_WORDS: ReadonlyArray<TabWords> = [\n { label: 'First tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n { label: 'Second tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n { label: 'Third tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n];\nexport const TABS_NEW_TAB_WORDS: Readonly<TabWords> = { label: 'New tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' };\n\nenum Type {\n Container = 'Container',\n ButtonBlock = 'ButtonBlock',\n Text = 'Text',\n Image = 'Image',\n Repeater = 'Repeater',\n}\n\nenum Style {\n Root = 'box',\n List = 'tab-list',\n Tab = 'tab',\n Label = 'button-label',\n Panels = 'box',\n Panel = 'box',\n Media = 'media',\n Body = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\n/** The list's hairline, as its element style writes it — read from the contract, never retyped. */\nconst LIST_EDGE = String(elementStyleById(Style.List)?.base['borderWidth'] ?? ZERO_BOX);\n\n/** What each part holds — layout only; its LOOK is its element style. The list WRAPS at narrow widths (board 3). */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n [TabsRole.Tabs]: { display: 'flex', width: '100%', minHeight: 'auto', height: 'auto' },\n [TabsRole.List]: { display: 'flex', gap: '4px', minHeight: 'auto', height: 'auto' },\n [TabsRole.Trigger]: { width: 'auto', minHeight: 'auto', height: 'auto', cursor: 'pointer' },\n [TabsRole.Panels]: { display: 'block', width: '100%', minWidth: '0px', minHeight: 'auto', height: 'auto' },\n // Board 3: a panel is any nodes at all — the recipe's is a picture beside its words.\n [TabsRole.Panel]: { display: 'grid', gridTemplateColumns: '1fr 1.2fr', gap: '24px', alignItems: 'center', width: '100%', minHeight: 'auto', height: 'auto' },\n};\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%', aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' };\nconst BODY_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n/** On a phone a panel's picture sits above its words. */\nconst PANEL_STACK: Readonly<Record<string, string>> = { gridTemplateColumns: '1fr' };\n\n/**\n * Behaviour ▸ Orientation is a PRESET over the root's and the list's layout (the Card layout precedent): every\n * orientation writes the same keys, so switching is clean and detection exact. Vertical puts the list beside the\n * panels (a column, no divider — the active tab keeps its mark) and, on a phone, stacks it above them.\n */\ninterface OrientationLayout {\n root: Readonly<Record<string, string>>;\n list: Readonly<Record<string, string>>;\n /** The phone layer (TABS_STACK_BREAKPOINT); Horizontal clears these keys from it. */\n rootStack?: Readonly<Record<string, string>>;\n listStack?: Readonly<Record<string, string>>;\n}\nconst ORIENTATION_LAYOUT: Readonly<Record<TabsOrientation, OrientationLayout>> = {\n [TabsOrientation.Horizontal]: {\n root: { flexDirection: 'column', alignItems: 'stretch', gap: '20px' },\n list: { flexDirection: 'row', flexWrap: 'wrap', width: '100%', flexShrink: '1', borderWidth: LIST_EDGE },\n },\n [TabsOrientation.Vertical]: {\n root: { flexDirection: 'row', alignItems: 'flex-start', gap: '24px' },\n list: { flexDirection: 'column', flexWrap: 'nowrap', width: 'auto', flexShrink: '0', borderWidth: ZERO_BOX },\n rootStack: { flexDirection: 'column', alignItems: 'stretch', gap: '20px' },\n listStack: { width: '100%' },\n },\n};\nconst ROOT_STACK_KEYS = ['flexDirection', 'alignItems', 'gap'];\nconst LIST_STACK_KEYS = ['width'];\n\n// ── recipe ──────────────────────────────────────────────────────────────────────────────────────\n\nexport interface TabsOptions {\n tabs?: ReadonlyArray<TabWords>;\n activateOn?: TabsActivateOn;\n orientation?: TabsOrientation;\n /** The tab list's accessible name (empty: unnamed — a section heading usually names the section). */\n label?: string;\n}\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: TabsRole | 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\nexport interface TabPair {\n tab: CompositeNode;\n panel: CompositeNode;\n}\n\n/** One tab and its panel, sharing `itemKey`. */\nexport function buildTabPair(create: CompositeNodeFactory, words: TabWords, itemKey: string): TabPair {\n const tab = make(create, `${itemKey}-tab`, Type.ButtonBlock, TabsRole.Trigger, Style.Tab, {}, 'Tab');\n tab.itemKey = itemKey;\n const label = make(create, `${itemKey}-label`, Type.Text, null, Style.Label, { content: words.label, tag: 'span' }, 'Text');\n writeStyles(label, LABEL_BASE);\n tab.children = [label];\n const panel = make(create, `${itemKey}-panel`, Type.Container, TabsRole.Panel, Style.Panel, {}, 'Panel');\n panel.itemKey = itemKey;\n writeLayerStyles(panel, TABS_STACK_BREAKPOINT, PANEL_STACK);\n const image = make(create, `${itemKey}-image`, Type.Image, null, Style.Media, { src: '', alt: '' }, 'Image');\n writeStyles(image, IMAGE_BASE);\n const text = make(create, `${itemKey}-text`, Type.Text, null, Style.Body, { content: words.text, tag: 'p' }, 'Text');\n writeStyles(text, BODY_BASE);\n panel.children = [image, text];\n return { tab, panel };\n}\n\n/** A fresh Tabs: three tabs, the first on, activated by a click, the list across the top (board 3). */\nexport function buildTabsRecipe(create: CompositeNodeFactory, options: TabsOptions = {}): CompositeNode {\n const root = make(create, 'tabs', Type.Container, TabsRole.Tabs, Style.Root, {}, 'Tabs');\n writeProp(root, TabsBehaviourTrait.ActivateOn, options.activateOn ?? TabsActivateOn.Click);\n writeProp(root, TabsBehaviourTrait.Orientation, options.orientation ?? TabsOrientation.Horizontal);\n if (options.label) writeProp(root, TabsBehaviourTrait.Label, options.label);\n const list = make(create, 'list', Type.Container, TabsRole.List, Style.List, {}, 'Tab list');\n const panels = make(create, 'panels', Type.Container, TabsRole.Panels, Style.Panels, {}, 'Panels');\n const pairs = (options.tabs ?? TABS_WORDS).map((w, i) => buildTabPair(create, w, `k${i + 1}`));\n list.children = pairs.map(p => p.tab);\n panels.children = pairs.map(p => p.panel);\n root.children = [list, panels];\n applyOrientation(root, options.orientation ?? TabsOrientation.Horizontal);\n return root;\n}\n\n// ── reading a tree ──────────────────────────────────────────────────────────────────────────────\n\nexport function isTabsRoot(node: { role?: string | null } | null | undefined): boolean {\n return node?.role === TabsRole.Tabs;\n}\n\n/** The tab list (the holder of the triggers). */\nexport function tabsListOf(root: CompositeNode): CompositeNode | undefined {\n return (root.children ?? []).find(c => c.role === TabsRole.List);\n}\n\n/** The holder of the panels. */\nexport function tabsPanelsOf(root: CompositeNode): CompositeNode | undefined {\n return (root.children ?? []).find(c => c.role === TabsRole.Panels);\n}\n\n/** The tabs in order — every tab (Manual), or the one template tab (From content). */\nexport function tabsTriggers(root: CompositeNode): CompositeNode[] {\n return (tabsListOf(root)?.children ?? []).filter(c => c.role === TabsRole.Trigger);\n}\n\n/** The panels in their holder's order (their order does not pair them — their key does). */\nexport function tabsPanels(root: CompositeNode): CompositeNode[] {\n return (tabsPanelsOf(root)?.children ?? []).filter(c => c.role === TabsRole.Panel);\n}\n\n/** True when the Tabs takes its tabs from content (its list is a Repeater, R3). */\nexport function isTabsFromContent(root: CompositeNode | null | undefined): boolean {\n return !!root && tabsListOf(root)?.type === Type.Repeater;\n}\n\n/** The panel paired with `tab` (the same key), or undefined. From content the one template panel pairs the template tab. */\nexport function tabPanelOf(root: CompositeNode, tab: CompositeNode): CompositeNode | undefined {\n if (isTabsFromContent(root)) return tabsPanels(root)[0];\n return tab.itemKey ? tabsPanels(root).find(p => p.itemKey === tab.itemKey) : undefined;\n}\n\n/** The tab paired with `panel` (the same key), or undefined. */\nexport function tabTriggerOf(root: CompositeNode, panel: CompositeNode): CompositeNode | undefined {\n if (isTabsFromContent(root)) return tabsTriggers(root)[0];\n return panel.itemKey ? tabsTriggers(root).find(t => t.itemKey === panel.itemKey) : undefined;\n}\n\n/** The other half of a tab ⇄ panel pair, or undefined for any other node. */\nexport function tabsPartnerOf(root: CompositeNode, node: CompositeNode): CompositeNode | undefined {\n if (node.role === TabsRole.Trigger) return tabPanelOf(root, node);\n if (node.role === TabsRole.Panel) return tabTriggerOf(root, node);\n return undefined;\n}\n\n/** The words a tab shows: its first Text's. */\nexport function tabLabelNodeOf(tab: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(tab, n => { if (!hit && n !== tab && n.type === Type.Text) hit = n; });\n return hit;\n}\n\nconst stripTags = (v: unknown) => String(v ?? '').replace(/<[^>]*>/g, '').trim();\n\n/** A tab's name in the Items list, the layer tree and the item-action picker: its words. */\nexport function tabLabel(tab: CompositeNode): string {\n const label = tabLabelNodeOf(tab);\n return label ? stripTags(readProp(label, 'content')) : '';\n}\n\n/** Items ▸ rename: the tab's words. */\nexport function renameTab(tab: CompositeNode, words: string): boolean {\n const label = tabLabelNodeOf(tab);\n return !!label && writeProp(label, 'content', words);\n}\n\n/** The first Text inside a panel (the words From content binds to). */\nexport function tabPanelTextOf(panel: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(panel, n => { if (!hit && n !== panel && n.type === Type.Text) hit = n; });\n return hit;\n}\n\n/** The first Image inside a panel. */\nexport function tabPanelImageOf(panel: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(panel, n => { if (!hit && n.type === Type.Image) hit = n; });\n return hit;\n}\n\nexport interface TabsBehaviour {\n activateOn: TabsActivateOn;\n orientation: TabsOrientation;\n}\n\n/** The root's behaviour (an unset trait reads its default: a click, the list across the top). */\nexport function tabsBehaviour(root: CompositeNode | null | undefined): TabsBehaviour {\n const on = root ? readProp(root, TabsBehaviourTrait.ActivateOn) : undefined;\n const orientation = root ? readProp(root, TabsBehaviourTrait.Orientation) : undefined;\n return {\n activateOn: TABS_ACTIVATE_ONS.includes(on as TabsActivateOn) ? on as TabsActivateOn : TabsActivateOn.Click,\n orientation: TABS_ORIENTATIONS.includes(orientation as TabsOrientation) ? orientation as TabsOrientation : TabsOrientation.Horizontal,\n };\n}\n\n/** The tab list's accessible name (empty when unnamed). */\nexport function tabsLabel(root: CompositeNode | null | undefined): string {\n return root ? String(readProp(root, TabsBehaviourTrait.Label) ?? '').trim() : '';\n}\n\n/** Write the orientation preset into the root's and the list's layout (both orientations write the same keys). */\nfunction applyOrientation(root: CompositeNode, orientation: TabsOrientation): void {\n const spec = ORIENTATION_LAYOUT[orientation];\n const list = tabsListOf(root);\n writeStyles(root, spec.root);\n if (list) writeStyles(list, spec.list);\n if (spec.rootStack) writeLayerStyles(root, TABS_STACK_BREAKPOINT, spec.rootStack);\n else clearLayerStyles(root, TABS_STACK_BREAKPOINT, ROOT_STACK_KEYS);\n if (list) {\n if (spec.listStack) writeLayerStyles(list, TABS_STACK_BREAKPOINT, spec.listStack);\n else clearLayerStyles(list, TABS_STACK_BREAKPOINT, LIST_STACK_KEYS);\n }\n}\n\n/** Behaviour ▸ Activate on / Orientation (and Accessibility ▸ the list's name). False when the root has no such trait. */\nexport function setTabsBehaviour(root: CompositeNode, patch: Partial<TabsBehaviour> & { label?: string }): boolean {\n let ok = true;\n if (patch.activateOn !== undefined) ok = writeProp(root, TabsBehaviourTrait.ActivateOn, patch.activateOn) && ok;\n if (patch.orientation !== undefined) {\n ok = writeProp(root, TabsBehaviourTrait.Orientation, patch.orientation) && ok;\n applyOrientation(root, patch.orientation);\n }\n if (patch.label !== undefined) ok = writeProp(root, TabsBehaviourTrait.Label, patch.label) && ok;\n return ok;\n}\n\n// ── editing (Items list, selection toolbar ▸ Add tab, the structure guard) ──────────────────────\n\n/** A key no tab of `root` holds yet (`k4`…). */\nexport function nextTabKey(root: CompositeNode): string {\n const taken = new Set([...tabsTriggers(root), ...tabsPanels(root)].map(n => n.itemKey).filter(Boolean));\n let n = tabsTriggers(root).length + 1;\n while (taken.has(`k${n}`)) n++;\n return `k${n}`;\n}\n\n/** Items ▸ Add tab (and the toolbar's \"Add tab\"): a fresh tab after `after` (or at the end) AND its panel. */\nexport function addTabPair(root: CompositeNode, create: CompositeNodeFactory, after?: CompositeNode | null, words: TabWords = TABS_NEW_TAB_WORDS): TabPair | null {\n const list = tabsListOf(root);\n const panels = tabsPanelsOf(root);\n if (!list || !panels || isTabsFromContent(root)) return null;\n const pair = buildTabPair(create, words, nextTabKey(root));\n const tabs = [...(list.children ?? [])];\n const afterTab = after ? (after.role === TabsRole.Panel ? tabTriggerOf(root, after) : after) : null;\n const at = afterTab ? tabs.indexOf(afterTab) : -1;\n tabs.splice(at < 0 ? tabs.length : at + 1, 0, pair.tab);\n list.children = tabs;\n const afterPanel = afterTab ? tabPanelOf(root, afterTab) : null;\n const held = [...(panels.children ?? [])];\n const pAt = afterPanel ? held.indexOf(afterPanel) : -1;\n held.splice(pAt < 0 ? held.length : pAt + 1, 0, pair.panel);\n panels.children = held;\n return pair;\n}\n\nfunction moveIn(holder: CompositeNode, node: CompositeNode, toIndex: number, role: TabsRole): void {\n const children = [...(holder.children ?? [])];\n const from = children.indexOf(node);\n if (from < 0) return;\n children.splice(from, 1);\n const same = children.filter(c => c.role === role);\n const anchor = same[Math.max(0, Math.min(toIndex, same.length))];\n children.splice(anchor ? children.indexOf(anchor) : children.length, 0, node);\n holder.children = children;\n}\n\n/** Items ▸ drag to reorder: move a tab — and its panel, so the layer tree reads in the same order — to `toIndex`.\n * The pairing never depended on the order. False when `tab` is not one of the root's tabs. */\nexport function moveTabPair(root: CompositeNode, tab: CompositeNode, toIndex: number): boolean {\n const list = tabsListOf(root);\n const panels = tabsPanelsOf(root);\n if (!list || tab.role !== TabsRole.Trigger || !(list.children ?? []).includes(tab)) return false;\n const panel = tabPanelOf(root, tab);\n moveIn(list, tab, toIndex, TabsRole.Trigger);\n if (panel && panels) moveIn(panels, panel, toIndex, TabsRole.Panel);\n return true;\n}\n\n/** Remove a tab and its panel (the pair) — what \"Delete tab and its panel\" does. True when the tab was removed. */\nexport function removeTabPair(root: CompositeNode, node: CompositeNode): boolean {\n const tab = node.role === TabsRole.Panel ? tabTriggerOf(root, node) : node;\n const list = tabsListOf(root);\n if (!tab || !list || tab.role !== TabsRole.Trigger) return false;\n const panel = tabPanelOf(root, tab);\n list.children = (list.children ?? []).filter(c => c !== tab);\n const panels = tabsPanelsOf(root);\n if (panel && panels) panels.children = (panels.children ?? []).filter(c => c !== panel);\n return true;\n}\n\nexport enum TabsEditRefusal {\n /** A Tabs keeps at least one tab (composite plan T18). */\n LastTab = 'last-tab',\n}\n\n/** Why removing `node` (a tab or a panel) from `root` is refused, or null. */\nexport function tabsRemovalRefusal(root: CompositeNode | null | undefined, node: CompositeNode | null | undefined): TabsEditRefusal | null {\n if (!root || (node?.role !== TabsRole.Trigger && node?.role !== TabsRole.Panel)) return null;\n return tabsTriggers(root).length <= 1 ? TabsEditRefusal.LastTab : null;\n}\n\n/** Every \"Item open\" (`trigger-on`) state inside a tab or a panel points at ITS tab or panel — the part that carries\n * `data-iox-on` while its item is on. */\nexport function tabsItemTriggerIds(root: CompositeNode): void {\n for (const part of [...tabsTriggers(root), ...tabsPanels(root)]) {\n if (!part.id) continue;\n walkComposite(part, n => {\n if (n === part || !n.stateStyles?.[ITEM_OPEN_STATE]) return;\n n.stateTriggers = { ...(n.stateTriggers ?? {}), [ITEM_OPEN_STATE]: part.id! };\n });\n }\n}\n\n// ── state, ids and attributes (both renderers, SSR included) ───────────────────────────────────\n\n/** The render scope of one Tabs: its scope id, behaviour, every item key in order and the one that is on. */\nexport interface TabsScope {\n rootId: string;\n behaviour: TabsBehaviour;\n keys: ReadonlyArray<string>;\n /** The key on at first paint: the first tab (null when there is none). */\n active: string | null;\n label: string;\n}\n\nexport function tabsScope(rootId: string, behaviour: TabsBehaviour, keys: ReadonlyArray<string>, label = ''): TabsScope {\n return { rootId, behaviour, keys, active: keys[0] ?? null, label };\n}\n\n/** The item keys a manual Tabs pairs by — its tabs' own keys, in order (a tab with none by its index). */\nexport function manualTabKeys(root: CompositeNode): string[] {\n return tabsTriggers(root).map((t, i) => t.itemKey || `item-${i}`);\n}\n\nexport interface TabsItemState {\n key: string;\n on: boolean;\n ids: AccordionDomIds;\n}\n\n/** One item's render state: its key, whether it is on, and its ARIA ids (`iox-tab-<scope>-<key>-h` / `-p`). */\nexport function tabsItemState(scope: TabsScope, key: string): TabsItemState {\n return { key, on: scope.active === key, ids: accordionDomIds(scope.rootId, key, CompositeKind.Tabs) };\n}\n\nexport const ACTIVATE_ON_ATTRIBUTE = 'data-iox-activate-on';\nexport const ORIENTATION_ATTRIBUTE = 'data-iox-orientation';\n\nexport function tabsRootAttributes(behaviour: TabsBehaviour, scopeId?: string): DomAttributes {\n return {\n [COMPOSITE_ATTRIBUTE]: CompositeKind.Tabs,\n [ACTIVATE_ON_ATTRIBUTE]: behaviour.activateOn,\n [ORIENTATION_ATTRIBUTE]: behaviour.orientation,\n ...(scopeId ? { [SCOPE_ATTRIBUTE]: scopeId } : {}),\n };\n}\n\n/** The tab list: `role=tablist`, vertical said aloud, named by the root's label. */\nexport function tabListAttributes(behaviour: TabsBehaviour, label = ''): DomAttributes {\n return {\n role: 'tablist',\n ...(behaviour.orientation === TabsOrientation.Vertical ? { 'aria-orientation': 'vertical' } : {}),\n ...(label ? { 'aria-label': label } : {}),\n };\n}\n\n/** A tab: a real button that selects its panel — selected = the one tab in the Tab order (roving tabindex). */\nexport function tabTriggerAttributes(state: TabsItemState): DomAttributes {\n return {\n type: 'button',\n role: 'tab',\n id: state.ids.trigger,\n 'aria-selected': state.on ? 'true' : 'false',\n 'aria-controls': state.ids.panel,\n tabindex: state.on ? '0' : '-1',\n [ITEM_KEY_ATTRIBUTE]: state.key,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}),\n };\n}\n\n/** A panel: `role=tabpanel`, named by its tab, a Tab stop of its own, and `hidden` (display:none) while off. */\nexport function tabPanelAttributes(state: TabsItemState): DomAttributes {\n return {\n role: 'tabpanel',\n id: state.ids.panel,\n 'aria-labelledby': state.ids.trigger,\n tabindex: '0',\n [ITEM_KEY_ATTRIBUTE]: state.key,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : { hidden: '' }),\n };\n}\n\n/**\n * The render scope of one rendered Tabs — ONE decision for both engine paths (and the composer's checks): its scope id\n * (its node id + the rows around it, vectoriox/iox-ui#20), its behaviour, its list's name and every item key in order —\n * a manual tab's own `itemKey`, or, From content, each ROW's own id (R3: never its index — a reorder in the CMS keeps\n * every tab with its own panel). `rows` = the rows the tab list's Repeater resolved (null for a manual Tabs).\n */\nexport function tabsScopeFor(root: CompositeNode, rootCssId: string, rows: ReadonlyArray<unknown> | null, rowKeys: ReadonlyArray<string> = []): TabsScope {\n const keys = rows ? rows.map((row, i) => rowItemKey(row, i)) : manualTabKeys(root);\n return tabsScope(compositeScopeId(rootCssId, rowKeys), tabsBehaviour(root), keys, tabsLabel(root));\n}\n\n/** The key a manual tab or panel renders with: its own key, else its index among its kind. */\nexport function tabPartKey(node: CompositeNode, index: number): string {\n return node.itemKey || `item-${index}`;\n}\n\n/**\n * The attributes a part of a Tabs writes on its own element (both engine paths, SSR included): the root's data\n * attributes (its scope id when it sits in repeated rows), the list's role and name, a tab's and a panel's state by\n * `key` (its own key, or — From content — its row's). Anything else writes nothing.\n */\nexport function tabsPartAttributes(node: { role?: string | null }, scope: TabsScope, key: string | null, rowScoped = false): DomAttributes {\n switch (node.role) {\n case TabsRole.Tabs: return tabsRootAttributes(scope.behaviour, rowScoped ? scope.rootId : undefined);\n case TabsRole.List: return tabListAttributes(scope.behaviour, scope.label);\n case TabsRole.Trigger: return key ? tabTriggerAttributes(tabsItemState(scope, key)) : {};\n case TabsRole.Panel: return key ? tabPanelAttributes(tabsItemState(scope, key)) : {};\n default: return {};\n }\n}\n\n/**\n * The APG tabs keys on a tab (automatic activation): → / ← move along a horizontal list — mirrored under RTL — and ↓ /\n * ↑ along a vertical one; Home / End jump. Every move wraps. Enter / Space are the button's own.\n */\nexport function tabsKeyAction(key: string, orientation: TabsOrientation, rtl = false): AccordionKeyAction | null {\n if (key === 'Home') return AccordionKeyAction.First;\n if (key === 'End') return AccordionKeyAction.Last;\n if (orientation === TabsOrientation.Vertical) {\n if (key === 'ArrowDown') return AccordionKeyAction.Next;\n if (key === 'ArrowUp') return AccordionKeyAction.Previous;\n return null;\n }\n if (key === 'ArrowRight') return rtl ? AccordionKeyAction.Previous : AccordionKeyAction.Next;\n if (key === 'ArrowLeft') return rtl ? AccordionKeyAction.Next : AccordionKeyAction.Previous;\n return null;\n}\n\n// ── Items from content (R3, composite T39) ──────────────────────────────────────────────────────\n\nconst SHORT_TEXT = new Set(['text']);\nconst LONG_TEXT = new Set(['textarea', 'richText', 'editor']);\nconst IMAGE_CONTROLLERS = new Set(['image', 'media', 'file']);\n\nexport interface TabsAutoBinds {\n /** The first short-text field: the tab's words. */\n label: string | null;\n /** The first long-text field: the panel's words. */\n text: string | null;\n /** The first image field: the panel's picture. */\n image: string | null;\n}\n\n/** R3 (board 3 \"Tabs from content\"): switching to From content binds the tab's words to the first short-text field,\n * the panel's words to the first long-text field and its picture to the first image field. ONE rule for the builder's\n * switch and the composer. */\nexport function pickTabsAutoBinds(fields: ReadonlyArray<ContentFieldLike>): TabsAutoBinds {\n const isString = (f: ContentFieldLike) => !f.type || f.type === 'string';\n const label = fields.find(f => isString(f) && SHORT_TEXT.has(String(f.controller ?? 'text')))?.name ?? null;\n const text = fields.find(f => isString(f) && LONG_TEXT.has(String(f.controller ?? '')) && f.name !== label)?.name ?? null;\n const image = fields.find(f => IMAGE_CONTROLLERS.has(String(f.controller ?? '')) && f.name !== label && f.name !== text)?.name ?? null;\n return { label, text, image };\n}\n\n/** The bound props of a tab's words, a panel's words and its picture. */\nexport const TABS_LABEL_BIND_PROP = 'content';\nexport const TABS_TEXT_BIND_PROP = 'content';\nexport const TABS_IMAGE_BIND_PROP = 'src';\n\n/**\n * Manual → From content (board 9 \"Items: Manual · From content\"): the list becomes `listRepeater` and the panels\n * holder `panelsRepeater` (Repeater nodes the caller created with the same ids, roles, names, element styles and\n * styles — a type change is the consumer's). The FIRST tab and ITS panel become the templates (their parts, styles\n * and interactions kept; their keys dropped — a row's key is its id); every other pair is removed. Returns the removed\n * nodes.\n */\nexport function tabsToContent(root: CompositeNode, listRepeater: CompositeNode, panelsRepeater: CompositeNode): CompositeNode[] {\n const [tab, ...restTabs] = tabsTriggers(root);\n const panel = tab ? tabPanelOf(root, tab) : undefined;\n const restPanels = tabsPanels(root).filter(p => p !== panel);\n if (tab) delete tab.itemKey;\n if (panel) delete panel.itemKey;\n listRepeater.role = TabsRole.List;\n panelsRepeater.role = TabsRole.Panels;\n listRepeater.children = tab ? [tab] : [];\n panelsRepeater.children = panel ? [panel] : [];\n root.children = (root.children ?? []).map(c => (c.role === TabsRole.List ? listRepeater : c.role === TabsRole.Panels ? panelsRepeater : c));\n return [...restTabs, ...restPanels];\n}\n\ninterface BoundNode extends CompositeNode {\n bindings?: CompositeBinding[];\n}\n\nfunction writeRowIn(node: CompositeNode, row: unknown, resolve: (row: unknown, binding: CompositeBinding) => unknown): void {\n walkComposite(node, 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}\n\n/**\n * From content → Manual: the rows come in as static pairs — each a copy of the template tab and panel (`clone`, which\n * gives the copy fresh ids) whose bound words are written in as its own and whose bindings are dropped. `list` and\n * `panels` are the manual holders the caller created. Returns the new pairs.\n */\nexport function tabsToManual(root: CompositeNode, list: CompositeNode, panels: CompositeNode, rows: ReadonlyArray<unknown>,\n clone: (template: CompositeNode) => CompositeNode, resolve: (row: unknown, binding: CompositeBinding) => unknown): TabPair[] {\n const [tabTemplate] = tabsTriggers(root);\n const panelTemplate = tabsPanels(root)[0];\n list.role = TabsRole.List;\n panels.role = TabsRole.Panels;\n const pairs = tabTemplate && panelTemplate ? rows.map((row, i) => {\n const tab = clone(tabTemplate);\n const panel = clone(panelTemplate);\n tab.itemKey = panel.itemKey = `k${i + 1}`;\n writeRowIn(tab, row, resolve);\n writeRowIn(panel, row, resolve);\n return { tab, panel };\n }) : [];\n list.children = pairs.map(p => p.tab);\n panels.children = pairs.map(p => p.panel);\n root.children = (root.children ?? []).map(c => (c.role === TabsRole.List ? list : c.role === TabsRole.Panels ? panels : c));\n return pairs;\n}\n\n","import { roleClass } from '@vectoriox/iox-ui/design-core';\n\nimport { accordionDomIds, accordionFocusIndex, COMPOSITE_ATTRIBUTE, ITEM_KEY_ATTRIBUTE, ON_ATTRIBUTE, SCOPE_ATTRIBUTE } from './accordion';\nimport { ITEM_OFF_EVENT, ITEM_ON_EVENT } from './accordion-runtime';\nimport { CompositeKind, EXCLUSIVE_KIND_ROLES, ExclusiveCompositeKind, isExclusiveKind } from './composite-kinds';\nimport {\n ACTIVATE_ON_ATTRIBUTE, ORIENTATION_ATTRIBUTE, TABS_ACTIVATE_ONS, TABS_ORIENTATIONS, TabsActivateOn, TabsBehaviour, tabsKeyAction, TabsOrientation,\n} from './tabs';\n\n/**\n * The EXCLUSIVE composites' RUNTIME (CC4a Tabs; the Segmented control runs it too in CC4b) — ONE copy, DOM only, for\n * the builder canvas and the live site (both engine paths render the same markup from `tabs.ts`'s attribute planners):\n *\n * [root] data-iox-composite=\"tabs\" data-iox-activate-on data-iox-orientation [data-iox-scope]\n * .iox-role-tabs-list role=tablist [aria-orientation=vertical]\n * .iox-role-tabs-trigger role=tab id aria-selected aria-controls tabindex 0|-1 data-iox-item-key [data-iox-on]\n * .iox-role-tabs-panels\n * .iox-role-tabs-panel role=tabpanel id aria-labelledby tabindex=0 data-iox-item-key [hidden] | [data-iox-on]\n *\n * Exactly one item is on, always (a Tabs with tabs never shows none). It owns: a click on a trigger turns its item on\n * (and a hover, when the root says `activate-on=hover`); the APG tabs keys with AUTOMATIC activation — ← → along a\n * horizontal list (mirrored under RTL), ↑ ↓ along a vertical one, Home / End — moving focus AND turning the item on,\n * the roving tabindex keeping one trigger in the Tab order. A trigger and its panel pair by `data-iox-item-key`\n * (else their index among their kind — the builder's From-content rows). Every change dispatches `iox-item-on` /\n * `iox-item-off` on the trigger AND its panel (the `itemOn` / `itemOff` interaction triggers). The item shown is\n * FORCED ?? LIVE: the builder forces one (a selection inside an inactive panel); the live site forces nothing. The\n * server's first state is trusted (no flash).\n */\n\nexport interface ExclusiveRuntimeOptions {\n /** The scope id the ARIA ids are built from (else `data-iox-scope`, else the root's `iox-node-<id>`). A function is\n * 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 /** The behaviour (else read from the root's data attributes). */\n behaviour?: TabsBehaviour;\n /** The list's accessible name, stamped by the runtime (the builder canvas; the engine renders it). */\n label?: () => string;\n /** The key forced on, on top of the live state (the builder's design state), or null. */\n forced?: () => string | null;\n /** The live item changed (a click, a key, a hover, an action) — the builder's \"Showing on canvas\" follows it. */\n onChange?: (key: string) => void;\n /** Re-stamp when the markup under the root changes (the builder canvas re-renders parts). */\n observe?: boolean;\n}\n\nconst KIND_ROOT = (kind: ExclusiveCompositeKind) => `[${COMPOSITE_ATTRIBUTE}=\"${kind}\"]`;\nconst EXCLUSIVE_KINDS = Object.keys(EXCLUSIVE_KIND_ROLES) as ExclusiveCompositeKind[];\nconst ROOT_SELECTOR = EXCLUSIVE_KINDS.map(KIND_ROOT).join(', ');\nconst roleSelector = (pick: 'list' | 'trigger' | 'panel') =>\n EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r): r is string => !!r).map(r => `.${roleClass(r)}`).join(', ');\nconst LIST_SELECTOR = roleSelector('list');\nconst TRIGGER_SELECTOR = roleSelector('trigger');\nconst PANEL_SELECTOR = roleSelector('panel');\nconst ITEM_PART_SELECTOR = `${TRIGGER_SELECTOR}, ${PANEL_SELECTOR}`;\nconst TABLIST_SELECTOR = '[role=\"tablist\"]';\n\n/** The exclusive composite an element belongs to (the element itself when it is a root). */\nexport function closestExclusive(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ROOT_SELECTOR) as HTMLElement | null) ?? null;\n}\n\n/** The trigger or panel an element sits in (itself when it is one) — its ITEM part — or null. */\nexport function closestExclusiveItemPart(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ITEM_PART_SELECTOR) as HTMLElement | null) ?? null;\n}\n\nconst kindOf = (root: Element): ExclusiveCompositeKind => {\n const raw = root.getAttribute(COMPOSITE_ATTRIBUTE) as CompositeKind | null;\n return isExclusiveKind(raw) ? raw : CompositeKind.Tabs;\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): TabsBehaviour {\n const on = root.getAttribute(ACTIVATE_ON_ATTRIBUTE);\n const orientation = root.getAttribute(ORIENTATION_ATTRIBUTE);\n return {\n activateOn: TABS_ACTIVATE_ONS.includes(on as TabsActivateOn) ? on as TabsActivateOn : TabsActivateOn.Click,\n orientation: TABS_ORIENTATIONS.includes(orientation as TabsOrientation) ? orientation as TabsOrientation : TabsOrientation.Horizontal,\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\nfunction dispatch(el: Element | null | undefined, type: string): void {\n const Ctor = (globalThis as { CustomEvent?: typeof CustomEvent }).CustomEvent;\n if (el && Ctor) el.dispatchEvent(new Ctor(type, { bubbles: false }));\n}\n\nexport class ExclusiveRuntime {\n private live: string | null;\n private shown: string | null = null;\n private observer: MutationObserver | null = null;\n private stampQueued = false;\n private behaviourValue: TabsBehaviour;\n private awaitingItems = false;\n readonly kind: ExclusiveCompositeKind;\n\n constructor(readonly root: HTMLElement, private readonly options: ExclusiveRuntimeOptions = {}) {\n this.kind = kindOf(root);\n this.behaviourValue = options.behaviour ?? behaviourOf(root);\n root.setAttribute(COMPOSITE_ATTRIBUTE, this.kind);\n EXCLUSIVE_RUNTIMES.set(root, this);\n // The server rendered the first state (every trigger keyed, one on); with no server state the first is on.\n const triggers = this.triggers();\n const serverOn = !options.behaviour ? triggers.find(t => t.hasAttribute(ON_ATTRIBUTE) && t.hasAttribute(ITEM_KEY_ATTRIBUTE)) : undefined;\n this.live = serverOn ? this.keyOf(serverOn) : (triggers[0] ? this.keyOf(triggers[0]) : null);\n this.awaitingItems = !triggers.length;\n // Capture: on the builder canvas every part's own listener stops the click (it selects that part), and the tab\n // must still turn on — the canvas is a live runtime.\n root.addEventListener('click', this.onClick, true);\n root.addEventListener('mouseover', this.onHover, true);\n root.addEventListener('keydown', this.onKeydown);\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(): TabsBehaviour {\n return this.behaviourValue;\n }\n\n /** The behaviour changed in the panel (Activate on, Orientation). */\n setBehaviour(behaviour: TabsBehaviour): void {\n this.behaviourValue = behaviour;\n this.root.setAttribute(ACTIVATE_ON_ATTRIBUTE, behaviour.activateOn);\n this.root.setAttribute(ORIENTATION_ATTRIBUTE, behaviour.orientation);\n this.stamp();\n }\n\n /** THIS composite's triggers in document order (a nested composite's are its own). */\n triggers(): HTMLElement[] {\n return this.own(TRIGGER_SELECTOR);\n }\n\n /** THIS composite's panels in document order. */\n panels(): HTMLElement[] {\n return this.own(PANEL_SELECTOR);\n }\n\n /** The key on right now (forced ?? live). */\n get activeKey(): string | null {\n return this.shown;\n }\n\n /** The key the live state holds (before anything forced). */\n get liveKey(): string | null {\n return this.live;\n }\n\n /** The key of a trigger or a panel: its `data-iox-item-key`, else its index among its kind. */\n keyOf(part: Element): string {\n const own = part.getAttribute(ITEM_KEY_ATTRIBUTE);\n if (own) return own;\n const peers = part.matches(TRIGGER_SELECTOR) ? this.triggers() : this.panels();\n return `item-${peers.indexOf(part as HTMLElement)}`;\n }\n\n /** The key of the item an element sits in (a part inside a tab or a panel), or null. */\n keyAt(el: Element | null | undefined): string | null {\n const part = closestExclusiveItemPart(el);\n return part && closestExclusive(part) === this.root ? this.keyOf(part) : null;\n }\n\n /** Turn `key` on (a click, a key, a hover, the `openItem` action, \"Showing on canvas\"). */\n activate(key: string): void {\n if (!this.keys().includes(key)) return;\n const changed = key !== this.live;\n this.live = key;\n this.stamp();\n if (changed) this.options.onChange?.(key);\n }\n\n /** Run an item action on `key`: Open turns it on; Close and Toggle do nothing (one item is always on). True when it\n * is on afterwards. */\n run(open: boolean, key: string): boolean {\n if (open) this.activate(key);\n return this.shown === key;\n }\n\n /** The forced key changed (builder design state): show it. */\n refresh(): void {\n this.stamp();\n }\n\n destroy(): void {\n if (EXCLUSIVE_RUNTIMES.get(this.root) === this) EXCLUSIVE_RUNTIMES.delete(this.root);\n this.root.removeEventListener('click', this.onClick, true);\n this.root.removeEventListener('mouseover', this.onHover, true);\n this.root.removeEventListener('keydown', this.onKeydown);\n this.observer?.disconnect();\n this.observer = null;\n }\n\n private keys(): string[] {\n return this.triggers().map(t => this.keyOf(t));\n }\n\n /** The element(s) that ARE the tablist: the ones a renderer already gave the role (the engine's component-path\n * Repeater puts it on its inner root, which holds the tabs), else the elements carrying the list's role class. */\n private lists(): HTMLElement[] {\n const stamped = this.own(TABLIST_SELECTOR);\n return stamped.length ? stamped : this.own(LIST_SELECTOR);\n }\n\n private own(selector: string): HTMLElement[] {\n return Array.from(this.root.querySelectorAll<HTMLElement>(selector)).filter(el => closestExclusive(el.parentElement) === this.root);\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 rootId(): string {\n const own = this.options.rootId;\n return (typeof own === 'function' ? own() : own) ?? this.root.getAttribute(SCOPE_ATTRIBUTE) ?? nodeIdOf(this.root);\n }\n\n /** Write every part's state into its markup; announce what changed. */\n private stamp(first = false): void {\n const triggers = this.triggers();\n const keys = triggers.map(t => this.keyOf(t));\n if (this.awaitingItems && keys.length) {\n this.awaitingItems = false;\n this.live = keys[0];\n first = true;\n }\n if (this.live === null || !keys.includes(this.live)) this.live = keys[0] ?? null;\n const forced = this.options.forced?.() ?? null;\n const next = forced !== null && keys.includes(forced) ? forced : this.live;\n const rootId = this.rootId();\n const vertical = this.behaviourValue.orientation === TabsOrientation.Vertical;\n for (const list of this.lists()) {\n setAttr(list, 'role', 'tablist');\n setAttr(list, 'aria-orientation', vertical ? 'vertical' : null);\n if (this.options.label) setAttr(list, 'aria-label', this.options.label() || null);\n }\n const panels = this.panels();\n const panelOf = (key: string) => panels.find(p => this.keyOf(p) === key) ?? null;\n for (const trigger of triggers) {\n const key = this.keyOf(trigger);\n const on = key === next;\n const ids = accordionDomIds(rootId, key, CompositeKind.Tabs);\n setAttr(trigger, ITEM_KEY_ATTRIBUTE, key);\n setAttr(trigger, 'type', trigger.tagName === 'BUTTON' ? 'button' : null);\n setAttr(trigger, 'role', 'tab');\n setAttr(trigger, 'id', ids.trigger);\n setAttr(trigger, 'aria-selected', on ? 'true' : 'false');\n setAttr(trigger, 'aria-controls', panelOf(key) ? ids.panel : null);\n setAttr(trigger, 'tabindex', on ? '0' : '-1');\n setAttr(trigger, ON_ATTRIBUTE, on ? '' : null);\n }\n for (const panel of panels) {\n const key = this.keyOf(panel);\n const on = key === next;\n const ids = accordionDomIds(rootId, key, CompositeKind.Tabs);\n setAttr(panel, ITEM_KEY_ATTRIBUTE, key);\n setAttr(panel, 'role', 'tabpanel');\n setAttr(panel, 'id', ids.panel);\n setAttr(panel, 'aria-labelledby', ids.trigger);\n setAttr(panel, 'tabindex', '0');\n setAttr(panel, ON_ATTRIBUTE, on ? '' : null);\n setAttr(panel, 'hidden', on ? null : '');\n }\n const was = first ? null : this.shown;\n this.shown = next;\n if (was === next && !first) return;\n if (was !== null) {\n dispatch(triggers.find(t => this.keyOf(t) === was), ITEM_OFF_EVENT);\n dispatch(panelOf(was), ITEM_OFF_EVENT);\n }\n if (next !== null) {\n dispatch(triggers.find(t => this.keyOf(t) === next), ITEM_ON_EVENT);\n dispatch(panelOf(next), ITEM_ON_EVENT);\n }\n }\n\n private ownTrigger(target: EventTarget | null): HTMLElement | null {\n const trigger = (target as Element | null)?.closest?.(TRIGGER_SELECTOR) as HTMLElement | null;\n return trigger && closestExclusive(trigger.parentElement) === this.root ? trigger : null;\n }\n\n private readonly onClick = (event: Event): void => {\n const trigger = this.ownTrigger(event.target);\n if (!trigger) return;\n event.preventDefault();\n this.activate(this.keyOf(trigger));\n };\n\n private readonly onHover = (event: Event): void => {\n if (this.behaviourValue.activateOn !== TabsActivateOn.Hover) return;\n const trigger = this.ownTrigger(event.target);\n if (trigger) this.activate(this.keyOf(trigger));\n };\n\n private readonly onKeydown = (event: Event): void => {\n const e = event as KeyboardEvent;\n const trigger = this.ownTrigger(e.target);\n if (!trigger) return;\n const rtl = isRtl(trigger);\n const action = tabsKeyAction(e.key, this.behaviourValue.orientation, rtl);\n if (!action) return;\n const triggers = this.triggers();\n const target = triggers[accordionFocusIndex(action, triggers.indexOf(trigger), triggers.length)];\n if (!target) return;\n e.preventDefault();\n target.focus();\n this.activate(this.keyOf(target));\n };\n}\n\n/** The direction the tab is laid out in — the computed `direction` (a page's own CSS included), else its nearest `dir`. */\nfunction isRtl(el: Element): boolean {\n let computed = '';\n try { computed = el.ownerDocument?.defaultView?.getComputedStyle(el).direction ?? ''; } catch { computed = ''; }\n if (computed) return computed === 'rtl';\n return el.closest('[dir]')?.getAttribute('dir') === 'rtl';\n}\n\n/** Every live exclusive runtime by its root — so an item action finds the runtime of whatever item it targets. */\nconst EXCLUSIVE_RUNTIMES = new WeakMap<Element, ExclusiveRuntime>();\n\n/** The runtime running an exclusive root, or null. */\nexport function exclusiveRuntimeOf(root: Element | null | undefined): ExclusiveRuntime | null {\n return (root && EXCLUSIVE_RUNTIMES.get(root)) || null;\n}\n\n/** Attach the runtime to one rendered exclusive root, unless it already runs one. Returns the NEW runtime, or null. */\nexport function attachExclusiveAt(root: HTMLElement, options: Omit<ExclusiveRuntimeOptions, 'behaviour'> = {}): ExclusiveRuntime | null {\n if (EXCLUSIVE_RUNTIMES.has(root)) return null;\n return new ExclusiveRuntime(root, options);\n}\n\n/** True when `el` is (or sits in) an exclusive item part — a tab or a panel. */\nexport function isExclusiveItemOn(el: Element): boolean {\n return !!closestExclusiveItemPart(el)?.hasAttribute(ON_ATTRIBUTE);\n}\n\n/** Subscribe to the item part `el` sits in turning on / off. Returns the unsubscribe. */\nexport function onExclusiveItemState(el: Element, on: boolean, handler: () => void): () => void {\n const part = closestExclusiveItemPart(el);\n if (!part) return () => undefined;\n const type = on ? ITEM_ON_EVENT : ITEM_OFF_EVENT;\n part.addEventListener(type, handler);\n return () => part.removeEventListener(type, handler);\n}\n","import {\n accordionRootOfItem, accordionRuntimeOf, AccordionRuntime, AccordionRuntimeOptions, attachAccordionAt, closestAccordionItem, CompositeItemAction,\n isAccordionItemOn, onAccordionItemState,\n} from './accordion-runtime';\nimport { COMPOSITE_ATTRIBUTE } from './accordion';\nimport { CompositeKind, isExclusiveKind } from './composite-kinds';\nimport {\n attachExclusiveAt, closestExclusive, closestExclusiveItemPart, ExclusiveRuntime, exclusiveRuntimeOf, ExclusiveRuntimeOptions, isExclusiveItemOn,\n onExclusiveItemState,\n} from './exclusive-runtime';\n\n/**\n * The composites' runtimes behind ONE door (CC4a): the open/close runtime (Accordion, Disclosure) and the exclusive\n * runtime (Tabs; the Segmented control in CC4b). The engine attaches whichever a rendered root needs; the interaction\n * engines (builder canvas and live site) ask these for `itemOn` / `itemOff` and run the item actions through them —\n * never a family's own function, so a new kind joins without touching either engine.\n */\n\nexport type CompositeRuntime = AccordionRuntime | ExclusiveRuntime;\n\n/** Attach the runtime a rendered composite root needs (its `data-iox-composite`), unless it runs one already. Returns\n * the NEW runtime, or null. */\nexport function attachCompositeAt(root: HTMLElement, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> & Omit<ExclusiveRuntimeOptions, 'behaviour'> = {}): CompositeRuntime | null {\n const kind = root.getAttribute(COMPOSITE_ATTRIBUTE) as CompositeKind | null;\n if (isExclusiveKind(kind)) return attachExclusiveAt(root, { observe: options.observe });\n return attachAccordionAt(root, { observe: options.observe, reducedMotion: options.reducedMotion });\n}\n\n/** The nearer of the item elements `el` sits in — an accordion item / a disclosure, or a tab / a tab panel. */\nfunction nearestItem(el: Element | null | undefined): { el: HTMLElement; exclusive: boolean } | null {\n const toggle = closestAccordionItem(el);\n const exclusive = closestExclusiveItemPart(el);\n if (!toggle && !exclusive) return null;\n if (toggle && (!exclusive || exclusive.contains(toggle))) return { el: toggle, exclusive: false };\n return { el: exclusive!, exclusive: true };\n}\n\n/** Subscribe to the item `el` sits in turning on / off — what the `itemOn` / `itemOff` interaction triggers listen to,\n * in both families. Returns the unsubscribe. */\nexport function onCompositeItemState(el: Element, on: boolean, handler: () => void): () => void {\n const item = nearestItem(el);\n if (!item) return () => undefined;\n return item.exclusive ? onExclusiveItemState(item.el, on, handler) : onAccordionItemState(item.el, on, handler);\n}\n\n/** True when the item `el` sits in is on now (an open accordion item, the active tab or its panel). */\nexport function isCompositeItemOn(el: Element): boolean {\n const item = nearestItem(el);\n if (!item) return false;\n return item.exclusive ? isExclusiveItemOn(item.el) : isAccordionItemOn(item.el);\n}\n\n/**\n * Run an item action on the element of an ITEM — an accordion item, a disclosure, or a tab (CC4a: `openItem` turns it\n * on; a Tabs always shows one, so Close and Toggle leave it) — the `openItem` / `closeItem` / `toggleItem` interaction\n * actions, on the canvas and on the live site through this one function. Returns whether the item shows on\n * 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 = nearestItem(el);\n if (!item) return null;\n if (item.exclusive) {\n const runtime = exclusiveRuntimeOf(closestExclusive(item.el));\n return runtime ? runtime.run(action === CompositeItemAction.Open, runtime.keyOf(item.el)) : null;\n }\n const runtime = accordionRuntimeOf(accordionRootOfItem(item.el));\n return runtime ? runtime.run(action, runtime.keyOf(item.el)) : null;\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 (CC4a) run the\n * EXCLUSIVE runtime (exclusive-runtime.ts — one item always on); composite-runtime.ts is the one door to both.\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';\nexport * from './tabs';\nexport * from './exclusive-runtime';\nexport * from './composite-runtime';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EXCLUSIVE_KINDS","Type","Style","ZERO_BOX","LINK_TYPE","PART_BASE","make","stripTags","SHORT_TEXT","LONG_TEXT","KIND_ROOT","ROOT_SELECTOR","PANEL_SELECTOR","kindOf","nodeIdOf","behaviourOf","setAttr","dispatch","ROW_INDEX_ATTRIBUTE","BODY_BASE","I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C,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;AACnF;AAEA;;;;;AAKG;AACG,SAAU,sBAAsB,CAAC,EAA8B,EAAE,MAA2B,EAAA;AAC9F,IAAA,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,CAAC;AAC5B,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;AACtB,IAAA,IAAI,IAAI,CAAC,SAAS,EAAE;QAChB,MAAM,OAAO,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7D,OAAO,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;IACpG;IACA,MAAM,OAAO,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChE,OAAO,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;AACvE;;ACnEA;;;;;;;;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/tabs.ts","../../../projects/iox-ui/src/composite-core/segmented.ts","../../../projects/iox-ui/src/composite-core/exclusive.ts","../../../projects/iox-ui/src/composite-core/exclusive-runtime.ts","../../../projects/iox-ui/src/composite-core/composite-runtime.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 composites' kinds and roles. Two families:\n * - OPEN/CLOSE (CC2 Accordion, CC2.1 Disclosure — composite plan T9 / T21): a Disclosure is a one-item accordion whose\n * ROOT is its item, so both run the same state machine, attribute planners and runtime (`accordion-runtime.ts`);\n * - EXCLUSIVE (CC4 Tabs — composite T17; CC4b the Segmented control — T32): exactly one item is on; a Tabs' trigger\n * and its panel pair by `itemKey` (`tabs.ts`), a Segmented control's options have no panel (`segmented.ts`); both run\n * `exclusive-runtime.ts`.\n * Every consumer that treats \"an item\", \"a trigger\" or \"a panel\" alike asks these predicates, never a role literal.\n */\n\nexport enum CompositeKind {\n Accordion = 'accordion',\n Disclosure = 'disclosure',\n Tabs = 'tabs',\n Segmented = 'segmented',\n}\n\n/** The kinds the open/close runtime runs (`AccordionRuntime`). */\nexport type ToggleCompositeKind = CompositeKind.Accordion | CompositeKind.Disclosure;\n/** The kinds the exclusive runtime runs (`ExclusiveRuntime`): one item on at a time, always one. */\nexport type ExclusiveCompositeKind = CompositeKind.Tabs | CompositeKind.Segmented;\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\n/**\n * TABS (CC4a — composite T17). The tab LIST holds the triggers, the PANELS holder holds the panels; a tab and its panel\n * share an `itemKey` (never their index — moving a tab keeps its own panel). From content (R3) the list and the panels\n * holder are both Repeaters over the SAME source, one row giving its tab AND its panel (paired by the row's id).\n */\nexport enum TabsRole {\n Tabs = 'tabs',\n List = 'tabs.list',\n Trigger = 'tabs.trigger',\n Panels = 'tabs.panels',\n Panel = 'tabs.panel',\n}\n\n/**\n * SEGMENTED (CC4b — composite T32; complex-components board 10). One of a few, always one on, FIXED options (R3): the\n * root IS the radio group and holds the options directly — no list, no panels. An option may hold the optional saving\n * badge (inside it, so its words join the option's accessible name).\n */\nexport enum SegmentedRole {\n Segmented = 'segmented',\n Option = 'segmented.option',\n Badge = 'segmented.badge',\n}\n\ninterface RoleLike { role?: string | null }\n\n/** The roles each open/close 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<ToggleCompositeKind, 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\n/** The roles each EXCLUSIVE kind plays: its root, the holder of its triggers (null when the root holds them — a\n * Segmented control), its triggers, and — when its items show a panel (Tabs; a Segmented control has none) — the\n * holder of its panels and the panels. */\nexport interface ExclusiveKindRoles {\n root: string;\n list: string | null;\n trigger: string;\n panels: string | null;\n panel: string | null;\n}\n\nexport const EXCLUSIVE_KIND_ROLES: Readonly<Record<ExclusiveCompositeKind, ExclusiveKindRoles>> = {\n [CompositeKind.Tabs]: { root: TabsRole.Tabs, list: TabsRole.List, trigger: TabsRole.Trigger, panels: TabsRole.Panels, panel: TabsRole.Panel },\n [CompositeKind.Segmented]: { root: SegmentedRole.Segmented, list: null, trigger: SegmentedRole.Option, panels: null, panel: null },\n};\n\nconst KINDS = Object.values(CompositeKind);\nconst TOGGLE_KINDS = Object.keys(COMPOSITE_KIND_ROLES) as ToggleCompositeKind[];\nconst EXCLUSIVE_KINDS = Object.keys(EXCLUSIVE_KIND_ROLES) as ExclusiveCompositeKind[];\nconst rolesOf = (pick: keyof CompositeKindRoles): ReadonlySet<string> => new Set(TOGGLE_KINDS.map(k => COMPOSITE_KIND_ROLES[k][pick]));\nconst exclusiveRolesOf = (pick: keyof ExclusiveKindRoles): ReadonlySet<string> =>\n new Set(EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r): r is string => !!r));\nconst ROOT_ROLES = rolesOf('root');\nconst ITEM_ROLES = rolesOf('item');\nconst TRIGGER_ROLES = rolesOf('trigger');\nconst PANEL_ROLES = rolesOf('panel');\nconst EXCLUSIVE_ROOT_ROLES = exclusiveRolesOf('root');\nconst EXCLUSIVE_LIST_ROLES = exclusiveRolesOf('list');\nconst EXCLUSIVE_TRIGGER_ROLES = exclusiveRolesOf('trigger');\nconst EXCLUSIVE_PANELS_ROLES = exclusiveRolesOf('panels');\nconst EXCLUSIVE_PANEL_ROLES = exclusiveRolesOf('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/** True for a kind the open/close runtime runs. */\nexport function isToggleKind(kind: CompositeKind | null | undefined): kind is ToggleCompositeKind {\n return !!kind && (TOGGLE_KINDS as string[]).includes(kind);\n}\n\n/** True for a kind the exclusive runtime runs. */\nexport function isExclusiveKind(kind: CompositeKind | null | undefined): kind is ExclusiveCompositeKind {\n return !!kind && (EXCLUSIVE_KINDS as string[]).includes(kind);\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\n// ── the exclusive family (CC4a Tabs) ───────────────────────────────────────────────────────────\n\n/** A root that runs the exclusive runtime (Tabs). */\nexport function isExclusiveRoot(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_ROOT_ROLES.has(node.role);\n}\n\n/** The holder of an exclusive composite's triggers (a tab list): it takes only triggers. */\nexport function isExclusiveList(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_LIST_ROLES.has(node.role);\n}\n\n/** One of an exclusive composite's triggers (a tab): pressing it turns its item on. */\nexport function isExclusiveTrigger(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_TRIGGER_ROLES.has(node.role);\n}\n\n/** The holder of an exclusive composite's panels: it takes only panels. */\nexport function isExclusivePanels(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_PANELS_ROLES.has(node.role);\n}\n\n/** One of an exclusive composite's panels (a tab panel): shown only while its item is on. */\nexport function isExclusivePanel(node: RoleLike | null | undefined): boolean {\n return !!node?.role && EXCLUSIVE_PANEL_ROLES.has(node.role);\n}\n\n/** True for a trigger or a panel — a part that IS one item of an exclusive composite (it carries the `itemKey`). */\nexport function isExclusiveItemPart(node: RoleLike | null | undefined): boolean {\n return isExclusiveTrigger(node) || isExclusivePanel(node);\n}\n\n/** True for any part of a Tabs (its root included). */\nexport function isTabsPart(node: RoleLike | null | undefined): boolean {\n return compositeKindOfRole(node?.role) === CompositeKind.Tabs;\n}\n\n/** True for any part of a Segmented control (its root included). */\nexport function isSegmentedPart(node: RoleLike | null | undefined): boolean {\n return compositeKindOfRole(node?.role) === CompositeKind.Segmented;\n}\n\n/** The exclusive kind a node's role belongs to (`segmented.option` → Segmented), or null. */\nexport function exclusiveKindOf(node: RoleLike | null | undefined): ExclusiveCompositeKind | null {\n const kind = compositeKindOfRole(node?.role);\n return isExclusiveKind(kind) ? kind : null;\n}\n\n/** True when an exclusive root holds its triggers itself (a Segmented control), not in a list part. */\nexport function exclusiveRootHoldsTriggers(kind: ExclusiveCompositeKind): boolean {\n return EXCLUSIVE_KIND_ROLES[kind].list === null;\n}\n\n/** True when an exclusive kind's items show a panel (Tabs), so a trigger and its panel are a pair. */\nexport function exclusiveKindHasPanels(kind: ExclusiveCompositeKind | null | undefined): boolean {\n return !!kind && EXCLUSIVE_KIND_ROLES[kind].panel !== null;\n}\n\n/** A root of either family — anything that runs a composite runtime. */\nexport function isAnyCompositeRoot(node: RoleLike | null | undefined): boolean {\n return isCompositeRoot(node) || isExclusiveRoot(node);\n}\n\n/** The exclusive root a node belongs to (the node itself when it is one), or null. `path` = its ancestors, root first. */\nexport function exclusiveRootOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isExclusiveRoot(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) if (isExclusiveRoot(path[i])) return path[i];\n return null;\n}\n\n/** The trigger or panel a node sits in (itself when it is one) inside an exclusive composite, or null. A nested\n * exclusive root ends the walk. */\nexport function exclusiveItemPartOf<T extends RoleLike>(node: T, path: ReadonlyArray<T>): T | null {\n if (isExclusiveItemPart(node)) return node;\n for (let i = path.length - 1; i >= 0; i--) {\n if (isExclusiveItemPart(path[i])) return path[i];\n if (isExclusiveRoot(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, isToggleKind,\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 const kind = compositeKindOfRole(node.role);\n return COMPOSITE_KIND_ROLES[isToggleKind(kind) ? kind : 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 [CompositeKind.Tabs]: 'iox-tab',\n [CompositeKind.Segmented]: 'iox-seg',\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 { COMPOSITE_KIND_ROLES, CompositeKind, ToggleCompositeKind } 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.keys(COMPOSITE_KIND_ROLES) as ToggleCompositeKind[]).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. */\nexport function accordionRootOfItem(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/** 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, SegmentedRole, TabsRole } 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 /** The only roles that may be dropped INTO this part (a tab list takes tabs, a panels holder takes panels). */\n readonly accepts?: ReadonlyArray<string>;\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 // CC4a — a Tabs always keeps its tab list and its panels holder; a tab lives in the list and a panel in the\n // holder (each may be deleted — with its pair — but never moved out); the list takes only tabs, the holder only\n // panels, and a panel takes anything.\n [TabsRole.Tabs]: { parent: null },\n [TabsRole.List]: { parent: TabsRole.Tabs, locked: true, accepts: [TabsRole.Trigger] },\n [TabsRole.Panels]: { parent: TabsRole.Tabs, locked: true, accepts: [TabsRole.Panel] },\n [TabsRole.Trigger]: { parent: TabsRole.List, pinned: true },\n [TabsRole.Panel]: { parent: TabsRole.Panels, pinned: true },\n // CC4b — a Segmented control holds only its options (each may be deleted — two stay — but never moved out); an\n // option's saving badge is optional (Option ▸ Saving badge) and stays in its option.\n [SegmentedRole.Segmented]: { parent: null, accepts: [SegmentedRole.Option] },\n [SegmentedRole.Option]: { parent: SegmentedRole.Segmented, pinned: true },\n [SegmentedRole.Badge]: { parent: SegmentedRole.Option, pinned: true },\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 /** The new parent takes only certain roles (a tab list takes only tabs, CC4a). */\n NotAccepted = 'not-accepted',\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 const parent = ancestors[ancestors.length - 1];\n if (edit === StructureEdit.Move && acceptsRefusal(node, parent)) return StructureRefusal.NotAccepted;\n if (!spec?.locked && !spec?.pinned) return null;\n if (edit === StructureEdit.Delete) return spec.locked ? StructureRefusal.LockedPart : null;\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\n/** Why `parent` refuses `node` as a child (it takes only certain roles), or null. */\nexport function acceptsRefusal(node: RoleLike | null | undefined, parent: RoleLike | null | undefined): StructureRefusal | null {\n const accepts = parent?.role ? COMPOSITE_ROLE_SPECS[parent.role]?.accepts : undefined;\n if (!accepts) return null;\n return node?.role && accepts.includes(node.role) ? null : StructureRefusal.NotAccepted;\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","import { elementStyleById } from '@vectoriox/iox-ui/design-core';\n\nimport {\n AccordionDomIds, accordionDomIds, AccordionKeyAction, CompositeBinding, compositeScopeId, ContentFieldLike, COMPOSITE_ATTRIBUTE, DomAttributes,\n ITEM_KEY_ATTRIBUTE, ITEM_OPEN_STATE, ON_ATTRIBUTE, rowItemKey, SCOPE_ATTRIBUTE,\n} from './accordion';\nimport { CARD_STACK_BREAKPOINT } from './card';\nimport { CompositeKind, ExclusiveCompositeKind, TabsRole } from './composite-kinds';\nimport {\n clearLayerStyles, CompositeNode, CompositeNodeFactory, makeCompositePart, readProp, walkComposite, writeLayerStyles, writeProp, writeStyles,\n} from './composite-node';\n\n/**\n * TABS (CC4a — composite K2 T17–T20; complex-components boards 3 and 9, APPROVED 2026-10-20). Not a component: a\n * recipe of ordinary nodes, each part carrying a role, so every tab and every panel is selectable on the canvas, in\n * the layer tree and the breadcrumb, and wears its own element style (R2).\n *\n * Container `box` role tabs traits activateOn · orientation · ariaLabel (the list's name)\n * ├─ Container `tab-list` role tabs.list → role=tablist (locked) — or a Repeater (From content)\n * │ └─ ButtonBlock `tab` ×3 role tabs.trigger itemKey k1… → <button role=tab> › Text `button-label`\n * └─ Container `box` role tabs.panels (locked) — or a Repeater (From content)\n * └─ Container `box` ×3 role tabs.panel the SAME itemKey as its tab → role=tabpanel, hidden while off\n * ├─ Image `media` 4 / 3\n * └─ Text `body`\n *\n * A tab and its panel are a PAIR by `itemKey` — never by index, so a tab moved to the end still shows its own panel.\n * The behaviour is BUILT IN (composite plan D1 = B): exactly one item is on (`exclusive`), the APG tabs pattern with\n * AUTOMATIC activation (arrows move focus and activate, roving tabindex) — one runtime (`exclusive-runtime.ts`) on the\n * builder canvas and both engine paths, from the attribute planners below.\n */\n\nexport enum TabsBehaviourTrait {\n /** Which pointer gesture turns a tab on: a click (always) or also a hover. */\n ActivateOn = 'activateOn',\n /** The tab list across the top, or beside the panels. */\n Orientation = 'orientation',\n /** The tab list's accessible name (`aria-label` on the role=tablist element) — the root's, edited in Accessibility. */\n Label = 'ariaLabel',\n}\n\nexport enum TabsActivateOn {\n Click = 'click',\n Hover = 'hover',\n}\n\nexport enum TabsOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\nexport const TABS_ACTIVATE_ONS: ReadonlyArray<TabsActivateOn> = [TabsActivateOn.Click, TabsActivateOn.Hover];\nexport const TABS_ORIENTATIONS: ReadonlyArray<TabsOrientation> = [TabsOrientation.Horizontal, TabsOrientation.Vertical];\n\n/** Tabs from content default to six rows: more tabs do not fit a row (board 9 Q13). */\nexport const TABS_CONTENT_LIMIT = 6;\n\n/** The breakpoint whose layer stacks a VERTICAL tabs (the list above the panels) and a panel's picture above its words. */\nexport const TABS_STACK_BREAKPOINT = CARD_STACK_BREAKPOINT;\n\nexport interface TabWords {\n label: string;\n text: string;\n}\n\n/** The words a fresh Tabs starts with — generic, the author's to replace (Card v2.1: never invented facts). */\nexport const TABS_WORDS: ReadonlyArray<TabWords> = [\n { label: 'First tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n { label: 'Second tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n { label: 'Third tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' },\n];\nexport const TABS_NEW_TAB_WORDS: Readonly<TabWords> = { label: 'New tab', text: 'Say what this tab is about in a sentence or two. Its picture sits beside it.' };\n\nenum Type {\n Container = 'Container',\n ButtonBlock = 'ButtonBlock',\n Text = 'Text',\n Image = 'Image',\n Repeater = 'Repeater',\n}\n\nenum Style {\n Root = 'box',\n List = 'tab-list',\n Tab = 'tab',\n Label = 'button-label',\n Panels = 'box',\n Panel = 'box',\n Media = 'media',\n Body = 'body',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\n/** The list's hairline, as its element style writes it — read from the contract, never retyped. */\nconst LIST_EDGE = String(elementStyleById(Style.List)?.base['borderWidth'] ?? ZERO_BOX);\n\n/** What each part holds — layout only; its LOOK is its element style. The list WRAPS at narrow widths (board 3). */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n [TabsRole.Tabs]: { display: 'flex', width: '100%', minHeight: 'auto', height: 'auto' },\n [TabsRole.List]: { display: 'flex', gap: '4px', minHeight: 'auto', height: 'auto' },\n [TabsRole.Trigger]: { width: 'auto', minHeight: 'auto', height: 'auto', cursor: 'pointer' },\n [TabsRole.Panels]: { display: 'block', width: '100%', minWidth: '0px', minHeight: 'auto', height: 'auto' },\n // Board 3: a panel is any nodes at all — the recipe's is a picture beside its words.\n [TabsRole.Panel]: { display: 'grid', gridTemplateColumns: '1fr 1.2fr', gap: '24px', alignItems: 'center', width: '100%', minHeight: 'auto', height: 'auto' },\n};\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\nconst IMAGE_BASE: Readonly<Record<string, string>> = { display: 'block', width: '100%', maxWidth: '100%', aspectRatio: '4 / 3', height: 'auto', minHeight: 'auto' };\nconst BODY_BASE: Readonly<Record<string, string>> = { margin: ZERO_BOX, padding: ZERO_BOX, minHeight: 'auto' };\n/** On a phone a panel's picture sits above its words. */\nconst PANEL_STACK: Readonly<Record<string, string>> = { gridTemplateColumns: '1fr' };\n\n/**\n * Behaviour ▸ Orientation is a PRESET over the root's and the list's layout (the Card layout precedent): every\n * orientation writes the same keys, so switching is clean and detection exact. Vertical puts the list beside the\n * panels (a column, no divider — the active tab keeps its mark) and, on a phone, stacks it above them.\n */\ninterface OrientationLayout {\n root: Readonly<Record<string, string>>;\n list: Readonly<Record<string, string>>;\n /** The phone layer (TABS_STACK_BREAKPOINT); Horizontal clears these keys from it. */\n rootStack?: Readonly<Record<string, string>>;\n listStack?: Readonly<Record<string, string>>;\n}\nconst ORIENTATION_LAYOUT: Readonly<Record<TabsOrientation, OrientationLayout>> = {\n [TabsOrientation.Horizontal]: {\n root: { flexDirection: 'column', alignItems: 'stretch', gap: '20px' },\n list: { flexDirection: 'row', flexWrap: 'wrap', width: '100%', flexShrink: '1', borderWidth: LIST_EDGE },\n },\n [TabsOrientation.Vertical]: {\n root: { flexDirection: 'row', alignItems: 'flex-start', gap: '24px' },\n list: { flexDirection: 'column', flexWrap: 'nowrap', width: 'auto', flexShrink: '0', borderWidth: ZERO_BOX },\n rootStack: { flexDirection: 'column', alignItems: 'stretch', gap: '20px' },\n listStack: { width: '100%' },\n },\n};\nconst ROOT_STACK_KEYS = ['flexDirection', 'alignItems', 'gap'];\nconst LIST_STACK_KEYS = ['width'];\n\n// ── recipe ──────────────────────────────────────────────────────────────────────────────────────\n\nexport interface TabsOptions {\n tabs?: ReadonlyArray<TabWords>;\n activateOn?: TabsActivateOn;\n orientation?: TabsOrientation;\n /** The tab list's accessible name (empty: unnamed — a section heading usually names the section). */\n label?: string;\n}\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: TabsRole | 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\nexport interface TabPair {\n tab: CompositeNode;\n panel: CompositeNode;\n}\n\n/** One tab and its panel, sharing `itemKey`. */\nexport function buildTabPair(create: CompositeNodeFactory, words: TabWords, itemKey: string): TabPair {\n const tab = make(create, `${itemKey}-tab`, Type.ButtonBlock, TabsRole.Trigger, Style.Tab, {}, 'Tab');\n tab.itemKey = itemKey;\n const label = make(create, `${itemKey}-label`, Type.Text, null, Style.Label, { content: words.label, tag: 'span' }, 'Text');\n writeStyles(label, LABEL_BASE);\n tab.children = [label];\n const panel = make(create, `${itemKey}-panel`, Type.Container, TabsRole.Panel, Style.Panel, {}, 'Panel');\n panel.itemKey = itemKey;\n writeLayerStyles(panel, TABS_STACK_BREAKPOINT, PANEL_STACK);\n const image = make(create, `${itemKey}-image`, Type.Image, null, Style.Media, { src: '', alt: '' }, 'Image');\n writeStyles(image, IMAGE_BASE);\n const text = make(create, `${itemKey}-text`, Type.Text, null, Style.Body, { content: words.text, tag: 'p' }, 'Text');\n writeStyles(text, BODY_BASE);\n panel.children = [image, text];\n return { tab, panel };\n}\n\n/** A fresh Tabs: three tabs, the first on, activated by a click, the list across the top (board 3). */\nexport function buildTabsRecipe(create: CompositeNodeFactory, options: TabsOptions = {}): CompositeNode {\n const root = make(create, 'tabs', Type.Container, TabsRole.Tabs, Style.Root, {}, 'Tabs');\n writeProp(root, TabsBehaviourTrait.ActivateOn, options.activateOn ?? TabsActivateOn.Click);\n writeProp(root, TabsBehaviourTrait.Orientation, options.orientation ?? TabsOrientation.Horizontal);\n if (options.label) writeProp(root, TabsBehaviourTrait.Label, options.label);\n const list = make(create, 'list', Type.Container, TabsRole.List, Style.List, {}, 'Tab list');\n const panels = make(create, 'panels', Type.Container, TabsRole.Panels, Style.Panels, {}, 'Panels');\n const pairs = (options.tabs ?? TABS_WORDS).map((w, i) => buildTabPair(create, w, `k${i + 1}`));\n list.children = pairs.map(p => p.tab);\n panels.children = pairs.map(p => p.panel);\n root.children = [list, panels];\n applyOrientation(root, options.orientation ?? TabsOrientation.Horizontal);\n return root;\n}\n\n// ── reading a tree ──────────────────────────────────────────────────────────────────────────────\n\nexport function isTabsRoot(node: { role?: string | null } | null | undefined): boolean {\n return node?.role === TabsRole.Tabs;\n}\n\n/** The tab list (the holder of the triggers). */\nexport function tabsListOf(root: CompositeNode): CompositeNode | undefined {\n return (root.children ?? []).find(c => c.role === TabsRole.List);\n}\n\n/** The holder of the panels. */\nexport function tabsPanelsOf(root: CompositeNode): CompositeNode | undefined {\n return (root.children ?? []).find(c => c.role === TabsRole.Panels);\n}\n\n/** The tabs in order — every tab (Manual), or the one template tab (From content). */\nexport function tabsTriggers(root: CompositeNode): CompositeNode[] {\n return (tabsListOf(root)?.children ?? []).filter(c => c.role === TabsRole.Trigger);\n}\n\n/** The panels in their holder's order (their order does not pair them — their key does). */\nexport function tabsPanels(root: CompositeNode): CompositeNode[] {\n return (tabsPanelsOf(root)?.children ?? []).filter(c => c.role === TabsRole.Panel);\n}\n\n/** True when the Tabs takes its tabs from content (its list is a Repeater, R3). */\nexport function isTabsFromContent(root: CompositeNode | null | undefined): boolean {\n return !!root && tabsListOf(root)?.type === Type.Repeater;\n}\n\n/** The panel paired with `tab` (the same key), or undefined. From content the one template panel pairs the template tab. */\nexport function tabPanelOf(root: CompositeNode, tab: CompositeNode): CompositeNode | undefined {\n if (isTabsFromContent(root)) return tabsPanels(root)[0];\n return tab.itemKey ? tabsPanels(root).find(p => p.itemKey === tab.itemKey) : undefined;\n}\n\n/** The tab paired with `panel` (the same key), or undefined. */\nexport function tabTriggerOf(root: CompositeNode, panel: CompositeNode): CompositeNode | undefined {\n if (isTabsFromContent(root)) return tabsTriggers(root)[0];\n return panel.itemKey ? tabsTriggers(root).find(t => t.itemKey === panel.itemKey) : undefined;\n}\n\n/** The other half of a tab ⇄ panel pair, or undefined for any other node. */\nexport function tabsPartnerOf(root: CompositeNode, node: CompositeNode): CompositeNode | undefined {\n if (node.role === TabsRole.Trigger) return tabPanelOf(root, node);\n if (node.role === TabsRole.Panel) return tabTriggerOf(root, node);\n return undefined;\n}\n\n/** The words a tab shows: its first Text's. */\nexport function tabLabelNodeOf(tab: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(tab, n => { if (!hit && n !== tab && n.type === Type.Text) hit = n; });\n return hit;\n}\n\nconst stripTags = (v: unknown) => String(v ?? '').replace(/<[^>]*>/g, '').trim();\n\n/** A tab's name in the Items list, the layer tree and the item-action picker: its words. */\nexport function tabLabel(tab: CompositeNode): string {\n const label = tabLabelNodeOf(tab);\n return label ? stripTags(readProp(label, 'content')) : '';\n}\n\n/** Items ▸ rename: the tab's words. */\nexport function renameTab(tab: CompositeNode, words: string): boolean {\n const label = tabLabelNodeOf(tab);\n return !!label && writeProp(label, 'content', words);\n}\n\n/** The first Text inside a panel (the words From content binds to). */\nexport function tabPanelTextOf(panel: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(panel, n => { if (!hit && n !== panel && n.type === Type.Text) hit = n; });\n return hit;\n}\n\n/** The first Image inside a panel. */\nexport function tabPanelImageOf(panel: CompositeNode): CompositeNode | undefined {\n let hit: CompositeNode | undefined;\n walkComposite(panel, n => { if (!hit && n.type === Type.Image) hit = n; });\n return hit;\n}\n\nexport interface TabsBehaviour {\n activateOn: TabsActivateOn;\n orientation: TabsOrientation;\n}\n\n/** The root's behaviour (an unset trait reads its default: a click, the list across the top). */\nexport function tabsBehaviour(root: CompositeNode | null | undefined): TabsBehaviour {\n const on = root ? readProp(root, TabsBehaviourTrait.ActivateOn) : undefined;\n const orientation = root ? readProp(root, TabsBehaviourTrait.Orientation) : undefined;\n return {\n activateOn: TABS_ACTIVATE_ONS.includes(on as TabsActivateOn) ? on as TabsActivateOn : TabsActivateOn.Click,\n orientation: TABS_ORIENTATIONS.includes(orientation as TabsOrientation) ? orientation as TabsOrientation : TabsOrientation.Horizontal,\n };\n}\n\n/** The tab list's accessible name (empty when unnamed). */\nexport function tabsLabel(root: CompositeNode | null | undefined): string {\n return root ? String(readProp(root, TabsBehaviourTrait.Label) ?? '').trim() : '';\n}\n\n/** Write the orientation preset into the root's and the list's layout (both orientations write the same keys). */\nfunction applyOrientation(root: CompositeNode, orientation: TabsOrientation): void {\n const spec = ORIENTATION_LAYOUT[orientation];\n const list = tabsListOf(root);\n writeStyles(root, spec.root);\n if (list) writeStyles(list, spec.list);\n if (spec.rootStack) writeLayerStyles(root, TABS_STACK_BREAKPOINT, spec.rootStack);\n else clearLayerStyles(root, TABS_STACK_BREAKPOINT, ROOT_STACK_KEYS);\n if (list) {\n if (spec.listStack) writeLayerStyles(list, TABS_STACK_BREAKPOINT, spec.listStack);\n else clearLayerStyles(list, TABS_STACK_BREAKPOINT, LIST_STACK_KEYS);\n }\n}\n\n/** Behaviour ▸ Activate on / Orientation (and Accessibility ▸ the list's name). False when the root has no such trait. */\nexport function setTabsBehaviour(root: CompositeNode, patch: Partial<TabsBehaviour> & { label?: string }): boolean {\n let ok = true;\n if (patch.activateOn !== undefined) ok = writeProp(root, TabsBehaviourTrait.ActivateOn, patch.activateOn) && ok;\n if (patch.orientation !== undefined) {\n ok = writeProp(root, TabsBehaviourTrait.Orientation, patch.orientation) && ok;\n applyOrientation(root, patch.orientation);\n }\n if (patch.label !== undefined) ok = writeProp(root, TabsBehaviourTrait.Label, patch.label) && ok;\n return ok;\n}\n\n// ── editing (Items list, selection toolbar ▸ Add tab, the structure guard) ──────────────────────\n\n/** A key no tab of `root` holds yet (`k4`…). */\nexport function nextTabKey(root: CompositeNode): string {\n const taken = new Set([...tabsTriggers(root), ...tabsPanels(root)].map(n => n.itemKey).filter(Boolean));\n let n = tabsTriggers(root).length + 1;\n while (taken.has(`k${n}`)) n++;\n return `k${n}`;\n}\n\n/** Items ▸ Add tab (and the toolbar's \"Add tab\"): a fresh tab after `after` (or at the end) AND its panel. */\nexport function addTabPair(root: CompositeNode, create: CompositeNodeFactory, after?: CompositeNode | null, words: TabWords = TABS_NEW_TAB_WORDS): TabPair | null {\n const list = tabsListOf(root);\n const panels = tabsPanelsOf(root);\n if (!list || !panels || isTabsFromContent(root)) return null;\n const pair = buildTabPair(create, words, nextTabKey(root));\n const tabs = [...(list.children ?? [])];\n const afterTab = after ? (after.role === TabsRole.Panel ? tabTriggerOf(root, after) : after) : null;\n const at = afterTab ? tabs.indexOf(afterTab) : -1;\n tabs.splice(at < 0 ? tabs.length : at + 1, 0, pair.tab);\n list.children = tabs;\n const afterPanel = afterTab ? tabPanelOf(root, afterTab) : null;\n const held = [...(panels.children ?? [])];\n const pAt = afterPanel ? held.indexOf(afterPanel) : -1;\n held.splice(pAt < 0 ? held.length : pAt + 1, 0, pair.panel);\n panels.children = held;\n return pair;\n}\n\nfunction moveIn(holder: CompositeNode, node: CompositeNode, toIndex: number, role: TabsRole): void {\n const children = [...(holder.children ?? [])];\n const from = children.indexOf(node);\n if (from < 0) return;\n children.splice(from, 1);\n const same = children.filter(c => c.role === role);\n const anchor = same[Math.max(0, Math.min(toIndex, same.length))];\n children.splice(anchor ? children.indexOf(anchor) : children.length, 0, node);\n holder.children = children;\n}\n\n/** Items ▸ drag to reorder: move a tab — and its panel, so the layer tree reads in the same order — to `toIndex`.\n * The pairing never depended on the order. False when `tab` is not one of the root's tabs. */\nexport function moveTabPair(root: CompositeNode, tab: CompositeNode, toIndex: number): boolean {\n const list = tabsListOf(root);\n const panels = tabsPanelsOf(root);\n if (!list || tab.role !== TabsRole.Trigger || !(list.children ?? []).includes(tab)) return false;\n const panel = tabPanelOf(root, tab);\n moveIn(list, tab, toIndex, TabsRole.Trigger);\n if (panel && panels) moveIn(panels, panel, toIndex, TabsRole.Panel);\n return true;\n}\n\n/** Remove a tab and its panel (the pair) — what \"Delete tab and its panel\" does. True when the tab was removed. */\nexport function removeTabPair(root: CompositeNode, node: CompositeNode): boolean {\n const tab = node.role === TabsRole.Panel ? tabTriggerOf(root, node) : node;\n const list = tabsListOf(root);\n if (!tab || !list || tab.role !== TabsRole.Trigger) return false;\n const panel = tabPanelOf(root, tab);\n list.children = (list.children ?? []).filter(c => c !== tab);\n const panels = tabsPanelsOf(root);\n if (panel && panels) panels.children = (panels.children ?? []).filter(c => c !== panel);\n return true;\n}\n\nexport enum TabsEditRefusal {\n /** A Tabs keeps at least one tab (composite plan T18). */\n LastTab = 'last-tab',\n}\n\n/** Why removing `node` (a tab or a panel) from `root` is refused, or null. */\nexport function tabsRemovalRefusal(root: CompositeNode | null | undefined, node: CompositeNode | null | undefined): TabsEditRefusal | null {\n if (!root || (node?.role !== TabsRole.Trigger && node?.role !== TabsRole.Panel)) return null;\n return tabsTriggers(root).length <= 1 ? TabsEditRefusal.LastTab : null;\n}\n\n/** Every \"Item open\" (`trigger-on`) state inside a tab or a panel points at ITS tab or panel — the part that carries\n * `data-iox-on` while its item is on. */\nexport function tabsItemTriggerIds(root: CompositeNode): void {\n for (const part of [...tabsTriggers(root), ...tabsPanels(root)]) {\n if (!part.id) continue;\n walkComposite(part, n => {\n if (n === part || !n.stateStyles?.[ITEM_OPEN_STATE]) return;\n n.stateTriggers = { ...(n.stateTriggers ?? {}), [ITEM_OPEN_STATE]: part.id! };\n });\n }\n}\n\n// ── state, ids and attributes (both renderers, SSR included) ───────────────────────────────────\n\n/** The render scope of one EXCLUSIVE composite (a Tabs; a Segmented control, CC4b): its kind, scope id, behaviour, every\n * item key in order and the one that is on. */\nexport interface TabsScope {\n /** The exclusive kind it renders (a scope without one is a Tabs'). */\n kind?: ExclusiveCompositeKind;\n rootId: string;\n behaviour: TabsBehaviour;\n keys: ReadonlyArray<string>;\n /** The key on at first paint: the first tab (null when there is none). */\n active: string | null;\n label: string;\n}\n\nexport function tabsScope(rootId: string, behaviour: TabsBehaviour, keys: ReadonlyArray<string>, label = ''): TabsScope {\n return { kind: CompositeKind.Tabs, rootId, behaviour, keys, active: keys[0] ?? null, label };\n}\n\n/** The item keys a manual Tabs pairs by — its tabs' own keys, in order (a tab with none by its index). */\nexport function manualTabKeys(root: CompositeNode): string[] {\n return tabsTriggers(root).map((t, i) => t.itemKey || `item-${i}`);\n}\n\nexport interface TabsItemState {\n key: string;\n on: boolean;\n ids: AccordionDomIds;\n}\n\n/** One item's render state: its key, whether it is on, and its ARIA ids (`iox-tab-<scope>-<key>-h` / `-p`). */\nexport function tabsItemState(scope: TabsScope, key: string): TabsItemState {\n return { key, on: scope.active === key, ids: accordionDomIds(scope.rootId, key, CompositeKind.Tabs) };\n}\n\nexport const ACTIVATE_ON_ATTRIBUTE = 'data-iox-activate-on';\nexport const ORIENTATION_ATTRIBUTE = 'data-iox-orientation';\n\nexport function tabsRootAttributes(behaviour: TabsBehaviour, scopeId?: string): DomAttributes {\n return {\n [COMPOSITE_ATTRIBUTE]: CompositeKind.Tabs,\n [ACTIVATE_ON_ATTRIBUTE]: behaviour.activateOn,\n [ORIENTATION_ATTRIBUTE]: behaviour.orientation,\n ...(scopeId ? { [SCOPE_ATTRIBUTE]: scopeId } : {}),\n };\n}\n\n/** The tab list: `role=tablist`, vertical said aloud, named by the root's label. */\nexport function tabListAttributes(behaviour: TabsBehaviour, label = ''): DomAttributes {\n return {\n role: 'tablist',\n ...(behaviour.orientation === TabsOrientation.Vertical ? { 'aria-orientation': 'vertical' } : {}),\n ...(label ? { 'aria-label': label } : {}),\n };\n}\n\n/** A tab: a real button that selects its panel — selected = the one tab in the Tab order (roving tabindex). */\nexport function tabTriggerAttributes(state: TabsItemState): DomAttributes {\n return {\n type: 'button',\n role: 'tab',\n id: state.ids.trigger,\n 'aria-selected': state.on ? 'true' : 'false',\n 'aria-controls': state.ids.panel,\n tabindex: state.on ? '0' : '-1',\n [ITEM_KEY_ATTRIBUTE]: state.key,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : {}),\n };\n}\n\n/** A panel: `role=tabpanel`, named by its tab, a Tab stop of its own, and `hidden` (display:none) while off. */\nexport function tabPanelAttributes(state: TabsItemState): DomAttributes {\n return {\n role: 'tabpanel',\n id: state.ids.panel,\n 'aria-labelledby': state.ids.trigger,\n tabindex: '0',\n [ITEM_KEY_ATTRIBUTE]: state.key,\n ...(state.on ? { [ON_ATTRIBUTE]: '' } : { hidden: '' }),\n };\n}\n\n/**\n * The render scope of one rendered Tabs — ONE decision for both engine paths (and the composer's checks): its scope id\n * (its node id + the rows around it, vectoriox/iox-ui#20), its behaviour, its list's name and every item key in order —\n * a manual tab's own `itemKey`, or, From content, each ROW's own id (R3: never its index — a reorder in the CMS keeps\n * every tab with its own panel). `rows` = the rows the tab list's Repeater resolved (null for a manual Tabs).\n */\nexport function tabsScopeFor(root: CompositeNode, rootCssId: string, rows: ReadonlyArray<unknown> | null, rowKeys: ReadonlyArray<string> = []): TabsScope {\n const keys = rows ? rows.map((row, i) => rowItemKey(row, i)) : manualTabKeys(root);\n return tabsScope(compositeScopeId(rootCssId, rowKeys), tabsBehaviour(root), keys, tabsLabel(root));\n}\n\n/** The key a manual tab or panel renders with: its own key, else its index among its kind. */\nexport function tabPartKey(node: CompositeNode, index: number): string {\n return node.itemKey || `item-${index}`;\n}\n\n/**\n * The attributes a part of a Tabs writes on its own element (both engine paths, SSR included): the root's data\n * attributes (its scope id when it sits in repeated rows), the list's role and name, a tab's and a panel's state by\n * `key` (its own key, or — From content — its row's). Anything else writes nothing.\n */\nexport function tabsPartAttributes(node: { role?: string | null }, scope: TabsScope, key: string | null, rowScoped = false): DomAttributes {\n switch (node.role) {\n case TabsRole.Tabs: return tabsRootAttributes(scope.behaviour, rowScoped ? scope.rootId : undefined);\n case TabsRole.List: return tabListAttributes(scope.behaviour, scope.label);\n case TabsRole.Trigger: return key ? tabTriggerAttributes(tabsItemState(scope, key)) : {};\n case TabsRole.Panel: return key ? tabPanelAttributes(tabsItemState(scope, key)) : {};\n default: return {};\n }\n}\n\n/**\n * The APG tabs keys on a tab (automatic activation): → / ← move along a horizontal list — mirrored under RTL — and ↓ /\n * ↑ along a vertical one; Home / End jump. Every move wraps. Enter / Space are the button's own.\n */\nexport function tabsKeyAction(key: string, orientation: TabsOrientation, rtl = false): AccordionKeyAction | null {\n if (key === 'Home') return AccordionKeyAction.First;\n if (key === 'End') return AccordionKeyAction.Last;\n if (orientation === TabsOrientation.Vertical) {\n if (key === 'ArrowDown') return AccordionKeyAction.Next;\n if (key === 'ArrowUp') return AccordionKeyAction.Previous;\n return null;\n }\n if (key === 'ArrowRight') return rtl ? AccordionKeyAction.Previous : AccordionKeyAction.Next;\n if (key === 'ArrowLeft') return rtl ? AccordionKeyAction.Next : AccordionKeyAction.Previous;\n return null;\n}\n\n// ── Items from content (R3, composite T39) ──────────────────────────────────────────────────────\n\nconst SHORT_TEXT = new Set(['text']);\nconst LONG_TEXT = new Set(['textarea', 'richText', 'editor']);\nconst IMAGE_CONTROLLERS = new Set(['image', 'media', 'file']);\n\nexport interface TabsAutoBinds {\n /** The first short-text field: the tab's words. */\n label: string | null;\n /** The first long-text field: the panel's words. */\n text: string | null;\n /** The first image field: the panel's picture. */\n image: string | null;\n}\n\n/** R3 (board 3 \"Tabs from content\"): switching to From content binds the tab's words to the first short-text field,\n * the panel's words to the first long-text field and its picture to the first image field. ONE rule for the builder's\n * switch and the composer. */\nexport function pickTabsAutoBinds(fields: ReadonlyArray<ContentFieldLike>): TabsAutoBinds {\n const isString = (f: ContentFieldLike) => !f.type || f.type === 'string';\n const label = fields.find(f => isString(f) && SHORT_TEXT.has(String(f.controller ?? 'text')))?.name ?? null;\n const text = fields.find(f => isString(f) && LONG_TEXT.has(String(f.controller ?? '')) && f.name !== label)?.name ?? null;\n const image = fields.find(f => IMAGE_CONTROLLERS.has(String(f.controller ?? '')) && f.name !== label && f.name !== text)?.name ?? null;\n return { label, text, image };\n}\n\n/** The bound props of a tab's words, a panel's words and its picture. */\nexport const TABS_LABEL_BIND_PROP = 'content';\nexport const TABS_TEXT_BIND_PROP = 'content';\nexport const TABS_IMAGE_BIND_PROP = 'src';\n\n/**\n * Manual → From content (board 9 \"Items: Manual · From content\"): the list becomes `listRepeater` and the panels\n * holder `panelsRepeater` (Repeater nodes the caller created with the same ids, roles, names, element styles and\n * styles — a type change is the consumer's). The FIRST tab and ITS panel become the templates (their parts, styles\n * and interactions kept; their keys dropped — a row's key is its id); every other pair is removed. Returns the removed\n * nodes.\n */\nexport function tabsToContent(root: CompositeNode, listRepeater: CompositeNode, panelsRepeater: CompositeNode): CompositeNode[] {\n const [tab, ...restTabs] = tabsTriggers(root);\n const panel = tab ? tabPanelOf(root, tab) : undefined;\n const restPanels = tabsPanels(root).filter(p => p !== panel);\n if (tab) delete tab.itemKey;\n if (panel) delete panel.itemKey;\n listRepeater.role = TabsRole.List;\n panelsRepeater.role = TabsRole.Panels;\n listRepeater.children = tab ? [tab] : [];\n panelsRepeater.children = panel ? [panel] : [];\n root.children = (root.children ?? []).map(c => (c.role === TabsRole.List ? listRepeater : c.role === TabsRole.Panels ? panelsRepeater : c));\n return [...restTabs, ...restPanels];\n}\n\ninterface BoundNode extends CompositeNode {\n bindings?: CompositeBinding[];\n}\n\nfunction writeRowIn(node: CompositeNode, row: unknown, resolve: (row: unknown, binding: CompositeBinding) => unknown): void {\n walkComposite(node, 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}\n\n/**\n * From content → Manual: the rows come in as static pairs — each a copy of the template tab and panel (`clone`, which\n * gives the copy fresh ids) whose bound words are written in as its own and whose bindings are dropped. `list` and\n * `panels` are the manual holders the caller created. Returns the new pairs.\n */\nexport function tabsToManual(root: CompositeNode, list: CompositeNode, panels: CompositeNode, rows: ReadonlyArray<unknown>,\n clone: (template: CompositeNode) => CompositeNode, resolve: (row: unknown, binding: CompositeBinding) => unknown): TabPair[] {\n const [tabTemplate] = tabsTriggers(root);\n const panelTemplate = tabsPanels(root)[0];\n list.role = TabsRole.List;\n panels.role = TabsRole.Panels;\n const pairs = tabTemplate && panelTemplate ? rows.map((row, i) => {\n const tab = clone(tabTemplate);\n const panel = clone(panelTemplate);\n tab.itemKey = panel.itemKey = `k${i + 1}`;\n writeRowIn(tab, row, resolve);\n writeRowIn(panel, row, resolve);\n return { tab, panel };\n }) : [];\n list.children = pairs.map(p => p.tab);\n panels.children = pairs.map(p => p.panel);\n root.children = (root.children ?? []).map(c => (c.role === TabsRole.List ? list : c.role === TabsRole.Panels ? panels : c));\n return pairs;\n}\n\n","import {\n AccordionKeyAction, CompositeBehaviourTrait, compositeScopeId, COMPOSITE_ATTRIBUTE, DEFAULT_ON_ATTRIBUTE, DomAttributes, ITEM_KEY_ATTRIBUTE,\n ITEM_OPEN_STATE, ON_ATTRIBUTE, SCOPE_ATTRIBUTE,\n} from './accordion';\nimport { BadgeTone, buildBadge } from './badge';\nimport { CompositeKind, SegmentedRole } from './composite-kinds';\nimport { CompositeNode, CompositeNodeFactory, makeCompositePart, readProp, walkComposite, writeProp, writeStyles } from './composite-node';\nimport { TabsActivateOn, TabsBehaviour, TabsOrientation, TabsScope } from './tabs';\n\n/**\n * THE SEGMENTED CONTROL (CC4b — composite K4 T32, pulled forward; complex-components board 10, APPROVED 2026-10-23 with\n * Q31–Q40 as recommended). One of a few, always one on, FIXED options (R3 / Q36). Not a component: a recipe of\n * ordinary nodes, each part carrying a role, so every option, its words and its optional badge are selectable on the\n * canvas, in the layer tree and the breadcrumb, and wear their own element styles (R2).\n *\n * Container `segmented` role segmented traits defaultOn (an option's key) · ariaLabel (its name)\n * └─ ButtonBlock `segmented-option` ×2–4 role segmented.option itemKey monthly · yearly … → <button role=radio>\n * ├─ Text `button-label` the words\n * └─ Container `badge-success` role segmented.badge (optional, off) › Icon + Text — a placeholder (a price claim)\n *\n * The ARIA shape is the APG RADIO GROUP (Q31): `role=radiogroup` + its accessible name on the root, `<button role=radio\n * aria-checked>` per option with a roving tabindex — one Tab stop; ← → follow the reading direction (mirrored under\n * RTL), ↑ ↓ the DOM order, every move wraps and turns the option on. It runs the EXCLUSIVE runtime the Tabs run\n * (`exclusive-runtime.ts`), on the builder canvas and both engine paths, from the attribute planners below. What follows\n * the control (a price) is an ordinary node OUTSIDE it styled \"when its option is on\" — the targeted `trigger-on`.\n */\n\nexport enum SegmentedTrait {\n /** The option on at first paint — an option's key. */\n DefaultOn = CompositeBehaviourTrait.DefaultOn,\n /** The radio group's accessible name (`aria-label` on the root). Empty → an audit finding. */\n Label = 'ariaLabel',\n}\n\n/** Q40: two options at least, four at most (past four the words no longer fit a phone row — a Select or Tabs then). */\nexport const SEGMENTED_MIN_OPTIONS = 2;\nexport const SEGMENTED_MAX_OPTIONS = 4;\n\nexport interface SegmentedOptionWords {\n key: string;\n label: string;\n}\n\n/** A fresh Segmented control's options (board 10: a billing period) — generic words, the author's to rename. */\nexport const SEGMENTED_WORDS: ReadonlyArray<SegmentedOptionWords> = [\n { key: 'monthly', label: 'Monthly' },\n { key: 'yearly', label: 'Yearly' },\n];\nexport const SEGMENTED_NEW_OPTION_WORDS = 'New option';\n/** The name a fresh control carries (board 10). */\nexport const SEGMENTED_NAME = 'Billing period';\n/** Q33: the saving badge's words start as a PLACEHOLDER — a saving is a price claim, never invented. */\nexport const SEGMENTED_BADGE_WORDS = 'Yearly saving';\nexport const SEGMENTED_BADGE_TONE = BadgeTone.Success;\n\nenum Type {\n Container = 'Container',\n ButtonBlock = 'ButtonBlock',\n Text = 'Text',\n}\n\nenum Style {\n Root = 'segmented',\n Option = 'segmented-option',\n Label = 'button-label',\n}\n\nconst ZERO_BOX = '0px 0px 0px 0px';\n\n/** What each part holds — layout only; its LOOK is its element style (the track's fill, border, radius and pad; the\n * option's ink, pad, radius and 44px target). The options sit in a flex row a gap token apart (board 10). */\nconst PART_BASE: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n [SegmentedRole.Segmented]: { display: 'inline-flex', flexDirection: 'row', alignItems: 'stretch', gap: 'var(--iox-segmented-gap)', width: 'auto', maxWidth: '100%', height: 'auto' },\n [SegmentedRole.Option]: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: '8px', width: 'auto', height: 'auto', cursor: 'pointer' },\n};\nconst LABEL_BASE: Readonly<Record<string, string>> = { width: 'auto', minHeight: 'auto', padding: ZERO_BOX, margin: ZERO_BOX };\n/** The badge inside an option keeps to the option's row (never its own line). */\nconst BADGE_IN_OPTION: Readonly<Record<string, string>> = { alignSelf: 'center' };\n\nfunction make(create: CompositeNodeFactory, key: string, type: string, role: SegmentedRole | 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// ── recipe ──────────────────────────────────────────────────────────────────────────────────────\n\nexport interface SegmentedOptions {\n options?: ReadonlyArray<SegmentedOptionWords>;\n /** The option on by default (its key); else the first. */\n defaultOn?: string;\n /** The radio group's accessible name. */\n label?: string;\n}\n\n/** One option: a ButtonBlock carrying its key, holding its words. */\nexport function buildSegmentedOption(create: CompositeNodeFactory, words: SegmentedOptionWords): CompositeNode {\n const option = make(create, `${words.key}-option`, Type.ButtonBlock, SegmentedRole.Option, Style.Option, {}, 'Option');\n option.itemKey = words.key;\n const label = make(create, `${words.key}-label`, Type.Text, null, Style.Label, { content: words.label, tag: 'span' }, 'Text');\n writeStyles(label, LABEL_BASE);\n option.children = [label];\n return option;\n}\n\n/** A fresh Segmented control: Monthly · Yearly, Monthly on, named \"Billing period\" (board 10 ▸ Palette). */\nexport function buildSegmentedRecipe(create: CompositeNodeFactory, options: SegmentedOptions = {}): CompositeNode {\n const words = options.options ?? SEGMENTED_WORDS;\n const root = make(create, 'segmented', Type.Container, SegmentedRole.Segmented, Style.Root, {}, 'Segmented');\n root.children = words.map(w => buildSegmentedOption(create, w));\n writeProp(root, SegmentedTrait.DefaultOn, options.defaultOn && words.some(w => w.key === options.defaultOn) ? options.defaultOn : words[0]?.key ?? '');\n writeProp(root, SegmentedTrait.Label, options.label ?? SEGMENTED_NAME);\n return root;\n}\n\n// ── reading a tree ──────────────────────────────────────────────────────────────────────────────\n\nexport function isSegmentedRoot(node: { role?: string | null } | null | undefined): boolean {\n return node?.role === SegmentedRole.Segmented;\n}\n\n/** The options in order. */\nexport function segmentedOptions(root: CompositeNode | null | undefined): CompositeNode[] {\n return (root?.children ?? []).filter(c => c.role === SegmentedRole.Option);\n}\n\n/** The key an option renders with: its own key, else its index among the options. */\nexport function segmentedOptionKey(option: CompositeNode, index: number): string {\n return option.itemKey || `item-${index}`;\n}\n\n/** Every option's key, in order. */\nexport function segmentedKeys(root: CompositeNode | null | undefined): string[] {\n return segmentedOptions(root).map((o, i) => segmentedOptionKey(o, i));\n}\n\n/** The words an option shows: its first Text that is not inside its badge. */\nexport function segmentedOptionLabelNodeOf(option: CompositeNode): CompositeNode | undefined {\n for (const child of option.children ?? []) {\n if (child.role === SegmentedRole.Badge) continue;\n if (child.type === Type.Text) return child;\n let hit: CompositeNode | undefined;\n walkComposite(child, n => { if (!hit && n.type === Type.Text) hit = n; });\n if (hit) return hit;\n }\n return undefined;\n}\n\nconst stripTags = (v: unknown) => String(v ?? '').replace(/<[^>]*>/g, '').trim();\n\n/** An option's name in the Options list, the layer tree, the item pickers and \"Showing on canvas\": its words. */\nexport function segmentedOptionLabel(option: CompositeNode): string {\n const label = segmentedOptionLabelNodeOf(option);\n return label ? stripTags(readProp(label, 'content')) : '';\n}\n\n/** Options ▸ rename: the option's words. */\nexport function renameSegmentedOption(option: CompositeNode, words: string): boolean {\n const label = segmentedOptionLabelNodeOf(option);\n return !!label && writeProp(label, 'content', words);\n}\n\n/** The radio group's accessible name (empty when unnamed). */\nexport function segmentedLabel(root: CompositeNode | null | undefined): string {\n return root ? String(readProp(root, SegmentedTrait.Label) ?? '').trim() : '';\n}\n\n/** The option on by default: the stored key when it still names an option, else the first option. */\nexport function segmentedDefaultOn(root: CompositeNode | null | undefined): string | null {\n const keys = segmentedKeys(root);\n const stored = root ? String(readProp(root, SegmentedTrait.DefaultOn) ?? '') : '';\n return keys.includes(stored) ? stored : keys[0] ?? null;\n}\n\n/** Behaviour ▸ On by default and Accessibility ▸ Name. False when the root has no such trait. */\nexport function setSegmentedBehaviour(root: CompositeNode, patch: { defaultOn?: string; label?: string }): boolean {\n let ok = true;\n if (patch.defaultOn !== undefined) ok = writeProp(root, SegmentedTrait.DefaultOn, patch.defaultOn) && ok;\n if (patch.label !== undefined) ok = writeProp(root, SegmentedTrait.Label, patch.label) && ok;\n return ok;\n}\n\n// ── editing (Options list, toolbar ▸ Add option, the structure guard) ───────────────────────────\n\nexport enum SegmentedEditRefusal {\n /** Q40: a Segmented control keeps at least two options. */\n MinOptions = 'min-options',\n /** Q40: a Segmented control holds four options at most. */\n MaxOptions = 'max-options',\n}\n\n/** Why adding an option to `root` is refused (four already), or null. */\nexport function segmentedAddRefusal(root: CompositeNode | null | undefined): SegmentedEditRefusal | null {\n return root && segmentedOptions(root).length >= SEGMENTED_MAX_OPTIONS ? SegmentedEditRefusal.MaxOptions : null;\n}\n\n/** Why removing an option from `root` is refused (two left), or null. */\nexport function segmentedRemovalRefusal(root: CompositeNode | null | undefined, node?: CompositeNode | null): SegmentedEditRefusal | null {\n if (!root || (node && node.role !== SegmentedRole.Option)) return null;\n return segmentedOptions(root).length <= SEGMENTED_MIN_OPTIONS ? SegmentedEditRefusal.MinOptions : null;\n}\n\n/** A key no option of `root` holds yet (`k3`…). */\nexport function nextSegmentedKey(root: CompositeNode): string {\n const taken = new Set(segmentedOptions(root).map(o => o.itemKey).filter(Boolean));\n let n = segmentedOptions(root).length + 1;\n while (taken.has(`k${n}`)) n++;\n return `k${n}`;\n}\n\n/** Options ▸ Add option (and the toolbar's \"Add option\"): a fresh option after `after` (or at the end). Null when\n * refused (four already). */\nexport function addSegmentedOption(root: CompositeNode, create: CompositeNodeFactory, after?: CompositeNode | null,\n words: string = SEGMENTED_NEW_OPTION_WORDS): CompositeNode | null {\n if (segmentedAddRefusal(root)) return null;\n const option = buildSegmentedOption(create, { key: nextSegmentedKey(root), label: words });\n const children = [...(root.children ?? [])];\n const at = after ? children.indexOf(after) : -1;\n children.splice(at < 0 ? children.length : at + 1, 0, option);\n root.children = children;\n return option;\n}\n\n/** Options ▸ ✕: remove an option. False when refused (two left) or `option` is not one of the root's. A removed\n * default hands \"On by default\" to the first option left. */\nexport function removeSegmentedOption(root: CompositeNode, option: CompositeNode): boolean {\n if (segmentedRemovalRefusal(root, option) || !segmentedOptions(root).includes(option)) return false;\n const wasDefault = segmentedDefaultOn(root) === option.itemKey;\n root.children = (root.children ?? []).filter(c => c !== option);\n if (wasDefault) writeProp(root, SegmentedTrait.DefaultOn, segmentedKeys(root)[0] ?? '');\n return true;\n}\n\n/** Options ▸ drag to reorder: move an option to `toIndex` among the options. */\nexport function moveSegmentedOption(root: CompositeNode, option: CompositeNode, toIndex: number): boolean {\n const children = [...(root.children ?? [])];\n const from = children.indexOf(option);\n if (from < 0 || option.role !== SegmentedRole.Option) return false;\n children.splice(from, 1);\n const options = children.filter(c => c.role === SegmentedRole.Option);\n const anchor = options[Math.max(0, Math.min(toIndex, options.length))];\n children.splice(anchor ? children.indexOf(anchor) : children.length, 0, option);\n root.children = children;\n return true;\n}\n\n/** The saving badge inside an option, or undefined. */\nexport function segmentedBadgeOf(option: CompositeNode | null | undefined): CompositeNode | undefined {\n return (option?.children ?? []).find(c => c.role === SegmentedRole.Badge);\n}\n\n/** Option ▸ Saving badge (Q33): stamp the badge (`badge-success` › Icon + Text, the placeholder words) inside the\n * option, after its words — or remove it. Returns the badge stamped, or null (removed / nothing changed). */\nexport function setSegmentedBadge(option: CompositeNode, on: boolean, create?: CompositeNodeFactory): CompositeNode | null {\n const existing = segmentedBadgeOf(option);\n if (!on) {\n if (existing) option.children = (option.children ?? []).filter(c => c !== existing);\n return null;\n }\n if (existing || !create) return null;\n const badge = buildBadge(create, { tone: SEGMENTED_BADGE_TONE, text: SEGMENTED_BADGE_WORDS, key: `${option.itemKey ?? 'option'}-badge` });\n badge.role = SegmentedRole.Badge;\n badge.label = 'Badge';\n writeStyles(badge, BADGE_IN_OPTION);\n option.children = [...(option.children ?? []), badge];\n return badge;\n}\n\n/** Every \"Option on\" (`trigger-on`) state inside an option points at ITS option — the part that carries\n * `data-iox-on` while it is on. */\nexport function segmentedItemTriggerIds(root: CompositeNode): void {\n for (const option of segmentedOptions(root)) {\n if (!option.id) continue;\n walkComposite(option, n => {\n if (n === option || !n.stateStyles?.[ITEM_OPEN_STATE]) return;\n n.stateTriggers = { ...(n.stateTriggers ?? {}), [ITEM_OPEN_STATE]: option.id! };\n });\n }\n}\n\n// ── state and attributes (both renderers, SSR included) ────────────────────────────────────────\n\n/** A Segmented control behaves like a horizontal Tabs activated by a click — only its keys and markup differ. */\nexport const SEGMENTED_BEHAVIOUR: Readonly<TabsBehaviour> = { activateOn: TabsActivateOn.Click, orientation: TabsOrientation.Horizontal };\n\n/** The render scope of one Segmented control: its scope id, every option key in order, the one on at first paint (its\n * default) and its name — ONE decision for both engine paths. */\nexport function segmentedScopeFor(root: CompositeNode, rootCssId: string, rowKeys: ReadonlyArray<string> = []): TabsScope {\n const keys = segmentedKeys(root);\n return {\n kind: CompositeKind.Segmented,\n rootId: compositeScopeId(rootCssId, rowKeys),\n behaviour: SEGMENTED_BEHAVIOUR,\n keys,\n active: segmentedDefaultOn(root),\n label: segmentedLabel(root),\n };\n}\n\n/** The root: the radio group, named; its default and (inside repeated rows) its scope id ride on it. */\nexport function segmentedRootAttributes(label: string, defaultOn: string | null, scopeId?: string): DomAttributes {\n return {\n [COMPOSITE_ATTRIBUTE]: CompositeKind.Segmented,\n role: 'radiogroup',\n ...(label ? { 'aria-label': label } : {}),\n ...(defaultOn ? { [DEFAULT_ON_ATTRIBUTE]: defaultOn } : {}),\n ...(scopeId ? { [SCOPE_ATTRIBUTE]: scopeId } : {}),\n };\n}\n\n/** The root's attributes read off the node itself (the engine writes a root's own attributes from its parent's scope). */\nexport function segmentedRootAttributesOf(root: CompositeNode, scopeId?: string): DomAttributes {\n return segmentedRootAttributes(segmentedLabel(root), segmentedDefaultOn(root), scopeId);\n}\n\n/** An option: a real button announced as a radio — checked = the one option in the Tab order (roving tabindex). */\nexport function segmentedOptionAttributes(key: string, on: boolean): DomAttributes {\n return {\n type: 'button',\n role: 'radio',\n 'aria-checked': on ? 'true' : 'false',\n tabindex: on ? '0' : '-1',\n [ITEM_KEY_ATTRIBUTE]: key,\n ...(on ? { [ON_ATTRIBUTE]: '' } : {}),\n };\n}\n\n/** The attributes a part of a Segmented control writes on its own element (both engine paths, SSR included). */\nexport function segmentedPartAttributes(node: { role?: string | null }, scope: TabsScope, key: string | null, rowScoped = false): DomAttributes {\n switch (node.role) {\n case SegmentedRole.Segmented: return segmentedRootAttributes(scope.label, scope.active, rowScoped ? scope.rootId : undefined);\n case SegmentedRole.Option: return key ? segmentedOptionAttributes(key, scope.active === key) : {};\n default: return {};\n }\n}\n\n/**\n * The APG radio group's keys on an option: → / ↓ the next option, ← / ↑ the previous — ← and → follow the reading\n * direction (mirrored under RTL: ← is the next option), ↑ ↓ always the DOM order. Every move wraps and turns the option\n * on. Space / Enter are the button's own (a click: it turns on).\n */\nexport function segmentedKeyAction(key: string, rtl = false): AccordionKeyAction | null {\n switch (key) {\n case 'ArrowDown': return AccordionKeyAction.Next;\n case 'ArrowUp': return AccordionKeyAction.Previous;\n case 'ArrowRight': return rtl ? AccordionKeyAction.Previous : AccordionKeyAction.Next;\n case 'ArrowLeft': return rtl ? AccordionKeyAction.Next : AccordionKeyAction.Previous;\n default: return null;\n }\n}\n","import { DomAttributes } from './accordion';\nimport { CompositeKind, exclusiveKindOf } from './composite-kinds';\nimport { CompositeNode } from './composite-node';\nimport {\n isSegmentedRoot, SEGMENTED_BEHAVIOUR, segmentedDefaultOn, segmentedLabel, segmentedOptionLabel, segmentedPartAttributes, segmentedRootAttributesOf,\n segmentedScopeFor,\n} from './segmented';\nimport { tabLabel, TabsBehaviour, tabsBehaviour, tabsLabel, tabsListOf, tabsPartAttributes, tabsRootAttributes, TabsScope, tabsScopeFor } from './tabs';\n\n/**\n * ONE render decision for every EXCLUSIVE composite — a Tabs (CC4a) or a Segmented control (CC4b) — so both engine paths\n * (the string renderer and the component path) and the composer ask by kind once and never by role literal: the scope\n * a root renders its parts with, the root's own attributes, and each part's.\n */\n\nexport type ExclusiveScope = TabsScope;\n\nconst REPEATER = 'Repeater';\n\n/** The scope an exclusive root renders its parts with: a Segmented control's options and default, or a Tabs' keys —\n * From content, the rows its list's Repeater resolved (`rowsOf`). `rowKeys` = the repeated rows around the root. */\nexport function exclusiveScopeFor(root: CompositeNode, rootCssId: string, rowsOf: (list: CompositeNode) => ReadonlyArray<unknown> | null,\n rowKeys: ReadonlyArray<string> = []): ExclusiveScope {\n if (isSegmentedRoot(root)) return segmentedScopeFor(root, rootCssId, rowKeys);\n const list = tabsListOf(root);\n return tabsScopeFor(root, rootCssId, list?.type === REPEATER ? rowsOf(list) : null, rowKeys);\n}\n\n/** The attributes an exclusive ROOT writes on its own element, read off the node (its scope id when it sits in\n * repeated rows). */\nexport function exclusiveRootAttributesOf(root: CompositeNode, scopeId?: string): DomAttributes {\n return isSegmentedRoot(root) ? segmentedRootAttributesOf(root, scopeId) : tabsRootAttributes(tabsBehaviour(root), scopeId);\n}\n\n/** True when `node` is a part of the kind `scope` renders (a tab inside a Tabs' scope; an option inside a Segmented's). */\nexport function isPartOfExclusiveScope(node: { role?: string | null } | null | undefined, scope: ExclusiveScope): boolean {\n const kind = exclusiveKindOf(node);\n return !!kind && kind === (scope.kind ?? CompositeKind.Tabs);\n}\n\n/** The attributes a part of an exclusive composite writes on its own element (both engine paths, SSR included). */\nexport function exclusivePartAttributes(node: { role?: string | null }, scope: ExclusiveScope, key: string | null, rowScoped = false): DomAttributes {\n return scope.kind === CompositeKind.Segmented ? segmentedPartAttributes(node, scope, key, rowScoped) : tabsPartAttributes(node, scope, key, rowScoped);\n}\n\n/** The behaviour an exclusive root runs with (a Segmented control: a click, a row — it has no Behaviour traits). */\nexport function exclusiveBehaviourOf(root: CompositeNode | null | undefined): TabsBehaviour {\n return isSegmentedRoot(root) ? { ...SEGMENTED_BEHAVIOUR } : tabsBehaviour(root);\n}\n\n/** The accessible name an exclusive root gives its group (a Tabs' list, a Segmented control's radio group). */\nexport function exclusiveLabelOf(root: CompositeNode | null | undefined): string {\n return isSegmentedRoot(root) ? segmentedLabel(root) : tabsLabel(root);\n}\n\n/** The item an exclusive root shows with no other say (a Segmented control's On by default), or null (a Tabs: its first). */\nexport function exclusiveDefaultOf(root: CompositeNode | null | undefined): string | null {\n return isSegmentedRoot(root) ? segmentedDefaultOn(root) : null;\n}\n\n/** An exclusive item's words — a tab's, an option's (never its badge's) — for the pickers, the tree and the switchers. */\nexport function exclusiveItemLabel(part: CompositeNode): string {\n return exclusiveKindOf(part) === CompositeKind.Segmented ? segmentedOptionLabel(part) : tabLabel(part);\n}\n","import { roleClass } from '@vectoriox/iox-ui/design-core';\n\nimport { accordionDomIds, accordionFocusIndex, COMPOSITE_ATTRIBUTE, DEFAULT_ON_ATTRIBUTE, ITEM_KEY_ATTRIBUTE, ON_ATTRIBUTE, SCOPE_ATTRIBUTE } from './accordion';\nimport { ITEM_OFF_EVENT, ITEM_ON_EVENT } from './accordion-runtime';\nimport { CompositeKind, EXCLUSIVE_KIND_ROLES, ExclusiveCompositeKind, exclusiveRootHoldsTriggers, isExclusiveKind } from './composite-kinds';\nimport { segmentedKeyAction } from './segmented';\nimport {\n ACTIVATE_ON_ATTRIBUTE, ORIENTATION_ATTRIBUTE, TABS_ACTIVATE_ONS, TABS_ORIENTATIONS, TabsActivateOn, TabsBehaviour, tabsKeyAction, TabsOrientation,\n} from './tabs';\n\n/**\n * The EXCLUSIVE composites' RUNTIME (CC4a Tabs; CC4b the Segmented control) — ONE copy, DOM only, for the builder canvas\n * and the live site (both engine paths render the same markup from `tabs.ts`'s and `segmented.ts`'s attribute planners):\n *\n * [root] data-iox-composite=\"tabs\" data-iox-activate-on data-iox-orientation [data-iox-scope]\n * .iox-role-tabs-list role=tablist [aria-orientation=vertical]\n * .iox-role-tabs-trigger role=tab id aria-selected aria-controls tabindex 0|-1 data-iox-item-key [data-iox-on]\n * .iox-role-tabs-panels\n * .iox-role-tabs-panel role=tabpanel id aria-labelledby tabindex=0 data-iox-item-key [hidden] | [data-iox-on]\n *\n * Exactly one item is on, always (a Tabs with tabs never shows none). It owns: a click on a trigger turns its item on\n * (and a hover, when the root says `activate-on=hover`); the APG tabs keys with AUTOMATIC activation — ← → along a\n * horizontal list (mirrored under RTL), ↑ ↓ along a vertical one, Home / End — moving focus AND turning the item on,\n * the roving tabindex keeping one trigger in the Tab order. A trigger and its panel pair by `data-iox-item-key`\n * (else their index among their kind — the builder's From-content rows). Every change dispatches `iox-item-on` /\n * `iox-item-off` on the trigger AND its panel (the `itemOn` / `itemOff` interaction triggers). The item shown is\n * FORCED ?? LIVE: the builder forces one (a selection inside an inactive panel); the live site forces nothing. The\n * server's first state is trusted (no flash).\n *\n * A SEGMENTED control (CC4b) is the same machine with no panels and the APG RADIO GROUP's markup and keys:\n *\n * [root] data-iox-composite=\"segmented\" role=radiogroup aria-label data-iox-default-on [data-iox-scope]\n * .iox-role-segmented-option role=radio aria-checked tabindex 0|-1 data-iox-item-key [data-iox-on]\n *\n * ← → move along the row (mirrored under RTL), ↑ ↓ the DOM order, each move wrapping and turning the option on; with no\n * server state the option on is the root's default (`data-iox-default-on`).\n */\n\nexport interface ExclusiveRuntimeOptions {\n /** The kind it runs (else the root's `data-iox-composite`, else a Tabs) — the builder canvas knows it from the node\n * before the attribute is on the element. */\n kind?: ExclusiveCompositeKind;\n /** The scope id the ARIA ids are built from (else `data-iox-scope`, else the root's `iox-node-<id>`). A function is\n * 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 /** The behaviour (else read from the root's data attributes). */\n behaviour?: TabsBehaviour;\n /** The list's accessible name, stamped by the runtime (the builder canvas; the engine renders it). */\n label?: () => string;\n /** The key forced on, on top of the live state (the builder's design state), or null. */\n forced?: () => string | null;\n /** The live item changed (a click, a key, a hover, an action) — the builder's \"Showing on canvas\" follows it. */\n onChange?: (key: string) => void;\n /** Re-stamp when the markup under the root changes (the builder canvas re-renders parts). */\n observe?: boolean;\n /** The key on when there is no server state (the builder canvas: a Segmented control's On by default), else the\n * root's `data-iox-default-on`, else the first item. */\n defaultKey?: () => string | null;\n}\n\nconst KIND_ROOT = (kind: ExclusiveCompositeKind) => `[${COMPOSITE_ATTRIBUTE}=\"${kind}\"]`;\nconst EXCLUSIVE_KINDS = Object.keys(EXCLUSIVE_KIND_ROLES) as ExclusiveCompositeKind[];\nconst ROOT_SELECTOR = EXCLUSIVE_KINDS.map(KIND_ROOT).join(', ');\nconst roleSelector = (pick: 'list' | 'trigger' | 'panel') =>\n EXCLUSIVE_KINDS.map(k => EXCLUSIVE_KIND_ROLES[k][pick]).filter((r): r is string => !!r).map(r => `.${roleClass(r)}`).join(', ');\nconst LIST_SELECTOR = roleSelector('list');\nconst TRIGGER_SELECTOR = roleSelector('trigger');\nconst PANEL_SELECTOR = roleSelector('panel');\nconst ITEM_PART_SELECTOR = `${TRIGGER_SELECTOR}, ${PANEL_SELECTOR}`;\nconst TABLIST_SELECTOR = '[role=\"tablist\"]';\n\n/** The exclusive composite an element belongs to (the element itself when it is a root). */\nexport function closestExclusive(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ROOT_SELECTOR) as HTMLElement | null) ?? null;\n}\n\n/** The trigger or panel an element sits in (itself when it is one) — its ITEM part — or null. */\nexport function closestExclusiveItemPart(el: Element | null | undefined): HTMLElement | null {\n return (el?.closest?.(ITEM_PART_SELECTOR) as HTMLElement | null) ?? null;\n}\n\nconst kindOf = (root: Element): ExclusiveCompositeKind => {\n const raw = root.getAttribute(COMPOSITE_ATTRIBUTE) as CompositeKind | null;\n return isExclusiveKind(raw) ? raw : CompositeKind.Tabs;\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): TabsBehaviour {\n const on = root.getAttribute(ACTIVATE_ON_ATTRIBUTE);\n const orientation = root.getAttribute(ORIENTATION_ATTRIBUTE);\n return {\n activateOn: TABS_ACTIVATE_ONS.includes(on as TabsActivateOn) ? on as TabsActivateOn : TabsActivateOn.Click,\n orientation: TABS_ORIENTATIONS.includes(orientation as TabsOrientation) ? orientation as TabsOrientation : TabsOrientation.Horizontal,\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\nfunction dispatch(el: Element | null | undefined, type: string): void {\n const Ctor = (globalThis as { CustomEvent?: typeof CustomEvent }).CustomEvent;\n if (el && Ctor) el.dispatchEvent(new Ctor(type, { bubbles: false }));\n}\n\nexport class ExclusiveRuntime {\n private live: string | null;\n private shown: string | null = null;\n private observer: MutationObserver | null = null;\n private stampQueued = false;\n private behaviourValue: TabsBehaviour;\n private awaitingItems = false;\n readonly kind: ExclusiveCompositeKind;\n\n constructor(readonly root: HTMLElement, private readonly options: ExclusiveRuntimeOptions = {}) {\n this.kind = options.kind ?? kindOf(root);\n this.behaviourValue = options.behaviour ?? behaviourOf(root);\n root.setAttribute(COMPOSITE_ATTRIBUTE, this.kind);\n EXCLUSIVE_RUNTIMES.set(root, this);\n // The server rendered the first state (every trigger keyed, one on); with no server state the default is on.\n const triggers = this.triggers();\n const serverOn = !options.behaviour ? triggers.find(t => t.hasAttribute(ON_ATTRIBUTE) && t.hasAttribute(ITEM_KEY_ATTRIBUTE)) : undefined;\n this.live = serverOn ? this.keyOf(serverOn) : this.defaultKey();\n this.awaitingItems = !triggers.length;\n // Capture: on the builder canvas every part's own listener stops the click (it selects that part), and the tab\n // must still turn on — the canvas is a live runtime.\n root.addEventListener('click', this.onClick, true);\n root.addEventListener('mouseover', this.onHover, true);\n root.addEventListener('keydown', this.onKeydown);\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(): TabsBehaviour {\n return this.behaviourValue;\n }\n\n /** The behaviour changed in the panel (Activate on, Orientation). */\n setBehaviour(behaviour: TabsBehaviour): void {\n this.behaviourValue = behaviour;\n this.root.setAttribute(ACTIVATE_ON_ATTRIBUTE, behaviour.activateOn);\n this.root.setAttribute(ORIENTATION_ATTRIBUTE, behaviour.orientation);\n this.stamp();\n }\n\n /** THIS composite's triggers in document order (a nested composite's are its own). */\n triggers(): HTMLElement[] {\n return this.own(TRIGGER_SELECTOR);\n }\n\n /** THIS composite's panels in document order. */\n panels(): HTMLElement[] {\n return this.own(PANEL_SELECTOR);\n }\n\n /** The key on right now (forced ?? live). */\n get activeKey(): string | null {\n return this.shown;\n }\n\n /** The key the live state holds (before anything forced). */\n get liveKey(): string | null {\n return this.live;\n }\n\n /** The key of a trigger or a panel: its `data-iox-item-key`, else its index among its kind. */\n keyOf(part: Element): string {\n const own = part.getAttribute(ITEM_KEY_ATTRIBUTE);\n if (own) return own;\n const peers = part.matches(TRIGGER_SELECTOR) ? this.triggers() : this.panels();\n return `item-${peers.indexOf(part as HTMLElement)}`;\n }\n\n /** The key of the item an element sits in (a part inside a tab or a panel), or null. */\n keyAt(el: Element | null | undefined): string | null {\n const part = closestExclusiveItemPart(el);\n return part && closestExclusive(part) === this.root ? this.keyOf(part) : null;\n }\n\n /** Turn `key` on (a click, a key, a hover, the `openItem` action, \"Showing on canvas\"). */\n activate(key: string): void {\n if (!this.keys().includes(key)) return;\n const changed = key !== this.live;\n this.live = key;\n this.stamp();\n if (changed) this.options.onChange?.(key);\n }\n\n /** Run an item action on `key`: Open turns it on; Close and Toggle do nothing (one item is always on). True when it\n * is on afterwards. */\n run(open: boolean, key: string): boolean {\n if (open) this.activate(key);\n return this.shown === key;\n }\n\n /** The forced key changed (builder design state): show it. */\n refresh(): void {\n this.stamp();\n }\n\n destroy(): void {\n if (EXCLUSIVE_RUNTIMES.get(this.root) === this) EXCLUSIVE_RUNTIMES.delete(this.root);\n this.root.removeEventListener('click', this.onClick, true);\n this.root.removeEventListener('mouseover', this.onHover, true);\n this.root.removeEventListener('keydown', this.onKeydown);\n this.observer?.disconnect();\n this.observer = null;\n }\n\n private keys(): string[] {\n return this.triggers().map(t => this.keyOf(t));\n }\n\n /** The key on with no server state: the asked default when it names an item, else the first item. */\n private defaultKey(): string | null {\n const keys = this.keys();\n const asked = this.options.defaultKey?.() ?? this.root.getAttribute(DEFAULT_ON_ATTRIBUTE);\n return asked && keys.includes(asked) ? asked : keys[0] ?? null;\n }\n\n /** True for a Segmented control: the root IS its radio group and holds its options. */\n private get holdsTriggers(): boolean {\n return exclusiveRootHoldsTriggers(this.kind);\n }\n\n /** The element(s) that ARE the tablist: the ones a renderer already gave the role (the engine's component-path\n * Repeater puts it on its inner root, which holds the tabs), else the elements carrying the list's role class. */\n private lists(): HTMLElement[] {\n const stamped = this.own(TABLIST_SELECTOR);\n return stamped.length ? stamped : this.own(LIST_SELECTOR);\n }\n\n private own(selector: string): HTMLElement[] {\n return Array.from(this.root.querySelectorAll<HTMLElement>(selector)).filter(el => closestExclusive(el.parentElement) === this.root);\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 rootId(): string {\n const own = this.options.rootId;\n return (typeof own === 'function' ? own() : own) ?? this.root.getAttribute(SCOPE_ATTRIBUTE) ?? nodeIdOf(this.root);\n }\n\n /** Write every part's state into its markup; announce what changed. */\n private stamp(first = false): void {\n const triggers = this.triggers();\n const keys = triggers.map(t => this.keyOf(t));\n if (this.awaitingItems && keys.length) {\n this.awaitingItems = false;\n this.live = this.defaultKey();\n first = true;\n }\n if (this.live === null || !keys.includes(this.live)) this.live = this.defaultKey();\n const forced = this.options.forced?.() ?? null;\n const next = forced !== null && keys.includes(forced) ? forced : this.live;\n if (this.holdsTriggers) return this.stampRadioGroup(triggers, next, first);\n const rootId = this.rootId();\n const vertical = this.behaviourValue.orientation === TabsOrientation.Vertical;\n for (const list of this.lists()) {\n setAttr(list, 'role', 'tablist');\n setAttr(list, 'aria-orientation', vertical ? 'vertical' : null);\n if (this.options.label) setAttr(list, 'aria-label', this.options.label() || null);\n }\n const panels = this.panels();\n const panelOf = (key: string) => panels.find(p => this.keyOf(p) === key) ?? null;\n for (const trigger of triggers) {\n const key = this.keyOf(trigger);\n const on = key === next;\n const ids = accordionDomIds(rootId, key, CompositeKind.Tabs);\n setAttr(trigger, ITEM_KEY_ATTRIBUTE, key);\n setAttr(trigger, 'type', trigger.tagName === 'BUTTON' ? 'button' : null);\n setAttr(trigger, 'role', 'tab');\n setAttr(trigger, 'id', ids.trigger);\n setAttr(trigger, 'aria-selected', on ? 'true' : 'false');\n setAttr(trigger, 'aria-controls', panelOf(key) ? ids.panel : null);\n setAttr(trigger, 'tabindex', on ? '0' : '-1');\n setAttr(trigger, ON_ATTRIBUTE, on ? '' : null);\n }\n for (const panel of panels) {\n const key = this.keyOf(panel);\n const on = key === next;\n const ids = accordionDomIds(rootId, key, CompositeKind.Tabs);\n setAttr(panel, ITEM_KEY_ATTRIBUTE, key);\n setAttr(panel, 'role', 'tabpanel');\n setAttr(panel, 'id', ids.panel);\n setAttr(panel, 'aria-labelledby', ids.trigger);\n setAttr(panel, 'tabindex', '0');\n setAttr(panel, ON_ATTRIBUTE, on ? '' : null);\n setAttr(panel, 'hidden', on ? null : '');\n }\n this.announce(triggers, next, first, panelOf);\n }\n\n /** A Segmented control's markup (CC4b): the root a named radio group, each option a radio, one checked. */\n private stampRadioGroup(options: HTMLElement[], next: string | null, first: boolean): void {\n setAttr(this.root, 'role', 'radiogroup');\n if (this.options.label) setAttr(this.root, 'aria-label', this.options.label() || null);\n for (const option of options) {\n const key = this.keyOf(option);\n const on = key === next;\n setAttr(option, ITEM_KEY_ATTRIBUTE, key);\n setAttr(option, 'type', option.tagName === 'BUTTON' ? 'button' : null);\n setAttr(option, 'role', 'radio');\n setAttr(option, 'aria-checked', on ? 'true' : 'false');\n setAttr(option, 'tabindex', on ? '0' : '-1');\n setAttr(option, ON_ATTRIBUTE, on ? '' : null);\n }\n this.announce(options, next, first);\n }\n\n /** Move the shown key; dispatch iox-item-off on what was on and iox-item-on on what is on now. */\n private announce(triggers: HTMLElement[], next: string | null, first: boolean, panelOf: (key: string) => HTMLElement | null = () => null): void {\n const was = first ? null : this.shown;\n this.shown = next;\n if (was === next && !first) return;\n if (was !== null) {\n dispatch(triggers.find(t => this.keyOf(t) === was), ITEM_OFF_EVENT);\n dispatch(panelOf(was), ITEM_OFF_EVENT);\n }\n if (next !== null) {\n dispatch(triggers.find(t => this.keyOf(t) === next), ITEM_ON_EVENT);\n dispatch(panelOf(next), ITEM_ON_EVENT);\n }\n }\n\n private ownTrigger(target: EventTarget | null): HTMLElement | null {\n const trigger = (target as Element | null)?.closest?.(TRIGGER_SELECTOR) as HTMLElement | null;\n return trigger && closestExclusive(trigger.parentElement) === this.root ? trigger : null;\n }\n\n private readonly onClick = (event: Event): void => {\n const trigger = this.ownTrigger(event.target);\n if (!trigger) return;\n event.preventDefault();\n this.activate(this.keyOf(trigger));\n };\n\n private readonly onHover = (event: Event): void => {\n if (this.behaviourValue.activateOn !== TabsActivateOn.Hover) return;\n const trigger = this.ownTrigger(event.target);\n if (trigger) this.activate(this.keyOf(trigger));\n };\n\n private readonly onKeydown = (event: Event): void => {\n const e = event as KeyboardEvent;\n const trigger = this.ownTrigger(e.target);\n if (!trigger) return;\n const rtl = isRtl(trigger);\n const action = this.holdsTriggers ? segmentedKeyAction(e.key, rtl) : tabsKeyAction(e.key, this.behaviourValue.orientation, rtl);\n if (!action) return;\n const triggers = this.triggers();\n const target = triggers[accordionFocusIndex(action, triggers.indexOf(trigger), triggers.length)];\n if (!target) return;\n e.preventDefault();\n target.focus();\n this.activate(this.keyOf(target));\n };\n}\n\n/** The direction the tab is laid out in — the computed `direction` (a page's own CSS included), else its nearest `dir`. */\nfunction isRtl(el: Element): boolean {\n let computed = '';\n try { computed = el.ownerDocument?.defaultView?.getComputedStyle(el).direction ?? ''; } catch { computed = ''; }\n if (computed) return computed === 'rtl';\n return el.closest('[dir]')?.getAttribute('dir') === 'rtl';\n}\n\n/** Every live exclusive runtime by its root — so an item action finds the runtime of whatever item it targets. */\nconst EXCLUSIVE_RUNTIMES = new WeakMap<Element, ExclusiveRuntime>();\n\n/** The runtime running an exclusive root, or null. */\nexport function exclusiveRuntimeOf(root: Element | null | undefined): ExclusiveRuntime | null {\n return (root && EXCLUSIVE_RUNTIMES.get(root)) || null;\n}\n\n/** Attach the runtime to one rendered exclusive root, unless it already runs one. Returns the NEW runtime, or null. */\nexport function attachExclusiveAt(root: HTMLElement, options: Omit<ExclusiveRuntimeOptions, 'behaviour'> = {}): ExclusiveRuntime | null {\n if (EXCLUSIVE_RUNTIMES.has(root)) return null;\n return new ExclusiveRuntime(root, options);\n}\n\n/** True when `el` is (or sits in) an exclusive item part — a tab or a panel. */\nexport function isExclusiveItemOn(el: Element): boolean {\n return !!closestExclusiveItemPart(el)?.hasAttribute(ON_ATTRIBUTE);\n}\n\n/** Subscribe to the item part `el` sits in turning on / off. Returns the unsubscribe. */\nexport function onExclusiveItemState(el: Element, on: boolean, handler: () => void): () => void {\n const part = closestExclusiveItemPart(el);\n if (!part) return () => undefined;\n const type = on ? ITEM_ON_EVENT : ITEM_OFF_EVENT;\n part.addEventListener(type, handler);\n return () => part.removeEventListener(type, handler);\n}\n","import {\n accordionRootOfItem, accordionRuntimeOf, AccordionRuntime, AccordionRuntimeOptions, attachAccordionAt, closestAccordionItem, CompositeItemAction,\n isAccordionItemOn, onAccordionItemState,\n} from './accordion-runtime';\nimport { COMPOSITE_ATTRIBUTE } from './accordion';\nimport { CompositeKind, isExclusiveKind } from './composite-kinds';\nimport {\n attachExclusiveAt, closestExclusive, closestExclusiveItemPart, ExclusiveRuntime, exclusiveRuntimeOf, ExclusiveRuntimeOptions, isExclusiveItemOn,\n onExclusiveItemState,\n} from './exclusive-runtime';\n\n/**\n * The composites' runtimes behind ONE door (CC4a): the open/close runtime (Accordion, Disclosure) and the exclusive\n * runtime (Tabs; the Segmented control in CC4b). The engine attaches whichever a rendered root needs; the interaction\n * engines (builder canvas and live site) ask these for `itemOn` / `itemOff` and run the item actions through them —\n * never a family's own function, so a new kind joins without touching either engine.\n */\n\nexport type CompositeRuntime = AccordionRuntime | ExclusiveRuntime;\n\n/** Attach the runtime a rendered composite root needs (its `data-iox-composite`), unless it runs one already. Returns\n * the NEW runtime, or null. */\nexport function attachCompositeAt(root: HTMLElement, options: Omit<AccordionRuntimeOptions, 'rootId' | 'behaviour'> & Omit<ExclusiveRuntimeOptions, 'behaviour'> = {}): CompositeRuntime | null {\n const kind = root.getAttribute(COMPOSITE_ATTRIBUTE) as CompositeKind | null;\n if (isExclusiveKind(kind)) return attachExclusiveAt(root, { observe: options.observe });\n return attachAccordionAt(root, { observe: options.observe, reducedMotion: options.reducedMotion });\n}\n\n/** The nearer of the item elements `el` sits in — an accordion item / a disclosure, or a tab / a tab panel. */\nfunction nearestItem(el: Element | null | undefined): { el: HTMLElement; exclusive: boolean } | null {\n const toggle = closestAccordionItem(el);\n const exclusive = closestExclusiveItemPart(el);\n if (!toggle && !exclusive) return null;\n if (toggle && (!exclusive || exclusive.contains(toggle))) return { el: toggle, exclusive: false };\n return { el: exclusive!, exclusive: true };\n}\n\n/** Subscribe to the item `el` sits in turning on / off — what the `itemOn` / `itemOff` interaction triggers listen to,\n * in both families. Returns the unsubscribe. */\nexport function onCompositeItemState(el: Element, on: boolean, handler: () => void): () => void {\n const item = nearestItem(el);\n if (!item) return () => undefined;\n return item.exclusive ? onExclusiveItemState(item.el, on, handler) : onAccordionItemState(item.el, on, handler);\n}\n\n/** True when the item `el` sits in is on now (an open accordion item, the active tab or its panel). */\nexport function isCompositeItemOn(el: Element): boolean {\n const item = nearestItem(el);\n if (!item) return false;\n return item.exclusive ? isExclusiveItemOn(item.el) : isAccordionItemOn(item.el);\n}\n\n/**\n * Run an item action on the element of an ITEM — an accordion item, a disclosure, or a tab (CC4a: `openItem` turns it\n * on; a Tabs always shows one, so Close and Toggle leave it) — the `openItem` / `closeItem` / `toggleItem` interaction\n * actions, on the canvas and on the live site through this one function. Returns whether the item shows on\n * 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 = nearestItem(el);\n if (!item) return null;\n if (item.exclusive) {\n const runtime = exclusiveRuntimeOf(closestExclusive(item.el));\n return runtime ? runtime.run(action === CompositeItemAction.Open, runtime.keyOf(item.el)) : null;\n }\n const runtime = accordionRuntimeOf(accordionRootOfItem(item.el));\n return runtime ? runtime.run(action, runtime.keyOf(item.el)) : null;\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 (CC4a) and the\n * Segmented control (CC4b) run the EXCLUSIVE runtime (exclusive-runtime.ts — one item always on; exclusive.ts the one\n * render decision by kind); composite-runtime.ts is the one door to both families.\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';\nexport * from './tabs';\nexport * from './segmented';\nexport * from './exclusive';\nexport * from './exclusive-runtime';\nexport * from './composite-runtime';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EXCLUSIVE_KINDS","Type","Style","ZERO_BOX","LINK_TYPE","PART_BASE","make","stripTags","SHORT_TEXT","LONG_TEXT","KIND_ROOT","ROOT_SELECTOR","PANEL_SELECTOR","kindOf","nodeIdOf","behaviourOf","setAttr","dispatch","ROW_INDEX_ATTRIBUTE","BODY_BASE","IMAGE_BASE","LABEL_BASE","ZERO","REPEATER"],"mappings":";;AAmCA;;;AAGoD;AACpD;AACgH;AACzG,MAAM,gBAAgB,GAAG;AAWhC;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,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC;AACjC,IAAA,OAAO,IAAI;AACf;AAEA,MAAM,UAAU,GAAG,CAAC,IAAmB,KAAc,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AAE/E;AACM,SAAU,QAAQ,CAAC,IAAmB,EAAE,IAAY,EAAA;AACtD,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACnG;AAEA;SACgB,SAAS,CAAC,IAAmB,EAAE,IAAY,EAAE,KAAc,EAAA;AACvE,IAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AAClB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,MAAO,CAAC,IAAI,CAAC,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