@vectoriox/iox-ui 5.84.0 → 5.85.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 (37) hide show
  1. package/actions-core/index.d.ts +18 -2
  2. package/composite-core/index.d.ts +93 -15
  3. package/design-core/index.d.ts +566 -4
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +18 -1
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +307 -39
  7. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs +680 -15
  9. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +35 -4
  11. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +101 -5
  13. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  14. package/fesm2022/vectoriox-iox-ui.mjs +285 -12
  15. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  16. package/generation-core/index.d.ts +13 -0
  17. package/index.d.ts +143 -42
  18. package/package.json +1 -1
  19. package/scene-core/index.d.ts +32 -4
  20. package/src/actions-core/dialog-motion.ts +25 -0
  21. package/src/composite-core/header.ts +25 -0
  22. package/src/composite-core/public-api.ts +1 -0
  23. package/src/composite-core/slider-runtime.ts +82 -0
  24. package/src/composite-core/slider.ts +194 -27
  25. package/src/composite-core/structure.ts +14 -9
  26. package/src/design-core/flavor-spec.generated.ts +596 -9
  27. package/src/design-core/header-behaviour.ts +76 -0
  28. package/src/design-core/public-api.ts +1 -0
  29. package/src/design-core/theme-color.ts +21 -5
  30. package/src/generation-core/compose-site.ts +8 -0
  31. package/src/generation-core/node-baselines.generated.ts +17 -3
  32. package/src/generation-core/patterns.ts +2 -0
  33. package/src/generation-core/site-spec.generated.ts +8 -0
  34. package/src/scene-core/scene.ts +18 -0
  35. package/src/scene-core/scroll-driver.ts +83 -6
  36. package/styles/iox-design.css +232 -1
  37. package/styles/iox-forms.css +5 -2
@@ -1 +1 @@
1
- {"version":3,"file":"vectoriox-iox-ui.mjs","sources":["../../../projects/iox-ui/src/lib/view-position/view-position.directive.ts","../../../projects/iox-ui/src/lib/view-position/view-position.module.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos-animations.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.service.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos-container.component.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.directive.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.module.ts","../../../projects/iox-ui/src/lib/motion/motion.ts","../../../projects/iox-ui/src/lib/motion/scroll-plan.ts","../../../projects/iox-ui/src/lib/services/page-scroll.provider.ts","../../../projects/iox-ui/src/lib/iox-page/page-component/page-component.component.ts","../../../projects/iox-ui/src/lib/iox-page/page-component/page-component.component.html","../../../projects/iox-ui/src/lib/iox-page/iox-page.module.ts","../../../projects/iox-ui/src/lib/iox-ui.module.ts","../../../projects/iox-ui/src/lib/services/component-instance-registry.service.ts","../../../projects/iox-ui/src/lib/builder-components/builder-tokens.ts","../../../projects/iox-ui/src/lib/builder-components/image/image.component.ts","../../../projects/iox-ui/src/lib/builder-components/spacer/spacer.component.ts","../../../projects/iox-ui/src/lib/builder-components/card/card.component.ts","../../../projects/iox-ui/src/lib/builder-components/divider/divider.component.ts","../../../projects/iox-ui/src/lib/icons/normalize-icon-class.ts","../../../projects/iox-ui/src/lib/builder-components/icon/icon.component.ts","../../../projects/iox-ui/src/lib/builder-components/link/link.component.ts","../../../projects/iox-ui/src/lib/builder-components/button/button.component.ts","../../../projects/iox-ui/src/design-core/node-links.ts","../../../projects/iox-ui/src/lib/builder-components/heading/heading.component.ts","../../../projects/iox-ui/src/lib/builder-components/text/text.component.ts","../../../projects/iox-ui/src/lib/builder-components/section/section.component.ts","../../../projects/iox-ui/src/lib/builder-components/container/container.component.ts","../../../projects/iox-ui/src/lib/builder-components/linked-container/linked-container.component.ts","../../../projects/iox-ui/src/lib/builder-components/repeater/repeater.component.ts","../../../projects/iox-ui/src/lib/builder-components/button-block/button-block.component.ts","../../../projects/iox-ui/src/lib/style-compiler/virtual-traits.ts","../../../projects/iox-ui/src/design-core/css-names.ts","../../../projects/iox-ui/src/lib/a11y/a11y-traits.ts","../../../projects/iox-ui/src/lib/style-compiler/style-compiler.ts","../../../projects/iox-ui/src/lib/style-compiler/responsive.ts","../../../projects/iox-ui/src/lib/style-compiler/swiper-breakpoints.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/swiper-modules.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-options.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-boot.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-container.component.ts","../../../projects/iox-ui/src/lib/builder-components/slider-slide/slider-slide.component.ts","../../../projects/iox-ui/src/lib/builder-components/list/list.component.ts","../../../projects/iox-ui/src/lib/builder-components/list-item/list-item.component.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery.model.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery-effects.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery-loop.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery.component.ts","../../../projects/iox-ui/src/forms-core/form.model.ts","../../../projects/iox-ui/src/forms-core/messages.ts","../../../projects/iox-ui/src/forms-core/dates.ts","../../../projects/iox-ui/src/forms-core/validate.ts","../../../projects/iox-ui/src/forms-core/options.ts","../../../projects/iox-ui/src/forms-core/collect.ts","../../../projects/iox-ui/src/forms-core/runtime.ts","../../../projects/iox-ui/src/forms-core/rule-catalog.ts","../../../projects/iox-ui/src/forms-core/transport.ts","../../../projects/iox-ui/src/forms-core/submit-lifecycle.ts","../../../projects/iox-ui/src/forms-core/form-presets.ts","../../../projects/iox-ui/src/forms-core/nesting.ts","../../../projects/iox-ui/src/forms-core/channel.ts","../../../projects/iox-ui/src/forms-core/field-markup.ts","../../../projects/iox-ui/src/forms-core/public-api.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-runtime.service.ts","../../../projects/iox-ui/src/lib/builder-components/form/shake.ts","../../../projects/iox-ui/src/lib/builder-components/form/submit-buttons.ts","../../../projects/iox-ui/src/lib/builder-components/form/form.component.ts","../../../projects/iox-ui/src/lib/floating/place-floating.ts","../../../projects/iox-ui/src/lib/builder-components/form/date-picker.runtime.ts","../../../projects/iox-ui/src/lib/builder-components/form/field.component.ts","../../../projects/iox-ui/src/lib/builder-components/form/submit-button.component.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-state-blocks.component.ts","../../../projects/iox-ui/src/lib/builder-components/dialog/dialog.component.ts","../../../projects/iox-ui/src/lib/builder-components/video/video.component.ts","../../../projects/iox-ui/src/lib/builder-components/iox-builder-components.module.ts","../../../projects/iox-ui/src/lib/builder-components/iox-component-registry.service.ts","../../../projects/iox-ui/src/lib/style-compiler/tree-relations.ts","../../../projects/iox-ui/src/lib/style-compiler/parts.ts","../../../projects/iox-ui/src/lib/style-compiler/state-selectors.ts","../../../projects/iox-ui/src/lib/navigation/current-link.ts","../../../projects/iox-ui/src/lib/a11y/node-attributes.ts","../../../projects/iox-ui/src/lib/motion/interaction-keyframes.ts","../../../projects/iox-ui/src/lib/motion/interaction-easing.ts","../../../projects/iox-ui/src/lib/motion/pointer-intent.ts","../../../projects/iox-ui/src/lib/motion/scrolled.ts","../../../projects/iox-ui/src/lib/page-style/page-style.ts","../../../projects/iox-ui/src/lib/binding-pipes.ts","../../../projects/iox-ui/src/lib/render/component-input.util.ts","../../../projects/iox-ui/src/lib/binding/resolve-path.ts","../../../projects/iox-ui/src/lib/binding/resolve-bound-value.ts","../../../projects/iox-ui/src/seo-core/seo.model.ts","../../../projects/iox-ui/src/seo-core/normalize.ts","../../../projects/iox-ui/src/seo-core/tags.ts","../../../projects/iox-ui/src/seo-core/schema.ts","../../../projects/iox-ui/src/seo-core/public-api.ts","../../../projects/iox-ui/src/lib/seo/resolve-seo.ts","../../../projects/iox-ui/src/lib/seo/seo-fields.ts","../../../projects/iox-ui/src/lib/context/context-slot.model.ts","../../../projects/iox-ui/src/lib/context/context-value.ts","../../../projects/iox-ui/src/lib/context/context-store.ts","../../../projects/iox-ui/src/lib/context/context-actions.ts","../../../projects/iox-ui/src/lib/context/context-collect.ts","../../../projects/iox-ui/src/lib/context/action-enabled.ts","../../../projects/iox-ui/src/lib/page-transition/page-transition-presets.ts","../../../projects/iox-ui/src/lib/page-transition/page-transition-preview.ts","../../../projects/iox-ui/src/lib/builder-components/form/string-form.runtime.ts","../../../projects/iox-ui/src/public-api.ts","../../../projects/iox-ui/src/vectoriox-iox-ui.ts"],"sourcesContent":["import {AfterViewInit, Directive, ElementRef, EventEmitter, HostListener, Input, Output} from '@angular/core';\n\n@Directive({\n selector:'[view-position]',\n standalone: false\n})\n\nexport class ViewPositionDirective implements AfterViewInit{\n\n private _viewPortHighet!:number;\n private _elementHeight!: number;\n private _elementOffseTop!: number;\n private _curterScreen!:number;\n private _halfSscreen!:number;\n \n private _scrollDirection:string= \"Down\";\n private _scrollPos:number = 0;\n public isOnScreen: boolean = false;\n public isHalfScreen: boolean = false;\n \n @Input() data:any\n @Output() onEnter:EventEmitter<any> = new EventEmitter();\n @Output() onLeave:EventEmitter<any> = new EventEmitter();\n @Output() onHalf:EventEmitter<any> = new EventEmitter();\n\n constructor(private _elr:ElementRef){\n this._initScreenDeminitions();\n console.log(`screent highet: ${this._viewPortHighet}`);\n }\n\n\n ngAfterViewInit(): void {\n this._elementOffseTop = this._elr.nativeElement.offsetTop;\n this._elementHeight = this._elr.nativeElement.offsetHeight;\n console.log(`element offset Y = ${this._elementOffseTop}`); \n }\n\n\n @HostListener('window:scroll', ['$event']) onScroll(e: Event): void {\n\n if ((document.body.getBoundingClientRect()).top > this._scrollPos){\n if(this._scrollDirection != \"Up\"){\n this.isHalfScreen =false;\n this._scrollDirection = \"Up\"\n }\n } \n\t else{\n if(this._scrollDirection !=\"Down\"){\n this.isHalfScreen =false;\n this._scrollDirection = \"Down\"\n }\n } \n\t this._scrollPos = (document.body.getBoundingClientRect()).top;\n\n\n let currentClientHight = this._elr.nativeElement.getBoundingClientRect().top;\n if(currentClientHight >= this._viewPortHighet || currentClientHight < -this._elementHeight){\n if(this.isOnScreen){\n this.isOnScreen = false;\n this.onLeave.emit(\"OUT\");\n }\n }else{\n if(!this.isOnScreen){\n this.isOnScreen = true;\n this.onEnter.emit(\"IN\");\n }\n }\n\n if(currentClientHight < this._halfSscreen && currentClientHight > 0 && this._scrollDirection == \"Down\") {\n if(!this.isHalfScreen){\n this.isHalfScreen = true;\n console.log(\"half\")\n this.onHalf.emit(this.data);\n }\n }\n\n if(currentClientHight + this._elementHeight > this._halfSscreen && currentClientHight +this._elementHeight < this._viewPortHighet && this._scrollDirection == \"Up\") {\n if(!this.isHalfScreen){\n this.isHalfScreen = true;\n console.log(\"I am half\")\n this.onHalf.emit(this.data);\n }\n }\n }\n\n @HostListener('window:resize', ['$event']) onResize(e: Event) {\n this._viewPortHighet = window.innerHeight;\n this._initScreenDeminitions();\n }\n \n \n\n private _initScreenDeminitions(){\n this._viewPortHighet = window.innerHeight;\n this._curterScreen = Math.trunc(this._viewPortHighet *0.25);\n this._halfSscreen = Math.trunc(this._viewPortHighet *0.5);\n }\n }","import { NgModule } from '@angular/core';\nimport { ViewPositionDirective } from './view-position.directive';\n\n\n\n@NgModule({\n declarations: [\n ViewPositionDirective\n ],\n imports: [\n ],\n exports: [\n ViewPositionDirective\n ]\n})\nexport class ViewPositionModule { }\n","import { AnimationBuilder, style, animate, keyframes } from '@angular/animations';\n\n/********** Entries Animations ********************/\n\nexport const IoxAnimationStyles: any = {}\n\nIoxAnimationStyles[\"fade-up\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translate3d(0,100px,0)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-right\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translateX(150px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-out-right\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 1, transform: \"translateX(0px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: \"translateX(150px)\" }))]\n}\n\nIoxAnimationStyles[\"fade-left\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translateX(-150px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-out-up\"] = (delay:string, duration:string)=>{\n return [ style({ opacity: 1, transform: \"translateZ(0)\" }),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: \"translate3d(0,-100px,0)\"}))]\n}\n\nIoxAnimationStyles[\"flip-left\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"perspective(2500px) rotateY(-100deg)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"perspective(2500px) rotateY(0)\" }))]\n}\n\nIoxAnimationStyles[\"flip-up\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"perspective(2500px) rotateX(-100deg)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"perspective(2500px) rotateY(0)\" }))]\n}\n\nIoxAnimationStyles[\"zoom-in-up\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"translate3d(0,100px,0) scale(.6)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0) scale(1)\" }))]\n}","import { Injectable } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\n\n\n@Injectable({providedIn: 'root'})\nexport class AOSService {\n\n\n\n private _scrollOffset:Subject<any> = new Subject();\n public readonly scrollOffset: Observable<any> = this._scrollOffset.asObservable();\n \n constructor() { }\n\n\n updateScrollOffset(offset:any){\n this._scrollOffset.next(offset);\n }\n\n}","import { Component, ElementRef, HostListener, Input, SimpleChanges, ViewChild } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { AOSService } from './iox-aos.service';\n\n@Component({\n selector: \"[ioxAnimateContainer], ioxAnimateContainer\",\n template:`<div class='animate_root_element' #animateRooteElement>\n <ng-content></ng-content>\n </div>`,\n standalone: false\n})\nexport class IoxAnimateContainer {\n\n @Input('kickIn') kickIn = true;\n\n private _scrollOffset:Subject<any> = new Subject();\n public readonly scrollOffset: Observable<any> = this._scrollOffset.asObservable();\n @ViewChild('animateRooteElement') public animateRooteElement:any;\n \n\n constructor(private _element: ElementRef, private _aOSService: AOSService) {\n }\n\n ngAfterViewInit(){\n this.updateOffset();\n }\n\n @HostListener('scroll', ['$event'])\n public onScroll($event:any){\n this.updateOffset();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n console.log(changes);\n if(changes['kickIn'] && changes['kickIn'].currentValue){\n this.updateOffset();\n }\n }\n\n\n private updateOffset(){\n let elClientRect = this.animateRooteElement.nativeElement.getBoundingClientRect();\n this._scrollOffset.next(elClientRect);\n this._aOSService.updateScrollOffset(elClientRect);\n }\n}","import { Directive, OnDestroy, AfterViewInit, ElementRef, Input, OnInit, Renderer2, HostListener, Host, Optional } from \"@angular/core\";\nimport { AnimationBuilder, style, animate, AnimationPlayer } from '@angular/animations';\nimport { IoxAnimationStyles } from \"./iox-aos-animations\"\n;\nimport { IoxAnimateContainer } from \"./iox-aos-container.component\";\n@Directive({\n selector: \"[ioxAnimate], ioxAnimate\",\n standalone: false\n })\n export class IoxAosDirective implements OnDestroy, OnInit, AfterViewInit {\n \n @Input(\"animationDelay\") animationDelay: string =\"\";\n @Input(\"animationIn\") animationIn: string =\"\";\n @Input(\"animationOut\") animationOut: string = \"\";\n @Input(\"animationDuration\") animationDuration: string = \"0.5s\";\n \n // @Input(\"in\")\n // @Input(\"out\")\n\n public animation:AnimationPlayer | any;\n public isAnimationPlayed= false;\n private _elTop:number =0;\n\n\n constructor(@Host() @Optional() private _animateContainer: IoxAnimateContainer, private _element: ElementRef, private _animationBuilder:AnimationBuilder, private _renderer: Renderer2){\n \n this._renderer.setStyle(_element.nativeElement,'opacity', '0');\n }\n\n public ngOnInit(){\n }\n\n public ngAfterViewInit(){\n\n setTimeout(()=>{\n\n this._elTop = this._cumulativeOffset(this._element.nativeElement).top;\n\n if(this._animateContainer){\n if(this._animateContainer.kickIn){\n this.runIfVisiable();\n }else{\n return\n }\n }else{\n this.runIfVisiable();\n }\n\n \n \n },150)\n\n const resizeObserver = new ResizeObserver((entries) =>\n this._elTop = this._cumulativeOffset(this._element.nativeElement).top\n );\n\n resizeObserver.observe(document.body);\n \n if(this._animateContainer){\n this._animateContainer?.scrollOffset.subscribe((offset:any)=>{\n if(this._animateContainer.kickIn){\n this.scrollEventHandler(-1 *offset.top);\n }\n })\n }\n\n \n }\n\n public makeAnimationIn(animationStyle:any):AnimationPlayer{\n let animation = IoxAnimationStyles[animationStyle](this.animationDelay, this.animationDuration);\n const myAnimation = this._animationBuilder.build(animation)\n return myAnimation.create(this._element.nativeElement); \n\n }\n\n private _cumulativeOffset(element:any) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while(element);\n \n return {\n top: top,\n left: left\n };\n };\n\n @HostListener('document:scroll', ['$event']) onScrollEvent($event:any){\n this.scrollEventHandler(window.pageYOffset)\n }\n \n public isVisable(offset:number){\n //console.log(this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight);\n //return this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight;\n return this._elTop >= offset && this._elTop <= offset + window.innerHeight;\n }\n\n\n public scrollEventHandler(offset:number){\n\n if(this._animateContainer && this._animateContainer.kickIn == false){\n return\n }\n\n if(this.isVisable(offset) && !this.isAnimationPlayed){\n let animationStyle = this.animationIn || \"fade-up\";\n this.makeAnimationIn(animationStyle).play();\n this.isAnimationPlayed = true;\n }else if(!this.isVisable(offset) && this.isAnimationPlayed && this.animationOut){\n this.makeAnimationIn(this.animationOut).play();\n this.isAnimationPlayed =false;\n }\n }\n\n public runIfVisiable(){\n if(this.isVisable(window.pageYOffset)){\n let animationStyle = this.animationIn || \"fade-up\";\n this.makeAnimationIn(animationStyle).play();\n this.isAnimationPlayed = true;\n }\n }\n public ngOnDestroy(){\n\n }\n\n }\n\nfunction ViewParent() {\n throw new Error(\"Function not implemented.\");\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IoxAosDirective } from './iox-aos.directive';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { IoxAnimateContainer } from './iox-aos-container.component';\nimport { AOSService } from './iox-aos.service';\n\n\n@NgModule({\n declarations: [\n IoxAosDirective,\n IoxAnimateContainer\n ],\n imports: [\n BrowserAnimationsModule\n ],\n providers:[\n AOSService\n ],\n exports: [\n IoxAosDirective,\n IoxAnimateContainer\n ]\n})\nexport class IoxAosModule { \n\n static forRoot(): ModuleWithProviders<any> {\n return {\n ngModule: IoxAosModule,\n providers: [AOSService]\n };\n }\n\n}\n","/**\n * Reduced motion (CC1, R1 — complex-components plan §2d). The token sheet already collapses the\n * motion tokens under `prefers-reduced-motion`; everything that moves through SCRIPT must ask the\n * same question, and ask it HERE: the interaction engines (builder canvas + live site), the Slider's\n * autoplay and the Gallery's crossfade loop. Publishable gate #6: reduced motion = motion dial 0.\n */\n\nexport const REDUCED_MOTION_QUERY = '(prefers-reduced-motion: reduce)';\n\n/** Anything with `matchMedia` — a window, or a stub in a spec. */\nexport interface MatchMediaHost {\n matchMedia?: (query: string) => { matches: boolean };\n}\n\nfunction defaultHost(): MatchMediaHost | null {\n return typeof window !== 'undefined' ? window : null;\n}\n\n/** True when the visitor asked their system for reduced motion. No `matchMedia` (SSR) → false. */\nexport function prefersReducedMotion(host: MatchMediaHost | null | undefined = defaultHost()): boolean {\n try {\n return !!host?.matchMedia?.(REDUCED_MOTION_QUERY)?.matches;\n } catch {\n return false;\n }\n}\n\n/** True when script may animate. The ONE question every runtime asks before moving anything. */\nexport function motionAllowed(host: MatchMediaHost | null | undefined = defaultHost()): boolean {\n return !prefersReducedMotion(host);\n}\n","import type { LenisOptions } from 'lenis';\nimport { resolveDesignMotion, SPEC_AXES } from '@vectoriox/iox-ui/design-core';\n\n/**\n * Scrolling (AI plan rev 3.1 §3p, MO-D1/MO-D7): the look's `scroll` choice → the options the ONE page\n * scroller starts Lenis with, or `null` for the browser's own scrolling. The table is the contract's\n * `axes.scrolls`; this only turns its named easing into the function Lenis wants. Pure: the caller asks the\n * visitor's reduced-motion preference (`prefersReducedMotion`) and passes the answer in.\n */\n\nexport enum ScrollEasing {\n ExpoOut = 'expo-out',\n}\n\n/** The curves `axes.scrolls[].lenis.easing` may name. Expo-out is Lenis's own default curve. */\nexport const SCROLL_EASINGS: Readonly<Record<ScrollEasing, (t: number) => number>> = {\n [ScrollEasing.ExpoOut]: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),\n};\n\nexport interface ScrollPlanContext {\n /** The visitor asked for reduced motion: the page always scrolls natively. */\n reducedMotion: boolean;\n}\n\nexport function planScroll(scroll: string | null | undefined, ctx: ScrollPlanContext): LenisOptions | null {\n if (ctx.reducedMotion) return null;\n // An absent or unknown choice plays PRE_MOTION's Smooth — what every site glided with before rev 3.1.\n const lenis = SPEC_AXES.scrolls[resolveDesignMotion({ scroll }).scroll].lenis;\n if (!lenis) return null;\n return {\n duration: lenis.duration,\n easing: SCROLL_EASINGS[lenis.easing as ScrollEasing],\n wheelMultiplier: lenis.wheelMultiplier,\n syncTouch: lenis.syncTouch,\n };\n}\n","import { Injectable, NgZone, OnDestroy, inject } from '@angular/core';\nimport Lenis, { LenisOptions } from 'lenis';\n\nimport { prefersReducedMotion } from '../motion/motion';\n\n/** Where the page scrolls, and how. `lenis: null` = the browser's own scrolling (planScroll's Normal). */\nexport interface PageScrollStart {\n /** The scrolling element; absent = the document (the live site scrolls the window, CC1). */\n wrapper?: HTMLElement;\n content?: HTMLElement;\n lenis: LenisOptions | null;\n}\n\n/**\n * The ONE page scroller (AI plan rev 3.1 §3p). `IoxPageComponent` starts it with the plan of the look's\n * Scrolling choice (`planScroll`); `scrollTo` actions and the dialog lock go through it whether or not\n * Lenis runs. Never on the server: there is no window to scroll.\n */\n@Injectable()\nexport class PageScrollProvider implements OnDestroy {\n // inject() (not a ctor param) so subclasses like the engine's document-scrolling provider keep `super()`.\n private zone = inject(NgZone);\n private lenis: Lenis | null = null;\n private rafId?: number;\n private wrapper: HTMLElement | null = null;\n private lockedOverflow: string | null = null;\n\n init(start: PageScrollStart): void {\n this.destroy();\n if (typeof window === 'undefined' || typeof requestAnimationFrame === 'undefined') return;\n this.wrapper = start.wrapper ?? null;\n if (!start.lenis) return;\n this.lenis = new Lenis({ ...start.lenis, ...(start.wrapper ? { wrapper: start.wrapper } : {}), ...(start.content ? { content: start.content } : {}) });\n this.startLoop();\n }\n\n /** Provided by a component (a page, the Design step's specimen): its Lenis and loop go with it. */\n ngOnDestroy(): void {\n this.destroy();\n }\n\n /** Stop Lenis and its loop; the page falls back to the browser's own scrolling. */\n destroy(): void {\n if (this.rafId != null) cancelAnimationFrame(this.rafId);\n this.rafId = undefined;\n this.lenis?.destroy();\n this.lenis = null;\n this.unlock();\n }\n\n /** Hard-stop page scroll (dialog open, A1b): wheel/touch frozen until start(). */\n stop(): void {\n if (this.lenis) { this.lenis.stop(); return; }\n const el = this.scrollElement();\n if (!el || this.lockedOverflow !== null) return;\n this.lockedOverflow = el.style.overflow;\n el.style.overflow = 'hidden';\n }\n\n /** Resume after stop() — the dialog's close path, incl. native Esc/backdrop closes. */\n start(): void {\n if (this.lenis) { this.lenis.start(); return; }\n this.unlock();\n }\n\n scrollTo(y: number, options?: { duration?: number; immediate?: boolean }): void {\n if (this.lenis) { this.lenis.scrollTo(y, options); return; }\n const behavior: ScrollBehavior = options?.immediate || prefersReducedMotion() ? 'auto' : 'smooth';\n (this.wrapper ?? (typeof window !== 'undefined' ? window : null))?.scrollTo({ top: y, behavior });\n }\n\n scrollToTop(options?: { duration?: number; immediate?: boolean }): void {\n this.scrollTo(0, options);\n }\n\n /** The running Lenis, or null when the page scrolls natively (Normal, reduced motion, the server). */\n get instance(): Lenis | null {\n return this.lenis;\n }\n\n private scrollElement(): HTMLElement | null {\n return this.wrapper ?? (typeof document !== 'undefined' ? document.documentElement : null);\n }\n\n private unlock(): void {\n if (this.lockedOverflow === null) return;\n const el = this.scrollElement();\n if (el) el.style.overflow = this.lockedOverflow;\n this.lockedOverflow = null;\n }\n\n private startLoop(): void {\n // Run the perpetual rAF loop OUTSIDE Angular. In-zone, a never-ending requestAnimationFrame\n // keeps ApplicationRef.isStable() permanently false, so SSR hydration never completes\n // (NG0506: \"hydration expected isStable() to emit true ... didn't happen within 10000ms\").\n this.zone.runOutsideAngular(() => {\n const loop = (time: number) => {\n this.lenis?.raf(time);\n this.rafId = requestAnimationFrame(loop);\n };\n this.rafId = requestAnimationFrame(loop);\n });\n }\n}\n","import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, AfterViewInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport type { ScrollId } from '@vectoriox/iox-ui/design-core';\n\nimport { prefersReducedMotion } from '../../motion/motion';\nimport { planScroll } from '../../motion/scroll-plan';\nimport { PageScrollProvider } from '../../services/page-scroll.provider';\n\n@Component({\n selector: 'iox-page-component',\n templateUrl: './page-component.component.html',\n styleUrls: ['./page-component.component.scss'],\n standalone: false\n})\nexport class IoxPageComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() class = '';\n /** The look's Scrolling choice (`designMotion.scroll`); absent = Smooth, what every page did before rev 3.1. */\n @Input() scroll?: ScrollId | string | null;\n @ViewChild('page') public page!: ElementRef<HTMLDivElement>;\n private scrollSubscription!: Subscription;\n private started = false;\n @Output() scrollEvent = new EventEmitter<{\n scrollTop: number;\n scrollLeft: number;\n scrollHeight: number;\n scrollWidth: number;\n clientHeight: number;\n clientWidth: number;\n scrollPercentage: number;\n }>();\n\n constructor(private pageScrollProvider: PageScrollProvider) {}\n\n ngAfterViewInit(): void {\n if (this.page) {\n this.scrollSubscription = fromEvent(this.page.nativeElement, 'scroll').subscribe((event) => {\n this.onScroll(event as Event);\n });\n this.startScroller();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['scroll'] && this.started) this.startScroller();\n }\n\n onScroll(event: Event): void {\n const target = event.target as HTMLElement;\n const scrollTop = target.scrollTop;\n const scrollLeft = target.scrollLeft;\n const scrollHeight = target.scrollHeight;\n const scrollWidth = target.scrollWidth;\n const clientHeight = target.clientHeight;\n const clientWidth = target.clientWidth;\n const scrollPercentage = (scrollTop / (scrollHeight - clientHeight)) * 100;\n\n this.scrollEvent.emit({ scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth, scrollPercentage });\n }\n\n ngOnDestroy(): void {\n if (this.scrollSubscription) {\n this.scrollSubscription.unsubscribe();\n }\n }\n\n private startScroller(): void {\n this.started = true;\n this.pageScrollProvider.init({\n wrapper: this.page.nativeElement,\n content: this.page.nativeElement.querySelector<HTMLElement>('.page-mask') ?? undefined,\n lenis: planScroll(this.scroll, { reducedMotion: prefersReducedMotion() }),\n });\n }\n}\n","<div #page [class]=\"class\" class=\"iox-page-wrapper\">\n <div class=\"page-mask\">\n <ng-content></ng-content>\n </div>\n</div>\n","\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IoxPageComponent } from './page-component/page-component.component';\nimport { PageScrollProvider } from '../services/page-scroll.provider';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [IoxPageComponent],\n exports: [IoxPageComponent],\n providers: [PageScrollProvider]\n})\nexport class IoxPageModule {}\n","import { NgModule } from '@angular/core';\nimport { IoxAosModule } from './iox-aos/iox-aos.module';\nimport { IoxPageModule } from './iox-page/iox-page.module';\n\n\n@NgModule({\n declarations: [],\n imports: [IoxAosModule, IoxPageModule],\n exports: [IoxAosModule, IoxPageModule]\n})\nexport class IoxUiModule { }\n","import { Injectable } from '@angular/core';\n\n/**\n * Holds live component instances by nodeId so interaction engines can call\n * imperative methods (e.g. Swiper.slideNext()) without direct references.\n *\n * Components register on init and unregister on destroy.\n * Used by both InteractionEngineService (builder) and ClientInteractionService (SSR engine).\n */\n@Injectable({ providedIn: 'root' })\nexport class ComponentInstanceRegistryService {\n private _instances = new Map<string, any>();\n\n register(nodeId: string, instance: any): void {\n this._instances.set(nodeId, instance);\n }\n\n unregister(nodeId: string): void {\n this._instances.delete(nodeId);\n }\n\n get(nodeId: string): any {\n return this._instances.get(nodeId);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const IS_PREVIEW = new InjectionToken<boolean>('IS_PREVIEW');\n\nexport interface IBuilderEventEmitter {\n emit(type: string, data?: any): void;\n}\n\nexport const IOX_BUILDER_EVENTS = new InjectionToken<IBuilderEventEmitter>('IOX_BUILDER_EVENTS');\n","import { Component, Input } from '@angular/core';\n\n/**\n * Directive-host image: the selector is `img[iox-img]`, so when created dynamically the HOST is\n * the `<img>` itself — NO wrapper element. All styles land on the `<img>` via `.iox-node-{id}`;\n * a single-element (leaf) node has no inner/outer split. See render-parity.md.\n */\n@Component({\n selector: 'img[iox-img]',\n template: '',\n host: {\n '[attr.src]': 'srcAttr',\n '[attr.alt]': 'altAttr',\n '[attr.aria-hidden]': 'ariaHiddenAttr',\n '[attr.data-iox-empty]': 'emptyAttr',\n '[class]': \"'iox-node-' + nodeId\",\n },\n styles: [':host { display: block; max-width: 100%; }'],\n standalone: false,\n})\nexport class BuilderImageComponent {\n @Input() src = 'https://placehold.co/600x400?text=Image';\n @Input() alt = 'Image';\n @Input() nodeId = '';\n /**\n * What a MARKED image shows WHENEVER it has no source (design-system DS3) — set by each renderer\n * from the shared `emptyImagePlaceholder` (`@vectoriox/iox-ui/design-core`): the \"Add image\" label\n * on the canvas, the blank on the live site, `null` for an unmarked image, which therefore renders\n * as before. It does not depend on `src`, so clearing the source (a binding emptied, a context slot\n * not yet filled) shows it with no re-render; a renderer re-sets it only when the MARKER changes.\n */\n @Input() emptySrc: string | null = null;\n\n /**\n * The `src` attribute value, or `null` to OMIT the attribute entirely when there is no image.\n *\n * `src=\"\"` is not \"no image\": the browser resolves the empty string against the document URL and\n * re-requests the PAGE itself as an image — a broken-image icon plus a wasted round trip. Angular\n * removes an attribute bound to `null`, which is the only way to render a genuinely src-less img.\n *\n * An empty src is a normal state, not a mistake: a context slot starts empty on purpose and is\n * filled when the visitor interacts (see element-context-state-plan.md).\n */\n get srcAttr(): string | null {\n return this.src || this.emptySrc || null;\n }\n\n private get showsPlaceholder(): boolean {\n return !this.src && !!this.emptySrc;\n }\n\n /** `data-iox-empty` while the placeholder stands in — the hook the shared fill rule keys on. */\n get emptyAttr(): '' | null {\n return this.showsPlaceholder ? '' : null;\n }\n\n /**\n * The placeholder is not the author's picture, so it never carries the author's alt: it is\n * decorative (`alt=\"\"`) and hidden from assistive technology — on the live site, in Preview and on\n * the canvas alike (the canvas label is painted inside the placeholder, not announced as content).\n */\n get altAttr(): string {\n return this.showsPlaceholder ? '' : this.alt;\n }\n\n get ariaHiddenAttr(): 'true' | null {\n return this.showsPlaceholder ? 'true' : null;\n }\n}\n","import { Component, Input } from '@angular/core';\n\n/** Directive-host spacer: the `<div>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'div[iox-spacer]',\n template: '',\n host: { '[class]': \"'iox-spacer iox-node-' + nodeId\" },\n styles: [':host { display: block; flex-shrink: 0; }'],\n standalone: false,\n})\nexport class BuilderSpacerComponent {\n @Input() nodeId = '';\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-card',\n template: `\n <div class=\"card\" [ngClass]=\"'iox-node-' + nodeId\">\n <div class=\"image-wrapper\">\n <img [src]=\"image\" alt=\"Card image\" class=\"card-img\">\n </div>\n <h2>{{ title }}</h2>\n <p>{{ description }}</p>\n </div>\n `,\n // Legacy Card (hidden, deprecated). Its inner title/image are not nodes and keep their pre-DS2\n // literals — the contract defines no token for them, and component CSS may reference only\n // spec tokens (§3b-bis). The box itself wears the `card` element style.\n styles: [\n '.image-wrapper { width: 100%; aspect-ratio: 1/1; overflow: hidden; margin-bottom: 0.75rem; }',\n '.card-img { width: 100%; height: 100%; object-fit: cover; }',\n 'h2 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }',\n 'p { margin: 0; }',\n ],\n standalone: false,\n})\nexport class CardComponent {\n @Input() title: string = '';\n @Input() image: string = '';\n @Input() description: string = '';\n @Input() nodeId: string = '';\n}\n","import { Component, Input } from '@angular/core';\n\n/** Directive-host divider: the `<div>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'div[iox-divider]',\n template: '',\n host: { '[class]': \"'iox-divider iox-node-' + nodeId\" },\n styles: [':host { display: block; box-sizing: border-box; }'],\n standalone: false,\n})\nexport class BuilderDividerComponent {\n @Input() nodeId = '';\n}\n","/**\n * Phosphor's CSS needs TWO classes — a weight and a name (`.ph-thin.ph-house:before`). A class\n * string carrying only the name matches nothing at all: no `font-family`, no glyph, so the element\n * renders as an invisible, zero-glyph box.\n *\n * The icon picker used to emit exactly that (`ph-house`), so every icon chosen through it was blank\n * on the canvas, in the picker grid and on the live site. Fixing the picker alone would leave every\n * icon already saved broken, so the repair happens at RENDER time, here, and is shared by the\n * builder's Icon component and the SSR engine's renderer.\n *\n * Everything that is not a weightless Phosphor class passes through untouched — Iconoir\n * (`iconoir-home`), custom icon-set fonts, Font Awesome, and Phosphor strings that already carry a\n * weight.\n *\n * See iox-ai-guidance `architecture/cms/custom-icon-fonts.md`.\n */\n\n/** The weight classes Phosphor ships. `ph` is the regular weight. */\nconst PHOSPHOR_WEIGHTS = new Set(['ph', 'ph-thin', 'ph-light', 'ph-regular', 'ph-bold', 'ph-fill', 'ph-duotone']);\n\n/** The weight assumed when a Phosphor class has none — the weight this platform uses everywhere. */\nexport const DEFAULT_PHOSPHOR_WEIGHT = 'ph-thin';\n\nexport function normalizeIconClass(iconClass: string | null | undefined): string {\n const raw = (iconClass ?? '').trim();\n if (!raw) return '';\n\n const tokens = raw.split(/\\s+/);\n const hasWeight = tokens.some(token => PHOSPHOR_WEIGHTS.has(token));\n if (hasWeight) return tokens.join(' ');\n\n // `ph-` prefixed but weightless — the broken shape. A token that is only `ph-` is not a name.\n const hasPhosphorName = tokens.some(token => token.startsWith('ph-') && token.length > 3);\n if (!hasPhosphorName) return tokens.join(' ');\n\n return [DEFAULT_PHOSPHOR_WEIGHT, ...tokens].join(' ');\n}\n","import { Component, Input } from '@angular/core';\n\nimport { normalizeIconClass } from '../../icons/normalize-icon-class';\n\n/** Directive-host icon: the `<i>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'i[iox-icon]',\n template: '',\n host: { '[class]': \"normalizedIconClass + ' iox-node-' + nodeId\" },\n // display:inline-flex — the glyph (a font `::before`) becomes a flex item, so the `<i>` box\n // shrink-wraps it and grows with `font-size`. Phosphor forces this on its own class\n // (`[class^=\"ph-\"]{display:inline-flex}`); generated (fantasticon) fonts style only `::before`,\n // so WITHOUT this an `<i>` on a generated font falls back to `display:block; line-height:0` where\n // the glyph OVERFLOWS a collapsed box and never expands its parent (e.g. a ButtonBlock).\n // line-height:0 — an icon is a glyph and must contribute no line-box height of its own (spacing\n // comes from padding/margin). This host style takes precedence over the node's `.iox-node-{id}`\n // rule, so it MUST stay in sync with the Icon branch of renderDefaultDeclarations in the shared\n // style-compiler; if they disagree, this one wins wherever real components are instantiated\n // (builder canvas + the engine's component renderer) and the two renderers silently diverge.\n styles: [':host { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }'],\n standalone: false,\n})\nexport class BuilderIconComponent {\n /** Full Phosphor icon CSS class string, e.g. \"ph-thin ph-star\" */\n @Input() iconClass = 'ph-thin ph-star';\n @Input() nodeId = '';\n\n /**\n * Repaired at render time: a Phosphor class saved without its weight (`ph-house`) matches no CSS\n * rule and renders as an invisible box. The picker used to emit exactly that, so this keeps\n * every already-saved icon working. Shared with the SSR engine — see `normalizeIconClass`.\n */\n get normalizedIconClass(): string {\n return normalizeIconClass(this.iconClass);\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { IS_PREVIEW } from '../builder-tokens';\n\n/**\n * Directive-host link: the `<a>` IS the host — no wrapper. Content is the label; styles come from\n * `.iox-node` (the legacy `style` input is kept for builder compat but no longer inline-applied).\n *\n * Outside a preview (`IS_PREVIEW` unprovided — the editing canvas, the design sampler) the link keeps\n * its real `href` so it LOOKS like the live site's (the UA link styles key on it) and stays clickable\n * so the canvas can select it, but no click navigates: plain, modified (cmd/ctrl/shift) and middle\n * clicks all have their default cancelled here.\n */\n@Component({\n selector: 'a[iox-link]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': 'resolvedHref',\n '[attr.target]': 'target',\n '[class]': \"'builder-link iox-node-' + nodeId\",\n '(click)': 'onLinkClick($event)',\n '(auxclick)': 'onLinkClick($event)',\n },\n // `color: inherit` is the PRE-DS2 look and applies only to a Link wearing no element style (the\n // marker, §3b-bis): a scoped :host colour out-ranks the node rule, so on a Link wearing `link`\n // it silently beat the style's colour (DS2 e2e) — and dropping it for every Link restyled saved\n // pre-DS2 links (DS2 verification). `:where()` keeps the pre-DS2 specificity.\n styles: [`:host { display: inline; cursor: pointer; } :host:where(:not(.iox-es)) { color: inherit; }`],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderLinkComponent {\n @Input() nodeId: string = '';\n @Input() label = 'Click here';\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n @Input() style: { [key: string]: any } = {};\n\n constructor(@Optional() @Inject(IS_PREVIEW) public isPreview: boolean) {}\n\n get resolvedHref(): string {\n if (this.linkType !== 'page') return this.url || '#';\n return this.pageRoute || '#';\n }\n\n onLinkClick(event: MouseEvent): void {\n if (!this.isPreview) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host button: the `<a>` IS the host — no wrapper. Content is the label; styling comes\n * from `:host` variants + `.iox-node`.\n */\n@Component({\n selector: 'a[iox-button]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': 'link',\n '[class]': \"'builder-btn variant-' + variant + ' iox-node-' + nodeId\",\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n styles: [`\n /* Legacy Button (hidden from the palette since DS2 — ButtonBlock is \"Button\"). Its look is\n the PRE-DS2 literals, and applies ONLY to a node that wears no element style (the\n element-style marker, design-system §3b-bis): a saved legacy Button renders exactly as it\n did whatever tokens the org holds, and a Button wearing button-primary/-secondary/-ghost\n takes its look from its node rule alone — the variant selectors used to out-rank it.\n \\`:where()\\` keeps each rule at its pre-DS2 specificity. */\n :host {\n display: inline-block;\n cursor: pointer;\n text-align: center;\n }\n :host:where(:not(.iox-es)) {\n padding: 0.6rem 1.5rem;\n border-radius: 6px;\n font-size: 0.9rem;\n text-decoration: none;\n transition: opacity 0.15s;\n }\n :host.variant-primary:where(:not(.iox-es)) { background: #cb9090; color: #fff; border: 1px solid #cb9090; }\n :host.variant-outlined:where(:not(.iox-es)) { background: transparent; color: #cb9090; border: 1px solid #cb9090; }\n :host.variant-text:where(:not(.iox-es)) { background: transparent; color: #cb9090; border: 1px solid transparent; }\n :host[contenteditable] { outline: 2px solid #cb9090; cursor: text; }\n `],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderButtonComponent implements OnInit {\n @Input() label = 'Click me';\n @Input() link = '#';\n @Input() variant: 'primary' | 'outlined' | 'text' = 'primary';\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n\n public editing = false;\n\n constructor(@Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null) {}\n\n ngOnInit(): void {}\n\n startEdit(event: MouseEvent): void {\n if (this.isBound('label')) return;\n event.preventDefault();\n event.stopPropagation();\n this.editing = true;\n setTimeout(() => (event.target as HTMLElement).focus());\n }\n\n commitEdit(event: FocusEvent): void {\n if (!this.editing) return;\n this.editing = false;\n const newValue = (event.target as HTMLElement).innerText.trim();\n this.label = newValue;\n this.syncTraitToPanel('label', newValue);\n }\n\n onKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n }\n if (event.key === 'Escape') {\n this.editing = false;\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null });\n }\n}\n","/**\n * Where a node links (W1.1). Link and LinkedContainer always had two link types — an external URL or a\n * website PAGE by its route — and ButtonBlock now has the same pair, so a composed \"Get in touch\" button\n * is a page link the builder shows as `/contact`, not a hand-built URL. Framework-free: the composer\n * (generation-core) writes it, the builder canvas and both engine render paths read it.\n */\n\nexport enum LinkType {\n /** Links nowhere — a Heading's default; \"Link the whole card\" (Card v2) turns its title's link on. */\n None = 'none',\n External = 'external',\n Page = 'page',\n}\n\nexport interface ButtonBlockLinkProps {\n tag?: unknown;\n linkType?: unknown;\n href?: unknown;\n pageRoute?: unknown;\n}\n\nconst ANCHOR_TAG = 'a';\n\n/**\n * The href a ButtonBlock renders, or `null` for none (it is a `<button>`, or a link with no target).\n * Only an `<a>` links. A page link's route goes through `pageHref` — the engine's `resolvePageHref`\n * (`:params` substituted, base-relative); the builder canvas passes none and shows the route as authored,\n * as its Link does.\n */\nexport function buttonBlockHref(props: ButtonBlockLinkProps, pageHref: (route: string) => string = route => route): string | null {\n if (props.tag !== ANCHOR_TAG) return null;\n const href = props.linkType === LinkType.Page ? pageHref(String(props.pageRoute ?? '')) : String(props.href ?? '');\n return href || null;\n}\n\nexport interface NodeLinkProps {\n linkType?: unknown;\n url?: unknown;\n pageRoute?: unknown;\n}\n\n/** The class of the `<a>` a linked Heading renders — the Card v2 stretched link keys on it (iox-design.css:\n * the card is the click target, its buttons sit above, the focus ring is drawn on the card). */\nexport const CARD_LINK_CLASS = 'iox-card-link';\n/** On the editing canvas the anchor carries this, so the stretched `::after` is off and every part of the\n * card stays clickable (board 8). */\nexport const CANVAS_LINK_ATTRIBUTE = 'data-iox-canvas';\n\n/**\n * The href a linked Heading renders (Card v2: the card's title IS its link), or `null` when it links\n * nowhere — `none`, or a link with no target yet (the title then renders as plain words). A page link goes\n * through `pageHref` exactly as a ButtonBlock's does.\n */\nexport function headingHref(props: NodeLinkProps, pageHref: (route: string) => string = route => route): string | null {\n if (props.linkType === LinkType.Page) {\n const route = String(props.pageRoute ?? '');\n return route ? pageHref(route) || null : null;\n }\n if (props.linkType === LinkType.External) return String(props.url ?? '').trim() || null;\n return null;\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { CARD_LINK_CLASS, headingHref, LinkType } from '../../../design-core/node-links';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS, IS_PREVIEW } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host Heading: the real `<h1>`…`<h6>` IS the host — no `app-builder-heading`\n * wrapper, no inner/outer split. The tag is chosen by whoever CREATES the component\n * (engine: `createComponent({ hostElement: document.createElement(level) })`; builder:\n * RenderDirective does the same), NOT by an internal ngSwitch. `level` is kept as an input\n * for that creation logic + serialization. Editing (contenteditable) runs in the builder only.\n *\n * A Heading may LINK (Card v2, \"Link the whole card\"): its words then render inside ONE `<a>` — the\n * card's title is its link, so the link's name is the title. The shared CSS stretches it over the card\n * (iox-design.css). On the editing canvas the anchor never navigates and carries `data-iox-canvas`, so\n * the stretch is off and every part of the card stays clickable; a click still selects the heading.\n */\n@Component({\n // `span`: an Accordion's question sits INSIDE its header's <button> (CC2) — phrasing content only; the\n // outline level is the <hN> the header renders around the button (composite-core accordionHeadingLevel).\n selector: 'h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading],span[iox-heading]',\n template: `@if (href) {<a [class]=\"linkClass\" [attr.href]=\"href\" [attr.target]=\"linkTarget\" [attr.rel]=\"linkRel\"\n [attr.data-iox-canvas]=\"isPreview ? null : ''\" (click)=\"onLinkClick($event)\" (auxclick)=\"onLinkClick($event)\">{{ content }}</a>} @else {<ng-container>{{ content }}</ng-container>}`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(mousedown)': 'onMouseDown($event)',\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n // No display/position/color in :host (they'd out-specify styleProps `.iox-node`). Heading tags\n // are block by default; only the editing affordances. The node's own rule holds the margin.\n styles: [`:host[contenteditable] { outline: none; cursor: text; }`],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderHeadingComponent implements OnInit {\n @Input() content = 'Heading';\n @Input() level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' = 'h2';\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n @Input() linkType: LinkType = LinkType.None;\n @Input() url = '';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n public editing = false;\n public readonly linkClass = CARD_LINK_CLASS;\n\n constructor(\n @Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean | null,\n ) {}\n\n /** Where the heading links, or null (plain words). The engine hands `pageRoute` in already resolved;\n * the canvas shows the route as authored, as its Link does. */\n get href(): string | null {\n return headingHref({ linkType: this.linkType, url: this.url, pageRoute: this.pageRoute });\n }\n\n get linkTarget(): string | null {\n return this.target && this.target !== '_self' ? this.target : null;\n }\n\n get linkRel(): string | null {\n return this.target === '_blank' ? 'noopener' : null;\n }\n\n /** On the editing canvas a link never navigates (plain, modified and middle clicks); the click still\n * bubbles to the heading, which is what selects it. */\n onLinkClick(event: MouseEvent): void {\n if (!this.isPreview) event.preventDefault();\n }\n\n ngOnInit(): void {}\n\n onMouseDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n startEdit(event: Event): void {\n if (this.isBound('content')) return;\n event.stopPropagation();\n this.editing = true;\n this.cdr.detectChanges();\n this.cdr.detach();\n const el = event.target as HTMLElement;\n setTimeout(() => { el.focus(); });\n }\n\n commitEdit(event: FocusEvent): void {\n if (!this.editing) return;\n this.editing = false;\n const newValue = (event.target as HTMLElement).innerText;\n this.content = newValue;\n this.cdr.reattach();\n this.syncTraitToPanel('content', newValue);\n }\n\n onKeyDown(event: Event): void {\n const ke = event as KeyboardEvent;\n if (ke.key === 'Enter' && !ke.shiftKey) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n }\n if (ke.key === 'Escape') {\n this.editing = false;\n this.cdr.reattach();\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });\n }\n}\n","import { ChangeDetectorRef, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host Text: the real `<p>`/`<span>` IS the host — no `app-text-block` wrapper,\n * no inner/outer split. The tag is chosen by whoever CREATES the component (engine/builder\n * pass `hostElement`), NOT an internal ngSwitch. Content is rich HTML (Quill) → bound via\n * `[innerHTML]` on the host. Editing (contenteditable) runs in the builder only.\n */\n@Component({\n selector: 'p[iox-text],span[iox-text]',\n template: ``,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[innerHTML]': 'content',\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(pointerdown)': 'onPointerDown($event)',\n '(mousedown)': 'onMouseDown($event)',\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n '(paste)': 'onPaste($event)',\n },\n // No display/position/color/margin in :host: it ties with the node rule and, coming later, wins.\n styles: [`:host { white-space: pre-wrap; } :host[contenteditable] { outline: none; cursor: text; }`],\n standalone: false,\n})\nexport class TextBlockComponent implements OnInit {\n @Input() content = 'Enter text here';\n @Input() tag: 'p' | 'span' = 'p';\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n\n public editing = false;\n\n constructor(\n @Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {}\n\n onPointerDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n onMouseDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n startEdit(event: Event): void {\n if (this.isBound('content')) return;\n event.stopPropagation();\n this.editing = true;\n this.cdr.detectChanges();\n this.cdr.detach();\n const el = event.target as HTMLElement;\n el.closest('[data-iox-draggable]')?.setAttribute('data-editing', '');\n setTimeout(() => { el.focus(); });\n }\n\n onPaste(event: Event): void {\n event.preventDefault();\n const plain = (event as ClipboardEvent).clipboardData?.getData('text/plain') ?? '';\n // Insert as plain text so no inline styles from clipboard survive\n document.execCommand('insertText', false, plain);\n }\n\n commitEdit(event: Event): void {\n if (!this.editing) return;\n this.editing = false;\n const el = event.target as HTMLElement;\n el.closest('[data-iox-draggable]')?.removeAttribute('data-editing');\n const newValue = el.innerText;\n this.content = newValue;\n // Explicitly reset to plain text so any pasted HTML nodes are gone\n // before Angular re-renders [innerHTML]\n el.textContent = newValue;\n this.cdr.reattach();\n this.syncTraitToPanel('content', newValue);\n }\n\n onKeyDown(event: Event): void {\n if ((event as KeyboardEvent).key === 'Escape') {\n this.editing = false;\n this.cdr.reattach();\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/** Directive-host section: the `<section>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'section[iox-section]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host (they'd out-specify styleProps). <section> is block by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class SectionComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * The tags a Container may render as (its `htmlTag` trait) — the builder canvas's list. The engine's\n * string renderer and component path both pick from THIS list, so a Navigation bar is a `<nav>` on\n * the live site exactly as on the canvas.\n */\nexport const CONTAINER_HTML_TAGS: ReadonlyArray<string> = ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'];\n\n/** `htmlTag` when it is an allowed Container tag, else `div`. */\nexport function containerHtmlTag(htmlTag: unknown): string {\n return CONTAINER_HTML_TAGS.includes(String(htmlTag)) ? String(htmlTag) : 'div';\n}\n\n/** Directive-host container: the host element IS the container — no wrapper, no inner/outer split.\n * Variable tag: the engine creates it on an explicit `hostElement` of `containerHtmlTag(htmlTag)`. */\n@Component({\n selector: 'div[iox-container],section[iox-container],article[iox-container],header[iox-container],footer[iox-container],main[iox-container],nav[iox-container],ul[iox-container],ol[iox-container],li[iox-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host — they'd out-specify styleProps (`.iox-node`). A <div> is block\n // by default; the engine supplies position:relative as a render-default (styleProps overrides).\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ContainerComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, ElementRef, Inject, Input, OnDestroy, OnInit, Optional, ViewChild, ViewContainerRef } from '@angular/core';\nimport { IS_PREVIEW } from '../builder-tokens';\n\n/** `click` covers plain and modified clicks; a middle click opens a tab through `auxclick` alone. */\nconst NAVIGATING_CLICKS = ['click', 'auxclick'] as const;\n\n/**\n * Directive-host linked container: the `<a>` IS the host — no wrapper, no inner/outer split. An Accordion's\n * HEADER (CC2, role `accordion.trigger`) is created on a `<button>` instead — a button that opens its item,\n * never a link; the engine puts it inside the `<hN>` its question's level names.\n */\n@Component({\n selector: 'a[iox-linked-container],button[iox-linked-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[attr.href]': 'isButton ? null : resolvedHref',\n '[attr.target]': 'isButton ? null : target',\n '[attr.type]': \"isButton ? 'button' : null\",\n '[class]': \"'linked-container-root iox-node-' + nodeId + (isButton ? ' iox-accordion-button' : '')\",\n },\n // No display/position/color in :host (they'd out-specify styleProps). An <a> is inline by\n // default, so the engine supplies display:block + position:relative as render-defaults.\n styles: [`:host { box-sizing: border-box; text-decoration: none; cursor: pointer; }`],\n standalone: false,\n})\nexport class LinkedContainerComponent implements OnInit, OnDestroy {\n @Input() nodeId = '';\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n private capturePreventDefault = (e: MouseEvent) => e.preventDefault();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n @Optional() @Inject(IS_PREVIEW) private isPreview: boolean,\n ) {}\n\n ngOnInit(): void {\n if (!this.isPreview && !this.isButton) {\n for (const type of NAVIGATING_CLICKS) this.elRef.nativeElement.addEventListener(type, this.capturePreventDefault, true);\n }\n }\n\n ngOnDestroy(): void {\n if (!this.isPreview && !this.isButton) {\n for (const type of NAVIGATING_CLICKS) this.elRef.nativeElement.removeEventListener(type, this.capturePreventDefault, true);\n }\n }\n\n /** True when created on a <button> (an Accordion header) — it never navigates. */\n get isButton(): boolean {\n return this.elRef.nativeElement.tagName === 'BUTTON';\n }\n\n get resolvedHref(): string {\n if (this.linkType !== 'page') return this.url || '#';\n return this.pageRoute || '#';\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Client-engine repeater shell. Data fetching and item expansion are handled\n * by DataSourceResolverService + BindingApplicatorService in the PageResolver\n * before this component is rendered. ClientRenderDirective inserts one child\n * per resolved item into childrenHost.\n */\n@Component({\n selector: 'iox-repeater',\n template: `\n <div class=\"repeater-root\" [ngClass]=\"['iox-node-' + nodeId]\">\n <ng-container #childrenHost></ng-container>\n </div>\n `,\n styles: [`.repeater-root { position: relative; box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientRepeaterComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport { buttonBlockHref, LinkType } from '../../../design-core/node-links';\n\n/**\n * Directive-host ButtonBlock: the real `<a>`/`<button>` IS the host — no `app-button-block`\n * wrapper, no inner/outer split. The tag is chosen by whoever CREATES the component (engine\n * passes `hostElement`: `<a>` when `tag==='a'`, else `<button>`), NOT an internal `*ngIf`.\n * The `iox-btn-block` class (UA resets: inline-flex, color/font inherit, no border) matches the\n * string renderer and lives in the engine's global styles.scss — kept OFF `:host` so styleProps\n * (`.iox-node-{id}`) can override it. Children render into the host via `childrenHost`.\n * A page link (`linkType: page`) arrives with its `pageRoute` already resolved by the engine (params\n * substituted, base-relative — the Link's resolver); `buttonBlockHref` decides the href for every renderer.\n */\n@Component({\n selector: 'a[iox-button-block],button[iox-button-block]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-btn-block iox-node-' + nodeId\",\n '[attr.href]': 'resolvedHref',\n '[attr.target]': \"tag === 'a' ? (target || null) : null\",\n '[attr.type]': \"tag === 'a' ? null : type\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ButtonBlockComponent {\n @Input() tag: 'button' | 'a' = 'button';\n @Input() linkType: LinkType = LinkType.External;\n @Input() href = '';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' = '_self';\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n get resolvedHref(): string | null {\n return buttonBlockHref(this);\n }\n}\n","// Virtual trait → composed CSS property helpers.\n//\n// Several style traits are \"virtual\" — they don't map 1:1 to a CSS property but\n// are components of a multi-function CSS value. composeVirtualTraits() strips\n// these virtual keys from the style map and replaces them with the correctly\n// composed CSS properties (filter, backdrop-filter, transform, transition).\n//\n// SHARED (iox-ui): consumed by BOTH the builder (render.directive + style panel)\n// and the SSR engine (LayoutRendererService). It MUST live here, not in iox-builder,\n// because the engine does not depend on iox-builder — without it the engine emitted\n// the raw virtual keys (`translate-x`, `filter-blur`, `scale-x`…) as invalid CSS.\n// Run this BEFORE compileDeclarations so the CSS output is identical on both sides.\n\n// ─── Filter ──────────────────────────────────────────────────────────────────\n\nconst FILTER_FUNS: [trait: string, fn: string, def: string][] = [\n ['filterBlur', 'blur', '0px'],\n ['filterBrightness', 'brightness', '1'],\n ['filterContrast', 'contrast', '1'],\n ['filterGrayscale', 'grayscale', '0'],\n ['filterSaturate', 'saturate', '1'],\n ['filterHueRotate', 'hue-rotate', '0deg'],\n ['filterSepia', 'sepia', '0'],\n ['filterInvert', 'invert', '0'],\n];\n\n// ─── Backdrop-filter ─────────────────────────────────────────────────────────\n\nconst BACKDROP_FUNS: [trait: string, fn: string, def: string][] = [\n ['backdropBlur', 'blur', '0px'],\n ['backdropBrightness', 'brightness', '1'],\n ['backdropContrast', 'contrast', '1'],\n ['backdropSaturate', 'saturate', '1'],\n];\n\n// ─── Transform ───────────────────────────────────────────────────────────────\n\nconst TRANSFORM_FUNS: [trait: string, fn: string, def: string][] = [\n ['translateX', 'translateX', '0px'],\n ['translateY', 'translateY', '0px'],\n ['scaleX', 'scaleX', '1'],\n ['scaleY', 'scaleY', '1'],\n ['rotate', 'rotate', '0deg'],\n ['skewX', 'skewX', '0deg'],\n ['skewY', 'skewY', '0deg'],\n];\n\n// ─── ::marker pseudo-element ─────────────────────────────────────────────────\n\nconst MARKER_FUNS: [trait: string, cssProp: string][] = [\n ['markerColor', 'color'],\n ['markerFontSize', 'fontSize'],\n];\n\n// ─── Groups: which virtual traits compose into which output property ─────────\n\n/**\n * One composed output property and the virtual traits it is built from.\n *\n * Consumers that emit a PARTIAL override (a breakpoint layer — see `responsive.ts`) need\n * to know which outputs an override actually touches, and what to emit when a touched\n * group composes to nothing (e.g. translateX reset to 0px while the base had 20px: the\n * override must say `transform: none`, or the wider rule's transform silently wins).\n */\nexport interface VirtualTraitGroup {\n /** The composed key `composeVirtualTraits` writes (camelCase, or `__markerStyles`). */\n readonly output: string;\n /** The virtual trait keys that feed it. */\n readonly keys: readonly string[];\n /** Value that cancels a wider rule's output, or `null` when there is no such value\n * (`::marker` styles are a nested map, not a single cancellable property). */\n readonly reset: string | null;\n}\n\nconst TRANSITION_KEYS = ['transitionDuration', 'transitionTimingFunction', 'transitionDelay', 'transitionProperty'] as const;\n\n/** The Transition ▸ Properties trait (G2): what a transition names, comma-separated. Unset, the renderers fill in the\n * properties the node's states change (`withStateTransitions`); a transition never names `all` unless an author\n * typed it. */\nexport const TRANSITION_PROPERTY_KEY = 'transitionProperty';\n\n/** The property list a `transitionProperty` value names (`color, transform` → two entries). */\nexport function transitionPropertyList(value: unknown): string[] {\n return String(value ?? '').split(',').map(p => p.trim()).filter(Boolean);\n}\n\n// ─── Max lines (line clamp) ─────────────────────────────────────────────────────\n\n/** \"Max lines\" (Card v2, board 8 — opt-in on a Title / Text): a whole number clamps the text to that many\n * lines with an ellipsis. It composes into the four declarations a line clamp takes; anything else\n * (`none`, empty, 0) clamps nothing. */\nexport const MAX_LINES_KEY = 'maxLines';\nconst LINE_CLAMP_OUTPUT = 'WebkitLineClamp';\n\nfunction lineClamp(value: unknown): number | null {\n const n = Number(String(value ?? '').trim());\n return Number.isInteger(n) && n > 0 ? n : null;\n}\n\n// ─── Text direction ──────────────────────────────────────────────────────────────\n\n/** The Text Direction trait: `ltr` / `rtl` is the author's choice, unset (or empty) follows the\n * parent — `direction` is inherited, so a node with no direction of its own follows an RTL section\n * or `<html dir=\"rtl\">` (vectoriox/iox-ui#14). */\nexport const TEXT_DIRECTION_KEY = 'textDirection';\n/** Where the trait used to live. Until iox-ui#14 its default `ltr` was serialised onto EVERY node,\n * so a stored `direction: ltr` in a node's own styleProps records no choice and compiles nothing;\n * a stored `rtl` was always chosen and still compiles. In a sparse layer (a state, a breakpoint)\n * only an edit is stored, so there `ltr` too is the author's. */\nexport const LEGACY_DIRECTION_KEY = 'direction';\nconst LEGACY_DEFAULT_DIRECTION = 'ltr';\nconst DIRECTION_OUTPUT = 'direction';\n\nconst isSet = (v: unknown): boolean => v !== undefined && v !== null;\n\nfunction composeDirection(raw: Record<string, any>, base: Record<string, any>): string | undefined {\n if (isSet(raw[TEXT_DIRECTION_KEY])) return raw[TEXT_DIRECTION_KEY] || undefined;\n if (raw !== base && isSet(raw[LEGACY_DIRECTION_KEY])) return raw[LEGACY_DIRECTION_KEY] || undefined;\n if (isSet(base[TEXT_DIRECTION_KEY])) return base[TEXT_DIRECTION_KEY] || undefined;\n const legacy = base[LEGACY_DIRECTION_KEY];\n return legacy && legacy !== LEGACY_DEFAULT_DIRECTION ? legacy : undefined;\n}\n\n/**\n * A saved node's own style map with its legacy `direction` moved onto the Text Direction trait —\n * `rtl` carried over, the serialised default `ltr` released — so the builder's panel shows what the\n * node renders. Pure; returns the map unchanged (same reference) when there is nothing to move.\n */\nexport function migrateLegacyDirection(styleProps: Record<string, any>): Record<string, any> {\n if (!styleProps || !(LEGACY_DIRECTION_KEY in styleProps)) return styleProps;\n const { [LEGACY_DIRECTION_KEY]: legacy, ...rest } = styleProps;\n if (!isSet(rest[TEXT_DIRECTION_KEY]) && legacy && legacy !== LEGACY_DEFAULT_DIRECTION) rest[TEXT_DIRECTION_KEY] = legacy;\n return rest;\n}\n\n// ─── Text alignment ──────────────────────────────────────────────────────────────\n\n/** The Align trait's values: LOGICAL, so a text starts at the inline start of whatever direction it\n * reads in — the left in LTR, the right in RTL (vectoriox/iox-ui#16). */\nexport enum TextAlign {\n Start = 'start',\n Center = 'center',\n End = 'end',\n Justify = 'justify',\n}\nexport const TEXT_ALIGN_KEY = 'textAlign';\n/** Until iox-ui#16 the trait's default was the PHYSICAL `left`, serialised onto every node — so in a\n * node's own styleProps a stored `left` records no choice (the old panel showed Left already selected)\n * and compiles as `start`: identical in LTR, where it still overrides a centred parent as `left` did,\n * and the right edge in RTL. In a sparse layer (a state, a breakpoint) only an edit is stored, so there\n * `left` is the author's and stays physical. `right`, `center` and `justify` were always chosen. */\nconst LEGACY_DEFAULT_TEXT_ALIGN = 'left';\n\nconst isLegacyDefaultAlign = (v: unknown): boolean => typeof v === 'string' && v.trim().toLowerCase() === LEGACY_DEFAULT_TEXT_ALIGN;\n\n/**\n * A saved node's own style map with the serialised default `textAlign: left` read as the logical\n * `start` it compiles to — so the builder's panel highlights Start, and the next save stores it.\n * Pure; returns the map unchanged (same reference) when there is nothing to move.\n */\nexport function migrateLegacyTextAlign(styleProps: Record<string, any>): Record<string, any> {\n if (!styleProps || !isLegacyDefaultAlign(styleProps[TEXT_ALIGN_KEY])) return styleProps;\n return { ...styleProps, [TEXT_ALIGN_KEY]: TextAlign.Start };\n}\n\n// ─── Gradient backgrounds ──────────────────────────────────────────────────────\n\n/** A Background value that is a gradient (the colour control offers one; the `media-scrim` element style\n * writes one). `background-color` cannot hold an image, so it composes into `background-image`. */\nconst GRADIENT_VALUE = /(^|[\\s,(])(repeating-)?(linear|radial|conic)-gradient\\(/i;\nexport function isGradientPaint(value: unknown): boolean {\n return typeof value === 'string' && GRADIENT_VALUE.test(value);\n}\n\n/** The whole-value backdrop trait (DS2). A plain key — it is copied, not stripped — but it feeds\n * the backdrop group's output, so a breakpoint layer that sets it must count as touching it. */\nexport const BACKDROP_WHOLE_KEY = 'backdropFilter';\n/** The prefixed twin emitted beside every composed `backdropFilter` (Safari). */\nexport const BACKDROP_TWIN_KEY = 'WebkitBackdropFilter';\n\nexport const VIRTUAL_TRAIT_GROUPS: readonly VirtualTraitGroup[] = Object.freeze([\n { output: 'filter', keys: FILTER_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'backdropFilter', keys: BACKDROP_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'transform', keys: TRANSFORM_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'transition', keys: [...TRANSITION_KEYS], reset: 'none' },\n { output: '__markerStyles', keys: MARKER_FUNS.map(([t]) => t), reset: null },\n { output: LINE_CLAMP_OUTPUT, keys: [MAX_LINES_KEY], reset: 'none' },\n // A breakpoint that clears the direction follows the parent again.\n { output: DIRECTION_OUTPUT, keys: [TEXT_DIRECTION_KEY, LEGACY_DIRECTION_KEY], reset: 'inherit' },\n]);\n\n// ─── All virtual trait names ──────────────────────────────────────────────────\n\n/** Every virtual trait key — derived from the groups so there is one list to maintain. */\nexport const VIRTUAL_TRAIT_KEYS = new Set<string>(VIRTUAL_TRAIT_GROUPS.flatMap(g => g.keys));\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\nfunction buildFns(\n funs: [string, string, string][],\n src: Record<string, any>,\n): string {\n return funs\n .filter(([t,, d]) => src[t] != null && src[t] !== '' && src[t] !== d)\n .map(([t, fn]) => `${fn}(${src[t]})`)\n .join(' ');\n}\n\n// ─── Public API ───────────────────────────────────────────────────────────────\n\n/** True when the whole-value `backdropFilter` trait is SET — it then wins over the composed\n * backdrop* controls (`none` / empty is its unset value). The Style panel hides those controls on\n * exactly this condition, so what the panel shows live is what the compiler emits. */\nexport function isWholeBackdropSet(value: unknown): boolean {\n return typeof value === 'string' && value.trim() !== '' && value.trim() !== 'none';\n}\n\n/** The part controls are 0–3 factor sliders: `140%` reads as `1.4`. */\nconst asFactor = (arg: string): string =>\n arg.endsWith('%') ? String(Math.round(parseFloat(arg) * 100) / 10000) : arg;\n\nconst BACKDROP_FN = /^([a-z-]+)\\(([^()]*)\\)$/;\n\n/**\n * The inverse of the backdrop composition: a resolved whole value (`blur(16px) saturate(1.4)`) →\n * the composed traits, every one of the group present (its default when absent; `140%` → `1.4` for\n * the factor sliders), so Detach can hand\n * a token's look back to the part controls. `none` / empty → all defaults. A value using anything\n * the group cannot express (another function, a `var()`, a percentage-free form it cannot read)\n * → null: the caller keeps it whole rather than silently dropping part of the look.\n */\nexport function decomposeBackdropFilter(value: string | null | undefined): Record<string, string> | null {\n const out: Record<string, string> = Object.fromEntries(BACKDROP_FUNS.map(([trait,, def]) => [trait, def]));\n const text = (value ?? '').trim();\n if (!isWholeBackdropSet(text)) return out;\n const parts = text.split(/\\s+(?![^(]*\\))/);\n for (const part of parts) {\n const m = BACKDROP_FN.exec(part);\n const fun = m && BACKDROP_FUNS.find(([, fn]) => fn === m[1]);\n if (!m || !fun || m[2].trim() === '' || m[2].includes('var(')) return null;\n out[fun[0]] = fun[1] === 'blur' ? m[2].trim() : asFactor(m[2].trim());\n }\n return out;\n}\n\n/**\n * Strip virtual trait keys from `raw` and emit their composed CSS equivalents.\n *\n * When composing a partial state-override map (hover, active…), pass the full\n * base style map as `base` so non-overridden components (e.g. filterBrightness\n * when only filterBlur is overridden) are preserved in the composed output.\n * When operating on a complete style map, omit `base` — it defaults to `raw`.\n */\nexport function composeVirtualTraits(\n raw: Record<string, any>,\n base: Record<string, any> = raw,\n): Record<string, any> {\n // Copy all non-virtual properties as-is\n const result: Record<string, any> = {};\n for (const [k, v] of Object.entries(raw)) {\n if (!VIRTUAL_TRAIT_KEYS.has(k)) result[k] = v;\n }\n\n // Merge base values for any virtual key absent from the partial override map\n const merged = (funs: [string, string, string][]): Record<string, any> => {\n const m: Record<string, any> = {};\n for (const [t] of funs) m[t] = raw[t] ?? base[t];\n return m;\n };\n\n // filter\n const filterStr = buildFns(FILTER_FUNS, merged(FILTER_FUNS));\n if (filterStr) result['filter'] = filterStr;\n\n // backdrop-filter. The whole-value `backdropFilter` trait (DS2 — an element style writes\n // `var(--iox-card-backdrop)`) WINS over the composed backdrop* group when it is set; its\n // default `none` means unset, so a legacy node's composed blur still applies. The -webkit-\n // twin rides along for Safari (design-system plan T3).\n const whole = raw[BACKDROP_WHOLE_KEY] ?? base[BACKDROP_WHOLE_KEY];\n const wholeSet = isWholeBackdropSet(whole);\n const backdropStr = buildFns(BACKDROP_FUNS, merged(BACKDROP_FUNS));\n if (wholeSet) result[BACKDROP_WHOLE_KEY] = whole;\n else if (backdropStr) result[BACKDROP_WHOLE_KEY] = backdropStr;\n if (result[BACKDROP_WHOLE_KEY] !== undefined && result[BACKDROP_WHOLE_KEY] !== '') {\n result[BACKDROP_TWIN_KEY] = result[BACKDROP_WHOLE_KEY];\n }\n\n // transform\n const transformStr = buildFns(TRANSFORM_FUNS, merged(TRANSFORM_FUNS));\n if (transformStr) result['transform'] = transformStr;\n\n // transition — only when it is timed (a non-zero duration) and names what it moves: one entry per property\n // (G2, Emil 183 — never `transition: all`); nothing to name, nothing to transition.\n const dur = raw['transitionDuration'] ?? base['transitionDuration'];\n const ease = raw['transitionTimingFunction'] ?? base['transitionTimingFunction'];\n const del = raw['transitionDelay'] ?? base['transitionDelay'];\n const props = transitionPropertyList(raw[TRANSITION_PROPERTY_KEY] ?? base[TRANSITION_PROPERTY_KEY]);\n if (dur && ease && dur !== '0ms' && dur !== '0s' && props.length) {\n const delPart = del && del !== '0ms' && del !== '0s' ? ` ${del}` : '';\n result['transition'] = props.map(p => `${p} ${dur} ${ease}${delPart}`).join(', ');\n }\n\n // Max lines: the clamp takes over the node's display and overflow.\n const clamp = lineClamp(raw[MAX_LINES_KEY] ?? base[MAX_LINES_KEY]);\n if (clamp !== null) {\n result['display'] = '-webkit-box';\n result['WebkitBoxOrient'] = 'vertical';\n result[LINE_CLAMP_OUTPUT] = String(clamp);\n result['overflow'] = 'hidden';\n }\n\n const direction = composeDirection(raw, base);\n if (direction) result[DIRECTION_OUTPUT] = direction;\n if (raw === base && isLegacyDefaultAlign(result[TEXT_ALIGN_KEY])) result[TEXT_ALIGN_KEY] = TextAlign.Start;\n\n // A gradient Background is an IMAGE. A solid one over a wider/base gradient (a hover, a breakpoint)\n // must cancel that image, or the gradient keeps showing through.\n const background = result['backgroundColor'];\n if (isGradientPaint(background)) {\n result['backgroundImage'] = background;\n result['backgroundColor'] = 'transparent';\n } else if (background !== undefined && raw !== base && isGradientPaint(base['backgroundColor'])) {\n result['backgroundImage'] = 'none';\n }\n\n // ::marker pseudo-element — collected into __markerStyles so StyleRegistryService\n // can emit a separate `.iox-node-{id}::marker { … }` rule.\n const markerStyles: Record<string, any> = {};\n for (const [trait, cssProp] of MARKER_FUNS) {\n const val = raw[trait] ?? base[trait];\n if (val != null && val !== '') markerStyles[cssProp] = val;\n }\n if (Object.keys(markerStyles).length) {\n result['__markerStyles'] = markerStyles;\n }\n\n return result;\n}\n","/** camelCase style key → kebab CSS property (`borderRadius` → `border-radius`). */\nexport function styleKeyToKebab(key: string): string {\n return key.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);\n}\n","/**\n * The content traits the accessibility attributes are read from (CC1). Import-free on purpose: the\n * builder's component configs declare these traits, and the node-baseline generator bundles those\n * configs against this file directly.\n */\nexport enum A11yTrait {\n /** \"Accessibility ▸ Accessible name\" — the name of an icon-only control (and of a Dialog). */\n AccessibleName = 'ariaLabel',\n /** A Dialog's \"Close when wider than\": a breakpoint id, or empty = never. */\n CloseAbove = 'closeAbove',\n}\n\n/** The types that carry an Accessible name trait. */\nexport const ACCESSIBLE_NAME_TYPES: ReadonlyArray<string> = ['ButtonBlock', 'LinkedContainer', 'Link', 'Dialog', 'SliderContainer'];\n\n/** The types that link to a page and can therefore be the current page's link. */\nexport const CURRENT_LINK_TYPES: ReadonlyArray<string> = ['Link', 'LinkedContainer', 'ButtonBlock'];\n","/**\n * style-compiler — the SINGLE source of truth for turning a node's style map into\n * CSS declarations. Framework-agnostic (no Angular): consumed by both renderers.\n *\n * - Builder canvas: `StyleRegistryService` (@vectoriox/iox-builder) → live `<style>` tag.\n * - SSR site: `LayoutRendererService` (iox-client-engine) → HTML string CSS.\n *\n * Lives in @vectoriox/iox-ui because BOTH consumers depend on iox-ui (the engine does\n * NOT depend on iox-builder). Keeping it here — not duplicated per renderer — is what\n * prevents the builder and the live site from drifting.\n * See iox-ai-guidance `architecture/builder/render-parity.md`.\n */\n\nimport { styleKeyToKebab } from '../../design-core/css-names';\nimport { composeVirtualTraits } from './virtual-traits';\nimport { CURRENT_LINK_TYPES } from '../a11y/a11y-traits';\n\n/**\n * Rewrite viewport-relative units so they resolve to the simulated canvas dimensions\n * in the builder, and to the real viewport in production.\n *\n * `--preview-vh` / `--preview-vw` are set by BuilderComponent (ResizeObserver +\n * viewport-state subscription). In production those variables are undefined, so the\n * `1vh` / `1vw` fallbacks restore native browser behaviour.\n */\nexport function rewriteViewportUnits(value: string): string {\n return value\n .replace(/(-?\\d*\\.?\\d+)([sdl]?)vh/g, 'calc($1 * var(--preview-vh, 1$2vh))')\n .replace(/(-?\\d*\\.?\\d+)([sdl]?)vw/g, 'calc($1 * var(--preview-vw, 1$2vw))');\n}\n\n/**\n * kebab CSS property → the value that equals its CSS initial AND has no UA-stylesheet override for\n * any element the builder renders (div/section/span/i/a/img/h1–h6/p/ul). Emitting these is a pure\n * no-op, so they're dropped to keep the compiled CSS lean (self-describing nodes serialise every\n * trait, many at their default).\n *\n * Deliberately EXCLUDED, because a value equal to the initial can still be meaningful there:\n * - inherited properties (line-height, color, font-family/size/weight, text-align, letter-spacing…)\n * — the value may override an inherited ancestor value.\n * - margin / padding — UA stylesheets set them on h1–h6, p, ul, so `0` depends on a reset.\n * - border-* — the initial `medium` width + interaction with border-style makes it non-trivial.\n */\nconst NOOP_INITIAL_VALUES: Readonly<Record<string, readonly string[]>> = {\n 'width': ['auto'], 'height': ['auto'],\n 'min-width': ['auto'], 'min-height': ['auto'],\n 'max-width': ['none', 'auto'], 'max-height': ['none', 'auto'], // `auto` is invalid for max-* → inert\n 'position': ['static'],\n 'top': ['auto'], 'right': ['auto'], 'bottom': ['auto'], 'left': ['auto'],\n 'opacity': ['1'], 'z-index': ['auto'],\n 'flex-grow': ['0'], 'flex-shrink': ['1'], 'flex-basis': ['auto'],\n 'flex-direction': ['row'], 'flex-wrap': ['nowrap'],\n 'gap': ['0', '0px', 'normal'],\n 'border-radius': ['0', '0px'],\n 'aspect-ratio': ['auto'],\n 'mix-blend-mode': ['normal'],\n 'transform': ['none'], 'box-shadow': ['none'],\n // G3: the Transform origin trait's default is the CSS initial (the centre) — never emitted on every node.\n 'transform-origin': ['center', 'center center', '50% 50%', '50% 50% 0', '50% 50% 0px'],\n // overflow initial is `visible`. A self-describing node serialises the Overflow trait's default,\n // so WITHOUT this the emitted `overflow: visible` would override component baselines that clip\n // (e.g. `.iox-card__img-wrap`, `.iox-slider`, `.iox-gallery` all set `overflow: hidden`), breaking\n // object-fit/aspect-ratio image clipping everywhere. A user-set hidden/scroll/auto/clip is not the\n // initial, so it still emits and wins.\n 'overflow': ['visible'], 'overflow-x': ['visible'], 'overflow-y': ['visible'],\n // Only a gradient Background writes an image; `none` everywhere else is the initial (Card v2).\n 'background-image': ['none'],\n 'clip-path': ['none'],\n // DS2 traits (design-system plan T3/T4). `backdrop-filter: blur(0px)` would still create a\n // containing block, so the whole-value trait's solid-flavor value is `none` — and `none` must\n // never be emitted on every node. text-transform IS inherited: the cost is that `none` cannot\n // cancel an ancestor's uppercase in a base rule — chosen over emitting it on every node.\n 'backdrop-filter': ['none'], '-webkit-backdrop-filter': ['none'],\n 'text-transform': ['none'],\n // CC4b: the Price style's tabular figures. Inherited too, the same trade-off as text-transform: a serialised\n // `normal` is never emitted on every node.\n 'font-variant-numeric': ['normal'],\n};\n\n/**\n * Style props a type's render-default fully REPLACES. Emitting them would produce a dead\n * declaration that is immediately overridden in the same rule (e.g. an Icon's serialised\n * `lineHeight: 1.5` followed by the forced `line-height: 1`), so callers strip them first via\n * {@link stripSuppressedProps} and let renderDefaultDeclarations supply the real value.\n */\nexport const SUPPRESSED_STYLE_PROPS_BY_TYPE: Readonly<Record<string, readonly string[]>> = {\n // An icon's line box is structurally forced to 1 — see the Icon branch of renderDefaultDeclarations.\n Icon: ['lineHeight'],\n // A Dialog is PLACED by its renderer, never positioned by its node rule: the live twin is a\n // top-layer <dialog> centred by `inset: 0; margin: auto` (the engine's zero-specificity reset),\n // the canvas twin a grid stage. Every node serialises the Spacing/Position traits, so a stored\n // `margin: 0px` (0,1,0) beat the reset and every dialog — the consent banner too — opened in the\n // top-left corner of the live site (DS2 verification). Placement is the `placement` trait's job.\n Dialog: [\n 'position', 'inset', 'top', 'right', 'bottom', 'left',\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'marginBlock', 'marginBlockStart', 'marginBlockEnd', 'marginInline', 'marginInlineStart', 'marginInlineEnd',\n ],\n};\n\n/** Remove the style props whose value a type's render-default always overrides. Returns the map\n * unchanged (same reference) when the type suppresses nothing. */\nexport function stripSuppressedProps(type: string, styleProps: Record<string, any>): Record<string, any> {\n const suppressed = SUPPRESSED_STYLE_PROPS_BY_TYPE[type];\n if (!suppressed?.length) return styleProps;\n const out = { ...styleProps };\n for (const key of suppressed) delete out[key];\n return out;\n}\n\n/**\n * What a compiled rule is FOR — decides whether an initial value is a no-op.\n *\n * In a `Base` rule nothing is being overridden, so `width: auto` or `transform: none` changes\n * nothing and is dropped (see NOOP_INITIAL_VALUES). In an `Override` rule — a breakpoint layer —\n * the initial value is exactly how you UNDO a wider rule (`width: 520px` → `auto` on mobile), so\n * dropping it would silently keep the desktop value.\n */\nexport enum DeclarationContext {\n Base = 'base',\n Override = 'override',\n}\n\n/**\n * Compile a flat, camelCase style map into an array of `\"prop: value\"` CSS\n * declarations (kebab-cased, viewport-units rewritten, empties dropped, no-op initials dropped\n * in a `Base` context only, optional `!important`). Callers wrap these in whatever selector\n * they emit.\n *\n * @param props Flat camelCase style map.\n * @param importantProps Keys that must carry `!important` (e.g. `position`, to beat\n * Angular's scoped-CSS specificity boost in the builder). A prop forced\n * `!important` is never dropped as a no-op — the `!important` exists to win\n * the cascade, so its value must always be emitted.\n * @param context `Override` for a rule that overrides a wider one (a breakpoint layer):\n * initial values are kept, because there they reset rather than no-op.\n */\nexport function compileDeclarations(\n props: Record<string, any>,\n importantProps?: ReadonlySet<string>,\n context: DeclarationContext = DeclarationContext.Base,\n): string[] {\n const out: string[] = [];\n for (const [k, v] of Object.entries(props)) {\n if (v === undefined || v === null || v === '') continue;\n const prop = styleKeyToKebab(k);\n const val = rewriteViewportUnits(String(v));\n const isImportant = importantProps?.has(k) ?? false;\n const dropsNoOps = context === DeclarationContext.Base && !isImportant;\n if (dropsNoOps && NOOP_INITIAL_VALUES[prop]?.includes(val.trim().toLowerCase())) continue;\n out.push(`${prop}: ${val}${isImportant ? ' !important' : ''}`);\n }\n return out;\n}\n\n/**\n * The state names whose rule compiles to a DIFFERENT pseudo-class than their own name. `focus`\n * compiles to `:focus-visible` (design-system DS2): an element style's focus ring must appear for\n * keyboard users, not stick to a button after a mouse click. Stored states keep the name `focus` —\n * no migration — and a text field still matches, since browsers treat a focused text input as\n * focus-visible. Shared by the builder canvas and both engine paths.\n */\nexport const STATE_PSEUDO_CLASS: Readonly<Record<string, string>> = { focus: 'focus-visible' };\n\n/** The pseudo-class a stored state compiles to (`focus` → `focus-visible`, everything else itself). */\nexport function statePseudoClass(state: string): string {\n return STATE_PSEUDO_CLASS[state] ?? state;\n}\n\n/**\n * Component states (CC1 N2; composite plan T12): states a node is IN because of what it is, not where\n * the pointer is — so they compile to an ATTRIBUTE the renderers write, never a pseudo-class. `current`\n * is the link to the page the visitor is on (`aria-current=\"page\"`, written by `nodeA11yAttributes`),\n * so the look and the announcement are one fact.\n */\nexport enum ComponentState {\n Current = 'current',\n /** A composite part that IS on — an open accordion item, its header, its panel (board 9 \"Open\"). */\n On = 'on',\n /** A part INSIDE an item, styled by its item being open (board 9 \"Item open\"; \"Tab active\" inside a tab or a panel)\n * — a TARGETED state: its trigger is the item (`stateTriggers['trigger-on']`), compiled through\n * `targetedStateSelector`. On a node OUTSIDE every item (composite T20, CC4a) the author PICKS the item — \"when tab\n * Night is on\" — the same state and the same `:has()` scoped to the nearest common ancestor. */\n ItemOpen = 'trigger-on',\n /** G4: a control that cannot be used — a disabled button, or one marked aria-disabled. */\n Disabled = 'disabled',\n /** G4: busy — a submit button while its form sends (`syncSubmitButtons`), a form while it sends. */\n Busy = 'busy',\n /** G4: chosen — a toggle button pressed, an option checked or selected. */\n Selected = 'selected',\n /** G4: the page has scrolled (a header that firms up once the page moves) — `SCROLLED_ATTRIBUTE` on the root. */\n Scrolled = 'scrolled',\n}\n\n/** The page has scrolled: written on the document element by the live site (and on the canvas page by the builder). */\nexport const SCROLLED_ATTRIBUTE = 'data-iox-scrolled';\n\n/** The selector each (non-targeted) component state compiles to — an attribute, or an `:is()` of the ways a node can\n * be in it (a native `:disabled` or `aria-disabled`; pressed / checked / selected), so one rule covers every markup. */\nexport const COMPONENT_STATE_SELECTOR: Readonly<Record<string, string>> = {\n [ComponentState.Current]: '[aria-current=\"page\"]',\n [ComponentState.On]: '[data-iox-on]',\n [ComponentState.Disabled]: ':is(:disabled, [aria-disabled=\"true\"])',\n [ComponentState.Busy]: '[aria-busy=\"true\"]',\n [ComponentState.Selected]: ':is([aria-pressed=\"true\"], [aria-checked=\"true\"], [aria-selected=\"true\"])',\n [ComponentState.Scrolled]: `:is([${SCROLLED_ATTRIBUTE}], [${SCROLLED_ATTRIBUTE}] *)`,\n};\n\n/** Which types offer each control state (G4) in the Style panel's Component state group. */\nconst G4_STATE_TYPES: ReadonlyArray<[ComponentState, ReadonlyArray<string>]> = [\n [ComponentState.Disabled, ['ButtonBlock', 'Button', 'SubmitButton']],\n [ComponentState.Busy, ['SubmitButton', 'ButtonBlock', 'Form']],\n [ComponentState.Selected, ['ButtonBlock', 'LinkedContainer']],\n];\n\n/** Scrolled is offered on the site header and its parts — generation-core's NavRole family (`nav`, `nav.brand`…), the\n * drawer's parts aside (the drawer is a dialog over the page). Spelled here — the main entry does not import\n * generation-core; style-compiler.spec pins it to the enum. */\nexport const SCROLLED_STATE_ROLE = 'nav';\nconst DRAWER_ROLE_PREFIX = 'nav.drawer';\n\nfunction offersScrolled(role: string | null | undefined): boolean {\n return !!role && (role === SCROLLED_STATE_ROLE || role.startsWith(`${SCROLLED_STATE_ROLE}.`)) && !role.startsWith(DRAWER_ROLE_PREFIX);\n}\n\n/** The composite roles that are themselves \"on\" when their item is open (they carry `data-iox-on`): an accordion's\n * item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1); a tab and its panel (CC4a —\n * \"Active\"). The main entry does not import composite-core, so the roles are spelled here — `style-compiler.spec` pins\n * them to its enums. */\nexport const ON_STATE_ROLES: ReadonlyArray<string> = [\n 'accordion.item', 'accordion.trigger', 'accordion.panel', 'disclosure', 'disclosure.trigger', 'disclosure.panel', 'tabs.trigger', 'tabs.panel',\n // CC4b — a Segmented control's option (\"On\": the chosen one).\n 'segmented.option',\n];\n\n/**\n * The component states a node offers in the Style panel's \"Component state\" group: Current page (a link),\n * Open / Active (an accordion's item, header or panel; a tab or its panel), Item open (any other part inside an item —\n * `insideItem`), and — on a node outside every item, on a page that has items to pick (`itemsToPick`, composite T20) —\n * the same Item open state with a picked trigger.\n */\nexport function componentStatesFor(type: string | null | undefined, role?: string | null, insideItem = false, itemsToPick = false): ComponentState[] {\n // An accordion's header (a tab) is a button that opens its item, never a link to a page: Open, not Current page.\n if (role && ON_STATE_ROLES.includes(role)) return [ComponentState.On];\n const out: ComponentState[] = [];\n if (type && CURRENT_LINK_TYPES.includes(type)) out.push(ComponentState.Current);\n if (insideItem || itemsToPick) out.push(ComponentState.ItemOpen);\n for (const [state, types] of G4_STATE_TYPES) if (type && types.includes(type)) out.push(state);\n if (offersScrolled(role)) out.push(ComponentState.Scrolled);\n return out;\n}\n\n/**\n * The states a node's rules are emitted LAST in (CC4b): `on` (`[data-iox-on]`) and `focus` (`:focus-visible`) tie on\n * specificity, so whichever comes later wins — a focused Segmented option that is ON must keep its focus ring over the\n * on shadow (board 10). Every renderer emits a node's state rules in `orderStatesForEmit` order.\n */\nexport const LAST_EMITTED_STATES: ReadonlyArray<string> = ['focus'];\n\n/** `states` in the order their rules are emitted: as given, with the LAST_EMITTED_STATES moved to the end. */\nexport function orderStatesForEmit<T extends string>(states: ReadonlyArray<T>): T[] {\n return [...states.filter(s => !LAST_EMITTED_STATES.includes(s)), ...states.filter(s => LAST_EMITTED_STATES.includes(s))];\n}\n\n/** True when a rule key (`<nodeId>:<state>`) holds a state emitted last. */\nexport function isLastEmittedStateKey(key: string): boolean {\n const state = key.slice(key.lastIndexOf(':') + 1);\n return LAST_EMITTED_STATES.includes(state);\n}\n\n/**\n * What follows `.iox-node-<id>` in a stored state's rule: `:hover`, `:focus-visible`, or a component\n * state's attribute selector (`[aria-current=\"page\"]`). Shared by the builder canvas and both engine paths.\n */\nexport function stateSelectorSuffix(state: string): string {\n return COMPONENT_STATE_SELECTOR[state] ?? `:${statePseudoClass(state)}`;\n}\n\n/** The states driven by a pointer hovering something — each earns the default hover transition. */\nexport const HOVER_STATES: ReadonlyArray<string> = ['hover', 'parent-hover', 'trigger-hover'];\n\n/** True when the node restyles on hover (its own, its parent's or a chosen trigger's). */\nexport function hasHoverState(stateStyles: Record<string, Record<string, any> | undefined> | null | undefined): boolean {\n return !!stateStyles && HOVER_STATES.some(s => Object.keys(stateStyles[s] ?? {}).length > 0);\n}\n\n/**\n * The base-rule transition a hovering node gets when it declares none of its own, so a hover\n * animates instead of snapping. ONE copy for the builder canvas, the style panel and the engine.\n *\n * Two timings, chosen by the element-style MARKER (§3b-bis): a node wearing an element style takes\n * the motion tokens; a node without one (saved before DS2, not adopted) keeps the pre-DS2 literal\n * timing — seeding an org's tokens must never change how a legacy page hovers. WHAT transitions is the\n * list of properties the node's states change (G2 — never `transition: all`).\n */\nexport const HOVER_DEFAULT_TRANSITION_TRAITS: Readonly<Record<string, string>> = {\n transitionDuration: 'var(--iox-dur-fast)', transitionTimingFunction: 'var(--iox-ease-standard)',\n};\nexport const LEGACY_HOVER_TRANSITION_TRAITS: Readonly<Record<string, string>> = { transitionDuration: '0.2s', transitionTimingFunction: 'ease' };\n\n/** The default hover timing for a node that wears `elementStyle` (or none). */\nexport function defaultHoverTransitionTraits(elementStyle?: string | null): Readonly<Record<string, string>> {\n return elementStyle ? HOVER_DEFAULT_TRANSITION_TRAITS : LEGACY_HOVER_TRANSITION_TRAITS;\n}\n\nconst isFilled = (v: unknown): boolean => v !== undefined && v !== null && String(v).trim() !== '';\nconst isZeroDuration = (v: unknown): boolean => /^-?0+(\\.0+)?(ms|s)?$/.test(String(v ?? '').trim());\n\n/** True when the RAW style map times a transition of its own (an explicit `transition`, or the\n * transitionDuration / TimingFunction an element style writes). */\nexport function hasOwnTransition(styleProps: Record<string, any> | null | undefined): boolean {\n const sp = styleProps ?? {};\n if (isFilled(sp['transition'])) return true;\n return isFilled(sp['transitionDuration']) && !isZeroDuration(sp['transitionDuration']) && isFilled(sp['transitionTimingFunction']);\n}\n\n/** Keys a composed state map holds that are not properties a transition can name. */\nconst NOT_TRANSITIONED = new Set(['__markerStyles', 'WebkitBackdropFilter', 'transition', 'transitionDuration', 'transitionTimingFunction', 'transitionDelay', 'transitionProperty']);\n\ntype StateMaps = Record<string, Record<string, any> | undefined> | null | undefined;\n\n/**\n * The CSS properties a node's states change — what its transition names (G2, Emil 183: never `transition: all`).\n * Every state the node holds, at every breakpoint, composed as the renderers compose it (translateX / scaleX → one\n * `transform`, a gradient background → `background-image`…), in a stable order so both renderers emit one string.\n */\nexport function stateTransitionProperties(\n stateStyles: StateMaps,\n responsive?: Record<string, { stateStyles?: StateMaps } | undefined> | null,\n type?: string | null,\n): string[] {\n const maps: Array<Record<string, any>> = [];\n for (const map of Object.values(stateStyles ?? {})) if (map) maps.push(map);\n for (const layer of Object.values(responsive ?? {})) for (const map of Object.values(layer?.stateStyles ?? {})) if (map) maps.push(map);\n const out: string[] = [];\n // A prop the type's renderer owns (a Dialog's positioning) never reaches a rule — nor the transition's list.\n for (const map of maps.map(m => (type ? stripSuppressedProps(type, m) : m))) {\n for (const key of Object.keys(composeVirtualTraits(map, map))) {\n if (NOT_TRANSITIONED.has(key)) continue;\n const prop = styleKeyToKebab(key);\n if (!out.includes(prop)) out.push(prop);\n }\n }\n return out;\n}\n\n/**\n * `styleProps` as a renderer compiles them: a hovering node with no timing of its own takes the default hover timing,\n * and a node whose transition names no properties gets the ones its states change. An author's own `transitionProperty`\n * (or a raw `transition`) always wins. Pure: the node's stored styles are never touched.\n */\nexport function withStateTransitions(\n styleProps: Record<string, any>,\n stateStyles: StateMaps,\n elementStyle?: string | null,\n responsive?: Record<string, { stateStyles?: StateMaps } | undefined> | null,\n type?: string | null,\n): Record<string, any> {\n let out = styleProps;\n if (hasHoverState(stateStyles) && !hasOwnTransition(styleProps)) out = { ...out, ...defaultHoverTransitionTraits(elementStyle) };\n if (!isFilled(out['transitionProperty']) && !isFilled(out['transition'])) {\n const props = stateTransitionProperties(stateStyles, responsive, type);\n if (props.length) out = { ...out, transitionProperty: props.join(', ') };\n }\n return out;\n}\n\n/**\n * Per-type default `width` that the builder applies from each component's config\n * (NOT persisted in styleProps — see render-parity.md \"saved node is not\n * self-describing\"). The engine has no config classes, so it resolves the same\n * default from THIS map at render time. Keeping the map here (not re-typed in the\n * engine) is the \"shared default map\" decision.\n *\n * ONLY the `100%` container-type defaults live here. Fixed-size config defaults\n * (Card 200px, Image 300px, SliderSlide 33%) are starter placeholders real content\n * almost always overrides — forcing them onto width-less nodes breaks layout.\n */\nexport const DEFAULT_WIDTH_BY_TYPE: Readonly<Record<string, string>> = {\n Container: '100%', Repeater: '100%', SliderContainer: '100%',\n List: '100%', ListItem: '100%', Text: '100%', Divider: '100%', Spacer: '100%',\n // Section, Heading, LinkedContainer, Card, Image, SliderSlide, Button, ButtonBlock,\n // Icon → no forced default (their config defaults are content sizes set explicitly).\n};\n\n/**\n * Extra \"render default\" declarations the builder gets implicitly from live component\n * behaviour, which the engine must re-apply explicitly for parity. Returns `\"prop: value\"`\n * declarations to append AFTER the node's own compiled declarations.\n *\n * The default hover transition is no longer one of them: it is composed into the node's own rule by\n * `withStateTransitions` (both renderers), listing the properties its states change (G2).\n *\n * @param type Node type (registry key).\n * @param styleProps The node's persisted styleProps.\n */\nexport function renderDefaultDeclarations(\n type: string,\n styleProps: Record<string, any>,\n): string[] {\n const sp = styleProps ?? {};\n const out: string[] = [];\n const isOutOfFlow = sp['position'] === 'fixed' || sp['position'] === 'absolute';\n\n // Container-type default width so it fills its track. Only when width is unset — once a page\n // is saved with fully-resolved styleProps (self-describing nodes), width comes through\n // compileDeclarations and this is a no-op.\n if (sp['width'] === undefined) {\n if (isOutOfFlow) {\n out.push('width: 100%');\n } else if (DEFAULT_WIDTH_BY_TYPE[type]) {\n out.push(`width: ${DEFAULT_WIDTH_BY_TYPE[type]}`);\n }\n }\n // min-width:0 lets container flex children shrink below content and equal-split. Emit it for\n // container types INDEPENDENT of where width came from (styleProps vs the default above) —\n // otherwise a saved page whose width is persisted would lose the equal-split. In the builder the\n // same rule comes from the `.container-child` wrapper; here it lands on `.iox-node` directly.\n if (DEFAULT_WIDTH_BY_TYPE[type] && sp['minWidth'] === undefined && !isOutOfFlow) {\n out.push('min-width: 0');\n }\n // A border only renders when there is a WIDTH. Gate border-style on borderWidth — NOT on\n // borderColor: a node with only a border colour and no width would otherwise get the\n // browser's default `medium` width and show a phantom border. Absent borderWidth = no border.\n if (sp['borderWidth'] && sp['borderStyle'] === undefined) {\n out.push('border-style: solid');\n }\n // Image defaults reapplied when unset (the config defaults aren't always persisted). height:auto\n // is only a DEFAULT — when the user sets an explicit height (e.g. 100%) it must WIN, so guard it\n // on `sp['height'] === undefined` (matching the builder, which respects a configured height). An\n // unset height + aspect-ratio lets the ratio drive the box.\n if (type === 'Image') {\n if (sp['aspectRatio'] === undefined) out.push('aspect-ratio: 1/1');\n // object-fit is a Size style trait with config default 'cover'; that default isn't persisted,\n // so reapply it here (matching the builder) when the node has none.\n if (sp['objectFit'] === undefined) out.push('object-fit: cover');\n // NOTE: no `height: auto` — when height is unset, `auto` is already the CSS initial value, so\n // emitting it is a pure no-op. A configured height comes through compileDeclarations and wins.\n }\n // Containers default to a positioning context (for absolutely-positioned children). These live\n // in `.iox-node` (not the component `:host`) so an explicit styleProps value always wins.\n if ((type === 'Container' || type === 'Section' || type === 'LinkedContainer') && sp['position'] === undefined) {\n out.push('position: relative');\n }\n // LinkedContainer is an <a> (inline by default) → default it to block so children lay out.\n if (type === 'LinkedContainer' && sp['display'] === undefined) {\n out.push('display: block');\n }\n // An Icon is a single FONT GLYPH, not a paragraph: it must contribute no line-box height of its\n // own (spacing belongs to padding/margin). But every node serialises the Typography group's\n // `lineHeight` default of 1.5, so icons carry `line-height: 1.5` — a 24px glyph then gets a 36px\n // line box and pushes the surrounding layout around.\n //\n // This is emitted UNCONDITIONALLY (not guarded on `undefined`) and callers append render-defaults\n // AFTER the node's own compiled declarations in the SAME rule, so it overrides a stale serialised\n // value for EXISTING icons too — no re-save needed. line-height is inherited, so simply omitting\n // it is not enough: the icon would inherit 1.5 from its container instead.\n if (type === 'Icon') out.push('line-height: 0');\n // An icon's `<i>` must shrink-wrap its glyph so it grows with font-size and doesn't overflow its\n // parent. Phosphor forces `display:inline-flex` on its own class; generated (fantasticon) fonts\n // don't, so the engine's plain `<i class=\"bi-x iox-node-…\">` would fall back to inline and the\n // glyph would overflow. Emit it here (guarded so a user-set display still wins) — mirrors the\n // builder Icon component's `:host{display:inline-flex}`.\n if (type === 'Icon' && sp['display'] === undefined) {\n out.push('display: inline-flex', 'align-items: center', 'justify-content: center');\n }\n return out;\n}\n","// Responsive (per-breakpoint) styles — the shared model, cascade and emission plan.\n//\n// SHARED (iox-ui): the builder canvas AND the SSR engine both call this. The builder\n// FLATTENS the active breakpoint (its canvas is a transformed frame inside a desktop\n// browser, so a real `@media` query would read the editor's width); the engine WRAPS\n// each planned layer in `@media`. Same decisions, different transport — never fork them.\n//\n// Storage is a sparse layer beside the existing keys, shaped like `stateStyles`:\n//\n// styleProps — base, full resolved set (unchanged)\n// stateStyles — sparse per-state overrides (unchanged)\n// responsive — sparse per-breakpoint overrides (this file)\n// { mobile: { styleProps: {…}, stateStyles: { hover: {…} } } }\n//\n// A node with no `responsive` key renders exactly as before — no migration.\n// See iox-ai-guidance `architecture/builder/responsive-breakpoints-plan.md`.\n\nimport { BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, composeVirtualTraits, VIRTUAL_TRAIT_GROUPS, VirtualTraitGroup } from './virtual-traits';\nimport { orderStatesForEmit } from './style-compiler';\n\n// ─── Breakpoints ─────────────────────────────────────────────────────────────\n\n/** The five fixed breakpoints (plan decision D2). Desktop-first: each narrower one\n * overrides the wider ones through `max-width`. */\nexport enum Breakpoint {\n Base = 'base',\n Laptop = 'laptop',\n Tablet = 'tablet',\n Mobile = 'mobile',\n Small = 'small',\n}\n\n/** Every breakpoint that can hold overrides. Base styles live in `styleProps`. */\nexport type OverrideBreakpoint = Exclude<Breakpoint, Breakpoint.Base>;\n\nexport interface BreakpointDef {\n readonly id: Breakpoint;\n readonly label: string;\n /** Inclusive upper bound in CSS px (`max-width`). `null` for Base, which has no query. */\n readonly maxWidth: number | null;\n /** Width the builder canvas simulates while this breakpoint is being edited. Always\n * inside the breakpoint's own range (above the next one's `maxWidth`). */\n readonly previewWidth: number;\n}\n\n/**\n * Widest → narrowest. This order IS the cascade order and the `@media` emission order.\n *\n * ⚠️ Phones in portrait (360–430px) land in `Small`, NOT `Mobile` — `Mobile` is 480–767,\n * a phone held landscape. The labels say so (as Webflow's do). The ids stay short because\n * they are storage keys; the cascade still makes a `Mobile` override reach every phone.\n */\nexport const BREAKPOINTS: readonly BreakpointDef[] = Object.freeze([\n { id: Breakpoint.Base, label: 'Base', maxWidth: null, previewWidth: 1440 },\n { id: Breakpoint.Laptop, label: 'Laptop', maxWidth: 1200, previewWidth: 1200 },\n { id: Breakpoint.Tablet, label: 'Tablet', maxWidth: 991, previewWidth: 768 },\n { id: Breakpoint.Mobile, label: 'Mobile landscape', maxWidth: 767, previewWidth: 568 },\n { id: Breakpoint.Small, label: 'Mobile portrait', maxWidth: 479, previewWidth: 390 },\n]);\n\nconst BREAKPOINT_INDEX = new Map<string, number>(BREAKPOINTS.map((d, i) => [d.id, i]));\n\n/** The definition for `bp`, or `undefined` for an unknown id (e.g. hand-edited JSON). */\nexport function breakpointDef(bp: Breakpoint | string): BreakpointDef | undefined {\n const i = BREAKPOINT_INDEX.get(bp);\n return i === undefined ? undefined : BREAKPOINTS[i];\n}\n\n/** Base → `bp`, inclusive — the layers whose values apply at `bp`. Unknown → `[Base]`. */\nexport function cascadeChain(bp: Breakpoint | string): Breakpoint[] {\n const i = BREAKPOINT_INDEX.get(bp);\n return BREAKPOINTS.slice(0, (i ?? 0) + 1).map(d => d.id);\n}\n\n/**\n * The breakpoint a viewport (or canvas) of `width` CSS px falls in — the narrowest one whose\n * `maxWidth` it fits under, else Base. Mirrors how the `max-width` media queries resolve, so the\n * builder's editing scope is always the breakpoint the canvas is actually showing.\n */\nexport function breakpointForWidth(width: number): Breakpoint {\n for (let i = BREAKPOINTS.length - 1; i > 0; i--) {\n const max = BREAKPOINTS[i].maxWidth;\n if (max !== null && width <= max) return BREAKPOINTS[i].id;\n }\n return Breakpoint.Base;\n}\n\n/** The next-wider breakpoint (what `bp` inherits from), or `null` for Base / unknown. */\nexport function parentBreakpoint(bp: Breakpoint | string): Breakpoint | null {\n const i = BREAKPOINT_INDEX.get(bp);\n return i ? BREAKPOINTS[i - 1].id : null;\n}\n\n/**\n * What a breakpoint's width is measured against.\n *\n * `Media` — the browser viewport. The SSR engine: a visitor's window IS the page.\n * `Container` — a named CSS size container. The builder: its canvas is a fixed-width frame inside a\n * desktop browser (and `transform: scale`d for zoom), so a media query would read the EDITOR's width.\n * A container query reads the frame's own layout width — which equals the simulated viewport and\n * ignores the zoom transform — so the builder emits the same structure as the engine.\n */\nexport enum BreakpointQueryKind {\n Media = 'media',\n Container = 'container',\n}\n\n/**\n * The at-rule prelude for `bp` — `@media (max-width: 767px)`, or with `Container`\n * `@container iox-canvas (max-width: 767px)`. `null` for Base or an unknown id.\n * `containerName` is required for `Container` (an unnamed container query would match\n * whichever ancestor container is nearest, which is not guaranteed to be the canvas).\n */\nexport function breakpointQueryFor(\n bp: Breakpoint | string,\n kind: BreakpointQueryKind = BreakpointQueryKind.Media,\n containerName?: string,\n): string | null {\n const max = breakpointDef(bp)?.maxWidth;\n if (max == null) return null;\n if (kind === BreakpointQueryKind.Media) return `@media (max-width: ${max}px)`;\n if (!containerName) throw new Error('A container breakpoint query needs a container name');\n return `@container ${containerName} (max-width: ${max}px)`;\n}\n\n/** Wrap already-compiled rules for `bp`. Base (and blank css) passes through unwrapped. */\nexport function wrapInBreakpointQuery(\n bp: Breakpoint | string,\n css: string,\n kind: BreakpointQueryKind = BreakpointQueryKind.Media,\n containerName?: string,\n): string {\n if (!css.trim()) return '';\n const query = breakpointQueryFor(bp, kind, containerName);\n return query ? `${query} {\\n${css}\\n}` : css;\n}\n\n/** `@media (max-width: 767px)` for `bp`; `null` for Base or an unknown id. */\nexport function mediaQueryFor(bp: Breakpoint | string): string | null {\n return breakpointQueryFor(bp, BreakpointQueryKind.Media);\n}\n\n/** Wrap already-compiled rules for `bp` in its media query. Base (and blank css) passes through. */\nexport function wrapInMediaQuery(bp: Breakpoint | string, css: string): string {\n return wrapInBreakpointQuery(bp, css, BreakpointQueryKind.Media);\n}\n\n// ─── Storage model ───────────────────────────────────────────────────────────\n\nexport type StyleMap = Record<string, any>;\nexport type StateStyleMap = Record<string, StyleMap>;\n/** Component trait values (node `props`/`inputs`), keyed by trait name. */\nexport type InputMap = Record<string, any>;\n\n/** What one breakpoint overrides. All maps are SPARSE — only keys that differ. */\nexport interface ResponsiveLayer {\n styleProps?: StyleMap;\n stateStyles?: StateStyleMap;\n /**\n * Per-breakpoint COMPONENT TRAIT overrides (`slidesPerView`, `limit`, …) — the things a media\n * query cannot express because they are component inputs, not CSS. Without this a 4-up slider\n * stays 4-up on a phone; the only escape used to be hand-typed Swiper JSON.\n *\n * Sparse and additive like the maps above, so a page with no trait overrides serialises exactly\n * as before. Only traits declared `responsive` on their `TraitConfig` may appear here.\n */\n inputs?: InputMap;\n}\n\nexport type ResponsiveOverrides = Partial<Record<OverrideBreakpoint, ResponsiveLayer>>;\n\nfunction layerAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint): ResponsiveLayer | undefined {\n return bp === Breakpoint.Base ? undefined : responsive?.[bp as OverrideBreakpoint];\n}\n\n/** Copy defined entries of `src` onto `target`. `undefined` never overwrites a value. */\nfunction assignDefined(target: StyleMap, src: StyleMap | undefined): StyleMap {\n if (src) for (const [k, v] of Object.entries(src)) if (v !== undefined) target[k] = v;\n return target;\n}\n\nfunction hasKeys(map: object | null | undefined): boolean {\n return !!map && Object.keys(map).length > 0;\n}\n\n// ─── Cascade resolution ──────────────────────────────────────────────────────\n\n/** The full effective style map at `bp`: base, then each layer down the cascade. */\nexport function resolveStyleProps(\n styleProps: StyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): StyleMap {\n const out = assignDefined({}, styleProps ?? undefined);\n for (const id of cascadeChain(bp)) assignDefined(out, layerAt(responsive, id)?.styleProps);\n return out;\n}\n\n/**\n * The full effective TRAIT map at `bp`: the node's own inputs, then each layer down the cascade.\n * Deliberately identical in shape and cascade order to `resolveStyleProps`, so \"how does a value\n * at this width get decided\" has ONE answer on both sides of the renderer split.\n */\nexport function resolveInputs(\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): InputMap {\n const out = assignDefined({}, inputs ?? undefined);\n for (const id of cascadeChain(bp)) assignDefined(out, layerAt(responsive, id)?.inputs);\n return out;\n}\n\n/** True when `bp` itself sets trait `name` — the panel's override indicator. Never true for Base. */\nexport function isInputOverriddenAt(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name: string,\n): boolean {\n return layerAt(responsive, bp as Breakpoint)?.inputs?.[name] !== undefined;\n}\n\n/**\n * Every level from Base down to `bp` that sets trait `name`, in cascade order — the trait-row\n * equivalent of `resolveValueChain`, driving the same \"Base 4 → Tablet 2 → Mobile 1\" source chain.\n */\nexport function resolveInputChain(\n name: string,\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): ValueSource[] {\n const chain: ValueSource[] = [];\n for (const id of cascadeChain(bp)) {\n const value = id === Breakpoint.Base ? inputs?.[name] : layerAt(responsive, id)?.inputs?.[name];\n if (value !== undefined) chain.push({ breakpoint: id, value });\n }\n return chain;\n}\n\n/** The effective per-state maps at `bp`. States with no values anywhere are omitted. */\nexport function resolveStateStyles(\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): StateStyleMap {\n const out: StateStyleMap = {};\n const merge = (src: StateStyleMap | undefined) => {\n for (const [state, map] of Object.entries(src ?? {})) {\n out[state] = assignDefined(out[state] ?? {}, map);\n }\n };\n merge(stateStyles ?? undefined);\n for (const id of cascadeChain(bp)) merge(layerAt(responsive, id)?.stateStyles);\n for (const state of Object.keys(out)) if (!hasKeys(out[state])) delete out[state];\n return out;\n}\n\n/**\n * Every state that has a value anywhere — at base or at any breakpoint — in a stable order\n * (base states first, then any that exist only at a breakpoint). A renderer iterates this, not\n * `Object.keys(stateStyles)`, so a state defined ONLY at a breakpoint (a Mobile-only hover) still\n * gets its selector scope resolved.\n */\nexport function stateNamesIn(\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): string[] {\n const names = new Set<string>();\n const add = (src: StateStyleMap | null | undefined) => {\n for (const [state, map] of Object.entries(src ?? {})) {\n if (Object.values(map ?? {}).some(v => v !== undefined)) names.add(state);\n }\n };\n add(stateStyles);\n for (const { id } of BREAKPOINTS) add(layerAt(responsive, id)?.stateStyles);\n return [...names];\n}\n\n/** One level of the cascade that sets a value. */\nexport interface ValueSource {\n breakpoint: Breakpoint;\n value: any;\n}\n\n/**\n * Every level from Base down to `bp` that sets `prop` (optionally within `state`), in\n * cascade order. The LAST entry is the effective value; an empty array means unset.\n * Drives the style panel's source chain (\"Base 34 → Tablet 28 → Mobile 22\").\n */\nexport function resolveValueChain(\n prop: string,\n styleProps: StyleMap | null | undefined,\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n state?: string,\n): ValueSource[] {\n const read = (props?: StyleMap, states?: StateStyleMap) => (state ? states?.[state] : props)?.[prop];\n const chain: ValueSource[] = [];\n for (const id of cascadeChain(bp)) {\n const layer = layerAt(responsive, id);\n const value = id === Breakpoint.Base\n ? read(styleProps ?? undefined, stateStyles ?? undefined)\n : read(layer?.styleProps, layer?.stateStyles);\n if (value !== undefined) chain.push({ breakpoint: id, value });\n }\n return chain;\n}\n\n/** True when `bp` itself sets `prop` (the style panel's orange edge). Never true for Base. */\nexport function isOverriddenAt(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop: string,\n state?: string,\n): boolean {\n const layer = layerAt(responsive, bp as Breakpoint);\n const map = state ? layer?.stateStyles?.[state] : layer?.styleProps;\n return map?.[prop] !== undefined;\n}\n\n/** Number of overridden values — at `bp`, or across every breakpoint when omitted. */\nexport function countOverrides(\n responsive: ResponsiveOverrides | null | undefined,\n bp?: Breakpoint | string,\n): number {\n const count = (map?: StyleMap) => Object.values(map ?? {}).filter(v => v !== undefined).length;\n const ids = bp ? [bp as Breakpoint] : BREAKPOINTS.map(d => d.id);\n let n = 0;\n for (const id of ids) {\n const layer = layerAt(responsive, id);\n n += count(layer?.styleProps);\n n += count(layer?.inputs);\n for (const map of Object.values(layer?.stateStyles ?? {})) n += count(map);\n }\n return n;\n}\n\n// ─── Editing (immutable) ─────────────────────────────────────────────────────\n\nfunction assertOverrideBreakpoint(bp: Breakpoint | string): asserts bp is OverrideBreakpoint {\n if (bp === Breakpoint.Base) {\n throw new Error('Base styles live in styleProps / stateStyles, not in responsive overrides');\n }\n if (!BREAKPOINT_INDEX.has(bp)) throw new Error(`Unknown breakpoint \"${bp}\"`);\n}\n\n/** Returns a new overrides object with `prop` set at `bp` (optionally within `state`). */\nexport function setOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop: string,\n value: any,\n state?: string,\n): ResponsiveOverrides {\n assertOverrideBreakpoint(bp);\n const layer: ResponsiveLayer = { ...(responsive?.[bp] ?? {}) };\n if (state) {\n layer.stateStyles = { ...(layer.stateStyles ?? {}), [state]: { ...(layer.stateStyles?.[state] ?? {}), [prop]: value } };\n } else {\n layer.styleProps = { ...(layer.styleProps ?? {}), [prop]: value };\n }\n return { ...(responsive ?? {}), [bp]: layer };\n}\n\n/** Returns a new overrides object with trait `name` set at `bp`. */\nexport function setInputOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name: string,\n value: any,\n): ResponsiveOverrides {\n assertOverrideBreakpoint(bp);\n const layer: ResponsiveLayer = { ...(responsive?.[bp] ?? {}) };\n layer.inputs = { ...(layer.inputs ?? {}), [name]: value };\n return { ...(responsive ?? {}), [bp]: layer };\n}\n\n/**\n * Remove trait overrides at `bp`, pruning empties exactly like `clearOverride` — omit `name` to\n * drop every trait override at that width. Returns `undefined` when nothing is left anywhere.\n */\nexport function clearInputOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name?: string,\n): ResponsiveOverrides | undefined {\n assertOverrideBreakpoint(bp);\n const next: ResponsiveOverrides = { ...(responsive ?? {}) };\n const current = next[bp];\n if (!current?.inputs) return hasKeys(next) ? next : undefined;\n\n const layer: ResponsiveLayer = { ...current };\n if (name === undefined) {\n delete layer.inputs;\n } else {\n const { [name]: _dropped, ...rest } = layer.inputs!;\n layer.inputs = hasKeys(rest) ? rest : undefined;\n if (!layer.inputs) delete layer.inputs;\n }\n next[bp] = hasKeys(layer) ? layer : undefined;\n if (!next[bp]) delete next[bp];\n return hasKeys(next) ? next : undefined;\n}\n\n/**\n * Remove overrides at `bp` and PRUNE whatever becomes empty, so \"reset\" and \"never\n * overridden\" are the same state on disk — no tombstones, no nulls.\n *\n * clearOverride(r, bp) — the whole breakpoint\n * clearOverride(r, bp, undefined, st) — one state at that breakpoint\n * clearOverride(r, bp, prop) — one base-state value\n * clearOverride(r, bp, prop, st) — one value within a state\n *\n * Returns `undefined` when nothing is left, so a serialiser omits the key entirely.\n */\nexport function clearOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop?: string,\n state?: string,\n): ResponsiveOverrides | undefined {\n assertOverrideBreakpoint(bp);\n const next: ResponsiveOverrides = { ...(responsive ?? {}) };\n const current = next[bp];\n\n if (current && (prop !== undefined || state !== undefined)) {\n const layer: ResponsiveLayer = { ...current };\n if (state) {\n const states = { ...(layer.stateStyles ?? {}) };\n if (prop !== undefined && states[state]) {\n const { [prop]: _dropped, ...rest } = states[state];\n states[state] = rest;\n }\n if (prop === undefined || !hasKeys(states[state])) delete states[state];\n layer.stateStyles = hasKeys(states) ? states : undefined;\n } else if (prop !== undefined && layer.styleProps) {\n const { [prop]: _dropped, ...rest } = layer.styleProps;\n layer.styleProps = hasKeys(rest) ? rest : undefined;\n }\n if (!layer.stateStyles) delete layer.stateStyles;\n if (!layer.styleProps) delete layer.styleProps;\n next[bp] = hasKeys(layer) ? layer : undefined;\n } else {\n next[bp] = undefined;\n }\n\n if (!next[bp]) delete next[bp];\n return hasKeys(next) ? next : undefined;\n}\n\n// ─── Emission plan ───────────────────────────────────────────────────────────\n\n/**\n * Everything one breakpoint must emit, already composed. Wrap in `mediaQuery` (engine)\n * or apply directly (builder, flattened).\n *\n * ⚠️ Compile these maps with `compileDeclarations(map, …, DeclarationContext.Override)`. The\n * default Base context drops CSS initial values as no-ops — but here `width: auto` or\n * `transform: none` is how a breakpoint UNDOES the wider value, and dropping it silently keeps\n * the desktop style.\n */\nexport interface ResponsiveRuleSet {\n breakpoint: OverrideBreakpoint;\n mediaQuery: string;\n /** Sparse declarations for the node itself at this width (virtual traits composed). */\n styleProps: StyleMap;\n /** Sparse declarations per state at this width (virtual traits composed). */\n stateStyles: StateStyleMap;\n}\n\nconst ZERO_DURATIONS = new Set(['0ms', '0s']);\n\nfunction groupsTouchedBy(map: StyleMap | undefined): Set<VirtualTraitGroup> {\n const touched = new Set<VirtualTraitGroup>();\n if (!map) return touched;\n for (const group of VIRTUAL_TRAIT_GROUPS) {\n const wholeTouched = group.output === BACKDROP_WHOLE_KEY && map[BACKDROP_WHOLE_KEY] !== undefined;\n if (wholeTouched || group.keys.some(k => map[k] !== undefined)) touched.add(group);\n }\n return touched;\n}\n\n/**\n * Should a touched group that composed to nothing emit its cancelling value?\n * Transition is the exception: setting only the easing (no duration anywhere) composes to\n * nothing too, and cancelling there would also kill the renderer's default hover transition\n * — so transition cancels only when the merged duration is explicitly zero.\n */\nfunction shouldReset(group: VirtualTraitGroup, merged: StyleMap): boolean {\n if (group.reset === null) return false;\n if (group.output === 'transition') return ZERO_DURATIONS.has(String(merged['transitionDuration']));\n return true;\n}\n\n/**\n * Compose a sparse override against everything wider than it, keeping ONLY what the\n * override changes: its own plain props, plus each virtual group it touches (or that\n * group's cancelling value when it now composes to nothing). Untouched groups are dropped\n * — re-emitting the wider rule's value inside a media block is noise at best.\n */\nfunction composeOverride(own: StyleMap, wider: StyleMap, touched: Set<VirtualTraitGroup>): StyleMap {\n const composed = composeVirtualTraits(own, wider);\n const groupOutputs = new Set(VIRTUAL_TRAIT_GROUPS.map(g => g.output));\n const out: StyleMap = {};\n for (const [k, v] of Object.entries(composed)) {\n if (!groupOutputs.has(k) && k !== BACKDROP_TWIN_KEY && v !== undefined) out[k] = v;\n }\n const merged = { ...wider, ...own };\n for (const group of touched) {\n const value = composed[group.output];\n if (value !== undefined) out[group.output] = value;\n else if (shouldReset(group, merged)) out[group.output] = group.reset;\n }\n if (out[BACKDROP_WHOLE_KEY] !== undefined) out[BACKDROP_TWIN_KEY] = out[BACKDROP_WHOLE_KEY];\n return out;\n}\n\n/**\n * The per-breakpoint rule sets a node needs, widest → narrowest (the order they must be\n * emitted in, AFTER every base rule — equal specificity means source order decides).\n * Breakpoints with nothing to emit are omitted.\n *\n * Handles the cross-axis case: a breakpoint that changes a virtual group (say\n * `translateX`) also re-emits that group for every state the node has, because the wider\n * state rule was composed against the wider value and would otherwise snap back to it on\n * hover.\n */\nexport function planResponsiveRules(\n styleProps: StyleMap | null | undefined,\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): ResponsiveRuleSet[] {\n if (!hasKeys(responsive)) return [];\n const plan: ResponsiveRuleSet[] = [];\n\n for (const def of BREAKPOINTS) {\n const layer = layerAt(responsive, def.id);\n if (!layer || def.maxWidth == null) continue;\n const bp = def.id as OverrideBreakpoint;\n const wider = parentBreakpoint(bp) as Breakpoint;\n\n const own = layer.styleProps ?? {};\n const widerProps = resolveStyleProps(styleProps, responsive, wider);\n const touchedByProps = groupsTouchedBy(own);\n const composedProps = composeOverride(own, widerProps, touchedByProps);\n\n const propsHere = { ...widerProps, ...own };\n const statesHere = resolveStateStyles(stateStyles, responsive, bp);\n const statesWider = resolveStateStyles(stateStyles, responsive, wider);\n const composedStates: StateStyleMap = {};\n for (const state of orderStatesForEmit(Object.keys(statesHere))) {\n const ownState = layer.stateStyles?.[state] ?? {};\n const touched = groupsTouchedBy(ownState);\n for (const group of touchedByProps) touched.add(group);\n const composed = composeOverride(ownState, { ...propsHere, ...(statesWider[state] ?? {}) }, touched);\n if (hasKeys(composed)) composedStates[state] = composed;\n }\n\n if (hasKeys(composedProps) || hasKeys(composedStates)) {\n plan.push({\n breakpoint: bp,\n mediaQuery: mediaQueryFor(bp) as string,\n styleProps: composedProps,\n stateStyles: composedStates,\n });\n }\n }\n return plan;\n}\n","// Swiper breakpoints, derived from a node's per-breakpoint TRAIT overrides.\n//\n// SHARED (iox-ui): the builder canvas and the SSR engine both hand Swiper the same config, so a\n// slider that goes 1-up on a phone in the editor does the same on the live site.\n//\n// ⚠️ THE INVERSION IS THE WHOLE POINT OF THIS FILE.\n// IOX is desktop-first: `max-width`, and a layer applies at its width AND NARROWER.\n// Swiper is mobile-first: `breakpoints` keys are MIN-widths, and the LARGEST matching key wins.\n// Converting by hand at each call site is how the two drift, so it happens once, here, tested.\n//\n// See iox-ai-guidance `architecture/builder/builder-quality-pass-plan.md` (P3-G2).\n\nimport { BREAKPOINTS, Breakpoint, InputMap, ResponsiveOverrides, resolveInputs } from './responsive';\n\n/** Trait names whose value Swiper reads per breakpoint. Anything else is config-wide. */\nexport const SWIPER_RESPONSIVE_TRAITS = Object.freeze(['slidesPerView', 'slidesPerGroup', 'spaceBetween']);\n\n/** `{ [minWidth]: { slidesPerView, … } }` — Swiper's own `breakpoints` shape. */\nexport type SwiperBreakpointMap = Record<number, InputMap>;\n\n/**\n * Build Swiper's mobile-first `breakpoints` map from IOX's desktop-first layers.\n *\n * Each IOX breakpoint covers `[nextNarrower.maxWidth + 1 … this.maxWidth]`, so the Swiper key for a\n * layer is **one px above the next-narrower breakpoint's max-width** — the low edge of the band the\n * layer governs. Base becomes the key above the widest bounded breakpoint.\n *\n * Values are the RESOLVED ones at each width (base + every wider layer), never the raw sparse layer:\n * Swiper does not cascade between its own breakpoints the way CSS does — the largest matching key\n * wins outright and is not merged with smaller ones — so each entry must be self-sufficient.\n *\n * Only `SWIPER_RESPONSIVE_TRAITS` are emitted, and a band is omitted when it matches the band below\n * it, keeping the config as small as the author's actual overrides.\n */\nexport function buildSwiperBreakpoints(\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): SwiperBreakpointMap {\n const bands = bandsWidestFirst();\n const map: SwiperBreakpointMap = {};\n let previous: InputMap | null = null;\n\n // Narrowest → widest, so \"same as the band below\" is a comparison against what we just emitted.\n for (const band of [...bands].reverse()) {\n const resolved = pick(resolveInputs(inputs, responsive, band.id));\n if (previous && sameValues(previous, resolved)) continue;\n map[band.minWidth] = resolved;\n previous = resolved;\n }\n return map;\n}\n\n/**\n * The full `breakpoints` value to hand Swiper: the derived map, with any hand-written advanced JSON\n * merged OVER it so an author's explicit escape hatch always wins.\n */\nexport function mergeSwiperBreakpoints(\n derived: SwiperBreakpointMap,\n advancedJson: string | null | undefined,\n): SwiperBreakpointMap | undefined {\n let advanced: SwiperBreakpointMap | undefined;\n if (advancedJson) {\n try { advanced = JSON.parse(advancedJson); } catch { advanced = undefined; }\n }\n if (!advanced) return Object.keys(derived).length ? derived : undefined;\n\n const out: SwiperBreakpointMap = { ...derived };\n for (const [key, value] of Object.entries(advanced)) {\n const min = Number(key);\n if (!Number.isFinite(min)) continue;\n out[min] = { ...(out[min] ?? {}), ...(value ?? {}) };\n }\n return Object.keys(out).length ? out : undefined;\n}\n\n/** Each IOX breakpoint with the MIN width at which it starts applying. Widest first. */\nfunction bandsWidestFirst(): { id: Breakpoint; minWidth: number }[] {\n return BREAKPOINTS.map((def, i) => {\n const narrower = BREAKPOINTS[i + 1];\n // Base starts one px above the widest bounded breakpoint; every other band starts one px\n // above the breakpoint below it. The narrowest band starts at 0 — it has nothing below.\n const minWidth = narrower?.maxWidth != null ? narrower.maxWidth + 1 : 0;\n return { id: def.id, minWidth };\n });\n}\n\nfunction pick(resolved: InputMap): InputMap {\n const out: InputMap = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) {\n if (resolved[name] !== undefined) out[name] = resolved[name];\n }\n return out;\n}\n\nfunction sameValues(a: InputMap, b: InputMap): boolean {\n const keys = new Set([...Object.keys(a), ...Object.keys(b)]);\n for (const key of keys) if (a[key] !== b[key]) return false;\n return true;\n}\n","/**\n * Which Swiper modules a Slider loads, and how its autoplay boots — a pure decision, so the module list\n * is unit-tested (CC1 R1/R2 floor; complex-components plan §7c). Swiper's A11y module is ALWAYS loaded:\n * it gives the container `aria-roledescription=\"carousel\"`, every slide \"slide\" and an \"n of m\" label, and\n * keeps the live region quiet while it rotates. Autoplay never boots under reduced motion (Publishable\n * gate #6). The rotation pause control and the slider parts as nodes are CC3.\n */\nexport enum SwiperModuleName {\n A11y = 'A11y',\n Navigation = 'Navigation',\n Pagination = 'Pagination',\n Scrollbar = 'Scrollbar',\n Autoplay = 'Autoplay',\n Keyboard = 'Keyboard',\n Mousewheel = 'Mousewheel',\n Zoom = 'Zoom',\n Grid = 'Grid',\n Parallax = 'Parallax',\n FreeMode = 'FreeMode',\n}\n\nexport interface SwiperModuleFlags {\n enableNavigation?: boolean;\n enablePagination?: boolean;\n enableScrollbar?: boolean;\n enableAutoplay?: boolean;\n enableKeyboard?: boolean;\n enableMousewheel?: boolean;\n enableZoom?: boolean;\n enableGrid?: boolean;\n enableParallax?: boolean;\n}\n\nconst FLAGGED: ReadonlyArray<[keyof SwiperModuleFlags, SwiperModuleName]> = [\n ['enableNavigation', SwiperModuleName.Navigation],\n ['enablePagination', SwiperModuleName.Pagination],\n ['enableScrollbar', SwiperModuleName.Scrollbar],\n ['enableAutoplay', SwiperModuleName.Autoplay],\n ['enableKeyboard', SwiperModuleName.Keyboard],\n ['enableMousewheel', SwiperModuleName.Mousewheel],\n ['enableZoom', SwiperModuleName.Zoom],\n ['enableGrid', SwiperModuleName.Grid],\n ['enableParallax', SwiperModuleName.Parallax],\n];\n\n/** True when the Slider's autoplay may start: on, and the visitor has not asked for reduced motion. */\nexport function swiperAutoplayAllowed(enableAutoplay: boolean | undefined, motionAllowed: boolean): boolean {\n return !!enableAutoplay && motionAllowed;\n}\n\n/** The modules to load, A11y first. */\nexport function swiperModuleNames(flags: SwiperModuleFlags, motionAllowed: boolean): SwiperModuleName[] {\n return [SwiperModuleName.A11y, ...FLAGGED\n .filter(([flag, name]) => flags[flag] && (name !== SwiperModuleName.Autoplay || swiperAutoplayAllowed(flags.enableAutoplay, motionAllowed)))\n .map(([, name]) => name)];\n}\n\n/** Swiper's A11y options: carousel / slide role descriptions and an \"n of m\" slide label. */\nexport const SWIPER_A11Y_OPTIONS = {\n enabled: true,\n containerRoleDescriptionMessage: 'carousel',\n itemRoleDescriptionMessage: 'slide',\n slideLabelMessage: '{{index}} of {{slidesLength}}',\n} as const;\n","import { SliderWords, SLIDER_WORDS } from '@vectoriox/iox-ui/composite-core';\n\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { buildSwiperBreakpoints, mergeSwiperBreakpoints, SWIPER_RESPONSIVE_TRAITS } from '../../style-compiler/swiper-breakpoints';\nimport { SWIPER_A11Y_OPTIONS, swiperModuleNames, SwiperModuleName } from './swiper-modules';\n\n/**\n * What a Slider hands Swiper — ONE pure decision for every place a Swiper is built (CC3): the engine's component\n * path, its string path (globals), the admin's Preview and the builder's edit canvas. Before CC3 the builder's\n * Preview built its own config (no A11y module) and the engine read `loop: 'off'` as truthy.\n */\nexport interface SliderInputs {\n dir?: 'ltr' | 'rtl' | string;\n direction?: 'horizontal' | 'vertical' | string;\n slidesPerView?: number | 'auto' | string;\n slidesPerGroup?: number | string;\n spaceBetween?: number | string;\n speed?: number | string;\n effect?: string;\n grabCursor?: boolean;\n centeredSlides?: boolean;\n initialSlide?: number | string;\n autoHeight?: boolean;\n slideToClickedSlide?: boolean;\n freeMode?: boolean;\n /** `'off' | 'loop' | 'rewind'` (the builder trait) or a boolean (older saves). */\n loop?: boolean | string;\n enableNavigation?: boolean;\n enablePagination?: boolean;\n enableScrollbar?: boolean;\n enableAutoplay?: boolean;\n enableKeyboard?: boolean;\n enableMousewheel?: boolean;\n enableZoom?: boolean;\n enableGrid?: boolean;\n enableParallax?: boolean;\n autoplayDelay?: number | string;\n autoplayPauseOnMouseEnter?: boolean;\n autoplayDisableOnInteraction?: boolean;\n paginationType?: 'bullets' | 'fraction' | 'progressbar' | string;\n paginationClickable?: boolean;\n paginationDynamicBullets?: boolean;\n gridRows?: number | string;\n breakpoints?: string;\n responsive?: ResponsiveOverrides | null;\n}\n\n/** The slider's controls, when they are PARTS (CC3) — the elements Swiper is handed. */\nexport interface SliderControlElements {\n prev?: Element | null;\n next?: Element | null;\n pagination?: Element | null;\n}\n\nexport interface SwiperPlanContext {\n /** The visitor allows motion (autoplay boots only then). */\n motion: boolean;\n /** The builder's EDIT canvas: no touch, no loop, no autoplay, the slide effect at 300ms. */\n edit?: boolean;\n /** The controls are parts; absent = Swiper-drawn controls from the legacy switches. */\n parts?: SliderControlElements | null;\n words?: SliderWords;\n /** The carousel has a name (Slider ▸ Accessibility ▸ Carousel name): a `region` landmark; else a `group`. */\n named?: boolean;\n}\n\nexport interface SwiperPlan {\n modules: SwiperModuleName[];\n /** An effect module beyond `slide` (EffectFade…), by Swiper's export name. */\n effectModule: string | null;\n options: Record<string, unknown>;\n}\n\n/** The selectors Swiper's own (legacy) controls answer to inside `.swiper`. */\nexport const LEGACY_SWIPER_CONTROLS = {\n prev: '.swiper-button-prev',\n next: '.swiper-button-next',\n pagination: '.swiper-pagination',\n scrollbar: '.swiper-scrollbar',\n} as const;\n\n/** The pagination part's classes — Swiper's own position CSS (`.swiper-pagination-bullets.swiper-pagination-horizontal`)\n * must not pin a PART: its place is its own styles'. The dots keep Swiper's bullet class. */\nexport const PART_PAGINATION_MODIFIER = 'iox-slider-pagination-';\n\nconst EFFECT_MODULES: Readonly<Record<string, string>> = {\n fade: 'EffectFade', cube: 'EffectCube', flip: 'EffectFlip', coverflow: 'EffectCoverflow', cards: 'EffectCards', creative: 'EffectCreative',\n};\n\nconst num = (v: unknown, fallback: number): number => {\n const n = typeof v === 'number' ? v : Number(v);\n return Number.isFinite(n) ? n : fallback;\n};\nconst on = (v: unknown): boolean => v === true || v === 'true';\n\n/** The loop trait as Swiper's two booleans. `'off'` is a string — truthy — which made every saved slider loop. */\nexport function swiperLoopOptions(loop: unknown): { loop: boolean; rewind: boolean } {\n return { loop: loop === true || loop === 'loop' || loop === 'true', rewind: loop === 'rewind' };\n}\n\n/** `slidesPerView` as Swiper reads it: a number, or `'auto'`. */\nfunction perView(v: unknown): number | 'auto' {\n if (v === 'auto' || v === undefined || v === null || v === '') return 'auto';\n const n = num(v, 1);\n return n > 0 ? n : 'auto';\n}\n\nfunction collectResponsiveInputs(inputs: SliderInputs): Record<string, unknown> {\n const all: Record<string, unknown> = { slidesPerView: inputs.slidesPerView, slidesPerGroup: inputs.slidesPerGroup, spaceBetween: inputs.spaceBetween };\n const out: Record<string, unknown> = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) if (all[name] !== undefined) out[name] = all[name];\n return out;\n}\n\nexport function planSwiperOptions(inputs: SliderInputs, ctx: SwiperPlanContext): SwiperPlan {\n const words = ctx.words ?? SLIDER_WORDS.en;\n const parts = ctx.parts ?? null;\n const edit = !!ctx.edit;\n const hasNav = parts ? !!(parts.prev || parts.next) : on(inputs.enableNavigation);\n const hasDots = parts ? !!parts.pagination : on(inputs.enablePagination);\n const autoplay = !edit && on(inputs.enableAutoplay);\n\n const flags = {\n enableNavigation: hasNav,\n enablePagination: hasDots,\n enableScrollbar: on(inputs.enableScrollbar),\n // The Autoplay module is LOADED whenever the switch is on, so a visitor under reduced motion can still start\n // it from the pause control — it never BOOTS then (`autoplay.enabled`).\n enableAutoplay: autoplay,\n enableKeyboard: !edit && on(inputs.enableKeyboard),\n enableMousewheel: !edit && on(inputs.enableMousewheel),\n enableZoom: !edit && on(inputs.enableZoom),\n enableGrid: !edit && on(inputs.enableGrid),\n enableParallax: !edit && on(inputs.enableParallax),\n };\n const modules = swiperModuleNames(flags, true);\n if (!edit && on(inputs.freeMode)) modules.push(SwiperModuleName.FreeMode);\n\n const effect = edit ? 'slide' : (inputs.effect || 'slide');\n const options: Record<string, unknown> = {\n dir: inputs.dir === 'rtl' ? 'rtl' : 'ltr',\n direction: inputs.direction === 'vertical' ? 'vertical' : 'horizontal',\n slidesPerView: perView(inputs.slidesPerView),\n slidesPerGroup: Math.max(1, num(inputs.slidesPerGroup, 1)),\n spaceBetween: num(inputs.spaceBetween, 0),\n speed: edit ? 300 : num(inputs.speed, 300),\n effect,\n centeredSlides: on(inputs.centeredSlides),\n initialSlide: num(inputs.initialSlide, 0),\n autoHeight: on(inputs.autoHeight),\n // Swiper marks the slides in view (`swiper-slide-visible`) — the carousel runtime makes the others inert.\n watchSlidesProgress: true,\n };\n if (edit) {\n options['allowTouchMove'] = false;\n options['simulateTouch'] = false;\n // On the canvas Previous / Next are PARTS an author clicks to select (R2): rewinding keeps Swiper from\n // disabling them at either end (a disabled <button> takes no click).\n options['rewind'] = true;\n } else {\n options['grabCursor'] = inputs.grabCursor !== false;\n options['slideToClickedSlide'] = on(inputs.slideToClickedSlide);\n Object.assign(options, swiperLoopOptions(inputs.loop));\n if (on(inputs.freeMode)) options['freeMode'] = true;\n }\n\n if (hasNav) {\n options['navigation'] = parts\n ? { prevEl: parts.prev ?? null, nextEl: parts.next ?? null }\n : { prevEl: LEGACY_SWIPER_CONTROLS.prev, nextEl: LEGACY_SWIPER_CONTROLS.next };\n }\n if (hasDots) {\n const type = inputs.paginationType === 'fraction' || inputs.paginationType === 'progressbar' ? inputs.paginationType : 'bullets';\n options['pagination'] = parts\n ? { el: parts.pagination, type, clickable: inputs.paginationClickable !== false, dynamicBullets: on(inputs.paginationDynamicBullets),\n modifierClass: PART_PAGINATION_MODIFIER, bulletElement: 'button' }\n : { el: LEGACY_SWIPER_CONTROLS.pagination, type, clickable: inputs.paginationClickable !== false, dynamicBullets: on(inputs.paginationDynamicBullets) };\n }\n if (flags.enableScrollbar) options['scrollbar'] = { el: LEGACY_SWIPER_CONTROLS.scrollbar, draggable: !edit };\n if (autoplay) {\n options['autoplay'] = {\n enabled: ctx.motion,\n delay: num(inputs.autoplayDelay, 3000),\n pauseOnMouseEnter: inputs.autoplayPauseOnMouseEnter !== false,\n disableOnInteraction: on(inputs.autoplayDisableOnInteraction),\n };\n }\n if (flags.enableKeyboard) options['keyboard'] = { enabled: true, onlyInViewport: true };\n if (flags.enableMousewheel) options['mousewheel'] = true;\n if (flags.enableZoom) options['zoom'] = true;\n if (flags.enableParallax) options['parallax'] = true;\n if (flags.enableGrid && num(inputs.gridRows, 1) > 1) options['grid'] = { rows: num(inputs.gridRows, 1) };\n\n options['a11y'] = {\n ...SWIPER_A11Y_OPTIONS,\n prevSlideMessage: (parts?.prev?.getAttribute('aria-label')) || words.prev,\n nextSlideMessage: (parts?.next?.getAttribute('aria-label')) || words.next,\n paginationBulletMessage: words.goTo,\n slideLabelMessage: words.slideLabel,\n containerRoleDescriptionMessage: words.carousel,\n itemRoleDescriptionMessage: words.slide,\n // aria-roledescription needs a role to describe (axe): a named carousel is a region, an unnamed one a group.\n containerRole: ctx.named ? 'region' : 'group',\n };\n\n if (!edit) {\n const derived = buildSwiperBreakpoints(collectResponsiveInputs(inputs) as never, inputs.responsive ?? null);\n const map = mergeSwiperBreakpoints(derived, inputs.breakpoints ?? '');\n if (map) options['breakpoints'] = map;\n }\n\n return { modules, effectModule: effect !== 'slide' ? EFFECT_MODULES[effect] ?? null : null, options };\n}\n","import { attachCarouselA11y, CarouselSwiper, SliderRole, sliderPartElement, sliderWords } from '@vectoriox/iox-ui/composite-core';\n\nimport { motionAllowed } from '../../motion/motion';\nimport { planSwiperOptions, SliderInputs } from './slider-options';\n\n/**\n * Boot a Swiper on a rendered slider — ONE path for the engine's component path, its string path (globals and the\n * fallback renderer: `data-iox-slider` carries the inputs) and the admin's Preview (CC3). It hands Swiper the\n * slider's control PARTS when it has them (else the legacy Swiper-drawn controls), plans the options through the\n * shared `planSwiperOptions`, and attaches the accessible-carousel runtime (pause control, live region, inert\n * slides). The builder's EDIT canvas boots with `edit: true` and no carousel runtime.\n */\n\n/** The string path's slider: `data-iox-slider` holds its inputs as JSON. */\nexport const SLIDER_INPUTS_ATTRIBUTE = 'data-iox-slider';\n\n/** Swiper events a builder can replay as interaction triggers (`swiperSlideChange`…). */\nexport const SWIPER_TRIGGER_EVENTS: ReadonlyArray<string> = ['slideChange', 'reachBeginning', 'reachEnd', 'autoplayStart', 'autoplayStop'];\n\nexport interface SliderBootOptions {\n edit?: boolean;\n /** Every Swiper event above, by name. */\n onEvent?: (event: string, swiper: unknown) => void;\n}\n\n/** The slider's own control parts in the DOM (never a nested slider's). */\nexport function sliderControlElements(el: Element): { prev: HTMLElement | null; next: HTMLElement | null; pagination: HTMLElement | null; pause: HTMLElement | null } {\n return {\n prev: sliderPartElement(el, SliderRole.Prev),\n next: sliderPartElement(el, SliderRole.Next),\n pagination: sliderPartElement(el, SliderRole.Pagination),\n pause: sliderPartElement(el, SliderRole.Pause),\n };\n}\n\n/** True when the rendered slider holds any control part (the model's `hasSliderParts`, read off the DOM). */\nexport function domHasSliderParts(el: Element): boolean {\n const c = sliderControlElements(el);\n return !!(c.prev || c.next || c.pagination || c.pause);\n}\n\nexport async function bootSlider(el: HTMLElement, inputs: SliderInputs, options: SliderBootOptions = {}): Promise<any> {\n const [{ default: Swiper }, swiperModules] = await Promise.all([import('swiper'), import('swiper/modules')]);\n if (!el.isConnected) return null;\n const controls = sliderControlElements(el);\n const parts = domHasSliderParts(el) ? controls : null;\n const words = sliderWords(el.ownerDocument?.documentElement?.getAttribute('lang'));\n const plan = planSwiperOptions(inputs, {\n motion: motionAllowed(), edit: options.edit, parts, words, named: !!el.getAttribute('aria-label'),\n });\n const lib = swiperModules as unknown as Record<string, unknown>;\n const modules = plan.modules.map(name => lib[name]).filter(Boolean);\n if (plan.effectModule && lib[plan.effectModule]) modules.push(lib[plan.effectModule]);\n const on: Record<string, (swiper: unknown) => void> = {};\n if (options.onEvent) for (const event of SWIPER_TRIGGER_EVENTS) on[event] = (swiper: unknown) => options.onEvent!(event, swiper);\n const swiper = new Swiper(el, { ...plan.options, modules, on } as never);\n if (!options.edit) attachCarouselA11y(swiper as unknown as CarouselSwiper, { words });\n return swiper;\n}\n\n/** The inputs a string-path slider carries (`data-iox-slider`), or null. */\nexport function sliderInputsOf(el: Element): SliderInputs | null {\n const raw = el.getAttribute(SLIDER_INPUTS_ATTRIBUTE);\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw);\n return parsed && typeof parsed === 'object' ? parsed as SliderInputs : null;\n } catch {\n return null;\n }\n}\n\n/** The Swiper inputs of a saved SliderContainer node — what the string path serialises into `data-iox-slider`. */\nexport const SLIDER_INPUT_NAMES: ReadonlyArray<keyof SliderInputs> = [\n 'dir', 'direction', 'slidesPerView', 'slidesPerGroup', 'spaceBetween', 'speed', 'effect', 'grabCursor', 'centeredSlides', 'initialSlide',\n 'autoHeight', 'slideToClickedSlide', 'freeMode', 'loop', 'enableNavigation', 'enablePagination', 'enableScrollbar', 'enableAutoplay',\n 'enableKeyboard', 'enableMousewheel', 'enableZoom', 'enableGrid', 'enableParallax', 'autoplayDelay', 'autoplayPauseOnMouseEnter',\n 'autoplayDisableOnInteraction', 'paginationType', 'paginationClickable', 'paginationDynamicBullets', 'gridRows', 'breakpoints',\n];\n\nexport function sliderInputsFromProps(props: Record<string, unknown>, responsive?: unknown): SliderInputs {\n const out: Record<string, unknown> = {};\n for (const name of SLIDER_INPUT_NAMES) if (props[name] !== undefined) out[name] = props[name];\n if (responsive) out['responsive'] = responsive;\n return out as SliderInputs;\n}\n","import {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { isSliderPart } from '@vectoriox/iox-ui/composite-core';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { bootSlider } from './slider-boot';\nimport { SliderInputs } from './slider-options';\n\n/**\n * `iox-slider-container` — the Slider's engine twin (component path, and the admin's Preview through the builder twin's\n * shared boot). The slides render into `.swiper-wrapper` (`childrenHost` — the `.swiper-slide` direct-child invariant,\n * slider.md); the control PARTS (CC3: Previous, Next, Pause, Pagination — `childHostFor`) render beside it, inside\n * `.swiper`: those before the first slide before the wrapper, the rest after it. A saved slider with no parts keeps\n * Swiper-drawn controls (the legacy switches). Swiper is booted by the ONE shared `bootSlider`.\n */\n@Component({\n selector: 'iox-slider-container',\n template: `\n <div class=\"swiper\" [class]=\"'swiper iox-node-' + nodeId\" [attr.dir]=\"dir\" [style.direction]=\"dir\"\n [style.--swiper-navigation-color]=\"legacyControls ? (navigationColor || null) : null\"\n [style.--swiper-pagination-color]=\"legacyControls ? (paginationColor || null) : null\" #swiperEl>\n <ng-container #leadHost></ng-container>\n <div class=\"swiper-wrapper\">\n <ng-container #childrenHost></ng-container>\n </div>\n <ng-container #trailHost></ng-container>\n <div *ngIf=\"legacyControls && enableNavigation\" class=\"swiper-button-prev\"></div>\n <div *ngIf=\"legacyControls && enableNavigation\" class=\"swiper-button-next\"></div>\n <div *ngIf=\"legacyControls && enablePagination\" class=\"swiper-pagination\"></div>\n <div *ngIf=\"enableScrollbar\" class=\"swiper-scrollbar\"></div>\n </div>\n `,\n styles: [`.swiper { width: 100%; height: 100%; box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientSliderContainerComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** Language (writing) direction — the `dir` attribute, so it survives SSR and drives Swiper's RTL layout. */\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n /** `'off' | 'loop' | 'rewind'` (or a boolean from older saves). */\n @Input() loop: boolean | string = 'off';\n @Input() slidesPerView: number | 'auto' = 1;\n @Input() slidesPerGroup = 1;\n @Input() spaceBetween = 0;\n @Input() speed = 300;\n @Input() effect = 'slide';\n @Input() grabCursor = true;\n @Input() centeredSlides = false;\n @Input() initialSlide = 0;\n @Input() autoHeight = false;\n @Input() slideToClickedSlide = false;\n @Input() freeMode = false;\n @Input() enableNavigation = false;\n @Input() enablePagination = false;\n @Input() enableScrollbar = false;\n @Input() enableAutoplay = false;\n @Input() enableKeyboard = false;\n @Input() enableMousewheel = false;\n @Input() enableZoom = false;\n @Input() enableGrid = false;\n @Input() enableParallax = false;\n @Input() autoplayDelay = 3000;\n @Input() autoplayPauseOnMouseEnter = true;\n @Input() autoplayDisableOnInteraction = false;\n @Input() paginationType: 'bullets' | 'fraction' | 'progressbar' = 'bullets';\n @Input() paginationClickable = true;\n @Input() paginationDynamicBullets = false;\n @Input() navigationColor = '';\n @Input() paginationColor = '';\n @Input() gridRows = 1;\n /** Advanced escape hatch: raw Swiper `breakpoints` JSON, merged OVER the per-breakpoint traits' map. */\n @Input() breakpoints = '';\n /** The node's per-breakpoint overrides (only its `inputs` layer is read here). */\n @Input() responsive: ResponsiveOverrides | null = null;\n /** The slider's controls are parts (set by the renderer from the node): Swiper draws none of its own. */\n @Input() controlParts = false;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true }) childrenHost!: ViewContainerRef;\n @ViewChild('leadHost', { read: ViewContainerRef, static: true }) leadHost!: ViewContainerRef;\n @ViewChild('trailHost', { read: ViewContainerRef, static: true }) trailHost!: ViewContainerRef;\n @ViewChild('swiperEl', { static: true }) swiperEl!: { nativeElement: HTMLElement };\n\n private swiper: any = null;\n private slidesSeen = false;\n private readonly instanceRegistry = inject(ComponentInstanceRegistryService);\n\n constructor(@Inject(PLATFORM_ID) private platformId: object) {}\n\n /** Swiper draws its own arrows / dots only for a saved slider whose controls are not parts yet. */\n get legacyControls(): boolean {\n return !this.controlParts;\n }\n\n /** Where a child renders: a control part beside the wrapper (before it until the first slide, after it from\n * then on), a slide into the wrapper. The renderer asks in the children's order. */\n childHostFor(child: { role?: string | null } | null | undefined): ViewContainerRef {\n if (!isSliderPart(child)) {\n this.slidesSeen = true;\n return this.childrenHost;\n }\n return this.slidesSeen ? this.trailHost : this.leadHost;\n }\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n // Defer so all child slides and parts are rendered first.\n requestAnimationFrame(() => void this.boot());\n }\n }\n\n ngOnDestroy(): void {\n if (this.swiper) {\n this.swiper.destroy(true, true);\n this.swiper = null;\n this.instanceRegistry.unregister(this.nodeId);\n }\n }\n\n private async boot(): Promise<void> {\n const el = this.swiperEl?.nativeElement;\n if (!el) return;\n this.swiper = await bootSlider(el, this.inputs());\n if (this.swiper) this.instanceRegistry.register(this.nodeId, this.swiper);\n }\n\n private inputs(): SliderInputs {\n return {\n dir: this.dir, direction: this.direction, loop: this.loop, slidesPerView: this.slidesPerView, slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween, speed: this.speed, effect: this.effect, grabCursor: this.grabCursor, centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide, autoHeight: this.autoHeight, slideToClickedSlide: this.slideToClickedSlide, freeMode: this.freeMode,\n enableNavigation: this.enableNavigation, enablePagination: this.enablePagination, enableScrollbar: this.enableScrollbar,\n enableAutoplay: this.enableAutoplay, enableKeyboard: this.enableKeyboard, enableMousewheel: this.enableMousewheel,\n enableZoom: this.enableZoom, enableGrid: this.enableGrid, enableParallax: this.enableParallax, autoplayDelay: this.autoplayDelay,\n autoplayPauseOnMouseEnter: this.autoplayPauseOnMouseEnter, autoplayDisableOnInteraction: this.autoplayDisableOnInteraction,\n paginationType: this.paginationType, paginationClickable: this.paginationClickable, paginationDynamicBullets: this.paginationDynamicBullets,\n gridRows: this.gridRows, breakpoints: this.breakpoints, responsive: this.responsive,\n };\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Client-engine slide. The HOST element (`iox-slider-slide`) itself carries the\n * `swiper-slide` class so it is a DIRECT child of `.swiper-wrapper` — Swiper only\n * recognises slides that are direct children (the `.swiper-slide` direct-child\n * invariant; see iox-ai-guidance architecture/builder/slider.md). A wrapper div\n * would nest `.swiper-slide` one level too deep and Swiper would ignore the slides.\n *\n * The shared `iox-node-{id}` class is applied to the same host so the page-level\n * CSS rules match (parity with the string renderer / builder).\n */\n@Component({\n selector: 'iox-slider-slide',\n template: `<ng-container #childrenHost></ng-container>`,\n styles: [`:host { display: block; box-sizing: border-box; }`],\n host: { '[class]': `'swiper-slide iox-node-' + nodeId` },\n standalone: false,\n})\nexport class ClientSliderSlideComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Directive-host List: the real `<ul>`/`<ol>` IS the host — no `iox-list` wrapper, no\n * inner/outer split. The tag is chosen by whoever CREATES the component (engine passes\n * `hostElement: document.createElement(htmlTag)`), NOT an internal `*ngIf`. Children render\n * into the host via `childrenHost`. `start`/`reversed` are host attrs (only meaningful on `<ol>`).\n */\n@Component({\n selector: 'ul[iox-list],ol[iox-list]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[attr.start]': \"htmlTag === 'ol' && start !== '' && start != null ? start : null\",\n '[attr.reversed]': \"htmlTag === 'ol' && reversed ? '' : null\",\n },\n // No display/position in :host (they'd out-specify styleProps). <ul>/<ol> are block by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientListComponent {\n @Input() htmlTag: 'ul' | 'ol' = 'ul';\n @Input() start: string | number = '';\n @Input() reversed = false;\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Directive-host List item: the real `<li>` IS the host — no `iox-list-item` wrapper, no\n * inner/outer split. Children render into the `<li>` via `childrenHost`. Fixed tag (`<li>`),\n * so the engine creates it with `vcr.createComponent` (no `hostElement` needed).\n */\n@Component({\n selector: 'li[iox-list-item]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host (they'd out-specify styleProps). <li> is list-item by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientListItemComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","/**\n * Gallery — data model + the SHARED \"what are the image URLs\" resolver.\n *\n * A Gallery is populated one of two ways (see gallery-component-plan.md):\n * - **Manual**: an ordered `GalleryImage[]` trait. Each item is a raw/filebox URL OR a per-item\n * binding path resolved against the item/route context.\n * - **Bound**: the whole gallery repeats over a data source (a collection, or an array property\n * inside one resource via `sourcePath`) — the items come from the shared `resolveRepeaterItems`,\n * and one field of each record (`imageField`) is the URL.\n *\n * `resolveGalleryUrls` is the SINGLE place both the builder canvas and the SSR/runtime engine turn a\n * node's config into the final `string[]` the crossfade loop consumes — so both sides show the same\n * images. It is pure and transport-agnostic; never fork it. It reuses `getByPath` (the same path\n * reader used by data-source resolving) so binding paths behave identically everywhere.\n */\nimport { getByPath } from '@vectoriox/iox-ui/data-core';\n\n/** One manual gallery entry. Exactly one of `url` / `binding` is the source; `binding` wins when set. */\nexport interface GalleryImage {\n /** Manual URL or filebox-picked media URL. Ignored when `binding` is set. */\n url?: string;\n /** Per-item binding path, resolved against the render context (e.g. `product.hero.url`). */\n binding?: string;\n /** Optional alt text. */\n alt?: string;\n}\n\n/** Bound-mode input: the resolved records + which field of each record holds the image URL. */\nexport interface GalleryBoundSource {\n items: any[];\n /** Path into each record for the URL. Empty/undefined → the record itself is treated as the URL. */\n imageField?: string;\n}\n\n/**\n * Resolve a gallery's configured images to the flat, display-ready `string[]` the loop renders.\n * Pure. Empty/whitespace URLs are dropped so a half-filled manual list never yields blank frames.\n *\n * @param images manual `GalleryImage[]` (manual mode). Ignored when `bound` is provided.\n * @param bound bound-mode records + image field. When present, takes precedence over `images`.\n * @param ctx render context for per-item bindings (item/route data). Defaults to `{}`.\n */\nexport function resolveGalleryUrls(\n images: readonly (GalleryImage | string)[] | undefined,\n bound: GalleryBoundSource | null | undefined,\n ctx: Record<string, any> = {},\n): string[] {\n if (bound) {\n const field = bound.imageField;\n return (bound.items ?? [])\n .map(item => (field ? getByPath(item, field) : item))\n .map(coerceUrl)\n .filter((u): u is string => !!u);\n }\n return (images ?? [])\n .map(normalizeGalleryImage)\n .map(img => (img?.binding ? getByPath(ctx, img.binding) : img?.url))\n .map(coerceUrl)\n .filter((u): u is string => !!u);\n}\n\n/**\n * A plain string is a valid entry — a pasted URL list, an older saved node, or a bound field that\n * yielded a URL directly. Accepting it HERE (not in one consumer) is what keeps the two render paths\n * honest: `ClientGalleryComponent` used to normalise privately, so the engine's string-renderer\n * fallback — which calls this function directly — silently dropped every string-shaped image and\n * rendered an empty gallery. One resolver, one answer. See gallery-component-plan.md.\n */\nexport function normalizeGalleryImage(image: GalleryImage | string | null | undefined): GalleryImage | undefined {\n if (typeof image === 'string') return { url: image };\n return image ?? undefined;\n}\n\n/** A resolved value becomes a URL only if it's a non-empty string; everything else drops out. */\nfunction coerceUrl(value: any): string | null {\n if (typeof value !== 'string') return null;\n const trimmed = value.trim();\n return trimmed ? trimmed : null;\n}\n\n/**\n * Parse a pasted block of URLs (newline- and/or comma-separated) into `GalleryImage[]`. Used by the\n * MediaList trait editor's \"paste URL list\" affordance. Pure so it can be unit-tested + reused.\n */\nexport function parseUrlList(text: string): GalleryImage[] {\n if (!text) return [];\n return text\n .split(/[\\n,]+/)\n .map(s => s.trim())\n .filter(Boolean)\n .map(url => ({ url }));\n}\n","/**\n * Gallery effect registry — the SHARED, effect-agnostic description of how each gallery slide looks\n * and animates in a given crossfade state. Modeled on `binding-pipes.ts` / `PAGE_TRANSITION_PRESETS`:\n * a descriptor map + a resolve fn, all pure, consumed by BOTH the builder twin and the engine twin so\n * the fade looks identical on the canvas and the live site.\n *\n * v1 ships only `fade` (the look ported from `sites/interior-design` fade-gallery). Adding `slide`,\n * `zoom`, `kenburns`, … later is a new entry here + its CSS — NO component refactor, because the\n * component only ever asks `resolveGalleryEffect(id).buildSlideStyle(state)` for per-slide inline CSS.\n *\n * See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n */\n\n/** Timing knobs for one running gallery. Overridable per-node via traits; defaults live per effect. */\nexport interface GalleryDurations {\n /** ms an image is held fully visible before the next crossfade begins. */\n showMs: number;\n /** ms the opacity crossfade takes. */\n fadeMs: number;\n}\n\n/** The state of a single slide at render time, from which an effect derives its inline CSS. */\nexport interface GallerySlideState {\n /** This slide is the current (incoming/visible) one. */\n active: boolean;\n /** This slide is the outgoing one, mid-crossfade. */\n fadingOut: boolean;\n /** The loop has completed its first activation RAF (used to suppress the initial transition flash). */\n firstCycleActive: boolean;\n durations: GalleryDurations;\n}\n\nexport interface GalleryEffect {\n id: string;\n /** Default English label; consumers may map `id` to their own i18n key. */\n label: string;\n /** Default timing for this effect; a node's traits may override either value. */\n defaults: GalleryDurations;\n /** Inline style map for one slide in the given state. Pure — no DOM, no side effects. */\n buildSlideStyle(state: GallerySlideState): Record<string, string>;\n}\n\n/** The ken-burns zoom baked into the reference fade look (scale 1 → 1.05 over show+fade). */\nconst FADE_ZOOM_EXTRA_MS = 1000;\n\nconst fadeEffect: GalleryEffect = {\n id: 'fade',\n label: 'Fade',\n defaults: { showMs: 4000, fadeMs: 1000 },\n buildSlideStyle(state: GallerySlideState): Record<string, string> {\n const { active, fadingOut, firstCycleActive, durations } = state;\n const zoomMs = durations.showMs + durations.fadeMs + FADE_ZOOM_EXTRA_MS;\n // Before the first cycle activates, everything is flat + instant so there is no entry flash.\n if (!firstCycleActive) {\n return { opacity: '0', transform: 'scale(1)', transition: 'opacity 0ms, transform 0ms' };\n }\n const visible = active && !fadingOut;\n const engaged = active || fadingOut; // current or outgoing slide is zoomed-in\n return {\n opacity: visible ? '1' : '0',\n transform: engaged ? 'scale(1.05)' : 'scale(1)',\n transition:\n `opacity ${durations.fadeMs}ms cubic-bezier(0.77, 0, 0.175, 1), ` +\n `transform ${zoomMs}ms linear`,\n };\n },\n};\n\n/** The registry — one entry per effect. Keyed by id; unknown ids fall back to `fade`. */\nexport const GALLERY_EFFECTS: Record<string, GalleryEffect> = {\n fade: fadeEffect,\n};\n\n/** Resolve an effect id to its descriptor, defaulting to `fade` (forward-compatible with new ids). */\nexport function resolveGalleryEffect(id: string | undefined | null): GalleryEffect {\n return (id && GALLERY_EFFECTS[id]) || GALLERY_EFFECTS['fade'];\n}\n\n/** Metadata that DATA-DRIVES the authoring UI's effect dropdown (no per-effect if-chains). */\nexport interface GalleryEffectDescriptor {\n id: string;\n label: string;\n}\n\nexport const GALLERY_EFFECT_DESCRIPTORS: GalleryEffectDescriptor[] = Object.values(GALLERY_EFFECTS).map(\n e => ({ id: e.id, label: e.label }),\n);\n","/**\n * Gallery crossfade loop — the SHARED, framework-free state machine that drives which image is\n * visible over time. Ported from the reference fade-gallery's `scheduleCycle` / `tryStartLoop` /\n * first-cycle-activation logic, with Angular specifics removed so BOTH the builder twin and the\n * engine/runtime twin (`iox-gallery`) run ONE implementation — never a forked copy that drifts.\n *\n * The loop owns only *timing + index* state and emits it through `onChange`; the component maps that\n * state to CSS via the effect registry (`gallery-effects.ts`). Timers are injected so the loop is\n * deterministic under fake timers in tests and platform-guardable in the engine.\n *\n * See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n */\n\n/** The observable state of a running loop. */\nexport interface GalleryLoopState {\n /** Index of the current (incoming/visible) image. */\n currentIndex: number;\n /** Index of the outgoing image mid-crossfade, or null when settled. */\n fadingOutIndex: number | null;\n /**\n * True once the loop has completed its initial activation tick. Slides render flat + instant until\n * this flips, so the first paint doesn't flash a transition (matches the reference gallery).\n */\n firstCycleActive: boolean;\n}\n\n/** Injectable timer surface — real timers in production, fake in tests, no-op RAF on the server. */\nexport interface GalleryLoopScheduler {\n setTimer(fn: () => void, ms: number): any;\n clearTimer(handle: any): void;\n /** Schedule a callback for \"next frame\". The engine/tests may implement this as a microtask/timeout. */\n nextFrame(fn: () => void): any;\n cancelFrame(handle: any): void;\n}\n\n/** Default scheduler over the platform's `setTimeout` / `requestAnimationFrame` (with a timer fallback). */\nexport const DEFAULT_GALLERY_SCHEDULER: GalleryLoopScheduler = {\n setTimer: (fn, ms) => setTimeout(fn, ms),\n clearTimer: h => clearTimeout(h),\n nextFrame: fn =>\n typeof requestAnimationFrame === 'function' ? requestAnimationFrame(fn) : setTimeout(fn, 16),\n cancelFrame: h => {\n if (typeof cancelAnimationFrame === 'function') cancelAnimationFrame(h);\n else clearTimeout(h);\n },\n};\n\nexport interface GalleryLoopOptions {\n showMs: number;\n fadeMs: number;\n onChange: (state: GalleryLoopState) => void;\n scheduler?: GalleryLoopScheduler;\n /**\n * False under reduced motion (`motionAllowed()`, CC1 R1): the loop shows the first image and never\n * advances. Default true. The pause control for a moving gallery is CC3 (WCAG 2.2.2).\n */\n motionAllowed?: boolean;\n}\n\nexport class GalleryLoop {\n private readonly scheduler: GalleryLoopScheduler;\n private showMs: number;\n private fadeMs: number;\n private readonly onChange: (state: GalleryLoopState) => void;\n private readonly motionAllowed: boolean;\n\n private count = 0;\n private currentIndex = 0;\n private fadingOutIndex: number | null = null;\n private firstCycleActive = false;\n\n private cycleTimer: any = null;\n private fadeTimer: any = null;\n private frameHandle: any = null;\n /** Bumped on every (re)start so a stale timer callback from a previous run is ignored. */\n private runToken = 0;\n private running = false;\n\n constructor(opts: GalleryLoopOptions) {\n this.scheduler = opts.scheduler ?? DEFAULT_GALLERY_SCHEDULER;\n this.showMs = opts.showMs;\n this.fadeMs = opts.fadeMs;\n this.onChange = opts.onChange;\n this.motionAllowed = opts.motionAllowed !== false;\n }\n\n get state(): GalleryLoopState {\n return {\n currentIndex: this.currentIndex,\n fadingOutIndex: this.fadingOutIndex,\n firstCycleActive: this.firstCycleActive,\n };\n }\n\n /** Start (or restart) the loop for `count` images. A count < 2 shows the single image without cycling. */\n start(count: number): void {\n this.stop();\n this.count = Math.max(0, count | 0);\n this.currentIndex = 0;\n this.fadingOutIndex = null;\n this.firstCycleActive = false;\n if (this.count === 0) {\n this.emit();\n return;\n }\n this.running = true;\n const token = ++this.runToken;\n // Activate on the next frame so the first paint is flat (no entry-transition flash), then\n // begin cycling only when there is more than one image to advance through.\n this.frameHandle = this.scheduler.nextFrame(() => {\n if (token !== this.runToken || !this.running) return;\n this.firstCycleActive = true;\n this.emit();\n if (this.count > 1 && this.motionAllowed) this.scheduleCycle(token);\n });\n }\n\n /** Update timing live. Takes effect on the next scheduled cycle; does not restart the loop. */\n setDurations(showMs: number, fadeMs: number): void {\n this.showMs = showMs;\n this.fadeMs = fadeMs;\n }\n\n /** Stop and clear all timers. Idempotent. State is retained (call `start` to reset). */\n stop(): void {\n this.running = false;\n this.runToken++;\n if (this.cycleTimer != null) { this.scheduler.clearTimer(this.cycleTimer); this.cycleTimer = null; }\n if (this.fadeTimer != null) { this.scheduler.clearTimer(this.fadeTimer); this.fadeTimer = null; }\n if (this.frameHandle != null) { this.scheduler.cancelFrame(this.frameHandle); this.frameHandle = null; }\n }\n\n private scheduleCycle(token: number): void {\n if (token !== this.runToken || !this.running || this.count < 2) return;\n this.cycleTimer = this.scheduler.setTimer(() => {\n if (token !== this.runToken || !this.running) return;\n this.fadingOutIndex = this.currentIndex;\n this.currentIndex = (this.currentIndex + 1) % this.count;\n this.emit();\n this.fadeTimer = this.scheduler.setTimer(() => {\n if (token !== this.runToken || !this.running) return;\n this.fadingOutIndex = null;\n this.emit();\n this.scheduleCycle(token);\n }, this.fadeMs);\n }, this.showMs);\n }\n\n private emit(): void {\n this.onChange(this.state);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { GalleryImage, resolveGalleryUrls } from './gallery.model';\nimport { resolveGalleryEffect } from './gallery-effects';\nimport { GalleryLoop } from './gallery-loop';\nimport { motionAllowed } from '../../motion/motion';\n\n/**\n * `iox-gallery` — the engine/runtime twin of the Gallery builder component (the builder twin\n * `app-builder-gallery` arrives in Phase 2). It runs the SHARED crossfade loop + effect registry from\n * `@vectoriox/iox-ui`, so the fade behaves identically on the canvas and the live site — no forked\n * animation logic. See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n *\n * Population: v1 drives the loop from the `images` input (manual mode). Data-source binding\n * (`source`/`sourcePath`) is Phase 3 — this component already resolves through `resolveGalleryUrls`,\n * so that only adds a bound-source input, not new render logic.\n *\n * SSR / no-JS: on the server the loop never starts, so the **first image renders visible** as a static\n * frame (SEO + no-JS baseline). In the browser `ngAfterViewInit` starts the loop, which begins on the\n * same index 0 — so the static frame and the first live frame match and there is no hydration flash.\n */\n@Component({\n selector: 'iox-gallery',\n // `data-iox-empty` while there is nothing to show — the shared `iox-design.css` fills a MARKED\n // empty gallery with `surface-2` (DS3); an unmarked one matches no rule and renders as before.\n host: { '[attr.data-iox-empty]': \"urls.length ? null : ''\" },\n template: `\n <div class=\"iox-gallery\" [class]=\"'iox-node-' + nodeId\">\n <div *ngFor=\"let url of urls; index as i\"\n class=\"iox-gallery__img\"\n [style.background-image]=\"'url(' + url + ')'\"\n [ngStyle]=\"slideStyle(i)\"></div>\n <div class=\"iox-gallery__overlay\"></div>\n </div>\n `,\n styles: [`\n :host { display: block; }\n /* Size (width/height/aspect-ratio) comes from the style engine's .iox-node-{id} rule — do NOT\n force width/height here. A scoped rule gets an encapsulation-attribute selector (higher\n specificity) and would beat the node's own height, collapsing the absolutely-positioned\n image layers to 0. See gallery-component-plan.md. */\n .iox-gallery {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n }\n /* Each image is a stacked, absolutely-positioned layer; the per-slide opacity / transform /\n transition come from the effect registry via [ngStyle], not from here. The fade look's\n feather mask + brightness + cinematic overlay live in the effect's visual language and are\n applied as base layer styles. */\n .iox-gallery__img {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n pointer-events: none;\n opacity: 0;\n filter: brightness(1.35);\n -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.1) 95%, rgba(0,0,0,0) 100%);\n mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.1) 95%, rgba(0,0,0,0) 100%);\n }\n .iox-gallery__overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 3;\n /* The fade's mask, brightness and cinematic overlay are FUNCTIONAL (they make the\n crossfade read), not a themeable look: literals, mirrored by the engine's string\n fallback. The contract defines no token for them. */\n background: linear-gradient(to bottom,\n rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 20%,\n rgba(0,0,0,0.15) 80%, rgba(0,0,0,0.5) 100%);\n }\n `],\n standalone: false,\n})\nexport class ClientGalleryComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n @Input() effect = 'fade';\n @Input() autoStart = true;\n /** Layout mode — only `'stack'` is rendered in v1 (`'grid'` scaffolded for later). */\n @Input() layout: 'stack' | 'grid' = 'stack';\n\n // ── Inputs that mutate live state use SETTERS, not ngOnChanges ──────────────────────────────\n // The builder trait panel pushes edits via DIRECT property assignment (`instance.images = v`),\n // which does NOT trigger ngOnChanges — so a gallery that recomputed in ngOnChanges never refreshed\n // when you added an image on the canvas. A setter fires on BOTH direct assignment (builder panel)\n // and setInput (SSR engine / render.directive), so it's the one path that works everywhere.\n\n private _images: (GalleryImage | string)[] = [];\n /** Manual images — `GalleryImage[]` or a plain `string[]` of URLs (normalised on set). */\n @Input() set images(v: (GalleryImage | string)[]) {\n this._images = v ?? [];\n this.urls = resolveGalleryUrls(this._images, null);\n // A live edit (image added/removed/reordered) while the loop runs → restart on the new set so\n // the canvas reflects it and the loop cycles through the new count.\n if (this.loopActive) this.startLoop();\n }\n get images(): (GalleryImage | string)[] { return this._images; }\n\n private _showDuration = 4000;\n @Input() set showDuration(v: number) { this._showDuration = v; this.loop?.setDurations(v, this._fadeDuration); }\n get showDuration(): number { return this._showDuration; }\n\n private _fadeDuration = 1000;\n @Input() set fadeDuration(v: number) { this._fadeDuration = v; this.loop?.setDurations(this._showDuration, v); }\n get fadeDuration(): number { return this._fadeDuration; }\n\n /** The flat, display-ready URLs the loop cycles. Recomputed whenever `images` is set. */\n urls: string[] = [];\n\n private currentIndex = 0;\n private fadingOutIndex: number | null = null;\n private started = false;\n /** True once the loop has been started (in ngAfterViewInit) — gates the setter-driven restart. */\n private loopActive = false;\n\n private loop: GalleryLoop | null = null;\n private readonly isBrowser: boolean;\n\n constructor(\n @Inject(PLATFORM_ID) platformId: object,\n private cdr: ChangeDetectorRef,\n ) {\n this.isBrowser = isPlatformBrowser(platformId);\n }\n\n ngAfterViewInit(): void {\n if (this.isBrowser && this.autoStart) {\n this.startLoop();\n }\n }\n\n ngOnDestroy(): void {\n this.loop?.stop();\n this.loop = null;\n this.loopActive = false;\n }\n\n /** Per-slide inline style. Before the loop activates (server + no-JS + pre-first-frame) the first\n * image is the visible static frame; once running, the effect owns each slide's look. */\n slideStyle(i: number): Record<string, string> {\n if (!this.started) {\n return i === 0\n ? { opacity: '1', transform: 'scale(1)', transition: 'none' }\n : { opacity: '0', transform: 'scale(1)', transition: 'none' };\n }\n return resolveGalleryEffect(this.effect).buildSlideStyle({\n active: i === this.currentIndex,\n fadingOut: i === this.fadingOutIndex,\n firstCycleActive: true,\n durations: { showMs: this.showDuration, fadeMs: this.fadeDuration },\n });\n }\n\n private startLoop(): void {\n if (!this.isBrowser) return;\n this.loopActive = true;\n this.loop?.stop();\n this.loop = new GalleryLoop({\n showMs: this.showDuration,\n fadeMs: this.fadeDuration,\n // Reduced motion (CC1 R1): the first image, standing still.\n motionAllowed: motionAllowed(),\n onChange: state => {\n this.currentIndex = state.currentIndex;\n this.fadingOutIndex = state.fadingOutIndex;\n this.started = state.firstCycleActive;\n this.cdr.markForCheck();\n },\n });\n this.loop.start(this.urls.length);\n }\n\n}\n","// The persisted shape of a form. Pure types + the one derived constant each renderer needs.\n//\n// A FormSpec is DERIVED from the node tree (see `collect.ts`), never hand-maintained beside it —\n// there is one source of truth for \"what fields does this form have\", and it is the tree the author\n// edited. The builder writes the derived spec into the saved page so the SERVER can re-validate\n// against it without re-implementing the builder's tree walk.\n\n/** What the visitor actually types into. Chosen by a trait; it also implies a validation rule. */\nexport enum ControlType {\n Text = 'text',\n Email = 'email',\n Tel = 'tel',\n Url = 'url',\n Number = 'number',\n Password = 'password',\n Textarea = 'textarea',\n Select = 'select',\n Checkbox = 'checkbox',\n /** A checkbox in switch clothing (role=\"switch\") — consent toggles, settings-style forms. */\n Switch = 'switch',\n /** A slider over a numeric range — min/max/step ride the field. */\n Range = 'range',\n Radio = 'radio',\n /** One or several of a few visible choices — chips (the default) or a list of radios / checkboxes (premium N1).\n * Its `multiple` trait picks the value's shape: a string, or a list of strings. */\n Choices = 'choices',\n /** A date the visitor picks from the look's calendar (premium N8) — a button that reads the date in words and a\n * hidden input carrying the ISO `YYYY-MM-DD` value. Never the browser's own date box. */\n Date = 'date',\n Time = 'time',\n File = 'file',\n /** Not shown; carries a constant or a bound value (campaign, source page, …). */\n Hidden = 'hidden',\n}\n\n/** The v1 rule grammar. Phase 3's conditional logic reuses these same names for its conditions. */\nexport enum RuleName {\n Required = 'required',\n MinLength = 'minLength',\n MaxLength = 'maxLength',\n Min = 'min',\n Max = 'max',\n Pattern = 'pattern',\n /** Cross-field: this value must equal another field's (confirm email / password). */\n Matches = 'matches',\n /** A checkbox that must be ticked — terms, consent. */\n Accepted = 'accepted',\n FileType = 'fileType',\n FileSize = 'fileSize',\n /** IMPLIED, never authored: an answer of a Choices / Radio / Dropdown must be one of the field's own options\n * (premium N1) — a hand-crafted POST cannot file a value the form never offered. */\n OneOf = 'oneOf',\n /** IMPLIED, never authored: a Date's answer is a real `YYYY-MM-DD` day (premium N8). */\n ValidDate = 'validDate',\n}\n\n/** How a Choices field draws its options (premium N1). */\nexport enum ChoiceAppearance {\n /** Each option a chip — the label is the chip; the native input inside it is visually hidden. */\n Chips = 'chips',\n /** The options as rows of the look's own radio / checkbox (DS9.1). */\n List = 'list',\n}\n\n/** Named regexes so an author picks \"Email\" rather than writing one. */\nexport enum PatternPreset {\n Email = 'email',\n Phone = 'phone',\n Url = 'url',\n Digits = 'digits',\n Letters = 'letters',\n Slug = 'slug',\n}\n\n/**\n * Deliberately permissive. A validator that rejects `user+tag@sub.domain.co.uk` or a real-world\n * phone number is worse than one that lets a typo through: the address gets verified by sending to\n * it, and a false rejection is a lost lead with no recourse.\n */\nexport const PATTERN_PRESETS: Readonly<Record<PatternPreset, RegExp>> = Object.freeze({\n [PatternPreset.Email]: /^[^\\s@]+@[^\\s@.]+(\\.[^\\s@.]+)+$/,\n [PatternPreset.Phone]: /^\\+?[\\d\\s().-]{6,20}$/,\n [PatternPreset.Url]: /^(https?:\\/\\/)?[^\\s.]+\\.[^\\s]{2,}$/i,\n [PatternPreset.Digits]: /^\\d+$/,\n [PatternPreset.Letters]: /^[\\p{L}\\s'-]+$/u,\n [PatternPreset.Slug]: /^[a-z0-9]+(-[a-z0-9]+)*$/,\n});\n\nexport interface ValidationRule {\n name: RuleName;\n /** `{ n }` for lengths/bounds · `{ preset } | { regex }` for pattern · `{ field }` for matches. */\n params?: Record<string, any>;\n /** Author's override. Absent → the shared message catalog supplies a translated key. */\n message?: string;\n}\n\nexport interface FieldOption {\n label: string;\n value: string;\n}\n\n/** Options pulled from a data source instead of typed by hand (a Select of CMS categories). */\nexport interface FieldOptionSource {\n source: string;\n sourcePath?: string;\n valuePath: string;\n labelPath: string;\n}\n\nexport interface FieldSpec {\n /** The submitted key. Derived from the label, unique within the form, editable. */\n name: string;\n control: ControlType;\n label: string;\n /** Surfaced as its own switch in the panel rather than buried in the rule list. */\n required?: boolean;\n rules?: ValidationRule[];\n options?: FieldOption[];\n optionsSource?: FieldOptionSource;\n defaultValue?: any;\n /** A Choices field that takes several answers: its value is a list (premium N1). */\n multiple?: boolean;\n}\n\n/** When a field is validated, once the author has stopped deciding it per field. */\nexport enum FeedbackTiming {\n /** Validate on submit, then live per-field once that field has been touched or has failed. */\n Smart = 'smart',\n Submit = 'submit',\n Live = 'live',\n}\n\n/** What happens to a submission, in order. Card #1 (`store`) is always present. */\nexport interface SubmitAction {\n type: string;\n config?: Record<string, any>;\n /** `retry` (default) · `fail` · `ignore`. */\n onFailure?: 'retry' | 'fail' | 'ignore';\n}\n\nexport interface FormSpec {\n formId: string;\n /** Author-facing name — the submissions inbox groups by it. */\n name: string;\n feedback: FeedbackTiming;\n fields: FieldSpec[];\n actions: SubmitAction[];\n antiSpam: { honeypot: boolean; minFillMs: number; turnstile?: boolean };\n retention?: { days: number };\n}\n\n/**\n * The rule a control type implies with no configuration. Choosing \"Email\" IS choosing email\n * validation — the single biggest reason the panel can stay empty and still validate well.\n */\nexport const IMPLIED_PATTERN: Readonly<Partial<Record<ControlType, PatternPreset>>> = Object.freeze({\n [ControlType.Email]: PatternPreset.Email,\n [ControlType.Tel]: PatternPreset.Phone,\n [ControlType.Url]: PatternPreset.Url,\n});\n\n/**\n * Whether this field's answer is a LIST rather than one value — a file list, or a Choices field that takes several\n * (premium N1). Per FIELD, not per control: the same Choices control is single or multiple by its `multiple` trait.\n * ONE reading for collect, validate, the runtimes' transport and the server (replaced the control-only\n * `MULTI_VALUE_CONTROLS`, which nothing read).\n */\nexport function isMultiValueField(field: Pick<FieldSpec, 'control' | 'multiple'> | null | undefined): boolean {\n if (!field) return false;\n if (field.control === ControlType.File) return true;\n return field.control === ControlType.Choices && field.multiple === true;\n}\n\n/** The controls whose answers must be one of the field's own options (the implied `oneOf` rule). */\nexport const OPTION_CONTROLS: ReadonlySet<ControlType> = new Set([ControlType.Choices, ControlType.Radio, ControlType.Select]);\n","// The default message for every rule, as an i18n KEY — never a rendered string.\n//\n// This is what lets the Validation panel stay empty and still produce good errors: an author who\n// configures nothing gets \"Enter a valid email address\", not \"Invalid\". The author's own `message`\n// on a rule always wins; this is the fallback, and it is the only place a default lives.\n//\n// Consumers translate the key with their own i18n (the CMS client via ngx-translate, the engine via\n// the page's locale bundle). The backend returns the key too, so a server-side rejection renders in\n// the visitor's language rather than in the server's.\n\nimport { RuleName } from './form.model';\n\n/** Namespace for every forms validation key. Keep in sync with `en.json` / `he.json`. */\nexport const MESSAGE_NAMESPACE = 'forms.validation';\n\n/**\n * Rule → i18n key. Params travel beside the key (`{ n: 8 }`, `{ field: 'Email' }`) so a translation\n * can place the number wherever its grammar needs it, rather than having it baked into the string.\n */\nexport const RULE_MESSAGE_KEYS: Readonly<Record<RuleName, string>> = Object.freeze({\n [RuleName.Required]: `${MESSAGE_NAMESPACE}.required`,\n [RuleName.MinLength]: `${MESSAGE_NAMESPACE}.minLength`,\n [RuleName.MaxLength]: `${MESSAGE_NAMESPACE}.maxLength`,\n [RuleName.Min]: `${MESSAGE_NAMESPACE}.min`,\n [RuleName.Max]: `${MESSAGE_NAMESPACE}.max`,\n // ⚠️ `.pattern.generic`, not `.pattern`: the preset keys below live UNDER `pattern`, and a JSON\n // translation bundle cannot have the same key be both a string and an object — ngx-translate\n // would hand back the object (or the raw key) for the generic case.\n [RuleName.Pattern]: `${MESSAGE_NAMESPACE}.pattern.generic`,\n [RuleName.Matches]: `${MESSAGE_NAMESPACE}.matches`,\n [RuleName.Accepted]: `${MESSAGE_NAMESPACE}.accepted`,\n [RuleName.FileType]: `${MESSAGE_NAMESPACE}.fileType`,\n [RuleName.FileSize]: `${MESSAGE_NAMESPACE}.fileSize`,\n [RuleName.OneOf]: `${MESSAGE_NAMESPACE}.oneOf`,\n [RuleName.ValidDate]: `${MESSAGE_NAMESPACE}.validDate`,\n});\n\n/**\n * What \"required\" says on a field you CHOOSE rather than type into (premium N1 / N8): \"Choose an option\", \"Choose at\n * least one\", \"Choose a date\" — never \"This field is required\" beside a row of chips.\n */\nexport const CHOICE_MESSAGE_KEYS = Object.freeze({\n One: `${MESSAGE_NAMESPACE}.choose`,\n Some: `${MESSAGE_NAMESPACE}.chooseSome`,\n Date: `${MESSAGE_NAMESPACE}.chooseDate`,\n});\n\n/** A Date outside its Earliest / Latest. The calendar refuses those days, so this is a stale page or a hand POST. */\nexport const DATE_MESSAGE_KEYS = Object.freeze({\n Min: `${MESSAGE_NAMESPACE}.dateMin`,\n Max: `${MESSAGE_NAMESPACE}.dateMax`,\n});\n\n/** The submit button's own words (premium N2): what it says once its form has sent, when the author wrote none. */\nexport const SUBMIT_MESSAGE_KEYS = Object.freeze({\n Sent: 'forms.submit.sent',\n});\n\n/**\n * A pattern failure deserves better than \"Invalid format\". Each preset gets its own key so the\n * message can say what a valid value looks like, which is the difference between a visitor fixing\n * a typo and a visitor giving up.\n */\nexport const PATTERN_MESSAGE_KEYS: Readonly<Record<string, string>> = Object.freeze({\n email: `${MESSAGE_NAMESPACE}.pattern.email`,\n phone: `${MESSAGE_NAMESPACE}.pattern.phone`,\n url: `${MESSAGE_NAMESPACE}.pattern.url`,\n digits: `${MESSAGE_NAMESPACE}.pattern.digits`,\n letters: `${MESSAGE_NAMESPACE}.pattern.letters`,\n slug: `${MESSAGE_NAMESPACE}.pattern.slug`,\n});\n\n/** Form-level outcomes the visitor sees in the Error state. One designed block, five reasons. */\nexport const FORM_ERROR_KEYS = Object.freeze({\n Network: `${MESSAGE_NAMESPACE}.form.network`,\n Rejected: `${MESSAGE_NAMESPACE}.form.rejected`,\n Spam: `${MESSAGE_NAMESPACE}.form.spam`,\n RateLimited: `${MESSAGE_NAMESPACE}.form.rateLimited`,\n Server: `${MESSAGE_NAMESPACE}.form.server`,\n});\n\n/** The English defaults, so a consumer that has not added the keys yet still shows real text. */\nexport const DEFAULT_EN_MESSAGES: Readonly<Record<string, string>> = Object.freeze({\n [RULE_MESSAGE_KEYS[RuleName.Required]]: 'This field is required',\n [RULE_MESSAGE_KEYS[RuleName.MinLength]]: 'Use at least {{n}} characters',\n [RULE_MESSAGE_KEYS[RuleName.MaxLength]]: 'Use no more than {{n}} characters',\n [RULE_MESSAGE_KEYS[RuleName.Min]]: 'Enter {{n}} or more',\n [RULE_MESSAGE_KEYS[RuleName.Max]]: 'Enter {{n}} or less',\n [RULE_MESSAGE_KEYS[RuleName.Pattern]]: 'Check the format of this value',\n [RULE_MESSAGE_KEYS[RuleName.Matches]]: 'This must match {{field}}',\n [RULE_MESSAGE_KEYS[RuleName.Accepted]]: 'Please tick this to continue',\n [RULE_MESSAGE_KEYS[RuleName.FileType]]: 'That file type isn’t accepted',\n [RULE_MESSAGE_KEYS[RuleName.FileSize]]: 'That file is larger than {{n}}MB',\n [PATTERN_MESSAGE_KEYS['email']]: 'Enter a valid email address',\n [PATTERN_MESSAGE_KEYS['phone']]: 'Enter a valid phone number',\n [PATTERN_MESSAGE_KEYS['url']]: 'Enter a valid web address',\n [PATTERN_MESSAGE_KEYS['digits']]: 'Use digits only',\n [PATTERN_MESSAGE_KEYS['letters']]: 'Use letters only',\n [PATTERN_MESSAGE_KEYS['slug']]: 'Use lowercase letters, numbers and hyphens',\n [FORM_ERROR_KEYS.Network]: 'We couldn’t reach the server — check your connection and try again',\n [FORM_ERROR_KEYS.Rejected]: 'Some answers need fixing',\n [FORM_ERROR_KEYS.Spam]: 'We couldn’t accept this submission',\n [FORM_ERROR_KEYS.RateLimited]: 'Too many attempts — please wait a moment and try again',\n [FORM_ERROR_KEYS.Server]: 'Something went wrong on our side — your answers are still here',\n [RULE_MESSAGE_KEYS[RuleName.OneOf]]: 'Choose one of the options',\n [RULE_MESSAGE_KEYS[RuleName.ValidDate]]: 'Choose a date from the calendar',\n [CHOICE_MESSAGE_KEYS.One]: 'Choose an option',\n [CHOICE_MESSAGE_KEYS.Some]: 'Choose at least one',\n [CHOICE_MESSAGE_KEYS.Date]: 'Choose a date',\n [DATE_MESSAGE_KEYS.Min]: 'Choose a later date',\n [DATE_MESSAGE_KEYS.Max]: 'Choose an earlier date',\n [SUBMIT_MESSAGE_KEYS.Sent]: 'Sent',\n});\n","/**\n * DATES — the date picker's pure half (premium components N8) and the date rules' one reading.\n *\n * A Date field's value is an ISO day, `YYYY-MM-DD`, compared as a string (the format sorts as the calendar does).\n * Its `min` / `max` rules take an ISO day OR an offset in days from today (`{ offsetDays: 0 }` = today), so \"from\n * today on\" stays true tomorrow without a re-save. ONE reading for the validator (client AND iox-cms), the calendar\n * (which days it refuses) and the builder's Earliest / Latest controls.\n *\n * The calendar model (six rows of seven, roving focus, the APG keys) lives here too, so the DOM runtime only draws\n * what this decides — the canvas, the engine's component path and its string path draw the SAME month.\n *\n * ⚠️ Framework-free, like the rest of forms-core. Local-time `Date` objects are used only to walk the calendar; a\n * day leaves this file as an ISO string.\n */\n\nimport { ControlType, FieldSpec, RuleName, ValidationRule } from './form.model';\n\nconst ISO_DAY = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst OFFSET = /^[+-]?\\d+$/;\nconst DAYS_IN_WEEK = 7;\n/** Always six rows, so the panel never changes size between months (APG; Emil 74 — one object, one size). */\nexport const CALENDAR_ROWS = 6;\n\nconst pad = (n: number, width = 2) => String(n).padStart(width, '0');\n\n/** The ISO day of a local `Date`. */\nexport function isoOfDate(d: Date): string {\n return `${pad(d.getFullYear(), 4)}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\n/** A local `Date` at midnight for an ISO day, or null when it is not one (2026-02-30 is not). */\nexport function dateOfIso(iso: unknown): Date | null {\n const m = typeof iso === 'string' ? ISO_DAY.exec(iso.trim()) : null;\n if (!m) return null;\n const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];\n const date = new Date(y, mo - 1, d);\n date.setFullYear(y);\n return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;\n}\n\n/** True for a real calendar day written `YYYY-MM-DD`. */\nexport function isIsoDate(value: unknown): boolean {\n return dateOfIso(value) !== null;\n}\n\n/** Today, as the device that runs this sees it (the visitor's local day in a browser; the server's on iox-cms). */\nexport function todayIso(now: Date = new Date()): string {\n return isoOfDate(now);\n}\n\n/** `iso` moved by `days` (negative goes back). */\nexport function addDaysIso(iso: string, days: number): string {\n const d = dateOfIso(iso);\n if (!d) return iso;\n return isoOfDate(new Date(d.getFullYear(), d.getMonth(), d.getDate() + days));\n}\n\n/** `iso` moved by `months`, its day clamped to the target month's last (31 Jan + 1 month = 28/29 Feb). */\nexport function addMonthsIso(iso: string, months: number): string {\n const d = dateOfIso(iso);\n if (!d) return iso;\n const first = new Date(d.getFullYear(), d.getMonth() + months, 1);\n const last = new Date(first.getFullYear(), first.getMonth() + 1, 0).getDate();\n return isoOfDate(new Date(first.getFullYear(), first.getMonth(), Math.min(d.getDate(), last)));\n}\n\n/** `iso` held inside [min, max] (either may be absent). */\nexport function clampIso(iso: string, min?: string | null, max?: string | null): string {\n if (min && iso < min) return min;\n if (max && iso > max) return max;\n return iso;\n}\n\n// ─── bounds: Earliest / Latest ───────────────────────────────────────────────\n\n/** A date rule's parameter: an ISO day, or a number of days from today. */\nexport interface DateBoundParams {\n date?: string;\n offsetDays?: number;\n}\n\n/**\n * A Field's `earliest` / `latest` trait → the rule parameter. The trait is one string so the panel and a saved page\n * stay simple: `''` = any day · an integer = that many days from today (`'0'` = today, `'30'` = a month ahead) · an\n * ISO day. Anything else reads as no bound.\n */\nexport function parseDateBound(raw: unknown): DateBoundParams | null {\n if (typeof raw === 'number' && Number.isInteger(raw)) return { offsetDays: raw };\n if (typeof raw !== 'string') return null;\n const text = raw.trim();\n if (!text) return null;\n if (OFFSET.test(text)) return { offsetDays: Number(text) };\n return isIsoDate(text) ? { date: text } : null;\n}\n\n/** The `min` / `max` rules a Date field's Earliest / Latest traits give it (none for \"any\"). */\nexport function dateBoundRules(earliest: unknown, latest: unknown): ValidationRule[] {\n const rules: ValidationRule[] = [];\n const min = parseDateBound(earliest);\n const max = parseDateBound(latest);\n if (min) rules.push({ name: RuleName.Min, params: { ...min } });\n if (max) rules.push({ name: RuleName.Max, params: { ...max } });\n return rules;\n}\n\n/** True when a rule's params are a DATE bound (an ISO day or an offset), never a number bound. */\nexport function isDateBoundParams(params: Record<string, any> | null | undefined): boolean {\n return !!params && (typeof params['date'] === 'string' || Number.isInteger(params['offsetDays']));\n}\n\n/** The ISO day a bound names today, or null when it names none. */\nexport function resolveDateBound(params: Record<string, any> | null | undefined, today: string): string | null {\n if (!params) return null;\n if (typeof params['date'] === 'string' && isIsoDate(params['date'])) return params['date'];\n if (Number.isInteger(params['offsetDays'])) return addDaysIso(today, params['offsetDays']);\n return null;\n}\n\n/** The first and last day a Date field accepts today — the calendar's refused days and the validator's range. */\nexport function fieldDateRange(field: Pick<FieldSpec, 'rules'> | null | undefined, today: string): { min: string | null; max: string | null } {\n let min: string | null = null;\n let max: string | null = null;\n for (const rule of field?.rules ?? []) {\n if (rule.name === RuleName.Min) min = resolveDateBound(rule.params, today) ?? min;\n if (rule.name === RuleName.Max) max = resolveDateBound(rule.params, today) ?? max;\n }\n return { min, max };\n}\n\n/** True when the field is a date picker (the control that reads these rules as days). */\nexport function isDateField(field: Pick<FieldSpec, 'control'> | null | undefined): boolean {\n return field?.control === ControlType.Date;\n}\n\n// ─── the week, the month, the keys ───────────────────────────────────────────\n\n/** Regions whose week starts on Sunday when the runtime cannot say (Intl.Locale#getWeekInfo is not everywhere). */\nconst SUNDAY_REGIONS: ReadonlySet<string> = new Set(['US', 'CA', 'IL', 'JP', 'BR', 'MX', 'PH', 'IN', 'KR', 'TW', 'ZA', 'AU']);\nconst SUNDAY_LANGUAGES: ReadonlySet<string> = new Set(['he', 'iw', 'ja', 'ko']);\n\n/**\n * The first day of the week for a locale, 0 = Sunday … 6 = Saturday. `Intl.Locale(…).getWeekInfo()` (or the older\n * `weekInfo` getter) when the runtime has it, else a small region table; a bare `en` reads as the US.\n */\nexport function weekStartFor(locale: string | null | undefined): number {\n const tag = locale || 'en';\n try {\n const Ctor = (Intl as any).Locale;\n if (Ctor) {\n const loc = new Ctor(tag);\n const info = typeof loc.getWeekInfo === 'function' ? loc.getWeekInfo() : loc.weekInfo;\n const first = Number(info?.firstDay);\n if (first >= 1 && first <= 7) return first % DAYS_IN_WEEK;\n }\n } catch { /* an unknown tag falls through to the table */ }\n const [language, region] = tag.split(/[-_]/);\n if (region && SUNDAY_REGIONS.has(region.toUpperCase())) return 0;\n if (!region && (language === 'en' || SUNDAY_LANGUAGES.has(language))) return 0;\n return 1;\n}\n\n/** One cell of the month grid. */\nexport interface CalendarDay {\n iso: string;\n day: number;\n today: boolean;\n selected: boolean;\n /** Outside Earliest / Latest: shown, announced as unavailable, never picked. */\n disabled: boolean;\n /** The roving tab stop — exactly one day of the month has it. */\n focus: boolean;\n}\n\nexport interface CalendarMonth {\n year: number;\n /** 0-based, as `Date` counts. */\n month: number;\n /** `CALENDAR_ROWS` × 7; null where the month has no day. */\n weeks: Array<Array<CalendarDay | null>>;\n /** The weekday of each column, 0 = Sunday — the header row reads these. */\n weekdays: number[];\n canPrev: boolean;\n canNext: boolean;\n}\n\nexport interface CalendarOptions {\n weekStart: number;\n today: string;\n min?: string | null;\n max?: string | null;\n selected?: string | null;\n}\n\n/** The month `focus` sits in, as six rows of seven — the ONE grid every renderer draws. */\nexport function calendarMonth(focus: string, options: CalendarOptions): CalendarMonth {\n const at = dateOfIso(focus) ?? dateOfIso(options.today) ?? new Date();\n const year = at.getFullYear();\n const month = at.getMonth();\n const lead = (new Date(year, month, 1).getDay() - options.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const days = new Date(year, month + 1, 0).getDate();\n const weeks: Array<Array<CalendarDay | null>> = [];\n for (let r = 0; r < CALENDAR_ROWS; r++) {\n const row: Array<CalendarDay | null> = [];\n for (let c = 0; c < DAYS_IN_WEEK; c++) {\n const n = r * DAYS_IN_WEEK + c - lead + 1;\n if (n < 1 || n > days) { row.push(null); continue; }\n const iso = isoOfDate(new Date(year, month, n));\n row.push({\n iso, day: n,\n today: iso === options.today,\n selected: iso === options.selected,\n disabled: (!!options.min && iso < options.min) || (!!options.max && iso > options.max),\n focus: iso === focus,\n });\n }\n weeks.push(row);\n }\n const monthKey = (iso: string | null | undefined) => (iso ? iso.slice(0, 7) : null);\n const here = monthKey(isoOfDate(new Date(year, month, 1)))!;\n const minMonth = monthKey(options.min);\n const maxMonth = monthKey(options.max);\n return {\n year, month, weeks,\n weekdays: Array.from({ length: DAYS_IN_WEEK }, (_, i) => (options.weekStart + i) % DAYS_IN_WEEK),\n canPrev: !minMonth || here > minMonth,\n canNext: !maxMonth || here < maxMonth,\n };\n}\n\n/** The keys the grid answers (APG date picker dialog). */\nexport enum CalendarKey {\n Left = 'ArrowLeft',\n Right = 'ArrowRight',\n Up = 'ArrowUp',\n Down = 'ArrowDown',\n Home = 'Home',\n End = 'End',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n}\n\nconst KEY_MOVES: Readonly<Record<CalendarKey, (iso: string, ctx: { ahead: number; dow: number; shift: boolean }) => string>> = {\n // The arrows follow the READING direction: in RTL \"→\" is a day back (APG; mirrored).\n [CalendarKey.Right]: (iso, c) => addDaysIso(iso, c.ahead),\n [CalendarKey.Left]: (iso, c) => addDaysIso(iso, -c.ahead),\n [CalendarKey.Down]: iso => addDaysIso(iso, DAYS_IN_WEEK),\n [CalendarKey.Up]: iso => addDaysIso(iso, -DAYS_IN_WEEK),\n [CalendarKey.Home]: (iso, c) => addDaysIso(iso, -c.dow),\n [CalendarKey.End]: (iso, c) => addDaysIso(iso, DAYS_IN_WEEK - 1 - c.dow),\n // A month; with Shift, a year.\n [CalendarKey.PageUp]: (iso, c) => addMonthsIso(iso, c.shift ? -12 : -1),\n [CalendarKey.PageDown]: (iso, c) => addMonthsIso(iso, c.shift ? 12 : 1),\n};\n\n/**\n * Where a key moves the focused day, held inside [min, max] — or null for a key the grid does not answer (Enter,\n * Space and Escape are the runtime's: they pick or close, they never move).\n */\nexport function calendarKeyTarget(key: string, focus: string, options: { weekStart: number; rtl?: boolean; shift?: boolean; min?: string | null; max?: string | null }): string | null {\n const move = KEY_MOVES[key as CalendarKey];\n const at = dateOfIso(focus);\n if (!move || !at) return null;\n const dow = (at.getDay() - options.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n return clampIso(move(focus, { ahead: options.rtl ? -1 : 1, dow, shift: !!options.shift }), options.min, options.max);\n}\n\n// ─── words ───────────────────────────────────────────────────────────────────\n\n/** The date in words, in the site's language: \"Thu, 20 November\" — the year only when it is not this year's. */\nexport function formatDateInWords(iso: string, locale: string | null | undefined, today: string): string {\n const d = dateOfIso(iso);\n if (!d) return '';\n const sameYear = iso.slice(0, 4) === today.slice(0, 4);\n try {\n return new Intl.DateTimeFormat(locale || undefined, { weekday: 'short', day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }).format(d);\n } catch {\n return iso;\n }\n}\n\n/** The calendar's own words, by the site's language — the media-core `videoWords` precedent (a string-rendered\n * site has no translation service; the document's `lang` picks). */\nexport interface DatePickerWords {\n choose: string;\n previousMonth: string;\n nextMonth: string;\n close: string;\n}\n\nexport const DATE_PICKER_WORDS: Readonly<Record<'en' | 'he', DatePickerWords>> = Object.freeze({\n en: { choose: 'Choose a date', previousMonth: 'Previous month', nextMonth: 'Next month', close: 'Close' },\n he: { choose: 'בחרו תאריך', previousMonth: 'החודש הקודם', nextMonth: 'החודש הבא', close: 'סגירה' },\n});\n\n/** The words for a language tag (`he-IL` → Hebrew); English for anything else. */\nexport function datePickerWords(lang: string | null | undefined): DatePickerWords {\n const language = String(lang ?? '').toLowerCase().split(/[-_]/)[0];\n return language === 'he' || language === 'iw' ? DATE_PICKER_WORDS.he : DATE_PICKER_WORDS.en;\n}\n","// The validator. ONE implementation, run by the builder canvas, the SSR engine and `iox-cms`.\n//\n// Client-side validation is UX; server-side validation is truth. Because both call this function,\n// a visitor can never be told a value is fine and then have the server reject it, and a hand-crafted\n// POST can never bypass a rule the author configured.\n\nimport {\n ControlType,\n FieldSpec,\n FormSpec,\n IMPLIED_PATTERN,\n isMultiValueField,\n OPTION_CONTROLS,\n PATTERN_PRESETS,\n PatternPreset,\n RuleName,\n ValidationRule,\n} from './form.model';\nimport { addDaysIso, isDateBoundParams, isIsoDate, resolveDateBound, todayIso } from './dates';\nimport { CHOICE_MESSAGE_KEYS, DATE_MESSAGE_KEYS, PATTERN_MESSAGE_KEYS, RULE_MESSAGE_KEYS } from './messages';\n\nexport interface FieldError {\n /** i18n key, or the author's own override string when they set one. */\n messageKey: string;\n /** Interpolation values (`{ n: 8 }`, `{ field: 'Email' }`). */\n params?: Record<string, any>;\n}\n\nexport interface FieldResult extends Partial<FieldError> {\n valid: boolean;\n}\n\nexport interface FormResult {\n valid: boolean;\n /** Keyed by field name. Empty when valid. */\n errors: Record<string, FieldError>;\n}\n\n/**\n * When \"today\" is, for a Date's relative bounds (premium N8). A browser leaves it out: its own local day is the\n * visitor's. The SERVER passes `dateSlackDays: 1` — it cannot know the visitor's time zone, so a day either side of\n * its own today is still accepted.\n */\nexport interface ValidateOptions {\n today?: string;\n dateSlackDays?: number;\n}\n\n/** A file, as either runtime hands it over. Kept structural so this file imports no DOM types. */\ninterface FileLike {\n name?: string;\n size?: number;\n type?: string;\n}\n\n/**\n * Validate one field's value.\n *\n * Order is deliberate and is part of the contract:\n * 1. `required` (or `accepted` for a checkbox) — the only rules an EMPTY value can fail.\n * 2. Everything else, in the order the author arranged them, but ONLY for a non-empty value.\n *\n * That second point is what stops an optional \"Phone\" field from shouting \"enter a valid phone\n * number\" at someone who simply left it blank — the single most common validation-UX bug.\n * The FIRST failure wins: a visitor fixes one thing at a time.\n */\nexport function validateField(\n value: unknown,\n spec: FieldSpec,\n form: Record<string, unknown> = {},\n options: ValidateOptions = {},\n): FieldResult {\n const rules = effectiveRules(spec);\n const empty = isEmpty(value, spec.control);\n\n for (const rule of rules) {\n const appliesToEmpty = rule.name === RuleName.Required || rule.name === RuleName.Accepted;\n if (empty && !appliesToEmpty) continue;\n\n const failure = check(rule, value, spec, form, options);\n if (failure) {\n return {\n valid: false,\n messageKey: rule.message ?? failure.messageKey,\n params: failure.params,\n };\n }\n }\n return { valid: true };\n}\n\n/**\n * Validate a whole submission. Every field is checked (not short-circuited at the first bad one) so\n * the visitor sees every problem at once instead of fixing them one reload at a time.\n */\nexport function validateForm(\n values: Record<string, unknown>,\n spec: FormSpec,\n options: ValidateOptions = {},\n): FormResult {\n const errors: Record<string, FieldError> = {};\n for (const field of spec.fields ?? []) {\n const result = validateField(values?.[field.name], field, values ?? {}, options);\n if (!result.valid) {\n errors[field.name] = { messageKey: result.messageKey!, params: result.params };\n }\n }\n return { valid: Object.keys(errors).length === 0, errors };\n}\n\n/**\n * The answers in the shape each field takes (premium N1): a field that takes several answers gets a LIST (one answer\n * posted on its own is a list of one; nothing is an empty list). ONE reading for a host's transport and the server,\n * before validation — `isMultiValueField` decides. A single-answer field is left as posted: two answers to it is the\n * validator's to refuse, never quietly cut to one.\n */\nexport function normaliseAnswers(values: Record<string, unknown> | null | undefined, spec: Pick<FormSpec, 'fields'>): Record<string, unknown> {\n const out: Record<string, unknown> = { ...(values ?? {}) };\n for (const field of spec.fields ?? []) {\n if (!isMultiValueField(field) || field.control === ControlType.File) continue;\n if (!(field.name in out)) continue;\n out[field.name] = chosen(out[field.name]);\n }\n return out;\n}\n\n/** The name of the first field with an error, in spec order — what the browser should focus. */\nexport function firstInvalidField(spec: FormSpec, errors: Record<string, FieldError>): string | null {\n for (const field of spec.fields ?? []) if (errors[field.name]) return field.name;\n return null;\n}\n\n// ─── internals ───────────────────────────────────────────────────────────────\n\n/**\n * The author's rules, plus the ones the field's own configuration implies: `required` from the\n * switch (rather than making the author add a rule for the commonest case) and the pattern implied\n * by an Email/Tel/Url control. An explicitly declared rule of the same name always wins, so an\n * author who sets their own `pattern` on an Email field is not fighting an invisible second one.\n */\nfunction effectiveRules(spec: FieldSpec): ValidationRule[] {\n const declared = spec.rules ?? [];\n const has = (name: RuleName) => declared.some(r => r.name === name);\n const implied: ValidationRule[] = [];\n\n if (spec.required && !has(RuleName.Required)) {\n // A checkbox's \"required\" means TICKED, which is a different message and a different check.\n implied.push(spec.control === ControlType.Checkbox\n ? { name: RuleName.Accepted }\n : { name: RuleName.Required });\n }\n\n const preset = IMPLIED_PATTERN[spec.control];\n if (preset && !has(RuleName.Pattern)) {\n implied.push({ name: RuleName.Pattern, params: { preset } });\n }\n\n // An answer to a field of CHOICES must be one the form offered (premium N1) — only when the options are the\n // field's own: options from a data source are not known here, so they are not judged.\n if (OPTION_CONTROLS.has(spec.control) && !spec.optionsSource && (spec.options ?? []).length) {\n implied.push({ name: RuleName.OneOf });\n }\n // A Date's answer is a real day before any bound is asked about it (premium N8).\n if (spec.control === ControlType.Date) implied.push({ name: RuleName.ValidDate });\n\n return [...implied, ...declared];\n}\n\n/** \"Required\" in the words of the control: choose, not fill in. */\nfunction requiredMessageKey(spec: FieldSpec): string {\n if (spec.control === ControlType.Date) return CHOICE_MESSAGE_KEYS.Date;\n if (isMultiValueField(spec) && spec.control === ControlType.Choices) return CHOICE_MESSAGE_KEYS.Some;\n if (OPTION_CONTROLS.has(spec.control)) return CHOICE_MESSAGE_KEYS.One;\n return RULE_MESSAGE_KEYS[RuleName.Required];\n}\n\n/** The answers a field of choices gave, as a list — a single answer is a list of one, nothing is an empty list. */\nfunction chosen(value: unknown): unknown[] {\n if (Array.isArray(value)) return value;\n return value === null || value === undefined || value === '' ? [] : [value];\n}\n\n/** The `oneOf` verdict: every answer is one of the options, and a single-answer field got at most one. */\nfunction isOneOf(value: unknown, spec: FieldSpec): boolean {\n const offered = new Set((spec.options ?? []).map(o => String(o.value)));\n const answers = chosen(value);\n if (!isMultiValueField(spec) && answers.length > 1) return false;\n return answers.every(a => (typeof a === 'string' || typeof a === 'number') && offered.has(String(a)));\n}\n\n/** A Date bound, as a failure or null — the bound resolved against today, widened by the server's slack. */\nfunction dateBoundFailure(rule: ValidationRule, value: unknown, options: ValidateOptions): FieldError | null {\n const today = options.today ?? todayIso();\n const slack = Math.max(0, Math.trunc(options.dateSlackDays ?? 0));\n const bound = resolveDateBound(rule.params, today);\n if (!bound || !isIsoDate(value)) return null;\n const day = String(value);\n if (rule.name === RuleName.Min && day < addDaysIso(bound, -slack)) return { messageKey: DATE_MESSAGE_KEYS.Min };\n if (rule.name === RuleName.Max && day > addDaysIso(bound, slack)) return { messageKey: DATE_MESSAGE_KEYS.Max };\n return null;\n}\n\n/** Empty means \"the visitor gave us nothing\" — per control type, not a blanket falsy check. */\nfunction isEmpty(value: unknown, control: ControlType): boolean {\n if (value === null || value === undefined) return true;\n if (control === ControlType.Checkbox) return value === false;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === 'string') return value.trim() === '';\n return false;\n}\n\nfunction check(\n rule: ValidationRule,\n value: unknown,\n spec: FieldSpec,\n form: Record<string, unknown>,\n options: ValidateOptions,\n): FieldError | null {\n const fail = (messageKey: string, params?: Record<string, any>): FieldError => ({ messageKey, params });\n const defaultKey = RULE_MESSAGE_KEYS[rule.name];\n const n = Number(rule.params?.['n']);\n\n // A Date's min / max are DAYS (an ISO day or an offset from today), never a number to parseFloat — `2026-11-06`\n // read as 2026 is what the numeric reading did.\n if ((rule.name === RuleName.Min || rule.name === RuleName.Max) && spec.control === ControlType.Date && isDateBoundParams(rule.params)) {\n return dateBoundFailure(rule, value, options);\n }\n\n switch (rule.name) {\n case RuleName.Required:\n return isEmpty(value, spec.control) ? fail(requiredMessageKey(spec)) : null;\n\n case RuleName.Accepted:\n return value === true ? null : fail(defaultKey);\n\n case RuleName.OneOf:\n return isOneOf(value, spec) ? null : fail(defaultKey);\n\n case RuleName.ValidDate:\n return isIsoDate(value) ? null : fail(defaultKey);\n\n case RuleName.MinLength:\n return text(value).length < n ? fail(defaultKey, { n }) : null;\n\n case RuleName.MaxLength:\n return text(value).length > n ? fail(defaultKey, { n }) : null;\n\n case RuleName.Min: {\n const num = numeric(value);\n return num === null || num < n ? fail(defaultKey, { n }) : null;\n }\n\n case RuleName.Max: {\n const num = numeric(value);\n return num === null || num > n ? fail(defaultKey, { n }) : null;\n }\n\n case RuleName.Pattern: {\n const regex = patternFor(rule);\n if (!regex) return null; // an unparsable custom regex must not block a submission\n if (regex.test(text(value))) return null;\n const preset = rule.params?.['preset'] as string | undefined;\n return fail((preset && PATTERN_MESSAGE_KEYS[preset]) || defaultKey);\n }\n\n case RuleName.Matches: {\n const other = String(rule.params?.['field'] ?? '');\n return text(value) === text(form?.[other]) ? null : fail(defaultKey, { field: other });\n }\n\n case RuleName.FileType: {\n const accepted = list(rule.params?.['types']).map(t => t.toLowerCase().replace(/^\\./, ''));\n if (!accepted.length) return null;\n const bad = files(value).some(f => {\n const ext = (f.name ?? '').split('.').pop()?.toLowerCase() ?? '';\n const mime = (f.type ?? '').toLowerCase();\n return !accepted.some(t => t === ext || mime === t || mime.startsWith(t + '/'));\n });\n return bad ? fail(defaultKey, { types: accepted.join(', ') }) : null;\n }\n\n case RuleName.FileSize: {\n const maxBytes = n * 1024 * 1024;\n return files(value).some(f => (f.size ?? 0) > maxBytes) ? fail(defaultKey, { n }) : null;\n }\n\n default:\n return null;\n }\n}\n\nfunction patternFor(rule: ValidationRule): RegExp | null {\n const preset = rule.params?.['preset'] as PatternPreset | undefined;\n if (preset && PATTERN_PRESETS[preset]) return PATTERN_PRESETS[preset];\n const custom = rule.params?.['regex'];\n if (typeof custom !== 'string' || !custom) return null;\n // A malformed regex is the AUTHOR's mistake; failing open is the only safe reading, because\n // failing closed would make a live form permanently unsubmittable for every visitor.\n try { return new RegExp(custom); } catch { return null; }\n}\n\nconst text = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value).trim();\n\nfunction numeric(value: unknown): number | null {\n const parsed = typeof value === 'number' ? value : parseFloat(text(value));\n return Number.isFinite(parsed) ? parsed : null;\n}\n\nconst list = (value: unknown): string[] =>\n Array.isArray(value) ? value.map(String)\n : typeof value === 'string' ? value.split(',').map(s => s.trim()).filter(Boolean)\n : [];\n\nconst files = (value: unknown): FileLike[] =>\n Array.isArray(value) ? value as FileLike[]\n : value && typeof value === 'object' ? [value as FileLike]\n : [];\n","import { FieldOption } from './form.model';\n\n/** `value|Label` separates a submitted value from what the visitor reads; a bare line is both. */\nconst OPTION_SEPARATOR = '|';\n\n/**\n * A Field's `optionsText` trait — the author's choices, one per line — as options. ONE parser for the\n * builder canvas, both engine paths and iox-cms: until 2026-10-19 nothing parsed the trait, so a Radio\n * group or a Dropdown from the tray rendered no choices at all on the canvas and on the live site.\n */\nexport function parseFieldOptions(text: unknown): FieldOption[] {\n if (typeof text !== 'string') return [];\n const out: FieldOption[] = [];\n for (const line of text.split(/\\r?\\n/)) {\n const raw = line.trim();\n if (!raw) continue;\n const at = raw.indexOf(OPTION_SEPARATOR);\n const value = (at === -1 ? raw : raw.slice(0, at)).trim();\n const label = (at === -1 ? raw : raw.slice(at + 1)).trim() || value;\n if (value) out.push({ value, label });\n }\n return out;\n}\n\n/** The choices a saved Field offers: an explicit `options` list wins, else its `optionsText` parsed. */\nexport function fieldOptionsOf(props: { options?: unknown; optionsText?: unknown } | null | undefined): FieldOption[] {\n if (Array.isArray(props?.options) && props!.options.length) return props!.options as FieldOption[];\n return parseFieldOptions(props?.optionsText);\n}\n","// Derive a FormSpec from a node tree.\n//\n// The tree the author edited is the SINGLE source of truth for \"what fields does this form have\".\n// The spec is derived from it — never maintained beside it — so a field cannot exist in one and not\n// the other. The builder runs this on save and stores the result in the page document; the backend\n// reads THAT stored spec to re-validate a submission (it must never trust a spec sent by the\n// browser). See iox-ai-guidance `architecture/builder/forms-and-inputs-plan.md` §5.1 and D11.\n\nimport {\n ControlType,\n FeedbackTiming,\n FieldSpec,\n FormSpec,\n RuleName,\n SubmitAction,\n ValidationRule,\n} from './form.model';\nimport { dateBoundRules } from './dates';\nimport { fieldOptionsOf } from './options';\n\n/** The minimum a node must look like. Structural on purpose: this file knows no renderer. */\nexport interface FormNodeLike {\n type: string;\n props?: Record<string, any>;\n children?: FormNodeLike[];\n}\n\nexport const FORM_NODE_TYPE = 'Form';\nexport const FIELD_NODE_TYPE = 'Field';\n\n/** Always present, never removable — the safety net that makes \"store first, deliver after\" true. */\nexport const STORE_ACTION: SubmitAction = Object.freeze({ type: 'store' });\n\n/**\n * Turn a label into the key that arrives in the submitted data — `Full name` → `fullName`.\n * Authors never have to invent keys (decision: auto-derive, with an editable override).\n *\n * Diacritics are stripped rather than dropped, so a Hebrew or accented label still yields a usable\n * ASCII key instead of an empty one; a label with no usable characters falls back to `field`.\n */\nexport function deriveFieldName(label: string): string {\n const words = (label ?? '')\n .normalize('NFD').replace(/[̀-ͯ]/g, '')\n .replace(/[^a-zA-Z0-9]+/g, ' ')\n .trim()\n .split(/\\s+/)\n .filter(Boolean);\n if (!words.length) return 'field';\n const [first, ...rest] = words;\n const name = first.toLowerCase() + rest.map(w => w[0].toUpperCase() + w.slice(1).toLowerCase()).join('');\n // A key must not start with a digit — it ends up as an object key and a form control id.\n return /^\\d/.test(name) ? `field${name}` : name;\n}\n\n/** Make `name` unique within `taken`, appending 2, 3, … — two \"Email\" fields must not collide. */\nexport function uniqueFieldName(name: string, taken: ReadonlySet<string>): string {\n if (!taken.has(name)) return name;\n let n = 2;\n while (taken.has(`${name}${n}`)) n++;\n return `${name}${n}`;\n}\n\n/** A Field's own key, before the form makes it unique: the author's override, else derived from the label. */\nexport function baseFieldName(props: { name?: unknown; label?: unknown } | null | undefined): string {\n const own = typeof props?.name === 'string' ? props.name : '';\n return own || deriveFieldName(String(props?.label ?? ''));\n}\n\n/**\n * THE naming rule (vectoriox/iox-ui#43): a form's fields, in document order, each its base name made unique against\n * the names before it — `email`, `email2`. The spec (`collectFormSpec`), the component path's runtime and the engine's\n * string renderer all name a field from here, so the input's `name` and the saved spec's key can never differ.\n */\nexport function uniqueFieldNames(baseNames: ReadonlyArray<string>): string[] {\n const taken = new Set<string>();\n return baseNames.map(base => {\n const name = uniqueFieldName(base, taken);\n taken.add(name);\n return name;\n });\n}\n\n/** The submitted name of every Field of a Form, in document order — `uniqueFieldNames` over its fields. */\nexport function formFieldNames(node: FormNodeLike | null | undefined): string[] {\n if (!node || node.type !== FORM_NODE_TYPE) return [];\n return uniqueFieldNames(collectFieldNodes(node.children ?? []).map(f => baseFieldName(f.props)));\n}\n\n/** Each Field node of a Form → the name it submits under (`formFieldNames`, by node). */\nexport function formFieldNameMap<N extends FormNodeLike>(node: N | null | undefined): Map<FormNodeLike, string> {\n const out = new Map<FormNodeLike, string>();\n if (!node || node.type !== FORM_NODE_TYPE) return out;\n const fields = collectFieldNodes(node.children ?? []);\n uniqueFieldNames(fields.map(f => baseFieldName(f.props))).forEach((name, i) => out.set(fields[i], name));\n return out;\n}\n\n/**\n * A Field's spec from its props and the name its form gave it — ONE reading for the saved spec and the component\n * path's runtime (it was written twice: `IoxFieldComponent.toSpec` never carried the options source, the default or a\n * Date's bounds). A Date's Earliest / Latest (`earliest` / `latest`) become its `min` / `max` rules (premium N8).\n */\nexport function fieldSpecOf(props: Record<string, any> | null | undefined, name: string): FieldSpec {\n const p = props ?? {};\n const control = (p['control'] as ControlType) || ControlType.Text;\n const spec: FieldSpec = { name, control, label: p['label'] ?? '' };\n if (p['required']) spec.required = true;\n const declared = normaliseRules(p['rules']);\n const bounds = control === ControlType.Date\n ? dateBoundRules(p['earliest'], p['latest']).filter(b => !declared.some(r => r.name === b.name))\n : [];\n const rules = [...declared, ...bounds];\n if (rules.length) spec.rules = rules;\n const options = fieldOptionsOf(p);\n if (options.length) spec.options = options;\n if (p['optionsSource']) spec.optionsSource = p['optionsSource'];\n if (p['defaultValue'] !== undefined && p['defaultValue'] !== '') spec.defaultValue = p['defaultValue'];\n if (control === ControlType.Choices && p['multiple'] === true) spec.multiple = true;\n return spec;\n}\n\n/**\n * Walk a Form subtree and produce its spec.\n *\n * Nested forms are not collected: a Field belongs to its NEAREST ancestor Form (decision D1), so the\n * walk stops at any inner Form node rather than stealing its fields.\n */\nexport function collectFormSpec(node: FormNodeLike | null | undefined): FormSpec | null {\n if (!node || node.type !== FORM_NODE_TYPE) return null;\n const props = node.props ?? {};\n\n const fieldNodes = collectFieldNodes(node.children ?? []);\n const names = uniqueFieldNames(fieldNodes.map(f => baseFieldName(f.props)));\n const fields: FieldSpec[] = fieldNodes.map((f, i) => fieldSpecOf(f.props, names[i]));\n\n return {\n formId: props['formId'] ?? '',\n name: props['name'] ?? 'Form',\n feedback: (props['feedback'] as FeedbackTiming) ?? FeedbackTiming.Smart,\n fields,\n actions: normaliseActions(props['actions']),\n antiSpam: {\n honeypot: props['honeypot'] !== false,\n minFillMs: Number(props['minFillMs'] ?? 1200),\n ...(props['turnstile'] ? { turnstile: true } : {}),\n },\n ...(props['retentionDays'] ? { retention: { days: Number(props['retentionDays']) } } : {}),\n };\n}\n\n/** Every Field in this subtree, in document order, not descending into a nested Form. */\nexport function collectFieldNodes(nodes: readonly FormNodeLike[]): FormNodeLike[] {\n const out: FormNodeLike[] = [];\n for (const node of nodes ?? []) {\n if (!node?.type) continue;\n if (node.type === FORM_NODE_TYPE) continue; // a nested form owns its own fields\n if (node.type === FIELD_NODE_TYPE) { out.push(node); continue; }\n out.push(...collectFieldNodes(node.children ?? []));\n }\n return out;\n}\n\n/** Drop anything that isn't a rule we know — a hand-edited page must not break validation. */\nfunction normaliseRules(raw: unknown): ValidationRule[] {\n if (!Array.isArray(raw)) return [];\n const known = new Set<string>(Object.values(RuleName));\n return raw\n .filter(r => r && known.has(r.name))\n .map(r => ({\n name: r.name as RuleName,\n ...(r.params ? { params: r.params } : {}),\n ...(r.message ? { message: r.message } : {}),\n }));\n}\n\n/** `store` is always first and always present, however the page was edited. */\nfunction normaliseActions(raw: unknown): SubmitAction[] {\n const declared: SubmitAction[] = Array.isArray(raw)\n ? raw.filter(a => a && typeof a.type === 'string')\n : [];\n return [STORE_ACTION, ...declared.filter(a => a.type !== STORE_ACTION.type)];\n}\n","// When a field's error is allowed to be VISIBLE — the pure half of the form runtime.\n//\n// Validity and visibility are different questions. A field can be invalid from the moment the page\n// loads (an empty required field always is), but showing that immediately means greeting a visitor\n// with a wall of red before they have typed anything. This module owns the second question, and it\n// owns it in one place so the builder canvas, the SSR engine and any future runtime agree.\n//\n// Framework-free, like the rest of forms-core.\n\nimport { FeedbackTiming, FormSpec } from './form.model';\nimport { FieldError, validateField, validateForm } from './validate';\n\n/** Everything the runtime needs to remember. Immutable — each transition returns a new state. */\nexport interface FormRuntimeState {\n /** Field names the visitor has left (blurred) at least once. */\n touched: ReadonlySet<string>;\n /** True once a submit has been attempted — after that, every error is fair game. */\n submitted: boolean;\n /** The current errors, whether or not they are being shown. */\n errors: Readonly<Record<string, FieldError>>;\n /** In flight — the submit button shows its loading label and the form is aria-busy. */\n submitting: boolean;\n}\n\nexport const INITIAL_FORM_STATE: FormRuntimeState = Object.freeze({\n touched: new Set<string>(),\n submitted: false,\n errors: {},\n submitting: false,\n});\n\n/**\n * Should this field's error be on screen right now?\n *\n * - `Submit` — only after a submit attempt. Quietest; nothing moves while typing.\n * - `Live` — as soon as it is invalid. Loudest; shouts at a half-typed email address.\n * - `Smart` — the default, and the reason the author gets one dropdown instead of a decision per\n * field: stay quiet until the visitor has either left the field or tried to submit.\n * After that, correct live, so fixing an error clears it as they type.\n */\nexport function shouldShowError(\n fieldName: string,\n state: FormRuntimeState,\n timing: FeedbackTiming | string = FeedbackTiming.Smart,\n): boolean {\n if (!state.errors[fieldName]) return false;\n switch (timing) {\n case FeedbackTiming.Live: return true;\n case FeedbackTiming.Submit: return state.submitted;\n default: return state.submitted || state.touched.has(fieldName);\n }\n}\n\n/**\n * Re-validate one field after a change. Only that field is re-checked, EXCEPT that a `matches` rule\n * makes another field's validity depend on this one — so a confirm-email field stops being wrong\n * the moment you fix the address it points at, rather than waiting for its own blur.\n */\nexport function onFieldChange(\n state: FormRuntimeState,\n fieldName: string,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const errors = { ...state.errors };\n const affected = [fieldName, ...dependentsOf(fieldName, spec)];\n\n for (const name of affected) {\n const field = (spec.fields ?? []).find(f => f.name === name);\n if (!field) continue;\n const result = validateField(values?.[name], field, values ?? {});\n if (result.valid) delete errors[name];\n else errors[name] = { messageKey: result.messageKey!, params: result.params };\n }\n return { ...state, errors };\n}\n\n/** Mark a field touched (on blur) and re-check it, so Smart timing can start showing its error. */\nexport function onFieldBlur(\n state: FormRuntimeState,\n fieldName: string,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const touched = new Set(state.touched);\n touched.add(fieldName);\n return { ...onFieldChange(state, fieldName, values, spec), touched };\n}\n\n/**\n * A submit attempt. Validates everything and flips `submitted`, so from here on every error shows\n * whatever the timing setting is — a visitor who pressed the button is owed the full picture.\n */\nexport function onSubmitAttempt(\n state: FormRuntimeState,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const { errors } = validateForm(values ?? {}, spec);\n return { ...state, submitted: true, errors };\n}\n\n/** Server-side rejection: adopt the server's errors verbatim. It is the authority, not the client. */\nexport function applyServerErrors(\n state: FormRuntimeState,\n errors: Record<string, FieldError>,\n): FormRuntimeState {\n return { ...state, submitted: true, submitting: false, errors: { ...errors } };\n}\n\n/** A clean slate after a successful submit, for a form configured to clear itself. */\nexport function resetFormState(): FormRuntimeState {\n return { touched: new Set<string>(), submitted: false, errors: {}, submitting: false };\n}\n\n/** Field names whose validity depends on `fieldName` through a `matches` rule. */\nfunction dependentsOf(fieldName: string, spec: FormSpec): string[] {\n return (spec.fields ?? [])\n .filter(f => (f.rules ?? []).some(r => r.params?.['field'] === fieldName))\n .map(f => f.name);\n}\n","/**\n * Which rules exist, and which controls they make sense on.\n *\n * The panel must not offer \"must be ticked\" on a text field, or a character limit on a date. That\n * knowledge belongs with the validator, not duplicated into the editor — otherwise the two drift and\n * an author configures a rule that silently never runs.\n *\n * Pure data, in forms-core, so the builder panel, the engine and the backend all read one catalog.\n */\n\nimport { ControlType, PatternPreset, RuleName } from './form.model';\n\n/** How a rule's parameter is edited. The panel maps these to its own controls. */\nexport enum RuleParamKind {\n /** No parameter — the rule is its own statement (`required`, `accepted`). */\n None = 'none',\n /** A single number (`{ n }`) — lengths and bounds. */\n Number = 'number',\n /** A preset regex, or a custom one (`{ preset }` / `{ regex }`). */\n Pattern = 'pattern',\n /** Another field in the same form (`{ field }`). */\n Field = 'field',\n}\n\nexport interface RuleDescriptor {\n name: RuleName;\n /** i18n key for the rule's name in the Add-rule menu. */\n labelKey: string;\n param: RuleParamKind;\n /** Controls this rule can apply to. Empty means every control. */\n controls: readonly ControlType[];\n /** Suggested starting value for the parameter, so a freshly added rule is already valid. */\n defaultParams?: Record<string, any>;\n}\n\n/** Text-ish controls: the ones whose value is a string a person typed. */\nconst TEXTUAL: readonly ControlType[] = [\n ControlType.Text, ControlType.Email, ControlType.Tel, ControlType.Url,\n ControlType.Password, ControlType.Textarea,\n];\n\n/** Controls with a comparable magnitude. A Date is not one of them: its bounds are DAYS (an ISO day or \"N days from\n * today\", `dates.ts`), set by the Field's own Earliest / Latest — a number box here read `2026-11-06` as 2026. */\nconst NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Time, ControlType.Range];\n\nexport const RULE_DESCRIPTORS: readonly RuleDescriptor[] = Object.freeze([\n {\n name: RuleName.MinLength, labelKey: 'forms.rules.minLength',\n param: RuleParamKind.Number, controls: TEXTUAL, defaultParams: { n: 2 },\n },\n {\n name: RuleName.MaxLength, labelKey: 'forms.rules.maxLength',\n param: RuleParamKind.Number, controls: TEXTUAL, defaultParams: { n: 200 },\n },\n {\n name: RuleName.Min, labelKey: 'forms.rules.min',\n param: RuleParamKind.Number, controls: NUMERIC, defaultParams: { n: 0 },\n },\n {\n name: RuleName.Max, labelKey: 'forms.rules.max',\n param: RuleParamKind.Number, controls: NUMERIC, defaultParams: { n: 100 },\n },\n {\n name: RuleName.Pattern, labelKey: 'forms.rules.pattern',\n param: RuleParamKind.Pattern, controls: TEXTUAL,\n defaultParams: { preset: PatternPreset.Email },\n },\n {\n // Cross-field: confirm-email, confirm-password.\n name: RuleName.Matches, labelKey: 'forms.rules.matches',\n param: RuleParamKind.Field, controls: [],\n },\n {\n // A checkbox's `required` already becomes `accepted`, so offering it again would be a\n // duplicate — it is here for a checkbox the author wants ticked WITHOUT marking it required.\n name: RuleName.Accepted, labelKey: 'forms.rules.accepted',\n param: RuleParamKind.None, controls: [ControlType.Checkbox, ControlType.Switch],\n },\n]);\n\n/** The rules that can be added to a field of this control type. */\nexport function rulesFor(control: ControlType | string): RuleDescriptor[] {\n return RULE_DESCRIPTORS.filter(rule =>\n rule.controls.length === 0 || rule.controls.includes(control as ControlType));\n}\n\n/**\n * The rules an author may still ADD — the catalog minus what is already on the field.\n *\n * Each rule appears once: two `maxLength` rules on one field is not a configuration anyone means,\n * and the validator would apply whichever came first. `pattern` is the exception a caller might\n * expect to repeat, and it deliberately does not: a second pattern can only contradict the first.\n */\nexport function addableRules(\n control: ControlType | string,\n existing: readonly { name: RuleName }[] = [],\n): RuleDescriptor[] {\n const used = new Set(existing.map(rule => rule.name));\n return rulesFor(control).filter(rule => !used.has(rule.name));\n}\n\n/** The preset options a Pattern rule offers, in the order the panel should list them. */\nexport const PATTERN_PRESET_OPTIONS: readonly { value: PatternPreset; labelKey: string }[] = Object.freeze([\n { value: PatternPreset.Email, labelKey: 'forms.rules.preset.email' },\n { value: PatternPreset.Phone, labelKey: 'forms.rules.preset.phone' },\n { value: PatternPreset.Url, labelKey: 'forms.rules.preset.url' },\n { value: PatternPreset.Digits, labelKey: 'forms.rules.preset.digits' },\n { value: PatternPreset.Letters, labelKey: 'forms.rules.preset.letters' },\n { value: PatternPreset.Slug, labelKey: 'forms.rules.preset.slug' },\n]);\n\n// ── MOVED to @vectoriox/iox-ui/actions-core (A0) ─────────────────────────────\n// The descriptor shape and the after-submit catalog are the ONE action vocabulary the whole\n// product shares; element actions (A1) consume the same shape. Re-exported here under the\n// original names so no forms consumer changes a line.\nexport type { ActionDescriptor } from '@vectoriox/iox-ui/actions-core';\nexport { FORM_SUBMIT_ACTION_DESCRIPTORS as ACTION_DESCRIPTORS, addableActions } from '@vectoriox/iox-ui/actions-core';\n","/**\n * The submit transport CONTRACT — what a host must provide to make a form actually send.\n *\n * The Form component deliberately owns no HTTP: the builder canvas must never post (an author\n * clicking Submit while designing would file a real submission), and the SSR engine posts through\n * Angular's HttpClient. What IS shared is everything around the call — the endpoint's shape, the\n * anti-spam fields, and how the server's answer maps onto the form's state. Those live here so the\n * two hosts cannot drift, and so a third host (a hand-built integration) has one thing to read.\n *\n * ⚠️ Framework-free, like the rest of forms-core. No Angular, no RxJS, no fetch.\n */\n\nimport { FieldError } from './validate';\n\n/** The field a honeypot input uses. Must match `iox-cms` `anti-spam.ts` — hence the comment there. */\nexport const HONEYPOT_FIELD = '_iox_hp';\n/** When the form was rendered, so the server can measure fill time. */\nexport const RENDERED_AT_FIELD = '_iox_t';\n\n/**\n * What the form hands its host. There is deliberately no `orgId`: the tenant is the HOST's\n * knowledge, not the form's, and a form that had to be told its org would be one more trait an\n * author could get wrong.\n */\nexport interface SubmitRequest {\n formId: string;\n values: Record<string, any>;\n}\n\n/**\n * The server's answer, normalised. Mirrors `SubmitResult` in `iox-cms`\n * `form-submissions.service.ts` — the two are one contract, so change them together.\n */\nexport interface SubmitResponse {\n ok: boolean;\n /** Per-field verdicts from the server's own validation pass, keyed by field name. */\n errors?: Record<string, FieldError>;\n /** Where to send the visitor after a successful submit, when the form has a redirect action. */\n redirect?: string;\n}\n\n/**\n * The one function a host implements. Rejecting (or throwing) means the call never reached the\n * server — the form shows its Error state, which is the honest thing to show for a dropped network.\n */\nexport type FormTransport = (request: SubmitRequest) => Promise<SubmitResponse>;\n\n/**\n * The public submit path. Built here rather than interpolated at each call site, so the engine and\n * any future host cannot disagree about it — and so changing it is one edit.\n *\n * ⚠️ ROOT-relative (leading slash), never base-relative. A live site is served under a per-org\n * `<base href=\"/<label>/\">`, so a relative `api/…` resolved to `/<label>/api/…` — a path the reverse\n * proxy (`/api` → iox-cms, everything else → the engine) hands to the ENGINE, which answers a POST with\n * 404: no visitor submission ever reached iox-cms from an org path (found 2026-10-19 by\n * e2e:forminsert:real). The org is already in the path segment after `site/`.\n */\nexport function submitEndpointPath(orgId: string, formId: string): string {\n return `/api/site/${encodeURIComponent(orgId)}/forms/${encodeURIComponent(formId)}/submit`;\n}\n\n/**\n * Add the anti-spam fields to the collected values.\n *\n * Both are invisible to a real visitor and cost them nothing (decision D12). `renderedAt` is the\n * time the form was rendered, NOT the time of submit — the server measures the difference to catch\n * a script that fills and posts instantly.\n */\nexport function withAntiSpamFields(\n values: Record<string, any>,\n renderedAt: number,\n honeypotValue = '',\n): Record<string, any> {\n return { ...values, [HONEYPOT_FIELD]: honeypotValue, [RENDERED_AT_FIELD]: renderedAt };\n}\n\n/**\n * Normalise whatever came back into a `SubmitResponse`.\n *\n * Fails CLOSED: anything that is not a recognisable success is treated as a failure. A malformed\n * body must never show the visitor a Success state for a submission that was not stored — that is\n * the one lie this feature must not tell.\n */\nexport function interpretSubmitResponse(body: any): SubmitResponse {\n if (!body || typeof body !== 'object' || body.ok !== true) {\n return {\n ok: false,\n errors: normaliseErrors(body?.errors),\n };\n }\n const redirect = typeof body.redirect === 'string' && body.redirect.trim()\n ? body.redirect.trim()\n : undefined;\n return { ok: true, redirect };\n}\n\n/** Keep only entries that actually carry a message, so a junk key cannot blank a field's error. */\nfunction normaliseErrors(raw: any): Record<string, FieldError> | undefined {\n if (!raw || typeof raw !== 'object') return undefined;\n const errors: Record<string, FieldError> = {};\n for (const [name, value] of Object.entries(raw as Record<string, any>)) {\n const messageKey = typeof value?.messageKey === 'string' ? value.messageKey : '';\n if (!messageKey) continue;\n errors[name] = value?.params ? { messageKey, params: value.params } : { messageKey };\n }\n return Object.keys(errors).length ? errors : undefined;\n}\n","/**\n * The submit LIFECYCLE's decisions — what a form shows after the server answers, what it says when a\n * submit fails, what a client needs to validate a form, and how its submit button follows its state.\n *\n * Two runtimes act on these and must agree: `IoxFormComponent` (the engine's component path) and the\n * string-form runtime (every header / footer global and every string-rendered page —\n * vectoriox/iox-client-engine#13). The builder canvas reads `submitButtonView` too, for its Sending state.\n *\n * ⚠️ Framework-free, like the rest of forms-core: no Angular, no DOM.\n */\n\nimport { FeedbackTiming, FieldSpec, FormSpec } from './form.model';\nimport { SubmitResponse } from './transport';\nimport { FieldError } from './validate';\n\n/** Which of the form's four states is showing — written on the form as `data-iox-state`. */\nexport enum FormRenderState {\n Idle = 'idle',\n Submitting = 'submitting',\n Success = 'success',\n Error = 'error',\n}\n\n/** The attribute every renderer writes a form's state on (the canvas switcher, both live paths). */\nexport const FORM_STATE_ATTRIBUTE = 'data-iox-state';\n\n/** What the form does once the server has answered. */\nexport interface SubmitOutcome {\n state: FormRenderState;\n /** Per-field verdicts to put back on the fields (the form stays Idle so the visitor can fix them). */\n errors?: Record<string, FieldError>;\n /** A success clears the answers, so they cannot be sent twice. */\n reset: boolean;\n redirect?: string;\n}\n\n/**\n * The server's answer → what the visitor sees. Only a confirmed success is Success; per-field verdicts\n * land on the fields; anything else (a dropped network included) is the designed Error block.\n */\nexport function submitOutcome(response: SubmitResponse | null | undefined): SubmitOutcome {\n if (response?.ok) return { state: FormRenderState.Success, reset: true, ...(response.redirect ? { redirect: response.redirect } : {}) };\n if (response?.errors && Object.keys(response.errors).length) return { state: FormRenderState.Idle, errors: response.errors, reset: false };\n return { state: FormRenderState.Error, reset: false };\n}\n\n/** What the live region says after a refused submit: how many fields need attention, or that it did not send. */\nexport function failureAnnouncement(errors: Readonly<Record<string, unknown>> | null | undefined): string {\n const count = errors ? Object.keys(errors).length : 0;\n if (!count) return 'That did not send.';\n return `${count} ${count === 1 ? 'field needs' : 'fields need'} attention.`;\n}\n\n/**\n * The fields a CLIENT needs to validate a form: never its actions (where submissions go — an email\n * address, a webhook) and never its anti-spam settings. A string-rendered form carries this on\n * `FORM_FIELDS_ATTRIBUTE`, the way a string slider carries its inputs.\n */\nexport interface ClientFormSpec {\n feedback: FeedbackTiming | string;\n fields: FieldSpec[];\n}\n\nexport const FORM_FIELDS_ATTRIBUTE = 'data-iox-form-fields';\n\nexport function clientFormSpec(spec: Pick<FormSpec, 'feedback' | 'fields'>): ClientFormSpec {\n return { feedback: spec.feedback ?? FeedbackTiming.Smart, fields: [...(spec.fields ?? [])] };\n}\n\n/** The attribute's value back into a spec, or null when it is missing or not one. */\nexport function parseClientFormSpec(raw: string | null | undefined): ClientFormSpec | null {\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw);\n if (!parsed || !Array.isArray(parsed.fields)) return null;\n return { feedback: typeof parsed.feedback === 'string' ? parsed.feedback : FeedbackTiming.Smart, fields: parsed.fields };\n } catch {\n return null;\n }\n}\n\n/** How a submit button wears its form's state (vectoriox/iox-ui#42, premium N2). */\nexport interface SubmitButtonView {\n busy: boolean;\n disabled: boolean;\n}\n\n/**\n * While its form sends, a submit button is busy, and disabled unless its author turned that off; once the form has\n * SENT it stays disabled, reading \"Sent\" with its check — nothing sends a lead twice (premium N2, the success in place).\n * ONE rule for the canvas's Sending / Success states, the component path and the string path. Its labels are the shared\n * CSS's, keyed on the same `data-iox-state`.\n */\nexport function submitButtonView(state: FormRenderState | string | null | undefined, disableWhileSubmitting = true): SubmitButtonView {\n const busy = state === FormRenderState.Submitting;\n const sent = state === FormRenderState.Success;\n return { busy, disabled: sent || (busy && disableWhileSubmitting !== false) };\n}\n\n/** On a submit button whose author turned \"Disable while sending\" off. */\nexport const SUBMIT_KEEP_ENABLED_ATTRIBUTE = 'data-iox-keep-enabled';\n\nexport enum SubmitLabelClass {\n Labels = 'iox-submit__labels',\n Idle = 'iox-submit__idle',\n Busy = 'iox-submit__busy',\n Sent = 'iox-submit__sent',\n Check = 'iox-submit__check',\n}\n\n/** The check the Sent label draws once (premium N2 — the rare-tier beat, Emil 135/136): one stroke, `pathLength` 100 so\n * the shared CSS draws it by `stroke-dashoffset` whatever its real length. */\nexport const SUBMIT_CHECK_SVG = `<svg class=\"${SubmitLabelClass.Check}\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">` +\n '<path d=\"M5 12.5l4.5 4.5L19 7.5\" pathLength=\"100\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>';\n\n/** \"Sent\" in the site's language, for a button whose author wrote no Sent words (a string-rendered site has no\n * translation service — the document's `lang` picks, like the date picker's words). */\nconst SENT_WORDS: Readonly<Record<string, string>> = Object.freeze({ en: 'Sent', he: 'נשלח' });\n\nexport function sentWord(lang: string | null | undefined): string {\n const language = String(lang ?? '').toLowerCase().split(/[-_]/)[0];\n return SENT_WORDS[language === 'iw' ? 'he' : language] ?? SENT_WORDS['en'];\n}\n\n/** A submit button's three labels: what it says at rest, while its form sends, and once it has sent. */\nexport interface SubmitLabels {\n idle: string;\n /** \"While sending\" — none: the button keeps its idle words while sending. */\n busy?: string | null;\n /** \"Sent\" — none: the catalog's word, translated by the host (`SUBMIT_MESSAGE_KEYS.Sent`). */\n sent: string;\n}\n\n/**\n * A submit button's words, as markup: its three labels stacked in one grid cell (the button keeps the longest one's\n * width and never jumps), each shown by the form's state through the shared CSS — swapped in place behind a 2px blur\n * (Emil 87/139). The string renderer's copy of `IoxSubmitButtonComponent`'s template; `escape` is the renderer's.\n */\nexport function submitButtonLabelsHtml(labels: SubmitLabels, escape: (v: string) => string): string {\n const busy = labels.busy || labels.idle;\n return `<span class=\"${SubmitLabelClass.Labels}\"><span class=\"${SubmitLabelClass.Idle}\">${escape(labels.idle)}</span>` +\n `<span class=\"${SubmitLabelClass.Busy}\">${escape(busy)}</span>` +\n `<span class=\"${SubmitLabelClass.Sent}\">${SUBMIT_CHECK_SVG}<span>${escape(labels.sent)}</span></span></span>`;\n}\n\nexport const FORM_HONEYPOT_CLASS = 'iox-form__hp';\nexport const FORM_ANNOUNCER_ATTRIBUTE = 'data-iox-form-announcer';\n\n/**\n * The honeypot and the failure announcer every form holds, as markup — what `IoxFormComponent`'s template\n * renders, for the string renderer. The honeypot is off-screen (some bots skip hidden inputs), out of the\n * Tab order and the accessibility tree; the announcer is present from the start (a live region added at\n * the moment it gains text is not reliably announced).\n */\nexport function formChromeHtml(honeypotField: string): string {\n return `<div class=\"${FORM_HONEYPOT_CLASS}\" aria-hidden=\"true\"><input type=\"text\" name=\"${honeypotField}\" tabindex=\"-1\" autocomplete=\"off\"></div>` +\n `<div class=\"${FORM_HONEYPOT_CLASS}\" ${FORM_ANNOUNCER_ATTRIBUTE} role=\"status\" aria-live=\"assertive\" aria-atomic=\"true\"></div>`;\n}\n","/**\n * FORM PRESETS — a complete, working form as one insert: its fields, its submit label and the words of\n * its Success and Error blocks. ONE definition (W1.1): the builder's Forms tray builds a preset from\n * here (`buildFormPreset`, iox-builder), and the site composer (`generation-core`) stamps the SAME preset\n * into a composed page, so a generated contact form is the real one — never a second, drifting copy.\n * Data only: framework-free, like the rest of forms-core.\n */\n\nimport type { ChannelKind } from './channel';\n\nexport enum FormPresetId {\n Contact = 'contact',\n Newsletter = 'newsletter',\n Application = 'application',\n Booking = 'booking',\n /** Premium N2: modelled on Doron's iox.studio brief — name, a phone that is also WhatsApp, the business, what they\n * need and a budget as chips, Send with WhatsApp beside it. */\n Lead = 'lead',\n}\n\nexport interface FormPresetField {\n label: string;\n control: string;\n required?: boolean;\n help?: string;\n placeholder?: string;\n /** Choices for select/radio/choices, `value|Label` per line — the Field's `optionsText` trait. */\n optionsText?: string;\n rows?: number;\n /** A Choices field that takes several answers (N1). */\n multiple?: boolean;\n /** A Choices field's appearance — `chips` (the default) or `list` (N1). */\n appearance?: string;\n /** A Date's first and last day — '' any · an integer: days from today · an ISO day (N8, `dates.ts`). */\n earliest?: string;\n latest?: string;\n}\n\n/** The second way to reach the studio, beside Send (N2). Its address is the studio's own and starts EMPTY. */\nexport interface FormPresetChannel {\n kind: `${ChannelKind}`;\n label: string;\n}\n\nexport interface FormPresetDef {\n id: `${FormPresetId}`;\n name: string;\n icon: string;\n /** One line in the panel: what it collects and where it goes. */\n description: string;\n /** The form's author-facing name, which the submissions inbox groups by. */\n formName: string;\n fields: FormPresetField[];\n submitLabel: string;\n successText: string;\n errorText: string;\n channel?: FormPresetChannel;\n /** `false`: the AI plan wire does not offer it yet (the lead preset ships in the builder in M3; generation takes it\n * up in premium M8 — the wire's enum is model-facing and does not change before then). */\n inPlan?: false;\n}\n\n/** The presets a generated plan may name (the plan wire's `form` enum) — every preset not held back by `inPlan`. */\nexport function planFormPresetIds(): string[] {\n return FORM_PRESETS.filter(p => p.inPlan !== false).map(p => p.id);\n}\n\n// forms-core is imported by both renderers (the field runtime), and a renderer that never reads the presets\n// must drop them: the call is `@__PURE__`, and the ids are written as the enum's VALUES (typed by it, pinned\n// to it by form-presets.spec) — a read of `FormPresetId.X` counts as a side effect to a bundler and kept the\n// whole list in the engine's bundle.\nexport const FORM_PRESETS: readonly FormPresetDef[] = /* @__PURE__ */ Object.freeze([\n {\n id: 'contact', name: 'Contact', icon: 'ph-thin ph-envelope-simple',\n description: 'Name, email and a message. Stored, and emailed to you.',\n formName: 'Contact form',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Message', control: 'textarea', required: true, rows: 5 },\n ],\n submitLabel: 'Send message',\n successText: 'Thanks — we’ll be in touch shortly.',\n errorText: 'We couldn’t send your message. Please try again — your answers are still here.',\n },\n {\n id: 'newsletter', name: 'Newsletter', icon: 'ph-thin ph-paper-plane-tilt',\n description: 'One email field plus consent. Stored.',\n formName: 'Newsletter signup',\n fields: [\n { label: 'Email', control: 'email', required: true, placeholder: 'you@company.com' },\n // Consent is a checkbox that must be TICKED — `required` on a checkbox becomes the\n // `accepted` rule, with its own message, rather than a generic \"this is required\".\n { label: 'Email me occasional updates', control: 'checkbox', required: true },\n ],\n submitLabel: 'Subscribe',\n successText: 'You’re on the list.',\n errorText: 'We couldn’t sign you up. Please try again.',\n },\n {\n id: 'application', name: 'Application', icon: 'ph-thin ph-read-cv-logo',\n description: 'Details plus a CV upload. Stored, with an auto-reply.',\n formName: 'Application',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Phone', control: 'tel' },\n { label: 'Role', control: 'select', required: true, optionsText: 'Design\\nEngineering\\nOther' },\n { label: 'CV', control: 'file', required: true, help: 'PDF or Word, up to 5MB' },\n { label: 'Anything else', control: 'textarea', rows: 4 },\n ],\n submitLabel: 'Apply',\n successText: 'Application received — we’ll read it properly and reply.',\n errorText: 'We couldn’t submit your application. Please try again.',\n },\n {\n id: 'booking', name: 'Booking request', icon: 'ph-thin ph-calendar-check',\n description: 'Date and party size. Stored, and it notifies you.',\n formName: 'Booking request',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n // The first day a booking may ask for is today (N8): the calendar refuses the past.\n { label: 'Date', control: 'date', required: true, earliest: '0' },\n { label: 'People', control: 'number', required: true },\n { label: 'Notes', control: 'textarea', rows: 3, help: 'Allergies, access needs, anything useful' },\n ],\n submitLabel: 'Request a booking',\n successText: 'Request received — we’ll confirm by email.',\n errorText: 'We couldn’t send your request. Please try again.',\n },\n {\n id: 'lead', name: 'Lead', icon: 'ph-thin ph-handshake',\n description: 'Name, phone, the business and what they need, as chips. Stored, with WhatsApp beside Send.',\n formName: 'Lead form',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Phone / WhatsApp', control: 'tel', required: true },\n { label: 'What is your business?', control: 'text' },\n // The words ARE the values: what arrives in the inbox and the email reads as the visitor chose it.\n { label: 'What do you need?', control: 'choices', multiple: true,\n optionsText: 'Website\\nBranding\\nPhotos & video\\nNot sure yet' },\n // Neutral sizes the author renames — never a price or a currency a studio could be held to.\n { label: 'Estimated budget', control: 'choices',\n optionsText: 'Small project\\nMedium\\nLarge\\nNot sure yet' },\n ],\n submitLabel: 'Send',\n successText: 'Thanks — we’ll get back to you soon.',\n errorText: 'We couldn’t send your details. Please try again — your answers are still here.',\n channel: { kind: 'whatsapp', label: 'Message us on WhatsApp' },\n inPlan: false,\n },\n]);\n\n/** The preset with this id, or undefined. */\nexport function formPresetById(id: string | null | undefined): FormPresetDef | undefined {\n return FORM_PRESETS.find(p => p.id === id);\n}\n","// Where form content may NOT render (Doron, 2026-10-20): inside a link or a button.\n//\n// HTML forbids interactive content inside `<a>` and `<button>`, and a click in a field may follow the\n// link. ONE table and ONE walk, shared by the builder's insert rule (refuse it), the builder's audit\n// (find it in a page saved before the rule) and the engine (warn about it, never rewrite it).\n\nimport { FIELD_NODE_TYPE, FORM_NODE_TYPE } from './collect';\n\nexport enum InteractiveTag {\n Anchor = 'a',\n Button = 'button',\n}\n\n/**\n * Every node type that renders as an interactive element, and the element(s) it can render. A ButtonBlock\n * renders `<a>` or `<button>` by its `tag` trait — both interactive, so switching the tag never lifts the\n * rule. Pinned to the engine components' selectors by `interactive-hosts.spec.ts`.\n */\nexport const INTERACTIVE_HOST_TAGS: Readonly<Record<string, readonly InteractiveTag[]>> = Object.freeze({\n // A LinkedContainer is an <a>, or — as an Accordion's header (CC2) — a <button>.\n LinkedContainer: [InteractiveTag.Anchor, InteractiveTag.Button],\n Link: [InteractiveTag.Anchor],\n Button: [InteractiveTag.Anchor],\n ButtonBlock: [InteractiveTag.Anchor, InteractiveTag.Button],\n SubmitButton: [InteractiveTag.Button],\n});\n\nexport const FIELD_GROUP_NODE_TYPE = 'FieldGroup';\nexport const SUBMIT_BUTTON_NODE_TYPE = 'SubmitButton';\n\n/**\n * Form content — what a link or a button must never hold: a Form (its controls), a Field (an input, select\n * or textarea), a SubmitButton (a `<button>`) and a FieldGroup (it exists only to hold fields, so it moves as\n * one). A Success / Error block is text and lives only inside its form, so it is not on the list.\n */\nexport const FORM_CONTENT_TYPES: ReadonlySet<string> = new Set([\n FORM_NODE_TYPE, FIELD_NODE_TYPE, FIELD_GROUP_NODE_TYPE, SUBMIT_BUTTON_NODE_TYPE,\n]);\n\n/** The minimum a node must look like — a builder ComponentNode and a saved layout node both do. */\nexport interface NestingNode {\n id?: string;\n type?: string;\n label?: string;\n children?: NestingNode[] | null;\n}\n\nexport function isInteractiveHost(node: NestingNode | null | undefined): boolean {\n return !!node?.type && Object.prototype.hasOwnProperty.call(INTERACTIVE_HOST_TAGS, node.type);\n}\n\nexport function isFormContent(node: NestingNode | null | undefined): boolean {\n return !!node?.type && FORM_CONTENT_TYPES.has(node.type);\n}\n\n/**\n * The first form-content node in `node`'s subtree that sits inside an interactive host, or null. `insideHost`\n * is true when `node` is placed under a host already — so a Form dropped into a link and a link that holds a\n * Form are the same finding.\n */\nexport function formContentInHost(node: NestingNode | null | undefined, insideHost = false): NestingNode | null {\n if (!node) return null;\n if (insideHost && isFormContent(node)) return node;\n const nowInside = insideHost || isInteractiveHost(node);\n for (const child of node.children ?? []) {\n const found = formContentInHost(child, nowInside);\n if (found) return found;\n }\n return null;\n}\n\n/** One place a tree holds form content inside a link or a button. */\nexport interface MisplacedFormContent<N extends NestingNode = NestingNode> {\n /** The OUTERMOST interactive host holding it. */\n host: N;\n /** A MAXIMAL form-content subtree inside it — the Form, never each of its fields. */\n content: N;\n}\n\n/** Every form-content subtree a tree holds inside an interactive host, in document order. */\nexport function findFormContentInHosts<N extends NestingNode>(roots: readonly N[] | null | undefined): MisplacedFormContent<N>[] {\n const out: MisplacedFormContent<N>[] = [];\n const visit = (node: N, host: N | null): void => {\n if (host && isFormContent(node)) {\n out.push({ host, content: node });\n return;\n }\n const nextHost = host ?? (isInteractiveHost(node) ? node : null);\n for (const child of (node.children ?? []) as N[]) visit(child, nextHost);\n };\n for (const root of roots ?? []) visit(root, null);\n return out;\n}\n","/**\n * THE SECOND CHANNEL (premium components N2) — \"or message us on WhatsApp\", the button a form keeps beside its submit,\n * before AND after it sends.\n *\n * It is an ordinary node in the form's actions row (a ButtonBlock that links) carrying the ROLE `form.channel`, so the\n * shared CSS keeps it on screen when the form succeeds and the Publishable gate can find it. Its address is the\n * OWNER's fact: the builder builds it from what the author types (a number, an address, a link) and never invents one —\n * inserted empty, it blocks publishing until it is filled (generation-core `auditSite`, `empty-channel`).\n *\n * Framework-free, like the rest of forms-core.\n */\n\n/** The role the channel's node carries (`iox-role-form-channel`). */\nexport const FORM_CHANNEL_ROLE = 'form.channel';\n/** The role of the row that holds the submit button and the channel (`iox-role-form-actions`). */\nexport const FORM_ACTIONS_ROLE = 'form.actions';\n\nexport enum ChannelKind {\n WhatsApp = 'whatsapp',\n Phone = 'phone',\n Email = 'email',\n Link = 'link',\n}\n\nexport const CHANNEL_KINDS: ReadonlyArray<ChannelKind> = [ChannelKind.WhatsApp, ChannelKind.Phone, ChannelKind.Email, ChannelKind.Link];\n\nconst WHATSAPP_PREFIX = 'https://wa.me/';\nconst TEL_PREFIX = 'tel:';\nconst MAILTO_PREFIX = 'mailto:';\nconst HTTP = /^https?:\\/\\//i;\nconst EMAIL = /^[^\\s@]+@[^\\s@.]+(\\.[^\\s@.]+)+$/;\n/** A phone number's own characters; anything else is typing noise (spaces, dashes, brackets). */\nconst DIGITS = /\\d/g;\n/** WhatsApp's click-to-chat wants the full international number: digits only, no `+`, no leading `00`. */\nconst INTERNATIONAL_00 = /^00/;\n/** A number shorter than this is not a number anyone can be reached on. */\nconst MIN_DIGITS = 6;\n\n/**\n * The address a channel links to, built from what the author typed — or `''` when it gives nothing a visitor could\n * use (no digits, not an email). Never a guess: a WhatsApp number keeps exactly the digits typed (the panel asks for\n * the country code), a link without a scheme gets `https://`.\n */\nexport function channelHref(kind: ChannelKind | string, input: unknown): string {\n const raw = typeof input === 'string' ? input.trim() : '';\n if (!raw) return '';\n switch (kind) {\n case ChannelKind.WhatsApp: {\n const digits = (raw.match(DIGITS) ?? []).join('').replace(INTERNATIONAL_00, '');\n return digits.length >= MIN_DIGITS ? `${WHATSAPP_PREFIX}${digits}` : '';\n }\n case ChannelKind.Phone: {\n const digits = (raw.match(DIGITS) ?? []).join('');\n if (digits.length < MIN_DIGITS) return '';\n return `${TEL_PREFIX}${raw.startsWith('+') ? '+' : ''}${digits}`;\n }\n case ChannelKind.Email:\n return EMAIL.test(raw) ? `${MAILTO_PREFIX}${raw}` : '';\n case ChannelKind.Link:\n return HTTP.test(raw) ? raw : `https://${raw.replace(/^\\/+/, '')}`;\n default:\n return '';\n }\n}\n\n/** A channel's address back into what the panel shows: its kind and the value the author typed. */\nexport function parseChannelHref(href: unknown): { kind: ChannelKind; value: string } {\n const text = typeof href === 'string' ? href.trim() : '';\n if (text.toLowerCase().startsWith(WHATSAPP_PREFIX)) return { kind: ChannelKind.WhatsApp, value: text.slice(WHATSAPP_PREFIX.length).split(/[?#]/)[0] };\n if (text.toLowerCase().startsWith(TEL_PREFIX)) return { kind: ChannelKind.Phone, value: text.slice(TEL_PREFIX.length) };\n if (text.toLowerCase().startsWith(MAILTO_PREFIX)) return { kind: ChannelKind.Email, value: text.slice(MAILTO_PREFIX.length).split('?')[0] };\n if (!text) return { kind: ChannelKind.WhatsApp, value: '' };\n return { kind: ChannelKind.Link, value: text };\n}\n\n/** True when the channel goes somewhere a visitor can use — the gate's \"filled\". */\nexport function isChannelFilled(href: unknown): boolean {\n const { kind, value } = parseChannelHref(href);\n return !!value && channelHref(kind, value) !== '';\n}\n\n/** A WhatsApp or web channel opens in a new tab; a call or an email hands over to the device. */\nexport function channelOpensNewTab(kind: ChannelKind | string): boolean {\n return kind === ChannelKind.WhatsApp || kind === ChannelKind.Link;\n}\n","/**\n * A Field as MARKUP — the string renderer's copy of `IoxFieldComponent`'s template, in ONE place (it lived in the\n * engine's `layout-renderer.service.ts`, a second copy beside the component). The engine's string path writes it; the\n * component mirrors it element for element, so hydration replaces like with like and the shared CSS (iox-forms.css,\n * the contract's field baseline) reaches both.\n *\n * Choices (premium N1): a `<fieldset>` whose `<legend>` is the label, its options native radios (one answer — the\n * arrow keys move and pick, with no script) or checkboxes (several), each inside a `<label>` that IS the chip; the\n * input is visually hidden, never removed. Date (N8): a `<button>` that says the date in words and opens the look's\n * calendar, with a hidden input carrying the ISO day — the raw SSR is the final markup (nothing shifts on hydrate).\n *\n * Framework-free, like the rest of forms-core: `escape` is the caller's.\n */\n\nimport { ChoiceAppearance, ControlType } from './form.model';\nimport { datePickerWords } from './dates';\nimport { fieldOptionsOf } from './options';\n\n/** The classes the markup carries — the runtimes and the shared CSS key on these, never on a literal. */\nexport enum FieldClass {\n Root = 'iox-field',\n Label = 'iox-field__label',\n LabelHidden = 'iox-field__label--hidden',\n Required = 'iox-field__required',\n Control = 'iox-field__control',\n Help = 'iox-field__help',\n Error = 'iox-field__error',\n Group = 'iox-field__group',\n Option = 'iox-field__option',\n Choices = 'iox-field__choices',\n ChoicesChips = 'iox-field__choices--chips',\n ChoicesList = 'iox-field__choices--list',\n Chips = 'iox-field__chips',\n Chip = 'iox-field__chip',\n ChipInput = 'iox-field__control--chip',\n DateButton = 'iox-field__control--date',\n DateValue = 'iox-field__date-value',\n DateIcon = 'iox-field__date-icon',\n DateInput = 'iox-field__date-input',\n}\n\n/** On the date button: the raw Earliest / Latest (`'0'`, an ISO day), resolved by the visitor's own today. */\nexport const DATE_MIN_ATTRIBUTE = 'data-iox-date-min';\nexport const DATE_MAX_ATTRIBUTE = 'data-iox-date-max';\n/** On the date's words while no day is chosen (the placeholder's colour keys on it). */\nexport const DATE_EMPTY_ATTRIBUTE = 'data-iox-empty';\n\n/** The calendar glyph inside the date button: one path set, drawn in currentColor, never announced. */\nexport const DATE_ICON_SVG = '<svg class=\"iox-field__date-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">' +\n '<rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15.5\" rx=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/>' +\n '<path d=\"M3.5 10h17M8 3v4M16 3v4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"/></svg>';\n\n/** The controls that are a plain `<input type=…>`; anything else unknown is a text input. */\nconst INPUT_TYPES: ReadonlySet<string> = new Set(['email', 'tel', 'url', 'number', 'password', 'time', 'file', 'hidden']);\n\n/** The `<input type>` of a control that renders as a plain input. */\nexport function inputTypeOf(control: string): string {\n return INPUT_TYPES.has(control) ? control : 'text';\n}\n\n/** A Choices field's appearance; anything unknown reads as chips (the default). */\nexport function choiceAppearanceOf(props: Record<string, any> | null | undefined): ChoiceAppearance {\n return props?.['appearance'] === ChoiceAppearance.List ? ChoiceAppearance.List : ChoiceAppearance.Chips;\n}\n\nexport interface FieldMarkupOptions {\n /** The name the field submits under — its FORM's unique name for it (`formFieldNames`, vectoriox/iox-ui#43). */\n name: string;\n /** The control's id; the label, help and error ids derive from it. */\n id: string;\n /** The node's classes (`iox-node-…`, the element-style marker…). */\n cls: string;\n /** Anything else the host element carries, written verbatim (an entrance's style). */\n attrs?: string;\n /** The site's language (the date's words). */\n lang?: string | null;\n escape: (value: string) => string;\n}\n\n/** A Field's whole element, as the string renderer writes it. */\nexport function fieldHtml(props: Record<string, any> | null | undefined, options: FieldMarkupOptions): string {\n const p = props ?? {};\n const { name, id, escape: esc } = options;\n const control = String(p['control'] ?? ControlType.Text);\n const required = !!p['required'];\n const help = p['help'] ? `<p class=\"${FieldClass.Help}\" id=\"${id}-help\">${esc(String(p['help']))}</p>` : '';\n const describedBy = p['help'] ? ` aria-describedby=\"${id}-help\"` : '';\n const labelClass = p['labelHidden'] ? `${FieldClass.Label} ${FieldClass.LabelHidden}` : FieldClass.Label;\n const mark = required ? `<span class=\"${FieldClass.Required}\" aria-hidden=\"true\">*</span>` : '';\n const text = esc(String(p['label'] ?? ''));\n const label = `<label class=\"${labelClass}\" id=\"${id}-label\" for=\"${id}\">${text}${mark}</label>`;\n const hidden = control === ControlType.Hidden ? ' hidden' : '';\n const open = `<div class=\"${FieldClass.Root} ${options.cls}\" data-iox-field=\"${esc(name)}\"${hidden}${options.attrs ?? ''}>`;\n\n if (control === ControlType.Choices) {\n return `${open}${choicesHtml(p, options, `<legend class=\"${labelClass}\" id=\"${id}-label\">${text}${mark}</legend>`, describedBy)}${help}</div>`;\n }\n return `${open}${label}${controlHtml(p, control, options, describedBy)}${help}</div>`;\n}\n\nfunction controlHtml(p: Record<string, any>, control: string, options: FieldMarkupOptions, describedBy: string): string {\n const { id, escape: esc } = options;\n const name = esc(options.name);\n const required = p['required'] ? ' required' : '';\n const placeholder = p['placeholder'] ? ` placeholder=\"${esc(String(p['placeholder']))}\"` : '';\n const choices = fieldOptionsOf(p);\n const option = (o: { value: string; label: string }) => `<option value=\"${esc(o.value)}\">${esc(o.label)}</option>`;\n const num = (v: unknown, d: number) => (Number.isFinite(Number(v)) && v !== '' && v !== null ? Number(v) : d);\n\n switch (control) {\n case ControlType.Textarea:\n return `<textarea class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\" rows=\"${num(p['rows'], 4)}\"${placeholder}${required}${describedBy}></textarea>`;\n case ControlType.Select:\n return `<select class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\"${required}${describedBy}>` +\n `<option value=\"\">${esc(String(p['placeholder'] ?? ''))}</option>${choices.map(option).join('')}</select>`;\n case ControlType.Switch:\n return `<input class=\"${FieldClass.Control} iox-field__control--switch\" type=\"checkbox\" role=\"switch\" id=\"${id}\" name=\"${name}\"${describedBy}>`;\n case ControlType.Range:\n return `<input class=\"${FieldClass.Control} iox-field__control--range\" type=\"range\" id=\"${id}\" name=\"${name}\" ` +\n `min=\"${num(p['rangeMin'], 0)}\" max=\"${num(p['rangeMax'], 100)}\" step=\"${num(p['rangeStep'], 1)}\"${describedBy}>`;\n case ControlType.Radio:\n return `<div class=\"${FieldClass.Group}\" role=\"radiogroup\" aria-labelledby=\"${id}-label\">` +\n choices.map(o => `<label class=\"${FieldClass.Option}\"><input class=\"${FieldClass.Control} iox-field__control--radio\" type=\"radio\" name=\"${name}\" ` +\n `value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`).join('') + `</div>`;\n case ControlType.Checkbox:\n return `<input class=\"${FieldClass.Control} iox-field__control--checkbox\" type=\"checkbox\" id=\"${id}\" name=\"${name}\"${required}${describedBy}>`;\n case ControlType.Date:\n return dateHtml(p, options, describedBy);\n default:\n return `<input class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\" type=\"${inputTypeOf(control)}\"${placeholder}${required}${describedBy}>`;\n }\n}\n\n/** A Choices field's fieldset: the legend, then the options as chips or as a list. */\nfunction choicesHtml(p: Record<string, any>, options: FieldMarkupOptions, legend: string, describedBy: string): string {\n const { escape: esc } = options;\n const name = esc(options.name);\n const multiple = p['multiple'] === true;\n const type = multiple ? 'checkbox' : 'radio';\n const chips = choiceAppearanceOf(p) === ChoiceAppearance.Chips;\n const items = fieldOptionsOf(p).map(o => chips\n ? `<label class=\"${FieldClass.Chip}\"><input class=\"${FieldClass.Control} ${FieldClass.ChipInput}\" type=\"${type}\" name=\"${name}\" value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`\n : `<label class=\"${FieldClass.Option}\"><input class=\"${FieldClass.Control}\" type=\"${type}\" name=\"${name}\" value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`).join('');\n const look = chips ? FieldClass.ChoicesChips : FieldClass.ChoicesList;\n const row = chips ? FieldClass.Chips : FieldClass.Group;\n return `<fieldset class=\"${FieldClass.Choices} ${look}\"${describedBy}>${legend}<div class=\"${row}\">${items}</div></fieldset>`;\n}\n\n/** The date picker's button + hidden input. The calendar itself is the runtime's, opened on press. */\nfunction dateHtml(p: Record<string, any>, options: FieldMarkupOptions, describedBy: string): string {\n const { id, escape: esc } = options;\n const words = datePickerWords(options.lang);\n const empty = esc(String(p['placeholder'] || words.choose));\n const bound = (attr: string, raw: unknown) => (typeof raw === 'string' && raw.trim() !== '') || typeof raw === 'number' ? ` ${attr}=\"${esc(String(raw).trim())}\"` : '';\n return `<button type=\"button\" class=\"${FieldClass.Control} ${FieldClass.DateButton}\" id=\"${id}\" aria-haspopup=\"dialog\" aria-expanded=\"false\" ` +\n `aria-labelledby=\"${id}-label ${id}-value\"${describedBy}${bound(DATE_MIN_ATTRIBUTE, p['earliest'])}${bound(DATE_MAX_ATTRIBUTE, p['latest'])}>` +\n `<span class=\"${FieldClass.DateValue}\" id=\"${id}-value\" ${DATE_EMPTY_ATTRIBUTE}>${empty}</span>${DATE_ICON_SVG}</button>` +\n `<input type=\"hidden\" class=\"${FieldClass.DateInput}\" name=\"${esc(options.name)}\" value=\"\">`;\n}\n","/*\n * @vectoriox/iox-ui/forms-core — the shared, FRAMEWORK-FREE core of the forms feature.\n *\n * ⚠️ Nothing in this entry point may import Angular, RxJS, the DOM, or Node. It is consumed by\n * THREE runtimes: the builder canvas (Angular), the SSR engine (Angular), and `iox-cms` (NestJS,\n * plain Node). The main `@vectoriox/iox-ui` entry pulls in `@angular/core`, which Nest must never\n * load — that is the entire reason this secondary entry point exists.\n *\n * Client-side validation is UX; server-side validation is truth. Both run THIS code, so they cannot\n * disagree. See iox-ai-guidance `architecture/builder/forms-and-inputs-plan.md` §5.\n */\n\nexport * from './form.model';\nexport * from './messages';\nexport * from './validate';\nexport * from './collect';\nexport * from './options';\nexport * from './runtime';\nexport * from './rule-catalog';\nexport * from './transport';\nexport * from './submit-lifecycle';\nexport * from './form-presets';\nexport * from './nesting';\nexport * from './dates';\nexport * from './channel';\nexport * from './field-markup';\n","import { Injectable, InjectionToken } from '@angular/core';\n\nimport {\n DEFAULT_EN_MESSAGES,\n FeedbackTiming,\n FieldError,\n FieldSpec,\n FormRuntimeState,\n FormSpec,\n INITIAL_FORM_STATE,\n onFieldBlur,\n onFieldChange,\n onSubmitAttempt,\n resetFormState,\n shouldShowError,\n uniqueFieldNames,\n} from '../../../forms-core/public-api';\n\n/**\n * A Field as its form's runtime knows it. Functions, not values: a trait edited on the canvas takes effect without\n * re-registering. `baseName` is the field's own key (its override, else its label's); the FORM makes it unique against\n * the fields before it — forms-core `uniqueFieldNames`, the rule the saved spec and the string renderer use (iox-ui#43).\n * `spec` is handed that unique name. A registration without `baseName` is named by its spec.\n */\nexport interface RegisteredField {\n baseName?: () => string;\n spec: (name: string) => FieldSpec;\n getValue: () => any;\n}\n\n/**\n * How a message KEY becomes text a visitor reads.\n *\n * Translation belongs to the consumer, not the library: the CMS client has ngx-translate, the SSR\n * engine has the page's locale bundle. Providing this token is how each one plugs its own in. The\n * default below interpolates the built-in English strings, so a consumer that provides nothing\n * still shows real sentences rather than raw keys.\n */\nexport type FormMessageResolver = (key: string, params?: Record<string, any>) => string;\n\nexport const IOX_FORM_MESSAGES = new InjectionToken<FormMessageResolver>('IOX_FORM_MESSAGES', {\n providedIn: 'root',\n factory: () => defaultMessageResolver,\n});\n\n/** `{{n}}` / `{{field}}` interpolation over the built-in English catalog. */\nexport const defaultMessageResolver: FormMessageResolver = (key, params) => {\n const template = DEFAULT_EN_MESSAGES[key] ?? key;\n if (!params) return template;\n return template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, name) => String(params[name] ?? ''));\n};\n\n/**\n * Per-form runtime. **Provided by `IoxFormComponent`**, so every Field created into that form's\n * `childrenHost` resolves THIS instance through its element injector — which is exactly how a field\n * finds its form without a form-id, matching the ancestry rule (decision D1). A Field outside any\n * form injects nothing and simply renders.\n *\n * All the decisions live in the pure `forms-core` runtime; this class only holds the mutable state,\n * the registered fields and the Angular-shaped API. Nothing here decides *when* an error shows.\n */\n@Injectable()\nexport class FormRuntimeService {\n /** Registered fields, in DOM order — the order the spec, the unique names and focus-first-invalid depend on. */\n private readonly fields: RegisteredField[] = [];\n\n private _state: FormRuntimeState = INITIAL_FORM_STATE;\n private _spec: FormSpec | null = null;\n private _timing: FeedbackTiming | string = FeedbackTiming.Smart;\n\n get state(): FormRuntimeState { return this._state; }\n get submitting(): boolean { return this._state.submitting; }\n\n /** Set by the Form from its own traits. */\n configure(spec: FormSpec, timing: FeedbackTiming | string): void {\n this._spec = spec;\n this._timing = timing;\n }\n\n /**\n * A Field announces itself here on init. It passes FUNCTIONS rather than values so the runtime\n * always reads the field's current spec and value — a trait edited on the canvas takes effect\n * without re-registering anything.\n */\n register(field: RegisteredField): () => void {\n this.fields.push(field);\n return () => {\n const index = this.fields.indexOf(field);\n if (index >= 0) this.fields.splice(index, 1);\n };\n }\n\n /** Every registered field's submitted name, in order — unique within the form (iox-ui#43). */\n private names(): string[] {\n return uniqueFieldNames(this.fields.map(f => (f.baseName ? f.baseName() : f.spec('').name)));\n }\n\n /** The name the form gives one registered field, or null when it is not this form's. */\n nameOf(field: RegisteredField): string | null {\n const index = this.fields.indexOf(field);\n return index < 0 ? null : this.names()[index];\n }\n\n /** The live spec, derived from what is registered right now. */\n specNow(): FormSpec {\n const base = this._spec ?? {\n formId: '', name: '', feedback: FeedbackTiming.Smart,\n fields: [], actions: [], antiSpam: { honeypot: true, minFillMs: 1200 },\n };\n const names = this.names();\n return { ...base, fields: this.fields.map((f, i) => ({ ...f.spec(names[i]), name: names[i] })) };\n }\n\n /** Current values, keyed by submitted field name. */\n values(): Record<string, any> {\n const out: Record<string, any> = {};\n const names = this.names();\n this.fields.forEach((field, i) => { out[names[i]] = field.getValue(); });\n return out;\n }\n\n onChange(name: string): void {\n this._state = onFieldChange(this._state, name, this.values(), this.specNow());\n }\n\n onBlur(name: string): void {\n this._state = onFieldBlur(this._state, name, this.values(), this.specNow());\n }\n\n /** Validate everything. Returns whether the submission may proceed. */\n validateAll(): boolean {\n this._state = onSubmitAttempt(this._state, this.values(), this.specNow());\n return Object.keys(this._state.errors).length === 0;\n }\n\n setSubmitting(submitting: boolean): void {\n this._state = { ...this._state, submitting };\n }\n\n /** The server rejected it — its verdict replaces ours. */\n applyErrors(errors: Record<string, FieldError>): void {\n this._state = { ...this._state, submitted: true, submitting: false, errors: { ...errors } };\n }\n\n reset(): void {\n this._state = resetFormState();\n }\n\n /** Whether this field's error is allowed on screen right now. */\n showsError(name: string): boolean {\n return shouldShowError(name, this._state, this._timing);\n }\n\n errorFor(name: string): FieldError | undefined {\n return this._state.errors[name];\n }\n\n /** The first invalid field in registration (DOM) order — what submit should focus. */\n firstInvalidName(): string | null {\n for (const name of this.names()) {\n if (this._state.errors[name]) return name;\n }\n return null;\n }\n}\n","import { prefersReducedMotion } from '../../motion/motion';\n\n/**\n * The shake a failing field gives after a refused submit (premium components N2) — Emil 134: the named effect for\n * rejected input. ONE function for the component path, the string path and the canvas (a field put in its error state\n * on the canvas shakes once, so the author sees the motion they are designing).\n *\n * WAAPI, `composite: 'add'`, so it moves the field from wherever its own transform puts it. A second refused submit\n * CANCELS the running shake and starts clean — never two stacked (Emil 52/62). Under reduced motion there is no shake:\n * focus and the message still happen (Emil 192 — the meaning survives without the movement).\n */\n\n/** ±6 → ±4 → rest: a decaying side-to-side (the prototype's, Doron-approved). */\nexport const SHAKE_KEYFRAMES: ReadonlyArray<Keyframe> = Object.freeze([\n { transform: 'translateX(0px)' },\n { transform: 'translateX(-6px)' },\n { transform: 'translateX(6px)' },\n { transform: 'translateX(-4px)' },\n { transform: 'translateX(4px)' },\n { transform: 'translateX(0px)' },\n]);\n/** Under Emil's UI budget (28) and long enough to read as \"no\" (134). */\nexport const SHAKE_DURATION_MS = 320;\n/** Emil 18 — the strong ease-out. */\nexport const SHAKE_EASING = 'cubic-bezier(0.23, 1, 0.32, 1)';\n\nconst RUNNING = '__ioxShake';\n\n/** Shake `el` once; returns the animation, or null when nothing plays (no element, no WAAPI, reduced motion). */\nexport function shakeElement(el: Element | null | undefined, reducedMotion: boolean = prefersReducedMotion()): Animation | null {\n if (!el) return null;\n const host = el as Element & { [RUNNING]?: Animation };\n host[RUNNING]?.cancel();\n delete host[RUNNING];\n if (reducedMotion || typeof (el as HTMLElement).animate !== 'function') return null;\n const animation = (el as HTMLElement).animate(SHAKE_KEYFRAMES as Keyframe[], { duration: SHAKE_DURATION_MS, easing: SHAKE_EASING, composite: 'add' });\n host[RUNNING] = animation;\n animation.onfinish = () => { if (host[RUNNING] === animation) delete host[RUNNING]; };\n return animation;\n}\n","import { FormRenderState, SUBMIT_KEEP_ENABLED_ATTRIBUTE, submitButtonView } from '../../../forms-core/public-api';\n\nconst SUBMIT_BUTTON_SELECTOR = '.iox-submit';\nconst FORM_SELECTOR = 'form, .iox-form';\n\n/**\n * Put every submit button of `form` in the form's state (vectoriox/iox-ui#42): busy (`aria-busy`) and — unless its\n * author turned it off — disabled while the form sends; itself again otherwise. The ONE applier: the component path's\n * form, the string runtime and the canvas's Sending state all call it, from the shared `submitButtonView`. A button\n * inside a nested form belongs to that form, not this one.\n */\nexport function syncSubmitButtons(form: Element | null | undefined, state: FormRenderState | string | null | undefined): void {\n if (!form?.querySelectorAll) return;\n for (const button of Array.from(form.querySelectorAll<HTMLElement>(SUBMIT_BUTTON_SELECTOR))) {\n if (button.closest?.(FORM_SELECTOR) !== form) continue;\n const view = submitButtonView(state, !button.hasAttribute(SUBMIT_KEEP_ENABLED_ATTRIBUTE));\n if (view.busy) button.setAttribute('aria-busy', 'true');\n else button.removeAttribute('aria-busy');\n if (view.disabled) button.setAttribute('disabled', '');\n else button.removeAttribute('disabled');\n }\n}\n","import { Component, ElementRef, EventEmitter, Inject, InjectionToken, Input, OnChanges, OnInit, Optional, Output, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport {\n failureAnnouncement,\n FeedbackTiming,\n FormRenderState,\n FormTransport,\n HONEYPOT_FIELD,\n submitOutcome,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { FormRuntimeService } from './form-runtime.service';\nimport { shakeElement } from './shake';\nimport { syncSubmitButtons } from './submit-buttons';\n\n/**\n * How a host makes the form actually send. The SSR engine provides one (an HttpClient POST); the\n * builder canvas deliberately does NOT — an author pressing Submit while designing must never file\n * a real submission. Without it the component keeps its original behaviour and only emits\n * `formSubmit`, which is also the escape hatch for a host that wants the transport itself.\n */\nexport const IOX_FORM_TRANSPORT = new InjectionToken<FormTransport>('IOX_FORM_TRANSPORT');\n\n/** Where a successful submit sends the visitor. Provided by the host; absent on the canvas. */\nexport const IOX_FORM_NAVIGATOR = new InjectionToken<(url: string) => void>('IOX_FORM_NAVIGATOR');\n\n/** Which of the form's four states the canvas / runtime is showing — forms-core's, shared with the string runtime. */\nexport { FormRenderState } from '../../../forms-core/public-api';\n\n/**\n * Directive-host Form: the real `<form>` IS the host — no wrapper, no inner/outer split. Children\n * (fields, layout, the submit button, and the two state blocks) render into it via `childrenHost`.\n *\n * Scope is ANCESTRY, not naming (decision D1): a Field belongs to its nearest ancestor Form, so\n * there is no form-id to pick and nothing to mis-wire. The runtime finds its fields by walking the\n * DOM it owns.\n *\n * `renderState` drives which children are visible. In the builder it is set by the canvas state\n * switcher so an author can DESIGN the success and error blocks; at runtime the same input is\n * driven by the submit lifecycle. One mechanism, two drivers — the author designs exactly what a\n * visitor will see.\n *\n * ⚠️ `novalidate` is deliberate: the browser's native bubbles would pre-empt our own messages,\n * which are styleable, translated and announced. Validation still runs — ours does it.\n */\n@Component({\n selector: 'form[iox-form]',\n // The honeypot is part of the form's own markup, not a child node: it must exist on every form\n // without an author adding it, and it must never be visible or reachable. `tabindex=\"-1\"` and\n // `aria-hidden` keep it away from keyboard and screen-reader users; only a bot filling every\n // input will touch it.\n template: `\n <div class=\"iox-form__hp\" aria-hidden=\"true\">\n <input type=\"text\" [attr.name]=\"honeypotField\" tabindex=\"-1\" autocomplete=\"off\" />\n </div>\n <!-- Failure announcement (board 11). Visually hidden and always PRESENT — an aria-live\n region added to the DOM at the moment it gains text is not reliably announced; the\n region has to be there first and only its content change. -->\n <div *ngIf=\"announceFailure\"\n class=\"iox-form__hp\"\n role=\"status\"\n aria-live=\"assertive\"\n aria-atomic=\"true\">{{ announcement }}</div>\n <ng-container #childrenHost></ng-container>\n `,\n host: {\n '[class]': \"'iox-form iox-node-' + nodeId\",\n '[attr.novalidate]': \"''\",\n '[attr.data-iox-form]': 'formId || null',\n '[attr.data-iox-state]': 'renderState',\n '[attr.aria-busy]': \"renderState === 'submitting' ? 'true' : null\",\n '(submit)': 'onSubmit($event)',\n },\n // Per-form instance. A Field created into `childrenHost` resolves THIS one through its element\n // injector — which is how a field finds its form without a form-id (decision D1).\n providers: [FormRuntimeService],\n // Visibility rules and the honeypot's off-screen box live in the SHARED `styles/iox-forms.css` asset,\n // not here: the string renderer writes the same markup, so a scoped copy would drift.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormComponent implements OnChanges, OnInit {\n @Input() nodeId = '';\n /** Stable id the submit endpoint resolves the saved spec by. */\n @Input() formId = '';\n /** Author-facing name — what the submissions inbox groups by. */\n @Input() name = '';\n /** Which state shows. Every change puts the submit buttons in it too (busy / disabled — iox-ui#42), through the\n * ONE applier the string runtime and the canvas call. */\n @Input() set renderState(state: FormRenderState | string) {\n this._renderState = state;\n syncSubmitButtons(this.host?.nativeElement, state);\n }\n get renderState(): FormRenderState | string { return this._renderState; }\n private _renderState: FormRenderState | string = FormRenderState.Idle;\n @Input() feedback: FeedbackTiming | string = FeedbackTiming.Smart;\n\n /**\n * Move focus to the first field that failed, instead of leaving the visitor to hunt for red\n * text. On by default — the single most valuable thing a failed submit can do.\n */\n @Input() focusFirstProblem = true;\n\n /**\n * Speak the failure the moment it happens. Without this a screen-reader user only learns a\n * submit failed if they happen to tab back into the message — the error text is rendered, but\n * nothing directs them to it.\n */\n @Input() announceFailure = true;\n\n /** What the live region is currently saying. Empty between attempts so the same failure\n * announces again rather than being swallowed as an unchanged value. */\n announcement = '';\n\n /**\n * Emitted ONLY when client-side validation passes, carrying the collected values. The host\n * (builder canvas or engine runtime) owns the transport — posting, retries and the server's\n * verdict — so the same component serves both renderers.\n */\n @Output() formSubmit = new EventEmitter<{ values: Record<string, any>; event: Event }>();\n /** Emitted when a submit attempt was refused locally, so a host can react (analytics, focus). */\n @Output() validationFailed = new EventEmitter<Record<string, any>>();\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n /** Exposed to the template so the input's name and the server's check cannot drift. */\n readonly honeypotField = HONEYPOT_FIELD;\n /** When this form was rendered — the fill-time signal the server checks. */\n private renderedAt = 0;\n /** Guards against a double submit while a POST is in flight. */\n private inFlight = false;\n\n /**\n * Constructor injection rather than `inject()`, for the same reason as Field: this library's\n * specs construct components directly. `runtime` is provided by THIS component (see\n * `providers`), so every Field created into `childrenHost` resolves this instance by ancestry.\n */\n constructor(\n private readonly runtime: FormRuntimeService,\n private readonly host: ElementRef<HTMLElement>,\n @Optional() @Inject(IOX_FORM_TRANSPORT) private readonly transport: FormTransport | null = null,\n @Optional() @Inject(IOX_FORM_NAVIGATOR) private readonly navigate: ((url: string) => void) | null = null,\n ) {}\n\n ngOnInit(): void {\n // Stamp render time for the fill-time check. Taken ONCE, when the form appears — the whole\n // point is the gap between seeing the form and sending it.\n this.renderedAt = Date.now();\n }\n\n ngOnChanges(): void {\n // Traits are edited by DIRECT ASSIGNMENT on the canvas, which does not call ngOnChanges —\n // but `feedback` is also read live by `runtime.showsError`, so re-configuring here covers\n // the setInput path and the getter covers the rest.\n this.runtime.configure(this.runtime.specNow(), this.feedback);\n }\n\n onSubmit(event: Event): void {\n // Never let the browser navigate: a full page POST would lose the designed Success state\n // and every value the visitor typed.\n event.preventDefault();\n // Sent is final (premium N2): the button reads \"Sent\" and is disabled — an Enter in a field sends nothing twice.\n if (this.renderState === FormRenderState.Success) return;\n this.runtime.configure(this.runtime.specNow(), this.feedback);\n\n if (!this.runtime.validateAll()) {\n this.announce(this.runtime.state.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n this.validationFailed.emit(this.runtime.state.errors);\n return;\n }\n const values = this.runtime.values();\n this.formSubmit.emit({ values, event });\n\n // No transport means the host owns sending (the builder canvas, which must never post).\n if (!this.transport || this.inFlight) return;\n void this.send(values);\n }\n\n /**\n * The submit lifecycle, owned HERE so both hosts get the same one: submitting → the server's\n * verdict → success (and an optional redirect) or error. Only the HTTP call itself is the\n * host's, which is the one part that genuinely differs between the engine and anything else.\n */\n private async send(values: Record<string, any>): Promise<void> {\n this.inFlight = true;\n this.renderState = FormRenderState.Submitting;\n this.runtime.setSubmitting(true);\n\n let response: SubmitResponse;\n try {\n response = await this.transport!({\n formId: this.formId,\n values: withAntiSpamFields(values, this.renderedAt, this.honeypotValue()),\n });\n } catch {\n // The call never reached the server. Showing Success here would tell the visitor their\n // message was sent when nothing was stored — the one lie this feature must not tell.\n response = { ok: false };\n }\n\n this.inFlight = false;\n this.runtime.setSubmitting(false);\n this.applyResponse(response);\n }\n\n /** Turn the server's answer into what the visitor sees — the shared `submitOutcome`, which the string runtime\n * applies too. Public so a host-owned transport can reuse it. */\n applyResponse(response: SubmitResponse): void {\n const outcome = submitOutcome(response);\n this.renderState = outcome.state;\n if (outcome.errors) {\n this.runtime.applyErrors(outcome.errors);\n this.announce(outcome.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n return;\n }\n if (outcome.state === FormRenderState.Error) {\n this.announce(null);\n return;\n }\n // Clear the values so a visitor who stays on the page does not see their old answers behind\n // the success message, and cannot resubmit them by pressing enter.\n this.runtime.reset();\n this.resetControls();\n if (outcome.redirect && this.navigate) this.navigate(outcome.redirect);\n }\n\n /** The honeypot input's value, if the host rendered one. Absent reads as empty — never as spam. */\n private honeypotValue(): string {\n const input = this.host.nativeElement\n .querySelector?.<HTMLInputElement>(`input[name=\"${HONEYPOT_FIELD}\"]`);\n return input?.value ?? '';\n }\n\n /** Blank the real DOM controls after a success. The runtime state alone would leave them filled. */\n private resetControls(): void {\n const form = this.host.nativeElement as HTMLFormElement;\n if (typeof form.reset === 'function') form.reset();\n }\n\n /**\n * Put the failure into the live region. Cleared first so two identical failures in a row are\n * two announcements, not one — a live region only speaks on CHANGE, and \"same error again\"\n * is exactly when a visitor most needs telling.\n */\n private announce(errors: Record<string, any> | null): void {\n if (!this.announceFailure) return;\n const next = failureAnnouncement(errors);\n this.announcement = '';\n // A microtask is enough for the empty value to be committed before the new one lands.\n Promise.resolve().then(() => { this.announcement = next; });\n }\n\n /** Focus the first field that failed and shake it once (premium N2 — Emil 134; none under reduced motion). */\n private focusFirstInvalid(): void {\n const name = this.runtime.firstInvalidName();\n if (!name) return;\n // Compare the attribute rather than interpolating the name into a selector: `CSS.escape` is\n // a browser-only global (undefined on the server and under the unit-test runner), and an\n // author-overridden field key can contain characters a raw selector would choke on.\n const fields = this.host.nativeElement.querySelectorAll?.('[data-iox-field]') ?? [];\n for (const element of Array.from(fields) as HTMLElement[]) {\n if (element.getAttribute('data-iox-field') !== name) continue;\n element.querySelector<HTMLElement>('.iox-field__control')?.focus();\n shakeElement(element);\n return;\n }\n }\n}\n","/**\n * placeFloating — where a panel anchored to a control goes (premium components N8, reused by M5's tooltip and popover).\n *\n * ONE pure decision for every floating panel: under its anchor, aligned to the anchor's reading start (the left edge in\n * LTR, the right in RTL); above it when there is no room below and more above; held inside the viewport with a margin;\n * and the transform-origin AT the anchor, so the panel grows from the control that opened it (Emil 47) — even when the\n * clamp moved it sideways.\n *\n * Lives in the main entry: nothing server-side places a panel, and the date picker (now) and the floating family (M5)\n * are DOM runtimes of the main entry. Pure — no DOM read here: the caller measures, this decides, the caller writes.\n */\n\nexport interface FloatingRect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface FloatingSize {\n width: number;\n height: number;\n}\n\nexport interface FloatingViewport {\n width: number;\n height: number;\n}\n\nexport enum FloatingSide {\n Below = 'below',\n Above = 'above',\n}\n\nexport interface FloatingOptions {\n /** Space between the anchor and the panel. */\n gap?: number;\n /** Space the panel always keeps from the viewport's edges. */\n margin?: number;\n /** Right-to-left: the panel lines up with the anchor's right edge. */\n rtl?: boolean;\n}\n\nexport interface FloatingPlacement {\n top: number;\n left: number;\n side: FloatingSide;\n /** A CSS transform-origin in the panel's own box, pointing at the anchor's reading-start corner. */\n origin: string;\n}\n\n/** Emil's popover spacing: close enough to read as the control's, clear of its focus ring. */\nexport const FLOATING_GAP = 8;\n/** The viewport margin — a panel never touches the screen's edge. */\nexport const FLOATING_MARGIN = 12;\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), Math.max(min, max));\n\n/** Where `panel` goes beside `anchor` inside `viewport`. */\nexport function placeFloating(anchor: FloatingRect, panel: FloatingSize, viewport: FloatingViewport, options: FloatingOptions = {}): FloatingPlacement {\n const gap = options.gap ?? FLOATING_GAP;\n const margin = options.margin ?? FLOATING_MARGIN;\n const anchorBottom = anchor.top + anchor.height;\n const roomBelow = viewport.height - anchorBottom - gap - margin;\n const roomAbove = anchor.top - gap - margin;\n // Below is the default; above only when below is too short AND above is roomier (a field near the screen's foot).\n const side = roomBelow >= panel.height || roomBelow >= roomAbove ? FloatingSide.Below : FloatingSide.Above;\n const wantTop = side === FloatingSide.Below ? anchorBottom + gap : anchor.top - gap - panel.height;\n const top = clamp(wantTop, margin, viewport.height - margin - panel.height);\n\n const start = options.rtl ? anchor.left + anchor.width : anchor.left;\n const wantLeft = options.rtl ? start - panel.width : start;\n const left = clamp(wantLeft, margin, viewport.width - margin - panel.width);\n\n // The origin is the anchor's start corner, in the panel's own coordinates, kept on the panel's box.\n const originX = Math.round(clamp(start - left, 0, panel.width));\n const originY = side === FloatingSide.Below ? 0 : Math.round(panel.height);\n return { top: Math.round(top), left: Math.round(left), side, origin: `${originX}px ${originY}px` };\n}\n","import {\n CalendarMonth, calendarKeyTarget, calendarMonth, clampIso, DATE_EMPTY_ATTRIBUTE, DATE_MAX_ATTRIBUTE, DATE_MIN_ATTRIBUTE, datePickerWords, DatePickerWords,\n FieldClass, formatDateInWords, isIsoDate, parseDateBound, resolveDateBound, todayIso, weekStartFor, addMonthsIso,\n} from '../../../forms-core/public-api';\nimport { placeFloating } from '../../floating/place-floating';\n\n/**\n * THE DATE PICKER (premium components N8) — the APG date picker dialog, wearing the look. ONE DOM runtime for the\n * engine's component path and its string path; the builder canvas draws the same panel for its design-time Open state\n * (`showCalendarDesign`). The month, the keys and the bounds are forms-core's (`dates.ts`); this file only draws them,\n * places them and moves focus.\n *\n * - A modal `<dialog>` INSIDE the field, so it inherits the look's tokens and the section's scheme, and the field's\n * part styles reach it; on a laptop it is a popover under the field (above when there is no room) growing from it, on\n * a phone a bottom sheet (the shared CSS — `iox-forms.css` / `iox-design.css` — owns both looks and their motion).\n * - The grid always has six rows; a month change is instant (Emil 2/65 — rapid, keyboard-driven UI never animates).\n * - Roving focus: one day is the Tab stop. Arrows move a day (mirrored in RTL), Home/End the week, PageUp/PageDown a\n * month (Shift: a year), Enter/Space pick, Esc closes and gives focus back to the button. Refused days are\n * `aria-disabled` and never picked, by click or by key.\n */\n\nexport interface DatePickerOptions {\n /** The site's language (words, week start, the date in words); else the nearest `[lang]`, else the document's. */\n lang?: string | null;\n /** Right-to-left; else the field's computed direction. */\n rtl?: boolean | null;\n /** Today, for a test; else the visitor's local day. */\n today?: () => string;\n /** The component path's hook: a day was picked (the hidden input is written either way). */\n onPick?: (iso: string) => void;\n /** Page scroll is held while the calendar is open (Lenis would scroll the page under a fixed panel). */\n lockScroll?: () => void;\n unlockScroll?: () => void;\n /** Overrides the built-in words (a host with its own translations). */\n words?: Partial<DatePickerWords>;\n}\n\nexport enum CalendarClass {\n Panel = 'iox-cal',\n Grab = 'iox-cal__grab',\n Head = 'iox-cal__head',\n Title = 'iox-cal__title',\n Nav = 'iox-cal__nav',\n Prev = 'iox-cal__prev',\n Next = 'iox-cal__next',\n Grid = 'iox-cal__grid',\n Weekday = 'iox-cal__weekday',\n Cell = 'iox-cal__cell',\n Day = 'iox-cal__day',\n}\n\n/** On the panel while it leaves (the shared CSS plays the exit on it). */\nexport const CALENDAR_CLOSING_ATTRIBUTE = 'data-iox-closing';\n/** On a panel opened from the KEYBOARD: it appears and goes with no motion (Emil 2 — keyboard actions never animate). */\nexport const CALENDAR_INSTANT_ATTRIBUTE = 'data-iox-instant';\n/** On the panel the builder canvas draws for its design-time Open state (in the flow, inert). */\nexport const CALENDAR_DESIGN_ATTRIBUTE = 'data-iox-cal-design';\n/** A phone gets the sheet (the drawer curve, the scrim) — the same width the shared CSS keys on. */\nexport const CALENDAR_SHEET_QUERY = '(max-width: 767px)';\n\nconst RUNTIME = '__ioxDatePicker';\nconst ISO_ATTRIBUTE = 'data-iox-iso';\nconst CHEVRON_BACK = 'M15 18l-6-6 6-6';\nconst CHEVRON_AHEAD = 'M9 18l6-6-6-6';\n/** An 1 Feb 2026 is a Sunday: day `i` of the week is `SUNDAY + i`. */\nconst A_SUNDAY = new Date(2026, 1, 1);\nlet calendarSeq = 0;\n\nconst chevron = (doc: Document, d: string): SVGSVGElement => {\n const svg = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('width', '18'); svg.setAttribute('height', '18'); svg.setAttribute('viewBox', '0 0 24 24');\n svg.setAttribute('aria-hidden', 'true'); svg.setAttribute('focusable', 'false');\n const path = doc.createElementNS('http://www.w3.org/2000/svg', 'path');\n path.setAttribute('d', d); path.setAttribute('fill', 'none'); path.setAttribute('stroke', 'currentColor');\n path.setAttribute('stroke-width', '2'); path.setAttribute('stroke-linecap', 'round'); path.setAttribute('stroke-linejoin', 'round');\n svg.appendChild(path);\n return svg;\n};\n\nconst el = <K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, cls?: string, attrs: Record<string, string> = {}): HTMLElementTagNameMap[K] => {\n const node = doc.createElement(tag);\n if (cls) node.className = cls;\n for (const [k, v] of Object.entries(attrs)) node.setAttribute(k, v);\n return node;\n};\n\n/** The language the field speaks: the host's, the nearest `[lang]`, the document's. */\nexport function fieldLanguage(field: Element, lang?: string | null): string {\n return lang || field.closest('[lang]')?.getAttribute('lang') || field.ownerDocument?.documentElement?.lang || 'en';\n}\n\n/** The ms a transition list takes, the longest entry (duration + delay) — how long an exit plays. */\nfunction transitionMs(node: Element): number {\n const style = node.ownerDocument?.defaultView?.getComputedStyle(node);\n if (!style) return 0;\n const parse = (list: string) => list.split(',').map(t => (t.trim().endsWith('ms') ? parseFloat(t) : parseFloat(t) * 1000) || 0);\n const durations = parse(style.transitionDuration);\n const delays = parse(style.transitionDelay);\n return Math.max(0, ...durations.map((d, i) => d + (delays[i % delays.length] ?? 0)));\n}\n\n/** The panel's skeleton: grab handle, the month and its arrows, the weekday row. The body is `paintMonth`'s. */\nfunction buildPanel(doc: Document, tag: 'dialog' | 'div', words: DatePickerWords, locale: string, weekdays: number[], rtl: boolean): HTMLElement {\n const id = `iox-cal-${++calendarSeq}`;\n const panel = el(doc, tag, CalendarClass.Panel, { 'aria-label': words.choose, dir: rtl ? 'rtl' : 'ltr', 'data-lenis-prevent': '' });\n panel.appendChild(el(doc, 'span', CalendarClass.Grab, { 'aria-hidden': 'true' }));\n const head = el(doc, 'div', CalendarClass.Head);\n const title = el(doc, 'h2', CalendarClass.Title, { id: `${id}-title`, 'aria-live': 'polite' });\n const nav = el(doc, 'div', CalendarClass.Nav);\n const prev = el(doc, 'button', CalendarClass.Prev, { type: 'button', 'aria-label': words.previousMonth, title: words.previousMonth });\n const next = el(doc, 'button', CalendarClass.Next, { type: 'button', 'aria-label': words.nextMonth, title: words.nextMonth });\n prev.appendChild(chevron(doc, CHEVRON_BACK));\n next.appendChild(chevron(doc, CHEVRON_AHEAD));\n nav.append(prev, next);\n head.append(title, nav);\n const table = el(doc, 'table', CalendarClass.Grid, { role: 'grid', 'aria-labelledby': `${id}-title` });\n const row = el(doc, 'tr');\n const short = new Intl.DateTimeFormat(locale, { weekday: 'narrow' });\n const long = new Intl.DateTimeFormat(locale, { weekday: 'long' });\n for (const dow of weekdays) {\n const day = new Date(A_SUNDAY.getFullYear(), A_SUNDAY.getMonth(), A_SUNDAY.getDate() + dow);\n const th = el(doc, 'th', CalendarClass.Weekday, { scope: 'col', abbr: long.format(day) });\n th.textContent = short.format(day);\n row.appendChild(th);\n }\n const thead = el(doc, 'thead');\n thead.appendChild(row);\n table.append(thead, el(doc, 'tbody'));\n panel.append(head, table);\n return panel;\n}\n\n/** Draw one month into the panel: its title, its six rows, which arrows can move. */\nfunction paintMonth(panel: HTMLElement, model: CalendarMonth, locale: string): void {\n const doc = panel.ownerDocument;\n const title = panel.querySelector(`.${CalendarClass.Title}`);\n if (title) title.textContent = new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(new Date(model.year, model.month, 1));\n const full = new Intl.DateTimeFormat(locale, { dateStyle: 'full' });\n const body = panel.querySelector('tbody')!;\n body.textContent = '';\n for (const week of model.weeks) {\n const tr = el(doc, 'tr');\n for (const day of week) {\n const td = el(doc, 'td', CalendarClass.Cell, { role: 'gridcell' });\n if (day) {\n const button = el(doc, 'button', CalendarClass.Day, { type: 'button', tabindex: day.focus ? '0' : '-1', [ISO_ATTRIBUTE]: day.iso });\n button.setAttribute('aria-label', full.format(new Date(model.year, model.month, day.day)));\n button.textContent = String(day.day);\n if (day.today) button.setAttribute('aria-current', 'date');\n if (day.disabled) button.setAttribute('aria-disabled', 'true');\n if (day.selected) td.setAttribute('aria-selected', 'true');\n td.appendChild(button);\n }\n tr.appendChild(td);\n }\n body.appendChild(tr);\n }\n (panel.querySelector(`.${CalendarClass.Prev}`) as HTMLButtonElement | null)?.toggleAttribute('disabled', !model.canPrev);\n (panel.querySelector(`.${CalendarClass.Next}`) as HTMLButtonElement | null)?.toggleAttribute('disabled', !model.canNext);\n}\n\n/** The date field's parts. */\nfunction partsOf(field: Element): { button: HTMLButtonElement | null; input: HTMLInputElement | null; words: HTMLElement | null } {\n return {\n button: field.querySelector<HTMLButtonElement>(`button.${FieldClass.DateButton}`),\n input: field.querySelector<HTMLInputElement>(`input.${FieldClass.DateInput}`),\n words: field.querySelector<HTMLElement>(`.${FieldClass.DateValue}`),\n };\n}\n\n/** Write a day (or nothing) into a date field: the hidden input carries it, the button says it in words. */\nexport function setDateFieldValue(field: Element, iso: string, options: { lang?: string | null; today?: string; placeholder?: string } = {}): void {\n const { input, words } = partsOf(field);\n const day = isIsoDate(iso) ? iso : '';\n if (input) input.value = day;\n if (!words) return;\n const lang = fieldLanguage(field, options.lang);\n if (day) {\n words.textContent = formatDateInWords(day, lang, options.today ?? todayIso());\n words.removeAttribute(DATE_EMPTY_ATTRIBUTE);\n } else {\n words.textContent = options.placeholder ?? words.getAttribute('data-iox-placeholder') ?? datePickerWords(lang).choose;\n words.setAttribute(DATE_EMPTY_ATTRIBUTE, '');\n }\n}\n\n/** The days a field accepts today, from the raw Earliest / Latest its button carries. */\nfunction rangeOf(button: Element, today: string): { min: string | null; max: string | null } {\n const bound = (attr: string) => resolveDateBound(parseDateBound(button.getAttribute(attr) ?? ''), today);\n return { min: bound(DATE_MIN_ATTRIBUTE), max: bound(DATE_MAX_ATTRIBUTE) };\n}\n\n/** One live date field. Built by `attachDatePicker`; idempotent per field. */\nexport class DatePickerRuntime {\n private panel: HTMLDialogElement | null = null;\n private focusIso = '';\n private closing = false;\n private readonly listeners: Array<[EventTarget, string, EventListener]> = [];\n\n constructor(private readonly field: HTMLElement, private readonly options: DatePickerOptions = {}) {\n const { button, words } = partsOf(field);\n if (words && !words.hasAttribute('data-iox-placeholder') && words.hasAttribute(DATE_EMPTY_ATTRIBUTE)) {\n words.setAttribute('data-iox-placeholder', words.textContent ?? '');\n }\n // A click the keyboard made (Enter / Space on the button) has no pointer: `detail` 0.\n if (button) this.listen(button, 'click', e => this.open((e as MouseEvent).detail === 0));\n // A successful submit resets the form: a hidden input keeps its value through `form.reset()` (its value IS its\n // attribute), so the field clears itself. A host that renders the field (`onPick` — the component path) owns\n // its words and its value: the runtime never writes over what the host's view tracks.\n const form = field.closest('form');\n if (form && !options.onPick) this.listen(form, 'reset', () => setDateFieldValue(field, '', { lang: this.lang() }));\n (field as unknown as Record<string, unknown>)[RUNTIME] = this;\n }\n\n get isOpen(): boolean { return !!this.panel; }\n\n value(): string { return partsOf(this.field).input?.value ?? ''; }\n\n destroy(): void {\n this.dismiss(true);\n for (const [target, type, fn] of this.listeners) target.removeEventListener(type, fn);\n this.listeners.length = 0;\n delete (this.field as unknown as Record<string, unknown>)[RUNTIME];\n }\n\n /** Open the calendar; `instant` (opened from the keyboard) skips the entrance and, later, the exit. */\n open(instant = false): void {\n const { button } = partsOf(this.field);\n if (!button || this.panel || (button as HTMLButtonElement).disabled) return;\n const doc = this.field.ownerDocument;\n const lang = this.lang();\n const rtl = this.rtl();\n const today = this.today();\n const { min, max } = rangeOf(button, today);\n const selected = this.value();\n this.focusIso = clampIso(isIsoDate(selected) ? selected : today, min, max);\n const weekStart = weekStartFor(lang);\n const model = () => calendarMonth(this.focusIso, { weekStart, today, min, max, selected: this.value() || null });\n const panel = buildPanel(doc, 'dialog', this.words(lang), lang, model().weekdays, rtl) as HTMLDialogElement;\n const sheet = !!doc.defaultView?.matchMedia?.(CALENDAR_SHEET_QUERY).matches;\n paintMonth(panel, model(), lang);\n if (instant) panel.setAttribute(CALENDAR_INSTANT_ATTRIBUTE, '');\n this.field.appendChild(panel);\n this.panel = panel;\n this.closing = false;\n\n const repaint = (focusDay: boolean) => {\n paintMonth(panel, model(), lang);\n if (focusDay) this.focusDay();\n };\n const pickable = (b: Element | null): b is HTMLElement => !!b && b.getAttribute('aria-disabled') !== 'true';\n this.listen(panel, 'click', e => {\n const target = e.target as Element;\n const day = target.closest?.(`.${CalendarClass.Day}`);\n // Enter / Space on a day is a click with no pointer: the calendar goes at once (Emil 2).\n if (day) { if (pickable(day)) this.pick(day.getAttribute(ISO_ATTRIBUTE)!, (e as MouseEvent).detail === 0); return; }\n if (target.closest?.(`.${CalendarClass.Prev}`)) { this.focusIso = clampIso(addMonthsIso(this.focusIso, -1), min, max); repaint(false); return; }\n if (target.closest?.(`.${CalendarClass.Next}`)) { this.focusIso = clampIso(addMonthsIso(this.focusIso, 1), min, max); repaint(false); return; }\n // A modal dialog hears clicks on its backdrop as its own: outside the panel's box closes it.\n const r = panel.getBoundingClientRect();\n const { clientX: x, clientY: y } = e as MouseEvent;\n if (x < r.left || x > r.right || y < r.top || y > r.bottom) this.close();\n });\n this.listen(panel, 'keydown', e => {\n const key = e as KeyboardEvent;\n if (!(key.target as Element)?.closest?.(`.${CalendarClass.Day}`)) return;\n const next = calendarKeyTarget(key.key, this.focusIso, { weekStart, rtl, shift: key.shiftKey, min, max });\n if (!next) return;\n key.preventDefault();\n this.focusIso = next;\n repaint(true);\n });\n // Esc: the dialog's own cancel — a keyboard action, so it goes at once (Emil 2), focus back on the button.\n this.listen(panel, 'cancel', e => { e.preventDefault(); this.close(true); });\n\n if (sheet) panel.setAttribute('data-iox-cal-sheet', '');\n panel.showModal();\n if (!sheet) this.place(rtl);\n this.focusDay();\n button.setAttribute('aria-expanded', 'true');\n this.options.lockScroll?.();\n }\n\n /** Close with the exit the shared CSS plays (faster than the entrance — Emil 30), then give focus back; `instant`\n * (a keyboard close — Esc, Enter on a day) or a panel opened from the keyboard goes at once (Emil 2). */\n close(instant = false): void {\n if (!this.panel || this.closing) return;\n this.closing = true;\n const panel = this.panel;\n partsOf(this.field).button?.setAttribute('aria-expanded', 'false');\n if (instant || panel.hasAttribute(CALENDAR_INSTANT_ATTRIBUTE)) { this.dismiss(false); return; }\n panel.setAttribute(CALENDAR_CLOSING_ATTRIBUTE, '');\n const ms = transitionMs(panel);\n if (ms <= 0) { this.dismiss(false); return; }\n setTimeout(() => this.dismiss(false), ms);\n }\n\n private pick(iso: string, instant = false): void {\n const { button } = partsOf(this.field);\n if (this.options.onPick) this.options.onPick(iso);\n else setDateFieldValue(this.field, iso, { lang: this.lang(), today: this.today() });\n // The form's runtime hears the change on the control it knows (the button carries `iox-field__control`).\n button?.dispatchEvent(new Event('input', { bubbles: true }));\n button?.dispatchEvent(new Event('change', { bubbles: true }));\n this.close(instant);\n }\n\n private dismiss(silent: boolean): void {\n const panel = this.panel;\n if (!panel) return;\n this.panel = null;\n this.closing = false;\n if (panel.open) panel.close();\n panel.remove();\n this.options.unlockScroll?.();\n const { button } = partsOf(this.field);\n button?.setAttribute('aria-expanded', 'false');\n if (!silent) button?.focus({ preventScroll: true });\n }\n\n private focusDay(): void {\n const day = this.panel?.querySelector<HTMLElement>(`.${CalendarClass.Day}[${ISO_ATTRIBUTE}=\"${this.focusIso}\"]`);\n day?.focus({ preventScroll: true });\n }\n\n /** Under the field, aligned to its reading start; above when there is no room — the ONE `placeFloating`. */\n private place(rtl: boolean): void {\n const panel = this.panel;\n const { button } = partsOf(this.field);\n const view = this.field.ownerDocument.defaultView;\n if (!panel || !button || !view) return;\n const anchor = button.getBoundingClientRect();\n const spot = placeFloating(\n { top: anchor.top, left: anchor.left, width: anchor.width, height: anchor.height },\n { width: panel.offsetWidth, height: panel.offsetHeight },\n { width: view.innerWidth, height: view.innerHeight },\n { rtl },\n );\n panel.style.top = `${spot.top}px`;\n panel.style.left = `${spot.left}px`;\n panel.style.transformOrigin = spot.origin;\n panel.setAttribute('data-iox-side', spot.side);\n }\n\n private lang(): string { return fieldLanguage(this.field, this.options.lang); }\n\n private rtl(): boolean {\n if (typeof this.options.rtl === 'boolean') return this.options.rtl;\n return this.field.ownerDocument.defaultView?.getComputedStyle(this.field).direction === 'rtl';\n }\n\n private today(): string { return this.options.today?.() ?? todayIso(); }\n\n private words(lang: string): DatePickerWords { return { ...datePickerWords(lang), ...(this.options.words ?? {}) }; }\n\n private listen(target: EventTarget, type: string, fn: (e: Event) => void): void {\n target.addEventListener(type, fn);\n this.listeners.push([target, type, fn]);\n }\n}\n\n/** The runtime already running a field, if any. */\nexport function datePickerOf(field: Element | null | undefined): DatePickerRuntime | null {\n return ((field as unknown as Record<string, unknown> | null)?.[RUNTIME] as DatePickerRuntime | undefined) ?? null;\n}\n\n/** Run a date field — once: a field already running is returned as is. Null when `field` holds no date button. */\nexport function attachDatePicker(field: Element | null | undefined, options: DatePickerOptions = {}): DatePickerRuntime | null {\n if (!field || !partsOf(field).button) return null;\n return datePickerOf(field) ?? new DatePickerRuntime(field as HTMLElement, options);\n}\n\n/** Run every date field under `root` (the string path: a page's or a global's markup). */\nexport function attachDatePickers(root: ParentNode | null | undefined, options: DatePickerOptions = {}): DatePickerRuntime[] {\n if (!root?.querySelectorAll) return [];\n const out: DatePickerRuntime[] = [];\n root.querySelectorAll<HTMLElement>(`.${FieldClass.Root}`).forEach(field => {\n const runtime = attachDatePicker(field, options);\n if (runtime) out.push(runtime);\n });\n return out;\n}\n\n/**\n * The builder canvas's design-time Open state: the SAME panel, drawn in the flow under the date button (a modal in the\n * top layer would escape the canvas's zoom and cover the builder), inert — the author selects the Field and styles\n * its Calendar parts; nothing in it takes focus or a click. `false` removes it.\n */\nexport function showCalendarDesign(field: Element | null | undefined, show: boolean, options: { lang?: string | null; rtl?: boolean | null; today?: string } = {}): void {\n if (!field) return;\n const existing = field.querySelector(`:scope > [${CALENDAR_DESIGN_ATTRIBUTE}]`);\n if (!show) { existing?.remove(); return; }\n if (existing) return;\n const { button } = partsOf(field);\n if (!button) return;\n const lang = fieldLanguage(field, options.lang);\n const today = options.today ?? todayIso();\n const { min, max } = rangeOf(button, today);\n const selected = (partsOf(field).input?.value || '') || null;\n const focus = clampIso(selected ?? today, min, max);\n const model = calendarMonth(focus, { weekStart: weekStartFor(lang), today, min, max, selected });\n const rtl = typeof options.rtl === 'boolean' ? options.rtl : field.ownerDocument.defaultView?.getComputedStyle(field).direction === 'rtl';\n const panel = buildPanel(field.ownerDocument, 'div', datePickerWords(lang), lang, model.weekdays, rtl);\n panel.setAttribute(CALENDAR_DESIGN_ATTRIBUTE, '');\n panel.setAttribute('inert', '');\n panel.setAttribute('aria-hidden', 'true');\n paintMonth(panel, model, lang);\n const after = partsOf(field).input ?? button;\n after.insertAdjacentElement('afterend', panel);\n}\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Input, OnDestroy, OnInit, Optional, Output } from '@angular/core';\n\nimport {\n baseFieldName, ChoiceAppearance, choiceAppearanceOf, ControlType, datePickerWords, FieldOption, fieldOptionsOf, FieldSpec, fieldSpecOf,\n formatDateInWords, inputTypeOf, isIsoDate, isMultiValueField, todayIso, ValidationRule,\n} from '../../../forms-core/public-api';\nimport { IS_PREVIEW } from '../builder-tokens';\nimport { PageScrollProvider } from '../../services/page-scroll.provider';\nimport { attachDatePicker, DatePickerRuntime, fieldLanguage, showCalendarDesign } from './date-picker.runtime';\nimport { FormMessageResolver, FormRuntimeService, IOX_FORM_MESSAGES, RegisteredField } from './form-runtime.service';\nimport { shakeElement } from './shake';\n\nlet fieldSeq = 0;\n\n/**\n * The compound Field: label + control + help + error + required mark, as ONE node (decision D2).\n *\n * This is the biggest divergence from Webflow, and it is deliberate. There, a form field is four\n * loose elements an author can delete — and they do delete the label, which breaks the\n * `for`/`id` pairing and with it screen-reader support. Here the structure is fixed and\n * accessibility is guaranteed by construction: the label can be visually hidden, never removed.\n *\n * The PARTS are styled through the virtual-trait mechanism (`__labelStyles`, `__errorStyles`, …)\n * that already compiles `::marker` rules for List — so per-part styling invents no new concept in\n * the style engine. Each part carries a stable class the compiler targets.\n *\n * ⚠️ Control type is a TRAIT, not a component per type (decision D4) — one component, one config,\n * and choosing `email` also chooses email validation.\n *\n * The markup is forms-core `fieldHtml`'s, element for element (the engine's string path writes it): Choices is a\n * fieldset of chips or rows (premium N1), Date is a button + a hidden ISO input that opens the look's calendar (N8).\n * The submitted name is the FORM's unique name for this field (forms-core `uniqueFieldNames`, vectoriox/iox-ui#43).\n */\n@Component({\n selector: 'div[iox-field]',\n template: `\n @switch (control) {\n @case ('choices') {\n <fieldset [class]=\"'iox-field__choices ' + (appearance === 'list' ? 'iox-field__choices--list' : 'iox-field__choices--chips')\"\n [attr.aria-describedby]=\"describedBy\">\n <legend class=\"iox-field__label\" [class.iox-field__label--hidden]=\"labelHidden\" [id]=\"controlId + '-label'\">{{ label }}@if (required) {<span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>}</legend>\n <div [class]=\"appearance === 'list' ? 'iox-field__group' : 'iox-field__chips'\">\n @for (option of choices; track option.value) {\n <label [class]=\"appearance === 'list' ? 'iox-field__option' : 'iox-field__chip'\">\n <input [class]=\"appearance === 'list' ? 'iox-field__control' : 'iox-field__control iox-field__control--chip'\"\n [type]=\"multiple ? 'checkbox' : 'radio'\"\n [name]=\"fieldName\"\n [value]=\"option.value\"\n [checked]=\"isChosen(option.value)\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"toggle(option.value, $any($event.target).checked)\"\n (blur)=\"touch($event)\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n </fieldset>\n }\n @default {\n <label class=\"iox-field__label\"\n [class.iox-field__label--hidden]=\"labelHidden\"\n [id]=\"controlId + '-label'\"\n [attr.for]=\"controlId\">{{ label }}@if (required) {<span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>}</label>\n }\n }\n\n @switch (control) {\n @case ('choices') {}\n @case ('textarea') {\n <textarea class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [rows]=\"rows\"\n [attr.placeholder]=\"placeholder || null\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [value]=\"value ?? ''\"\n (input)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\"></textarea>\n }\n @case ('select') {\n <select class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\">\n <option value=\"\" [selected]=\"!value\">{{ placeholder || '' }}</option>\n @for (option of choices; track option.value) {\n <option [value]=\"option.value\" [selected]=\"option.value === value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('switch') {\n <input class=\"iox-field__control iox-field__control--switch\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [checked]=\"value === true\"\n (change)=\"emit($any($event.target).checked)\"\n (blur)=\"touch($event)\">\n }\n @case ('range') {\n <input class=\"iox-field__control iox-field__control--range\"\n type=\"range\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.min]=\"rangeMin\"\n [attr.max]=\"rangeMax\"\n [attr.step]=\"rangeStep\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [value]=\"value ?? rangeMin\"\n (input)=\"emit(+$any($event.target).value)\"\n (blur)=\"touch($event)\">\n }\n @case ('checkbox') {\n <input class=\"iox-field__control iox-field__control--checkbox\"\n type=\"checkbox\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [checked]=\"value === true\"\n (change)=\"emit($any($event.target).checked)\"\n (blur)=\"touch($event)\">\n }\n @case ('radio') {\n <div class=\"iox-field__group\" role=\"radiogroup\" [attr.aria-labelledby]=\"controlId + '-label'\">\n @for (option of choices; track option.value) {\n <label class=\"iox-field__option\">\n <input class=\"iox-field__control iox-field__control--radio\"\n type=\"radio\"\n [name]=\"fieldName\"\n [value]=\"option.value\"\n [checked]=\"option.value === value\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"emit(option.value)\"\n (blur)=\"touch($event)\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n }\n @case ('date') {\n <button type=\"button\"\n class=\"iox-field__control iox-field__control--date\"\n [id]=\"controlId\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"designOpen ? 'true' : 'false'\"\n [attr.aria-labelledby]=\"controlId + '-label ' + controlId + '-value'\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.data-iox-date-min]=\"earliest || null\"\n [attr.data-iox-date-max]=\"latest || null\"\n (blur)=\"touch($event)\"><span class=\"iox-field__date-value\" [id]=\"controlId + '-value'\" [attr.data-iox-empty]=\"dateWords ? null : ''\">{{ dateWords || datePlaceholder }}</span><svg class=\"iox-field__date-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15.5\" rx=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/><path d=\"M3.5 10h17M8 3v4M16 3v4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"/></svg></button>\n <input type=\"hidden\" class=\"iox-field__date-input\" [name]=\"fieldName\" [value]=\"dateIso\">\n }\n @default {\n <input class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [type]=\"inputType\"\n [attr.placeholder]=\"placeholder || null\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.accept]=\"control === 'file' ? (accept || null) : null\"\n [value]=\"control === 'file' ? '' : (value ?? '')\"\n (input)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\">\n }\n }\n\n @if (help) {\n <p class=\"iox-field__help\" [id]=\"controlId + '-help'\">{{ help }}</p>\n }\n @if (invalid && errorText) {\n <p class=\"iox-field__error\" [id]=\"controlId + '-error'\" role=\"alert\">{{ errorText }}</p>\n }\n `,\n host: {\n '[class]': \"'iox-field iox-node-' + nodeId\",\n '[class.iox-invalid]': 'invalid',\n '[class.iox-valid]': 'showValid',\n '[attr.data-iox-field]': 'fieldName || null',\n '[hidden]': \"control === 'hidden' ? true : null\",\n },\n styles: [`\n :host { box-sizing: border-box; display: block; }\n /* Visually hidden, still announced — the label can be hidden but never deleted. */\n .iox-field__label--hidden {\n position: absolute; width: 1px; height: 1px; margin: -1px;\n padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;\n }\n `],\n standalone: false,\n})\nexport class IoxFieldComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** The submitted key. Blank means \"derive it from the label\" — authors never invent keys. */\n @Input() name = '';\n @Input() label = '';\n @Input() set control(value: ControlType | string) {\n this._control = value || ControlType.Text;\n this.syncDate();\n }\n get control(): ControlType | string { return this._control; }\n private _control: ControlType | string = ControlType.Text;\n @Input() placeholder = '';\n @Input() help = '';\n @Input() required = false;\n @Input() disabled = false;\n @Input() labelHidden = false;\n @Input() requiredMark = '*';\n @Input() rows = 4;\n @Input() rangeMin: number | string = 0;\n @Input() rangeMax: number | string = 100;\n @Input() rangeStep: number | string = 1;\n @Input() accept = '';\n /** Choices (N1): several answers (checkboxes) or one (radios). */\n @Input() multiple = false;\n /** Choices (N1): `chips` (the default) or `list` — the look's radio / checkbox rows. */\n @Input() set appearance(value: ChoiceAppearance | string | null | undefined) {\n this._appearance = choiceAppearanceOf({ appearance: value });\n }\n get appearance(): ChoiceAppearance { return this._appearance; }\n private _appearance: ChoiceAppearance = ChoiceAppearance.Chips;\n /** Date (N8): the first and last day it takes — '' any · N days from today · an ISO day (forms-core `dates.ts`). */\n @Input() earliest = '';\n @Input() latest = '';\n /** Explicit choices (bound data, a hand-built node). Wins over `optionsText`. */\n @Input() set options(value: FieldOption[] | null | undefined) {\n this._options = Array.isArray(value) ? value : [];\n this.refreshChoices();\n }\n get options(): FieldOption[] { return this._options; }\n /** The author's choices, one per line (`value|Label`) — the Field's trait. A SETTER: the builder\n * assigns traits directly, with no ngOnChanges. */\n @Input() set optionsText(value: string | null | undefined) {\n this._optionsText = value ?? '';\n this.refreshChoices();\n }\n get optionsText(): string { return this._optionsText; }\n /** What the radio group / dropdown renders: the shared forms-core reading of the two inputs above. */\n choices: FieldOption[] = [];\n private _options: FieldOption[] = [];\n private _optionsText = '';\n @Input() value: any = '';\n /** Rules beyond `required` — carried on the node, interpreted by forms-core. */\n @Input() rules: ValidationRule[] = [];\n /**\n * Forces the error appearance without a real failure — how the builder lets an author DESIGN\n * the error state (decision D5). At runtime the state comes from the runtime service instead.\n * Turning it on shakes the field once, so the author sees the motion they are designing (N2).\n */\n @Input() set forceInvalid(value: boolean) {\n const was = this._forceInvalid;\n this._forceInvalid = !!value;\n if (this._forceInvalid && !was && this.viewReady) shakeElement(this.host?.nativeElement);\n }\n get forceInvalid(): boolean { return this._forceInvalid; }\n private _forceInvalid = false;\n /** Placeholder shown while designing the error state, so the block has something to style. */\n @Input() designErrorText = 'Please check this field';\n /** Only after a successful check — never on an untouched field. */\n @Input() showValid = false;\n /** The builder canvas's design-time Open state for a Date (N8): the calendar drawn under the field, inert. */\n @Input() set designOpen(value: boolean) {\n this._designOpen = !!value;\n this.syncDesignCalendar();\n }\n get designOpen(): boolean { return this._designOpen; }\n private _designOpen = false;\n\n @Output() valueChange = new EventEmitter<any>();\n @Output() touched = new EventEmitter<void>();\n\n /** Stable per instance so `for`/`id` and `aria-describedby` always pair up. */\n readonly controlId = `iox-field-${++fieldSeq}`;\n\n private unregister?: () => void;\n private registration: RegisteredField | null = null;\n private picker: DatePickerRuntime | null = null;\n private viewReady = false;\n\n /**\n * Classic constructor injection, not `inject()`: this library's specs construct components\n * directly (its vitest setup cannot run `TestBed.createComponent`), and a field initializer\n * calling `inject()` throws NG0203 outside an injection context.\n *\n * `runtime` is optional because a Field dropped OUTSIDE any Form must still render — it simply\n * has nothing to submit to. That is the same ancestry rule from the other side. `isPreview` says the field is\n * LIVE (the engine, the admin's Preview): only then does its date button open a calendar — on the editing canvas\n * a click selects the field, and the calendar is the design-time Open state.\n */\n constructor(\n @Optional() private readonly runtime: FormRuntimeService | null,\n @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver,\n @Optional() private readonly host?: ElementRef<HTMLElement> | null,\n @Optional() @Inject(IS_PREVIEW) private readonly isPreview?: boolean | null,\n @Optional() private readonly pageScroll?: PageScrollProvider | null,\n ) {}\n\n ngOnInit(): void {\n this.registration = {\n // Functions, not values: a trait edited on the canvas takes effect with no re-register.\n baseName: () => baseFieldName({ name: this.name, label: this.label }),\n spec: (name: string) => this.toSpec(name),\n getValue: () => this.value,\n };\n this.unregister = this.runtime?.register(this.registration);\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.syncDate();\n this.syncDesignCalendar();\n }\n\n ngOnDestroy(): void {\n this.unregister?.();\n this.picker?.destroy();\n this.picker = null;\n }\n\n /** The submitted key: the form's unique name for this field (iox-ui#43), else the field's own base name. */\n get fieldName(): string {\n return (this.registration && this.runtime?.nameOf(this.registration)) || baseFieldName({ name: this.name, label: this.label });\n }\n\n /** Failing AND allowed to say so — or forced, while an author designs the state. */\n get invalid(): boolean {\n if (this.forceInvalid) return true;\n return !!this.runtime?.showsError(this.fieldName);\n }\n\n /** The message a visitor reads. Translation is the consumer's, via IOX_FORM_MESSAGES. */\n get errorText(): string {\n if (this.forceInvalid) return this.designErrorText;\n const error = this.runtime?.errorFor(this.fieldName);\n return error ? this.resolveMessage(error.messageKey, error.params) : '';\n }\n\n /** The field's spec under the name its form gave it — forms-core `fieldSpecOf`, the reading the saved spec uses. */\n private toSpec(name: string): FieldSpec {\n return fieldSpecOf({\n control: this.control, label: this.label, required: this.required, rules: this.rules, options: this.choices,\n multiple: this.multiple, earliest: this.earliest, latest: this.latest,\n }, name);\n }\n\n private refreshChoices(): void {\n this.choices = fieldOptionsOf({ options: this._options, optionsText: this._optionsText });\n }\n\n /** `file`, `number`… map straight through; everything else is a text input (forms-core `inputTypeOf`). */\n get inputType(): string {\n return inputTypeOf(String(this.control));\n }\n\n /** A Date's chosen day (the hidden input's value) — '' while none is. */\n get dateIso(): string {\n return isIsoDate(this.value) ? String(this.value) : '';\n }\n\n /** A Date's chosen day in words, in the field's language — '' while none is. */\n get dateWords(): string {\n const iso = this.dateIso;\n if (!iso) return '';\n const lang = this.host?.nativeElement ? fieldLanguage(this.host.nativeElement) : 'en';\n return formatDateInWords(iso, lang, todayIso());\n }\n\n /** What an unpicked Date says: the author's hint, else \"Choose a date\" in the field's language. */\n get datePlaceholder(): string {\n if (this.placeholder) return this.placeholder;\n return datePickerWords(this.host?.nativeElement ? fieldLanguage(this.host.nativeElement) : null).choose;\n }\n\n /** Whether a Choices option is chosen — one answer, or one of several. */\n isChosen(optionValue: string): boolean {\n if (isMultiValueField({ control: this.control as ControlType, multiple: this.multiple })) {\n return Array.isArray(this.value) && this.value.includes(optionValue);\n }\n return this.value === optionValue;\n }\n\n /** A Choices option ticked or unticked: the answer becomes the list of ticked ones, or the one picked. */\n toggle(optionValue: string, checked: boolean): void {\n if (!isMultiValueField({ control: this.control as ControlType, multiple: this.multiple })) {\n this.emit(optionValue);\n return;\n }\n const current: string[] = Array.isArray(this.value) ? this.value : [];\n const next = checked ? [...current.filter(v => v !== optionValue), optionValue] : current.filter(v => v !== optionValue);\n // In the options' order, whatever order they were ticked in.\n this.emit(this.choices.map(c => c.value).filter(v => next.includes(v)));\n }\n\n /** Help and error are BOTH announced, in that order, when both are present. */\n get describedBy(): string | null {\n const ids: string[] = [];\n if (this.help) ids.push(`${this.controlId}-help`);\n if (this.invalid && this.errorText) ids.push(`${this.controlId}-error`);\n return ids.length ? ids.join(' ') : null;\n }\n\n emit(value: any): void {\n this.value = value;\n this.runtime?.onChange(this.fieldName);\n this.valueChange.emit(value);\n }\n\n touch(event?: Event): void {\n // Leaving one chip for the next, or the date button for its own calendar, is not leaving the FIELD.\n const next = (event as FocusEvent | undefined)?.relatedTarget as Node | null | undefined;\n if (next && this.host?.nativeElement?.contains?.(next)) return;\n // Blur is what lets Smart timing start speaking for this field.\n this.runtime?.onBlur(this.fieldName);\n this.touched.emit();\n }\n\n /** A live Date runs the ONE date picker; any other control (or the canvas) runs none. */\n private syncDate(): void {\n const element = this.host?.nativeElement;\n if (!this.viewReady || !element) return;\n const live = this.control === ControlType.Date && this.isPreview === true && typeof window !== 'undefined';\n if (!live) { this.picker?.destroy(); this.picker = null; return; }\n // The view may not have rendered the button yet after a control change: attach on the next frame's DOM.\n queueMicrotask(() => {\n if (this.picker || this.control !== ControlType.Date) return;\n this.picker = attachDatePicker(element, {\n onPick: iso => this.emit(iso),\n lockScroll: () => this.pageScroll?.stop(),\n unlockScroll: () => this.pageScroll?.start(),\n });\n });\n }\n\n /** The canvas's Open state: the calendar drawn under the field (never on a live page). */\n private syncDesignCalendar(): void {\n const element = this.host?.nativeElement;\n if (!this.viewReady || !element || this.isPreview === true) return;\n queueMicrotask(() => showCalendarDesign(element, this._designOpen && this.control === ControlType.Date));\n }\n}\n","import { Component, ElementRef, Inject, Input, Optional } from '@angular/core';\n\nimport { DEFAULT_EN_MESSAGES, sentWord, SUBMIT_MESSAGE_KEYS } from '../../../forms-core/public-api';\nimport { defaultMessageResolver, FormMessageResolver, IOX_FORM_MESSAGES } from './form-runtime.service';\n\n/**\n * Directive-host SubmitButton: the real `<button type=\"submit\">` IS the host.\n *\n * It carries no destination configuration of its own — \"what happens with the data\" is an ordered\n * action list on the FORM (decision D9), so there is nothing here to wire and nothing to get out of\n * sync. The button owns only its own appearance.\n *\n * It follows its FORM's state (vectoriox/iox-ui#42, premium N2): its three labels — at rest, \"While sending\", \"Sent\"\n * with a check — are all in the markup, stacked in one cell, and the shared iox-forms.css shows the one the form's\n * `data-iox-state` names, swapped in place behind a 2px blur (Emil 87/139); the check draws once on Sent. Busy and\n * disabled are written by the ONE applier (`syncSubmitButtons`) the form's runtimes and the canvas call. The string\n * renderer writes the same markup (forms-core `submitButtonLabelsHtml`).\n */\n@Component({\n selector: 'button[iox-submit]',\n // The class names are forms-core `SubmitLabelClass` (a literal here: a decorator must be static) — pinned by the spec.\n template: `<span class=\"iox-submit__labels\"><span class=\"iox-submit__idle\">{{ label }}</span><span class=\"iox-submit__busy\">{{ loadingLabel || label }}</span><span class=\"iox-submit__sent\"><svg class=\"iox-submit__check\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" pathLength=\"100\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg><span>{{ sentWords }}</span></span></span>`,\n host: {\n '[class]': \"'iox-submit iox-node-' + nodeId\",\n '[attr.type]': \"'submit'\",\n // forms-core SUBMIT_KEEP_ENABLED_ATTRIBUTE — read by `syncSubmitButtons`.\n '[attr.data-iox-keep-enabled]': 'disableWhileSubmitting === false ? \"\" : null',\n },\n styles: [`:host { box-sizing: border-box; cursor: pointer; }`],\n standalone: false,\n})\nexport class IoxSubmitButtonComponent {\n @Input() nodeId = '';\n @Input() label = 'Submit';\n @Input() loadingLabel = 'Sending…';\n /** What it says once its form has sent (N2). Empty: the catalog's \"Sent\", in the host's language. */\n @Input() sentLabel = '';\n @Input() disableWhileSubmitting = true;\n\n constructor(\n @Optional() @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver | null = null,\n @Optional() private readonly host: ElementRef<HTMLElement> | null = null,\n ) {}\n\n /** The author's Sent words; else the host's translation of the catalog's; else \"Sent\" in the page's language. */\n get sentWords(): string {\n if (this.sentLabel) return this.sentLabel;\n const key = SUBMIT_MESSAGE_KEYS.Sent;\n const translated = (this.resolveMessage ?? defaultMessageResolver)(key);\n if (translated && translated !== key && translated !== DEFAULT_EN_MESSAGES[key]) return translated;\n const element = this.host?.nativeElement;\n return sentWord(element?.closest?.('[lang]')?.getAttribute('lang') ?? element?.ownerDocument?.documentElement?.lang);\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * The Success and Error blocks — real, fully styleable container nodes that the Form auto-creates\n * and the author cannot delete (decision D7). Hiding one is allowed; removing it is not, because\n * \"the author deleted the success block and the form went quiet\" is Webflow's commonest form\n * failure and we designed it out.\n *\n * ⚠️ VISIBILITY IS NOT AN INPUT. Which block shows is decided by CSS keyed on the parent form's\n * `data-iox-state` attribute (see `iox-form-states.css` / the engine's `styles.scss`):\n *\n * .iox-form-success { display: none }\n * .iox-form[data-iox-state=\"success\"] .iox-form-success { display: block }\n *\n * That is deliberate. It means the builder's state switcher and the runtime's submit lifecycle\n * drive the SAME mechanism through one attribute, with no input plumbing down the tree and no\n * chance of the canvas and the live site disagreeing about what a visitor sees. The selector\n * out-specifies `.iox-node-{id}`, so the state machine owns visibility and the author owns\n * everything else about the block.\n */\n@Component({\n selector: 'div[iox-form-success]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-form-success iox-node-' + nodeId\",\n '[attr.role]': \"'status'\",\n '[attr.aria-live]': \"'polite'\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormSuccessComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n\n/**\n * The Error block. One design, five reasons: the renderer writes the resolved reason text into\n * `message`, so an author designs the block once and every failure mode (network, rejected, spam,\n * rate-limited, server) renders through it.\n *\n * `role=\"alert\"` rather than `status`: a failed submit must interrupt, because the visitor is\n * about to walk away believing they sent it.\n */\n@Component({\n selector: 'div[iox-form-error]',\n template: `\n @if (message) {\n <p class=\"iox-form-error__message\">{{ message }}</p>\n }\n <ng-container #childrenHost></ng-container>\n `,\n host: {\n '[class]': \"'iox-form-error iox-node-' + nodeId\",\n '[attr.role]': \"'alert'\",\n '[attr.aria-live]': \"'assertive'\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormErrorComponent {\n @Input() nodeId = '';\n /** Already-translated reason. Resolving the key is the host's job. */\n @Input() message = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\nconst PLACEMENTS = ['top', 'bottom', 'start', 'end'];\nconst isOn = (v: unknown) => v === true || v === 'true';\nconst isOff = (v: unknown) => v === false || v === 'false';\n\n/**\n * The Dialog's LIVE twin on the engine's component path (actions plan A1b; design-system DS2).\n * Directive-host: the `<dialog>` IS the host, carrying exactly the markup the string renderer\n * writes (`data-iox-dialog`, the opt-in backdrop-close / consent-role / placement attributes and\n * the close X), so the runtime's dialog actions, the consent prompt and `styles.scss` treat both\n * paths alike. Ships CLOSED — only the dialog actions open it. Before this existed, a page holding\n * a Dialog fell back to the string renderer wholesale.\n */\n@Component({\n selector: 'dialog[iox-dialog]',\n template: `@if (closeButtonShown) {<button type=\"button\" class=\"iox-dialog-close\" data-iox-dialog-close aria-label=\"Close\">×</button>}<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n 'data-iox-dialog': '',\n '[attr.data-iox-dialog-backdrop-close]': \"backdropCloses ? '' : null\",\n '[attr.data-iox-consent-role]': \"consentRoleOn ? '' : null\",\n '[attr.data-iox-dialog-placement]': 'placementAttr',\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxDialogComponent {\n @Input() nodeId = '';\n @Input() placement: string = 'center';\n @Input() closeOnBackdrop: boolean | string = true;\n @Input() showCloseButton: boolean | string = true;\n @Input() consentRole: boolean | string = false;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n get backdropCloses(): boolean { return !isOff(this.closeOnBackdrop); }\n get closeButtonShown(): boolean { return !isOff(this.showCloseButton); }\n get consentRoleOn(): boolean { return isOn(this.consentRole); }\n get placementAttr(): string | null { return PLACEMENTS.includes(String(this.placement)) ? String(this.placement) : null; }\n}\n","import { AfterViewInit, Component, ElementRef, HostBinding, Inject, Input, OnDestroy, Optional, PLATFORM_ID, ViewChild } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport {\n attachVideoAt, planVideo, VideoAttribute, VideoClass, videoInnerHtml, VideoKind, VideoPlan, videoRootAttributes, VideoRuntime, videoWords,\n} from '@vectoriox/iox-ui/media-core';\n\nimport { IS_PREVIEW } from '../builder-tokens';\n\nconst escapeHtml = (v: string) => v.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n\n/**\n * `iox-video` — the Video's ONE component (CC3, board 5), like the Gallery's: the builder canvas, the admin's Preview\n * and the engine's component path all render it; the engine's string path writes the same markup from the same\n * `videoInnerHtml`. On the EDITING canvas (no `IS_PREVIEW`) it draws the poster ONLY — never a `<video>`, never a\n * player: an iframe would eat the selection's clicks and would leak before consent. Live, it attaches the shared\n * media-core runtime (the facade behind consent, the background video's pause button).\n *\n * Inputs recompute in SETTERS: the builder's trait panel assigns them directly (no ngOnChanges).\n */\n@Component({\n selector: 'iox-video',\n template: `<div #root\n [class]=\"'${VideoClass.Root} iox-node-' + nodeId\"\n [attr.data-iox-video]=\"attrs['${VideoAttribute.Root}'] ?? null\"\n [attr.data-iox-video-source]=\"attrs['${VideoAttribute.Source}'] ?? null\"\n [attr.data-iox-video-id]=\"attrs['${VideoAttribute.Id}'] ?? null\"\n [attr.data-iox-video-hash]=\"attrs['${VideoAttribute.Hash}'] ?? null\"\n [attr.data-iox-video-mode]=\"attrs['${VideoAttribute.Mode}'] ?? null\"\n [attr.data-iox-video-autoplay]=\"attrs['${VideoAttribute.Autoplay}'] ?? null\"\n [attr.data-iox-video-consent]=\"attrs['${VideoAttribute.Consent}'] ?? null\"\n [attr.data-iox-video-title]=\"attrs['${VideoAttribute.Title}'] ?? null\"\n [attr.data-iox-video-poster-empty]=\"attrs['${VideoAttribute.PosterEmpty}'] ?? null\"\n [attr.data-iox-video-frames]=\"attrs['${VideoAttribute.Frames}'] ?? null\"\n [innerHTML]=\"html\"></div>`,\n // A flex item's min-width is its content: without min-width 0 the host kept a 640px video 640 wide on a 390px phone\n // (the node's own max-width: 100% resolved against the host). The string path has no host and always shrank.\n styles: [':host { display: block; min-width: 0; max-width: 100%; }'],\n standalone: false,\n})\nexport class IoxVideoComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n\n private readonly values: Record<string, unknown> = {};\n @Input() set videoSource(v: unknown) { this.set('videoSource', v); }\n get videoSource(): unknown { return this.values['videoSource']; }\n @Input() set src(v: unknown) { this.set('src', v); }\n get src(): unknown { return this.values['src']; }\n @Input() set poster(v: unknown) { this.set('poster', v); }\n get poster(): unknown { return this.values['poster']; }\n @Input() set mode(v: unknown) { this.set('mode', v); }\n get mode(): unknown { return this.values['mode']; }\n @Input() set autoplay(v: unknown) { this.set('autoplay', v); }\n get autoplay(): unknown { return this.values['autoplay']; }\n @Input() set title(v: unknown) { this.set('title', v); }\n get title(): unknown { return this.values['title']; }\n @Input() set captions(v: unknown) { this.set('captions', v); }\n get captions(): unknown { return this.values['captions']; }\n @Input() set captionsLang(v: unknown) { this.set('captionsLang', v); }\n get captionsLang(): unknown { return this.values['captionsLang']; }\n @Input() set consentCategory(v: unknown) { this.set('consentCategory', v); }\n get consentCategory(): unknown { return this.values['consentCategory']; }\n @Input() set frames(v: unknown) { this.set('frames', v); }\n get frames(): unknown { return this.values['frames']; }\n\n @ViewChild('root', { static: true }) private root?: ElementRef<HTMLElement>;\n\n /**\n * A Video the scroll plays usually fills its stage with height: 100%, which is a percent of this host. The host stays a\n * box, because a node's width and margin live on it, so it passes the height down. Where a Scene flows, 100% of an\n * auto stage is auto. An ordinary Video keeps its own height, so what stands beside it stays put.\n */\n @HostBinding('style.height') get hostHeight(): string | null {\n return this.plan?.kind === VideoKind.Frames ? '100%' : null;\n }\n\n plan!: VideoPlan;\n attrs: Record<string, string> = {};\n html: SafeHtml = '';\n\n private runtime: VideoRuntime | null = null;\n private readonly browser: boolean;\n private readonly live: boolean;\n private viewReady = false;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n @Inject(PLATFORM_ID) platformId: object,\n @Optional() @Inject(IS_PREVIEW) isPreview: boolean | null,\n ) {\n this.browser = isPlatformBrowser(platformId);\n this.live = !!isPreview;\n this.render();\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.attach();\n }\n\n ngOnDestroy(): void {\n this.runtime?.destroy();\n this.runtime = null;\n }\n\n private set(name: string, value: unknown): void {\n if (this.values[name] === value) return;\n this.values[name] = value;\n this.render();\n }\n\n private render(): void {\n this.plan = planVideo({ props: this.values }, null);\n this.attrs = videoRootAttributes(this.plan);\n const lang = typeof document !== 'undefined' ? document.documentElement?.getAttribute('lang') : null;\n this.html = this.sanitizer.bypassSecurityTrustHtml(videoInnerHtml(this.plan, { esc: escapeHtml, canvas: !this.live, words: videoWords(lang) }));\n if (this.viewReady) {\n // The new markup lands with this change detection; the runtime re-attaches to it after.\n this.runtime?.destroy();\n this.runtime = null;\n queueMicrotask(() => this.attach());\n }\n }\n\n private attach(): void {\n if (!this.browser || !this.live || this.runtime) return;\n const el = this.root?.nativeElement;\n if (!el?.hasAttribute(VideoAttribute.Root)) return;\n this.runtime = attachVideoAt(el);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { BuilderImageComponent } from './image/image.component';\nimport { BuilderSpacerComponent } from './spacer/spacer.component';\nimport { CardComponent } from './card/card.component';\nimport { BuilderDividerComponent } from './divider/divider.component';\nimport { BuilderIconComponent } from './icon/icon.component';\nimport { BuilderLinkComponent } from './link/link.component';\nimport { BuilderButtonComponent } from './button/button.component';\nimport { BuilderHeadingComponent } from './heading/heading.component';\nimport { TextBlockComponent } from './text/text.component';\nimport { SectionComponent } from './section/section.component';\nimport { ContainerComponent } from './container/container.component';\nimport { LinkedContainerComponent } from './linked-container/linked-container.component';\nimport { ClientRepeaterComponent } from './repeater/repeater.component';\nimport { ButtonBlockComponent } from './button-block/button-block.component';\nimport { ClientSliderContainerComponent } from './slider-container/slider-container.component';\nimport { ClientSliderSlideComponent } from './slider-slide/slider-slide.component';\nimport { ClientListComponent } from './list/list.component';\nimport { ClientListItemComponent } from './list-item/list-item.component';\nimport { ClientGalleryComponent } from './gallery/gallery.component';\nimport { IoxFormComponent } from './form/form.component';\nimport { IoxFieldComponent } from './form/field.component';\nimport { IoxSubmitButtonComponent } from './form/submit-button.component';\nimport { IoxFormSuccessComponent, IoxFormErrorComponent } from './form/form-state-blocks.component';\nimport { IoxDialogComponent } from './dialog/dialog.component';\nimport { IoxVideoComponent } from './video/video.component';\n\nconst COMPONENTS = [\n BuilderImageComponent,\n BuilderSpacerComponent,\n CardComponent,\n BuilderDividerComponent,\n BuilderIconComponent,\n BuilderLinkComponent,\n BuilderButtonComponent,\n BuilderHeadingComponent,\n TextBlockComponent,\n SectionComponent,\n ContainerComponent,\n LinkedContainerComponent,\n ClientRepeaterComponent,\n ButtonBlockComponent,\n ClientSliderContainerComponent,\n ClientSliderSlideComponent,\n ClientListComponent,\n ClientListItemComponent,\n ClientGalleryComponent,\n IoxVideoComponent,\n IoxFormComponent,\n IoxFieldComponent,\n IoxSubmitButtonComponent,\n IoxFormSuccessComponent,\n IoxFormErrorComponent,\n IoxDialogComponent,\n];\n\n@NgModule({\n declarations: COMPONENTS,\n imports: [CommonModule],\n exports: COMPONENTS,\n})\nexport class IoxBuilderComponentsModule {}\n","import { Injectable, Type } from '@angular/core';\n\nimport { BuilderImageComponent } from './image/image.component';\nimport { BuilderSpacerComponent } from './spacer/spacer.component';\nimport { CardComponent } from './card/card.component';\nimport { BuilderDividerComponent } from './divider/divider.component';\nimport { BuilderIconComponent } from './icon/icon.component';\nimport { BuilderLinkComponent } from './link/link.component';\nimport { BuilderButtonComponent } from './button/button.component';\nimport { BuilderHeadingComponent } from './heading/heading.component';\nimport { TextBlockComponent } from './text/text.component';\nimport { SectionComponent } from './section/section.component';\nimport { ContainerComponent } from './container/container.component';\nimport { LinkedContainerComponent } from './linked-container/linked-container.component';\nimport { ClientRepeaterComponent } from './repeater/repeater.component';\nimport { ButtonBlockComponent } from './button-block/button-block.component';\nimport { ClientSliderContainerComponent } from './slider-container/slider-container.component';\nimport { ClientSliderSlideComponent } from './slider-slide/slider-slide.component';\nimport { ClientListComponent } from './list/list.component';\nimport { ClientListItemComponent } from './list-item/list-item.component';\nimport { ClientGalleryComponent } from './gallery/gallery.component';\nimport { IoxFormComponent } from './form/form.component';\nimport { IoxFieldComponent } from './form/field.component';\nimport { IoxSubmitButtonComponent } from './form/submit-button.component';\nimport { IoxFormSuccessComponent, IoxFormErrorComponent } from './form/form-state-blocks.component';\nimport { IoxDialogComponent } from './dialog/dialog.component';\nimport { IoxVideoComponent } from './video/video.component';\n\n/**\n * Single source of truth for the IOX component type → Angular class mapping.\n * Used by the client engine (iox-client-engine) to resolve component classes\n * from IoxLayoutNode.type strings at render time.\n *\n * All 13 builder components are registered here:\n * - Leaf (Phase 2a): Image, Spacer, Card, Divider, Icon\n * - Inline-editable (Phase 2b): Link, Button, Heading, Text\n * - Layout shells (Phase 2c): Section, Container, LinkedContainer\n * - Repeater (Phase 2d): ClientRepeaterComponent\n *\n * Section/Container/LinkedContainer/Repeater expose childrenHost: ViewContainerRef\n * for ClientRenderDirective to insert child components into.\n */\n@Injectable({ providedIn: 'root' })\nexport class IoxComponentRegistryService {\n private readonly map = new Map<string, Type<any>>([\n ['Image', BuilderImageComponent],\n ['Spacer', BuilderSpacerComponent],\n ['Card', CardComponent],\n ['Divider', BuilderDividerComponent],\n ['Icon', BuilderIconComponent],\n ['Link', BuilderLinkComponent],\n ['Button', BuilderButtonComponent],\n ['Heading', BuilderHeadingComponent],\n ['Text', TextBlockComponent],\n ['Section', SectionComponent],\n ['Container', ContainerComponent],\n ['LinkedContainer', LinkedContainerComponent],\n ['Repeater', ClientRepeaterComponent],\n ['ButtonBlock', ButtonBlockComponent],\n ['SliderContainer', ClientSliderContainerComponent],\n ['SliderSlide', ClientSliderSlideComponent],\n ['List', ClientListComponent],\n ['ListItem', ClientListItemComponent],\n ['Gallery', ClientGalleryComponent],\n // Forms. FieldGroup is config-only (it reuses ContainerComponent), like List/ListItem.\n ['Form', IoxFormComponent],\n ['Field', IoxFieldComponent],\n ['FieldGroup', ContainerComponent],\n ['SubmitButton', IoxSubmitButtonComponent],\n ['FormSuccess', IoxFormSuccessComponent],\n ['FormError', IoxFormErrorComponent],\n // Dialog (DS2) — the live <dialog> twin, so a page holding one no longer falls back to\n // the string renderer.\n ['Dialog', IoxDialogComponent],\n // Video (CC3) — one component for the canvas (poster only), Preview and the live site.\n ['Video', IoxVideoComponent],\n ]);\n\n getComponent(type: string): Type<any> | undefined {\n return this.map.get(type);\n }\n\n hasComponent(type: string): boolean {\n return this.map.has(type);\n }\n\n registeredTypes(): string[] {\n return [...this.map.keys()];\n }\n}\n","/**\n * tree-relations — framework-agnostic helpers for reasoning about a rendered node\n * tree's structural relationships. Lives in @vectoriox/iox-ui because BOTH renderers\n * depend on iox-ui (the engine does NOT depend on iox-builder), so the same logic\n * drives the builder canvas AND the SSR site — no fork.\n * See iox-ai-guidance `architecture/builder/targeted-hover-state-plan.md`.\n */\n\n/**\n * Minimal shape both renderers can satisfy. `styleId` (present on repeater/slider/symbol\n * clones) points back to the template node's css id; when set it is the id used in the\n * compiled selector, so we resolve against it in preference to `id`.\n */\nexport interface StyleTreeNode {\n id?: string;\n styleId?: string;\n children?: StyleTreeNode[] | null;\n}\n\n/** The css id a node contributes to selectors: its clone `styleId`, else its own `id`. */\nexport function nodeCssId(node: StyleTreeNode): string | undefined {\n return node.styleId ?? node.id;\n}\n\n/**\n * Path of css ids from the root down to (and including) the node whose css id === `cssId`.\n * Returns `null` when no node matches. First match wins (depth-first, pre-order).\n */\nfunction pathToCssId(nodes: readonly StyleTreeNode[], cssId: string): string[] | null {\n for (const node of nodes) {\n const ownId = nodeCssId(node);\n if (ownId === cssId) return [ownId];\n if (node.children?.length) {\n const childPath = pathToCssId(node.children, cssId);\n if (childPath) return ownId ? [ownId, ...childPath] : childPath;\n }\n }\n return null;\n}\n\n/**\n * The css id of the NEAREST COMMON ANCESTOR of two nodes (identified by their css ids),\n * used to scope a `:has()` targeted-state selector so it stays repetition-safe.\n *\n * The result may equal `styledCssId` (the trigger sits INSIDE the styled node) or\n * `triggerCssId` (the styled node sits inside the trigger) — both are valid scopes;\n * `buildTargetedStateSelector` picks the right selector shape for each. Returns\n * `undefined` only when a valid scope can't exist: an id is blank, the two ids are the\n * same node, or they share no ancestor in `root`. Callers MUST skip emitting the rule\n * when this is `undefined` — never emit an unscoped (page-global) `:has()`, which would\n * break under repetition.\n */\nexport function nearestCommonAncestorId(\n root: readonly StyleTreeNode[],\n styledCssId: string,\n triggerCssId: string,\n): string | undefined {\n if (!styledCssId || !triggerCssId || styledCssId === triggerCssId) return undefined;\n\n const styledPath = pathToCssId(root, styledCssId);\n const triggerPath = pathToCssId(root, triggerCssId);\n if (!styledPath || !triggerPath) return undefined;\n\n // Walk both paths together; the last shared prefix element is the common ancestor.\n let common: string | undefined;\n const shorter = Math.min(styledPath.length, triggerPath.length);\n for (let i = 0; i < shorter; i++) {\n if (styledPath[i] !== triggerPath[i]) break;\n common = styledPath[i];\n }\n return common;\n}\n\n/**\n * Build the selector BODY (no leading `.`, matching the builder's `compile()` convention)\n * for a targeted state, given the resolved scope. Three topologies, one shared rule:\n *\n * - trigger INSIDE styled (scope === styled): `iox-node-{styled}:has(.iox-node-{trigger}:{base})`\n * - styled INSIDE trigger (scope === trigger): `iox-node-{trigger}:{base} .iox-node-{styled}`\n * - separate subtrees (scope is above both): `iox-node-{scope}:has(.iox-node-{trigger}:{base}) .iox-node-{styled}`\n *\n * `scopeCssId` MUST be a value returned by `nearestCommonAncestorId` for the same pair.\n */\nexport function buildTargetedStateSelector(\n scopeCssId: string,\n triggerCssId: string,\n styledCssId: string,\n base: string,\n): string {\n return buildTargetedSuffixSelector(scopeCssId, triggerCssId, styledCssId, `:${base}`);\n}\n\n/**\n * The same three topologies for any trigger SUFFIX — a pseudo-class (`:hover`) or an attribute the renderers\n * write (`[data-iox-on]`, CC2's \"Item open\").\n */\nexport function buildTargetedSuffixSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, suffix: string): string {\n if (scopeCssId === styledCssId) {\n return `iox-node-${styledCssId}:has(.iox-node-${triggerCssId}${suffix})`;\n }\n if (scopeCssId === triggerCssId) {\n return `iox-node-${triggerCssId}${suffix} .iox-node-${styledCssId}`;\n }\n return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}${suffix}) .iox-node-${styledCssId}`;\n}\n\n/**\n * The targeted states and what follows the TRIGGER's class in each: `trigger-hover` — the chosen element is\n * hovered; `trigger-on` — the chosen item is open (CC2: an Icon turns when ITS item opens; the trigger is the\n * item, an ancestor, so the rule is `.item[data-iox-on] .icon`). Shared by the builder canvas and both\n * engine paths.\n */\nexport const TARGETED_STATE_SUFFIX: Readonly<Record<string, string>> = {\n 'trigger-hover': ':hover',\n 'trigger-on': '[data-iox-on]',\n};\n\n/** The selector body of a targeted state's rule, or null for a state that is not targeted. */\nexport function targetedStateSelector(state: string, scopeCssId: string, triggerCssId: string, styledCssId: string): string | null {\n const suffix = TARGETED_STATE_SUFFIX[state];\n return suffix ? buildTargetedSuffixSelector(scopeCssId, triggerCssId, styledCssId, suffix) : null;\n}\n","/**\n * parts — the failure design (forms-and-inputs-plan.md Part 2, board 7). A compound component\n * like Field is not one styleable surface: its label, control, help text, error message and\n * required mark are each their own descendant, addressed by a stable class the component itself\n * renders (`IoxFieldComponent`'s `iox-field__label`/`__control`/`__help`/`__error`/`__required`).\n *\n * Lives in @vectoriox/iox-ui because BOTH renderers depend on iox-ui (the engine does not depend\n * on iox-builder) — same reason `buildTargetedStateSelector` lives here. No new compiler: this\n * builds a selector STRING, then the existing `compile()`/`compileDeclarations()` path renders it\n * exactly like any other rule.\n */\n\n/**\n * The selector BODY (no leading `.`, matching the builder's `compile()` convention) for a node,\n * optionally scoped to one of its parts, optionally further scoped to a validation state.\n *\n * buildPartSelector('abc') -> 'iox-node-abc'\n * buildPartSelector('abc', 'iox-field__error') -> 'iox-node-abc .iox-field__error'\n * buildPartSelector('abc', undefined, 'iox-invalid') -> 'iox-node-abc.iox-invalid'\n * buildPartSelector('abc', 'iox-field__error', 'iox-invalid')\n * -> 'iox-node-abc.iox-invalid .iox-field__error'\n *\n * The validation class always attaches to the NODE itself (that's where `IoxFieldComponent` sets\n * `.iox-invalid`/`.iox-valid`), never to the part — a part has no host class of its own to hang a\n * compound selector off.\n */\nexport function buildPartSelector(nodeId: string, partClass?: string, validationClass?: string): string {\n const base = validationClass ? `iox-node-${nodeId}.${validationClass}` : `iox-node-${nodeId}`;\n return partClass ? `${base} .${partClass}` : base;\n}\n\n/**\n * Design-time validation \"states\" (wrong/accepted) — not real CSS pseudo-classes. `IoxFieldComponent`\n * already carries `.iox-invalid`/`.iox-valid` host classes it sets from `forceInvalid`/`showValid`\n * (decision D5), so authoring \"Wrong\"/\"Accepted\" styles compiles to a CLASS-compound selector via\n * `buildPartSelector`, never a `:pseudo-class` (`:wrong` isn't real CSS). Lives here (not\n * `@vectoriox/iox-builder`'s `ElementState`/`VALIDATION_STATE_CLASS`, which re-export these same\n * values) because the SSR engine needs the mapping too and does not depend on iox-builder.\n */\nexport const VALIDATION_STATES = ['wrong', 'accepted'] as const;\n\nexport const VALIDATION_STATE_CLASS: Record<string, string> = {\n wrong: 'iox-invalid',\n accepted: 'iox-valid',\n};\n\n/**\n * type -> part key -> the stable class that part's own template already renders. The single\n * source of truth for which classes a part maps to, so the builder (render.directive.ts) and the\n * SSR engine (layout-renderer.service.ts) resolve a part's selector identically without either\n * duplicating the string literals. `iox-builder`'s `FieldComponentConfig.parts` (the picker's\n * display labels) is built FROM this map, not the other way round.\n */\nexport const PART_CLASS_NAMES: Record<string, Record<string, string>> = {\n Field: {\n label: 'iox-field__label',\n control: 'iox-field__control',\n help: 'iox-field__help',\n error: 'iox-field__error',\n required: 'iox-field__required',\n // Premium M3: a Choices field's chip (N1), a Date's calendar and each of its days (N8) — the classes forms-core\n // `fieldHtml` and the date picker runtime render.\n chip: 'iox-field__chip',\n calendar: 'iox-cal',\n calendarDay: 'iox-cal__day',\n },\n};\n\n/** The class a declared part compiles against, e.g. ('Field', 'error') -> 'iox-field__error'.\n * Undefined when the type declares no such part (or no parts at all). */\nexport function partClassName(type: string, partKey: string): string | undefined {\n return PART_CLASS_NAMES[type]?.[partKey];\n}\n","/**\n * WHERE a state rule lands — the ONE selector planner both renderers emit state and part rules through\n * (vectoriox/iox-client-engine#14). Before it the builder and the engine each kept a copy: the builder matched a\n * structural state (first / last / odd / even child) on the OUTER element, the engine on `.iox-node` — on the\n * engine's component path the INNER element, the only child of its host, so \"last child\" matched every item; and\n * the engine dropped every part state but Wrong / Accepted while the builder applied a part's hover at all times.\n *\n * Returns full selectors (with their dots). Framework-free.\n */\n\nimport { buildPartSelector, VALIDATION_STATE_CLASS } from './parts';\nimport { HOVER_STATES, stateSelectorSuffix } from './style-compiler';\nimport { targetedStateSelector, TARGETED_STATE_SUFFIX } from './tree-relations';\n\n/**\n * Properties that govern how a node sits in its PARENT's layout (flex / grid item, block child) — they live on the\n * OUTER element: the component's host, or the one element the string renderer and the canvas's collapsed hosts write.\n * Everything else is \"inner\". One list for both renderers (it was typed twice).\n */\nexport const OUTER_STYLE_PROPS: ReadonlySet<string> = new Set([\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'alignSelf', 'flexGrow', 'flexShrink', 'flexBasis', 'order',\n 'gridColumn', 'gridRow', 'justifySelf',\n 'width',\n]);\n\n/** Structural pseudo-classes — matched on the element that IS the sibling among siblings (the outer). */\nexport const STRUCTURAL_STATES: ReadonlyArray<string> = ['first-child', 'last-child', 'nth-child(odd)', 'nth-child(even)'];\n\n/** States whose pseudo-class lives on the PARENT (`parent-hover` → the parent's `:hover`). */\nexport const RELATIONAL_STATE_PSEUDO: Readonly<Record<string, string>> = { 'parent-hover': 'hover' };\n\nexport function isStructuralState(state: string): boolean {\n return STRUCTURAL_STATES.includes(state);\n}\n\n/** What a state rule needs besides the node: its parent (relational) or its scope and trigger (targeted). */\nexport interface StateScope {\n parentId?: string | null;\n scopeId?: string | null;\n triggerId?: string | null;\n}\n\n/** A state rule's selectors: `inner` for the node's own element; `outer`, when set, for the OUTER_STYLE_PROPS. */\nexport interface StateRulePlan {\n inner: string;\n outer?: string;\n}\n\n/**\n * The selectors of `cssId`'s rule for `state`, or null when the state cannot be scoped yet (a relational state with\n * no parent, a targeted one with no scope — never an unscoped, page-global rule).\n *\n * A structural state is matched on the outer element, and its styles reach the node's own element whether that is\n * the same element (the string path, a one-element node, the canvas's collapsed hosts) or inside it (a component's\n * host, a Repeater's row wrapper); its outer props stay on the outer element. Every other state is the node's own.\n */\nexport function planStateRule(cssId: string, state: string, scope: StateScope = {}): StateRulePlan | null {\n if (TARGETED_STATE_SUFFIX[state]) {\n const body = scope.scopeId && scope.triggerId ? targetedStateSelector(state, scope.scopeId, scope.triggerId, cssId) : null;\n return body ? { inner: `.${body}` } : null;\n }\n const relational = RELATIONAL_STATE_PSEUDO[state];\n if (relational) return scope.parentId ? { inner: `.iox-node-${scope.parentId}:${relational} .iox-node-${cssId}` } : null;\n const validationClass = VALIDATION_STATE_CLASS[state];\n if (validationClass) return { inner: `.${buildPartSelector(cssId, undefined, validationClass)}` };\n if (isStructuralState(state)) {\n const outer = `.iox-outer-${cssId}:${state}`;\n return { inner: `${outer}.iox-node-${cssId}, ${outer} .iox-node-${cssId}`, outer };\n }\n return { inner: `.iox-node-${cssId}${stateSelectorSuffix(state)}` };\n}\n\n/**\n * The selector of a PART's rule (a Field's label, control, help, error — `PART_CLASS_NAMES`), optionally in a state:\n * Wrong / Accepted and a component state on the NODE (that is where the class / attribute is), Hover / Pressed /\n * Focus on the PART itself. Null for a state a part does not take (structural, relational, targeted).\n */\nexport function planPartRule(cssId: string, partClass: string, state?: string | null): string | null {\n if (!state) return `.${buildPartSelector(cssId, partClass)}`;\n const validationClass = VALIDATION_STATE_CLASS[state];\n if (validationClass) return `.${buildPartSelector(cssId, partClass, validationClass)}`;\n if (isStructuralState(state) || RELATIONAL_STATE_PSEUDO[state] || TARGETED_STATE_SUFFIX[state]) return null;\n const suffix = stateSelectorSuffix(state);\n // An attribute state (`current`, `on`) is the node's; a pseudo-class is the part's own.\n return suffix.startsWith('[') ? `.iox-node-${cssId}${suffix} .${partClass}` : `.iox-node-${cssId} .${partClass}${suffix}`;\n}\n\n/** Split a style map into the node's own props and its OUTER_STYLE_PROPS. */\nexport function splitOuterProps(styles: Record<string, any>): { inner: Record<string, any>; outer: Record<string, any> } {\n const inner: Record<string, any> = {};\n const outer: Record<string, any> = {};\n for (const [k, v] of Object.entries(styles)) (OUTER_STYLE_PROPS.has(k) ? outer : inner)[k] = v;\n return { inner, outer };\n}\n\n/**\n * The devices a hover rule is for (G1 — Emil 91, mobile-native M1): a phone has no hover, and a tap fires a false\n * one that STICKS until the next tap elsewhere. Every hover, parent-hover and trigger-hover rule — the node's own and\n * a part's — is emitted inside this query by both renderers; `:active` (a real press on touch) never is.\n */\nexport const HOVER_MEDIA_QUERY = '(hover: hover) and (pointer: fine)';\n\n/** True for a state driven by a pointer hovering something (its own, its parent's, a chosen trigger's). */\nexport function isHoverState(state: string | null | undefined): boolean {\n return !!state && HOVER_STATES.includes(state);\n}\n\n/** `css` as it is emitted for `state`: inside `HOVER_MEDIA_QUERY` for a hover state, unchanged otherwise. */\nexport function gateHoverRule(state: string | null | undefined, css: string): string {\n return css && isHoverState(state) ? `@media ${HOVER_MEDIA_QUERY} {\\n${css}\\n}` : css;\n}\n","/**\n * \"This link is the page you're on\" (CC1, N2). ONE decision for the builder canvas and both engine\n * paths: a link whose target is the current page renders `aria-current=\"page\"` — in the raw SSR too —\n * and the `current` style state compiles to that attribute (`[aria-current=\"page\"]`), so the look and\n * the announcement can never disagree.\n *\n * Paths are compared APP-relative: the engine's string path writes base-relative hrefs (`work`, `./`\n * for home), the canvas writes the route (`/work`), and a browser hands back an absolute pathname\n * under the tenant's `<base href=\"/<org>/\">` — `baseHref` strips that.\n */\n\nexport interface CurrentLinkOptions {\n /** Also current on the pages BELOW the link's (`/work` while on `/work/sample-project`). Never for home. */\n prefix?: boolean;\n /** The document's base path (`/<org>/`), stripped from both sides when present. */\n baseHref?: string | null;\n}\n\n/** The value a current link carries. */\nexport const ARIA_CURRENT_PAGE = 'page';\n\nconst EXTERNAL = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/** True for an href that leaves the site (a scheme, protocol-relative) or stays on the page (`#…`, empty). */\nexport function isExternalOrFragment(href: string | null | undefined): boolean {\n const h = String(href ?? '').trim();\n return !h || h.startsWith('#') || EXTERNAL.test(h);\n}\n\n/**\n * An app path in one comparable form: no query or hash, no base, no leading `./` or slashes, no\n * trailing slash. Home is `''`.\n */\nexport function normalizeAppPath(path: string | null | undefined, baseHref?: string | null): string {\n let p = String(path ?? '').trim().replace(/[?#].*$/, '');\n const base = String(baseHref ?? '').trim().replace(/\\/+$/, '');\n if (base && base !== '/' && (p === base || p.startsWith(`${base}/`))) p = p.slice(base.length);\n p = p.replace(/^(?:\\.\\/)+/, '').replace(/\\/{2,}/g, '/').replace(/^\\/+/, '').replace(/\\/+$/, '');\n return p === '.' ? '' : p;\n}\n\n/** Whether `href` points at the page at `currentPath` (both app-relative, or absolute under `baseHref`). */\nexport function isCurrentLink(href: string | null | undefined, currentPath: string | null | undefined, options: CurrentLinkOptions = {}): boolean {\n if (currentPath == null || isExternalOrFragment(href)) return false;\n const target = normalizeAppPath(href, options.baseHref);\n const here = normalizeAppPath(currentPath, options.baseHref);\n if (target === here) return true;\n return !!options.prefix && target !== '' && here.startsWith(`${target}/`);\n}\n","import { dialogDomId, dialogOpenerAttributes, OpenerNodeLike } from '@vectoriox/iox-ui/actions-core';\n\nimport { ARIA_CURRENT_PAGE, CurrentLinkOptions, isCurrentLink } from '../navigation/current-link';\nimport { A11yTrait, ACCESSIBLE_NAME_TYPES, CURRENT_LINK_TYPES } from './a11y-traits';\n\nexport { A11yTrait, ACCESSIBLE_NAME_TYPES, CURRENT_LINK_TYPES } from './a11y-traits';\nimport { breakpointDef } from '../style-compiler/responsive';\n\n/**\n * The accessibility attributes a node renders (CC1: N2 current page, N3 dialog openers, N4 a drawer\n * that closes when the window widens, N6 accessible names). ONE function decides them and every\n * renderer applies the answer with its own transport: the engine's string path serialises it, the\n * engine's component path and the builder canvas set it on the node's element. A node that wants\n * none of it gets `{}` and renders exactly as before.\n */\n\n\n\n\n/** The types that are pure decoration to assistive technology (an Icon has no name of its own). */\nexport const DECORATIVE_TYPES: ReadonlyArray<string> = ['Icon'];\n\nexport const DIALOG_NODE_TYPE = 'Dialog';\n/** Named for assistive technology, but never an icon-only CONTROL the audit should flag: a Dialog, a carousel. */\nconst NAME_NOT_REQUIRED_TYPES: ReadonlyArray<string> = [DIALOG_NODE_TYPE, 'SliderContainer'];\nconst SLIDER_PAUSE_ROLE = 'slider.pause';\n/** A Segmented control's root (CC4b) is a radio group that must be named (board 10: an empty name is an audit\n * finding). The main entry does not import composite-core, so the role is spelled here — a11y spec pins it. */\nexport const NAMED_GROUP_ROLES: ReadonlyArray<string> = ['segmented'];\n\n/** Carries the min-width (px) at which an open dialog closes itself; the engine listens on it. */\nexport const DIALOG_CLOSE_ABOVE_ATTRIBUTE = 'data-iox-dialog-close-above';\n\nexport enum A11yAttribute {\n Label = 'aria-label',\n Hidden = 'aria-hidden',\n Current = 'aria-current',\n Id = 'id',\n}\n\n/** Every attribute this module may set — what `syncNodeA11yAttributes` owns on an element. */\nexport const MANAGED_A11Y_ATTRIBUTES: ReadonlyArray<string> = [\n A11yAttribute.Label, A11yAttribute.Hidden, A11yAttribute.Current, A11yAttribute.Id,\n 'aria-haspopup', 'aria-expanded', 'aria-controls', DIALOG_CLOSE_ABOVE_ATTRIBUTE,\n];\n\n/** A node as any renderer holds it: serialized (`props`), or the builder's (`traits[]`). */\nexport interface A11yNodeSource extends OpenerNodeLike {\n id?: string;\n styleId?: string;\n type?: string;\n props?: Readonly<Record<string, unknown>> | null;\n traits?: ReadonlyArray<{ name?: string; default?: unknown }> | Readonly<Record<string, { name?: string; default?: unknown }>> | null;\n}\n\n/** A content trait's value from `props` (serialized) or `traits[]` (builder). */\nexport function nodeTraitValue(node: A11yNodeSource | null | undefined, name: string): unknown {\n if (!node) return undefined;\n if (node.props && name in node.props) return node.props[name];\n const traits = node.traits ? (Array.isArray(node.traits) ? node.traits : Object.values(node.traits)) : [];\n return (traits as ReadonlyArray<{ name?: string; default?: unknown }>).find(t => t?.name === name)?.default;\n}\n\n/** The min-width (CSS px) above a breakpoint — where a dialog set to \"close when wider than\" it closes. */\nexport function dialogCloseAboveMinWidth(breakpoint: unknown): number | null {\n const max = typeof breakpoint === 'string' ? breakpointDef(breakpoint)?.maxWidth : null;\n return max == null ? null : max + 1;\n}\n\n/** `(min-width: 768px)` for a min-width carried in `data-iox-dialog-close-above`. */\nexport function closeAboveMediaQuery(minWidth: number | string): string {\n return `(min-width: ${Number(minWidth)}px)`;\n}\n\nexport interface NodeA11yContext {\n /** The app path of the page being rendered (`/work`). Absent = no current-link decision. */\n currentPath?: string | null;\n /** The href the renderer gives this node (a page link's resolved route, or its URL). */\n href?: string | null;\n currentLink?: CurrentLinkOptions;\n}\n\nfunction trimmed(v: unknown): string {\n return typeof v === 'string' ? v.trim() : '';\n}\n\n/** The attributes a node renders. */\nexport function nodeA11yAttributes(node: A11yNodeSource | null | undefined, ctx: NodeA11yContext = {}): Record<string, string> {\n if (!node?.type) return {};\n const out: Record<string, string> = {};\n const name = ACCESSIBLE_NAME_TYPES.includes(node.type) ? trimmed(nodeTraitValue(node, A11yTrait.AccessibleName)) : '';\n if (name) out[A11yAttribute.Label] = name;\n if (DECORATIVE_TYPES.includes(node.type)) out[A11yAttribute.Hidden] = 'true';\n if (CURRENT_LINK_TYPES.includes(node.type) && isCurrentLink(ctx.href, ctx.currentPath, ctx.currentLink)) {\n out[A11yAttribute.Current] = ARIA_CURRENT_PAGE;\n }\n Object.assign(out, dialogOpenerAttributes(node));\n if (node.type === DIALOG_NODE_TYPE) {\n const id = node.styleId ?? node.id;\n if (id) out[A11yAttribute.Id] = dialogDomId(id);\n const minWidth = dialogCloseAboveMinWidth(nodeTraitValue(node, A11yTrait.CloseAbove));\n if (minWidth !== null) out[DIALOG_CLOSE_ABOVE_ATTRIBUTE] = String(minWidth);\n }\n return out;\n}\n\n/** The attributes as an HTML string fragment (` name=\"value\"`…) for a string renderer. */\nexport function serializeA11yAttributes(attrs: Readonly<Record<string, string>>, escape: (v: string) => string): string {\n return Object.entries(attrs).map(([k, v]) => ` ${k}=\"${escape(v)}\"`).join('');\n}\n\nconst applied = new WeakMap<object, ReadonlyArray<string>>();\n\n/**\n * Make an element's managed attributes match `attrs` — set what is there, remove what this function\n * set before and is gone now. An attribute it never set (a component's own `aria-*`) is left alone.\n */\nexport function syncNodeA11yAttributes(\n el: { setAttribute(n: string, v: string): void; removeAttribute(n: string): void } | null | undefined,\n attrs: Readonly<Record<string, string>>,\n): void {\n if (!el) return;\n for (const name of applied.get(el) ?? []) if (!(name in attrs)) el.removeAttribute(name);\n for (const [name, value] of Object.entries(attrs)) el.setAttribute(name, value);\n applied.set(el, Object.keys(attrs).filter(n => MANAGED_A11Y_ATTRIBUTES.includes(n)));\n}\n\n/** The types whose words are the node's own (`content` / `label`), not its children's. */\nconst OWN_WORDS: Readonly<Record<string, string>> = { Text: 'content', Heading: 'content', Link: 'label', SubmitButton: 'label' };\nconst ICON_TYPE = 'Icon';\n\ninterface NameScan { words: boolean; icon: boolean; }\n\nfunction scanNames(node: A11yNodeSource & { children?: ReadonlyArray<unknown> | null }, acc: NameScan): void {\n const prop = node.type ? OWN_WORDS[node.type] : undefined;\n if (prop && trimmed(nodeTraitValue(node, prop))) acc.words = true;\n if (node.type === ICON_TYPE) acc.icon = true;\n for (const child of (node.children ?? []) as ReadonlyArray<A11yNodeSource & { children?: ReadonlyArray<unknown> }>) scanNames(child, acc);\n}\n\n/**\n * True for a control that shows ONLY an icon and has no Accessible name — announced as an unnamed\n * button or link (WCAG 4.1.2, CC1 N6). The responsive audit flags it; an Icon on its own is decoration.\n */\nexport function needsAccessibleName(node: (A11yNodeSource & { children?: ReadonlyArray<unknown> | null }) | null | undefined): boolean {\n if (!node?.type || !ACCESSIBLE_NAME_TYPES.includes(node.type) || NAME_NOT_REQUIRED_TYPES.includes(node.type)) return false;\n // A Slider's pause control is named by its runtime (\"Stop / Start automatic slide show\", CC3).\n if ((node as { role?: string }).role === SLIDER_PAUSE_ROLE) return false;\n if (trimmed(nodeTraitValue(node, A11yTrait.AccessibleName))) return false;\n const acc: NameScan = { words: false, icon: false };\n scanNames(node, acc);\n return acc.icon && !acc.words;\n}\n\n/**\n * True for a GROUP that must be named and is not — a Segmented control's radio group (CC4b, board 10): a screen reader\n * says \"radio group\" and nothing about what is being chosen. The responsive audit flags it; named in Bindings ▸\n * Accessibility.\n */\nexport function needsGroupName(node: (A11yNodeSource & { role?: string | null }) | null | undefined): boolean {\n return !!node?.role && NAMED_GROUP_ROLES.includes(node.role) && !trimmed(nodeTraitValue(node, A11yTrait.AccessibleName));\n}\n","/**\n * THE interaction keyframes (composite plan T2 · CC1 N5). Both runtimes — the builder's\n * InteractionEngineService and the live site's ClientInteractionService — animate an element action\n * from this ONE table. Before it, each kept its own copy and they drifted: `show`/`hide` animated\n * `visibility` on the canvas and not on the site, and `toggleVisibility` ran 0→1 on the canvas and\n * 1→0 on the site, so the same hamburger opened on one and closed on the other.\n *\n * `toggleVisibility` is stateful: it HIDES a visible element and SHOWS a hidden one\n * (`resolveToggleVisibility`), and its frames are then exactly `hide`'s or `show`'s. Hidden ends at\n * `visibility: hidden`, so a hidden element leaves the tab order and the accessibility tree too.\n * It is still visual-only — the element keeps its box — which is why the actions picker says so and\n * why the mobile-nav pattern uses a Dialog instead (D9).\n */\n\nimport { playTextReveal, revealClipPath, SCENE_REVEAL_DEFAULT, SceneRevealFrom, TextRevealBy } from '@vectoriox/iox-ui/scene-core';\n\nimport { motionAllowed } from './motion';\n\nexport type InteractionKeyframe = Readonly<Record<string, string | number>>;\n\n/** The attribute a runtime puts on an element an interaction has hidden (and removes on reveal). */\nexport const INTERACTION_HIDDEN_ATTRIBUTE = 'data-iox-hidden';\n\nexport enum VisibilityActionType {\n Show = 'show',\n Hide = 'hide',\n Toggle = 'toggleVisibility',\n}\n\n/** The reveals (premium sites SC3): a wipe from a chosen side, a picture settling, text rising line by line. */\nexport enum RevealActionType {\n Clip = 'clipReveal',\n Zoom = 'zoomOut',\n Text = 'revealText',\n}\n\n/** Actions that reveal an element (hidden → visible). Their FIRST frame is the pre-state. */\nexport const ENTRANCE_ACTION_TYPES: ReadonlySet<string> =\n new Set(['fadeIn', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'scaleIn', VisibilityActionType.Show, RevealActionType.Clip, RevealActionType.Zoom, RevealActionType.Text]);\n\n/** Actions that hide an element (visible → hidden). */\nexport const EXIT_ACTION_TYPES: ReadonlySet<string> = new Set(['fadeOut', 'scaleOut', VisibilityActionType.Hide]);\n\nconst DEFAULT_DISTANCE = 20;\nconst DEFAULT_DEGREES = 360;\nconst ZOOM_START = 1.15;\nconst SHOWN_PERCENT = 100;\n\nconst SHOWN = { opacity: 1, visibility: 'visible' } as const;\nconst HIDDEN = { opacity: 0, visibility: 'hidden' } as const;\n\n/** What `toggleVisibility` does to an element: show it when hidden, hide it when visible. */\nexport function resolveToggleVisibility(isHidden: boolean): VisibilityActionType.Show | VisibilityActionType.Hide {\n return isHidden ? VisibilityActionType.Show : VisibilityActionType.Hide;\n}\n\n/** The action a runtime actually plays: `toggleVisibility` resolved against the element's state. */\nexport function effectiveActionType(type: string, isHidden: boolean): string {\n return type === VisibilityActionType.Toggle ? resolveToggleVisibility(isHidden) : type;\n}\n\n/**\n * The keyframes of an animation action, or null for a type that is not an animation (dialogs,\n * context, navigation…). `toggleVisibility` must be resolved first (`effectiveActionType`); asked\n * directly it answers with `hide`'s frames, the toggle of an element that starts visible.\n */\nexport function buildInteractionKeyframes(type: string, params?: Readonly<Record<string, unknown>> | null): InteractionKeyframe[] | null {\n const dist = Number(params?.['distance'] ?? DEFAULT_DISTANCE);\n const deg = Number(params?.['degrees'] ?? DEFAULT_DEGREES);\n switch (type) {\n case 'fadeIn': return [{ opacity: 0 }, { opacity: 1 }];\n case 'fadeOut': return [{ opacity: 1 }, { opacity: 0 }];\n case 'moveUp': return [{ opacity: 0, transform: `translateY(${dist}px)` }, { opacity: 1, transform: 'translateY(0)' }];\n case 'moveDown': return [{ opacity: 0, transform: `translateY(-${dist}px)` }, { opacity: 1, transform: 'translateY(0)' }];\n case 'moveLeft': return [{ opacity: 0, transform: `translateX(${dist}px)` }, { opacity: 1, transform: 'translateX(0)' }];\n case 'moveRight': return [{ opacity: 0, transform: `translateX(-${dist}px)` }, { opacity: 1, transform: 'translateX(0)' }];\n case 'scaleIn': return [{ opacity: 0, transform: 'scale(0.8)' }, { opacity: 1, transform: 'scale(1)' }];\n case 'scaleOut': return [{ opacity: 1, transform: 'scale(1)' }, { opacity: 0, transform: 'scale(0.8)' }];\n case 'rotate': return [{ transform: 'rotate(0deg)' }, { transform: `rotate(${deg}deg)` }];\n case RevealActionType.Clip: return clipFrames(params);\n case RevealActionType.Zoom: return [{ transform: `scale(${ZOOM_START})` }, { transform: 'scale(1)' }];\n // A whole-element fade is what plays when text cannot split, and what reduced motion and the pre-state read.\n case RevealActionType.Text: return [{ opacity: 0 }, { opacity: 1 }];\n case VisibilityActionType.Show: return [HIDDEN, SHOWN];\n case VisibilityActionType.Hide:\n case VisibilityActionType.Toggle: return [SHOWN, HIDDEN];\n default: return null;\n }\n}\n\nfunction revealFromOf(params?: Readonly<Record<string, unknown>> | null): SceneRevealFrom {\n const from = params?.['from'];\n return Object.values(SceneRevealFrom).includes(from as SceneRevealFrom) ? (from as SceneRevealFrom) : SCENE_REVEAL_DEFAULT;\n}\n\nfunction clipFrames(params: Readonly<Record<string, unknown>> | null | undefined, inlineSign: 1 | -1 = 1): InteractionKeyframe[] {\n const from = revealFromOf(params);\n return [{ opacity: 1, clipPath: revealClipPath(0, from, inlineSign) }, { opacity: 1, clipPath: revealClipPath(SHOWN_PERCENT, from, inlineSign) }];\n}\n\nconst INLINE_FROMS: ReadonlySet<SceneRevealFrom> = new Set([SceneRevealFrom.Start, SceneRevealFrom.End]);\n\nexport interface AnimateActionOptions {\n /** The frames are `buildInteractionKeyframes`' reversed: a reverse pass never splits text, it just fades back. */\n reverse?: boolean;\n}\n\n/** The id every interaction run's Animation carries — how a re-trigger finds the runs it interrupts. */\nexport const INTERACTION_ANIMATION_ID = 'iox-interaction';\n\n/**\n * What a run that has ended leaves on its element (vectoriox/iox-client-engine#12, iox-ui#41) — ONE rule for the\n * canvas and the live site.\n *\n * `Release`: the last frame IS the element's natural state (an entrance, an exit played back, a one-shot like a\n * rotate). The run is cancelled and no frame is written inline, so the stylesheet applies again — the element\n * style's `:hover` / `:active` transforms included. Before, the last frame (`transform: translateY(0)`) was locked\n * inline on the site and kept by `fill: both` on the canvas, and an element that had entered never pressed again.\n *\n * `Hold`: the last frame HIDES the element (an exit, an entrance played back): it is kept, inline.\n */\nexport enum SettleMode {\n Release = 'release',\n Hold = 'hold',\n}\n\nexport function settleModeFor(type: string, reverse = false): SettleMode {\n const hides = reverse ? ENTRANCE_ACTION_TYPES.has(type) : EXIT_ACTION_TYPES.has(type);\n return hides ? SettleMode.Hold : SettleMode.Release;\n}\n\nexport interface SettleOptions {\n /** Properties a runtime never writes inline — the canvas never a transform (one inside the scaled page breaks Lenis). */\n readonly skip?: ReadonlySet<string>;\n}\n\n/** Every CSS property a run's frames touch. */\nfunction framePropertyNames(frames: ReadonlyArray<InteractionKeyframe> | null | undefined): string[] {\n const names = new Set<string>();\n for (const frame of frames ?? []) for (const key of Object.keys(frame)) names.add(keyframePropertyName(key));\n return [...names];\n}\n\n/**\n * Leave `el` as a run that has ended — or one that never plays, under reduced motion — should (`SettleMode`). The\n * frame is written (Hold) or released (Release) BEFORE `anim` is cancelled, so nothing flashes between the two.\n */\nexport function settleInteraction(\n el: HTMLElement,\n frames: ReadonlyArray<InteractionKeyframe> | null | undefined,\n mode: SettleMode,\n options: SettleOptions = {},\n anim?: Animation | null,\n): void {\n if (mode === SettleMode.Hold) {\n for (const [prop, value] of keyframeStyleEntries(finalKeyframe(frames))) {\n if (!options.skip?.has(prop)) el.style.setProperty(prop, value);\n }\n } else {\n for (const prop of framePropertyNames(frames)) el.style.removeProperty(prop);\n }\n anim?.cancel();\n}\n\n/** The keyframe properties an Animation animates (camelCase, as `getKeyframes` names them). */\nfunction animatedKeys(anim: Animation): string[] {\n const keyframes = (anim.effect as KeyframeEffect | null)?.getKeyframes?.() ?? [];\n const skip = new Set(['offset', 'computedOffset', 'easing', 'composite']);\n return keyframes.flatMap(k => Object.keys(k).filter(key => !skip.has(key)));\n}\n\n/**\n * Interrupt (Emil 52/59/62): the interaction runs in flight on `el` over the same properties are stopped — never\n * stacked — and the new run starts from what the element shows NOW (its presentation value), not from frame 0: a\n * hover-out halfway through the hover-in turns back from where it is, a re-trigger continues. Untouched when\n * nothing is running (the run starts from its own first frame, as before).\n */\nexport function framesFromLiveValue(el: HTMLElement, frames: ReadonlyArray<InteractionKeyframe>): InteractionKeyframe[] {\n const first = frames[0];\n if (!first) return [...frames];\n const keys = new Set(Object.keys(first));\n const running = (el.getAnimations?.() ?? [])\n .filter(a => a.id === INTERACTION_ANIMATION_ID && animatedKeys(a).some(k => keys.has(k)));\n if (!running.length) return [...frames];\n const style = el.ownerDocument?.defaultView?.getComputedStyle(el);\n const live: Record<string, string | number> = { ...first };\n for (const key of keys) {\n const value = style?.getPropertyValue(keyframePropertyName(key));\n if (value) live[key] = value;\n }\n for (const anim of running) anim.cancel();\n return [live, ...frames.slice(1)];\n}\n\n/**\n * Play an element action and settle it when it ends — THE call both runtimes make for an animated action: it starts\n * from the live value (`framesFromLiveValue`, inside `animateAction`) and ends by the ONE settle rule. A run that is\n * interrupted is never settled: the run that interrupted it owns the element now.\n */\nexport function playInteraction(\n el: HTMLElement,\n action: { type: string; params?: Readonly<Record<string, unknown>> | null },\n frames: ReadonlyArray<InteractionKeyframe>,\n timing: KeyframeAnimationOptions,\n options: AnimateActionOptions & SettleOptions = {},\n): Animation {\n const anim = animateAction(el, action, frames, { fill: 'both', ...timing }, { reverse: options.reverse });\n const mode = settleModeFor(action.type, options.reverse);\n anim.finished?.then(() => settleInteraction(el, frames, mode, options, anim)).catch(() => { /* interrupted */ });\n return anim;\n}\n\n/**\n * Start an element action's animation: THE call both runtimes make. Most actions are one `element.animate`; a text\n * reveal plays its pieces and a clip reveal opens from the side the page's direction makes of Start and End, then takes\n * its clip away so a resting element never crops its own shadow. Each still comes back as one Animation.\n */\nexport function animateAction(\n el: HTMLElement,\n action: { type: string; params?: Readonly<Record<string, unknown>> | null },\n frames: ReadonlyArray<InteractionKeyframe>,\n timing: KeyframeAnimationOptions,\n options: AnimateActionOptions = {},\n): Animation {\n if (action.type === RevealActionType.Text && !options.reverse) {\n const by = action.params?.['by'] === TextRevealBy.Word ? TextRevealBy.Word : TextRevealBy.Line;\n const reveal = playTextReveal(el, by, timing);\n if (reveal) return reveal;\n }\n if (action.type !== RevealActionType.Clip) return tagged(el.animate(framesFromLiveValue(el, frames) as Keyframe[], timing));\n const rtl = INLINE_FROMS.has(revealFromOf(action.params)) && el.ownerDocument.defaultView?.getComputedStyle(el).direction === 'rtl';\n const mirrored = rtl ? clipFrames(action.params, -1) : frames;\n const played = rtl && options.reverse ? [...mirrored].reverse() : mirrored;\n const anim = tagged(el.animate(framesFromLiveValue(el, played) as Keyframe[], timing));\n if (!options.reverse) anim.addEventListener('finish', () => anim.cancel(), { once: true });\n return anim;\n}\n\nfunction tagged(anim: Animation): Animation {\n try { anim.id = INTERACTION_ANIMATION_ID; } catch { /* a stub without an id */ }\n return anim;\n}\n\n/** `translateX` → `translate-x`, `opacity` → `opacity`: the CSS property name of a keyframe key. */\nexport function keyframePropertyName(key: string): string {\n return key.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\n\n/** A keyframe as `[css-property, value]` pairs — what a runtime writes inline. */\nexport function keyframeStyleEntries(frame: InteractionKeyframe | null | undefined): Array<[string, string]> {\n return Object.entries(frame ?? {}).map(([k, v]) => [keyframePropertyName(k), String(v)]);\n}\n\n/**\n * The inline pre-state an ENTRANCE action puts on its element before it plays — its first frame as\n * CSS — so the server render ships it already hidden (no visible→hidden flash). `{}` for anything else.\n */\nexport function entrancePreStateStyle(type: string, params?: Readonly<Record<string, unknown>> | null): Record<string, string> {\n if (!ENTRANCE_ACTION_TYPES.has(type)) return {};\n // Hidden by opacity until it plays: a fully clipped element does not intersect anything, so its first frame as a\n // pre-state would mean \"Enter viewport\" never fires and it stays hidden for good.\n if (type === RevealActionType.Clip) return { opacity: '0' };\n return Object.fromEntries(keyframeStyleEntries(buildInteractionKeyframes(type, params)?.[0]));\n}\n\n/** Triggers that play an entrance by themselves — the page loading or arriving, the element scrolling into view. */\nexport const SELF_PLAYING_TRIGGERS: ReadonlySet<string> = new Set(['pageLoad', 'pageEnter', 'viewportEnter']);\n\n/**\n * Whether an entrance on `trigger` starts hidden (its pre-state). Always — a menu revealed by a click must stay hidden\n * until the click — except a self-playing one under reduced motion: it would only ever reveal what is already there,\n * so it starts shown and never moves (M1-6b: \"nothing moves and nothing stays hidden\"). Both runtimes ask this.\n */\nexport function entranceStartsHidden(trigger: string, reducedMotion: boolean = !motionAllowed()): boolean {\n return !(reducedMotion && SELF_PLAYING_TRIGGERS.has(trigger));\n}\n\n/** The attribute a SERVER render puts on an element it ships in its entrance's first frame (`entrancePreStateStyle`).\n * The live runtime takes the element over — and drops the attribute — when it attaches; until then the fallback CSS\n * below reads it. */\nexport const ENTRANCE_PRESTATE_ATTRIBUTE = 'data-iox-enter';\n\nconst SHOWN_NOW = 'opacity:1!important;transform:none!important;clip-path:none!important;visibility:visible!important;pointer-events:auto!important';\n\n/**\n * What keeps a server-rendered entrance from hiding content where nothing will play it (AI plan §5 \"Entrances that hide\n * content\"; M1-6b): under reduced motion every pre-stated element is shown at once, before any script; and if the\n * runtime never takes an element over (a script that failed), it is revealed after a few seconds. One stylesheet for\n * the engine's head — `ENTRANCE_NOSCRIPT_CSS` covers a visitor with no script at all.\n */\nexport const ENTRANCE_FALLBACK_CSS =\n `[${ENTRANCE_PRESTATE_ATTRIBUTE}]{animation:iox-enter-safety 1ms linear 6s forwards}` +\n `@keyframes iox-enter-safety{to{opacity:1;transform:none;clip-path:none;visibility:visible;pointer-events:auto}}` +\n `@media (prefers-reduced-motion: reduce){[${ENTRANCE_PRESTATE_ATTRIBUTE}]{${SHOWN_NOW};animation:none!important}}`;\n\n/** The same, for a visitor with no script: every pre-stated element shown at once (served inside `<noscript>`). */\nexport const ENTRANCE_NOSCRIPT_CSS = `[${ENTRANCE_PRESTATE_ATTRIBUTE}]{${SHOWN_NOW};animation:none!important}`;\n\nconst FULLY_SHOWN_CLIP = /^inset\\((0%?\\s*)+\\)$/;\n\n/**\n * The frame an animation comes to rest on (what reduced motion applies at once). A clip that has fully opened rests as\n * no clip at all: `inset(0)` would still crop the element's shadow and stack it, for the rest of the visit.\n */\nexport function finalKeyframe(frames: ReadonlyArray<InteractionKeyframe> | null | undefined): InteractionKeyframe | null {\n if (!frames?.length) return null;\n const last = frames[frames.length - 1];\n return typeof last['clipPath'] === 'string' && FULLY_SHOWN_CLIP.test(last['clipPath']) ? { ...last, clipPath: 'none' } : last;\n}\n","/**\n * What an interaction's easing may be (G6, decision D8): one of the five CSS keywords, a `cubic-bezier()`, or the\n * NAME of one of the look's easing tokens — so an author's entrance moves on the same curve as the site's buttons and\n * dialogs (Emil 21: one token system), and Spring plays the look's spring (a `linear()` curve, `springToLinear`).\n * Both runtimes resolve it the same way, through the CSS custom property on the element itself.\n */\n\nexport enum EasingKeyword {\n Linear = 'linear',\n Ease = 'ease',\n EaseIn = 'ease-in',\n EaseOut = 'ease-out',\n EaseInOut = 'ease-in-out',\n}\n\n/** The look's easing tokens an interaction may name (their `--iox-<name>` holds the curve). */\nexport enum EasingToken {\n Standard = 'ease-standard',\n Enter = 'ease-enter',\n Exit = 'ease-exit',\n Spring = 'ease-spring',\n}\n\nexport const EASING_KEYWORDS: ReadonlyArray<string> = Object.values(EasingKeyword);\nexport const EASING_TOKENS: ReadonlyArray<string> = Object.values(EasingToken);\n\n/** What an unknown or unresolvable easing plays as: a deceleration, never ease-in (Emil 17). */\nexport const DEFAULT_INTERACTION_EASING = EasingKeyword.EaseOut;\n\nconst NUMBER = '\\\\s*(-?\\\\d*\\\\.?\\\\d+)\\\\s*';\nconst CUBIC_BEZIER = new RegExp(`^cubic-bezier\\\\(${NUMBER},${NUMBER},${NUMBER},${NUMBER}\\\\)$`);\n\n/** A well-formed `cubic-bezier(x1, y1, x2, y2)` whose x values sit in [0, 1] (what CSS and WAAPI accept). */\nexport function isCubicBezier(value: unknown): boolean {\n const m = CUBIC_BEZIER.exec(String(value ?? '').trim());\n if (!m) return false;\n const [x1, , x2] = [Number(m[1]), Number(m[2]), Number(m[3])];\n return x1 >= 0 && x1 <= 1 && x2 >= 0 && x2 <= 1;\n}\n\nexport function isEasingToken(value: unknown): value is EasingToken {\n return EASING_TOKENS.includes(String(value ?? ''));\n}\n\n/** True for anything an interaction may store as its easing. */\nexport function isInteractionEasing(value: unknown): boolean {\n return EASING_KEYWORDS.includes(String(value ?? '')) || isEasingToken(value) || isCubicBezier(value);\n}\n\n/** Anything that reads a computed custom property (an element in a document; a stub in a spec). */\ninterface StyledElement {\n ownerDocument?: { defaultView?: { getComputedStyle(el: unknown): { getPropertyValue(name: string): string } } | null } | null;\n}\n\n/** A token's value is a timing function WAAPI plays: a keyword, a cubic-bezier, or a `linear()` / `steps()` curve (the\n * spring's). Read by shape, so it answers alike in every browser, on the server and in a spec. */\nconst TIMING_FUNCTION = /^(linear|steps)\\(.+\\)$/;\nfunction supportedEasing(value: string): boolean {\n return EASING_KEYWORDS.includes(value) || isCubicBezier(value) || TIMING_FUNCTION.test(value);\n}\n\n/**\n * The timing function WAAPI plays for `easing` on `el`: a keyword or a curve as stored; a token name → the token's\n * value as the element sees it (`--iox-ease-spring` → its `linear()`), so a section scheme or the canvas's token scope\n * applies; anything else, or a token the element cannot resolve → `fallback`.\n */\nexport function resolveInteractionEasing(easing: unknown, el?: StyledElement | null, fallback: string = DEFAULT_INTERACTION_EASING): string {\n const value = String(easing ?? '').trim();\n if (EASING_KEYWORDS.includes(value) || isCubicBezier(value)) return value;\n if (!isEasingToken(value)) return fallback;\n const resolved = el?.ownerDocument?.defaultView?.getComputedStyle(el).getPropertyValue(`--iox-${value}`)?.trim();\n return resolved && supportedEasing(resolved) ? resolved : fallback;\n}\n","/**\n * When a pointer event should move something (G7 — Emil 85/86/91, mobile-native M1/M5). Both runtimes ask here.\n *\n * · A hover trigger answers a mouse or a pen only: a finger has no hover, and a tap's emulated mouseenter left the\n * hover state on until the next tap elsewhere.\n * · Press feedback lands on pointer-DOWN, at once — the click (pointer-up) commits. Only an action that is pure\n * feedback moves early: an animation of the pressed element itself that hides nothing and shows nothing. Opening,\n * closing, navigating and toggling stay on the click, so dragging away still cancels them. A keyboard press (Enter,\n * Space) has no pointer-down, so it never animates (Emil 2).\n */\n\nimport { buildInteractionKeyframes, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, VisibilityActionType } from './interaction-keyframes';\n\nexport enum PointerKind {\n Mouse = 'mouse',\n Pen = 'pen',\n Touch = 'touch',\n}\n\nconst HOVERING_POINTERS: ReadonlySet<string> = new Set([PointerKind.Mouse, PointerKind.Pen]);\n\n/** True for a pointer that really hovers — a mouse or a pen, never a finger. An event with no pointer type (a synthetic\n * `mouseenter`) counts as a mouse. */\nexport function isHoverPointer(event: { pointerType?: string | null } | null | undefined): boolean {\n const kind = event?.pointerType;\n return !kind || HOVERING_POINTERS.has(kind);\n}\n\n/** The minimal action shape this reads. */\nexport interface PressAction {\n type: string;\n target?: string;\n disabled?: boolean;\n params?: Readonly<Record<string, unknown>> | null;\n}\n\n/** True for an action that is press FEEDBACK: it animates the pressed element itself and neither hides nor shows it. */\nexport function isPressFeedback(action: PressAction | null | undefined): boolean {\n if (!action || action.disabled) return false;\n if (action.target && action.target !== 'self') return false;\n if (ENTRANCE_ACTION_TYPES.has(action.type) || EXIT_ACTION_TYPES.has(action.type) || action.type === VisibilityActionType.Toggle) return false;\n return !!buildInteractionKeyframes(action.type, action.params);\n}\n\n/** A click interaction's actions split by when they run: the feedback on pointer-down, the rest on the click. */\nexport function splitPressFeedback<T extends PressAction>(actions: ReadonlyArray<T> | null | undefined): { onPress: T[]; onClick: T[] } {\n const onPress: T[] = [];\n const onClick: T[] = [];\n for (const action of actions ?? []) (isPressFeedback(action) ? onPress : onClick).push(action);\n return { onPress, onClick };\n}\n","import { SCROLLED_ATTRIBUTE } from '../style-compiler/style-compiler';\n\n/** How far the page has to move before it counts as scrolled — past a trackpad's rest jitter. */\nexport const SCROLLED_THRESHOLD_PX = 8;\n\n/** True once `offset` has passed the threshold. */\nexport function isScrolled(offset: number, threshold = SCROLLED_THRESHOLD_PX): boolean {\n return Number.isFinite(offset) && offset > threshold;\n}\n\n/** Anything that scrolls: a window (`scrollY`) or an element (`scrollTop`). */\nexport interface ScrollSource {\n addEventListener(type: 'scroll', fn: () => void, options?: AddEventListenerOptions): void;\n removeEventListener(type: 'scroll', fn: () => void): void;\n scrollY?: number;\n scrollTop?: number;\n}\n\n/**\n * Keep `SCROLLED_ATTRIBUTE` on `target` while `source` has scrolled past the threshold — what the Scrolled state (G4)\n * compiles against, on the live site (the window → the document element) and on the canvas (its scroller → the page).\n * One passive listener, read once per frame, written only when it changes. Returns the stop.\n */\nexport function watchScrolled(source: ScrollSource, target: Element, threshold = SCROLLED_THRESHOLD_PX): () => void {\n let frame = 0;\n const raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : (fn: FrameRequestCallback) => setTimeout(() => fn(0), 16) as unknown as number;\n const caf = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : (id: number) => clearTimeout(id);\n const sync = () => {\n frame = 0;\n const scrolled = isScrolled(source.scrollY ?? source.scrollTop ?? 0, threshold);\n if (scrolled !== target.hasAttribute(SCROLLED_ATTRIBUTE)) target.toggleAttribute(SCROLLED_ATTRIBUTE, scrolled);\n };\n const onScroll = () => { if (!frame) frame = raf(sync); };\n source.addEventListener('scroll', onScroll, { passive: true });\n sync();\n return () => {\n source.removeEventListener('scroll', onScroll);\n if (frame) caf(frame);\n target.removeAttribute(SCROLLED_ATTRIBUTE);\n };\n}\n","/**\n * page-style — the ONE compiler that turns a page's style settings into CSS.\n *\n * A page's background / typography is authored once (builder Page panel) and has to render\n * in BOTH renderers: the builder canvas frame and the SSR engine's `<body>`. Before this\n * existed the engine applied it with hand-written `body.style.x = …` assignments buried in\n * the FONT LOADER, and the builder applied nothing at all — so every background an author\n * set was invisible until the site was published. See\n * iox-ai-guidance `architecture/builder/render-parity.md`.\n *\n * Pure and transport-agnostic on purpose: it returns CSS declarations and nothing else.\n * Each consumer applies them its own way (engine → `document.body`, builder → the canvas\n * viewport element). Kebab-case keys so the result works with both `el.style.setProperty`\n * and Angular's `[ngStyle]`.\n */\n\n/** The page-level style bundle, persisted as `page.pageSettings.style`. */\nexport interface PageStyleSettings {\n backgroundColor: string;\n backgroundType: 'solid' | 'gradient' | 'image';\n backgroundGradient: string;\n backgroundImage: string;\n fontFamily: string;\n textColor: string;\n /**\n * Content max-width. Deliberately NOT compiled: it is a constraint on the page's\n * content column, not a property of the page surface, and there is no agreed element\n * to hang it on in either renderer. Stored and edited today, applied by nobody —\n * emitting it onto the page surface here would silently clamp whole layouts.\n */\n maxWidth: string;\n}\n\n/** Background fallback when a gradient/image type is selected but its value is empty. */\nconst EMPTY_BACKGROUND = '#fff';\n\nexport interface PageStyleOptions {\n /**\n * `pageSettings.designSystem` (design-system DS3). A page created with the design system — or\n * adopted into it (DS7) — falls back to the org's tokens for whatever it does not set itself:\n * `background: var(--iox-page-bg)` (a PAINT — Glass and Midnight are gradients, so the shorthand),\n * `color: var(--iox-text)`, `font-family: var(--iox-font-body)`. A page without the flag (every\n * page saved before DS3) compiles exactly as before, so a seeded org never puts a new ground under\n * legacy text — the page follows the same opt-in rule as the element-style marker (§3b-bis).\n */\n designSystem?: boolean;\n}\n\n/** The three page-style fields a design-system page can inherit from the look. */\nexport enum PageStyleField {\n Background = 'background',\n TextColor = 'textColor',\n FontFamily = 'fontFamily',\n}\n\n/** Where a page-style field's value comes from. */\nexport enum PageStyleSource {\n /** The page sets it itself. */\n Own = 'own',\n /** A design-system page that sets nothing wears the look's token. */\n Look = 'look',\n /** A page without the flag that sets nothing: the consumer's own default shows through. */\n Unset = 'unset',\n}\n\n/** The token a design-system page falls back to, per field (spec tokens only). */\nexport const PAGE_STYLE_TOKENS: Readonly<Record<PageStyleField, string>> = {\n [PageStyleField.Background]: 'page-bg',\n [PageStyleField.TextColor]: 'text',\n [PageStyleField.FontFamily]: 'font-body',\n};\n\n/** The CSS property each field compiles to when it falls back (`page-bg` is a PAINT, so the shorthand). */\nconst FIELD_CSS_KEY: Readonly<Record<PageStyleField, string>> = {\n [PageStyleField.Background]: 'background',\n [PageStyleField.TextColor]: 'color',\n [PageStyleField.FontFamily]: 'font-family',\n};\n\nconst tokenVar = (name: string): string => `var(--iox-${name})`;\n\n/** The token fallbacks of a design-system page, as CSS declarations. */\nexport const PAGE_TOKEN_FALLBACKS: Readonly<Record<string, string>> = Object.fromEntries(\n Object.values(PageStyleField).map(f => [FIELD_CSS_KEY[f], tokenVar(PAGE_STYLE_TOKENS[f])]),\n);\n\n/** What each field clears to when it goes back to the look — '' (never a copied literal), so it keeps\n * following every future look. Background clears its image and gradient with it: they are one ground. */\nconst FIELD_RESET: Readonly<Record<PageStyleField, Partial<PageStyleSettings>>> = {\n [PageStyleField.Background]: { backgroundColor: '', backgroundGradient: '', backgroundImage: '', backgroundType: 'solid' },\n [PageStyleField.TextColor]: { textColor: '' },\n [PageStyleField.FontFamily]: { fontFamily: '' },\n};\n\nconst BACKGROUND_KEYS = ['background', 'background-color'];\n\n/** The keys a field's OWN value compiles to — background has two (a flat colour, or a paint). */\nconst FIELD_OWN_KEYS: Readonly<Record<PageStyleField, ReadonlyArray<string>>> = {\n [PageStyleField.Background]: BACKGROUND_KEYS,\n [PageStyleField.TextColor]: ['color'],\n [PageStyleField.FontFamily]: ['font-family'],\n};\n\n/** One field as a panel shows it: where its value comes from and, when it is the look's, which token. */\nexport interface PageStyleFieldState {\n field: PageStyleField;\n source: PageStyleSource;\n /** The token the field falls back to — set only when `source` is `Look`. */\n token: string | null;\n}\n\n/**\n * Where each page-style field comes from — decided by the SAME compile the renderers run, so the\n * Page panel can never say \"from the look\" for a field the canvas paints from the page, or the other\n * way round. A flagged page's empty field is the look's token; an unflagged page's is `Unset`.\n */\nexport function describePageStyle(\n style: Partial<PageStyleSettings> | null | undefined,\n options: PageStyleOptions = {},\n): Record<PageStyleField, PageStyleFieldState> {\n const own = compileOwnStyle(style);\n const describe = (field: PageStyleField): PageStyleFieldState => {\n if (FIELD_OWN_KEYS[field].some(k => k in own)) return { field, source: PageStyleSource.Own, token: null };\n return options.designSystem\n ? { field, source: PageStyleSource.Look, token: PAGE_STYLE_TOKENS[field] }\n : { field, source: PageStyleSource.Unset, token: null };\n };\n return {\n [PageStyleField.Background]: describe(PageStyleField.Background),\n [PageStyleField.TextColor]: describe(PageStyleField.TextColor),\n [PageStyleField.FontFamily]: describe(PageStyleField.FontFamily),\n };\n}\n\n/** The style with one field handed back to the look: cleared to '', every other key kept. */\nexport function resetPageStyleField<T extends Partial<PageStyleSettings>>(style: T | null | undefined, field: PageStyleField): T {\n return { ...(style ?? {}), ...FIELD_RESET[field] } as T;\n}\n\n/**\n * Compile page style settings into CSS declarations.\n *\n * Only keys the author actually set are emitted, so a consumer's own default (the builder's\n * white canvas, the engine's stylesheet) shows through untouched when a page says nothing.\n *\n * `backgroundType` selects which background field wins — it is derived from the author's\n * colour/image choice rather than picked directly (see the builder's page-background.util).\n */\nexport function compilePageStyle(\n style: Partial<PageStyleSettings> | null | undefined,\n options: PageStyleOptions = {},\n): Record<string, string> {\n const css = compileOwnStyle(style);\n if (!options.designSystem) return css;\n for (const field of Object.values(PageStyleField)) {\n if (!FIELD_OWN_KEYS[field].some(k => k in css)) css[FIELD_CSS_KEY[field]] = tokenVar(PAGE_STYLE_TOKENS[field]);\n }\n return css;\n}\n\n/** A value only the `background` shorthand can carry: a `var()` (which may hold a gradient) or a gradient. */\nfunction isPaint(value: string): boolean {\n return /var\\(|gradient\\(/i.test(value);\n}\n\n/** What the page itself sets — the only thing a page without the design-system flag compiles to. */\nfunction compileOwnStyle(style: Partial<PageStyleSettings> | null | undefined): Record<string, string> {\n if (!style) return {};\n const css: Record<string, string> = {};\n\n if (style.fontFamily) css['font-family'] = style.fontFamily;\n if (style.textColor) css['color'] = style.textColor;\n\n switch (style.backgroundType) {\n case 'gradient':\n css['background'] = style.backgroundGradient || EMPTY_BACKGROUND;\n break;\n case 'image':\n css['background'] = style.backgroundImage\n ? `url(${style.backgroundImage}) center/cover no-repeat`\n : EMPTY_BACKGROUND;\n break;\n default:\n // 'solid' and legacy pages with no type at all. A token reference or a gradient is a\n // PAINT (page-bg is a gradient stack in Glass and Midnight): `background-color` would be\n // invalid at computed-value time and the page would lose its ground.\n if (style.backgroundColor) css[isPaint(style.backgroundColor) ? 'background' : 'background-color'] = style.backgroundColor;\n break;\n }\n\n return css;\n}\n","/**\n * Binding pipes — render-time value transforms (UI label: \"Filters\").\n *\n * A binding resolves a raw value (`resolvePath(sourceData, path)`); a pipe chain then reshapes it for\n * display (format a timestamp, upper-case, truncate, …). This is the SINGLE shared implementation used\n * by BOTH the builder canvas and the SSR engine — the engine renders layout JSON to a STRING and can't\n * use Angular pipes, and `resolvePath` is already duplicated across the apply points, so the transform\n * MUST be one pure, transport-agnostic function applied identically everywhere. Never fork it.\n *\n * See iox-ai-guidance/architecture/builder/binding-filters-plan.md.\n */\n\n/** One transform in a binding's chain. `args` are positional, matching the pipe's descriptor order. */\nexport interface IoxPipe {\n name: string;\n args?: any[];\n}\n\n/** Runtime context threaded to every pipe — the locale keeps date/number output identical on the\n * builder canvas and the SSR engine (both pass the site's language). */\nexport interface PipeContext {\n locale?: string;\n}\n\ntype PipeFn = (value: any, args: any[], ctx: PipeContext) => any;\n\n// ── Date / time (Intl locale presets — locale-aware, zero-dep, browser + Node identical) ──────────\nconst DATE_PRESETS: Record<string, Intl.DateTimeFormatOptions> = {\n short: { dateStyle: 'short' },\n medium: { dateStyle: 'medium' },\n long: { dateStyle: 'long' },\n full: { dateStyle: 'full' },\n};\nconst DATETIME_PRESETS: Record<string, Intl.DateTimeFormatOptions> = {\n short: { dateStyle: 'short', timeStyle: 'short' },\n medium: { dateStyle: 'medium', timeStyle: 'short' },\n long: { dateStyle: 'long', timeStyle: 'medium' },\n full: { dateStyle: 'full', timeStyle: 'long' },\n};\n\n/** Coerce an ISO string / epoch number / Date to a valid Date, or null (→ pipes pass the value through). */\nfunction toDate(value: any): Date | null {\n if (value instanceof Date) return isNaN(value.getTime()) ? null : value;\n if (typeof value === 'number') { const d = new Date(value); return isNaN(d.getTime()) ? null : d; }\n if (typeof value === 'string' && value.trim() !== '') { const d = new Date(value); return isNaN(d.getTime()) ? null : d; }\n return null;\n}\n\nfunction formatDate(value: any, args: any[], ctx: PipeContext, presets: Record<string, Intl.DateTimeFormatOptions>): any {\n const d = toDate(value);\n if (!d) return value; // never throw — unparseable input passes through unchanged\n const preset = (args[0] as string) || 'medium';\n return new Intl.DateTimeFormat(ctx.locale, presets[preset] ?? presets['medium']).format(d);\n}\n\n/** The registry — adding a pipe here (+ a descriptor below) makes it work on both sides and appear in\n * the authoring UI. Keyed by name; unknown names are passed through by `applyBindingPipes`. */\nexport const PIPE_REGISTRY: Record<string, PipeFn> = {\n date: (v, args, ctx) => formatDate(v, args, ctx, DATE_PRESETS),\n datetime: (v, args, ctx) => formatDate(v, args, ctx, DATETIME_PRESETS),\n uppercase: (v) => (v == null ? v : String(v).toUpperCase()),\n lowercase: (v) => (v == null ? v : String(v).toLowerCase()),\n truncate: (v, args) => {\n if (v == null) return v;\n const s = String(v);\n const len = Number(args[0]) || 100;\n const suffix = args[1] != null ? String(args[1]) : '…';\n return s.length > len ? s.slice(0, len) + suffix : s;\n },\n number: (v, args, ctx) => {\n const n = typeof v === 'number' ? v : parseFloat(v);\n if (!Number.isFinite(n)) return v;\n const opts: Intl.NumberFormatOptions = {};\n if (args[0] != null && args[0] !== '') { opts.minimumFractionDigits = Number(args[0]); opts.maximumFractionDigits = Number(args[0]); }\n return new Intl.NumberFormat(ctx.locale, opts).format(n);\n },\n};\n\n/**\n * Apply a binding's pipe chain to a resolved value, LEFT→RIGHT. Pure. An empty/undefined chain returns\n * the value untouched; an unknown pipe name is skipped (forward-compatible with newer authored pipes).\n * Call this at every binding-resolution point (builder canvas + engine SSR + engine hydration).\n */\nexport function applyBindingPipes(value: any, pipes?: IoxPipe[], ctx: PipeContext = {}): any {\n if (!pipes?.length) return value;\n return pipes.reduce((v, p) => {\n const fn = p && PIPE_REGISTRY[p.name];\n return fn ? fn(v, p.args ?? [], ctx) : v;\n }, value);\n}\n\n// ── Descriptors — metadata that DATA-DRIVES the authoring UI (no if-chains per control). ───────────\nexport interface PipeArgSpec {\n /** Positional key (order defines the `args` index). */\n key: string;\n /** Default English label; consumers may map `name`/`key` to their own i18n keys. */\n label: string;\n control: 'select' | 'text' | 'number';\n options?: { label: string; value: any }[];\n default?: any;\n}\nexport interface PipeDescriptor {\n name: string;\n label: string;\n args: PipeArgSpec[];\n}\n\nconst PRESET_OPTIONS = [\n { label: 'Short', value: 'short' },\n { label: 'Medium', value: 'medium' },\n { label: 'Long', value: 'long' },\n { label: 'Full', value: 'full' },\n];\n\nexport const PIPE_DESCRIPTORS: PipeDescriptor[] = [\n { name: 'date', label: 'Date', args: [{ key: 'preset', label: 'Format', control: 'select', options: PRESET_OPTIONS, default: 'medium' }] },\n { name: 'datetime', label: 'Date & time', args: [{ key: 'preset', label: 'Format', control: 'select', options: PRESET_OPTIONS, default: 'medium' }] },\n { name: 'uppercase', label: 'UPPERCASE', args: [] },\n { name: 'lowercase', label: 'lowercase', args: [] },\n { name: 'truncate', label: 'Truncate', args: [{ key: 'length', label: 'Max length', control: 'number', default: 100 }] },\n { name: 'number', label: 'Number', args: [{ key: 'decimals', label: 'Decimals', control: 'number', default: null }] },\n];\n","import { ComponentRef, Type, reflectComponentType } from '@angular/core';\n\n/**\n * Declared-input reflection + safe input application, shared by every dynamic renderer\n * (builder `RenderDirective`, builder bindings panel, SSR `ClientTreeRendererService`).\n *\n * WHY THIS EXISTS: `ComponentRef.setInput(name, value)` for an input the component does NOT\n * declare does **not throw** — in dev mode it calls `reportUnknownPropertyError`, which\n * `console.error`s `NG0303: Can't set value of the '<name>' input ...` and returns without\n * setting anything. A `try/catch` around `setInput` is therefore dead code (nothing is thrown)\n * AND the value is silently dropped. On every (re-)render — drag, duplicate, save-triggered\n * re-render, repeater/slider clones — that spams the console and skips the write.\n *\n * The fix is to reflect the component's declared inputs ONCE (cached) and only `setInput` names\n * that exist; anything else is assigned directly on the instance (harmless for consumers that\n * read the raw property, e.g. a `sourcePath`/`source` binding pushed to a SliderContainer).\n */\n\n/** Per-component-class cache of declared public input names (templateName / alias). */\nconst inputNameCache = new WeakMap<Type<unknown>, Set<string>>();\n\n/**\n * The public input names (`@Input()` / `input()` / `model()`, honouring aliases) a component\n * class declares. Cached per class — `reflectComponentType` is not free. Returns an empty set\n * for a class Angular can't reflect (e.g. a non-component).\n */\nexport function declaredInputNames(type: Type<unknown>): Set<string> {\n let names = inputNameCache.get(type);\n if (!names) {\n const mirror = reflectComponentType(type);\n names = new Set((mirror?.inputs ?? []).map(i => i.templateName));\n inputNameCache.set(type, names);\n }\n return names;\n}\n\n/**\n * Set `name` on `ref` as an Angular input **only** when the component declares it (so change\n * detection + signal inputs work); otherwise assign directly on the instance and mark it for\n * check. Never produces an NG0303 error and never silently drops the value. Returns `true` if\n * it was applied as a real input, `false` if it fell back to direct assignment.\n */\nexport function safeSetInput(ref: ComponentRef<unknown>, name: string, value: unknown): boolean {\n if (declaredInputNames(ref.componentType).has(name)) {\n ref.setInput(name, value);\n return true;\n }\n (ref.instance as Record<string, unknown>)[name] = value;\n ref.changeDetectorRef.markForCheck();\n return false;\n}\n","/**\n * THE binding path resolver — one implementation, shared by every renderer.\n *\n * Resolves a dot-notation path with optional array brackets against a data object:\n * `title`, `author.name`, `tags[0]`, `items[2].title`.\n *\n * This lived in three places before (iox-builder's binding-path.util, the engine's string\n * renderer, and the engine's component renderer) and had already drifted: the component-renderer\n * copy was missing the `$` case below, so a repeater over a primitive array rendered in the SSR\n * HTML and then blanked on hydration. See render-parity.md.\n */\nexport function resolvePath(obj: any, path: string): any {\n // Empty path (or `$`) means \"the value itself\" — used to bind to an item that IS a primitive\n // (e.g. a Repeater over `gallery: string[]`, where each item is the URL string). See\n // binding-panel-redesign-plan.md.\n if (path === '' || path === '$' || path == null) return obj;\n return path.split('.').reduce((current, key) => {\n if (current == null) return undefined;\n const bracketMatch = key.match(/^(\\w+)\\[(\\d+)]$/);\n if (bracketMatch) {\n const arr = current[bracketMatch[1]];\n return Array.isArray(arr) ? arr[parseInt(bracketMatch[2], 10)] : undefined;\n }\n return current[key];\n }, obj);\n}\n","import { IoxPipe, PipeContext, applyBindingPipes } from '../binding-pipes';\nimport { resolvePath } from './resolve-path';\n\n/** The part of an `IoxBinding` that turns source data into a value. */\nexport interface BoundValueSpec {\n /** Dot/bracket path into the source data. Empty or absent means the source value itself. */\n path?: string;\n /** Render-time transforms (UI label \"Filters\"), applied after the path lookup. */\n pipes?: IoxPipe[];\n}\n\n/**\n * Resolve one binding's value out of its already-selected source data: path lookup, then pipes.\n *\n * Trivial on its own, which is exactly why it had been retyped at three call sites — the engine's\n * string renderer, the engine's component renderer and the builder canvas — plus a fourth needed by\n * page SEO. `resolvePath` itself was forked five times before it was shared, and the copy that\n * drifted caused a repeater to render in the SSR HTML and then blank on hydration.\n *\n * What is NOT here: picking the source (`resolvedData[binding.source]`) and deciding what an empty\n * context slot means. Those are per-renderer policy — the string renderer clears the prop, the\n * builder skips it — so they stay with the caller.\n */\nexport function resolveBoundValue(sourceData: unknown, binding: BoundValueSpec, ctx: PipeContext = {}): unknown {\n const raw = binding.path ? resolvePath(sourceData, binding.path) : sourceData;\n return applyBindingPipes(raw, binding.pipes, ctx);\n}\n","/**\n * The canonical shape of a page's SEO metadata, plus the flat tag list both renderers emit.\n *\n * ⚠️ This file is the ONLY declaration of that shape. Before it existed, `iox-cms` stored\n * `seo.og.title` while the SSR engine read a flat `seo.ogTitle`, so no Open Graph tag had ever been\n * emitted, and `iox-cms-client` carried a third, hand-copied variant of the same schema. See\n * iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\n/** Open Graph subset we author and emit. */\nexport interface SeoOg {\n title?: string;\n description?: string;\n image?: string;\n}\n\n/** Twitter-card subset. Emitted only when `card` is set — see `seoToTags`. */\nexport interface SeoTwitter {\n card?: string;\n title?: string;\n description?: string;\n image?: string;\n}\n\n/** Sitemap participation for this page. Consumed by the sitemap route (plan phase 3). */\nexport interface SeoSitemap {\n include?: boolean;\n priority?: number;\n changeFreq?: string;\n}\n\n/**\n * A page's stored SEO metadata, normalized.\n *\n * `keywords` has no authoring field — search engines have ignored the tag for over a decade — but\n * it is read and emitted when a document already carries one, because the engine used to read it.\n */\nexport interface SeoDoc {\n title?: string;\n description?: string;\n keywords?: string;\n canonicalUrl?: string;\n robots?: string;\n og?: SeoOg;\n twitter?: SeoTwitter;\n structuredData?: unknown;\n sitemap?: SeoSitemap;\n}\n\n/**\n * A binding on an SEO field. Structurally the resolvable part of an `IoxBinding` — `source` picks an\n * entry in the page's resolved data (`$current` on a template page), `path` walks into it, `pipes`\n * are the render-time transforms. Typed loosely because the pipe catalog lives in the main\n * `@vectoriox/iox-ui` entry point, which this framework-free one must not import.\n */\nexport interface SeoBinding {\n source: string;\n path?: string;\n pipes?: readonly unknown[];\n}\n\n/**\n * One SEO field as stored once it carries more than a typed string.\n *\n * The ladder is `override` → `binding` → auto; `auto: false` opts that field out of the automatic\n * value, leaving it genuinely empty. A bare `string` in a stored document means `{ override }`, so\n * nothing has to be migrated.\n */\nexport interface SeoFieldValue {\n override?: string;\n binding?: SeoBinding;\n auto?: false;\n}\n\n/** A stored SEO document, before resolution: any text field may be a plain string or a value object. */\nexport type SeoRawDoc = Record<string, unknown>;\n\n/**\n * The text fields that can carry a binding, as dotted paths into the document.\n *\n * One list, used by the resolver and (phase 2) by the panel that draws the bind affordance — so a\n * field can never be bindable in the UI and ignored at render time. `robots`, `sitemap.*` and\n * `structuredData` are deliberately absent: they are pick-lists and blobs, not prose.\n */\nexport const SEO_BINDABLE_FIELDS: readonly string[] = [\n 'title',\n 'description',\n 'canonicalUrl',\n 'og.title',\n 'og.description',\n 'og.image',\n 'twitter.title',\n 'twitter.description',\n 'twitter.image',\n];\n\n/** Where an automatic value comes from when a field has neither an override nor a binding. */\nexport type SeoAutoSource = 'contentTitle' | 'contentDescription' | 'contentImage' | 'pageUrl';\n\n/**\n * The bottom rung of the ladder, as a table rather than a chain of ifs.\n *\n * Deliberately short. `og:title` and `twitter:*` are NOT here — `seoToTags` already falls back to\n * the page title for them, and materialising a copy of a value we did not author would only make\n * later drift harder to see.\n */\nexport const SEO_AUTO_SOURCES: ReadonlyArray<{ field: string; source: SeoAutoSource }> = [\n { field: 'title', source: 'contentTitle' },\n { field: 'description', source: 'contentDescription' },\n { field: 'og.image', source: 'contentImage' },\n { field: 'canonicalUrl', source: 'pageUrl' },\n];\n\n/** `<title>`. */\nexport interface SeoTitleTag {\n kind: 'title';\n content: string;\n}\n\n/**\n * A `<meta>` tag. `attr` says which attribute identifies it — Open Graph is addressed by\n * `property`, everything else by `name`. Both renderers need that distinction to update rather\n * than duplicate a tag.\n */\nexport interface SeoMetaTag {\n kind: 'meta';\n attr: 'name' | 'property';\n key: string;\n content: string;\n}\n\n/** A `<link>`, currently only `rel=\"canonical\"`. */\nexport interface SeoLinkTag {\n kind: 'link';\n rel: string;\n href: string;\n}\n\nexport type SeoTag = SeoTitleTag | SeoMetaTag | SeoLinkTag;\n\n/** Context that lets `seoToTags` fill gaps without reaching for the DOM or a data source. */\nexport interface SeoTagContext {\n /** Used as `<title>` when the document has none — usually the page name. */\n fallbackTitle?: string;\n}\n\n/** Recommended maximum before search results truncate the title. */\nexport const SEO_TITLE_MAX = 60;\n\n/** Recommended maximum before search results truncate the description. */\nexport const SEO_DESCRIPTION_MAX = 160;\n\nexport const SEO_ROBOTS_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Index, Follow', value: 'index, follow' },\n { label: 'Index, No Follow', value: 'index, nofollow' },\n { label: 'No Index, Follow', value: 'noindex, follow' },\n { label: 'No Index, No Follow', value: 'noindex, nofollow' },\n];\n\nexport const SEO_TWITTER_CARD_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Summary', value: 'summary' },\n { label: 'Summary Large Image', value: 'summary_large_image' },\n { label: 'App', value: 'app' },\n { label: 'Player', value: 'player' },\n];\n\nexport const SEO_CHANGE_FREQ_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Always', value: 'always' },\n { label: 'Hourly', value: 'hourly' },\n { label: 'Daily', value: 'daily' },\n { label: 'Weekly', value: 'weekly' },\n { label: 'Monthly', value: 'monthly' },\n { label: 'Yearly', value: 'yearly' },\n { label: 'Never', value: 'never' },\n];\n","import { SeoDoc, SeoOg, SeoSitemap, SeoTwitter } from './seo.model';\n\n/**\n * Coerce whatever a page document happens to hold into a `SeoDoc`.\n *\n * Every consumer calls this before reading `seo`, because four shapes are in the wild:\n * • the current nested shape (`og.title`);\n * • the flat shape the SSR engine used to read (`ogTitle`) — never actually written, but a\n * document hand-edited against the old engine code could carry it;\n * • `\"\"` for \"not set\", which must not become an empty `<meta>`;\n * • `{ override: '…' }`, the per-field value object that plan phase 2 introduces — tolerated here\n * so the ladder can land without a second normalizer.\n *\n * Empty branches are dropped rather than left as `{}`, so `if (seo.og)` is a meaningful test.\n */\nexport function normalizeSeoDoc(raw: unknown): SeoDoc {\n const src = asRecord(raw);\n if (!src) return {};\n\n const og = compact<SeoOg>({\n title: seoString(pick(src, 'og', 'title') ?? src['ogTitle']),\n description: seoString(pick(src, 'og', 'description') ?? src['ogDescription']),\n image: seoString(pick(src, 'og', 'image') ?? src['ogImage']),\n });\n\n const twitter = compact<SeoTwitter>({\n card: seoString(pick(src, 'twitter', 'card')),\n title: seoString(pick(src, 'twitter', 'title')),\n description: seoString(pick(src, 'twitter', 'description')),\n image: seoString(pick(src, 'twitter', 'image')),\n });\n\n const sitemap = compact<SeoSitemap>({\n include: bool(pick(src, 'sitemap', 'include')),\n priority: num(pick(src, 'sitemap', 'priority')),\n changeFreq: seoString(pick(src, 'sitemap', 'changeFreq')),\n });\n\n const structuredData = structured(src['structuredData']);\n\n const doc = compact<SeoDoc>({\n title: seoString(src['title']),\n description: seoString(src['description']),\n keywords: seoString(src['keywords']),\n canonicalUrl: seoString(src['canonicalUrl']),\n robots: seoString(src['robots']),\n og,\n twitter,\n sitemap,\n structuredData,\n });\n\n return doc ?? {};\n}\n\n/** Read `src[branch][leaf]` without assuming the branch exists or is an object. */\nfunction pick(src: Record<string, unknown>, branch: string, leaf: string): unknown {\n const nested = asRecord(src[branch]);\n return nested ? nested[leaf] : undefined;\n}\n\n/**\n * A field's value as a trimmed string, or `undefined`. Exported because the resolver needs the exact\n * same coercion for a value it has just pulled out of a data source.\n *\n * Unwraps the value object: a bound or auto field has no `override`, so it correctly resolves to\n * `undefined` here and `resolveSeo` fills it in from the lower rungs.\n */\nexport function seoString(value: unknown): string | undefined {\n const wrapper = asRecord(value);\n const raw = wrapper ? wrapper['override'] : value;\n if (typeof raw === 'number') return String(raw);\n if (typeof raw !== 'string') return undefined;\n const trimmed = raw.trim();\n return trimmed.length ? trimmed : undefined;\n}\n\n/**\n * `UIFormToDTO` can hand back `\"true\"` / `\"false\"` for a switch (see\n * `architecture/cms/shop.md` — the boolean/number coercion pitfall), so accept both.\n */\nfunction bool(value: unknown): boolean | undefined {\n if (typeof value === 'boolean') return value;\n if (value === 'true') return true;\n if (value === 'false') return false;\n return undefined;\n}\n\nfunction num(value: unknown): number | undefined {\n if (typeof value === 'number') return Number.isFinite(value) ? value : undefined;\n if (typeof value !== 'string' || !value.trim().length) return undefined;\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\n/** JSON-LD is stored as an object or as a JSON string from the `json` controller. */\nfunction structured(value: unknown): unknown {\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed.length) return undefined;\n try {\n return JSON.parse(trimmed);\n } catch {\n return undefined;\n }\n }\n if (Array.isArray(value)) return value.length ? value : undefined;\n const record = asRecord(value);\n return record && Object.keys(record).length ? record : undefined;\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\n/** Drop `undefined` values and empty nested objects, so absence is always `undefined`. */\nfunction compact<T extends object>(value: Record<string, unknown>): T | undefined {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) {\n if (entry === undefined) continue;\n out[key] = entry;\n }\n return (Object.keys(out).length ? out : undefined) as T | undefined;\n}\n","import { SeoDoc, SeoTag, SeoTagContext } from './seo.model';\nimport { normalizeSeoDoc } from './normalize';\n\n/**\n * Turn a page's SEO document into the flat list of head tags to emit.\n *\n * Both renderers call this, so a page cannot describe itself differently to a crawler than the\n * builder previews. The order is fixed and part of the contract: title, description, keywords,\n * canonical, Open Graph, Twitter, robots.\n *\n * Fallbacks are deliberately shallow — `og:title` reuses the page title, `twitter:*` reuses the\n * Open Graph values — because a social scraper that finds no `og:title` falls back to `<title>`\n * itself, and duplicating a value we did not author only makes the drift harder to see. The\n * \"derive from the page content\" half of the ladder (first h1, first paragraph, first image) is\n * `resolveSeo`, which runs BEFORE this and hands its output in as a filled-in `SeoDoc`.\n */\nexport function seoToTags(seo: SeoDoc | unknown, ctx: SeoTagContext = {}): SeoTag[] {\n const doc = normalizeSeoDoc(seo);\n const tags: SeoTag[] = [];\n\n const title = doc.title ?? trimmed(ctx.fallbackTitle);\n if (title) tags.push({ kind: 'title', content: title });\n if (doc.description) tags.push({ kind: 'meta', attr: 'name', key: 'description', content: doc.description });\n if (doc.keywords) tags.push({ kind: 'meta', attr: 'name', key: 'keywords', content: doc.keywords });\n if (doc.canonicalUrl) tags.push({ kind: 'link', rel: 'canonical', href: doc.canonicalUrl });\n\n // Open Graph. `og:url` reuses the canonical URL, which is what it means.\n const ogTitle = doc.og?.title ?? title;\n const ogDescription = doc.og?.description ?? doc.description;\n if (ogTitle) tags.push({ kind: 'meta', attr: 'property', key: 'og:title', content: ogTitle });\n if (ogDescription) tags.push({ kind: 'meta', attr: 'property', key: 'og:description', content: ogDescription });\n if (doc.og?.image) tags.push({ kind: 'meta', attr: 'property', key: 'og:image', content: doc.og.image });\n if (doc.canonicalUrl) tags.push({ kind: 'meta', attr: 'property', key: 'og:url', content: doc.canonicalUrl });\n\n // Twitter. Emitted ONLY when a card type is chosen: without `twitter:card` the other tags are\n // ignored anyway, so writing them would be noise that looks like configuration.\n if (doc.twitter?.card) {\n tags.push({ kind: 'meta', attr: 'name', key: 'twitter:card', content: doc.twitter.card });\n const twitterTitle = doc.twitter.title ?? ogTitle;\n const twitterDescription = doc.twitter.description ?? ogDescription;\n const twitterImage = doc.twitter.image ?? doc.og?.image;\n if (twitterTitle) tags.push({ kind: 'meta', attr: 'name', key: 'twitter:title', content: twitterTitle });\n if (twitterDescription) {\n tags.push({ kind: 'meta', attr: 'name', key: 'twitter:description', content: twitterDescription });\n }\n if (twitterImage) tags.push({ kind: 'meta', attr: 'name', key: 'twitter:image', content: twitterImage });\n }\n\n if (doc.robots) tags.push({ kind: 'meta', attr: 'name', key: 'robots', content: doc.robots });\n\n return tags;\n}\n\nfunction trimmed(value: string | undefined): string | undefined {\n const out = value?.trim();\n return out?.length ? out : undefined;\n}\n","import {\n SEO_CHANGE_FREQ_OPTIONS,\n SEO_DESCRIPTION_MAX,\n SEO_ROBOTS_OPTIONS,\n SEO_TITLE_MAX,\n SEO_TWITTER_CARD_OPTIONS,\n} from './seo.model';\n\n/**\n * The authoring schema for the `seo` object, in the platform's standard property dialect: `label`\n * at property level, rendering metadata under `controller`.\n *\n * ONE builder, two callers: `iox-cms` spreads it into `PagesSchema` (the stored schema) and\n * `iox-cms-client` feeds it to `<dynamic-form>`. Those used to be two hand-written copies that had\n * already drifted — different controller types for the same field, and the client's copy missing\n * `structuredData` entirely.\n *\n * `keywords` is deliberately absent: the tag is emitted when a document carries one, but there is\n * no reason to invite new ones.\n */\nexport function buildSeoSchemaProperties(): Record<string, unknown> {\n return {\n title: {\n type: 'string',\n label: 'Meta Title',\n controller: {\n type: 'text',\n placeholder: 'Page title for search engines',\n maxLength: SEO_TITLE_MAX,\n },\n },\n description: {\n type: 'string',\n label: 'Meta Description',\n controller: {\n type: 'textarea',\n placeholder: 'Brief description for search results',\n maxLength: SEO_DESCRIPTION_MAX,\n },\n },\n canonicalUrl: {\n type: 'string',\n label: 'Canonical URL',\n controller: {\n type: 'text',\n placeholder: 'https://example.com/page',\n },\n },\n robots: {\n type: 'string',\n label: 'Robots',\n controller: {\n type: 'select',\n options: SEO_ROBOTS_OPTIONS.map(option => ({ ...option })),\n },\n },\n og: {\n type: 'object',\n label: 'Open Graph',\n controller: { type: 'object' },\n properties: {\n title: {\n type: 'string',\n label: 'OG Title',\n controller: { type: 'text', placeholder: 'Title for social sharing' },\n },\n description: {\n type: 'string',\n label: 'OG Description',\n controller: { type: 'textarea', placeholder: 'Description for social sharing' },\n },\n image: {\n type: 'string',\n label: 'OG Image',\n controller: { type: 'media' },\n },\n },\n },\n twitter: {\n type: 'object',\n label: 'Twitter Card',\n controller: { type: 'object' },\n properties: {\n card: {\n type: 'string',\n label: 'Card Type',\n controller: {\n type: 'select',\n options: SEO_TWITTER_CARD_OPTIONS.map(option => ({ ...option })),\n },\n },\n title: {\n type: 'string',\n label: 'Twitter Title',\n controller: { type: 'text' },\n },\n description: {\n type: 'string',\n label: 'Twitter Description',\n controller: { type: 'textarea' },\n },\n image: {\n type: 'string',\n label: 'Twitter Image',\n controller: { type: 'media' },\n },\n },\n },\n structuredData: {\n type: 'object',\n label: 'Structured Data (JSON-LD)',\n // `code`, not `json`: the client registers `code` (CodeMirror) and has no `json`\n // controller, so a `json` declaration silently falls back to a plain text box.\n controller: { type: 'code', options: { language: 'json' } },\n },\n sitemap: {\n type: 'object',\n label: 'Sitemap Settings',\n controller: { type: 'object' },\n properties: {\n include: {\n type: 'boolean',\n label: 'Include in Sitemap',\n controller: { type: 'switch' },\n },\n priority: {\n type: 'number',\n label: 'Priority',\n controller: { type: 'range', options: { min: 0, max: 1, step: 0.1 } },\n },\n changeFreq: {\n type: 'string',\n label: 'Change Frequency',\n controller: {\n type: 'select',\n options: SEO_CHANGE_FREQ_OPTIONS.map(option => ({ ...option })),\n },\n },\n },\n },\n };\n}\n","/*\n * @vectoriox/iox-ui/seo-core — the shared, FRAMEWORK-FREE core of page SEO.\n *\n * ⚠️ Nothing in this entry point may import Angular, RxJS, the DOM, or Node. It is consumed by\n * THREE runtimes: the builder panel (Angular), the SSR engine (Angular), and `iox-cms` (NestJS,\n * plain Node) — the same reason `forms-core` exists.\n *\n * A page describes itself to a crawler exactly once: `seoToTags` is the only place that decides\n * which head tags a page emits, and `buildSeoSchemaProperties` the only place that declares what an\n * author can fill in. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\nexport * from './seo.model';\nexport * from './normalize';\nexport * from './tags';\nexport * from './schema';\n","import {\n SEO_AUTO_SOURCES,\n SEO_BINDABLE_FIELDS,\n SEO_DESCRIPTION_MAX,\n SeoAutoSource,\n SeoBinding,\n SeoDoc,\n SeoFieldValue,\n normalizeSeoDoc,\n seoString,\n} from '../../seo-core/public-api';\nimport { resolveBoundValue } from '../binding/resolve-bound-value';\n\n/**\n * Turn a page's STORED SEO document into the resolved one a crawler should see.\n *\n * Runs the ladder, per field: `override` → `binding` → auto. It lives in the main entry point rather\n * than `seo-core` because the binding rung needs `resolvePath` + `applyBindingPipes` from here, and\n * `iox-cms` (which imports `seo-core` under plain Node) never resolves anything — it only stores and\n * declares. `seoToTags` then turns this output into head tags.\n *\n * The reason this exists: `applyPageSeo(page.seo)` used to hand the stored strings straight to the\n * head, never consulting the resolved route item, so all 24 pages rendered from one template shipped\n * the same `<title>`. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\n/** What the ladder's lower two rungs need. All optional — a static page supplies almost none of it. */\nexport interface SeoResolveContext {\n /** The page's resolved data sources, keyed by alias (`$current` on a template page). */\n resolvedData?: Record<string, unknown> | null;\n /** The page's layout tree, for the \"derive from the content\" rung. */\n tree?: readonly unknown[] | null;\n /** Title of last resort, when the page has no heading at all. */\n pageName?: string;\n /** Absolute URL of the page being rendered — the automatic canonical. */\n pageUrl?: string;\n}\n\n/** A node binding, as the renderers store it: `prop` names the input the value lands on. */\ninterface NodeBinding extends SeoBinding {\n prop?: string;\n}\n\n/** `SeoBinding.pipes` is typed loosely in the framework-free core; narrow it once, here. */\nfunction boundSpec(binding: SeoBinding): { path?: string; pipes?: any[] } {\n return { path: binding.path, pipes: binding.pipes as any[] | undefined };\n}\n\n/** What the layout tree yields for the bottom rung. */\nexport interface SeoDerivedContent {\n title?: string;\n description?: string;\n image?: string;\n}\n\nexport function resolveSeo(seo: unknown, ctx: SeoResolveContext = {}): SeoDoc {\n // Rung 1 is exactly what the normalizer already produces: overrides, plus every non-bindable\n // field (robots, sitemap, structuredData) carried through untouched.\n const out = normalizeSeoDoc(seo) as Record<string, unknown>;\n const raw = (seo && typeof seo === 'object' && !Array.isArray(seo) ? seo : {}) as Record<string, unknown>;\n\n // Derivation walks the whole tree, so do it once and only if some field will actually ask.\n let derived: SeoDerivedContent | undefined;\n const content = (): SeoDerivedContent => (derived ??= deriveSeoFromContent(ctx.tree, ctx.resolvedData));\n\n for (const field of SEO_BINDABLE_FIELDS) {\n if (readField(out, field) !== undefined) continue; // an override won\n\n const stored = fieldValue(raw, field);\n\n // Rung 2 — the binding.\n if (stored?.binding) {\n const value = resolveSeoBinding(stored.binding, ctx.resolvedData);\n if (value !== undefined) {\n writeField(out, field, value);\n continue;\n }\n }\n\n // Rung 3 — derive it, unless this field opted out.\n if (stored?.auto === false) continue;\n const source = SEO_AUTO_SOURCES.find(entry => entry.field === field)?.source;\n const auto = source ? autoValue(source, content, ctx) : undefined;\n if (auto !== undefined) writeField(out, field, auto);\n }\n\n // One last pass so a resolved value gets the same trimming and empty-branch dropping as a stored\n // one — `if (seo.og)` must keep meaning something.\n return normalizeSeoDoc(out);\n}\n\n/** Resolve one SEO binding against the page's data. `undefined` when its source did not resolve. */\nfunction resolveSeoBinding(binding: SeoBinding, resolvedData: SeoResolveContext['resolvedData']): string | undefined {\n const sourceData = resolvedData?.[binding.source];\n if (sourceData == null) return undefined;\n return seoString(resolveBoundValue(sourceData, boundSpec(binding)));\n}\n\nfunction autoValue(source: SeoAutoSource, content: () => SeoDerivedContent, ctx: SeoResolveContext): string | undefined {\n switch (source) {\n case 'contentTitle':\n return content().title ?? seoString(ctx.pageName);\n case 'contentDescription':\n return content().description;\n case 'contentImage':\n return content().image;\n case 'pageUrl':\n return seoString(ctx.pageUrl);\n }\n}\n\n/**\n * Derive a title, description and image from the page's own content, in document order.\n *\n * ⚠️ Node bindings are resolved here too. On a template page the `<h1>` is normally bound to\n * `$current.title`, so reading `props.content` alone would return the design-time placeholder — the\n * same trap that made context slots fall through to component defaults. An unresolved binding yields\n * nothing rather than the placeholder.\n *\n * Node shapes are the renderers' own: `Heading` has `level` + `content`, `Text` has `content` (rich\n * HTML from the editor) + `tag`, `Image` has `src`.\n */\nexport function deriveSeoFromContent(\n tree: readonly unknown[] | null | undefined,\n resolvedData?: Record<string, unknown> | null,\n): SeoDerivedContent {\n const out: SeoDerivedContent = {};\n /** A heading that is not an h1 — used only if the page has no h1 at all. */\n let fallbackHeading: string | undefined;\n\n const visit = (nodes: readonly unknown[] | null | undefined): void => {\n for (const node of nodes ?? []) {\n const current = node as Record<string, any> | null;\n if (!current) continue;\n\n const props = resolveNodeProps(current, resolvedData);\n\n switch (current['type']) {\n case 'Heading': {\n const text = plainText(props['content']);\n if (text) {\n if (props['level'] === 'h1') out.title ??= text;\n else fallbackHeading ??= text;\n }\n break;\n }\n case 'Text': {\n // `span` is inline decoration, not a paragraph.\n if (props['tag'] !== 'span') out.description ??= truncate(plainText(props['content']), SEO_DESCRIPTION_MAX);\n break;\n }\n case 'Image': {\n out.image ??= seoString(props['src']);\n break;\n }\n }\n\n visit(current['children']);\n }\n };\n\n visit(tree);\n out.title ??= fallbackHeading;\n return out;\n}\n\n/** A node's props with its bindings applied — only what derivation reads, never the whole node. */\nfunction resolveNodeProps(node: Record<string, any>, resolvedData?: Record<string, unknown> | null): Record<string, any> {\n const props: Record<string, any> = { ...(node['props'] ?? {}) };\n for (const binding of (node['bindings'] ?? []) as NodeBinding[]) {\n if (!binding?.prop) continue;\n const sourceData = resolvedData?.[binding.source];\n // A bound prop whose source did not resolve must NOT fall through to the design-time default.\n props[binding.prop] = sourceData == null ? undefined : resolveBoundValue(sourceData, boundSpec(binding));\n }\n return props;\n}\n\n/**\n * Editor content is rich HTML. Strip it to prose: tags out, block boundaries become spaces so words\n * do not fuse, the handful of entities an editor emits decoded, whitespace collapsed.\n */\nfunction plainText(value: unknown): string | undefined {\n const raw = seoString(value);\n if (!raw) return undefined;\n const text = raw\n .replace(/<(br|\\/p|\\/div|\\/li|\\/h[1-6])\\s*\\/?>/gi, ' ')\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/gi, ' ')\n .replace(/&amp;/gi, '&')\n .replace(/&lt;/gi, '<')\n .replace(/&gt;/gi, '>')\n .replace(/&quot;/gi, '\"')\n .replace(/&#39;|&apos;/gi, \"'\")\n .replace(/\\s+/g, ' ')\n .trim();\n return text.length ? text : undefined;\n}\n\n/** Cut to `max` characters on a word boundary, with an ellipsis only when something was cut. */\nfunction truncate(value: string | undefined, max: number): string | undefined {\n if (!value || value.length <= max) return value;\n const cut = value.slice(0, max - 1);\n const lastSpace = cut.lastIndexOf(' ');\n return (lastSpace > max * 0.6 ? cut.slice(0, lastSpace) : cut).trimEnd() + '…';\n}\n\n// ── dotted-path access over the document, so the field table stays data and not a switch ───────────\n\nfunction fieldValue(raw: Record<string, unknown>, field: string): SeoFieldValue | undefined {\n const value = readField(raw, field);\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined;\n return value as SeoFieldValue;\n}\n\nfunction readField(doc: Record<string, unknown>, field: string): unknown {\n const [branch, leaf] = field.split('.');\n if (!leaf) return doc[branch];\n const nested = doc[branch];\n return nested && typeof nested === 'object' ? (nested as Record<string, unknown>)[leaf] : undefined;\n}\n\nfunction writeField(doc: Record<string, unknown>, field: string, value: string): void {\n const [branch, leaf] = field.split('.');\n if (!leaf) {\n doc[branch] = value;\n return;\n }\n const nested = (doc[branch] && typeof doc[branch] === 'object' ? doc[branch] : {}) as Record<string, unknown>;\n nested[leaf] = value;\n doc[branch] = nested;\n}\n","import {\n SEO_BINDABLE_FIELDS,\n SEO_DESCRIPTION_MAX,\n SEO_TITLE_MAX,\n SeoBinding,\n SeoFieldValue,\n buildSeoSchemaProperties,\n seoString,\n} from '../../seo-core/public-api';\nimport { SeoResolveContext, resolveSeo } from './resolve-seo';\n\n/**\n * The authoring-side view of the SEO ladder: which rung won for each field, and what to show.\n *\n * The panel must never re-derive this. The chip an author reads (\"AUTO\" / \"BOUND\" / \"MANUAL\") has to\n * mean exactly what the renderer will do, and the only way to guarantee that is to compute it from\n * the same `resolveSeo` the renderer uses. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\nexport type SeoFieldSource =\n /** The author typed it. */\n | 'manual'\n /** A binding supplies it — the value is only known at render time. */\n | 'bound'\n /** Derived from the page's own content or URL. */\n | 'auto'\n /** Nothing supplies it: automatic derivation is off, or there was nothing to derive. */\n | 'empty';\n\nexport interface SeoFieldState {\n /** Dotted path into the document, e.g. `title`, `og.image`. */\n field: string;\n /** What the author typed, when they did. Drives the input's value. */\n override: string;\n /** The binding, when one is set. */\n binding?: SeoBinding;\n /** The value as far as it can be known here — empty for a bound field. */\n resolved: string;\n /** Which rung won. */\n source: SeoFieldSource;\n /** Recommended length, where one applies — for the character counter. */\n maxLength?: number;\n /**\n * The input controller this field is authored with — `text`, `textarea`, `image`, … — taken\n * from the SHARED schema, which is the single place that declares it.\n *\n * A panel renders the declared control; it never hand-rolls one. An `image` field rendered as a\n * text box throws away a picker the schema already asked for, and a raw `<input>` shares no\n * sizing, disabled state, RTL or theme with the rest of the app. See iox-ai-guidance\n * `CLAUDE.md` → Non-Negotiable Standards.\n */\n control: string;\n /** Whatever the declared controller needs — select options, code language, range bounds. */\n options?: unknown;\n}\n\n/** field path → its declared controller, flattened out of the schema once. */\nfunction controllerMap(): Record<string, { type: string; options?: unknown }> {\n const out: Record<string, { type: string; options?: unknown }> = {};\n const walk = (properties: Record<string, any>, prefix: string) => {\n for (const [key, property] of Object.entries(properties ?? {})) {\n const path = prefix ? `${prefix}.${key}` : key;\n if (property?.properties) walk(property.properties, path);\n else if (property?.controller) {\n out[path] = { type: property.controller.type, options: property.controller.options };\n }\n }\n };\n walk(buildSeoSchemaProperties() as Record<string, any>, '');\n return out;\n}\n\nconst MAX_LENGTHS: Record<string, number> = {\n title: SEO_TITLE_MAX,\n description: SEO_DESCRIPTION_MAX,\n 'og.description': SEO_DESCRIPTION_MAX,\n 'twitter.description': SEO_DESCRIPTION_MAX,\n};\n\n/**\n * Describe every bindable field for the authoring panel.\n *\n * ⚠️ `resolved` is deliberately EMPTY for a bound field on the builder side. The canvas has no\n * page-level resolved data — each component fetches its own — so a bound value genuinely is not\n * knowable here. Showing the binding expression and saying so is honest; inventing a preview from\n * design-time props is how a placeholder ends up looking like real content.\n */\nexport function describeSeoFields(seo: unknown, ctx: SeoResolveContext = {}): SeoFieldState[] {\n const raw = asRecord(seo) ?? {};\n const resolvedDoc = resolveSeo(seo, ctx) as unknown as Record<string, unknown>;\n const controllers = controllerMap();\n\n return SEO_BINDABLE_FIELDS.map(field => {\n const stored = fieldValue(raw, field);\n const override = seoString(readField(raw, field)) ?? '';\n const binding = stored?.binding;\n const resolved = seoString(readField(resolvedDoc, field)) ?? '';\n\n let source: SeoFieldSource;\n if (override) source = 'manual';\n else if (binding) source = 'bound';\n else if (resolved) source = 'auto';\n else source = 'empty';\n\n return {\n field,\n override,\n binding,\n // A bound field's value comes from data this side cannot see.\n resolved: source === 'bound' ? '' : resolved,\n source,\n maxLength: MAX_LENGTHS[field],\n control: controllers[field]?.type ?? 'text',\n options: controllers[field]?.options,\n };\n });\n}\n\n/** Set a field's typed value. An empty string CLEARS the override so the lower rungs take over. */\nexport function setSeoOverride(seo: unknown, field: string, value: string): Record<string, unknown> {\n const next = clone(seo);\n const text = value?.trim() ?? '';\n const existing = fieldValue(next, field);\n\n if (!text) {\n // Nothing else on the field → drop it entirely, so the document stays free of `{}` husks.\n if (!existing?.binding && existing?.auto !== false) writeField(next, field, undefined);\n else writeField(next, field, stripUndefined({ binding: existing?.binding, auto: existing?.auto }));\n return next;\n }\n\n writeField(next, field, stripUndefined({ override: text, binding: existing?.binding, auto: existing?.auto }));\n return next;\n}\n\n/** Attach or replace a field's binding. `undefined` removes it. */\nexport function setSeoBinding(seo: unknown, field: string, binding: SeoBinding | undefined): Record<string, unknown> {\n const next = clone(seo);\n const existing = fieldValue(next, field);\n const value = stripUndefined({ override: existing?.override, binding, auto: existing?.auto });\n writeField(next, field, Object.keys(value).length ? value : undefined);\n return next;\n}\n\n/** Turn the automatic rung on or off for a field. Off leaves the field genuinely empty. */\nexport function setSeoAuto(seo: unknown, field: string, enabled: boolean): Record<string, unknown> {\n const next = clone(seo);\n const existing = fieldValue(next, field);\n const value = stripUndefined({\n override: existing?.override,\n binding: existing?.binding,\n auto: enabled ? undefined : (false as const),\n });\n writeField(next, field, Object.keys(value).length ? value : undefined);\n return next;\n}\n\n/**\n * Set a field that is NOT part of the ladder — `robots`, `twitter.card`, `structuredData`,\n * `sitemap.*`. These are pick-lists, switches and blobs: they have no override/binding/auto, so they\n * are stored as plain values, exactly as the normalizer reads them.\n *\n * `undefined`, `null` and `''` remove the field, so an unset pick-list leaves no husk behind.\n */\nexport function setSeoValue(seo: unknown, field: string, value: unknown): Record<string, unknown> {\n const next = clone(seo);\n const empty = value === undefined || value === null || (typeof value === 'string' && !value.trim());\n writeField(next, field, empty ? undefined : value);\n return next;\n}\n\n/** Read any field's plain stored value — the counterpart of `setSeoValue`. */\nexport function getSeoValue(seo: unknown, field: string): unknown {\n return readField(asRecord(seo) ?? {}, field);\n}\n\n/** Drop everything an author set on a field — back to the automatic rung. */\nexport function resetSeoField(seo: unknown, field: string): Record<string, unknown> {\n const next = clone(seo);\n writeField(next, field, undefined);\n return next;\n}\n\n// ── shared dotted-path plumbing ───────────────────────────────────────────────────────────────\n\nfunction clone(seo: unknown): Record<string, unknown> {\n return JSON.parse(JSON.stringify(asRecord(seo) ?? {}));\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nfunction stripUndefined<T extends object>(value: T): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) if (entry !== undefined) out[key] = entry;\n return out;\n}\n\nfunction fieldValue(doc: Record<string, unknown>, field: string): SeoFieldValue | undefined {\n const value = readField(doc, field);\n return asRecord(value) as SeoFieldValue | undefined;\n}\n\nfunction readField(doc: Record<string, unknown>, field: string): unknown {\n const [branch, leaf] = field.split('.');\n if (!leaf) return doc[branch];\n const nested = asRecord(doc[branch]);\n return nested ? nested[leaf] : undefined;\n}\n\nfunction writeField(doc: Record<string, unknown>, field: string, value: unknown): void {\n const [branch, leaf] = field.split('.');\n if (!leaf) {\n if (value === undefined) delete doc[branch];\n else doc[branch] = value;\n return;\n }\n const nested = (asRecord(doc[branch]) ?? {}) as Record<string, unknown>;\n if (value === undefined) delete nested[leaf];\n else nested[leaf] = value;\n if (Object.keys(nested).length) doc[branch] = nested;\n else delete doc[branch];\n}\n","/**\n * Element context state — shared types.\n *\n * A **context slot** is a data-source alias whose value is WRITTEN at runtime (by an interaction)\n * instead of fetched. That is the whole trick: bindings need no new grammar, because a slot is just\n * another key in the `resolvedData` map both renderers already resolve against.\n *\n * See architecture/builder/element-context-state-plan.md.\n */\n\n/** How a slot behaves before anyone has interacted with the page. */\nexport type ContextSlotDefault =\n /** Empty until an interaction fills it. The preview is hidden by CSS until then. */\n | 'none'\n /** Pre-filled with the first item of `source`, so the page is never empty. */\n | 'first';\n\n/** Declared on the PAGE — always page-level, never promoted to the org library. */\nexport interface IoxContextSlot {\n /**\n * The bindable alias, e.g. `currentItem`. Shares the page's data-source alias namespace, so it\n * must be unique among sources AND slots, and must not start with `$` (reserved for system\n * aliases).\n */\n key: string;\n /** The data-source alias whose items this slot holds. Types the slot for the bind picker. */\n source: string;\n /** Defaults to `'none'`. */\n default?: ContextSlotDefault;\n}\n\n/**\n * What a `setContext` action writes. Three shapes, one for each way an element can know a value.\n */\nexport type ContextValueSpec =\n /** `$item` — the row's own item, read from the enclosing loop scope. Configured once. */\n | { kind: 'item' }\n /** An explicit source + path, for a standalone element that is not inside a loop. */\n | { kind: 'source'; source: string; path?: string }\n /** A fixed value. */\n | { kind: 'literal'; value: unknown };\n\n/** The parameters of a `setContext` interaction action. */\nexport interface SetContextParams {\n /** Which slot to write. */\n slot: string;\n /** What to write into it. */\n value: ContextValueSpec;\n /**\n * When true this action does NOT auto-reverse on `mouseleave`.\n *\n * `hover` binds both ends and runs actions reversed on leave, which is what we want on a LIST\n * container (leave → clear) and exactly what we do NOT want on a row: a row clearing itself on\n * its own leave makes every row-to-row move flicker. Rows set this; container clears don't.\n */\n noReverse?: boolean;\n}\n\n/** Where a slot's value came from — stored as a reference, never a snapshot copy. */\nexport interface ContextItemRef {\n /** The source alias the item belongs to. */\n source: string;\n /** Position in the resolved array — the O(1) read path. */\n index: number;\n /** Optional stable id, used only to repair the index if the collection re-fetched or reordered. */\n id?: string;\n}\n","import { resolvePath } from '../binding/resolve-path';\nimport { ContextValueSpec, IoxContextSlot } from './context-slot.model';\n\n/**\n * Pure context resolution — no Angular, no transport. Shared by the builder canvas and the SSR\n * engine so a slot behaves identically in both. See element-context-state-plan.md.\n */\n\n/** What an interaction knows at the moment it fires. */\nexport interface ContextWriteScope {\n /** The enclosing loop's item, when the element sits inside a repeater/slider row. */\n item?: unknown;\n /** The page's resolved data, for `{ kind: 'source' }` specs. */\n resolvedData?: Record<string, unknown>;\n}\n\n/**\n * Turn a `setContext` value spec into the value to store.\n *\n * Returns `undefined` when the spec cannot be satisfied (e.g. `$item` on an element that is not in\n * a loop), which the store treats as \"don't write\" rather than \"write empty\".\n */\nexport function resolveContextValue(spec: ContextValueSpec | undefined, scope: ContextWriteScope = {}): unknown {\n if (!spec) return undefined;\n switch (spec.kind) {\n case 'item':\n return scope.item;\n case 'literal':\n return spec.value;\n case 'source': {\n const data = scope.resolvedData?.[spec.source];\n if (data == null) return undefined;\n return spec.path ? resolvePath(data, spec.path) : data;\n }\n default:\n return undefined;\n }\n}\n\n/**\n * The value each slot holds before any interaction.\n *\n * `'first'` pre-fills from the resolved source so the page is never empty; `'none'` (the default)\n * leaves the key ABSENT — not set to undefined — so `resolvedData` looks exactly as it does for a\n * source that returned nothing, and bindings simply don't resolve.\n */\nexport function initialSlotValues(\n slots: readonly IoxContextSlot[] | undefined,\n resolvedData: Record<string, unknown> = {},\n): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const slot of slots ?? []) {\n if (slot?.default !== 'first') continue;\n const items = resolvedData[slot.source];\n if (Array.isArray(items) && items.length) out[slot.key] = items[0];\n }\n return out;\n}\n\n/**\n * Merge live slot values over the page's resolved data, producing the map bindings resolve against.\n *\n * Slot keys share the data-source namespace, so a slot deliberately shadows a source of the same\n * name — the same way a repeater row shadows its own source alias with the single item.\n */\nexport function withContextSlots(\n resolvedData: Record<string, unknown> | undefined,\n slotValues: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n return { ...(resolvedData ?? {}), ...(slotValues ?? {}) };\n}\n\n/** The set of declared slot keys — what marks a binding as \"live\". */\nexport function contextSlotKeys(slots: readonly IoxContextSlot[] | undefined): Set<string> {\n return new Set((slots ?? []).map(s => s?.key).filter((k): k is string => !!k));\n}\n\n/**\n * Does this node read a context slot? Nodes that do must be REGISTERED at render time and\n * re-applied when the store changes — they are the only ones whose props are not final after the\n * first render.\n */\nexport function nodeUsesContext(node: unknown, slotKeys: ReadonlySet<string>): boolean {\n if (!slotKeys.size) return false;\n const bindings = (node as { bindings?: { source?: string }[] } | null)?.bindings;\n if (!Array.isArray(bindings)) return false;\n return bindings.some(b => !!b?.source && slotKeys.has(b.source));\n}\n\n/**\n * Is a slot key a legal user alias?\n *\n * Slots live in the page's data-source alias namespace, so uniqueness is the existing rule. The one\n * extra constraint is the reserved `$` prefix (system aliases — `$route`, `$current`, …).\n */\nexport function isValidSlotKey(key: string | undefined | null): boolean {\n if (!key) return false;\n const trimmed = key.trim();\n if (!trimmed || trimmed.startsWith('$')) return false;\n return /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed);\n}\n","import { Injectable, computed, signal } from '@angular/core';\n\n/**\n * The runtime context channel: named slots an interaction writes and bindings read.\n *\n * Signal-backed because writes are HOT — a hover fires on every row crossing. A write must cost a\n * signal set and re-apply one input on the registered nodes; it must never re-clone a repeater or\n * re-render the loop. See element-context-state-plan.md (trap T2).\n *\n * Provided in root and reset by the consumer on page navigation — slots are page-level state.\n */\n@Injectable({ providedIn: 'root' })\nexport class ContextStore {\n private readonly _values = signal<Readonly<Record<string, unknown>>>({});\n\n /** All live slot values. Merge over `resolvedData` with `withContextSlots` to resolve bindings. */\n readonly values = this._values.asReadonly();\n\n /** The keys currently holding a value — what the \"is this slot populated?\" CSS state keys off. */\n readonly populatedKeys = computed(() => new Set(Object.keys(this._values())));\n\n /**\n * Write a slot. An `undefined` value is IGNORED rather than stored: a spec that could not be\n * satisfied (e.g. `$item` outside a loop) must not silently blank a populated slot.\n */\n set(key: string, value: unknown): void {\n if (!key || value === undefined) return;\n const current = this._values();\n if (Object.is(current[key], value)) return; // no-op writes must not wake subscribers\n this._values.set({ ...current, [key]: value });\n }\n\n /** Remove a slot's value entirely, so the key is ABSENT (not undefined) for binding resolution. */\n clear(key: string): void {\n if (!key) return;\n const current = this._values();\n if (!(key in current)) return;\n const next = { ...current };\n delete next[key];\n this._values.set(next);\n }\n\n /** Drop every slot — call on page navigation; context is page-level state. */\n resetAll(): void {\n if (!Object.keys(this._values()).length) return;\n this._values.set({});\n }\n\n /** Seed the initial values (from `initialSlotValues`) without clobbering later writes. */\n seed(values: Record<string, unknown>): void {\n const incoming = Object.entries(values ?? {}).filter(([, v]) => v !== undefined);\n if (!incoming.length) return;\n this._values.set({ ...Object.fromEntries(incoming), ...this._values() });\n }\n\n /** Non-reactive read — for imperative code that must not create a dependency. */\n peek(key: string): unknown {\n return this._values()[key];\n }\n\n /** Whether a slot currently holds a value. */\n has(key: string): boolean {\n return key in this._values();\n }\n}\n","import { ContextValueSpec, SetContextParams } from './context-slot.model';\n\n/**\n * What a context action DOES on a given interaction pass — the single definition of the semantics,\n * shared by the builder's InteractionEngineService and the engine's ClientInteractionService so the\n * two runtimes cannot drift.\n *\n * ## Why a \"pass\"\n *\n * A `hover` interaction binds BOTH ends: `mouseenter` runs the actions forward, `mouseleave` replays\n * them on a reverse pass. For an animation, reverse means \"play the keyframes backwards\". A context\n * write has no backwards, so its reverse behaviour has to be stated explicitly — that is this table:\n *\n * | action | forward | reverse (mouseleave) |\n * |----------------|---------|---------------------------|\n * | `setContext` | set | clear, UNLESS `noReverse` |\n * | `clearContext` | clear | nothing |\n *\n * `noReverse` is what a repeater ROW sets. Without it, leaving a row clears the slot, so every\n * row-to-row move blinks and the gaps between rows blank the preview. Clearing belongs to the LIST\n * container, not the row. See element-context-state-plan.md §5.\n *\n * NOTE: this is unrelated to `INVERSE_ACTION`, which only auto-populates the reverse actions of a\n * CLICK-toggle (click sets, click again clears).\n */\nexport type ContextActionEffect =\n | { op: 'set'; slot: string; value: ContextValueSpec }\n | { op: 'clear'; slot: string };\n\n/** The action shape this reads — structural, so both runtimes can pass their own action objects. */\nexport interface ContextActionLike {\n type?: string;\n params?: Partial<SetContextParams> | Record<string, unknown> | null;\n}\n\n/** Action types this module handles. Anything else is not a context action. */\nexport const CONTEXT_ACTION_TYPES = ['setContext', 'clearContext'] as const;\n\nexport function isContextAction(action: ContextActionLike | null | undefined): boolean {\n return !!action?.type && (CONTEXT_ACTION_TYPES as readonly string[]).includes(action.type);\n}\n\n/**\n * Resolve an action + pass into the store operation to perform, or `null` for \"do nothing\".\n *\n * Returning `null` (rather than throwing or guessing) is what lets a runtime call this for every\n * action on every pass and simply skip the misses.\n */\nexport function contextActionEffect(\n action: ContextActionLike | null | undefined,\n pass: 'forward' | 'reverse' = 'forward',\n): ContextActionEffect | null {\n if (!isContextAction(action)) return null;\n\n const params = (action!.params ?? {}) as Partial<SetContextParams>;\n const slot = typeof params.slot === 'string' ? params.slot.trim() : '';\n if (!slot) return null;\n\n if (action!.type === 'clearContext') {\n // A clear has no meaningful reverse — leaving the element must not re-populate the slot.\n return pass === 'forward' ? { op: 'clear', slot } : null;\n }\n\n // setContext\n if (pass === 'forward') {\n return params.value ? { op: 'set', slot, value: params.value } : null;\n }\n return params.noReverse ? null : { op: 'clear', slot };\n}\n","import { contextActionEffect } from './context-actions';\nimport { IoxContextSlot } from './context-slot.model';\n\n/**\n * Which slot keys are actually IN USE on a page — derived from the layout tree itself.\n *\n * A slot only matters at runtime if something writes it (a `setContext`/`clearContext` action) or\n * reads it (a binding whose `source` names it). Deriving the set from the tree means the runtime\n * works without waiting on the page model: a DECLARED `IoxContextSlot` adds typing for the bind\n * picker and a `default`, but is not required for the channel to function.\n *\n * Union of declared + in-use, so a declared-but-unused slot still seeds its default, and a slot used\n * by a symbol dropped onto a page that never declared it still works (it just has no default).\n */\nexport function collectContextSlotKeys(\n nodes: readonly unknown[] | undefined,\n /** Declared VARIABLES — page resources of `type: 'variable'`, or legacy slot declarations. */\n declared: readonly (IoxContextSlot | { alias?: string; type?: string })[] = [],\n): Set<string> {\n const written = new Set<string>();\n const read = new Set<string>();\n walk(nodes, written, read);\n // A binding only names a SLOT if something writes that key; otherwise it names a data source.\n const keys = new Set(written);\n for (const key of read) if (written.has(key)) keys.add(key);\n for (const decl of declared) {\n // A declared variable (a data source of type 'variable') or a legacy IoxContextSlot.\n const key = (decl as IoxContextSlot)?.key\n ?? ((decl as { type?: string })?.type === 'variable' ? (decl as { alias?: string }).alias : undefined);\n if (key) keys.add(key);\n }\n return keys;\n}\n\nfunction walk(nodes: readonly unknown[] | undefined, written: Set<string>, read: Set<string>): void {\n for (const raw of nodes ?? []) {\n const node = raw as {\n interactions?: { actions?: unknown[]; reverseActions?: unknown[] }[];\n bindings?: { source?: string }[];\n children?: unknown[];\n } | null;\n if (!node) continue;\n\n for (const ix of node.interactions ?? []) {\n for (const action of [...(ix?.actions ?? []), ...(ix?.reverseActions ?? [])]) {\n const effect = contextActionEffect(action as never, 'forward')\n ?? contextActionEffect(action as never, 'reverse');\n if (effect) written.add(effect.slot);\n }\n }\n for (const binding of node.bindings ?? []) {\n if (binding?.source) read.add(binding.source);\n }\n if (Array.isArray(node.children)) walk(node.children, written, read);\n }\n}\n","/**\n * Whether an interaction action is switched ON.\n *\n * An author can disable a single action inside an interaction (the switch on its accordion row)\n * without deleting it — useful while tuning a multi-action sequence. Disabling must hold in BOTH\n * runtimes, so the rule lives here and the builder engine and the SSR engine both read it: a\n * disabled action must not animate, must not write context, and must not receive a PRE-STATE\n * (otherwise it would leave the element hidden with nothing left to reveal it).\n */\nexport interface ToggleableAction {\n disabled?: boolean;\n}\n\n/** Default is ENABLED — `disabled` is absent on every action authored before the switch existed. */\nexport function isActionEnabled(action: ToggleableAction | null | undefined): boolean {\n return !!action && action.disabled !== true;\n}\n\n/** The actions that should actually run, preserving order. */\nexport function activeActions<T extends ToggleableAction>(actions: readonly T[] | undefined): T[] {\n return (actions ?? []).filter(isActionEnabled);\n}\n","/**\n * Cinematic page-transition presets — the SINGLE SOURCE OF TRUTH shared by the page builder\n * (preview) and the SSR client engine (production). Pure, transport-agnostic: this module only\n * describes WAAPI keyframe pairs + timing/ordering. It never touches the DOM.\n *\n * A page transition plays TWO synchronized WAAPI animations at once — an `out` animation on a\n * snapshot of the outgoing page and an `in` animation on the incoming page — inside a shared\n * `perspective` container, gated on BOTH finishing (the \"cinematic\" feel, à la Codrops\n * PageTransitions). The consumer supplies the DOM (snapshot layer + live page) and calls\n * `element.animate(frames, options)`; it does NOT redefine the frames.\n *\n * @see architecture/builder/page-transitions.md\n */\nimport { BetweenId, resolveDesignMotion, SPEC_AXES } from '@vectoriox/iox-ui/design-core';\n\nimport { Breakpoint, breakpointDef } from '../style-compiler/responsive';\n\n/** Perspective (px) applied to the transition container unless a preset overrides it. */\nexport const DEFAULT_PAGE_TRANSITION_PERSPECTIVE = 1200;\n\n/**\n * Default transition duration (ms). Deliberately long — a slow, settled transition is most of what\n * makes a page change read as \"premium\"; the same motion at ~400ms feels like a snap.\n */\nexport const DEFAULT_PAGE_TRANSITION_DURATION = 1500;\n\n/**\n * Default easing: a strong symmetric in-out. Paired with the long duration this is the \"smoothness\"\n * — slow to leave, quick through the middle, gentle to settle.\n */\nexport const DEFAULT_PAGE_TRANSITION_EASING = 'cubic-bezier(0.76, 0, 0.24, 1)';\n\n/** Default preset used when a page has no transition configured at all. */\nexport const DEFAULT_PAGE_TRANSITION = 'parallax-up';\n\nexport type PageTransitionCategory = 'parallax' | 'reveal' | 'curtain' | 'move' | 'fade' | 'scale' | 'rotate';\n\nexport interface PageTransitionPreset {\n category: PageTransitionCategory;\n label: string;\n /** Keyframes for the OUTGOING page (played on a fixed snapshot). */\n outKeyframes: Keyframe[];\n /** Keyframes for the INCOMING page. */\n inKeyframes: Keyframe[];\n /** Which layer is stacked on top during the transition. Default: 'in'. */\n ontop?: 'in' | 'out';\n /** `transform-origin` for the outgoing layer (3D hinge effects). */\n outTransformOrigin?: string;\n /** `transform-origin` for the incoming layer. */\n inTransformOrigin?: string;\n /** Override the container perspective (px) for this preset. */\n perspective?: number;\n /** Delay before the OUT animation starts, as a fraction (0..1) of the duration. */\n outDelayRatio?: number;\n /** Delay before the IN animation starts, as a fraction (0..1) of the duration. */\n inDelayRatio?: number;\n /**\n * Optional full-screen overlay panel (curtain / wipe). When present the transition plays as\n * COVER → swap → UNCOVER instead of the two page layers animating against each other: the panel\n * sweeps in to hide the screen, the outgoing page is dropped behind it, then the panel sweeps\n * out to reveal the incoming page. Each half gets HALF the total duration.\n *\n * Trade-off: the swap is hidden, so you lose the \"both pages visible at once\" depth of the\n * parallax family — this is drama rather than spatial continuity.\n */\n overlay?: {\n coverKeyframes: Keyframe[];\n uncoverKeyframes: Keyframe[];\n };\n}\n\n// ── Keyframe helpers ────────────────────────────────────────────────────────\nconst FADE_OUT: Keyframe[] = [{ opacity: 1 }, { opacity: 0 }];\nconst FADE_IN: Keyframe[] = [{ opacity: 0 }, { opacity: 1 }];\n\nconst move = (from: string, to: string): Keyframe[] => [{ transform: from }, { transform: to }];\n\n/** Gentle recede for the outgoing page under a mask/reveal — it stays put but drops back a little,\n * so the page underneath never looks like a frozen screenshot. */\nconst RECEDE_SOFT: Keyframe[] = [\n { transform: 'scale(1)', opacity: 1 },\n { transform: 'scale(0.94)', opacity: 0.6 },\n];\n\n/** Barely-there settle for the incoming page under a curtain — the panel hides most of it, so this\n * only takes the edge off the reveal. Ends at identity (required: IN frames must not persist). */\nconst SETTLE_IN: Keyframe[] = [{ transform: 'scale(1.04)' }, { transform: 'scale(1)' }];\n\n// ── The preset catalog ──────────────────────────────────────────────────────\n// Keyed by a stable preset id persisted in pageSettings.routeAnimation.transition.\nexport const PAGE_TRANSITION_PRESETS: Record<string, PageTransitionPreset> = {\n // ── Parallax (the default family) ──────────────────────────────────────────\n // The outgoing page travels only HALF the distance while shrinking and dimming, so it recedes\n // *behind* the incoming page rather than sliding away. That travel difference (50% vs 100%) is\n // what reads as depth — there is no 3D here at all. Pair with the long default duration.\n 'parallax-up': {\n category: 'parallax', label: 'Parallax up (recommended)',\n outKeyframes: [\n { transform: 'translateY(0) scale(1)', opacity: 1 },\n { transform: 'translateY(-50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateY(100%)', 'translateY(0)'),\n ontop: 'in',\n },\n 'parallax-down': {\n category: 'parallax', label: 'Parallax down',\n outKeyframes: [\n { transform: 'translateY(0) scale(1)', opacity: 1 },\n { transform: 'translateY(50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateY(-100%)', 'translateY(0)'),\n ontop: 'in',\n },\n 'parallax-left': {\n category: 'parallax', label: 'Parallax left',\n outKeyframes: [\n { transform: 'translateX(0) scale(1)', opacity: 1 },\n { transform: 'translateX(-50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n ontop: 'in',\n },\n 'parallax-right': {\n category: 'parallax', label: 'Parallax right',\n outKeyframes: [\n { transform: 'translateX(0) scale(1)', opacity: 1 },\n { transform: 'translateX(50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateX(-100%)', 'translateX(0)'),\n ontop: 'in',\n },\n\n // ── Reveal (clip-path) ─────────────────────────────────────────────────────\n // The incoming page is UNMASKED over the outgoing one, which recedes gently behind. No overlay\n // panel is involved — the mask is animated directly on the incoming layer, so this needs no\n // extra DOM. (WAAPI interpolates clip-path only between the SAME shape function with the same\n // number of points — keep each pair consistent.)\n 'circle-reveal': {\n category: 'reveal', label: 'Circle reveal (iris)',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [\n { clipPath: 'circle(0% at 50% 50%)' },\n { clipPath: 'circle(75% at 50% 50%)' },\n ],\n ontop: 'in',\n },\n 'wipe-right': {\n category: 'reveal', label: 'Wipe → right',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-left': {\n category: 'reveal', label: 'Wipe ← left',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 0 0 100%)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-down': {\n category: 'reveal', label: 'Wipe ↓ down',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-up': {\n category: 'reveal', label: 'Wipe ↑ up',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(100% 0 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'diagonal-wipe': {\n category: 'reveal', label: 'Diagonal wipe',\n outKeyframes: RECEDE_SOFT,\n // 4-point polygons on both ends so WAAPI can interpolate them.\n inKeyframes: [\n { clipPath: 'polygon(0% 0%, 0% 0%, -40% 100%, -40% 100%)' },\n { clipPath: 'polygon(0% 0%, 140% 0%, 100% 100%, -40% 100%)' },\n ],\n ontop: 'in',\n },\n 'inset-reveal': {\n category: 'reveal', label: 'Box reveal (from centre)',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(50% 50% 50% 50%)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n\n // ── Curtain (overlay panel sweeps across, hiding the swap) ────────────────\n // A solid panel covers the screen, the outgoing page is dropped behind it, then the panel\n // sweeps away revealing the incoming page. Colour comes from routeAnimation.curtainColor, or\n // the incoming page's own background.\n 'curtain-up': {\n category: 'curtain', label: 'Curtain up',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateY(100%)', 'translateY(0)'),\n uncoverKeyframes: move('translateY(0)', 'translateY(-100%)'),\n },\n },\n 'curtain-down': {\n category: 'curtain', label: 'Curtain down',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateY(-100%)', 'translateY(0)'),\n uncoverKeyframes: move('translateY(0)', 'translateY(100%)'),\n },\n },\n 'curtain-left': {\n category: 'curtain', label: 'Curtain left',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateX(100%)', 'translateX(0)'),\n uncoverKeyframes: move('translateX(0)', 'translateX(-100%)'),\n },\n },\n 'curtain-right': {\n category: 'curtain', label: 'Curtain right',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateX(-100%)', 'translateX(0)'),\n uncoverKeyframes: move('translateX(0)', 'translateX(100%)'),\n },\n },\n\n // ── Move / Push (both pages travel the full distance, side by side — no overlap) ─────\n 'move-left': {\n category: 'move', label: 'Push left',\n outKeyframes: move('translateX(0)', 'translateX(-100%)'),\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n },\n 'move-right': {\n category: 'move', label: 'Push right',\n outKeyframes: move('translateX(0)', 'translateX(100%)'),\n inKeyframes: move('translateX(-100%)', 'translateX(0)'),\n },\n 'move-up': {\n category: 'move', label: 'Push up',\n outKeyframes: move('translateY(0)', 'translateY(-100%)'),\n inKeyframes: move('translateY(100%)', 'translateY(0)'),\n },\n 'move-down': {\n category: 'move', label: 'Push down',\n outKeyframes: move('translateY(0)', 'translateY(100%)'),\n inKeyframes: move('translateY(-100%)', 'translateY(0)'),\n },\n\n // ── Fade (incoming sits on top; outgoing dissolves or holds) ───────────────\n 'fade': {\n category: 'fade', label: 'Fade',\n outKeyframes: FADE_OUT, inKeyframes: FADE_IN, ontop: 'in',\n },\n 'fade-from-right': {\n category: 'fade', label: 'Fade / from right',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateX(100%)', opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }],\n ontop: 'in',\n },\n 'fade-from-left': {\n category: 'fade', label: 'Fade / from left',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateX(-100%)', opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }],\n ontop: 'in',\n },\n 'fade-from-bottom': {\n category: 'fade', label: 'Fade / from bottom',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateY(100%)', opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }],\n ontop: 'in',\n },\n\n // ── Scale ──────────────────────────────────────────────────────────────────\n 'scale-down-up': {\n category: 'scale', label: 'Scale down / scale up',\n outKeyframes: [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }],\n inKeyframes: [{ transform: 'scale(1.2)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'scale-down': {\n category: 'scale', label: 'Scale down / from right',\n outKeyframes: [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }],\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n ontop: 'in',\n },\n 'scale-up': {\n category: 'scale', label: 'Move to left / scale up',\n outKeyframes: move('translateX(0)', 'translateX(-100%)'),\n inKeyframes: [{ transform: 'scale(0.8)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }],\n ontop: 'out',\n },\n\n // ── Rotate / 3D (the cinematic \"wow\" family) ───────────────────────────────\n 'flip': {\n category: 'rotate', label: 'Flip',\n outKeyframes: [{ transform: 'rotateY(0deg)', opacity: 1 }, { transform: 'rotateY(-180deg)', opacity: 0 }],\n inKeyframes: [{ transform: 'rotateY(180deg)', opacity: 0 }, { transform: 'rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'cube-left': {\n category: 'rotate', label: 'Cube / to left',\n outKeyframes: [{ transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateZ(-800px) rotateY(-90deg)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateZ(-800px) rotateY(90deg)', opacity: 0.3 }, { transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'cube-right': {\n category: 'rotate', label: 'Cube / to right',\n outKeyframes: [{ transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateZ(-800px) rotateY(90deg)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateZ(-800px) rotateY(-90deg)', opacity: 0.3 }, { transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'carousel-left': {\n category: 'rotate', label: 'Carousel / to left',\n outKeyframes: [{ transform: 'translateX(0) scale(1)', opacity: 1 }, { transform: 'translateX(-150%) scale(0.4)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateX(200%) scale(0.4)', opacity: 0.3 }, { transform: 'translateX(0) scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'carousel-right': {\n category: 'rotate', label: 'Carousel / to right',\n outKeyframes: [{ transform: 'translateX(0) scale(1)', opacity: 1 }, { transform: 'translateX(150%) scale(0.4)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateX(-200%) scale(0.4)', opacity: 0.3 }, { transform: 'translateX(0) scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'fall': {\n category: 'rotate', label: 'Fall',\n outKeyframes: [{ transform: 'translateZ(0) rotateX(0deg)', opacity: 1 }, { transform: 'translateZ(-500px) rotateX(90deg)', opacity: 0 }],\n inKeyframes: FADE_IN,\n outTransformOrigin: '50% 50%', ontop: 'out', inDelayRatio: 0.3,\n },\n 'newspaper': {\n category: 'rotate', label: 'Newspaper',\n outKeyframes: [{ transform: 'scale(1) rotate(0deg)', opacity: 1 }, { transform: 'scale(0) rotate(720deg)', opacity: 0 }],\n inKeyframes: [{ transform: 'scale(0) rotate(-720deg)', opacity: 0 }, { transform: 'scale(1) rotate(0deg)', opacity: 1 }],\n ontop: 'in', inDelayRatio: 0.5,\n },\n 'fold-left': {\n category: 'rotate', label: 'Fold / unfold',\n outKeyframes: [{ transform: 'translateX(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateX(-100%) rotateY(-90deg)', opacity: 0.6 }],\n inKeyframes: [{ transform: 'translateX(100%) rotateY(90deg)', opacity: 0.6 }, { transform: 'translateX(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '0% 50%', inTransformOrigin: '100% 50%', ontop: 'in',\n },\n 'room-left': {\n category: 'rotate', label: 'Room / to left',\n outKeyframes: [{ transform: 'translateX(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateX(-100%) rotateY(90deg)', opacity: 0.4 }],\n inKeyframes: [{ transform: 'translateX(100%) rotateY(-90deg)', opacity: 0.4 }, { transform: 'translateX(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '100% 50%', inTransformOrigin: '0% 50%',\n },\n};\n\n// ── \"Feel\" — duration + easing as a named vibe ───────────────────────────────\n// Most authors want to pick a *feeling*, not a bezier. A feel sets duration + easing together;\n// editing either by hand simply falls back to 'custom' (see feelFor).\nexport interface TransitionFeel {\n value: string;\n label: string;\n duration: number;\n easing: string;\n description: string;\n}\n\nexport const TRANSITION_FEELS: TransitionFeel[] = [\n { value: 'calm', label: 'Calm', duration: 1800, easing: 'cubic-bezier(0.33, 1, 0.68, 1)', description: 'Slow and unhurried — editorial, luxury' },\n { value: 'cinematic', label: 'Cinematic', duration: 1500, easing: DEFAULT_PAGE_TRANSITION_EASING, description: 'Long settle with a strong middle — the default' },\n { value: 'smooth', label: 'Smooth', duration: 1200, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', description: 'Quick out of the gate, glides to a stop' },\n { value: 'snappy', label: 'Snappy', duration: 600, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', description: 'Fast and responsive — app-like' },\n { value: 'crazy', label: 'Crazy', duration: 900, easing: 'cubic-bezier(0.68, -0.6, 0.32, 1.6)', description: 'Overshoots and springs back' },\n];\n\n/** The feel matching this duration+easing exactly, else 'custom'. Drives the panel's selector. */\nexport function feelFor(duration: number | string | undefined, easing: string | undefined): string {\n const d = toFiniteNumber(duration, DEFAULT_PAGE_TRANSITION_DURATION);\n const e = easing || DEFAULT_PAGE_TRANSITION_EASING;\n return TRANSITION_FEELS.find(f => f.duration === d && f.easing === e)?.value ?? 'custom';\n}\n\n/** The duration+easing patch for a feel id (undefined for 'custom' / unknown). */\nexport function applyFeel(feel: string): { duration: number; easing: string } | undefined {\n const f = TRANSITION_FEELS.find(x => x.value === feel);\n return f ? { duration: f.duration, easing: f.easing } : undefined;\n}\n\n// ── Two-select UI metadata (category ▾ → transition ▾) ───────────────────────\nexport interface PageTransitionCategoryMeta {\n value: PageTransitionCategory;\n label: string;\n presets: { value: string; label: string }[];\n}\n\n/** Built from PAGE_TRANSITION_PRESETS so the two lists can never drift apart. */\nexport const PAGE_TRANSITION_CATEGORIES: PageTransitionCategoryMeta[] = (() => {\n const order: { value: PageTransitionCategory; label: string }[] = [\n { value: 'parallax', label: 'Smooth (parallax)' },\n { value: 'reveal', label: 'Reveal (mask)' },\n { value: 'curtain', label: 'Curtain (overlay)' },\n { value: 'move', label: 'Push / slide' },\n { value: 'fade', label: 'Fade' },\n { value: 'scale', label: 'Scale' },\n { value: 'rotate', label: 'Rotate / 3D' },\n ];\n return order.map(cat => ({\n ...cat,\n presets: Object.entries(PAGE_TRANSITION_PRESETS)\n .filter(([, p]) => p.category === cat.value)\n .map(([value, p]) => ({ value, label: p.label })),\n }));\n})();\n\n// ── Resolver: preset → concrete WAAPI frames + options ───────────────────────\nexport interface PageTransitionOptions {\n /** Total transition duration (ms). Accepts a numeric string — builder inputs persist strings. */\n duration?: number | string;\n easing?: string;\n /** Container perspective (px); a preset-specific perspective still wins. */\n perspective?: number | string;\n}\n\n/** Coerce a possibly-string / invalid numeric setting to a usable finite, non-negative number. */\nfunction toFiniteNumber(value: unknown, fallback: number): number {\n const n = typeof value === 'number' ? value : Number(value);\n return Number.isFinite(n) && n >= 0 ? n : fallback;\n}\n\nexport interface ResolvedPageTransition {\n outFrames: Keyframe[];\n inFrames: Keyframe[];\n outOptions: KeyframeAnimationOptions;\n inOptions: KeyframeAnimationOptions;\n ontop: 'in' | 'out';\n perspective: number;\n outTransformOrigin?: string;\n inTransformOrigin?: string;\n /** Present only for curtain presets — each half runs for HALF the total duration. */\n overlay?: {\n coverFrames: Keyframe[];\n uncoverFrames: Keyframe[];\n coverOptions: KeyframeAnimationOptions;\n uncoverOptions: KeyframeAnimationOptions;\n };\n}\n\n/**\n * Resolve a persisted preset id + timing into the two WAAPI animations the consumer runs.\n * Returns `null` for unknown / 'none' presets (caller should skip the transition).\n */\nexport function resolvePageTransition(\n name: string | null | undefined,\n opts: PageTransitionOptions = {},\n): ResolvedPageTransition | null {\n if (!name || name === 'none') return null;\n const preset = PAGE_TRANSITION_PRESETS[name];\n if (!preset) return null;\n\n // Builder numeric inputs persist as STRINGS (e.g. duration:\"413\"), and WAAPI throws on a\n // non-numeric `duration` — which silently kills the whole transition. Coerce defensively here,\n // the single point where these values become animation options, so every consumer is protected\n // and already-saved string data keeps working.\n const duration = toFiniteNumber(opts.duration, DEFAULT_PAGE_TRANSITION_DURATION);\n const easing = opts.easing || DEFAULT_PAGE_TRANSITION_EASING;\n const perspective = toFiniteNumber(\n preset.perspective ?? opts.perspective, DEFAULT_PAGE_TRANSITION_PERSPECTIVE,\n );\n\n const clampRatio = (r?: number) => Math.max(0, Math.min(1, r ?? 0));\n const outDelay = clampRatio(preset.outDelayRatio) * duration;\n const inDelay = clampRatio(preset.inDelayRatio) * duration;\n\n return {\n outFrames: preset.outKeyframes,\n inFrames: preset.inKeyframes,\n // OUT plays on a throwaway snapshot → 'both' (hold keyframe[0] during delay, keyframe[last] after).\n outOptions: { duration, easing, delay: outDelay, fill: 'both' },\n // IN plays on the LIVE page host, so it must NOT persist its end state: a lingering `transform`\n // makes that host a containing block for absolutely-positioned descendants, collapsing a\n // `position:absolute; inset:0` page shell (iox-page-component) to 0 height. Every `in` preset\n // ends at identity (translate 0 / scale 1 / opacity 1), so 'backwards' — which only holds\n // keyframe[0] during the delay — is visually identical and leaves no residue.\n inOptions: { duration, easing, delay: inDelay, fill: 'backwards' },\n ontop: preset.ontop ?? 'in',\n perspective,\n outTransformOrigin: preset.outTransformOrigin,\n inTransformOrigin: preset.inTransformOrigin,\n overlay: preset.overlay && {\n coverFrames: preset.overlay.coverKeyframes,\n uncoverFrames: preset.overlay.uncoverKeyframes,\n // Cover and uncover split the total duration; 'both' holds the panel in place between\n // the two halves so the swap is never visible through a gap.\n coverOptions: { duration: duration / 2, easing, fill: 'both' },\n uncoverOptions: { duration: duration / 2, easing, fill: 'both' },\n },\n };\n}\n\n// ── Orchestration timeline (pure ordering / gating decision) ─────────────────\nexport type TransitionPhase = 'leave' | 'transition' | 'enter';\n\nexport interface TransitionTimelineInput {\n /** At least one element on the outgoing page has a `pageLeave` interaction. */\n hasLeave: boolean;\n /** A page transition preset is configured (and not 'none'). */\n hasTransition: boolean;\n /** At least one element on the incoming page has a `pageEnter` interaction. */\n hasEnter: boolean;\n}\n\n/**\n * The ordered phases a navigation runs, given what is present. The order is INVARIANT:\n * every element `leave` animation finishes before the page `transition` starts, and the page\n * `transition` finishes before any element `enter` animation begins. Phases with nothing to\n * play are omitted. The engine iterates this list and `await`s each phase's completion.\n */\nexport function buildTransitionTimeline(input: TransitionTimelineInput): TransitionPhase[] {\n const phases: TransitionPhase[] = [];\n if (input.hasLeave) phases.push('leave');\n if (input.hasTransition) phases.push('transition');\n if (input.hasEnter) phases.push('enter');\n return phases;\n}\n\n// ── Back-compat migration from the legacy single-page route-animation presets ─\n/**\n * Map a legacy `enter` preset (none/fade/slideUp/slideDown/zoomIn/zoomOut/blurIn/flip) to the\n * nearest cinematic paired `transition` id, so pages saved before this system keep animating.\n * Returns 'fade' for anything unmapped, and 'none' for 'none'.\n */\nexport function legacyEnterToTransition(enter: string | null | undefined): string {\n switch (enter) {\n case 'none': return 'none';\n case 'slideUp': return 'fade-from-bottom';\n case 'slideDown': return 'fade';\n case 'zoomIn': return 'scale-down-up';\n case 'zoomOut': return 'scale-down-up';\n case 'blurIn': return 'fade';\n case 'flip': return 'flip';\n case 'fade': return 'fade';\n // Never configured (or an unrecognised value) → the default parallax transition.\n default: return DEFAULT_PAGE_TRANSITION;\n }\n}\n\n/**\n * Resolve the effective transition id for a page's route-animation settings: the explicit\n * `transition` when present, otherwise migrated from the legacy `enter` preset.\n */\nexport function effectiveTransitionId(anim: { transition?: string | null; enter?: string | null } | null | undefined): string {\n if (!anim) return DEFAULT_PAGE_TRANSITION;\n if (anim.transition) return anim.transition;\n return legacyEnterToTransition(anim.enter);\n}\n\n// ── Between pages: the look's choice → the transition a page plays (AI plan rev 3.1 §3p) ───────────────\n/** The settings a page's own `routeAnimation` carries (Page ▸ Design ▸ Route animation). */\nexport interface RouteAnimationLike {\n transition?: string | null;\n enter?: string | null;\n duration?: number | string;\n easing?: string;\n perspective?: number | string;\n curtainColor?: string;\n}\n\nexport interface PageTransitionContext {\n /** `pageSettings.designSystem` — only a design-system page follows the look. */\n designSystem?: boolean;\n /** The look's Between pages choice (`designMotion.between`); absent = `PRE_MOTION.between`. */\n between?: string | null;\n /** The viewport is a phone (`PHONE_TRANSITION_QUERY`): Slide and Cinematic play their `phone` choice. */\n phone?: boolean;\n /** The page reads right to left: a Slide pushes from the other side. */\n rtl?: boolean;\n /** The page's initial (hydrated) load — no outgoing page. */\n initial?: boolean;\n}\n\n/** What `resolvePageTransition` is asked for. `transition: 'none'` is a valid, silent choice. */\nexport interface PlannedPageTransition {\n transition: string;\n duration?: number | string;\n easing?: string;\n perspective?: number | string;\n curtainColor?: string;\n /** The page follows the look (rather than its own Route animation). */\n fromLook: boolean;\n}\n\nexport const NO_PAGE_TRANSITION = 'none';\n\n/** The widest viewport a page change treats as a phone (MO-D5): the Mobile landscape breakpoint. */\nexport const PHONE_TRANSITION_QUERY = `(max-width: ${breakpointDef(Breakpoint.Mobile)!.maxWidth}px)`;\n\n/** What a window can tell `pageTransitionOf`: the media query and the computed direction. */\nexport interface TransitionViewport {\n matchMedia?: (query: string) => { matches: boolean };\n getComputedStyle?: (el: Element) => { direction?: string };\n}\n\n/**\n * The part of the context only the browser knows — is this a phone, does the page read right to left —\n * read the same way by every runtime that plays a page change (the engine, Preview). No window → neither.\n */\nexport function viewportTransitionContext(view: TransitionViewport | null | undefined, el: Element | null | undefined): Pick<PageTransitionContext, 'phone' | 'rtl'> {\n return {\n phone: !!view?.matchMedia?.(PHONE_TRANSITION_QUERY)?.matches,\n rtl: !!el && view?.getComputedStyle?.(el)?.direction === 'rtl',\n };\n}\n\n/** The page set its own transition (a preset id, or a legacy `enter` that migrates to one). */\nexport function hasOwnPageTransition(anim: RouteAnimationLike | null | undefined): boolean {\n return !!(anim?.transition || anim?.enter);\n}\n\n/**\n * The ONE decision of what plays when a page arrives, for the engine and every builder preview:\n * • a page with its own Route animation plays it, exactly as before (an unflagged page too: with none set\n * it keeps the platform default, `effectiveTransitionId`);\n * • a design-system page with none follows the look's Between pages — never on its initial load (MO-D6:\n * no IN half, no server pre-state), as Fade on a phone for Slide and Cinematic (MO-D5), mirrored in RTL.\n * Reduced motion is the runtime's own question (`motionAllowed`), asked before anything plays.\n */\nexport function pageTransitionOf(anim: RouteAnimationLike | null | undefined, ctx: PageTransitionContext = {}): PlannedPageTransition {\n if (!ctx.designSystem || hasOwnPageTransition(anim)) {\n return {\n transition: effectiveTransitionId(anim),\n duration: anim?.duration, easing: anim?.easing, perspective: anim?.perspective, curtainColor: anim?.curtainColor,\n fromLook: false,\n };\n }\n if (ctx.initial) return { transition: NO_PAGE_TRANSITION, fromLook: true };\n let choice: BetweenChoice = SPEC_AXES.betweens[resolveDesignMotion({ between: ctx.between }).between];\n if (ctx.phone && choice.phone) choice = SPEC_AXES.betweens[choice.phone as BetweenId];\n const feel = choice.feel ? applyFeel(choice.feel) : undefined;\n return {\n transition: ctx.rtl && choice.rtl ? choice.rtl : choice.transition,\n ...(feel ?? {}),\n fromLook: true,\n };\n}\n\ntype BetweenChoice = { readonly transition: string; readonly feel?: string; readonly rtl?: string; readonly phone?: string };\n\n","import { ResolvedPageTransition } from './page-transition-presets';\n\n/** The two layers a builder preview of a page change plays on, and the stage that holds them. */\nexport interface TransitionPreviewLayers {\n /** Holds both layers; it carries the perspective the 3D presets need. */\n stage: HTMLElement;\n /** The page that leaves. */\n out: HTMLElement | null;\n /** The page that arrives. */\n in: HTMLElement | null;\n}\n\n/**\n * Play a resolved page change (`resolvePageTransition`) on two stacked layers — the ONE dual-layer preview the\n * builder's Page panel and the Design step's specimen both play (rev 3.1 §3o). The live site plays the same\n * frames through its own transition service. Resolves when the arriving layer has finished (or at once when\n * there is no arriving layer). The layers are left at their last frame: the caller decides what to show after.\n */\nexport function playDualLayerTransition(resolved: ResolvedPageTransition, layers: TransitionPreviewLayers): Promise<void> {\n const { stage, out, in: inc } = layers;\n stage.style.perspective = `${resolved.perspective}px`;\n if (out) {\n if (resolved.outTransformOrigin) out.style.transformOrigin = resolved.outTransformOrigin;\n out.getAnimations().forEach(a => a.cancel());\n out.animate(resolved.outFrames, resolved.outOptions);\n }\n if (!inc) return Promise.resolve();\n if (resolved.inTransformOrigin) inc.style.transformOrigin = resolved.inTransformOrigin;\n inc.style.zIndex = resolved.ontop === 'in' ? '2' : '1';\n inc.getAnimations().forEach(a => a.cancel());\n return inc.animate(resolved.inFrames, resolved.inOptions).finished.then(() => undefined, () => undefined);\n}\n","import {\n ClientFormSpec,\n FieldSpec,\n failureAnnouncement,\n FORM_ANNOUNCER_ATTRIBUTE,\n FORM_FIELDS_ATTRIBUTE,\n FORM_STATE_ATTRIBUTE,\n FormRenderState,\n FormRuntimeState,\n FormTransport,\n HONEYPOT_FIELD,\n INITIAL_FORM_STATE,\n isMultiValueField,\n ControlType,\n FieldClass,\n onFieldBlur,\n onFieldChange,\n onSubmitAttempt,\n parseClientFormSpec,\n resetFormState,\n shouldShowError,\n submitOutcome,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { defaultMessageResolver, FormMessageResolver } from './form-runtime.service';\nimport { shakeElement } from './shake';\nimport { syncSubmitButtons } from './submit-buttons';\n\n/** What a host gives a string-rendered form: the POST (the engine's), where a redirect goes, how a message reads. */\nexport interface StringFormOptions {\n transport?: FormTransport | null;\n navigate?: ((url: string) => void) | null;\n messages?: FormMessageResolver;\n}\n\nconst FIELD_ATTRIBUTE = 'data-iox-field';\nconst CONTROL_CLASS = 'iox-field__control';\nconst ERROR_CLASS = 'iox-field__error';\nconst HELP_CLASS = 'iox-field__help';\nconst INVALID_CLASS = 'iox-invalid';\nconst BOOTED = '__ioxStringForm';\n\n/**\n * A form the SSR engine's string renderer wrote — every header / footer global, every string-rendered page —\n * run with the behaviour `IoxFormComponent` gives a component-path form (vectoriox/iox-client-engine#13): the\n * forms-core runtime decides when an error shows, a valid submit POSTs through the host's transport with the\n * anti-spam fields, the form moves idle → submitting → success / error on `data-iox-state` (the shared CSS shows\n * the designed block), the first problem takes focus and the failure is announced. Nothing posts natively.\n *\n * Its fields come from the form itself (`data-iox-form-fields`, the spec minus its destinations), so the\n * runtime needs no node tree. Idempotent per element.\n */\nexport class StringFormRuntime {\n private state: FormRuntimeState = INITIAL_FORM_STATE;\n private inFlight = false;\n private readonly renderedAt = Date.now();\n private readonly listeners: Array<[string, EventListener]> = [];\n private readonly messages: FormMessageResolver;\n\n constructor(private readonly form: HTMLFormElement, private readonly spec: ClientFormSpec, private readonly options: StringFormOptions = {}) {\n this.messages = options.messages ?? defaultMessageResolver;\n this.listen('input', e => this.onEdit(e));\n this.listen('change', e => this.onEdit(e));\n this.listen('focusout', e => this.onLeave(e));\n this.listen('submit', e => this.onSubmit(e));\n (form as any)[BOOTED] = this;\n }\n\n destroy(): void {\n for (const [type, fn] of this.listeners) this.form.removeEventListener(type, fn);\n this.listeners.length = 0;\n delete (this.form as any)[BOOTED];\n }\n\n /** The visitor's answers, keyed by the spec's field names. */\n values(): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const field of this.spec.fields) out[field.name] = this.valueOf(field);\n return out;\n }\n\n private listen(type: string, fn: (e: Event) => void): void {\n this.form.addEventListener(type, fn);\n this.listeners.push([type, fn]);\n }\n\n private fieldNameOf(event: Event): string | null {\n const target = event.target as Element | null;\n if (!target?.classList?.contains(CONTROL_CLASS)) return null;\n return target.closest(`[${FIELD_ATTRIBUTE}]`)?.getAttribute(FIELD_ATTRIBUTE) ?? null;\n }\n\n private onEdit(event: Event): void {\n const name = this.fieldNameOf(event);\n if (!name) return;\n this.state = onFieldChange(this.state, name, this.values(), this.fullSpec());\n this.render();\n }\n\n private onLeave(event: Event): void {\n const name = this.fieldNameOf(event);\n if (!name) return;\n // Leaving one chip for the next, or the date button for its own calendar, is not leaving the FIELD: Smart timing\n // must not say \"Choose a date\" while the visitor is choosing one.\n const next = (event as FocusEvent).relatedTarget as Node | null;\n if (next && this.fieldElement(name)?.contains(next)) return;\n this.state = onFieldBlur(this.state, name, this.values(), this.fullSpec());\n this.render();\n }\n\n private onSubmit(event: Event): void {\n // Never the browser's own submission: it would reload the page with the answers in the address and send nothing.\n event.preventDefault();\n // Sent is final (premium N2): the button reads \"Sent\" and is disabled — nothing sends twice.\n if (this.inFlight || this.form.getAttribute(FORM_STATE_ATTRIBUTE) === FormRenderState.Success) return;\n const values = this.values();\n this.state = onSubmitAttempt(this.state, values, this.fullSpec());\n this.render();\n if (Object.keys(this.state.errors).length) {\n this.announce(this.state.errors);\n this.focusFirstInvalid();\n return;\n }\n if (!this.options.transport) return;\n void this.send(values);\n }\n\n private async send(values: Record<string, unknown>): Promise<void> {\n this.inFlight = true;\n this.setRenderState(FormRenderState.Submitting);\n let response: SubmitResponse;\n try {\n response = await this.options.transport!({\n formId: this.form.getAttribute('data-iox-form') ?? '',\n values: withAntiSpamFields(values, this.renderedAt, this.honeypotValue()),\n });\n } catch {\n // The call never reached the server — the Error block, never Success.\n response = { ok: false };\n }\n this.inFlight = false;\n this.apply(response);\n }\n\n private apply(response: SubmitResponse): void {\n const outcome = submitOutcome(response);\n this.setRenderState(outcome.state);\n if (outcome.errors) {\n this.state = { ...this.state, submitted: true, submitting: false, errors: { ...outcome.errors } };\n this.render();\n this.announce(outcome.errors);\n this.focusFirstInvalid();\n return;\n }\n if (outcome.state === FormRenderState.Error) {\n this.announce(null);\n return;\n }\n this.form.reset();\n this.state = resetFormState();\n this.render();\n if (outcome.redirect) this.options.navigate?.(outcome.redirect);\n }\n\n private setRenderState(state: FormRenderState): void {\n this.form.setAttribute(FORM_STATE_ATTRIBUTE, state);\n if (state === FormRenderState.Submitting) this.form.setAttribute('aria-busy', 'true');\n else this.form.removeAttribute('aria-busy');\n syncSubmitButtons(this.form, state);\n this.state = { ...this.state, submitting: state === FormRenderState.Submitting };\n }\n\n private fullSpec() {\n return { formId: '', name: '', feedback: this.spec.feedback as any, fields: this.spec.fields, actions: [], antiSpam: { honeypot: true, minFillMs: 0 } };\n }\n\n private fieldElement(name: string): HTMLElement | null {\n // Compared, never interpolated into a selector: a field key may hold characters a selector chokes on.\n for (const el of Array.from(this.form.querySelectorAll<HTMLElement>(`[${FIELD_ATTRIBUTE}]`))) {\n if (el.getAttribute(FIELD_ATTRIBUTE) === name && el.closest('form') === this.form) return el;\n }\n return null;\n }\n\n private controlsOf(field: HTMLElement): HTMLInputElement[] {\n return Array.from(field.querySelectorAll<HTMLInputElement>(`.${CONTROL_CLASS}`));\n }\n\n private valueOf(spec: FieldSpec): unknown {\n const el = this.fieldElement(spec.name);\n if (!el) return undefined;\n // A Date's answer is the ISO day its hidden input carries (N8) — never the button's words.\n if (spec.control === ControlType.Date) return el.querySelector<HTMLInputElement>(`input.${FieldClass.DateInput}`)?.value ?? '';\n const controls = this.controlsOf(el);\n const first = controls[0];\n if (!first) return undefined;\n // Several answers (Choices, N1): the ticked options' values, in the options' order — forms-core decides.\n if (isMultiValueField(spec)) return controls.filter(c => c.checked).map(c => c.value);\n if (first.type === 'radio') return controls.find(c => c.checked)?.value ?? '';\n if (first.type === 'checkbox') return first.checked;\n if (first.type === 'range') return Number(first.value);\n return first.value;\n }\n\n /** Every field's error, aria-invalid, describedby and invalid class — as `IoxFieldComponent` renders them. */\n private render(): void {\n for (const field of this.spec.fields) {\n const el = this.fieldElement(field.name);\n if (!el) continue;\n const error = this.state.errors[field.name];\n const shown = !!error && shouldShowError(field.name, this.state, this.spec.feedback);\n const text = shown ? this.messages(error!.messageKey, error!.params) : '';\n el.classList.toggle(INVALID_CLASS, shown && !!text);\n this.renderError(el, shown ? text : '');\n }\n }\n\n private renderError(field: HTMLElement, text: string): void {\n const controls = this.controlsOf(field);\n const id = (controls[0]?.id || `iox-field-${field.getAttribute(FIELD_ATTRIBUTE)}`) + '-error';\n let p = field.querySelector<HTMLElement>(`.${ERROR_CLASS}`);\n if (text) {\n if (!p) {\n p = field.ownerDocument.createElement('p');\n p.className = ERROR_CLASS;\n p.id = id;\n p.setAttribute('role', 'alert');\n field.appendChild(p);\n }\n p.textContent = text;\n } else {\n p?.remove();\n }\n const helpId = field.querySelector(`.${HELP_CLASS}`)?.id;\n const describedBy = [helpId, text ? id : ''].filter(Boolean).join(' ');\n for (const control of controls) {\n if (text) control.setAttribute('aria-invalid', 'true');\n else control.removeAttribute('aria-invalid');\n if (describedBy) control.setAttribute('aria-describedby', describedBy);\n else control.removeAttribute('aria-describedby');\n }\n }\n\n private announce(errors: Record<string, unknown> | null): void {\n const region = this.form.querySelector<HTMLElement>(`[${FORM_ANNOUNCER_ATTRIBUTE}]`);\n if (!region) return;\n // Cleared first: a live region speaks on CHANGE, and the same failure twice must be said twice.\n region.textContent = '';\n const next = failureAnnouncement(errors);\n Promise.resolve().then(() => { region.textContent = next; });\n }\n\n /** Focus the first field that failed and shake it once (premium N2 — the ONE `shakeElement`). */\n private focusFirstInvalid(): void {\n for (const field of this.spec.fields) {\n if (!this.state.errors[field.name]) continue;\n const el = this.fieldElement(field.name);\n this.controlsOf(el ?? this.form)[0]?.focus();\n shakeElement(el);\n return;\n }\n }\n\n private honeypotValue(): string {\n return this.form.querySelector<HTMLInputElement>(`input[name=\"${HONEYPOT_FIELD}\"]`)?.value ?? '';\n }\n}\n\n/** The runtime already running a form element, if any. */\nexport function stringFormRuntimeOf(form: Element | null | undefined): StringFormRuntime | null {\n return ((form as any)?.[BOOTED] as StringFormRuntime | undefined) ?? null;\n}\n\n/**\n * Run a string-rendered form (one carrying `data-iox-form-fields`) — once: a form already running is returned as is.\n * Null for an element that is not one (a component-path form never carries the attribute; it runs itself).\n */\nexport function attachStringForm(form: Element | null | undefined, options: StringFormOptions = {}): StringFormRuntime | null {\n if (!form || (form as HTMLElement).tagName !== 'FORM') return null;\n const running = stringFormRuntimeOf(form);\n if (running) return running;\n const spec = parseClientFormSpec(form.getAttribute(FORM_FIELDS_ATTRIBUTE));\n return spec ? new StringFormRuntime(form as HTMLFormElement, spec, options) : null;\n}\n","/*\n * Public API Surface of iox-ui\n */\n\nexport * from './lib/view-position/view-position.directive';\nexport * from './lib/view-position/view-position.module';\n\nexport * from './lib/iox-aos/iox-aos.directive';\nexport * from './lib/iox-aos/iox-aos-container.component';\nexport * from './lib/iox-aos/iox-aos.service';\nexport * from './lib/iox-aos/iox-aos.module';\n\nexport * from './lib/iox-ui.module';\nexport * from './lib/iox-page/page-component/page-component.component';\nexport * from './lib/iox-page/iox-page.module';\nexport * from './lib/services/page-scroll.provider';\nexport * from './lib/services/component-instance-registry.service';\n\n// CMS client infra\n\n// Builder components — extracted from iox-cms-client for shared use in builder + client engine\nexport * from './lib/builder-components/builder-tokens';\nexport * from './lib/builder-components/iox-builder-components.module';\nexport * from './lib/builder-components/iox-component-registry.service';\nexport * from './lib/builder-components/image/image.component';\nexport * from './lib/builder-components/spacer/spacer.component';\nexport * from './lib/builder-components/card/card.component';\nexport * from './lib/builder-components/divider/divider.component';\nexport * from './lib/builder-components/icon/icon.component';\nexport * from './lib/builder-components/link/link.component';\nexport * from './lib/builder-components/button/button.component';\nexport * from './lib/builder-components/button-block/button-block.component';\nexport * from './lib/builder-components/heading/heading.component';\nexport * from './lib/builder-components/text/text.component';\nexport * from './lib/builder-components/section/section.component';\nexport * from './lib/builder-components/container/container.component';\nexport * from './lib/builder-components/linked-container/linked-container.component';\nexport * from './lib/builder-components/repeater/repeater.component';\nexport * from './lib/builder-components/slider-container/slider-container.component';\nexport * from './lib/builder-components/slider-container/swiper-modules';\nexport * from './lib/builder-components/slider-container/slider-options';\nexport * from './lib/builder-components/slider-container/slider-boot';\nexport * from './lib/builder-components/slider-slide/slider-slide.component';\nexport * from './lib/builder-components/list/list.component';\nexport * from './lib/builder-components/list-item/list-item.component';\n\nexport * from './lib/style-compiler/style-compiler';\nexport * from './lib/style-compiler/virtual-traits';\nexport * from './lib/style-compiler/tree-relations';\nexport * from './lib/style-compiler/parts';\nexport * from './lib/style-compiler/state-selectors';\nexport * from './lib/style-compiler/responsive';\nexport * from './lib/style-compiler/swiper-breakpoints';\n// CC1 — navigation that works at every width: the current page link, the accessibility attributes every\n// renderer writes (names, openers, the drawer's close-above), reduced motion and the ONE interaction\n// keyframe table both runtimes animate from.\nexport * from './lib/navigation/current-link';\nexport * from './lib/a11y/node-attributes';\nexport * from './lib/motion/motion';\nexport * from './lib/motion/scroll-plan';\nexport * from './lib/motion/interaction-keyframes';\nexport * from './lib/motion/interaction-easing';\nexport * from './lib/motion/pointer-intent';\nexport * from './lib/motion/scrolled';\n// Design system — tokens, flavors, token CSS, fonts. Lives in the framework-free entry point\n// `@vectoriox/iox-ui/design-core` (iox-cms imports it under plain Node); re-exported here BY PACKAGE\n// PATH, so the main FESM imports that entry instead of bundling a second copy of the contract.\nexport * from '@vectoriox/iox-ui/design-core';\nexport * from './lib/page-style/page-style';\n// Data sources — the planner, the resolvers, the referenced-alias walk. Framework-free entry\n// `@vectoriox/iox-ui/data-core` (iox-cms reads it too); re-exported here BY PACKAGE PATH.\nexport * from '@vectoriox/iox-ui/data-core';\nexport * from './lib/binding-pipes';\nexport * from './lib/render/component-input.util';\n\n// Icon class repair — a Phosphor class needs a weight AND a name; one saved without its weight\n// renders as an invisible box. Shared by the builder's Icon component and the SSR renderer.\nexport * from './lib/icons/normalize-icon-class';\n\n// Binding path resolution — ONE implementation for every renderer (builder canvas, SSR string\n// renderer, SSR component renderer). Previously forked three ways and already drifted.\nexport * from './lib/binding/resolve-path';\n// …and the path + pipes pair, which had been retyped at every one of those call sites.\nexport * from './lib/binding/resolve-bound-value';\n\n// Page SEO — the resolution ladder (override → binding → auto). The shape, the tag emitter and the\n// authoring schema are in the framework-free entry point `@vectoriox/iox-ui/seo-core`, which\n// `iox-cms` imports under plain Node; only the ladder needs the binding resolver, so only it lives\n// here. See iox-ai-guidance architecture/cms/seo-plan.md.\nexport * from './lib/seo/resolve-seo';\n// …and the authoring-side view of the same ladder, so the panel's chip cannot disagree with what\n// the renderer does.\nexport * from './lib/seo/seo-fields';\n\n// Element context state — named runtime slots an interaction writes and bindings read. A slot is a\n// data-source alias whose value is written rather than fetched, so bindings need no new grammar.\nexport * from './lib/context/context-slot.model';\nexport * from './lib/context/context-value';\nexport * from './lib/context/context-store';\nexport * from './lib/context/context-actions';\nexport * from './lib/context/context-collect';\nexport * from './lib/context/action-enabled';\nexport * from './lib/page-transition/page-transition-presets';\nexport * from './lib/page-transition/page-transition-preview';\n\n// Gallery — shared pure core (URL resolver, effect registry, crossfade loop). The Gallery\n// component twins (builder + engine) are added in later phases; this is Phase 0 logic only.\nexport * from './lib/builder-components/gallery/gallery.model';\nexport * from './lib/builder-components/gallery/gallery-effects';\nexport * from './lib/builder-components/gallery/gallery-loop';\nexport * from './lib/builder-components/gallery/gallery.component';\nexport * from './lib/builder-components/video/video.component';\n\n// Forms — the component twins. The framework-free core (validation, spec) is a SEPARATE entry\n// point, `@vectoriox/iox-ui/forms-core`, so NestJS can import it without Angular.\nexport * from './lib/builder-components/form/form.component';\nexport * from './lib/builder-components/form/field.component';\nexport * from './lib/builder-components/form/submit-button.component';\nexport * from './lib/builder-components/form/form-state-blocks.component';\nexport * from './lib/builder-components/dialog/dialog.component';\n// The per-form runtime and the i18n hook. A consumer MUST be able to import IOX_FORM_MESSAGES to\n// plug its own translations in, so this belongs on the public surface, not just as a type used by\n// the components' signatures.\nexport * from './lib/builder-components/form/form-runtime.service';\n// The string-rendered form's runtime (every header / footer global) — the component's behaviour, by DOM.\nexport * from './lib/builder-components/form/string-form.runtime';\nexport * from './lib/builder-components/form/submit-buttons';\n// Premium components M3: the date picker's DOM runtime (N8), the failing field's shake (N2) and the ONE anchored\n// placement every floating panel uses (N8 now, M5's tooltip / popover next).\nexport * from './lib/builder-components/form/date-picker.runtime';\nexport * from './lib/builder-components/form/shake';\nexport * from './lib/floating/place-floating';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AOSService","i1.IoxAnimateContainer","i1.PageScrollProvider","pick","num","i1.FormRuntimeService","i2","i2.PageScrollProvider","i1","trimmed","asRecord","readField","fieldValue","writeField"],"mappings":";;;;;;;;;;;;;;;;;;;MAOa,qBAAqB,CAAA;AAkB9B,IAAA,WAAA,CAAoB,IAAe,EAAA;QAAf,IAAA,CAAA,IAAI,GAAJ,IAAI;QAVhB,IAAA,CAAA,gBAAgB,GAAS,MAAM;QAC/B,IAAA,CAAA,UAAU,GAAU,CAAC;QACtB,IAAA,CAAA,UAAU,GAAY,KAAK;QAC3B,IAAA,CAAA,YAAY,GAAY,KAAK;AAG1B,QAAA,IAAA,CAAA,OAAO,GAAqB,IAAI,YAAY,EAAE;AAC9C,QAAA,IAAA,CAAA,OAAO,GAAqB,IAAI,YAAY,EAAE;AAC9C,QAAA,IAAA,CAAA,MAAM,GAAqB,IAAI,YAAY,EAAE;QAGnD,IAAI,CAAC,sBAAsB,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,CAAA,gBAAA,EAAmB,IAAI,CAAC,eAAe,CAAA,CAAE,CAAC;IAC1D;IAGA,eAAe,GAAA;QACX,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS;QACzD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY;QAC1D,OAAO,CAAC,GAAG,CAAC,CAAA,mBAAA,EAAsB,IAAI,CAAC,gBAAgB,CAAA,CAAE,CAAC;IAC9D;AAG2C,IAAA,QAAQ,CAAC,CAAQ,EAAA;AAExD,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,GAAG,GAAG,IAAI,CAAC,UAAU,E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B,CAAC,IAAgC,EAAA;AAChE,IAAA,OAAS,IAAY,GAAG,MAAM,CAAmC,IAAI,IAAI;AAC7E;AAEA;;;AAGG;SACa,gBAAgB,CAAC,IAAgC,EAAE,UAA6B,EAAE,EAAA;AAC9F,IAAA,IAAI,CAAC,IAAI,IAAK,IAAoB,CAAC,OAAO,KAAK,MAAM;AAAE,QAAA,OAAO,IAAI;AAClE,IAAA,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC;AACzC,IAAA,IAAI,OAAO;AAAE,QAAA,OAAO,OAAO;IAC3B,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;AAC1E,IAAA,OAAO,IAAI,GAAG,IAAI,iBAAiB,CAAC,IAAuB,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI;AACtF;;AC5RA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"vectoriox-iox-ui.mjs","sources":["../../../projects/iox-ui/src/lib/view-position/view-position.directive.ts","../../../projects/iox-ui/src/lib/view-position/view-position.module.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos-animations.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.service.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos-container.component.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.directive.ts","../../../projects/iox-ui/src/lib/iox-aos/iox-aos.module.ts","../../../projects/iox-ui/src/lib/motion/motion.ts","../../../projects/iox-ui/src/lib/motion/scroll-plan.ts","../../../projects/iox-ui/src/lib/services/page-scroll.provider.ts","../../../projects/iox-ui/src/lib/iox-page/page-component/page-component.component.ts","../../../projects/iox-ui/src/lib/iox-page/page-component/page-component.component.html","../../../projects/iox-ui/src/lib/iox-page/iox-page.module.ts","../../../projects/iox-ui/src/lib/iox-ui.module.ts","../../../projects/iox-ui/src/lib/services/component-instance-registry.service.ts","../../../projects/iox-ui/src/lib/builder-components/builder-tokens.ts","../../../projects/iox-ui/src/lib/builder-components/image/image.component.ts","../../../projects/iox-ui/src/lib/builder-components/spacer/spacer.component.ts","../../../projects/iox-ui/src/lib/builder-components/card/card.component.ts","../../../projects/iox-ui/src/lib/builder-components/divider/divider.component.ts","../../../projects/iox-ui/src/lib/icons/normalize-icon-class.ts","../../../projects/iox-ui/src/lib/builder-components/icon/icon.component.ts","../../../projects/iox-ui/src/lib/builder-components/link/link.component.ts","../../../projects/iox-ui/src/lib/builder-components/button/button.component.ts","../../../projects/iox-ui/src/design-core/node-links.ts","../../../projects/iox-ui/src/lib/builder-components/heading/heading.component.ts","../../../projects/iox-ui/src/lib/builder-components/text/text.component.ts","../../../projects/iox-ui/src/lib/builder-components/section/section.component.ts","../../../projects/iox-ui/src/lib/builder-components/container/container.component.ts","../../../projects/iox-ui/src/lib/builder-components/linked-container/linked-container.component.ts","../../../projects/iox-ui/src/lib/builder-components/repeater/repeater.component.ts","../../../projects/iox-ui/src/lib/builder-components/button-block/button-block.component.ts","../../../projects/iox-ui/src/lib/style-compiler/virtual-traits.ts","../../../projects/iox-ui/src/design-core/css-names.ts","../../../projects/iox-ui/src/lib/a11y/a11y-traits.ts","../../../projects/iox-ui/src/lib/style-compiler/style-compiler.ts","../../../projects/iox-ui/src/lib/style-compiler/responsive.ts","../../../projects/iox-ui/src/lib/style-compiler/swiper-breakpoints.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/swiper-modules.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-options.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-boot.ts","../../../projects/iox-ui/src/lib/builder-components/slider-container/slider-container.component.ts","../../../projects/iox-ui/src/lib/builder-components/slider-slide/slider-slide.component.ts","../../../projects/iox-ui/src/lib/builder-components/list/list.component.ts","../../../projects/iox-ui/src/lib/builder-components/list-item/list-item.component.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery.model.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery-effects.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery-loop.ts","../../../projects/iox-ui/src/lib/builder-components/gallery/gallery.component.ts","../../../projects/iox-ui/src/forms-core/form.model.ts","../../../projects/iox-ui/src/forms-core/messages.ts","../../../projects/iox-ui/src/forms-core/dates.ts","../../../projects/iox-ui/src/forms-core/validate.ts","../../../projects/iox-ui/src/forms-core/options.ts","../../../projects/iox-ui/src/forms-core/collect.ts","../../../projects/iox-ui/src/forms-core/runtime.ts","../../../projects/iox-ui/src/forms-core/rule-catalog.ts","../../../projects/iox-ui/src/forms-core/transport.ts","../../../projects/iox-ui/src/forms-core/submit-lifecycle.ts","../../../projects/iox-ui/src/forms-core/form-presets.ts","../../../projects/iox-ui/src/forms-core/nesting.ts","../../../projects/iox-ui/src/forms-core/channel.ts","../../../projects/iox-ui/src/forms-core/field-markup.ts","../../../projects/iox-ui/src/forms-core/public-api.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-runtime.service.ts","../../../projects/iox-ui/src/lib/builder-components/form/shake.ts","../../../projects/iox-ui/src/lib/builder-components/form/submit-buttons.ts","../../../projects/iox-ui/src/lib/builder-components/form/form.component.ts","../../../projects/iox-ui/src/lib/floating/place-floating.ts","../../../projects/iox-ui/src/lib/builder-components/form/date-picker.runtime.ts","../../../projects/iox-ui/src/lib/builder-components/form/field.component.ts","../../../projects/iox-ui/src/lib/builder-components/form/submit-button.component.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-state-blocks.component.ts","../../../projects/iox-ui/src/lib/builder-components/dialog/dialog.component.ts","../../../projects/iox-ui/src/lib/builder-components/video/video.component.ts","../../../projects/iox-ui/src/lib/builder-components/iox-builder-components.module.ts","../../../projects/iox-ui/src/lib/builder-components/iox-component-registry.service.ts","../../../projects/iox-ui/src/lib/style-compiler/tree-relations.ts","../../../projects/iox-ui/src/lib/style-compiler/parts.ts","../../../projects/iox-ui/src/lib/style-compiler/state-selectors.ts","../../../projects/iox-ui/src/lib/navigation/current-link.ts","../../../projects/iox-ui/src/lib/navigation/header-runtime.ts","../../../projects/iox-ui/src/lib/a11y/node-attributes.ts","../../../projects/iox-ui/src/lib/motion/interaction-keyframes.ts","../../../projects/iox-ui/src/lib/motion/interaction-easing.ts","../../../projects/iox-ui/src/lib/motion/pointer-intent.ts","../../../projects/iox-ui/src/lib/motion/scrolled.ts","../../../projects/iox-ui/src/lib/page-style/page-style.ts","../../../projects/iox-ui/src/lib/binding-pipes.ts","../../../projects/iox-ui/src/lib/render/component-input.util.ts","../../../projects/iox-ui/src/lib/binding/resolve-path.ts","../../../projects/iox-ui/src/lib/binding/resolve-bound-value.ts","../../../projects/iox-ui/src/seo-core/seo.model.ts","../../../projects/iox-ui/src/seo-core/normalize.ts","../../../projects/iox-ui/src/seo-core/tags.ts","../../../projects/iox-ui/src/seo-core/schema.ts","../../../projects/iox-ui/src/seo-core/public-api.ts","../../../projects/iox-ui/src/lib/seo/resolve-seo.ts","../../../projects/iox-ui/src/lib/seo/seo-fields.ts","../../../projects/iox-ui/src/lib/context/context-slot.model.ts","../../../projects/iox-ui/src/lib/context/context-value.ts","../../../projects/iox-ui/src/lib/context/context-store.ts","../../../projects/iox-ui/src/lib/context/context-actions.ts","../../../projects/iox-ui/src/lib/context/context-collect.ts","../../../projects/iox-ui/src/lib/context/action-enabled.ts","../../../projects/iox-ui/src/lib/page-transition/page-transition-presets.ts","../../../projects/iox-ui/src/lib/page-transition/page-transition-preview.ts","../../../projects/iox-ui/src/lib/builder-components/form/string-form.runtime.ts","../../../projects/iox-ui/src/public-api.ts","../../../projects/iox-ui/src/vectoriox-iox-ui.ts"],"sourcesContent":["import {AfterViewInit, Directive, ElementRef, EventEmitter, HostListener, Input, Output} from '@angular/core';\n\n@Directive({\n selector:'[view-position]',\n standalone: false\n})\n\nexport class ViewPositionDirective implements AfterViewInit{\n\n private _viewPortHighet!:number;\n private _elementHeight!: number;\n private _elementOffseTop!: number;\n private _curterScreen!:number;\n private _halfSscreen!:number;\n \n private _scrollDirection:string= \"Down\";\n private _scrollPos:number = 0;\n public isOnScreen: boolean = false;\n public isHalfScreen: boolean = false;\n \n @Input() data:any\n @Output() onEnter:EventEmitter<any> = new EventEmitter();\n @Output() onLeave:EventEmitter<any> = new EventEmitter();\n @Output() onHalf:EventEmitter<any> = new EventEmitter();\n\n constructor(private _elr:ElementRef){\n this._initScreenDeminitions();\n console.log(`screent highet: ${this._viewPortHighet}`);\n }\n\n\n ngAfterViewInit(): void {\n this._elementOffseTop = this._elr.nativeElement.offsetTop;\n this._elementHeight = this._elr.nativeElement.offsetHeight;\n console.log(`element offset Y = ${this._elementOffseTop}`); \n }\n\n\n @HostListener('window:scroll', ['$event']) onScroll(e: Event): void {\n\n if ((document.body.getBoundingClientRect()).top > this._scrollPos){\n if(this._scrollDirection != \"Up\"){\n this.isHalfScreen =false;\n this._scrollDirection = \"Up\"\n }\n } \n\t else{\n if(this._scrollDirection !=\"Down\"){\n this.isHalfScreen =false;\n this._scrollDirection = \"Down\"\n }\n } \n\t this._scrollPos = (document.body.getBoundingClientRect()).top;\n\n\n let currentClientHight = this._elr.nativeElement.getBoundingClientRect().top;\n if(currentClientHight >= this._viewPortHighet || currentClientHight < -this._elementHeight){\n if(this.isOnScreen){\n this.isOnScreen = false;\n this.onLeave.emit(\"OUT\");\n }\n }else{\n if(!this.isOnScreen){\n this.isOnScreen = true;\n this.onEnter.emit(\"IN\");\n }\n }\n\n if(currentClientHight < this._halfSscreen && currentClientHight > 0 && this._scrollDirection == \"Down\") {\n if(!this.isHalfScreen){\n this.isHalfScreen = true;\n console.log(\"half\")\n this.onHalf.emit(this.data);\n }\n }\n\n if(currentClientHight + this._elementHeight > this._halfSscreen && currentClientHight +this._elementHeight < this._viewPortHighet && this._scrollDirection == \"Up\") {\n if(!this.isHalfScreen){\n this.isHalfScreen = true;\n console.log(\"I am half\")\n this.onHalf.emit(this.data);\n }\n }\n }\n\n @HostListener('window:resize', ['$event']) onResize(e: Event) {\n this._viewPortHighet = window.innerHeight;\n this._initScreenDeminitions();\n }\n \n \n\n private _initScreenDeminitions(){\n this._viewPortHighet = window.innerHeight;\n this._curterScreen = Math.trunc(this._viewPortHighet *0.25);\n this._halfSscreen = Math.trunc(this._viewPortHighet *0.5);\n }\n }","import { NgModule } from '@angular/core';\nimport { ViewPositionDirective } from './view-position.directive';\n\n\n\n@NgModule({\n declarations: [\n ViewPositionDirective\n ],\n imports: [\n ],\n exports: [\n ViewPositionDirective\n ]\n})\nexport class ViewPositionModule { }\n","import { AnimationBuilder, style, animate, keyframes } from '@angular/animations';\n\n/********** Entries Animations ********************/\n\nexport const IoxAnimationStyles: any = {}\n\nIoxAnimationStyles[\"fade-up\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translate3d(0,100px,0)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-right\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translateX(150px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-out-right\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 1, transform: \"translateX(0px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: \"translateX(150px)\" }))]\n}\n\nIoxAnimationStyles[\"fade-left\"] = (delay:string, duration:string)=>{\n return [style({ opacity: 0, transform: \"translateX(-150px)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0)\" }))]\n}\n\nIoxAnimationStyles[\"fade-out-up\"] = (delay:string, duration:string)=>{\n return [ style({ opacity: 1, transform: \"translateZ(0)\" }),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: \"translate3d(0,-100px,0)\"}))]\n}\n\nIoxAnimationStyles[\"flip-left\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"perspective(2500px) rotateY(-100deg)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"perspective(2500px) rotateY(0)\" }))]\n}\n\nIoxAnimationStyles[\"flip-up\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"perspective(2500px) rotateX(-100deg)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"perspective(2500px) rotateY(0)\" }))]\n}\n\nIoxAnimationStyles[\"zoom-in-up\"] = (delay:string, duration:string)=>{\n return [style({opacity: 0,transform: \"translate3d(0,100px,0) scale(.6)\"}),\n animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: \"translateZ(0) scale(1)\" }))]\n}","import { Injectable } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\n\n\n@Injectable({providedIn: 'root'})\nexport class AOSService {\n\n\n\n private _scrollOffset:Subject<any> = new Subject();\n public readonly scrollOffset: Observable<any> = this._scrollOffset.asObservable();\n \n constructor() { }\n\n\n updateScrollOffset(offset:any){\n this._scrollOffset.next(offset);\n }\n\n}","import { Component, ElementRef, HostListener, Input, SimpleChanges, ViewChild } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { AOSService } from './iox-aos.service';\n\n@Component({\n selector: \"[ioxAnimateContainer], ioxAnimateContainer\",\n template:`<div class='animate_root_element' #animateRooteElement>\n <ng-content></ng-content>\n </div>`,\n standalone: false\n})\nexport class IoxAnimateContainer {\n\n @Input('kickIn') kickIn = true;\n\n private _scrollOffset:Subject<any> = new Subject();\n public readonly scrollOffset: Observable<any> = this._scrollOffset.asObservable();\n @ViewChild('animateRooteElement') public animateRooteElement:any;\n \n\n constructor(private _element: ElementRef, private _aOSService: AOSService) {\n }\n\n ngAfterViewInit(){\n this.updateOffset();\n }\n\n @HostListener('scroll', ['$event'])\n public onScroll($event:any){\n this.updateOffset();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n console.log(changes);\n if(changes['kickIn'] && changes['kickIn'].currentValue){\n this.updateOffset();\n }\n }\n\n\n private updateOffset(){\n let elClientRect = this.animateRooteElement.nativeElement.getBoundingClientRect();\n this._scrollOffset.next(elClientRect);\n this._aOSService.updateScrollOffset(elClientRect);\n }\n}","import { Directive, OnDestroy, AfterViewInit, ElementRef, Input, OnInit, Renderer2, HostListener, Host, Optional } from \"@angular/core\";\nimport { AnimationBuilder, style, animate, AnimationPlayer } from '@angular/animations';\nimport { IoxAnimationStyles } from \"./iox-aos-animations\"\n;\nimport { IoxAnimateContainer } from \"./iox-aos-container.component\";\n@Directive({\n selector: \"[ioxAnimate], ioxAnimate\",\n standalone: false\n })\n export class IoxAosDirective implements OnDestroy, OnInit, AfterViewInit {\n \n @Input(\"animationDelay\") animationDelay: string =\"\";\n @Input(\"animationIn\") animationIn: string =\"\";\n @Input(\"animationOut\") animationOut: string = \"\";\n @Input(\"animationDuration\") animationDuration: string = \"0.5s\";\n \n // @Input(\"in\")\n // @Input(\"out\")\n\n public animation:AnimationPlayer | any;\n public isAnimationPlayed= false;\n private _elTop:number =0;\n\n\n constructor(@Host() @Optional() private _animateContainer: IoxAnimateContainer, private _element: ElementRef, private _animationBuilder:AnimationBuilder, private _renderer: Renderer2){\n \n this._renderer.setStyle(_element.nativeElement,'opacity', '0');\n }\n\n public ngOnInit(){\n }\n\n public ngAfterViewInit(){\n\n setTimeout(()=>{\n\n this._elTop = this._cumulativeOffset(this._element.nativeElement).top;\n\n if(this._animateContainer){\n if(this._animateContainer.kickIn){\n this.runIfVisiable();\n }else{\n return\n }\n }else{\n this.runIfVisiable();\n }\n\n \n \n },150)\n\n const resizeObserver = new ResizeObserver((entries) =>\n this._elTop = this._cumulativeOffset(this._element.nativeElement).top\n );\n\n resizeObserver.observe(document.body);\n \n if(this._animateContainer){\n this._animateContainer?.scrollOffset.subscribe((offset:any)=>{\n if(this._animateContainer.kickIn){\n this.scrollEventHandler(-1 *offset.top);\n }\n })\n }\n\n \n }\n\n public makeAnimationIn(animationStyle:any):AnimationPlayer{\n let animation = IoxAnimationStyles[animationStyle](this.animationDelay, this.animationDuration);\n const myAnimation = this._animationBuilder.build(animation)\n return myAnimation.create(this._element.nativeElement); \n\n }\n\n private _cumulativeOffset(element:any) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while(element);\n \n return {\n top: top,\n left: left\n };\n };\n\n @HostListener('document:scroll', ['$event']) onScrollEvent($event:any){\n this.scrollEventHandler(window.pageYOffset)\n }\n \n public isVisable(offset:number){\n //console.log(this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight);\n //return this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight;\n return this._elTop >= offset && this._elTop <= offset + window.innerHeight;\n }\n\n\n public scrollEventHandler(offset:number){\n\n if(this._animateContainer && this._animateContainer.kickIn == false){\n return\n }\n\n if(this.isVisable(offset) && !this.isAnimationPlayed){\n let animationStyle = this.animationIn || \"fade-up\";\n this.makeAnimationIn(animationStyle).play();\n this.isAnimationPlayed = true;\n }else if(!this.isVisable(offset) && this.isAnimationPlayed && this.animationOut){\n this.makeAnimationIn(this.animationOut).play();\n this.isAnimationPlayed =false;\n }\n }\n\n public runIfVisiable(){\n if(this.isVisable(window.pageYOffset)){\n let animationStyle = this.animationIn || \"fade-up\";\n this.makeAnimationIn(animationStyle).play();\n this.isAnimationPlayed = true;\n }\n }\n public ngOnDestroy(){\n\n }\n\n }\n\nfunction ViewParent() {\n throw new Error(\"Function not implemented.\");\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IoxAosDirective } from './iox-aos.directive';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { IoxAnimateContainer } from './iox-aos-container.component';\nimport { AOSService } from './iox-aos.service';\n\n\n@NgModule({\n declarations: [\n IoxAosDirective,\n IoxAnimateContainer\n ],\n imports: [\n BrowserAnimationsModule\n ],\n providers:[\n AOSService\n ],\n exports: [\n IoxAosDirective,\n IoxAnimateContainer\n ]\n})\nexport class IoxAosModule { \n\n static forRoot(): ModuleWithProviders<any> {\n return {\n ngModule: IoxAosModule,\n providers: [AOSService]\n };\n }\n\n}\n","/**\n * Reduced motion (CC1, R1 — complex-components plan §2d). The token sheet already collapses the\n * motion tokens under `prefers-reduced-motion`; everything that moves through SCRIPT must ask the\n * same question, and ask it HERE: the interaction engines (builder canvas + live site), the Slider's\n * autoplay and the Gallery's crossfade loop. Publishable gate #6: reduced motion = motion dial 0.\n */\n\nexport const REDUCED_MOTION_QUERY = '(prefers-reduced-motion: reduce)';\n\n/** Anything with `matchMedia` — a window, or a stub in a spec. */\nexport interface MatchMediaHost {\n matchMedia?: (query: string) => { matches: boolean };\n}\n\nfunction defaultHost(): MatchMediaHost | null {\n return typeof window !== 'undefined' ? window : null;\n}\n\n/** True when the visitor asked their system for reduced motion. No `matchMedia` (SSR) → false. */\nexport function prefersReducedMotion(host: MatchMediaHost | null | undefined = defaultHost()): boolean {\n try {\n return !!host?.matchMedia?.(REDUCED_MOTION_QUERY)?.matches;\n } catch {\n return false;\n }\n}\n\n/** True when script may animate. The ONE question every runtime asks before moving anything. */\nexport function motionAllowed(host: MatchMediaHost | null | undefined = defaultHost()): boolean {\n return !prefersReducedMotion(host);\n}\n","import type { LenisOptions } from 'lenis';\nimport { resolveDesignMotion, SPEC_AXES } from '@vectoriox/iox-ui/design-core';\n\n/**\n * Scrolling (AI plan rev 3.1 §3p, MO-D1/MO-D7): the look's `scroll` choice → the options the ONE page\n * scroller starts Lenis with, or `null` for the browser's own scrolling. The table is the contract's\n * `axes.scrolls`; this only turns its named easing into the function Lenis wants. Pure: the caller asks the\n * visitor's reduced-motion preference (`prefersReducedMotion`) and passes the answer in.\n */\n\nexport enum ScrollEasing {\n ExpoOut = 'expo-out',\n}\n\n/** The curves `axes.scrolls[].lenis.easing` may name. Expo-out is Lenis's own default curve. */\nexport const SCROLL_EASINGS: Readonly<Record<ScrollEasing, (t: number) => number>> = {\n [ScrollEasing.ExpoOut]: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),\n};\n\nexport interface ScrollPlanContext {\n /** The visitor asked for reduced motion: the page always scrolls natively. */\n reducedMotion: boolean;\n}\n\nexport function planScroll(scroll: string | null | undefined, ctx: ScrollPlanContext): LenisOptions | null {\n if (ctx.reducedMotion) return null;\n // An absent or unknown choice plays PRE_MOTION's Smooth — what every site glided with before rev 3.1.\n const lenis = SPEC_AXES.scrolls[resolveDesignMotion({ scroll }).scroll].lenis;\n if (!lenis) return null;\n return {\n duration: lenis.duration,\n easing: SCROLL_EASINGS[lenis.easing as ScrollEasing],\n wheelMultiplier: lenis.wheelMultiplier,\n syncTouch: lenis.syncTouch,\n };\n}\n","import { Injectable, NgZone, OnDestroy, inject } from '@angular/core';\nimport Lenis, { LenisOptions } from 'lenis';\n\nimport { prefersReducedMotion } from '../motion/motion';\n\n/** Where the page scrolls, and how. `lenis: null` = the browser's own scrolling (planScroll's Normal). */\nexport interface PageScrollStart {\n /** The scrolling element; absent = the document (the live site scrolls the window, CC1). */\n wrapper?: HTMLElement;\n content?: HTMLElement;\n lenis: LenisOptions | null;\n}\n\n/**\n * The ONE page scroller (AI plan rev 3.1 §3p). `IoxPageComponent` starts it with the plan of the look's\n * Scrolling choice (`planScroll`); `scrollTo` actions and the dialog lock go through it whether or not\n * Lenis runs. Never on the server: there is no window to scroll.\n */\n@Injectable()\nexport class PageScrollProvider implements OnDestroy {\n // inject() (not a ctor param) so subclasses like the engine's document-scrolling provider keep `super()`.\n private zone = inject(NgZone);\n private lenis: Lenis | null = null;\n private rafId?: number;\n private wrapper: HTMLElement | null = null;\n private lockedOverflow: string | null = null;\n\n init(start: PageScrollStart): void {\n this.destroy();\n if (typeof window === 'undefined' || typeof requestAnimationFrame === 'undefined') return;\n this.wrapper = start.wrapper ?? null;\n if (!start.lenis) return;\n this.lenis = new Lenis({ ...start.lenis, ...(start.wrapper ? { wrapper: start.wrapper } : {}), ...(start.content ? { content: start.content } : {}) });\n this.startLoop();\n }\n\n /** Provided by a component (a page, the Design step's specimen): its Lenis and loop go with it. */\n ngOnDestroy(): void {\n this.destroy();\n }\n\n /** Stop Lenis and its loop; the page falls back to the browser's own scrolling. */\n destroy(): void {\n if (this.rafId != null) cancelAnimationFrame(this.rafId);\n this.rafId = undefined;\n this.lenis?.destroy();\n this.lenis = null;\n this.unlock();\n }\n\n /** Hard-stop page scroll (dialog open, A1b): wheel/touch frozen until start(). */\n stop(): void {\n if (this.lenis) { this.lenis.stop(); return; }\n const el = this.scrollElement();\n if (!el || this.lockedOverflow !== null) return;\n this.lockedOverflow = el.style.overflow;\n el.style.overflow = 'hidden';\n }\n\n /** Resume after stop() — the dialog's close path, incl. native Esc/backdrop closes. */\n start(): void {\n if (this.lenis) { this.lenis.start(); return; }\n this.unlock();\n }\n\n scrollTo(y: number, options?: { duration?: number; immediate?: boolean }): void {\n if (this.lenis) { this.lenis.scrollTo(y, options); return; }\n const behavior: ScrollBehavior = options?.immediate || prefersReducedMotion() ? 'auto' : 'smooth';\n (this.wrapper ?? (typeof window !== 'undefined' ? window : null))?.scrollTo({ top: y, behavior });\n }\n\n scrollToTop(options?: { duration?: number; immediate?: boolean }): void {\n this.scrollTo(0, options);\n }\n\n /** The running Lenis, or null when the page scrolls natively (Normal, reduced motion, the server). */\n get instance(): Lenis | null {\n return this.lenis;\n }\n\n private scrollElement(): HTMLElement | null {\n return this.wrapper ?? (typeof document !== 'undefined' ? document.documentElement : null);\n }\n\n private unlock(): void {\n if (this.lockedOverflow === null) return;\n const el = this.scrollElement();\n if (el) el.style.overflow = this.lockedOverflow;\n this.lockedOverflow = null;\n }\n\n private startLoop(): void {\n // Run the perpetual rAF loop OUTSIDE Angular. In-zone, a never-ending requestAnimationFrame\n // keeps ApplicationRef.isStable() permanently false, so SSR hydration never completes\n // (NG0506: \"hydration expected isStable() to emit true ... didn't happen within 10000ms\").\n this.zone.runOutsideAngular(() => {\n const loop = (time: number) => {\n this.lenis?.raf(time);\n this.rafId = requestAnimationFrame(loop);\n };\n this.rafId = requestAnimationFrame(loop);\n });\n }\n}\n","import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, AfterViewInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport type { ScrollId } from '@vectoriox/iox-ui/design-core';\n\nimport { prefersReducedMotion } from '../../motion/motion';\nimport { planScroll } from '../../motion/scroll-plan';\nimport { PageScrollProvider } from '../../services/page-scroll.provider';\n\n@Component({\n selector: 'iox-page-component',\n templateUrl: './page-component.component.html',\n styleUrls: ['./page-component.component.scss'],\n standalone: false\n})\nexport class IoxPageComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() class = '';\n /** The look's Scrolling choice (`designMotion.scroll`); absent = Smooth, what every page did before rev 3.1. */\n @Input() scroll?: ScrollId | string | null;\n @ViewChild('page') public page!: ElementRef<HTMLDivElement>;\n private scrollSubscription!: Subscription;\n private started = false;\n @Output() scrollEvent = new EventEmitter<{\n scrollTop: number;\n scrollLeft: number;\n scrollHeight: number;\n scrollWidth: number;\n clientHeight: number;\n clientWidth: number;\n scrollPercentage: number;\n }>();\n\n constructor(private pageScrollProvider: PageScrollProvider) {}\n\n ngAfterViewInit(): void {\n if (this.page) {\n this.scrollSubscription = fromEvent(this.page.nativeElement, 'scroll').subscribe((event) => {\n this.onScroll(event as Event);\n });\n this.startScroller();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['scroll'] && this.started) this.startScroller();\n }\n\n onScroll(event: Event): void {\n const target = event.target as HTMLElement;\n const scrollTop = target.scrollTop;\n const scrollLeft = target.scrollLeft;\n const scrollHeight = target.scrollHeight;\n const scrollWidth = target.scrollWidth;\n const clientHeight = target.clientHeight;\n const clientWidth = target.clientWidth;\n const scrollPercentage = (scrollTop / (scrollHeight - clientHeight)) * 100;\n\n this.scrollEvent.emit({ scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth, scrollPercentage });\n }\n\n ngOnDestroy(): void {\n if (this.scrollSubscription) {\n this.scrollSubscription.unsubscribe();\n }\n }\n\n private startScroller(): void {\n this.started = true;\n this.pageScrollProvider.init({\n wrapper: this.page.nativeElement,\n content: this.page.nativeElement.querySelector<HTMLElement>('.page-mask') ?? undefined,\n lenis: planScroll(this.scroll, { reducedMotion: prefersReducedMotion() }),\n });\n }\n}\n","<div #page [class]=\"class\" class=\"iox-page-wrapper\">\n <div class=\"page-mask\">\n <ng-content></ng-content>\n </div>\n</div>\n","\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IoxPageComponent } from './page-component/page-component.component';\nimport { PageScrollProvider } from '../services/page-scroll.provider';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [IoxPageComponent],\n exports: [IoxPageComponent],\n providers: [PageScrollProvider]\n})\nexport class IoxPageModule {}\n","import { NgModule } from '@angular/core';\nimport { IoxAosModule } from './iox-aos/iox-aos.module';\nimport { IoxPageModule } from './iox-page/iox-page.module';\n\n\n@NgModule({\n declarations: [],\n imports: [IoxAosModule, IoxPageModule],\n exports: [IoxAosModule, IoxPageModule]\n})\nexport class IoxUiModule { }\n","import { Injectable } from '@angular/core';\n\n/**\n * Holds live component instances by nodeId so interaction engines can call\n * imperative methods (e.g. Swiper.slideNext()) without direct references.\n *\n * Components register on init and unregister on destroy.\n * Used by both InteractionEngineService (builder) and ClientInteractionService (SSR engine).\n */\n@Injectable({ providedIn: 'root' })\nexport class ComponentInstanceRegistryService {\n private _instances = new Map<string, any>();\n\n register(nodeId: string, instance: any): void {\n this._instances.set(nodeId, instance);\n }\n\n unregister(nodeId: string): void {\n this._instances.delete(nodeId);\n }\n\n get(nodeId: string): any {\n return this._instances.get(nodeId);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const IS_PREVIEW = new InjectionToken<boolean>('IS_PREVIEW');\n\nexport interface IBuilderEventEmitter {\n emit(type: string, data?: any): void;\n}\n\nexport const IOX_BUILDER_EVENTS = new InjectionToken<IBuilderEventEmitter>('IOX_BUILDER_EVENTS');\n","import { Component, Input } from '@angular/core';\n\n/**\n * Directive-host image: the selector is `img[iox-img]`, so when created dynamically the HOST is\n * the `<img>` itself — NO wrapper element. All styles land on the `<img>` via `.iox-node-{id}`;\n * a single-element (leaf) node has no inner/outer split. See render-parity.md.\n */\n@Component({\n selector: 'img[iox-img]',\n template: '',\n host: {\n '[attr.src]': 'srcAttr',\n '[attr.alt]': 'altAttr',\n '[attr.aria-hidden]': 'ariaHiddenAttr',\n '[attr.data-iox-empty]': 'emptyAttr',\n '[class]': \"'iox-node-' + nodeId\",\n },\n styles: [':host { display: block; max-width: 100%; }'],\n standalone: false,\n})\nexport class BuilderImageComponent {\n @Input() src = 'https://placehold.co/600x400?text=Image';\n @Input() alt = 'Image';\n @Input() nodeId = '';\n /**\n * What a MARKED image shows WHENEVER it has no source (design-system DS3) — set by each renderer\n * from the shared `emptyImagePlaceholder` (`@vectoriox/iox-ui/design-core`): the \"Add image\" label\n * on the canvas, the blank on the live site, `null` for an unmarked image, which therefore renders\n * as before. It does not depend on `src`, so clearing the source (a binding emptied, a context slot\n * not yet filled) shows it with no re-render; a renderer re-sets it only when the MARKER changes.\n */\n @Input() emptySrc: string | null = null;\n\n /**\n * The `src` attribute value, or `null` to OMIT the attribute entirely when there is no image.\n *\n * `src=\"\"` is not \"no image\": the browser resolves the empty string against the document URL and\n * re-requests the PAGE itself as an image — a broken-image icon plus a wasted round trip. Angular\n * removes an attribute bound to `null`, which is the only way to render a genuinely src-less img.\n *\n * An empty src is a normal state, not a mistake: a context slot starts empty on purpose and is\n * filled when the visitor interacts (see element-context-state-plan.md).\n */\n get srcAttr(): string | null {\n return this.src || this.emptySrc || null;\n }\n\n private get showsPlaceholder(): boolean {\n return !this.src && !!this.emptySrc;\n }\n\n /** `data-iox-empty` while the placeholder stands in — the hook the shared fill rule keys on. */\n get emptyAttr(): '' | null {\n return this.showsPlaceholder ? '' : null;\n }\n\n /**\n * The placeholder is not the author's picture, so it never carries the author's alt: it is\n * decorative (`alt=\"\"`) and hidden from assistive technology — on the live site, in Preview and on\n * the canvas alike (the canvas label is painted inside the placeholder, not announced as content).\n */\n get altAttr(): string {\n return this.showsPlaceholder ? '' : this.alt;\n }\n\n get ariaHiddenAttr(): 'true' | null {\n return this.showsPlaceholder ? 'true' : null;\n }\n}\n","import { Component, Input } from '@angular/core';\n\n/** Directive-host spacer: the `<div>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'div[iox-spacer]',\n template: '',\n host: { '[class]': \"'iox-spacer iox-node-' + nodeId\" },\n styles: [':host { display: block; flex-shrink: 0; }'],\n standalone: false,\n})\nexport class BuilderSpacerComponent {\n @Input() nodeId = '';\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-card',\n template: `\n <div class=\"card\" [ngClass]=\"'iox-node-' + nodeId\">\n <div class=\"image-wrapper\">\n <img [src]=\"image\" alt=\"Card image\" class=\"card-img\">\n </div>\n <h2>{{ title }}</h2>\n <p>{{ description }}</p>\n </div>\n `,\n // Legacy Card (hidden, deprecated). Its inner title/image are not nodes and keep their pre-DS2\n // literals — the contract defines no token for them, and component CSS may reference only\n // spec tokens (§3b-bis). The box itself wears the `card` element style.\n styles: [\n '.image-wrapper { width: 100%; aspect-ratio: 1/1; overflow: hidden; margin-bottom: 0.75rem; }',\n '.card-img { width: 100%; height: 100%; object-fit: cover; }',\n 'h2 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }',\n 'p { margin: 0; }',\n ],\n standalone: false,\n})\nexport class CardComponent {\n @Input() title: string = '';\n @Input() image: string = '';\n @Input() description: string = '';\n @Input() nodeId: string = '';\n}\n","import { Component, Input } from '@angular/core';\n\n/** Directive-host divider: the `<div>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'div[iox-divider]',\n template: '',\n host: { '[class]': \"'iox-divider iox-node-' + nodeId\" },\n styles: [':host { display: block; box-sizing: border-box; }'],\n standalone: false,\n})\nexport class BuilderDividerComponent {\n @Input() nodeId = '';\n}\n","/**\n * Phosphor's CSS needs TWO classes — a weight and a name (`.ph-thin.ph-house:before`). A class\n * string carrying only the name matches nothing at all: no `font-family`, no glyph, so the element\n * renders as an invisible, zero-glyph box.\n *\n * The icon picker used to emit exactly that (`ph-house`), so every icon chosen through it was blank\n * on the canvas, in the picker grid and on the live site. Fixing the picker alone would leave every\n * icon already saved broken, so the repair happens at RENDER time, here, and is shared by the\n * builder's Icon component and the SSR engine's renderer.\n *\n * Everything that is not a weightless Phosphor class passes through untouched — Iconoir\n * (`iconoir-home`), custom icon-set fonts, Font Awesome, and Phosphor strings that already carry a\n * weight.\n *\n * See iox-ai-guidance `architecture/cms/custom-icon-fonts.md`.\n */\n\n/** The weight classes Phosphor ships. `ph` is the regular weight. */\nconst PHOSPHOR_WEIGHTS = new Set(['ph', 'ph-thin', 'ph-light', 'ph-regular', 'ph-bold', 'ph-fill', 'ph-duotone']);\n\n/** The weight assumed when a Phosphor class has none — the weight this platform uses everywhere. */\nexport const DEFAULT_PHOSPHOR_WEIGHT = 'ph-thin';\n\nexport function normalizeIconClass(iconClass: string | null | undefined): string {\n const raw = (iconClass ?? '').trim();\n if (!raw) return '';\n\n const tokens = raw.split(/\\s+/);\n const hasWeight = tokens.some(token => PHOSPHOR_WEIGHTS.has(token));\n if (hasWeight) return tokens.join(' ');\n\n // `ph-` prefixed but weightless — the broken shape. A token that is only `ph-` is not a name.\n const hasPhosphorName = tokens.some(token => token.startsWith('ph-') && token.length > 3);\n if (!hasPhosphorName) return tokens.join(' ');\n\n return [DEFAULT_PHOSPHOR_WEIGHT, ...tokens].join(' ');\n}\n","import { Component, Input } from '@angular/core';\n\nimport { normalizeIconClass } from '../../icons/normalize-icon-class';\n\n/** Directive-host icon: the `<i>` IS the host — no wrapper. All styles on `.iox-node`. */\n@Component({\n selector: 'i[iox-icon]',\n template: '',\n host: { '[class]': \"normalizedIconClass + ' iox-node-' + nodeId\" },\n // display:inline-flex — the glyph (a font `::before`) becomes a flex item, so the `<i>` box\n // shrink-wraps it and grows with `font-size`. Phosphor forces this on its own class\n // (`[class^=\"ph-\"]{display:inline-flex}`); generated (fantasticon) fonts style only `::before`,\n // so WITHOUT this an `<i>` on a generated font falls back to `display:block; line-height:0` where\n // the glyph OVERFLOWS a collapsed box and never expands its parent (e.g. a ButtonBlock).\n // line-height:0 — an icon is a glyph and must contribute no line-box height of its own (spacing\n // comes from padding/margin). This host style takes precedence over the node's `.iox-node-{id}`\n // rule, so it MUST stay in sync with the Icon branch of renderDefaultDeclarations in the shared\n // style-compiler; if they disagree, this one wins wherever real components are instantiated\n // (builder canvas + the engine's component renderer) and the two renderers silently diverge.\n styles: [':host { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }'],\n standalone: false,\n})\nexport class BuilderIconComponent {\n /** Full Phosphor icon CSS class string, e.g. \"ph-thin ph-star\" */\n @Input() iconClass = 'ph-thin ph-star';\n @Input() nodeId = '';\n\n /**\n * Repaired at render time: a Phosphor class saved without its weight (`ph-house`) matches no CSS\n * rule and renders as an invisible box. The picker used to emit exactly that, so this keeps\n * every already-saved icon working. Shared with the SSR engine — see `normalizeIconClass`.\n */\n get normalizedIconClass(): string {\n return normalizeIconClass(this.iconClass);\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { IS_PREVIEW } from '../builder-tokens';\n\n/**\n * Directive-host link: the `<a>` IS the host — no wrapper. Content is the label; styles come from\n * `.iox-node` (the legacy `style` input is kept for builder compat but no longer inline-applied).\n *\n * Outside a preview (`IS_PREVIEW` unprovided — the editing canvas, the design sampler) the link keeps\n * its real `href` so it LOOKS like the live site's (the UA link styles key on it) and stays clickable\n * so the canvas can select it, but no click navigates: plain, modified (cmd/ctrl/shift) and middle\n * clicks all have their default cancelled here.\n */\n@Component({\n selector: 'a[iox-link]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': 'resolvedHref',\n '[attr.target]': 'target',\n '[class]': \"'builder-link iox-node-' + nodeId\",\n '(click)': 'onLinkClick($event)',\n '(auxclick)': 'onLinkClick($event)',\n },\n // `color: inherit` is the PRE-DS2 look and applies only to a Link wearing no element style (the\n // marker, §3b-bis): a scoped :host colour out-ranks the node rule, so on a Link wearing `link`\n // it silently beat the style's colour (DS2 e2e) — and dropping it for every Link restyled saved\n // pre-DS2 links (DS2 verification). `:where()` keeps the pre-DS2 specificity.\n styles: [`:host { display: inline; cursor: pointer; } :host:where(:not(.iox-es)) { color: inherit; }`],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderLinkComponent {\n @Input() nodeId: string = '';\n @Input() label = 'Click here';\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n @Input() style: { [key: string]: any } = {};\n\n constructor(@Optional() @Inject(IS_PREVIEW) public isPreview: boolean) {}\n\n get resolvedHref(): string {\n if (this.linkType !== 'page') return this.url || '#';\n return this.pageRoute || '#';\n }\n\n onLinkClick(event: MouseEvent): void {\n if (!this.isPreview) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host button: the `<a>` IS the host — no wrapper. Content is the label; styling comes\n * from `:host` variants + `.iox-node`.\n */\n@Component({\n selector: 'a[iox-button]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': 'link',\n '[class]': \"'builder-btn variant-' + variant + ' iox-node-' + nodeId\",\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n styles: [`\n /* Legacy Button (hidden from the palette since DS2 — ButtonBlock is \"Button\"). Its look is\n the PRE-DS2 literals, and applies ONLY to a node that wears no element style (the\n element-style marker, design-system §3b-bis): a saved legacy Button renders exactly as it\n did whatever tokens the org holds, and a Button wearing button-primary/-secondary/-ghost\n takes its look from its node rule alone — the variant selectors used to out-rank it.\n \\`:where()\\` keeps each rule at its pre-DS2 specificity. */\n :host {\n display: inline-block;\n cursor: pointer;\n text-align: center;\n }\n :host:where(:not(.iox-es)) {\n padding: 0.6rem 1.5rem;\n border-radius: 6px;\n font-size: 0.9rem;\n text-decoration: none;\n transition: opacity 0.15s;\n }\n :host.variant-primary:where(:not(.iox-es)) { background: #cb9090; color: #fff; border: 1px solid #cb9090; }\n :host.variant-outlined:where(:not(.iox-es)) { background: transparent; color: #cb9090; border: 1px solid #cb9090; }\n :host.variant-text:where(:not(.iox-es)) { background: transparent; color: #cb9090; border: 1px solid transparent; }\n :host[contenteditable] { outline: 2px solid #cb9090; cursor: text; }\n `],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderButtonComponent implements OnInit {\n @Input() label = 'Click me';\n @Input() link = '#';\n @Input() variant: 'primary' | 'outlined' | 'text' = 'primary';\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n\n public editing = false;\n\n constructor(@Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null) {}\n\n ngOnInit(): void {}\n\n startEdit(event: MouseEvent): void {\n if (this.isBound('label')) return;\n event.preventDefault();\n event.stopPropagation();\n this.editing = true;\n setTimeout(() => (event.target as HTMLElement).focus());\n }\n\n commitEdit(event: FocusEvent): void {\n if (!this.editing) return;\n this.editing = false;\n const newValue = (event.target as HTMLElement).innerText.trim();\n this.label = newValue;\n this.syncTraitToPanel('label', newValue);\n }\n\n onKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n }\n if (event.key === 'Escape') {\n this.editing = false;\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null });\n }\n}\n","/**\n * Where a node links (W1.1). Link and LinkedContainer always had two link types — an external URL or a\n * website PAGE by its route — and ButtonBlock now has the same pair, so a composed \"Get in touch\" button\n * is a page link the builder shows as `/contact`, not a hand-built URL. Framework-free: the composer\n * (generation-core) writes it, the builder canvas and both engine render paths read it.\n */\n\nexport enum LinkType {\n /** Links nowhere — a Heading's default; \"Link the whole card\" (Card v2) turns its title's link on. */\n None = 'none',\n External = 'external',\n Page = 'page',\n}\n\nexport interface ButtonBlockLinkProps {\n tag?: unknown;\n linkType?: unknown;\n href?: unknown;\n pageRoute?: unknown;\n}\n\nconst ANCHOR_TAG = 'a';\n\n/**\n * The href a ButtonBlock renders, or `null` for none (it is a `<button>`, or a link with no target).\n * Only an `<a>` links. A page link's route goes through `pageHref` — the engine's `resolvePageHref`\n * (`:params` substituted, base-relative); the builder canvas passes none and shows the route as authored,\n * as its Link does.\n */\nexport function buttonBlockHref(props: ButtonBlockLinkProps, pageHref: (route: string) => string = route => route): string | null {\n if (props.tag !== ANCHOR_TAG) return null;\n const href = props.linkType === LinkType.Page ? pageHref(String(props.pageRoute ?? '')) : String(props.href ?? '');\n return href || null;\n}\n\nexport interface NodeLinkProps {\n linkType?: unknown;\n url?: unknown;\n pageRoute?: unknown;\n}\n\n/** The class of the `<a>` a linked Heading renders — the Card v2 stretched link keys on it (iox-design.css:\n * the card is the click target, its buttons sit above, the focus ring is drawn on the card). */\nexport const CARD_LINK_CLASS = 'iox-card-link';\n/** On the editing canvas the anchor carries this, so the stretched `::after` is off and every part of the\n * card stays clickable (board 8). */\nexport const CANVAS_LINK_ATTRIBUTE = 'data-iox-canvas';\n\n/**\n * The href a linked Heading renders (Card v2: the card's title IS its link), or `null` when it links\n * nowhere — `none`, or a link with no target yet (the title then renders as plain words). A page link goes\n * through `pageHref` exactly as a ButtonBlock's does.\n */\nexport function headingHref(props: NodeLinkProps, pageHref: (route: string) => string = route => route): string | null {\n if (props.linkType === LinkType.Page) {\n const route = String(props.pageRoute ?? '');\n return route ? pageHref(route) || null : null;\n }\n if (props.linkType === LinkType.External) return String(props.url ?? '').trim() || null;\n return null;\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { CARD_LINK_CLASS, headingHref, LinkType } from '../../../design-core/node-links';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS, IS_PREVIEW } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host Heading: the real `<h1>`…`<h6>` IS the host — no `app-builder-heading`\n * wrapper, no inner/outer split. The tag is chosen by whoever CREATES the component\n * (engine: `createComponent({ hostElement: document.createElement(level) })`; builder:\n * RenderDirective does the same), NOT by an internal ngSwitch. `level` is kept as an input\n * for that creation logic + serialization. Editing (contenteditable) runs in the builder only.\n *\n * A Heading may LINK (Card v2, \"Link the whole card\"): its words then render inside ONE `<a>` — the\n * card's title is its link, so the link's name is the title. The shared CSS stretches it over the card\n * (iox-design.css). On the editing canvas the anchor never navigates and carries `data-iox-canvas`, so\n * the stretch is off and every part of the card stays clickable; a click still selects the heading.\n */\n@Component({\n // `span`: an Accordion's question sits INSIDE its header's <button> (CC2) — phrasing content only; the\n // outline level is the <hN> the header renders around the button (composite-core accordionHeadingLevel).\n selector: 'h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading],span[iox-heading]',\n template: `@if (href) {<a [class]=\"linkClass\" [attr.href]=\"href\" [attr.target]=\"linkTarget\" [attr.rel]=\"linkRel\"\n [attr.data-iox-canvas]=\"isPreview ? null : ''\" (click)=\"onLinkClick($event)\" (auxclick)=\"onLinkClick($event)\">{{ content }}</a>} @else {<ng-container>{{ content }}</ng-container>}`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(mousedown)': 'onMouseDown($event)',\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n // No display/position/color in :host (they'd out-specify styleProps `.iox-node`). Heading tags\n // are block by default; only the editing affordances. The node's own rule holds the margin.\n styles: [`:host[contenteditable] { outline: none; cursor: text; }`],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuilderHeadingComponent implements OnInit {\n @Input() content = 'Heading';\n @Input() level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' = 'h2';\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n @Input() linkType: LinkType = LinkType.None;\n @Input() url = '';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n public editing = false;\n public readonly linkClass = CARD_LINK_CLASS;\n\n constructor(\n @Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean | null,\n ) {}\n\n /** Where the heading links, or null (plain words). The engine hands `pageRoute` in already resolved;\n * the canvas shows the route as authored, as its Link does. */\n get href(): string | null {\n return headingHref({ linkType: this.linkType, url: this.url, pageRoute: this.pageRoute });\n }\n\n get linkTarget(): string | null {\n return this.target && this.target !== '_self' ? this.target : null;\n }\n\n get linkRel(): string | null {\n return this.target === '_blank' ? 'noopener' : null;\n }\n\n /** On the editing canvas a link never navigates (plain, modified and middle clicks); the click still\n * bubbles to the heading, which is what selects it. */\n onLinkClick(event: MouseEvent): void {\n if (!this.isPreview) event.preventDefault();\n }\n\n ngOnInit(): void {}\n\n onMouseDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n startEdit(event: Event): void {\n if (this.isBound('content')) return;\n event.stopPropagation();\n this.editing = true;\n this.cdr.detectChanges();\n this.cdr.detach();\n const el = event.target as HTMLElement;\n setTimeout(() => { el.focus(); });\n }\n\n commitEdit(event: FocusEvent): void {\n if (!this.editing) return;\n this.editing = false;\n const newValue = (event.target as HTMLElement).innerText;\n this.content = newValue;\n this.cdr.reattach();\n this.syncTraitToPanel('content', newValue);\n }\n\n onKeyDown(event: Event): void {\n const ke = event as KeyboardEvent;\n if (ke.key === 'Enter' && !ke.shiftKey) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n }\n if (ke.key === 'Escape') {\n this.editing = false;\n this.cdr.reattach();\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });\n }\n}\n","import { ChangeDetectorRef, Component, Inject, Input, OnInit, Optional } from '@angular/core';\nimport { IBuilderEventEmitter, IOX_BUILDER_EVENTS } from '../builder-tokens';\n\ninterface EditableNode {\n bindings?: Array<{ prop: string }>;\n traits?: Array<{ name: string; default: any }>;\n}\n\n/**\n * Directive-host Text: the real `<p>`/`<span>` IS the host — no `app-text-block` wrapper,\n * no inner/outer split. The tag is chosen by whoever CREATES the component (engine/builder\n * pass `hostElement`), NOT an internal ngSwitch. Content is rich HTML (Quill) → bound via\n * `[innerHTML]` on the host. Editing (contenteditable) runs in the builder only.\n */\n@Component({\n selector: 'p[iox-text],span[iox-text]',\n template: ``,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[innerHTML]': 'content',\n '[attr.contenteditable]': \"editing ? 'true' : null\",\n '(pointerdown)': 'onPointerDown($event)',\n '(mousedown)': 'onMouseDown($event)',\n '(dblclick)': 'startEdit($event)',\n '(blur)': 'commitEdit($event)',\n '(keydown)': 'onKeyDown($event)',\n '(paste)': 'onPaste($event)',\n },\n // No display/position/color/margin in :host: it ties with the node rule and, coming later, wins.\n styles: [`:host { white-space: pre-wrap; } :host[contenteditable] { outline: none; cursor: text; }`],\n standalone: false,\n})\nexport class TextBlockComponent implements OnInit {\n @Input() content = 'Enter text here';\n @Input() tag: 'p' | 'span' = 'p';\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() node: EditableNode | null = null;\n\n public editing = false;\n\n constructor(\n @Optional() @Inject(IOX_BUILDER_EVENTS) private events: IBuilderEventEmitter | null,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {}\n\n onPointerDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n onMouseDown(event: Event): void {\n if (this.editing) { event.stopPropagation(); }\n }\n\n startEdit(event: Event): void {\n if (this.isBound('content')) return;\n event.stopPropagation();\n this.editing = true;\n this.cdr.detectChanges();\n this.cdr.detach();\n const el = event.target as HTMLElement;\n el.closest('[data-iox-draggable]')?.setAttribute('data-editing', '');\n setTimeout(() => { el.focus(); });\n }\n\n onPaste(event: Event): void {\n event.preventDefault();\n const plain = (event as ClipboardEvent).clipboardData?.getData('text/plain') ?? '';\n // Insert as plain text so no inline styles from clipboard survive\n document.execCommand('insertText', false, plain);\n }\n\n commitEdit(event: Event): void {\n if (!this.editing) return;\n this.editing = false;\n const el = event.target as HTMLElement;\n el.closest('[data-iox-draggable]')?.removeAttribute('data-editing');\n const newValue = el.innerText;\n this.content = newValue;\n // Explicitly reset to plain text so any pasted HTML nodes are gone\n // before Angular re-renders [innerHTML]\n el.textContent = newValue;\n this.cdr.reattach();\n this.syncTraitToPanel('content', newValue);\n }\n\n onKeyDown(event: Event): void {\n if ((event as KeyboardEvent).key === 'Escape') {\n this.editing = false;\n this.cdr.reattach();\n (event.target as HTMLElement).blur();\n }\n event.stopPropagation();\n }\n\n private isBound(prop: string): boolean {\n return (this.node?.bindings || []).some(b => b.prop === prop);\n }\n\n private syncTraitToPanel(prop: string, value: string): void {\n if (!this.node || !this.events) return;\n const trait = (this.node.traits || []).find(t => t.name === prop);\n if (trait) { trait.default = value; }\n this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/** Directive-host section: the `<section>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'section[iox-section]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host (they'd out-specify styleProps). <section> is block by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class SectionComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * The tags a Container may render as (its `htmlTag` trait) — the builder canvas's list. The engine's\n * string renderer and component path both pick from THIS list, so a Navigation bar is a `<nav>` on\n * the live site exactly as on the canvas.\n */\nexport const CONTAINER_HTML_TAGS: ReadonlyArray<string> = ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'];\n\n/** `htmlTag` when it is an allowed Container tag, else `div`. */\nexport function containerHtmlTag(htmlTag: unknown): string {\n return CONTAINER_HTML_TAGS.includes(String(htmlTag)) ? String(htmlTag) : 'div';\n}\n\n/** Directive-host container: the host element IS the container — no wrapper, no inner/outer split.\n * Variable tag: the engine creates it on an explicit `hostElement` of `containerHtmlTag(htmlTag)`. */\n@Component({\n selector: 'div[iox-container],section[iox-container],article[iox-container],header[iox-container],footer[iox-container],main[iox-container],nav[iox-container],ul[iox-container],ol[iox-container],li[iox-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host — they'd out-specify styleProps (`.iox-node`). A <div> is block\n // by default; the engine supplies position:relative as a render-default (styleProps overrides).\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ContainerComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, ElementRef, Inject, Input, OnDestroy, OnInit, Optional, ViewChild, ViewContainerRef } from '@angular/core';\nimport { IS_PREVIEW } from '../builder-tokens';\n\n/** `click` covers plain and modified clicks; a middle click opens a tab through `auxclick` alone. */\nconst NAVIGATING_CLICKS = ['click', 'auxclick'] as const;\n\n/**\n * Directive-host linked container: the `<a>` IS the host — no wrapper, no inner/outer split. An Accordion's\n * HEADER (CC2, role `accordion.trigger`) is created on a `<button>` instead — a button that opens its item,\n * never a link; the engine puts it inside the `<hN>` its question's level names.\n */\n@Component({\n selector: 'a[iox-linked-container],button[iox-linked-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[attr.href]': 'isButton ? null : resolvedHref',\n '[attr.target]': 'isButton ? null : target',\n '[attr.type]': \"isButton ? 'button' : null\",\n '[class]': \"'linked-container-root iox-node-' + nodeId + (isButton ? ' iox-accordion-button' : '')\",\n },\n // No display/position/color in :host (they'd out-specify styleProps). An <a> is inline by\n // default, so the engine supplies display:block + position:relative as render-defaults.\n styles: [`:host { box-sizing: border-box; text-decoration: none; cursor: pointer; }`],\n standalone: false,\n})\nexport class LinkedContainerComponent implements OnInit, OnDestroy {\n @Input() nodeId = '';\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n private capturePreventDefault = (e: MouseEvent) => e.preventDefault();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n @Optional() @Inject(IS_PREVIEW) private isPreview: boolean,\n ) {}\n\n ngOnInit(): void {\n if (!this.isPreview && !this.isButton) {\n for (const type of NAVIGATING_CLICKS) this.elRef.nativeElement.addEventListener(type, this.capturePreventDefault, true);\n }\n }\n\n ngOnDestroy(): void {\n if (!this.isPreview && !this.isButton) {\n for (const type of NAVIGATING_CLICKS) this.elRef.nativeElement.removeEventListener(type, this.capturePreventDefault, true);\n }\n }\n\n /** True when created on a <button> (an Accordion header) — it never navigates. */\n get isButton(): boolean {\n return this.elRef.nativeElement.tagName === 'BUTTON';\n }\n\n get resolvedHref(): string {\n if (this.linkType !== 'page') return this.url || '#';\n return this.pageRoute || '#';\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Client-engine repeater shell. Data fetching and item expansion are handled\n * by DataSourceResolverService + BindingApplicatorService in the PageResolver\n * before this component is rendered. ClientRenderDirective inserts one child\n * per resolved item into childrenHost.\n */\n@Component({\n selector: 'iox-repeater',\n template: `\n <div class=\"repeater-root\" [ngClass]=\"['iox-node-' + nodeId]\">\n <ng-container #childrenHost></ng-container>\n </div>\n `,\n styles: [`.repeater-root { position: relative; box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientRepeaterComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport { buttonBlockHref, LinkType } from '../../../design-core/node-links';\n\n/**\n * Directive-host ButtonBlock: the real `<a>`/`<button>` IS the host — no `app-button-block`\n * wrapper, no inner/outer split. The tag is chosen by whoever CREATES the component (engine\n * passes `hostElement`: `<a>` when `tag==='a'`, else `<button>`), NOT an internal `*ngIf`.\n * The `iox-btn-block` class (UA resets: inline-flex, color/font inherit, no border) matches the\n * string renderer and lives in the engine's global styles.scss — kept OFF `:host` so styleProps\n * (`.iox-node-{id}`) can override it. Children render into the host via `childrenHost`.\n * A page link (`linkType: page`) arrives with its `pageRoute` already resolved by the engine (params\n * substituted, base-relative — the Link's resolver); `buttonBlockHref` decides the href for every renderer.\n */\n@Component({\n selector: 'a[iox-button-block],button[iox-button-block]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-btn-block iox-node-' + nodeId\",\n '[attr.href]': 'resolvedHref',\n '[attr.target]': \"tag === 'a' ? (target || null) : null\",\n '[attr.type]': \"tag === 'a' ? null : type\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ButtonBlockComponent {\n @Input() tag: 'button' | 'a' = 'button';\n @Input() linkType: LinkType = LinkType.External;\n @Input() href = '';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' = '_self';\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n get resolvedHref(): string | null {\n return buttonBlockHref(this);\n }\n}\n","// Virtual trait → composed CSS property helpers.\n//\n// Several style traits are \"virtual\" — they don't map 1:1 to a CSS property but\n// are components of a multi-function CSS value. composeVirtualTraits() strips\n// these virtual keys from the style map and replaces them with the correctly\n// composed CSS properties (filter, backdrop-filter, transform, transition).\n//\n// SHARED (iox-ui): consumed by BOTH the builder (render.directive + style panel)\n// and the SSR engine (LayoutRendererService). It MUST live here, not in iox-builder,\n// because the engine does not depend on iox-builder — without it the engine emitted\n// the raw virtual keys (`translate-x`, `filter-blur`, `scale-x`…) as invalid CSS.\n// Run this BEFORE compileDeclarations so the CSS output is identical on both sides.\n\n// ─── Filter ──────────────────────────────────────────────────────────────────\n\nconst FILTER_FUNS: [trait: string, fn: string, def: string][] = [\n ['filterBlur', 'blur', '0px'],\n ['filterBrightness', 'brightness', '1'],\n ['filterContrast', 'contrast', '1'],\n ['filterGrayscale', 'grayscale', '0'],\n ['filterSaturate', 'saturate', '1'],\n ['filterHueRotate', 'hue-rotate', '0deg'],\n ['filterSepia', 'sepia', '0'],\n ['filterInvert', 'invert', '0'],\n];\n\n// ─── Backdrop-filter ─────────────────────────────────────────────────────────\n\nconst BACKDROP_FUNS: [trait: string, fn: string, def: string][] = [\n ['backdropBlur', 'blur', '0px'],\n ['backdropBrightness', 'brightness', '1'],\n ['backdropContrast', 'contrast', '1'],\n ['backdropSaturate', 'saturate', '1'],\n];\n\n// ─── Transform ───────────────────────────────────────────────────────────────\n\nconst TRANSFORM_FUNS: [trait: string, fn: string, def: string][] = [\n ['translateX', 'translateX', '0px'],\n ['translateY', 'translateY', '0px'],\n ['scaleX', 'scaleX', '1'],\n ['scaleY', 'scaleY', '1'],\n ['rotate', 'rotate', '0deg'],\n ['skewX', 'skewX', '0deg'],\n ['skewY', 'skewY', '0deg'],\n];\n\n// ─── ::marker pseudo-element ─────────────────────────────────────────────────\n\nconst MARKER_FUNS: [trait: string, cssProp: string][] = [\n ['markerColor', 'color'],\n ['markerFontSize', 'fontSize'],\n];\n\n// ─── Groups: which virtual traits compose into which output property ─────────\n\n/**\n * One composed output property and the virtual traits it is built from.\n *\n * Consumers that emit a PARTIAL override (a breakpoint layer — see `responsive.ts`) need\n * to know which outputs an override actually touches, and what to emit when a touched\n * group composes to nothing (e.g. translateX reset to 0px while the base had 20px: the\n * override must say `transform: none`, or the wider rule's transform silently wins).\n */\nexport interface VirtualTraitGroup {\n /** The composed key `composeVirtualTraits` writes (camelCase, or `__markerStyles`). */\n readonly output: string;\n /** The virtual trait keys that feed it. */\n readonly keys: readonly string[];\n /** Value that cancels a wider rule's output, or `null` when there is no such value\n * (`::marker` styles are a nested map, not a single cancellable property). */\n readonly reset: string | null;\n}\n\nconst TRANSITION_KEYS = ['transitionDuration', 'transitionTimingFunction', 'transitionDelay', 'transitionProperty'] as const;\n\n/** The Transition ▸ Properties trait (G2): what a transition names, comma-separated. Unset, the renderers fill in the\n * properties the node's states change (`withStateTransitions`); a transition never names `all` unless an author\n * typed it. */\nexport const TRANSITION_PROPERTY_KEY = 'transitionProperty';\n\n/** The property list a `transitionProperty` value names (`color, transform` → two entries). */\nexport function transitionPropertyList(value: unknown): string[] {\n return String(value ?? '').split(',').map(p => p.trim()).filter(Boolean);\n}\n\n// ─── Max lines (line clamp) ─────────────────────────────────────────────────────\n\n/** \"Max lines\" (Card v2, board 8 — opt-in on a Title / Text): a whole number clamps the text to that many\n * lines with an ellipsis. It composes into the four declarations a line clamp takes; anything else\n * (`none`, empty, 0) clamps nothing. */\nexport const MAX_LINES_KEY = 'maxLines';\nconst LINE_CLAMP_OUTPUT = 'WebkitLineClamp';\n\nfunction lineClamp(value: unknown): number | null {\n const n = Number(String(value ?? '').trim());\n return Number.isInteger(n) && n > 0 ? n : null;\n}\n\n// ─── Text direction ──────────────────────────────────────────────────────────────\n\n/** The Text Direction trait: `ltr` / `rtl` is the author's choice, unset (or empty) follows the\n * parent — `direction` is inherited, so a node with no direction of its own follows an RTL section\n * or `<html dir=\"rtl\">` (vectoriox/iox-ui#14). */\nexport const TEXT_DIRECTION_KEY = 'textDirection';\n/** Where the trait used to live. Until iox-ui#14 its default `ltr` was serialised onto EVERY node,\n * so a stored `direction: ltr` in a node's own styleProps records no choice and compiles nothing;\n * a stored `rtl` was always chosen and still compiles. In a sparse layer (a state, a breakpoint)\n * only an edit is stored, so there `ltr` too is the author's. */\nexport const LEGACY_DIRECTION_KEY = 'direction';\nconst LEGACY_DEFAULT_DIRECTION = 'ltr';\nconst DIRECTION_OUTPUT = 'direction';\n\nconst isSet = (v: unknown): boolean => v !== undefined && v !== null;\n\nfunction composeDirection(raw: Record<string, any>, base: Record<string, any>): string | undefined {\n if (isSet(raw[TEXT_DIRECTION_KEY])) return raw[TEXT_DIRECTION_KEY] || undefined;\n if (raw !== base && isSet(raw[LEGACY_DIRECTION_KEY])) return raw[LEGACY_DIRECTION_KEY] || undefined;\n if (isSet(base[TEXT_DIRECTION_KEY])) return base[TEXT_DIRECTION_KEY] || undefined;\n const legacy = base[LEGACY_DIRECTION_KEY];\n return legacy && legacy !== LEGACY_DEFAULT_DIRECTION ? legacy : undefined;\n}\n\n/**\n * A saved node's own style map with its legacy `direction` moved onto the Text Direction trait —\n * `rtl` carried over, the serialised default `ltr` released — so the builder's panel shows what the\n * node renders. Pure; returns the map unchanged (same reference) when there is nothing to move.\n */\nexport function migrateLegacyDirection(styleProps: Record<string, any>): Record<string, any> {\n if (!styleProps || !(LEGACY_DIRECTION_KEY in styleProps)) return styleProps;\n const { [LEGACY_DIRECTION_KEY]: legacy, ...rest } = styleProps;\n if (!isSet(rest[TEXT_DIRECTION_KEY]) && legacy && legacy !== LEGACY_DEFAULT_DIRECTION) rest[TEXT_DIRECTION_KEY] = legacy;\n return rest;\n}\n\n// ─── Text alignment ──────────────────────────────────────────────────────────────\n\n/** The Align trait's values: LOGICAL, so a text starts at the inline start of whatever direction it\n * reads in — the left in LTR, the right in RTL (vectoriox/iox-ui#16). */\nexport enum TextAlign {\n Start = 'start',\n Center = 'center',\n End = 'end',\n Justify = 'justify',\n}\nexport const TEXT_ALIGN_KEY = 'textAlign';\n/** Until iox-ui#16 the trait's default was the PHYSICAL `left`, serialised onto every node — so in a\n * node's own styleProps a stored `left` records no choice (the old panel showed Left already selected)\n * and compiles as `start`: identical in LTR, where it still overrides a centred parent as `left` did,\n * and the right edge in RTL. In a sparse layer (a state, a breakpoint) only an edit is stored, so there\n * `left` is the author's and stays physical. `right`, `center` and `justify` were always chosen. */\nconst LEGACY_DEFAULT_TEXT_ALIGN = 'left';\n\nconst isLegacyDefaultAlign = (v: unknown): boolean => typeof v === 'string' && v.trim().toLowerCase() === LEGACY_DEFAULT_TEXT_ALIGN;\n\n/**\n * A saved node's own style map with the serialised default `textAlign: left` read as the logical\n * `start` it compiles to — so the builder's panel highlights Start, and the next save stores it.\n * Pure; returns the map unchanged (same reference) when there is nothing to move.\n */\nexport function migrateLegacyTextAlign(styleProps: Record<string, any>): Record<string, any> {\n if (!styleProps || !isLegacyDefaultAlign(styleProps[TEXT_ALIGN_KEY])) return styleProps;\n return { ...styleProps, [TEXT_ALIGN_KEY]: TextAlign.Start };\n}\n\n// ─── Gradient backgrounds ──────────────────────────────────────────────────────\n\n/** A Background value that is a gradient (the colour control offers one; the `media-scrim` element style\n * writes one). `background-color` cannot hold an image, so it composes into `background-image`. */\nconst GRADIENT_VALUE = /(^|[\\s,(])(repeating-)?(linear|radial|conic)-gradient\\(/i;\nexport function isGradientPaint(value: unknown): boolean {\n return typeof value === 'string' && GRADIENT_VALUE.test(value);\n}\n\n/** The whole-value backdrop trait (DS2). A plain key — it is copied, not stripped — but it feeds\n * the backdrop group's output, so a breakpoint layer that sets it must count as touching it. */\nexport const BACKDROP_WHOLE_KEY = 'backdropFilter';\n/** The prefixed twin emitted beside every composed `backdropFilter` (Safari). */\nexport const BACKDROP_TWIN_KEY = 'WebkitBackdropFilter';\n\nexport const VIRTUAL_TRAIT_GROUPS: readonly VirtualTraitGroup[] = Object.freeze([\n { output: 'filter', keys: FILTER_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'backdropFilter', keys: BACKDROP_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'transform', keys: TRANSFORM_FUNS.map(([t]) => t), reset: 'none' },\n { output: 'transition', keys: [...TRANSITION_KEYS], reset: 'none' },\n { output: '__markerStyles', keys: MARKER_FUNS.map(([t]) => t), reset: null },\n { output: LINE_CLAMP_OUTPUT, keys: [MAX_LINES_KEY], reset: 'none' },\n // A breakpoint that clears the direction follows the parent again.\n { output: DIRECTION_OUTPUT, keys: [TEXT_DIRECTION_KEY, LEGACY_DIRECTION_KEY], reset: 'inherit' },\n]);\n\n// ─── All virtual trait names ──────────────────────────────────────────────────\n\n/** Every virtual trait key — derived from the groups so there is one list to maintain. */\nexport const VIRTUAL_TRAIT_KEYS = new Set<string>(VIRTUAL_TRAIT_GROUPS.flatMap(g => g.keys));\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\nfunction buildFns(\n funs: [string, string, string][],\n src: Record<string, any>,\n): string {\n return funs\n .filter(([t,, d]) => src[t] != null && src[t] !== '' && src[t] !== d)\n .map(([t, fn]) => `${fn}(${src[t]})`)\n .join(' ');\n}\n\n// ─── Public API ───────────────────────────────────────────────────────────────\n\n/** True when the whole-value `backdropFilter` trait is SET — it then wins over the composed\n * backdrop* controls (`none` / empty is its unset value). The Style panel hides those controls on\n * exactly this condition, so what the panel shows live is what the compiler emits. */\nexport function isWholeBackdropSet(value: unknown): boolean {\n return typeof value === 'string' && value.trim() !== '' && value.trim() !== 'none';\n}\n\n/** The part controls are 0–3 factor sliders: `140%` reads as `1.4`. */\nconst asFactor = (arg: string): string =>\n arg.endsWith('%') ? String(Math.round(parseFloat(arg) * 100) / 10000) : arg;\n\nconst BACKDROP_FN = /^([a-z-]+)\\(([^()]*)\\)$/;\n\n/**\n * The inverse of the backdrop composition: a resolved whole value (`blur(16px) saturate(1.4)`) →\n * the composed traits, every one of the group present (its default when absent; `140%` → `1.4` for\n * the factor sliders), so Detach can hand\n * a token's look back to the part controls. `none` / empty → all defaults. A value using anything\n * the group cannot express (another function, a `var()`, a percentage-free form it cannot read)\n * → null: the caller keeps it whole rather than silently dropping part of the look.\n */\nexport function decomposeBackdropFilter(value: string | null | undefined): Record<string, string> | null {\n const out: Record<string, string> = Object.fromEntries(BACKDROP_FUNS.map(([trait,, def]) => [trait, def]));\n const text = (value ?? '').trim();\n if (!isWholeBackdropSet(text)) return out;\n const parts = text.split(/\\s+(?![^(]*\\))/);\n for (const part of parts) {\n const m = BACKDROP_FN.exec(part);\n const fun = m && BACKDROP_FUNS.find(([, fn]) => fn === m[1]);\n if (!m || !fun || m[2].trim() === '' || m[2].includes('var(')) return null;\n out[fun[0]] = fun[1] === 'blur' ? m[2].trim() : asFactor(m[2].trim());\n }\n return out;\n}\n\n/**\n * Strip virtual trait keys from `raw` and emit their composed CSS equivalents.\n *\n * When composing a partial state-override map (hover, active…), pass the full\n * base style map as `base` so non-overridden components (e.g. filterBrightness\n * when only filterBlur is overridden) are preserved in the composed output.\n * When operating on a complete style map, omit `base` — it defaults to `raw`.\n */\nexport function composeVirtualTraits(\n raw: Record<string, any>,\n base: Record<string, any> = raw,\n): Record<string, any> {\n // Copy all non-virtual properties as-is\n const result: Record<string, any> = {};\n for (const [k, v] of Object.entries(raw)) {\n if (!VIRTUAL_TRAIT_KEYS.has(k)) result[k] = v;\n }\n\n // Merge base values for any virtual key absent from the partial override map\n const merged = (funs: [string, string, string][]): Record<string, any> => {\n const m: Record<string, any> = {};\n for (const [t] of funs) m[t] = raw[t] ?? base[t];\n return m;\n };\n\n // filter\n const filterStr = buildFns(FILTER_FUNS, merged(FILTER_FUNS));\n if (filterStr) result['filter'] = filterStr;\n\n // backdrop-filter. The whole-value `backdropFilter` trait (DS2 — an element style writes\n // `var(--iox-card-backdrop)`) WINS over the composed backdrop* group when it is set; its\n // default `none` means unset, so a legacy node's composed blur still applies. The -webkit-\n // twin rides along for Safari (design-system plan T3).\n const whole = raw[BACKDROP_WHOLE_KEY] ?? base[BACKDROP_WHOLE_KEY];\n const wholeSet = isWholeBackdropSet(whole);\n const backdropStr = buildFns(BACKDROP_FUNS, merged(BACKDROP_FUNS));\n if (wholeSet) result[BACKDROP_WHOLE_KEY] = whole;\n else if (backdropStr) result[BACKDROP_WHOLE_KEY] = backdropStr;\n if (result[BACKDROP_WHOLE_KEY] !== undefined && result[BACKDROP_WHOLE_KEY] !== '') {\n result[BACKDROP_TWIN_KEY] = result[BACKDROP_WHOLE_KEY];\n }\n\n // transform\n const transformStr = buildFns(TRANSFORM_FUNS, merged(TRANSFORM_FUNS));\n if (transformStr) result['transform'] = transformStr;\n\n // transition — only when it is timed (a non-zero duration) and names what it moves: one entry per property\n // (G2, Emil 183 — never `transition: all`); nothing to name, nothing to transition.\n const dur = raw['transitionDuration'] ?? base['transitionDuration'];\n const ease = raw['transitionTimingFunction'] ?? base['transitionTimingFunction'];\n const del = raw['transitionDelay'] ?? base['transitionDelay'];\n const props = transitionPropertyList(raw[TRANSITION_PROPERTY_KEY] ?? base[TRANSITION_PROPERTY_KEY]);\n if (dur && ease && dur !== '0ms' && dur !== '0s' && props.length) {\n const delPart = del && del !== '0ms' && del !== '0s' ? ` ${del}` : '';\n result['transition'] = props.map(p => `${p} ${dur} ${ease}${delPart}`).join(', ');\n }\n\n // Max lines: the clamp takes over the node's display and overflow.\n const clamp = lineClamp(raw[MAX_LINES_KEY] ?? base[MAX_LINES_KEY]);\n if (clamp !== null) {\n result['display'] = '-webkit-box';\n result['WebkitBoxOrient'] = 'vertical';\n result[LINE_CLAMP_OUTPUT] = String(clamp);\n result['overflow'] = 'hidden';\n }\n\n const direction = composeDirection(raw, base);\n if (direction) result[DIRECTION_OUTPUT] = direction;\n if (raw === base && isLegacyDefaultAlign(result[TEXT_ALIGN_KEY])) result[TEXT_ALIGN_KEY] = TextAlign.Start;\n\n // A gradient Background is an IMAGE. A solid one over a wider/base gradient (a hover, a breakpoint)\n // must cancel that image, or the gradient keeps showing through.\n const background = result['backgroundColor'];\n if (isGradientPaint(background)) {\n result['backgroundImage'] = background;\n result['backgroundColor'] = 'transparent';\n } else if (background !== undefined && raw !== base && isGradientPaint(base['backgroundColor'])) {\n result['backgroundImage'] = 'none';\n }\n\n // ::marker pseudo-element — collected into __markerStyles so StyleRegistryService\n // can emit a separate `.iox-node-{id}::marker { … }` rule.\n const markerStyles: Record<string, any> = {};\n for (const [trait, cssProp] of MARKER_FUNS) {\n const val = raw[trait] ?? base[trait];\n if (val != null && val !== '') markerStyles[cssProp] = val;\n }\n if (Object.keys(markerStyles).length) {\n result['__markerStyles'] = markerStyles;\n }\n\n return result;\n}\n","/** camelCase style key → kebab CSS property (`borderRadius` → `border-radius`). */\nexport function styleKeyToKebab(key: string): string {\n return key.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);\n}\n","/**\n * The content traits the accessibility attributes are read from (CC1). Import-free on purpose: the\n * builder's component configs declare these traits, and the node-baseline generator bundles those\n * configs against this file directly.\n */\nexport enum A11yTrait {\n /** \"Accessibility ▸ Accessible name\" — the name of an icon-only control (and of a Dialog). */\n AccessibleName = 'ariaLabel',\n /** A Dialog's \"Close when wider than\": a breakpoint id, or empty = never. */\n CloseAbove = 'closeAbove',\n}\n\n/** The types that carry an Accessible name trait. */\nexport const ACCESSIBLE_NAME_TYPES: ReadonlyArray<string> = ['ButtonBlock', 'LinkedContainer', 'Link', 'Dialog', 'SliderContainer'];\n\n/** The types that link to a page and can therefore be the current page's link. */\nexport const CURRENT_LINK_TYPES: ReadonlyArray<string> = ['Link', 'LinkedContainer', 'ButtonBlock'];\n","/**\n * style-compiler — the SINGLE source of truth for turning a node's style map into\n * CSS declarations. Framework-agnostic (no Angular): consumed by both renderers.\n *\n * - Builder canvas: `StyleRegistryService` (@vectoriox/iox-builder) → live `<style>` tag.\n * - SSR site: `LayoutRendererService` (iox-client-engine) → HTML string CSS.\n *\n * Lives in @vectoriox/iox-ui because BOTH consumers depend on iox-ui (the engine does\n * NOT depend on iox-builder). Keeping it here — not duplicated per renderer — is what\n * prevents the builder and the live site from drifting.\n * See iox-ai-guidance `architecture/builder/render-parity.md`.\n */\n\nimport { styleKeyToKebab } from '../../design-core/css-names';\nimport { composeVirtualTraits } from './virtual-traits';\nimport { CURRENT_LINK_TYPES } from '../a11y/a11y-traits';\n\n/**\n * Rewrite viewport-relative units so they resolve to the simulated canvas dimensions\n * in the builder, and to the real viewport in production.\n *\n * `--preview-vh` / `--preview-vw` are set by BuilderComponent (ResizeObserver +\n * viewport-state subscription). In production those variables are undefined, so the\n * `1vh` / `1vw` fallbacks restore native browser behaviour.\n */\nexport function rewriteViewportUnits(value: string): string {\n return value\n .replace(/(-?\\d*\\.?\\d+)([sdl]?)vh/g, 'calc($1 * var(--preview-vh, 1$2vh))')\n .replace(/(-?\\d*\\.?\\d+)([sdl]?)vw/g, 'calc($1 * var(--preview-vw, 1$2vw))');\n}\n\n/**\n * kebab CSS property → the value that equals its CSS initial AND has no UA-stylesheet override for\n * any element the builder renders (div/section/span/i/a/img/h1–h6/p/ul). Emitting these is a pure\n * no-op, so they're dropped to keep the compiled CSS lean (self-describing nodes serialise every\n * trait, many at their default).\n *\n * Deliberately EXCLUDED, because a value equal to the initial can still be meaningful there:\n * - inherited properties (line-height, color, font-family/size/weight, text-align, letter-spacing…)\n * — the value may override an inherited ancestor value.\n * - margin / padding — UA stylesheets set them on h1–h6, p, ul, so `0` depends on a reset.\n * - border-* — the initial `medium` width + interaction with border-style makes it non-trivial.\n */\nconst NOOP_INITIAL_VALUES: Readonly<Record<string, readonly string[]>> = {\n 'width': ['auto'], 'height': ['auto'],\n 'min-width': ['auto'], 'min-height': ['auto'],\n 'max-width': ['none', 'auto'], 'max-height': ['none', 'auto'], // `auto` is invalid for max-* → inert\n 'position': ['static'],\n 'top': ['auto'], 'right': ['auto'], 'bottom': ['auto'], 'left': ['auto'],\n 'opacity': ['1'], 'z-index': ['auto'],\n 'flex-grow': ['0'], 'flex-shrink': ['1'], 'flex-basis': ['auto'],\n 'flex-direction': ['row'], 'flex-wrap': ['nowrap'],\n 'gap': ['0', '0px', 'normal'],\n 'border-radius': ['0', '0px'],\n 'aspect-ratio': ['auto'],\n 'mix-blend-mode': ['normal'],\n 'transform': ['none'], 'box-shadow': ['none'],\n // G3: the Transform origin trait's default is the CSS initial (the centre) — never emitted on every node.\n 'transform-origin': ['center', 'center center', '50% 50%', '50% 50% 0', '50% 50% 0px'],\n // overflow initial is `visible`. A self-describing node serialises the Overflow trait's default,\n // so WITHOUT this the emitted `overflow: visible` would override component baselines that clip\n // (e.g. `.iox-card__img-wrap`, `.iox-slider`, `.iox-gallery` all set `overflow: hidden`), breaking\n // object-fit/aspect-ratio image clipping everywhere. A user-set hidden/scroll/auto/clip is not the\n // initial, so it still emits and wins.\n 'overflow': ['visible'], 'overflow-x': ['visible'], 'overflow-y': ['visible'],\n // Only a gradient Background writes an image; `none` everywhere else is the initial (Card v2).\n 'background-image': ['none'],\n 'clip-path': ['none'],\n // DS2 traits (design-system plan T3/T4). `backdrop-filter: blur(0px)` would still create a\n // containing block, so the whole-value trait's solid-flavor value is `none` — and `none` must\n // never be emitted on every node. text-transform IS inherited: the cost is that `none` cannot\n // cancel an ancestor's uppercase in a base rule — chosen over emitting it on every node.\n 'backdrop-filter': ['none'], '-webkit-backdrop-filter': ['none'],\n 'text-transform': ['none'],\n // CC4b: the Price style's tabular figures. Inherited too, the same trade-off as text-transform: a serialised\n // `normal` is never emitted on every node.\n 'font-variant-numeric': ['normal'],\n};\n\n/**\n * Style props a type's render-default fully REPLACES. Emitting them would produce a dead\n * declaration that is immediately overridden in the same rule (e.g. an Icon's serialised\n * `lineHeight: 1.5` followed by the forced `line-height: 1`), so callers strip them first via\n * {@link stripSuppressedProps} and let renderDefaultDeclarations supply the real value.\n */\nexport const SUPPRESSED_STYLE_PROPS_BY_TYPE: Readonly<Record<string, readonly string[]>> = {\n // An icon's line box is structurally forced to 1 — see the Icon branch of renderDefaultDeclarations.\n Icon: ['lineHeight'],\n // A Dialog is PLACED by its renderer, never positioned by its node rule: the live twin is a\n // top-layer <dialog> centred by `inset: 0; margin: auto` (the engine's zero-specificity reset),\n // the canvas twin a grid stage. Every node serialises the Spacing/Position traits, so a stored\n // `margin: 0px` (0,1,0) beat the reset and every dialog — the consent banner too — opened in the\n // top-left corner of the live site (DS2 verification). Placement is the `placement` trait's job.\n Dialog: [\n 'position', 'inset', 'top', 'right', 'bottom', 'left',\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'marginBlock', 'marginBlockStart', 'marginBlockEnd', 'marginInline', 'marginInlineStart', 'marginInlineEnd',\n ],\n};\n\n/** Remove the style props whose value a type's render-default always overrides. Returns the map\n * unchanged (same reference) when the type suppresses nothing. */\nexport function stripSuppressedProps(type: string, styleProps: Record<string, any>): Record<string, any> {\n const suppressed = SUPPRESSED_STYLE_PROPS_BY_TYPE[type];\n if (!suppressed?.length) return styleProps;\n const out = { ...styleProps };\n for (const key of suppressed) delete out[key];\n return out;\n}\n\n/**\n * What a compiled rule is FOR — decides whether an initial value is a no-op.\n *\n * In a `Base` rule nothing is being overridden, so `width: auto` or `transform: none` changes\n * nothing and is dropped (see NOOP_INITIAL_VALUES). In an `Override` rule — a breakpoint layer —\n * the initial value is exactly how you UNDO a wider rule (`width: 520px` → `auto` on mobile), so\n * dropping it would silently keep the desktop value.\n */\nexport enum DeclarationContext {\n Base = 'base',\n Override = 'override',\n}\n\n/**\n * Compile a flat, camelCase style map into an array of `\"prop: value\"` CSS\n * declarations (kebab-cased, viewport-units rewritten, empties dropped, no-op initials dropped\n * in a `Base` context only, optional `!important`). Callers wrap these in whatever selector\n * they emit.\n *\n * @param props Flat camelCase style map.\n * @param importantProps Keys that must carry `!important` (e.g. `position`, to beat\n * Angular's scoped-CSS specificity boost in the builder). A prop forced\n * `!important` is never dropped as a no-op — the `!important` exists to win\n * the cascade, so its value must always be emitted.\n * @param context `Override` for a rule that overrides a wider one (a breakpoint layer):\n * initial values are kept, because there they reset rather than no-op.\n */\nexport function compileDeclarations(\n props: Record<string, any>,\n importantProps?: ReadonlySet<string>,\n context: DeclarationContext = DeclarationContext.Base,\n): string[] {\n const out: string[] = [];\n for (const [k, v] of Object.entries(props)) {\n if (v === undefined || v === null || v === '') continue;\n const prop = styleKeyToKebab(k);\n const val = rewriteViewportUnits(String(v));\n const isImportant = importantProps?.has(k) ?? false;\n const dropsNoOps = context === DeclarationContext.Base && !isImportant;\n if (dropsNoOps && NOOP_INITIAL_VALUES[prop]?.includes(val.trim().toLowerCase())) continue;\n out.push(`${prop}: ${val}${isImportant ? ' !important' : ''}`);\n }\n return out;\n}\n\n/**\n * The state names whose rule compiles to a DIFFERENT pseudo-class than their own name. `focus`\n * compiles to `:focus-visible` (design-system DS2): an element style's focus ring must appear for\n * keyboard users, not stick to a button after a mouse click. Stored states keep the name `focus` —\n * no migration — and a text field still matches, since browsers treat a focused text input as\n * focus-visible. Shared by the builder canvas and both engine paths.\n */\nexport const STATE_PSEUDO_CLASS: Readonly<Record<string, string>> = { focus: 'focus-visible' };\n\n/** The pseudo-class a stored state compiles to (`focus` → `focus-visible`, everything else itself). */\nexport function statePseudoClass(state: string): string {\n return STATE_PSEUDO_CLASS[state] ?? state;\n}\n\n/**\n * Component states (CC1 N2; composite plan T12): states a node is IN because of what it is, not where\n * the pointer is — so they compile to an ATTRIBUTE the renderers write, never a pseudo-class. `current`\n * is the link to the page the visitor is on (`aria-current=\"page\"`, written by `nodeA11yAttributes`),\n * so the look and the announcement are one fact.\n */\nexport enum ComponentState {\n Current = 'current',\n /** A composite part that IS on — an open accordion item, its header, its panel (board 9 \"Open\"). */\n On = 'on',\n /** A part INSIDE an item, styled by its item being open (board 9 \"Item open\"; \"Tab active\" inside a tab or a panel)\n * — a TARGETED state: its trigger is the item (`stateTriggers['trigger-on']`), compiled through\n * `targetedStateSelector`. On a node OUTSIDE every item (composite T20, CC4a) the author PICKS the item — \"when tab\n * Night is on\" — the same state and the same `:has()` scoped to the nearest common ancestor. */\n ItemOpen = 'trigger-on',\n /** G4: a control that cannot be used — a disabled button, or one marked aria-disabled. */\n Disabled = 'disabled',\n /** G4: busy — a submit button while its form sends (`syncSubmitButtons`), a form while it sends. */\n Busy = 'busy',\n /** G4: chosen — a toggle button pressed, an option checked or selected. */\n Selected = 'selected',\n /** G4: the page has scrolled (a header that firms up once the page moves) — `SCROLLED_ATTRIBUTE` on the root. */\n Scrolled = 'scrolled',\n}\n\n/** The page has scrolled: written on the document element by the live site (and on the canvas page by the builder). */\nexport const SCROLLED_ATTRIBUTE = 'data-iox-scrolled';\n\n/** The selector each (non-targeted) component state compiles to — an attribute, or an `:is()` of the ways a node can\n * be in it (a native `:disabled` or `aria-disabled`; pressed / checked / selected), so one rule covers every markup. */\nexport const COMPONENT_STATE_SELECTOR: Readonly<Record<string, string>> = {\n [ComponentState.Current]: '[aria-current=\"page\"]',\n [ComponentState.On]: '[data-iox-on]',\n [ComponentState.Disabled]: ':is(:disabled, [aria-disabled=\"true\"])',\n [ComponentState.Busy]: '[aria-busy=\"true\"]',\n [ComponentState.Selected]: ':is([aria-pressed=\"true\"], [aria-checked=\"true\"], [aria-selected=\"true\"])',\n [ComponentState.Scrolled]: `:is([${SCROLLED_ATTRIBUTE}], [${SCROLLED_ATTRIBUTE}] *)`,\n};\n\n/** Which types offer each control state (G4) in the Style panel's Component state group. */\nconst G4_STATE_TYPES: ReadonlyArray<[ComponentState, ReadonlyArray<string>]> = [\n [ComponentState.Disabled, ['ButtonBlock', 'Button', 'SubmitButton']],\n [ComponentState.Busy, ['SubmitButton', 'ButtonBlock', 'Form']],\n [ComponentState.Selected, ['ButtonBlock', 'LinkedContainer']],\n];\n\n/** Scrolled is offered on the site header and its parts — generation-core's NavRole family (`nav`, `nav.brand`…), the\n * drawer's parts aside (the drawer is a dialog over the page). Spelled here — the main entry does not import\n * generation-core; style-compiler.spec pins it to the enum. */\nexport const SCROLLED_STATE_ROLE = 'nav';\nconst DRAWER_ROLE_PREFIX = 'nav.drawer';\n\nfunction offersScrolled(role: string | null | undefined): boolean {\n return !!role && (role === SCROLLED_STATE_ROLE || role.startsWith(`${SCROLLED_STATE_ROLE}.`)) && !role.startsWith(DRAWER_ROLE_PREFIX);\n}\n\n/** The composite roles that are themselves \"on\" when their item is open (they carry `data-iox-on`): an accordion's\n * item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1); a tab and its panel (CC4a —\n * \"Active\"). The main entry does not import composite-core, so the roles are spelled here — `style-compiler.spec` pins\n * them to its enums. */\nexport const ON_STATE_ROLES: ReadonlyArray<string> = [\n 'accordion.item', 'accordion.trigger', 'accordion.panel', 'disclosure', 'disclosure.trigger', 'disclosure.panel', 'tabs.trigger', 'tabs.panel',\n // CC4b — a Segmented control's option (\"On\": the chosen one).\n 'segmented.option',\n];\n\n/**\n * The component states a node offers in the Style panel's \"Component state\" group: Current page (a link),\n * Open / Active (an accordion's item, header or panel; a tab or its panel), Item open (any other part inside an item —\n * `insideItem`), and — on a node outside every item, on a page that has items to pick (`itemsToPick`, composite T20) —\n * the same Item open state with a picked trigger.\n */\nexport function componentStatesFor(type: string | null | undefined, role?: string | null, insideItem = false, itemsToPick = false): ComponentState[] {\n // An accordion's header (a tab) is a button that opens its item, never a link to a page: Open, not Current page.\n if (role && ON_STATE_ROLES.includes(role)) return [ComponentState.On];\n const out: ComponentState[] = [];\n if (type && CURRENT_LINK_TYPES.includes(type)) out.push(ComponentState.Current);\n if (insideItem || itemsToPick) out.push(ComponentState.ItemOpen);\n for (const [state, types] of G4_STATE_TYPES) if (type && types.includes(type)) out.push(state);\n if (offersScrolled(role)) out.push(ComponentState.Scrolled);\n return out;\n}\n\n/**\n * The states a node's rules are emitted LAST in (CC4b): `on` (`[data-iox-on]`) and `focus` (`:focus-visible`) tie on\n * specificity, so whichever comes later wins — a focused Segmented option that is ON must keep its focus ring over the\n * on shadow (board 10). Every renderer emits a node's state rules in `orderStatesForEmit` order.\n */\nexport const LAST_EMITTED_STATES: ReadonlyArray<string> = ['focus'];\n\n/** `states` in the order their rules are emitted: as given, with the LAST_EMITTED_STATES moved to the end. */\nexport function orderStatesForEmit<T extends string>(states: ReadonlyArray<T>): T[] {\n return [...states.filter(s => !LAST_EMITTED_STATES.includes(s)), ...states.filter(s => LAST_EMITTED_STATES.includes(s))];\n}\n\n/** True when a rule key (`<nodeId>:<state>`) holds a state emitted last. */\nexport function isLastEmittedStateKey(key: string): boolean {\n const state = key.slice(key.lastIndexOf(':') + 1);\n return LAST_EMITTED_STATES.includes(state);\n}\n\n/**\n * What follows `.iox-node-<id>` in a stored state's rule: `:hover`, `:focus-visible`, or a component\n * state's attribute selector (`[aria-current=\"page\"]`). Shared by the builder canvas and both engine paths.\n */\nexport function stateSelectorSuffix(state: string): string {\n return COMPONENT_STATE_SELECTOR[state] ?? `:${statePseudoClass(state)}`;\n}\n\n/** The states driven by a pointer hovering something — each earns the default hover transition. */\nexport const HOVER_STATES: ReadonlyArray<string> = ['hover', 'parent-hover', 'trigger-hover'];\n\n/** True when the node restyles on hover (its own, its parent's or a chosen trigger's). */\nexport function hasHoverState(stateStyles: Record<string, Record<string, any> | undefined> | null | undefined): boolean {\n return !!stateStyles && HOVER_STATES.some(s => Object.keys(stateStyles[s] ?? {}).length > 0);\n}\n\n/**\n * The base-rule transition a hovering node gets when it declares none of its own, so a hover\n * animates instead of snapping. ONE copy for the builder canvas, the style panel and the engine.\n *\n * Two timings, chosen by the element-style MARKER (§3b-bis): a node wearing an element style takes\n * the motion tokens; a node without one (saved before DS2, not adopted) keeps the pre-DS2 literal\n * timing — seeding an org's tokens must never change how a legacy page hovers. WHAT transitions is the\n * list of properties the node's states change (G2 — never `transition: all`).\n */\nexport const HOVER_DEFAULT_TRANSITION_TRAITS: Readonly<Record<string, string>> = {\n transitionDuration: 'var(--iox-dur-fast)', transitionTimingFunction: 'var(--iox-ease-standard)',\n};\nexport const LEGACY_HOVER_TRANSITION_TRAITS: Readonly<Record<string, string>> = { transitionDuration: '0.2s', transitionTimingFunction: 'ease' };\n\n/** The default hover timing for a node that wears `elementStyle` (or none). */\nexport function defaultHoverTransitionTraits(elementStyle?: string | null): Readonly<Record<string, string>> {\n return elementStyle ? HOVER_DEFAULT_TRANSITION_TRAITS : LEGACY_HOVER_TRANSITION_TRAITS;\n}\n\nconst isFilled = (v: unknown): boolean => v !== undefined && v !== null && String(v).trim() !== '';\nconst isZeroDuration = (v: unknown): boolean => /^-?0+(\\.0+)?(ms|s)?$/.test(String(v ?? '').trim());\n\n/** True when the RAW style map times a transition of its own (an explicit `transition`, or the\n * transitionDuration / TimingFunction an element style writes). */\nexport function hasOwnTransition(styleProps: Record<string, any> | null | undefined): boolean {\n const sp = styleProps ?? {};\n if (isFilled(sp['transition'])) return true;\n return isFilled(sp['transitionDuration']) && !isZeroDuration(sp['transitionDuration']) && isFilled(sp['transitionTimingFunction']);\n}\n\n/** Keys a composed state map holds that are not properties a transition can name. */\nconst NOT_TRANSITIONED = new Set(['__markerStyles', 'WebkitBackdropFilter', 'transition', 'transitionDuration', 'transitionTimingFunction', 'transitionDelay', 'transitionProperty']);\n\ntype StateMaps = Record<string, Record<string, any> | undefined> | null | undefined;\n\n/**\n * The CSS properties a node's states change — what its transition names (G2, Emil 183: never `transition: all`).\n * Every state the node holds, at every breakpoint, composed as the renderers compose it (translateX / scaleX → one\n * `transform`, a gradient background → `background-image`…), in a stable order so both renderers emit one string.\n */\nexport function stateTransitionProperties(\n stateStyles: StateMaps,\n responsive?: Record<string, { stateStyles?: StateMaps } | undefined> | null,\n type?: string | null,\n): string[] {\n const maps: Array<Record<string, any>> = [];\n for (const map of Object.values(stateStyles ?? {})) if (map) maps.push(map);\n for (const layer of Object.values(responsive ?? {})) for (const map of Object.values(layer?.stateStyles ?? {})) if (map) maps.push(map);\n const out: string[] = [];\n // A prop the type's renderer owns (a Dialog's positioning) never reaches a rule — nor the transition's list.\n for (const map of maps.map(m => (type ? stripSuppressedProps(type, m) : m))) {\n for (const key of Object.keys(composeVirtualTraits(map, map))) {\n if (NOT_TRANSITIONED.has(key)) continue;\n const prop = styleKeyToKebab(key);\n if (!out.includes(prop)) out.push(prop);\n }\n }\n return out;\n}\n\n/**\n * What an element style animates beyond the properties its states change (premium M4): a link's underline is DRAWN by\n * the shared CSS (`iox-design.css`) as a background line that grows from the reading start on hover — its growth is a\n * `background-size` the node's own transition must name, or it would jump.\n */\nexport const ELEMENT_STYLE_TRANSITION_EXTRAS: Readonly<Record<string, ReadonlyArray<string>>> = {\n link: ['background-size'],\n};\n\n/**\n * `styleProps` as a renderer compiles them: a hovering node with no timing of its own takes the default hover timing,\n * and a node whose transition names no properties gets the ones its states change (and what its element style draws,\n * `ELEMENT_STYLE_TRANSITION_EXTRAS`). An author's own `transitionProperty` (or a raw `transition`) always wins. Pure:\n * the node's stored styles are never touched.\n */\nexport function withStateTransitions(\n styleProps: Record<string, any>,\n stateStyles: StateMaps,\n elementStyle?: string | null,\n responsive?: Record<string, { stateStyles?: StateMaps } | undefined> | null,\n type?: string | null,\n): Record<string, any> {\n let out = styleProps;\n if (hasHoverState(stateStyles) && !hasOwnTransition(styleProps)) out = { ...out, ...defaultHoverTransitionTraits(elementStyle) };\n if (!isFilled(out['transitionProperty']) && !isFilled(out['transition'])) {\n const props = stateTransitionProperties(stateStyles, responsive, type);\n for (const extra of (elementStyle ? ELEMENT_STYLE_TRANSITION_EXTRAS[elementStyle] : null) ?? []) if (props.length && !props.includes(extra)) props.push(extra);\n if (props.length) out = { ...out, transitionProperty: props.join(', ') };\n }\n return out;\n}\n\n/**\n * Per-type default `width` that the builder applies from each component's config\n * (NOT persisted in styleProps — see render-parity.md \"saved node is not\n * self-describing\"). The engine has no config classes, so it resolves the same\n * default from THIS map at render time. Keeping the map here (not re-typed in the\n * engine) is the \"shared default map\" decision.\n *\n * ONLY the `100%` container-type defaults live here. Fixed-size config defaults\n * (Card 200px, Image 300px, SliderSlide 33%) are starter placeholders real content\n * almost always overrides — forcing them onto width-less nodes breaks layout.\n */\nexport const DEFAULT_WIDTH_BY_TYPE: Readonly<Record<string, string>> = {\n Container: '100%', Repeater: '100%', SliderContainer: '100%',\n List: '100%', ListItem: '100%', Text: '100%', Divider: '100%', Spacer: '100%',\n // Section, Heading, LinkedContainer, Card, Image, SliderSlide, Button, ButtonBlock,\n // Icon → no forced default (their config defaults are content sizes set explicitly).\n};\n\n/**\n * Extra \"render default\" declarations the builder gets implicitly from live component\n * behaviour, which the engine must re-apply explicitly for parity. Returns `\"prop: value\"`\n * declarations to append AFTER the node's own compiled declarations.\n *\n * The default hover transition is no longer one of them: it is composed into the node's own rule by\n * `withStateTransitions` (both renderers), listing the properties its states change (G2).\n *\n * @param type Node type (registry key).\n * @param styleProps The node's persisted styleProps.\n */\nexport function renderDefaultDeclarations(\n type: string,\n styleProps: Record<string, any>,\n): string[] {\n const sp = styleProps ?? {};\n const out: string[] = [];\n const isOutOfFlow = sp['position'] === 'fixed' || sp['position'] === 'absolute';\n\n // Container-type default width so it fills its track. Only when width is unset — once a page\n // is saved with fully-resolved styleProps (self-describing nodes), width comes through\n // compileDeclarations and this is a no-op.\n if (sp['width'] === undefined) {\n if (isOutOfFlow) {\n out.push('width: 100%');\n } else if (DEFAULT_WIDTH_BY_TYPE[type]) {\n out.push(`width: ${DEFAULT_WIDTH_BY_TYPE[type]}`);\n }\n }\n // min-width:0 lets container flex children shrink below content and equal-split. Emit it for\n // container types INDEPENDENT of where width came from (styleProps vs the default above) —\n // otherwise a saved page whose width is persisted would lose the equal-split. In the builder the\n // same rule comes from the `.container-child` wrapper; here it lands on `.iox-node` directly.\n if (DEFAULT_WIDTH_BY_TYPE[type] && sp['minWidth'] === undefined && !isOutOfFlow) {\n out.push('min-width: 0');\n }\n // A border only renders when there is a WIDTH. Gate border-style on borderWidth — NOT on\n // borderColor: a node with only a border colour and no width would otherwise get the\n // browser's default `medium` width and show a phantom border. Absent borderWidth = no border.\n if (sp['borderWidth'] && sp['borderStyle'] === undefined) {\n out.push('border-style: solid');\n }\n // Image defaults reapplied when unset (the config defaults aren't always persisted). height:auto\n // is only a DEFAULT — when the user sets an explicit height (e.g. 100%) it must WIN, so guard it\n // on `sp['height'] === undefined` (matching the builder, which respects a configured height). An\n // unset height + aspect-ratio lets the ratio drive the box.\n if (type === 'Image') {\n if (sp['aspectRatio'] === undefined) out.push('aspect-ratio: 1/1');\n // object-fit is a Size style trait with config default 'cover'; that default isn't persisted,\n // so reapply it here (matching the builder) when the node has none.\n if (sp['objectFit'] === undefined) out.push('object-fit: cover');\n // NOTE: no `height: auto` — when height is unset, `auto` is already the CSS initial value, so\n // emitting it is a pure no-op. A configured height comes through compileDeclarations and wins.\n }\n // Containers default to a positioning context (for absolutely-positioned children). These live\n // in `.iox-node` (not the component `:host`) so an explicit styleProps value always wins.\n if ((type === 'Container' || type === 'Section' || type === 'LinkedContainer') && sp['position'] === undefined) {\n out.push('position: relative');\n }\n // LinkedContainer is an <a> (inline by default) → default it to block so children lay out.\n if (type === 'LinkedContainer' && sp['display'] === undefined) {\n out.push('display: block');\n }\n // An Icon is a single FONT GLYPH, not a paragraph: it must contribute no line-box height of its\n // own (spacing belongs to padding/margin). But every node serialises the Typography group's\n // `lineHeight` default of 1.5, so icons carry `line-height: 1.5` — a 24px glyph then gets a 36px\n // line box and pushes the surrounding layout around.\n //\n // This is emitted UNCONDITIONALLY (not guarded on `undefined`) and callers append render-defaults\n // AFTER the node's own compiled declarations in the SAME rule, so it overrides a stale serialised\n // value for EXISTING icons too — no re-save needed. line-height is inherited, so simply omitting\n // it is not enough: the icon would inherit 1.5 from its container instead.\n if (type === 'Icon') out.push('line-height: 0');\n // An icon's `<i>` must shrink-wrap its glyph so it grows with font-size and doesn't overflow its\n // parent. Phosphor forces `display:inline-flex` on its own class; generated (fantasticon) fonts\n // don't, so the engine's plain `<i class=\"bi-x iox-node-…\">` would fall back to inline and the\n // glyph would overflow. Emit it here (guarded so a user-set display still wins) — mirrors the\n // builder Icon component's `:host{display:inline-flex}`.\n if (type === 'Icon' && sp['display'] === undefined) {\n out.push('display: inline-flex', 'align-items: center', 'justify-content: center');\n }\n return out;\n}\n","// Responsive (per-breakpoint) styles — the shared model, cascade and emission plan.\n//\n// SHARED (iox-ui): the builder canvas AND the SSR engine both call this. The builder\n// FLATTENS the active breakpoint (its canvas is a transformed frame inside a desktop\n// browser, so a real `@media` query would read the editor's width); the engine WRAPS\n// each planned layer in `@media`. Same decisions, different transport — never fork them.\n//\n// Storage is a sparse layer beside the existing keys, shaped like `stateStyles`:\n//\n// styleProps — base, full resolved set (unchanged)\n// stateStyles — sparse per-state overrides (unchanged)\n// responsive — sparse per-breakpoint overrides (this file)\n// { mobile: { styleProps: {…}, stateStyles: { hover: {…} } } }\n//\n// A node with no `responsive` key renders exactly as before — no migration.\n// See iox-ai-guidance `architecture/builder/responsive-breakpoints-plan.md`.\n\nimport { BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, composeVirtualTraits, VIRTUAL_TRAIT_GROUPS, VirtualTraitGroup } from './virtual-traits';\nimport { orderStatesForEmit } from './style-compiler';\n\n// ─── Breakpoints ─────────────────────────────────────────────────────────────\n\n/** The five fixed breakpoints (plan decision D2). Desktop-first: each narrower one\n * overrides the wider ones through `max-width`. */\nexport enum Breakpoint {\n Base = 'base',\n Laptop = 'laptop',\n Tablet = 'tablet',\n Mobile = 'mobile',\n Small = 'small',\n}\n\n/** Every breakpoint that can hold overrides. Base styles live in `styleProps`. */\nexport type OverrideBreakpoint = Exclude<Breakpoint, Breakpoint.Base>;\n\nexport interface BreakpointDef {\n readonly id: Breakpoint;\n readonly label: string;\n /** Inclusive upper bound in CSS px (`max-width`). `null` for Base, which has no query. */\n readonly maxWidth: number | null;\n /** Width the builder canvas simulates while this breakpoint is being edited. Always\n * inside the breakpoint's own range (above the next one's `maxWidth`). */\n readonly previewWidth: number;\n}\n\n/**\n * Widest → narrowest. This order IS the cascade order and the `@media` emission order.\n *\n * ⚠️ Phones in portrait (360–430px) land in `Small`, NOT `Mobile` — `Mobile` is 480–767,\n * a phone held landscape. The labels say so (as Webflow's do). The ids stay short because\n * they are storage keys; the cascade still makes a `Mobile` override reach every phone.\n */\nexport const BREAKPOINTS: readonly BreakpointDef[] = Object.freeze([\n { id: Breakpoint.Base, label: 'Base', maxWidth: null, previewWidth: 1440 },\n { id: Breakpoint.Laptop, label: 'Laptop', maxWidth: 1200, previewWidth: 1200 },\n { id: Breakpoint.Tablet, label: 'Tablet', maxWidth: 991, previewWidth: 768 },\n { id: Breakpoint.Mobile, label: 'Mobile landscape', maxWidth: 767, previewWidth: 568 },\n { id: Breakpoint.Small, label: 'Mobile portrait', maxWidth: 479, previewWidth: 390 },\n]);\n\nconst BREAKPOINT_INDEX = new Map<string, number>(BREAKPOINTS.map((d, i) => [d.id, i]));\n\n/** The definition for `bp`, or `undefined` for an unknown id (e.g. hand-edited JSON). */\nexport function breakpointDef(bp: Breakpoint | string): BreakpointDef | undefined {\n const i = BREAKPOINT_INDEX.get(bp);\n return i === undefined ? undefined : BREAKPOINTS[i];\n}\n\n/** Base → `bp`, inclusive — the layers whose values apply at `bp`. Unknown → `[Base]`. */\nexport function cascadeChain(bp: Breakpoint | string): Breakpoint[] {\n const i = BREAKPOINT_INDEX.get(bp);\n return BREAKPOINTS.slice(0, (i ?? 0) + 1).map(d => d.id);\n}\n\n/**\n * The breakpoint a viewport (or canvas) of `width` CSS px falls in — the narrowest one whose\n * `maxWidth` it fits under, else Base. Mirrors how the `max-width` media queries resolve, so the\n * builder's editing scope is always the breakpoint the canvas is actually showing.\n */\nexport function breakpointForWidth(width: number): Breakpoint {\n for (let i = BREAKPOINTS.length - 1; i > 0; i--) {\n const max = BREAKPOINTS[i].maxWidth;\n if (max !== null && width <= max) return BREAKPOINTS[i].id;\n }\n return Breakpoint.Base;\n}\n\n/** The next-wider breakpoint (what `bp` inherits from), or `null` for Base / unknown. */\nexport function parentBreakpoint(bp: Breakpoint | string): Breakpoint | null {\n const i = BREAKPOINT_INDEX.get(bp);\n return i ? BREAKPOINTS[i - 1].id : null;\n}\n\n/**\n * What a breakpoint's width is measured against.\n *\n * `Media` — the browser viewport. The SSR engine: a visitor's window IS the page.\n * `Container` — a named CSS size container. The builder: its canvas is a fixed-width frame inside a\n * desktop browser (and `transform: scale`d for zoom), so a media query would read the EDITOR's width.\n * A container query reads the frame's own layout width — which equals the simulated viewport and\n * ignores the zoom transform — so the builder emits the same structure as the engine.\n */\nexport enum BreakpointQueryKind {\n Media = 'media',\n Container = 'container',\n}\n\n/**\n * The at-rule prelude for `bp` — `@media (max-width: 767px)`, or with `Container`\n * `@container iox-canvas (max-width: 767px)`. `null` for Base or an unknown id.\n * `containerName` is required for `Container` (an unnamed container query would match\n * whichever ancestor container is nearest, which is not guaranteed to be the canvas).\n */\nexport function breakpointQueryFor(\n bp: Breakpoint | string,\n kind: BreakpointQueryKind = BreakpointQueryKind.Media,\n containerName?: string,\n): string | null {\n const max = breakpointDef(bp)?.maxWidth;\n if (max == null) return null;\n if (kind === BreakpointQueryKind.Media) return `@media (max-width: ${max}px)`;\n if (!containerName) throw new Error('A container breakpoint query needs a container name');\n return `@container ${containerName} (max-width: ${max}px)`;\n}\n\n/** Wrap already-compiled rules for `bp`. Base (and blank css) passes through unwrapped. */\nexport function wrapInBreakpointQuery(\n bp: Breakpoint | string,\n css: string,\n kind: BreakpointQueryKind = BreakpointQueryKind.Media,\n containerName?: string,\n): string {\n if (!css.trim()) return '';\n const query = breakpointQueryFor(bp, kind, containerName);\n return query ? `${query} {\\n${css}\\n}` : css;\n}\n\n/** `@media (max-width: 767px)` for `bp`; `null` for Base or an unknown id. */\nexport function mediaQueryFor(bp: Breakpoint | string): string | null {\n return breakpointQueryFor(bp, BreakpointQueryKind.Media);\n}\n\n/** Wrap already-compiled rules for `bp` in its media query. Base (and blank css) passes through. */\nexport function wrapInMediaQuery(bp: Breakpoint | string, css: string): string {\n return wrapInBreakpointQuery(bp, css, BreakpointQueryKind.Media);\n}\n\n// ─── Storage model ───────────────────────────────────────────────────────────\n\nexport type StyleMap = Record<string, any>;\nexport type StateStyleMap = Record<string, StyleMap>;\n/** Component trait values (node `props`/`inputs`), keyed by trait name. */\nexport type InputMap = Record<string, any>;\n\n/** What one breakpoint overrides. All maps are SPARSE — only keys that differ. */\nexport interface ResponsiveLayer {\n styleProps?: StyleMap;\n stateStyles?: StateStyleMap;\n /**\n * Per-breakpoint COMPONENT TRAIT overrides (`slidesPerView`, `limit`, …) — the things a media\n * query cannot express because they are component inputs, not CSS. Without this a 4-up slider\n * stays 4-up on a phone; the only escape used to be hand-typed Swiper JSON.\n *\n * Sparse and additive like the maps above, so a page with no trait overrides serialises exactly\n * as before. Only traits declared `responsive` on their `TraitConfig` may appear here.\n */\n inputs?: InputMap;\n}\n\nexport type ResponsiveOverrides = Partial<Record<OverrideBreakpoint, ResponsiveLayer>>;\n\nfunction layerAt(responsive: ResponsiveOverrides | null | undefined, bp: Breakpoint): ResponsiveLayer | undefined {\n return bp === Breakpoint.Base ? undefined : responsive?.[bp as OverrideBreakpoint];\n}\n\n/** Copy defined entries of `src` onto `target`. `undefined` never overwrites a value. */\nfunction assignDefined(target: StyleMap, src: StyleMap | undefined): StyleMap {\n if (src) for (const [k, v] of Object.entries(src)) if (v !== undefined) target[k] = v;\n return target;\n}\n\nfunction hasKeys(map: object | null | undefined): boolean {\n return !!map && Object.keys(map).length > 0;\n}\n\n// ─── Cascade resolution ──────────────────────────────────────────────────────\n\n/** The full effective style map at `bp`: base, then each layer down the cascade. */\nexport function resolveStyleProps(\n styleProps: StyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): StyleMap {\n const out = assignDefined({}, styleProps ?? undefined);\n for (const id of cascadeChain(bp)) assignDefined(out, layerAt(responsive, id)?.styleProps);\n return out;\n}\n\n/**\n * The full effective TRAIT map at `bp`: the node's own inputs, then each layer down the cascade.\n * Deliberately identical in shape and cascade order to `resolveStyleProps`, so \"how does a value\n * at this width get decided\" has ONE answer on both sides of the renderer split.\n */\nexport function resolveInputs(\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): InputMap {\n const out = assignDefined({}, inputs ?? undefined);\n for (const id of cascadeChain(bp)) assignDefined(out, layerAt(responsive, id)?.inputs);\n return out;\n}\n\n/** True when `bp` itself sets trait `name` — the panel's override indicator. Never true for Base. */\nexport function isInputOverriddenAt(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name: string,\n): boolean {\n return layerAt(responsive, bp as Breakpoint)?.inputs?.[name] !== undefined;\n}\n\n/**\n * Every level from Base down to `bp` that sets trait `name`, in cascade order — the trait-row\n * equivalent of `resolveValueChain`, driving the same \"Base 4 → Tablet 2 → Mobile 1\" source chain.\n */\nexport function resolveInputChain(\n name: string,\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): ValueSource[] {\n const chain: ValueSource[] = [];\n for (const id of cascadeChain(bp)) {\n const value = id === Breakpoint.Base ? inputs?.[name] : layerAt(responsive, id)?.inputs?.[name];\n if (value !== undefined) chain.push({ breakpoint: id, value });\n }\n return chain;\n}\n\n/** The effective per-state maps at `bp`. States with no values anywhere are omitted. */\nexport function resolveStateStyles(\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n): StateStyleMap {\n const out: StateStyleMap = {};\n const merge = (src: StateStyleMap | undefined) => {\n for (const [state, map] of Object.entries(src ?? {})) {\n out[state] = assignDefined(out[state] ?? {}, map);\n }\n };\n merge(stateStyles ?? undefined);\n for (const id of cascadeChain(bp)) merge(layerAt(responsive, id)?.stateStyles);\n for (const state of Object.keys(out)) if (!hasKeys(out[state])) delete out[state];\n return out;\n}\n\n/**\n * Every state that has a value anywhere — at base or at any breakpoint — in a stable order\n * (base states first, then any that exist only at a breakpoint). A renderer iterates this, not\n * `Object.keys(stateStyles)`, so a state defined ONLY at a breakpoint (a Mobile-only hover) still\n * gets its selector scope resolved.\n */\nexport function stateNamesIn(\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): string[] {\n const names = new Set<string>();\n const add = (src: StateStyleMap | null | undefined) => {\n for (const [state, map] of Object.entries(src ?? {})) {\n if (Object.values(map ?? {}).some(v => v !== undefined)) names.add(state);\n }\n };\n add(stateStyles);\n for (const { id } of BREAKPOINTS) add(layerAt(responsive, id)?.stateStyles);\n return [...names];\n}\n\n/** One level of the cascade that sets a value. */\nexport interface ValueSource {\n breakpoint: Breakpoint;\n value: any;\n}\n\n/**\n * Every level from Base down to `bp` that sets `prop` (optionally within `state`), in\n * cascade order. The LAST entry is the effective value; an empty array means unset.\n * Drives the style panel's source chain (\"Base 34 → Tablet 28 → Mobile 22\").\n */\nexport function resolveValueChain(\n prop: string,\n styleProps: StyleMap | null | undefined,\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n state?: string,\n): ValueSource[] {\n const read = (props?: StyleMap, states?: StateStyleMap) => (state ? states?.[state] : props)?.[prop];\n const chain: ValueSource[] = [];\n for (const id of cascadeChain(bp)) {\n const layer = layerAt(responsive, id);\n const value = id === Breakpoint.Base\n ? read(styleProps ?? undefined, stateStyles ?? undefined)\n : read(layer?.styleProps, layer?.stateStyles);\n if (value !== undefined) chain.push({ breakpoint: id, value });\n }\n return chain;\n}\n\n/** True when `bp` itself sets `prop` (the style panel's orange edge). Never true for Base. */\nexport function isOverriddenAt(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop: string,\n state?: string,\n): boolean {\n const layer = layerAt(responsive, bp as Breakpoint);\n const map = state ? layer?.stateStyles?.[state] : layer?.styleProps;\n return map?.[prop] !== undefined;\n}\n\n/** Number of overridden values — at `bp`, or across every breakpoint when omitted. */\nexport function countOverrides(\n responsive: ResponsiveOverrides | null | undefined,\n bp?: Breakpoint | string,\n): number {\n const count = (map?: StyleMap) => Object.values(map ?? {}).filter(v => v !== undefined).length;\n const ids = bp ? [bp as Breakpoint] : BREAKPOINTS.map(d => d.id);\n let n = 0;\n for (const id of ids) {\n const layer = layerAt(responsive, id);\n n += count(layer?.styleProps);\n n += count(layer?.inputs);\n for (const map of Object.values(layer?.stateStyles ?? {})) n += count(map);\n }\n return n;\n}\n\n// ─── Editing (immutable) ─────────────────────────────────────────────────────\n\nfunction assertOverrideBreakpoint(bp: Breakpoint | string): asserts bp is OverrideBreakpoint {\n if (bp === Breakpoint.Base) {\n throw new Error('Base styles live in styleProps / stateStyles, not in responsive overrides');\n }\n if (!BREAKPOINT_INDEX.has(bp)) throw new Error(`Unknown breakpoint \"${bp}\"`);\n}\n\n/** Returns a new overrides object with `prop` set at `bp` (optionally within `state`). */\nexport function setOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop: string,\n value: any,\n state?: string,\n): ResponsiveOverrides {\n assertOverrideBreakpoint(bp);\n const layer: ResponsiveLayer = { ...(responsive?.[bp] ?? {}) };\n if (state) {\n layer.stateStyles = { ...(layer.stateStyles ?? {}), [state]: { ...(layer.stateStyles?.[state] ?? {}), [prop]: value } };\n } else {\n layer.styleProps = { ...(layer.styleProps ?? {}), [prop]: value };\n }\n return { ...(responsive ?? {}), [bp]: layer };\n}\n\n/** Returns a new overrides object with trait `name` set at `bp`. */\nexport function setInputOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name: string,\n value: any,\n): ResponsiveOverrides {\n assertOverrideBreakpoint(bp);\n const layer: ResponsiveLayer = { ...(responsive?.[bp] ?? {}) };\n layer.inputs = { ...(layer.inputs ?? {}), [name]: value };\n return { ...(responsive ?? {}), [bp]: layer };\n}\n\n/**\n * Remove trait overrides at `bp`, pruning empties exactly like `clearOverride` — omit `name` to\n * drop every trait override at that width. Returns `undefined` when nothing is left anywhere.\n */\nexport function clearInputOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n name?: string,\n): ResponsiveOverrides | undefined {\n assertOverrideBreakpoint(bp);\n const next: ResponsiveOverrides = { ...(responsive ?? {}) };\n const current = next[bp];\n if (!current?.inputs) return hasKeys(next) ? next : undefined;\n\n const layer: ResponsiveLayer = { ...current };\n if (name === undefined) {\n delete layer.inputs;\n } else {\n const { [name]: _dropped, ...rest } = layer.inputs!;\n layer.inputs = hasKeys(rest) ? rest : undefined;\n if (!layer.inputs) delete layer.inputs;\n }\n next[bp] = hasKeys(layer) ? layer : undefined;\n if (!next[bp]) delete next[bp];\n return hasKeys(next) ? next : undefined;\n}\n\n/**\n * Remove overrides at `bp` and PRUNE whatever becomes empty, so \"reset\" and \"never\n * overridden\" are the same state on disk — no tombstones, no nulls.\n *\n * clearOverride(r, bp) — the whole breakpoint\n * clearOverride(r, bp, undefined, st) — one state at that breakpoint\n * clearOverride(r, bp, prop) — one base-state value\n * clearOverride(r, bp, prop, st) — one value within a state\n *\n * Returns `undefined` when nothing is left, so a serialiser omits the key entirely.\n */\nexport function clearOverride(\n responsive: ResponsiveOverrides | null | undefined,\n bp: Breakpoint | string,\n prop?: string,\n state?: string,\n): ResponsiveOverrides | undefined {\n assertOverrideBreakpoint(bp);\n const next: ResponsiveOverrides = { ...(responsive ?? {}) };\n const current = next[bp];\n\n if (current && (prop !== undefined || state !== undefined)) {\n const layer: ResponsiveLayer = { ...current };\n if (state) {\n const states = { ...(layer.stateStyles ?? {}) };\n if (prop !== undefined && states[state]) {\n const { [prop]: _dropped, ...rest } = states[state];\n states[state] = rest;\n }\n if (prop === undefined || !hasKeys(states[state])) delete states[state];\n layer.stateStyles = hasKeys(states) ? states : undefined;\n } else if (prop !== undefined && layer.styleProps) {\n const { [prop]: _dropped, ...rest } = layer.styleProps;\n layer.styleProps = hasKeys(rest) ? rest : undefined;\n }\n if (!layer.stateStyles) delete layer.stateStyles;\n if (!layer.styleProps) delete layer.styleProps;\n next[bp] = hasKeys(layer) ? layer : undefined;\n } else {\n next[bp] = undefined;\n }\n\n if (!next[bp]) delete next[bp];\n return hasKeys(next) ? next : undefined;\n}\n\n// ─── Emission plan ───────────────────────────────────────────────────────────\n\n/**\n * Everything one breakpoint must emit, already composed. Wrap in `mediaQuery` (engine)\n * or apply directly (builder, flattened).\n *\n * ⚠️ Compile these maps with `compileDeclarations(map, …, DeclarationContext.Override)`. The\n * default Base context drops CSS initial values as no-ops — but here `width: auto` or\n * `transform: none` is how a breakpoint UNDOES the wider value, and dropping it silently keeps\n * the desktop style.\n */\nexport interface ResponsiveRuleSet {\n breakpoint: OverrideBreakpoint;\n mediaQuery: string;\n /** Sparse declarations for the node itself at this width (virtual traits composed). */\n styleProps: StyleMap;\n /** Sparse declarations per state at this width (virtual traits composed). */\n stateStyles: StateStyleMap;\n}\n\nconst ZERO_DURATIONS = new Set(['0ms', '0s']);\n\nfunction groupsTouchedBy(map: StyleMap | undefined): Set<VirtualTraitGroup> {\n const touched = new Set<VirtualTraitGroup>();\n if (!map) return touched;\n for (const group of VIRTUAL_TRAIT_GROUPS) {\n const wholeTouched = group.output === BACKDROP_WHOLE_KEY && map[BACKDROP_WHOLE_KEY] !== undefined;\n if (wholeTouched || group.keys.some(k => map[k] !== undefined)) touched.add(group);\n }\n return touched;\n}\n\n/**\n * Should a touched group that composed to nothing emit its cancelling value?\n * Transition is the exception: setting only the easing (no duration anywhere) composes to\n * nothing too, and cancelling there would also kill the renderer's default hover transition\n * — so transition cancels only when the merged duration is explicitly zero.\n */\nfunction shouldReset(group: VirtualTraitGroup, merged: StyleMap): boolean {\n if (group.reset === null) return false;\n if (group.output === 'transition') return ZERO_DURATIONS.has(String(merged['transitionDuration']));\n return true;\n}\n\n/**\n * Compose a sparse override against everything wider than it, keeping ONLY what the\n * override changes: its own plain props, plus each virtual group it touches (or that\n * group's cancelling value when it now composes to nothing). Untouched groups are dropped\n * — re-emitting the wider rule's value inside a media block is noise at best.\n */\nfunction composeOverride(own: StyleMap, wider: StyleMap, touched: Set<VirtualTraitGroup>): StyleMap {\n const composed = composeVirtualTraits(own, wider);\n const groupOutputs = new Set(VIRTUAL_TRAIT_GROUPS.map(g => g.output));\n const out: StyleMap = {};\n for (const [k, v] of Object.entries(composed)) {\n if (!groupOutputs.has(k) && k !== BACKDROP_TWIN_KEY && v !== undefined) out[k] = v;\n }\n const merged = { ...wider, ...own };\n for (const group of touched) {\n const value = composed[group.output];\n if (value !== undefined) out[group.output] = value;\n else if (shouldReset(group, merged)) out[group.output] = group.reset;\n }\n if (out[BACKDROP_WHOLE_KEY] !== undefined) out[BACKDROP_TWIN_KEY] = out[BACKDROP_WHOLE_KEY];\n return out;\n}\n\n/**\n * The per-breakpoint rule sets a node needs, widest → narrowest (the order they must be\n * emitted in, AFTER every base rule — equal specificity means source order decides).\n * Breakpoints with nothing to emit are omitted.\n *\n * Handles the cross-axis case: a breakpoint that changes a virtual group (say\n * `translateX`) also re-emits that group for every state the node has, because the wider\n * state rule was composed against the wider value and would otherwise snap back to it on\n * hover.\n */\nexport function planResponsiveRules(\n styleProps: StyleMap | null | undefined,\n stateStyles: StateStyleMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): ResponsiveRuleSet[] {\n if (!hasKeys(responsive)) return [];\n const plan: ResponsiveRuleSet[] = [];\n\n for (const def of BREAKPOINTS) {\n const layer = layerAt(responsive, def.id);\n if (!layer || def.maxWidth == null) continue;\n const bp = def.id as OverrideBreakpoint;\n const wider = parentBreakpoint(bp) as Breakpoint;\n\n const own = layer.styleProps ?? {};\n const widerProps = resolveStyleProps(styleProps, responsive, wider);\n const touchedByProps = groupsTouchedBy(own);\n const composedProps = composeOverride(own, widerProps, touchedByProps);\n\n const propsHere = { ...widerProps, ...own };\n const statesHere = resolveStateStyles(stateStyles, responsive, bp);\n const statesWider = resolveStateStyles(stateStyles, responsive, wider);\n const composedStates: StateStyleMap = {};\n for (const state of orderStatesForEmit(Object.keys(statesHere))) {\n const ownState = layer.stateStyles?.[state] ?? {};\n const touched = groupsTouchedBy(ownState);\n for (const group of touchedByProps) touched.add(group);\n const composed = composeOverride(ownState, { ...propsHere, ...(statesWider[state] ?? {}) }, touched);\n if (hasKeys(composed)) composedStates[state] = composed;\n }\n\n if (hasKeys(composedProps) || hasKeys(composedStates)) {\n plan.push({\n breakpoint: bp,\n mediaQuery: mediaQueryFor(bp) as string,\n styleProps: composedProps,\n stateStyles: composedStates,\n });\n }\n }\n return plan;\n}\n","// Swiper breakpoints, derived from a node's per-breakpoint TRAIT overrides.\n//\n// SHARED (iox-ui): the builder canvas and the SSR engine both hand Swiper the same config, so a\n// slider that goes 1-up on a phone in the editor does the same on the live site.\n//\n// ⚠️ THE INVERSION IS THE WHOLE POINT OF THIS FILE.\n// IOX is desktop-first: `max-width`, and a layer applies at its width AND NARROWER.\n// Swiper is mobile-first: `breakpoints` keys are MIN-widths, and the LARGEST matching key wins.\n// Converting by hand at each call site is how the two drift, so it happens once, here, tested.\n//\n// See iox-ai-guidance `architecture/builder/builder-quality-pass-plan.md` (P3-G2).\n\nimport { BREAKPOINTS, Breakpoint, InputMap, ResponsiveOverrides, resolveInputs } from './responsive';\n\n/** Trait names whose value Swiper reads per breakpoint. Anything else is config-wide. */\nexport const SWIPER_RESPONSIVE_TRAITS = Object.freeze(['slidesPerView', 'slidesPerGroup', 'spaceBetween']);\n\n/** `{ [minWidth]: { slidesPerView, … } }` — Swiper's own `breakpoints` shape. */\nexport type SwiperBreakpointMap = Record<number, InputMap>;\n\n/**\n * Build Swiper's mobile-first `breakpoints` map from IOX's desktop-first layers.\n *\n * Each IOX breakpoint covers `[nextNarrower.maxWidth + 1 … this.maxWidth]`, so the Swiper key for a\n * layer is **one px above the next-narrower breakpoint's max-width** — the low edge of the band the\n * layer governs. Base becomes the key above the widest bounded breakpoint.\n *\n * Values are the RESOLVED ones at each width (base + every wider layer), never the raw sparse layer:\n * Swiper does not cascade between its own breakpoints the way CSS does — the largest matching key\n * wins outright and is not merged with smaller ones — so each entry must be self-sufficient.\n *\n * Only `SWIPER_RESPONSIVE_TRAITS` are emitted, and a band is omitted when it matches the band below\n * it, keeping the config as small as the author's actual overrides.\n */\nexport function buildSwiperBreakpoints(\n inputs: InputMap | null | undefined,\n responsive: ResponsiveOverrides | null | undefined,\n): SwiperBreakpointMap {\n const bands = bandsWidestFirst();\n const map: SwiperBreakpointMap = {};\n let previous: InputMap | null = null;\n\n // Narrowest → widest, so \"same as the band below\" is a comparison against what we just emitted.\n for (const band of [...bands].reverse()) {\n const resolved = pick(resolveInputs(inputs, responsive, band.id));\n if (previous && sameValues(previous, resolved)) continue;\n map[band.minWidth] = resolved;\n previous = resolved;\n }\n return map;\n}\n\n/**\n * The full `breakpoints` value to hand Swiper: the derived map, with any hand-written advanced JSON\n * merged OVER it so an author's explicit escape hatch always wins.\n */\nexport function mergeSwiperBreakpoints(\n derived: SwiperBreakpointMap,\n advancedJson: string | null | undefined,\n): SwiperBreakpointMap | undefined {\n let advanced: SwiperBreakpointMap | undefined;\n if (advancedJson) {\n try { advanced = JSON.parse(advancedJson); } catch { advanced = undefined; }\n }\n if (!advanced) return Object.keys(derived).length ? derived : undefined;\n\n const out: SwiperBreakpointMap = { ...derived };\n for (const [key, value] of Object.entries(advanced)) {\n const min = Number(key);\n if (!Number.isFinite(min)) continue;\n out[min] = { ...(out[min] ?? {}), ...(value ?? {}) };\n }\n return Object.keys(out).length ? out : undefined;\n}\n\n/** Each IOX breakpoint with the MIN width at which it starts applying. Widest first. */\nfunction bandsWidestFirst(): { id: Breakpoint; minWidth: number }[] {\n return BREAKPOINTS.map((def, i) => {\n const narrower = BREAKPOINTS[i + 1];\n // Base starts one px above the widest bounded breakpoint; every other band starts one px\n // above the breakpoint below it. The narrowest band starts at 0 — it has nothing below.\n const minWidth = narrower?.maxWidth != null ? narrower.maxWidth + 1 : 0;\n return { id: def.id, minWidth };\n });\n}\n\nfunction pick(resolved: InputMap): InputMap {\n const out: InputMap = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) {\n if (resolved[name] !== undefined) out[name] = resolved[name];\n }\n return out;\n}\n\nfunction sameValues(a: InputMap, b: InputMap): boolean {\n const keys = new Set([...Object.keys(a), ...Object.keys(b)]);\n for (const key of keys) if (a[key] !== b[key]) return false;\n return true;\n}\n","/**\n * Which Swiper modules a Slider loads, and how its autoplay boots — a pure decision, so the module list\n * is unit-tested (CC1 R1/R2 floor; complex-components plan §7c). Swiper's A11y module is ALWAYS loaded:\n * it gives the container `aria-roledescription=\"carousel\"`, every slide \"slide\" and an \"n of m\" label, and\n * keeps the live region quiet while it rotates. Autoplay never boots under reduced motion (Publishable\n * gate #6). The rotation pause control and the slider parts as nodes are CC3.\n */\nexport enum SwiperModuleName {\n A11y = 'A11y',\n Navigation = 'Navigation',\n Pagination = 'Pagination',\n Scrollbar = 'Scrollbar',\n Autoplay = 'Autoplay',\n Keyboard = 'Keyboard',\n Mousewheel = 'Mousewheel',\n Zoom = 'Zoom',\n Grid = 'Grid',\n Parallax = 'Parallax',\n FreeMode = 'FreeMode',\n}\n\nexport interface SwiperModuleFlags {\n enableNavigation?: boolean;\n enablePagination?: boolean;\n enableScrollbar?: boolean;\n enableAutoplay?: boolean;\n enableKeyboard?: boolean;\n enableMousewheel?: boolean;\n enableZoom?: boolean;\n enableGrid?: boolean;\n enableParallax?: boolean;\n}\n\nconst FLAGGED: ReadonlyArray<[keyof SwiperModuleFlags, SwiperModuleName]> = [\n ['enableNavigation', SwiperModuleName.Navigation],\n ['enablePagination', SwiperModuleName.Pagination],\n ['enableScrollbar', SwiperModuleName.Scrollbar],\n ['enableAutoplay', SwiperModuleName.Autoplay],\n ['enableKeyboard', SwiperModuleName.Keyboard],\n ['enableMousewheel', SwiperModuleName.Mousewheel],\n ['enableZoom', SwiperModuleName.Zoom],\n ['enableGrid', SwiperModuleName.Grid],\n ['enableParallax', SwiperModuleName.Parallax],\n];\n\n/** True when the Slider's autoplay may start: on, and the visitor has not asked for reduced motion. */\nexport function swiperAutoplayAllowed(enableAutoplay: boolean | undefined, motionAllowed: boolean): boolean {\n return !!enableAutoplay && motionAllowed;\n}\n\n/** The modules to load, A11y first. */\nexport function swiperModuleNames(flags: SwiperModuleFlags, motionAllowed: boolean): SwiperModuleName[] {\n return [SwiperModuleName.A11y, ...FLAGGED\n .filter(([flag, name]) => flags[flag] && (name !== SwiperModuleName.Autoplay || swiperAutoplayAllowed(flags.enableAutoplay, motionAllowed)))\n .map(([, name]) => name)];\n}\n\n/** Swiper's A11y options: carousel / slide role descriptions and an \"n of m\" slide label. */\nexport const SWIPER_A11Y_OPTIONS = {\n enabled: true,\n containerRoleDescriptionMessage: 'carousel',\n itemRoleDescriptionMessage: 'slide',\n slideLabelMessage: '{{index}} of {{slidesLength}}',\n} as const;\n","import { SliderWords, SLIDER_WORDS } from '@vectoriox/iox-ui/composite-core';\n\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { buildSwiperBreakpoints, mergeSwiperBreakpoints, SWIPER_RESPONSIVE_TRAITS } from '../../style-compiler/swiper-breakpoints';\nimport { SWIPER_A11Y_OPTIONS, swiperModuleNames, SwiperModuleName } from './swiper-modules';\n\n/**\n * What a Slider hands Swiper — ONE pure decision for every place a Swiper is built (CC3): the engine's component\n * path, its string path (globals), the admin's Preview and the builder's edit canvas. Before CC3 the builder's\n * Preview built its own config (no A11y module) and the engine read `loop: 'off'` as truthy.\n */\nexport interface SliderInputs {\n dir?: 'ltr' | 'rtl' | string;\n direction?: 'horizontal' | 'vertical' | string;\n slidesPerView?: number | 'auto' | string;\n slidesPerGroup?: number | string;\n spaceBetween?: number | string;\n speed?: number | string;\n effect?: string;\n grabCursor?: boolean;\n centeredSlides?: boolean;\n initialSlide?: number | string;\n autoHeight?: boolean;\n slideToClickedSlide?: boolean;\n freeMode?: boolean;\n /** `'off' | 'loop' | 'rewind'` (the builder trait) or a boolean (older saves). */\n loop?: boolean | string;\n enableNavigation?: boolean;\n enablePagination?: boolean;\n enableScrollbar?: boolean;\n enableAutoplay?: boolean;\n enableKeyboard?: boolean;\n enableMousewheel?: boolean;\n enableZoom?: boolean;\n enableGrid?: boolean;\n enableParallax?: boolean;\n autoplayDelay?: number | string;\n autoplayPauseOnMouseEnter?: boolean;\n autoplayDisableOnInteraction?: boolean;\n paginationType?: 'bullets' | 'fraction' | 'progressbar' | string;\n paginationClickable?: boolean;\n paginationDynamicBullets?: boolean;\n gridRows?: number | string;\n breakpoints?: string;\n responsive?: ResponsiveOverrides | null;\n /** Premium M4: the scroll plays it — held mid-screen, resting on each picture; no swipe, no loop, no autoplay. */\n scrollPlays?: boolean;\n}\n\n/** The slider's controls, when they are PARTS (CC3) — the elements Swiper is handed. */\nexport interface SliderControlElements {\n prev?: Element | null;\n next?: Element | null;\n pagination?: Element | null;\n}\n\nexport interface SwiperPlanContext {\n /** The visitor allows motion (autoplay boots only then). */\n motion: boolean;\n /** The builder's EDIT canvas: no touch, no loop, no autoplay, the slide effect at 300ms. */\n edit?: boolean;\n /** The controls are parts; absent = Swiper-drawn controls from the legacy switches. */\n parts?: SliderControlElements | null;\n words?: SliderWords;\n /** The carousel has a name (Slider ▸ Accessibility ▸ Carousel name): a `region` landmark; else a `group`. */\n named?: boolean;\n}\n\nexport interface SwiperPlan {\n modules: SwiperModuleName[];\n /** An effect module beyond `slide` (EffectFade…), by Swiper's export name. */\n effectModule: string | null;\n options: Record<string, unknown>;\n}\n\n/** The selectors Swiper's own (legacy) controls answer to inside `.swiper`. */\nexport const LEGACY_SWIPER_CONTROLS = {\n prev: '.swiper-button-prev',\n next: '.swiper-button-next',\n pagination: '.swiper-pagination',\n scrollbar: '.swiper-scrollbar',\n} as const;\n\n/**\n * The feel every live slider gets (premium M4, T3 — Emil 114/121): past either end a drag meets friction, not a wall\n * (resistance), and a swipe commits only after a few px of travel, so a vertical scroll that drifts never moves a slide.\n * The easing of the slides is the look's (`slider-ease`, iox-design.css).\n */\nexport const SLIDER_FEEL = { resistanceRatio: 0.65, threshold: 6 } as const;\n\n/** At or under this width one picture takes the full width (M1.3) unless the author said otherwise there. */\nexport const SLIDER_PHONE_BREAKPOINT = 'mobile';\n/** Effects that always show one slide (a stack, a turn): a phone keeps their own layout. */\nconst ONE_SLIDE_EFFECTS: ReadonlySet<string> = new Set(['fade', 'cube', 'flip', 'cards']);\n\n/** The pagination part's classes — Swiper's own position CSS (`.swiper-pagination-bullets.swiper-pagination-horizontal`)\n * must not pin a PART: its place is its own styles'. The dots keep Swiper's bullet class. */\nexport const PART_PAGINATION_MODIFIER = 'iox-slider-pagination-';\n\nconst EFFECT_MODULES: Readonly<Record<string, string>> = {\n fade: 'EffectFade', cube: 'EffectCube', flip: 'EffectFlip', coverflow: 'EffectCoverflow', cards: 'EffectCards', creative: 'EffectCreative',\n};\n\nconst num = (v: unknown, fallback: number): number => {\n const n = typeof v === 'number' ? v : Number(v);\n return Number.isFinite(n) ? n : fallback;\n};\nconst on = (v: unknown): boolean => v === true || v === 'true';\n\n/** The loop trait as Swiper's two booleans. `'off'` is a string — truthy — which made every saved slider loop. */\nexport function swiperLoopOptions(loop: unknown): { loop: boolean; rewind: boolean } {\n return { loop: loop === true || loop === 'loop' || loop === 'true', rewind: loop === 'rewind' };\n}\n\n/** `slidesPerView` as Swiper reads it: a number, or `'auto'`. */\nfunction perView(v: unknown): number | 'auto' {\n if (v === 'auto' || v === undefined || v === null || v === '') return 'auto';\n const n = num(v, 1);\n return n > 0 ? n : 'auto';\n}\n\n/**\n * One picture the full width on a phone (M1.3) — the default the M1 prototype proved: a 1.15 \"peek\" left an empty strip\n * beside the picture. Added as a phone layer only where the author set no slides-per-view at a phone width; an effect\n * that shows one slide anyway keeps its own (a \"cards\" stack stays a centred card, iox-design.css).\n */\nexport function withPhoneDefaults(inputs: SliderInputs): ResponsiveOverrides | null {\n const responsive = inputs.responsive ?? null;\n if (ONE_SLIDE_EFFECTS.has(String(inputs.effect ?? 'slide'))) return responsive;\n const authored = (bp: string) => {\n const layer = (responsive as Record<string, { inputs?: Record<string, unknown> } | undefined> | null)?.[bp];\n return layer?.inputs?.['slidesPerView'] !== undefined;\n };\n if (authored('mobile') || authored('small')) return responsive;\n const phone = (responsive as Record<string, { inputs?: Record<string, unknown> } | undefined> | null)?.[SLIDER_PHONE_BREAKPOINT];\n return { ...(responsive ?? {}), [SLIDER_PHONE_BREAKPOINT]: { ...(phone ?? {}), inputs: { ...(phone?.inputs ?? {}), slidesPerView: 1 } } } as ResponsiveOverrides;\n}\n\nfunction collectResponsiveInputs(inputs: SliderInputs): Record<string, unknown> {\n const all: Record<string, unknown> = { slidesPerView: inputs.slidesPerView, slidesPerGroup: inputs.slidesPerGroup, spaceBetween: inputs.spaceBetween };\n const out: Record<string, unknown> = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) if (all[name] !== undefined) out[name] = all[name];\n return out;\n}\n\nexport function planSwiperOptions(inputs: SliderInputs, ctx: SwiperPlanContext): SwiperPlan {\n const words = ctx.words ?? SLIDER_WORDS.en;\n const parts = ctx.parts ?? null;\n const edit = !!ctx.edit;\n const hasNav = parts ? !!(parts.prev || parts.next) : on(inputs.enableNavigation);\n const hasDots = parts ? !!parts.pagination : on(inputs.enablePagination);\n // M4: a slider the scroll plays is moved by the page's scroll only (and only while motion is allowed — under reduced\n // motion it is an ordinary slider).\n const played = !edit && on(inputs.scrollPlays) && ctx.motion;\n const autoplay = !edit && !played && on(inputs.enableAutoplay);\n\n const flags = {\n enableNavigation: hasNav,\n enablePagination: hasDots,\n enableScrollbar: on(inputs.enableScrollbar),\n // The Autoplay module is LOADED whenever the switch is on, so a visitor under reduced motion can still start\n // it from the pause control — it never BOOTS then (`autoplay.enabled`).\n enableAutoplay: autoplay,\n enableKeyboard: !edit && on(inputs.enableKeyboard),\n enableMousewheel: !edit && on(inputs.enableMousewheel),\n enableZoom: !edit && on(inputs.enableZoom),\n enableGrid: !edit && on(inputs.enableGrid),\n enableParallax: !edit && on(inputs.enableParallax),\n };\n const modules = swiperModuleNames(flags, true);\n if (!edit && on(inputs.freeMode)) modules.push(SwiperModuleName.FreeMode);\n\n const effect = edit ? 'slide' : (inputs.effect || 'slide');\n const options: Record<string, unknown> = {\n dir: inputs.dir === 'rtl' ? 'rtl' : 'ltr',\n direction: inputs.direction === 'vertical' ? 'vertical' : 'horizontal',\n slidesPerView: perView(inputs.slidesPerView),\n slidesPerGroup: Math.max(1, num(inputs.slidesPerGroup, 1)),\n spaceBetween: num(inputs.spaceBetween, 0),\n speed: edit ? 300 : num(inputs.speed, 300),\n effect,\n centeredSlides: on(inputs.centeredSlides),\n initialSlide: num(inputs.initialSlide, 0),\n autoHeight: on(inputs.autoHeight),\n // Swiper marks the slides in view (`swiper-slide-visible`) — the carousel runtime makes the others inert.\n watchSlidesProgress: true,\n };\n if (edit) {\n options['allowTouchMove'] = false;\n options['simulateTouch'] = false;\n // On the canvas Previous / Next are PARTS an author clicks to select (R2): rewinding keeps Swiper from\n // disabling them at either end (a disabled <button> takes no click).\n options['rewind'] = true;\n } else if (played) {\n options['allowTouchMove'] = false;\n options['simulateTouch'] = false;\n options['grabCursor'] = false;\n options['loop'] = false;\n options['rewind'] = false;\n } else {\n options['grabCursor'] = inputs.grabCursor !== false;\n options['slideToClickedSlide'] = on(inputs.slideToClickedSlide);\n Object.assign(options, swiperLoopOptions(inputs.loop), SLIDER_FEEL);\n if (on(inputs.freeMode)) options['freeMode'] = true;\n }\n\n if (hasNav) {\n options['navigation'] = parts\n ? { prevEl: parts.prev ?? null, nextEl: parts.next ?? null }\n : { prevEl: LEGACY_SWIPER_CONTROLS.prev, nextEl: LEGACY_SWIPER_CONTROLS.next };\n }\n if (hasDots) {\n const type = inputs.paginationType === 'fraction' || inputs.paginationType === 'progressbar' ? inputs.paginationType : 'bullets';\n options['pagination'] = parts\n ? { el: parts.pagination, type, clickable: inputs.paginationClickable !== false, dynamicBullets: on(inputs.paginationDynamicBullets),\n modifierClass: PART_PAGINATION_MODIFIER, bulletElement: 'button' }\n : { el: LEGACY_SWIPER_CONTROLS.pagination, type, clickable: inputs.paginationClickable !== false, dynamicBullets: on(inputs.paginationDynamicBullets) };\n }\n if (flags.enableScrollbar) options['scrollbar'] = { el: LEGACY_SWIPER_CONTROLS.scrollbar, draggable: !edit };\n if (autoplay) {\n options['autoplay'] = {\n enabled: ctx.motion,\n delay: num(inputs.autoplayDelay, 3000),\n pauseOnMouseEnter: inputs.autoplayPauseOnMouseEnter !== false,\n disableOnInteraction: on(inputs.autoplayDisableOnInteraction),\n };\n }\n if (flags.enableKeyboard) options['keyboard'] = { enabled: true, onlyInViewport: true };\n if (flags.enableMousewheel) options['mousewheel'] = true;\n if (flags.enableZoom) options['zoom'] = true;\n if (flags.enableParallax) options['parallax'] = true;\n if (flags.enableGrid && num(inputs.gridRows, 1) > 1) options['grid'] = { rows: num(inputs.gridRows, 1) };\n\n options['a11y'] = {\n ...SWIPER_A11Y_OPTIONS,\n prevSlideMessage: (parts?.prev?.getAttribute('aria-label')) || words.prev,\n nextSlideMessage: (parts?.next?.getAttribute('aria-label')) || words.next,\n paginationBulletMessage: words.goTo,\n slideLabelMessage: words.slideLabel,\n containerRoleDescriptionMessage: words.carousel,\n itemRoleDescriptionMessage: words.slide,\n // aria-roledescription needs a role to describe (axe): a named carousel is a region, an unnamed one a group.\n containerRole: ctx.named ? 'region' : 'group',\n };\n\n if (!edit) {\n const derived = buildSwiperBreakpoints(collectResponsiveInputs(inputs) as never, withPhoneDefaults(inputs));\n const map = mergeSwiperBreakpoints(derived, inputs.breakpoints ?? '');\n if (map) options['breakpoints'] = map;\n }\n\n return { modules, effectModule: effect !== 'slide' ? EFFECT_MODULES[effect] ?? null : null, options };\n}\n","import { attachCarouselA11y, attachSliderBar, BarSwiper, CarouselSwiper, SliderRole, sliderPartElement, sliderWords } from '@vectoriox/iox-ui/composite-core';\nimport { SCENE_WAKE_EVENT, SceneAttribute } from '@vectoriox/iox-ui/scene-core';\n\nimport { motionAllowed } from '../../motion/motion';\nimport { planSwiperOptions, SliderInputs } from './slider-options';\n\n/**\n * Boot a Swiper on a rendered slider — ONE path for the engine's component path, its string path (globals and the\n * fallback renderer: `data-iox-slider` carries the inputs) and the admin's Preview (CC3). It hands Swiper the\n * slider's control PARTS when it has them (else the legacy Swiper-drawn controls), plans the options through the\n * shared `planSwiperOptions`, and attaches the accessible-carousel runtime (pause control, live region, inert\n * slides). The builder's EDIT canvas boots with `edit: true` and no carousel runtime.\n */\n\n/** The string path's slider: `data-iox-slider` holds its inputs as JSON. */\nexport const SLIDER_INPUTS_ATTRIBUTE = 'data-iox-slider';\n\n/** Swiper events a builder can replay as interaction triggers (`swiperSlideChange`…). */\nexport const SWIPER_TRIGGER_EVENTS: ReadonlyArray<string> = ['slideChange', 'reachBeginning', 'reachEnd', 'autoplayStart', 'autoplayStop'];\n\nexport interface SliderBootOptions {\n edit?: boolean;\n /** Every Swiper event above, by name. */\n onEvent?: (event: string, swiper: unknown) => void;\n}\n\n/** The slider's own control parts in the DOM (never a nested slider's). */\nexport function sliderControlElements(el: Element): { prev: HTMLElement | null; next: HTMLElement | null; pagination: HTMLElement | null; pause: HTMLElement | null } {\n return {\n prev: sliderPartElement(el, SliderRole.Prev),\n next: sliderPartElement(el, SliderRole.Next),\n pagination: sliderPartElement(el, SliderRole.Pagination),\n pause: sliderPartElement(el, SliderRole.Pause),\n };\n}\n\n/** True when the rendered slider holds any control part (the model's `hasSliderParts`, read off the DOM). */\nexport function domHasSliderParts(el: Element): boolean {\n const c = sliderControlElements(el);\n return !!(c.prev || c.next || c.pagination || c.pause);\n}\n\nexport async function bootSlider(el: HTMLElement, inputs: SliderInputs, options: SliderBootOptions = {}): Promise<any> {\n const [{ default: Swiper }, swiperModules] = await Promise.all([import('swiper'), import('swiper/modules')]);\n if (!el.isConnected) return null;\n const controls = sliderControlElements(el);\n const parts = domHasSliderParts(el) ? controls : null;\n const words = sliderWords(el.ownerDocument?.documentElement?.getAttribute('lang'));\n const plan = planSwiperOptions(inputs, {\n motion: motionAllowed(), edit: options.edit, parts, words, named: !!el.getAttribute('aria-label'),\n });\n const lib = swiperModules as unknown as Record<string, unknown>;\n const modules = plan.modules.map(name => lib[name]).filter(Boolean);\n if (plan.effectModule && lib[plan.effectModule]) modules.push(lib[plan.effectModule]);\n const on: Record<string, (swiper: unknown) => void> = {};\n if (options.onEvent) for (const event of SWIPER_TRIGGER_EVENTS) on[event] = (swiper: unknown) => options.onEvent!(event, swiper);\n const swiper = new Swiper(el, { ...plan.options, modules, on } as never);\n if (!options.edit) attachCarouselA11y(swiper as unknown as CarouselSwiper, { words });\n attachSliderBar(swiper as unknown as BarSwiper);\n if (inputs.scrollPlays) prepareScrollPlay(el, swiper as unknown as { slides?: ArrayLike<unknown> });\n return swiper;\n}\n\n/** The element a slider the scroll plays is held in: its runway, the Scene root the ONE driver drives (premium M4). */\nexport const SLIDER_RUNWAY_CLASS = 'iox-slider-runway';\n/** The runway's steps (slides − 1): how many half-screens of scroll it reserves (iox-design.css). */\nexport const SLIDER_STEPS_PROPERTY = '--slider-steps';\n\n/**\n * The runway a slider the scroll plays sits in — ONE answer for the string path (it writes this wrapper, steps known at\n * render, so the page never shifts) and the component path (the same class and Scene root; its boot writes the steps).\n * Null when the scroll does not play it.\n */\nexport function sliderRunwayHtml(inputs: SliderInputs | null | undefined, slideCount: number): { open: string; close: string } | null {\n if (!(inputs?.scrollPlays === true || (inputs?.scrollPlays as unknown) === 'true')) return null;\n const steps = Math.max(0, Math.floor(slideCount) - 1);\n return { open: `<div class=\"${SLIDER_RUNWAY_CLASS}\" ${SceneAttribute.Root}=\"\" style=\"${SLIDER_STEPS_PROPERTY}: ${steps}\">`, close: '</div>' };\n}\n\n/**\n * Ready a slider the scroll plays: its runway learns how tall it is (it holds the slider mid-screen — iox-design.css) and\n * how many steps it has, its stage is marked for the scene driver, and the driver is woken — the Swiper it plays has\n * just arrived (an event, never a DOM scroll). Measured on resize, never per frame.\n */\nfunction prepareScrollPlay(el: HTMLElement, swiper: { slides?: ArrayLike<unknown> }): void {\n const runway = el.closest<HTMLElement>(`.${SLIDER_RUNWAY_CLASS}`);\n // The stage is what the runway holds: the `.swiper` itself, or the canvas's shell around it.\n const stage = runway ? Array.from(runway.children).find(c => c.contains(el)) as HTMLElement | undefined : undefined;\n if (!runway || !stage) return;\n stage.setAttribute(SceneAttribute.Stage, '');\n runway.style.setProperty(SLIDER_STEPS_PROPERTY, String(Math.max(0, (swiper.slides?.length ?? 1) - 1)));\n const measure = () => runway.style.setProperty('--slider-h', `${stage.offsetHeight}px`);\n measure();\n const Observer = (stage.ownerDocument?.defaultView as (Window & { ResizeObserver?: typeof ResizeObserver }) | null)?.ResizeObserver;\n if (Observer) new Observer(measure).observe(stage);\n el.dispatchEvent(new CustomEvent(SCENE_WAKE_EVENT, { bubbles: true }));\n}\n\n/** The inputs a string-path slider carries (`data-iox-slider`), or null. */\nexport function sliderInputsOf(el: Element): SliderInputs | null {\n const raw = el.getAttribute(SLIDER_INPUTS_ATTRIBUTE);\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw);\n return parsed && typeof parsed === 'object' ? parsed as SliderInputs : null;\n } catch {\n return null;\n }\n}\n\n/** The Swiper inputs of a saved SliderContainer node — what the string path serialises into `data-iox-slider`. */\nexport const SLIDER_INPUT_NAMES: ReadonlyArray<keyof SliderInputs> = [\n 'dir', 'direction', 'slidesPerView', 'slidesPerGroup', 'spaceBetween', 'speed', 'effect', 'grabCursor', 'centeredSlides', 'initialSlide',\n 'autoHeight', 'slideToClickedSlide', 'freeMode', 'loop', 'enableNavigation', 'enablePagination', 'enableScrollbar', 'enableAutoplay',\n 'enableKeyboard', 'enableMousewheel', 'enableZoom', 'enableGrid', 'enableParallax', 'autoplayDelay', 'autoplayPauseOnMouseEnter',\n 'autoplayDisableOnInteraction', 'paginationType', 'paginationClickable', 'paginationDynamicBullets', 'gridRows', 'breakpoints',\n 'scrollPlays',\n];\n\nexport function sliderInputsFromProps(props: Record<string, unknown>, responsive?: unknown): SliderInputs {\n const out: Record<string, unknown> = {};\n for (const name of SLIDER_INPUT_NAMES) if (props[name] !== undefined) out[name] = props[name];\n if (responsive) out['responsive'] = responsive;\n return out as SliderInputs;\n}\n","import {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { isSliderPart } from '@vectoriox/iox-ui/composite-core';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { bootSlider } from './slider-boot';\nimport { SliderInputs } from './slider-options';\n\n/**\n * `iox-slider-container` — the Slider's engine twin (component path, and the admin's Preview through the builder twin's\n * shared boot). The slides render into `.swiper-wrapper` (`childrenHost` — the `.swiper-slide` direct-child invariant,\n * slider.md); the control PARTS (CC3: Previous, Next, Pause, Pagination — `childHostFor`) render beside it, inside\n * `.swiper`: those before the first slide before the wrapper, the rest after it. A saved slider with no parts keeps\n * Swiper-drawn controls (the legacy switches). Swiper is booted by the ONE shared `bootSlider`. A slider the scroll plays\n * (premium M4) sits in its runway — the string path writes the same `iox-slider-runway` wrapper.\n */\n@Component({\n selector: 'iox-slider-container',\n template: `\n <div [class.iox-slider-runway]=\"scrollPlays\" [attr.data-iox-scene]=\"scrollPlays ? '' : null\" [style.display]=\"scrollPlays ? null : 'contents'\">\n <div class=\"swiper\" [class]=\"'swiper iox-node-' + nodeId\" [attr.dir]=\"dir\" [style.direction]=\"dir\"\n [style.--swiper-navigation-color]=\"legacyControls ? (navigationColor || null) : null\"\n [style.--swiper-pagination-color]=\"legacyControls ? (paginationColor || null) : null\" #swiperEl>\n <ng-container #leadHost></ng-container>\n <div class=\"swiper-wrapper\">\n <ng-container #childrenHost></ng-container>\n </div>\n <ng-container #trailHost></ng-container>\n <div *ngIf=\"legacyControls && enableNavigation\" class=\"swiper-button-prev\"></div>\n <div *ngIf=\"legacyControls && enableNavigation\" class=\"swiper-button-next\"></div>\n <div *ngIf=\"legacyControls && enablePagination\" class=\"swiper-pagination\"></div>\n <div *ngIf=\"enableScrollbar\" class=\"swiper-scrollbar\"></div>\n </div>\n </div>\n `,\n styles: [`.swiper { width: 100%; height: 100%; box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientSliderContainerComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** Language (writing) direction — the `dir` attribute, so it survives SSR and drives Swiper's RTL layout. */\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n /** `'off' | 'loop' | 'rewind'` (or a boolean from older saves). */\n @Input() loop: boolean | string = 'off';\n @Input() slidesPerView: number | 'auto' = 1;\n @Input() slidesPerGroup = 1;\n @Input() spaceBetween = 0;\n @Input() speed = 300;\n @Input() effect = 'slide';\n @Input() grabCursor = true;\n @Input() centeredSlides = false;\n @Input() initialSlide = 0;\n @Input() autoHeight = false;\n @Input() slideToClickedSlide = false;\n @Input() freeMode = false;\n @Input() enableNavigation = false;\n @Input() enablePagination = false;\n @Input() enableScrollbar = false;\n @Input() enableAutoplay = false;\n @Input() enableKeyboard = false;\n @Input() enableMousewheel = false;\n @Input() enableZoom = false;\n @Input() enableGrid = false;\n @Input() enableParallax = false;\n @Input() autoplayDelay = 3000;\n @Input() autoplayPauseOnMouseEnter = true;\n @Input() autoplayDisableOnInteraction = false;\n @Input() paginationType: 'bullets' | 'fraction' | 'progressbar' = 'bullets';\n @Input() paginationClickable = true;\n @Input() paginationDynamicBullets = false;\n @Input() navigationColor = '';\n @Input() paginationColor = '';\n @Input() gridRows = 1;\n /** Advanced escape hatch: raw Swiper `breakpoints` JSON, merged OVER the per-breakpoint traits' map. */\n @Input() breakpoints = '';\n /** The node's per-breakpoint overrides (only its `inputs` layer is read here). */\n @Input() responsive: ResponsiveOverrides | null = null;\n /** The slider's controls are parts (set by the renderer from the node): Swiper draws none of its own. */\n @Input() controlParts = false;\n /** Premium M4: the scroll plays it — a runway (a Scene root the ONE driver drives) holds it mid-screen; otherwise the\n * wrapper is `display: contents` and the slider lays out exactly as before. */\n @Input() scrollPlays = false;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true }) childrenHost!: ViewContainerRef;\n @ViewChild('leadHost', { read: ViewContainerRef, static: true }) leadHost!: ViewContainerRef;\n @ViewChild('trailHost', { read: ViewContainerRef, static: true }) trailHost!: ViewContainerRef;\n @ViewChild('swiperEl', { static: true }) swiperEl!: { nativeElement: HTMLElement };\n\n private swiper: any = null;\n private slidesSeen = false;\n private readonly instanceRegistry = inject(ComponentInstanceRegistryService);\n\n constructor(@Inject(PLATFORM_ID) private platformId: object) {}\n\n /** Swiper draws its own arrows / dots only for a saved slider whose controls are not parts yet. */\n get legacyControls(): boolean {\n return !this.controlParts;\n }\n\n /** Where a child renders: a control part beside the wrapper (before it until the first slide, after it from\n * then on), a slide into the wrapper. The renderer asks in the children's order. */\n childHostFor(child: { role?: string | null } | null | undefined): ViewContainerRef {\n if (!isSliderPart(child)) {\n this.slidesSeen = true;\n return this.childrenHost;\n }\n return this.slidesSeen ? this.trailHost : this.leadHost;\n }\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n // Defer so all child slides and parts are rendered first.\n requestAnimationFrame(() => void this.boot());\n }\n }\n\n ngOnDestroy(): void {\n if (this.swiper) {\n this.swiper.destroy(true, true);\n this.swiper = null;\n this.instanceRegistry.unregister(this.nodeId);\n }\n }\n\n private async boot(): Promise<void> {\n const el = this.swiperEl?.nativeElement;\n if (!el) return;\n this.swiper = await bootSlider(el, this.inputs());\n if (this.swiper) this.instanceRegistry.register(this.nodeId, this.swiper);\n }\n\n private inputs(): SliderInputs {\n return {\n dir: this.dir, direction: this.direction, loop: this.loop, slidesPerView: this.slidesPerView, slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween, speed: this.speed, effect: this.effect, grabCursor: this.grabCursor, centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide, autoHeight: this.autoHeight, slideToClickedSlide: this.slideToClickedSlide, freeMode: this.freeMode,\n enableNavigation: this.enableNavigation, enablePagination: this.enablePagination, enableScrollbar: this.enableScrollbar,\n enableAutoplay: this.enableAutoplay, enableKeyboard: this.enableKeyboard, enableMousewheel: this.enableMousewheel,\n enableZoom: this.enableZoom, enableGrid: this.enableGrid, enableParallax: this.enableParallax, autoplayDelay: this.autoplayDelay,\n autoplayPauseOnMouseEnter: this.autoplayPauseOnMouseEnter, autoplayDisableOnInteraction: this.autoplayDisableOnInteraction,\n paginationType: this.paginationType, paginationClickable: this.paginationClickable, paginationDynamicBullets: this.paginationDynamicBullets,\n gridRows: this.gridRows, breakpoints: this.breakpoints, responsive: this.responsive, scrollPlays: this.scrollPlays,\n };\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Client-engine slide. The HOST element (`iox-slider-slide`) itself carries the\n * `swiper-slide` class so it is a DIRECT child of `.swiper-wrapper` — Swiper only\n * recognises slides that are direct children (the `.swiper-slide` direct-child\n * invariant; see iox-ai-guidance architecture/builder/slider.md). A wrapper div\n * would nest `.swiper-slide` one level too deep and Swiper would ignore the slides.\n *\n * The shared `iox-node-{id}` class is applied to the same host so the page-level\n * CSS rules match (parity with the string renderer / builder).\n */\n@Component({\n selector: 'iox-slider-slide',\n template: `<ng-container #childrenHost></ng-container>`,\n styles: [`:host { display: block; box-sizing: border-box; }`],\n host: { '[class]': `'swiper-slide iox-node-' + nodeId` },\n standalone: false,\n})\nexport class ClientSliderSlideComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Directive-host List: the real `<ul>`/`<ol>` IS the host — no `iox-list` wrapper, no\n * inner/outer split. The tag is chosen by whoever CREATES the component (engine passes\n * `hostElement: document.createElement(htmlTag)`), NOT an internal `*ngIf`. Children render\n * into the host via `childrenHost`. `start`/`reversed` are host attrs (only meaningful on `<ol>`).\n */\n@Component({\n selector: 'ul[iox-list],ol[iox-list]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n '[attr.start]': \"htmlTag === 'ol' && start !== '' && start != null ? start : null\",\n '[attr.reversed]': \"htmlTag === 'ol' && reversed ? '' : null\",\n },\n // No display/position in :host (they'd out-specify styleProps). <ul>/<ol> are block by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientListComponent {\n @Input() htmlTag: 'ul' | 'ol' = 'ul';\n @Input() start: string | number = '';\n @Input() reversed = false;\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * Directive-host List item: the real `<li>` IS the host — no `iox-list-item` wrapper, no\n * inner/outer split. Children render into the `<li>` via `childrenHost`. Fixed tag (`<li>`),\n * so the engine creates it with `vcr.createComponent` (no `hostElement` needed).\n */\n@Component({\n selector: 'li[iox-list-item]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: { '[class]': \"'iox-node-' + nodeId\" },\n // No display/position in :host (they'd out-specify styleProps). <li> is list-item by default.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class ClientListItemComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","/**\n * Gallery — data model + the SHARED \"what are the image URLs\" resolver.\n *\n * A Gallery is populated one of two ways (see gallery-component-plan.md):\n * - **Manual**: an ordered `GalleryImage[]` trait. Each item is a raw/filebox URL OR a per-item\n * binding path resolved against the item/route context.\n * - **Bound**: the whole gallery repeats over a data source (a collection, or an array property\n * inside one resource via `sourcePath`) — the items come from the shared `resolveRepeaterItems`,\n * and one field of each record (`imageField`) is the URL.\n *\n * `resolveGalleryUrls` is the SINGLE place both the builder canvas and the SSR/runtime engine turn a\n * node's config into the final `string[]` the crossfade loop consumes — so both sides show the same\n * images. It is pure and transport-agnostic; never fork it. It reuses `getByPath` (the same path\n * reader used by data-source resolving) so binding paths behave identically everywhere.\n */\nimport { getByPath } from '@vectoriox/iox-ui/data-core';\n\n/** One manual gallery entry. Exactly one of `url` / `binding` is the source; `binding` wins when set. */\nexport interface GalleryImage {\n /** Manual URL or filebox-picked media URL. Ignored when `binding` is set. */\n url?: string;\n /** Per-item binding path, resolved against the render context (e.g. `product.hero.url`). */\n binding?: string;\n /** Optional alt text. */\n alt?: string;\n}\n\n/** Bound-mode input: the resolved records + which field of each record holds the image URL. */\nexport interface GalleryBoundSource {\n items: any[];\n /** Path into each record for the URL. Empty/undefined → the record itself is treated as the URL. */\n imageField?: string;\n}\n\n/**\n * Resolve a gallery's configured images to the flat, display-ready `string[]` the loop renders.\n * Pure. Empty/whitespace URLs are dropped so a half-filled manual list never yields blank frames.\n *\n * @param images manual `GalleryImage[]` (manual mode). Ignored when `bound` is provided.\n * @param bound bound-mode records + image field. When present, takes precedence over `images`.\n * @param ctx render context for per-item bindings (item/route data). Defaults to `{}`.\n */\nexport function resolveGalleryUrls(\n images: readonly (GalleryImage | string)[] | undefined,\n bound: GalleryBoundSource | null | undefined,\n ctx: Record<string, any> = {},\n): string[] {\n if (bound) {\n const field = bound.imageField;\n return (bound.items ?? [])\n .map(item => (field ? getByPath(item, field) : item))\n .map(coerceUrl)\n .filter((u): u is string => !!u);\n }\n return (images ?? [])\n .map(normalizeGalleryImage)\n .map(img => (img?.binding ? getByPath(ctx, img.binding) : img?.url))\n .map(coerceUrl)\n .filter((u): u is string => !!u);\n}\n\n/**\n * A plain string is a valid entry — a pasted URL list, an older saved node, or a bound field that\n * yielded a URL directly. Accepting it HERE (not in one consumer) is what keeps the two render paths\n * honest: `ClientGalleryComponent` used to normalise privately, so the engine's string-renderer\n * fallback — which calls this function directly — silently dropped every string-shaped image and\n * rendered an empty gallery. One resolver, one answer. See gallery-component-plan.md.\n */\nexport function normalizeGalleryImage(image: GalleryImage | string | null | undefined): GalleryImage | undefined {\n if (typeof image === 'string') return { url: image };\n return image ?? undefined;\n}\n\n/** A resolved value becomes a URL only if it's a non-empty string; everything else drops out. */\nfunction coerceUrl(value: any): string | null {\n if (typeof value !== 'string') return null;\n const trimmed = value.trim();\n return trimmed ? trimmed : null;\n}\n\n/**\n * Parse a pasted block of URLs (newline- and/or comma-separated) into `GalleryImage[]`. Used by the\n * MediaList trait editor's \"paste URL list\" affordance. Pure so it can be unit-tested + reused.\n */\nexport function parseUrlList(text: string): GalleryImage[] {\n if (!text) return [];\n return text\n .split(/[\\n,]+/)\n .map(s => s.trim())\n .filter(Boolean)\n .map(url => ({ url }));\n}\n","/**\n * Gallery effect registry — the SHARED, effect-agnostic description of how each gallery slide looks\n * and animates in a given crossfade state. Modeled on `binding-pipes.ts` / `PAGE_TRANSITION_PRESETS`:\n * a descriptor map + a resolve fn, all pure, consumed by BOTH the builder twin and the engine twin so\n * the fade looks identical on the canvas and the live site.\n *\n * v1 ships only `fade` (the look ported from `sites/interior-design` fade-gallery). Adding `slide`,\n * `zoom`, `kenburns`, … later is a new entry here + its CSS — NO component refactor, because the\n * component only ever asks `resolveGalleryEffect(id).buildSlideStyle(state)` for per-slide inline CSS.\n *\n * See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n */\n\n/** Timing knobs for one running gallery. Overridable per-node via traits; defaults live per effect. */\nexport interface GalleryDurations {\n /** ms an image is held fully visible before the next crossfade begins. */\n showMs: number;\n /** ms the opacity crossfade takes. */\n fadeMs: number;\n}\n\n/** The state of a single slide at render time, from which an effect derives its inline CSS. */\nexport interface GallerySlideState {\n /** This slide is the current (incoming/visible) one. */\n active: boolean;\n /** This slide is the outgoing one, mid-crossfade. */\n fadingOut: boolean;\n /** The loop has completed its first activation RAF (used to suppress the initial transition flash). */\n firstCycleActive: boolean;\n durations: GalleryDurations;\n}\n\nexport interface GalleryEffect {\n id: string;\n /** Default English label; consumers may map `id` to their own i18n key. */\n label: string;\n /** Default timing for this effect; a node's traits may override either value. */\n defaults: GalleryDurations;\n /** Inline style map for one slide in the given state. Pure — no DOM, no side effects. */\n buildSlideStyle(state: GallerySlideState): Record<string, string>;\n}\n\n/** The ken-burns zoom baked into the reference fade look (scale 1 → 1.05 over show+fade). */\nconst FADE_ZOOM_EXTRA_MS = 1000;\n\nconst fadeEffect: GalleryEffect = {\n id: 'fade',\n label: 'Fade',\n defaults: { showMs: 4000, fadeMs: 1000 },\n buildSlideStyle(state: GallerySlideState): Record<string, string> {\n const { active, fadingOut, firstCycleActive, durations } = state;\n const zoomMs = durations.showMs + durations.fadeMs + FADE_ZOOM_EXTRA_MS;\n // Before the first cycle activates, everything is flat + instant so there is no entry flash.\n if (!firstCycleActive) {\n return { opacity: '0', transform: 'scale(1)', transition: 'opacity 0ms, transform 0ms' };\n }\n const visible = active && !fadingOut;\n const engaged = active || fadingOut; // current or outgoing slide is zoomed-in\n return {\n opacity: visible ? '1' : '0',\n transform: engaged ? 'scale(1.05)' : 'scale(1)',\n transition:\n `opacity ${durations.fadeMs}ms cubic-bezier(0.77, 0, 0.175, 1), ` +\n `transform ${zoomMs}ms linear`,\n };\n },\n};\n\n/** The registry — one entry per effect. Keyed by id; unknown ids fall back to `fade`. */\nexport const GALLERY_EFFECTS: Record<string, GalleryEffect> = {\n fade: fadeEffect,\n};\n\n/** Resolve an effect id to its descriptor, defaulting to `fade` (forward-compatible with new ids). */\nexport function resolveGalleryEffect(id: string | undefined | null): GalleryEffect {\n return (id && GALLERY_EFFECTS[id]) || GALLERY_EFFECTS['fade'];\n}\n\n/** Metadata that DATA-DRIVES the authoring UI's effect dropdown (no per-effect if-chains). */\nexport interface GalleryEffectDescriptor {\n id: string;\n label: string;\n}\n\nexport const GALLERY_EFFECT_DESCRIPTORS: GalleryEffectDescriptor[] = Object.values(GALLERY_EFFECTS).map(\n e => ({ id: e.id, label: e.label }),\n);\n","/**\n * Gallery crossfade loop — the SHARED, framework-free state machine that drives which image is\n * visible over time. Ported from the reference fade-gallery's `scheduleCycle` / `tryStartLoop` /\n * first-cycle-activation logic, with Angular specifics removed so BOTH the builder twin and the\n * engine/runtime twin (`iox-gallery`) run ONE implementation — never a forked copy that drifts.\n *\n * The loop owns only *timing + index* state and emits it through `onChange`; the component maps that\n * state to CSS via the effect registry (`gallery-effects.ts`). Timers are injected so the loop is\n * deterministic under fake timers in tests and platform-guardable in the engine.\n *\n * See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n */\n\n/** The observable state of a running loop. */\nexport interface GalleryLoopState {\n /** Index of the current (incoming/visible) image. */\n currentIndex: number;\n /** Index of the outgoing image mid-crossfade, or null when settled. */\n fadingOutIndex: number | null;\n /**\n * True once the loop has completed its initial activation tick. Slides render flat + instant until\n * this flips, so the first paint doesn't flash a transition (matches the reference gallery).\n */\n firstCycleActive: boolean;\n}\n\n/** Injectable timer surface — real timers in production, fake in tests, no-op RAF on the server. */\nexport interface GalleryLoopScheduler {\n setTimer(fn: () => void, ms: number): any;\n clearTimer(handle: any): void;\n /** Schedule a callback for \"next frame\". The engine/tests may implement this as a microtask/timeout. */\n nextFrame(fn: () => void): any;\n cancelFrame(handle: any): void;\n}\n\n/** Default scheduler over the platform's `setTimeout` / `requestAnimationFrame` (with a timer fallback). */\nexport const DEFAULT_GALLERY_SCHEDULER: GalleryLoopScheduler = {\n setTimer: (fn, ms) => setTimeout(fn, ms),\n clearTimer: h => clearTimeout(h),\n nextFrame: fn =>\n typeof requestAnimationFrame === 'function' ? requestAnimationFrame(fn) : setTimeout(fn, 16),\n cancelFrame: h => {\n if (typeof cancelAnimationFrame === 'function') cancelAnimationFrame(h);\n else clearTimeout(h);\n },\n};\n\nexport interface GalleryLoopOptions {\n showMs: number;\n fadeMs: number;\n onChange: (state: GalleryLoopState) => void;\n scheduler?: GalleryLoopScheduler;\n /**\n * False under reduced motion (`motionAllowed()`, CC1 R1): the loop shows the first image and never\n * advances. Default true. The pause control for a moving gallery is CC3 (WCAG 2.2.2).\n */\n motionAllowed?: boolean;\n}\n\nexport class GalleryLoop {\n private readonly scheduler: GalleryLoopScheduler;\n private showMs: number;\n private fadeMs: number;\n private readonly onChange: (state: GalleryLoopState) => void;\n private readonly motionAllowed: boolean;\n\n private count = 0;\n private currentIndex = 0;\n private fadingOutIndex: number | null = null;\n private firstCycleActive = false;\n\n private cycleTimer: any = null;\n private fadeTimer: any = null;\n private frameHandle: any = null;\n /** Bumped on every (re)start so a stale timer callback from a previous run is ignored. */\n private runToken = 0;\n private running = false;\n\n constructor(opts: GalleryLoopOptions) {\n this.scheduler = opts.scheduler ?? DEFAULT_GALLERY_SCHEDULER;\n this.showMs = opts.showMs;\n this.fadeMs = opts.fadeMs;\n this.onChange = opts.onChange;\n this.motionAllowed = opts.motionAllowed !== false;\n }\n\n get state(): GalleryLoopState {\n return {\n currentIndex: this.currentIndex,\n fadingOutIndex: this.fadingOutIndex,\n firstCycleActive: this.firstCycleActive,\n };\n }\n\n /** Start (or restart) the loop for `count` images. A count < 2 shows the single image without cycling. */\n start(count: number): void {\n this.stop();\n this.count = Math.max(0, count | 0);\n this.currentIndex = 0;\n this.fadingOutIndex = null;\n this.firstCycleActive = false;\n if (this.count === 0) {\n this.emit();\n return;\n }\n this.running = true;\n const token = ++this.runToken;\n // Activate on the next frame so the first paint is flat (no entry-transition flash), then\n // begin cycling only when there is more than one image to advance through.\n this.frameHandle = this.scheduler.nextFrame(() => {\n if (token !== this.runToken || !this.running) return;\n this.firstCycleActive = true;\n this.emit();\n if (this.count > 1 && this.motionAllowed) this.scheduleCycle(token);\n });\n }\n\n /** Update timing live. Takes effect on the next scheduled cycle; does not restart the loop. */\n setDurations(showMs: number, fadeMs: number): void {\n this.showMs = showMs;\n this.fadeMs = fadeMs;\n }\n\n /** Stop and clear all timers. Idempotent. State is retained (call `start` to reset). */\n stop(): void {\n this.running = false;\n this.runToken++;\n if (this.cycleTimer != null) { this.scheduler.clearTimer(this.cycleTimer); this.cycleTimer = null; }\n if (this.fadeTimer != null) { this.scheduler.clearTimer(this.fadeTimer); this.fadeTimer = null; }\n if (this.frameHandle != null) { this.scheduler.cancelFrame(this.frameHandle); this.frameHandle = null; }\n }\n\n private scheduleCycle(token: number): void {\n if (token !== this.runToken || !this.running || this.count < 2) return;\n this.cycleTimer = this.scheduler.setTimer(() => {\n if (token !== this.runToken || !this.running) return;\n this.fadingOutIndex = this.currentIndex;\n this.currentIndex = (this.currentIndex + 1) % this.count;\n this.emit();\n this.fadeTimer = this.scheduler.setTimer(() => {\n if (token !== this.runToken || !this.running) return;\n this.fadingOutIndex = null;\n this.emit();\n this.scheduleCycle(token);\n }, this.fadeMs);\n }, this.showMs);\n }\n\n private emit(): void {\n this.onChange(this.state);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { GalleryImage, resolveGalleryUrls } from './gallery.model';\nimport { resolveGalleryEffect } from './gallery-effects';\nimport { GalleryLoop } from './gallery-loop';\nimport { motionAllowed } from '../../motion/motion';\n\n/**\n * `iox-gallery` — the engine/runtime twin of the Gallery builder component (the builder twin\n * `app-builder-gallery` arrives in Phase 2). It runs the SHARED crossfade loop + effect registry from\n * `@vectoriox/iox-ui`, so the fade behaves identically on the canvas and the live site — no forked\n * animation logic. See iox-ai-guidance/architecture/builder/gallery-component-plan.md.\n *\n * Population: v1 drives the loop from the `images` input (manual mode). Data-source binding\n * (`source`/`sourcePath`) is Phase 3 — this component already resolves through `resolveGalleryUrls`,\n * so that only adds a bound-source input, not new render logic.\n *\n * SSR / no-JS: on the server the loop never starts, so the **first image renders visible** as a static\n * frame (SEO + no-JS baseline). In the browser `ngAfterViewInit` starts the loop, which begins on the\n * same index 0 — so the static frame and the first live frame match and there is no hydration flash.\n */\n@Component({\n selector: 'iox-gallery',\n // `data-iox-empty` while there is nothing to show — the shared `iox-design.css` fills a MARKED\n // empty gallery with `surface-2` (DS3); an unmarked one matches no rule and renders as before.\n host: { '[attr.data-iox-empty]': \"urls.length ? null : ''\" },\n template: `\n <div class=\"iox-gallery\" [class]=\"'iox-node-' + nodeId\">\n <div *ngFor=\"let url of urls; index as i\"\n class=\"iox-gallery__img\"\n [style.background-image]=\"'url(' + url + ')'\"\n [ngStyle]=\"slideStyle(i)\"></div>\n <div class=\"iox-gallery__overlay\"></div>\n </div>\n `,\n styles: [`\n :host { display: block; }\n /* Size (width/height/aspect-ratio) comes from the style engine's .iox-node-{id} rule — do NOT\n force width/height here. A scoped rule gets an encapsulation-attribute selector (higher\n specificity) and would beat the node's own height, collapsing the absolutely-positioned\n image layers to 0. See gallery-component-plan.md. */\n .iox-gallery {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n }\n /* Each image is a stacked, absolutely-positioned layer; the per-slide opacity / transform /\n transition come from the effect registry via [ngStyle], not from here. The fade look's\n feather mask + brightness + cinematic overlay live in the effect's visual language and are\n applied as base layer styles. */\n .iox-gallery__img {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n pointer-events: none;\n opacity: 0;\n filter: brightness(1.35);\n -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.1) 95%, rgba(0,0,0,0) 100%);\n mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.1) 95%, rgba(0,0,0,0) 100%);\n }\n .iox-gallery__overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 3;\n /* The fade's mask, brightness and cinematic overlay are FUNCTIONAL (they make the\n crossfade read), not a themeable look: literals, mirrored by the engine's string\n fallback. The contract defines no token for them. */\n background: linear-gradient(to bottom,\n rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 20%,\n rgba(0,0,0,0.15) 80%, rgba(0,0,0,0.5) 100%);\n }\n `],\n standalone: false,\n})\nexport class ClientGalleryComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n @Input() effect = 'fade';\n @Input() autoStart = true;\n /** Layout mode — only `'stack'` is rendered in v1 (`'grid'` scaffolded for later). */\n @Input() layout: 'stack' | 'grid' = 'stack';\n\n // ── Inputs that mutate live state use SETTERS, not ngOnChanges ──────────────────────────────\n // The builder trait panel pushes edits via DIRECT property assignment (`instance.images = v`),\n // which does NOT trigger ngOnChanges — so a gallery that recomputed in ngOnChanges never refreshed\n // when you added an image on the canvas. A setter fires on BOTH direct assignment (builder panel)\n // and setInput (SSR engine / render.directive), so it's the one path that works everywhere.\n\n private _images: (GalleryImage | string)[] = [];\n /** Manual images — `GalleryImage[]` or a plain `string[]` of URLs (normalised on set). */\n @Input() set images(v: (GalleryImage | string)[]) {\n this._images = v ?? [];\n this.urls = resolveGalleryUrls(this._images, null);\n // A live edit (image added/removed/reordered) while the loop runs → restart on the new set so\n // the canvas reflects it and the loop cycles through the new count.\n if (this.loopActive) this.startLoop();\n }\n get images(): (GalleryImage | string)[] { return this._images; }\n\n private _showDuration = 4000;\n @Input() set showDuration(v: number) { this._showDuration = v; this.loop?.setDurations(v, this._fadeDuration); }\n get showDuration(): number { return this._showDuration; }\n\n private _fadeDuration = 1000;\n @Input() set fadeDuration(v: number) { this._fadeDuration = v; this.loop?.setDurations(this._showDuration, v); }\n get fadeDuration(): number { return this._fadeDuration; }\n\n /** The flat, display-ready URLs the loop cycles. Recomputed whenever `images` is set. */\n urls: string[] = [];\n\n private currentIndex = 0;\n private fadingOutIndex: number | null = null;\n private started = false;\n /** True once the loop has been started (in ngAfterViewInit) — gates the setter-driven restart. */\n private loopActive = false;\n\n private loop: GalleryLoop | null = null;\n private readonly isBrowser: boolean;\n\n constructor(\n @Inject(PLATFORM_ID) platformId: object,\n private cdr: ChangeDetectorRef,\n ) {\n this.isBrowser = isPlatformBrowser(platformId);\n }\n\n ngAfterViewInit(): void {\n if (this.isBrowser && this.autoStart) {\n this.startLoop();\n }\n }\n\n ngOnDestroy(): void {\n this.loop?.stop();\n this.loop = null;\n this.loopActive = false;\n }\n\n /** Per-slide inline style. Before the loop activates (server + no-JS + pre-first-frame) the first\n * image is the visible static frame; once running, the effect owns each slide's look. */\n slideStyle(i: number): Record<string, string> {\n if (!this.started) {\n return i === 0\n ? { opacity: '1', transform: 'scale(1)', transition: 'none' }\n : { opacity: '0', transform: 'scale(1)', transition: 'none' };\n }\n return resolveGalleryEffect(this.effect).buildSlideStyle({\n active: i === this.currentIndex,\n fadingOut: i === this.fadingOutIndex,\n firstCycleActive: true,\n durations: { showMs: this.showDuration, fadeMs: this.fadeDuration },\n });\n }\n\n private startLoop(): void {\n if (!this.isBrowser) return;\n this.loopActive = true;\n this.loop?.stop();\n this.loop = new GalleryLoop({\n showMs: this.showDuration,\n fadeMs: this.fadeDuration,\n // Reduced motion (CC1 R1): the first image, standing still.\n motionAllowed: motionAllowed(),\n onChange: state => {\n this.currentIndex = state.currentIndex;\n this.fadingOutIndex = state.fadingOutIndex;\n this.started = state.firstCycleActive;\n this.cdr.markForCheck();\n },\n });\n this.loop.start(this.urls.length);\n }\n\n}\n","// The persisted shape of a form. Pure types + the one derived constant each renderer needs.\n//\n// A FormSpec is DERIVED from the node tree (see `collect.ts`), never hand-maintained beside it —\n// there is one source of truth for \"what fields does this form have\", and it is the tree the author\n// edited. The builder writes the derived spec into the saved page so the SERVER can re-validate\n// against it without re-implementing the builder's tree walk.\n\n/** What the visitor actually types into. Chosen by a trait; it also implies a validation rule. */\nexport enum ControlType {\n Text = 'text',\n Email = 'email',\n Tel = 'tel',\n Url = 'url',\n Number = 'number',\n Password = 'password',\n Textarea = 'textarea',\n Select = 'select',\n Checkbox = 'checkbox',\n /** A checkbox in switch clothing (role=\"switch\") — consent toggles, settings-style forms. */\n Switch = 'switch',\n /** A slider over a numeric range — min/max/step ride the field. */\n Range = 'range',\n Radio = 'radio',\n /** One or several of a few visible choices — chips (the default) or a list of radios / checkboxes (premium N1).\n * Its `multiple` trait picks the value's shape: a string, or a list of strings. */\n Choices = 'choices',\n /** A date the visitor picks from the look's calendar (premium N8) — a button that reads the date in words and a\n * hidden input carrying the ISO `YYYY-MM-DD` value. Never the browser's own date box. */\n Date = 'date',\n Time = 'time',\n File = 'file',\n /** Not shown; carries a constant or a bound value (campaign, source page, …). */\n Hidden = 'hidden',\n}\n\n/** The v1 rule grammar. Phase 3's conditional logic reuses these same names for its conditions. */\nexport enum RuleName {\n Required = 'required',\n MinLength = 'minLength',\n MaxLength = 'maxLength',\n Min = 'min',\n Max = 'max',\n Pattern = 'pattern',\n /** Cross-field: this value must equal another field's (confirm email / password). */\n Matches = 'matches',\n /** A checkbox that must be ticked — terms, consent. */\n Accepted = 'accepted',\n FileType = 'fileType',\n FileSize = 'fileSize',\n /** IMPLIED, never authored: an answer of a Choices / Radio / Dropdown must be one of the field's own options\n * (premium N1) — a hand-crafted POST cannot file a value the form never offered. */\n OneOf = 'oneOf',\n /** IMPLIED, never authored: a Date's answer is a real `YYYY-MM-DD` day (premium N8). */\n ValidDate = 'validDate',\n}\n\n/** How a Choices field draws its options (premium N1). */\nexport enum ChoiceAppearance {\n /** Each option a chip — the label is the chip; the native input inside it is visually hidden. */\n Chips = 'chips',\n /** The options as rows of the look's own radio / checkbox (DS9.1). */\n List = 'list',\n}\n\n/** Named regexes so an author picks \"Email\" rather than writing one. */\nexport enum PatternPreset {\n Email = 'email',\n Phone = 'phone',\n Url = 'url',\n Digits = 'digits',\n Letters = 'letters',\n Slug = 'slug',\n}\n\n/**\n * Deliberately permissive. A validator that rejects `user+tag@sub.domain.co.uk` or a real-world\n * phone number is worse than one that lets a typo through: the address gets verified by sending to\n * it, and a false rejection is a lost lead with no recourse.\n */\nexport const PATTERN_PRESETS: Readonly<Record<PatternPreset, RegExp>> = Object.freeze({\n [PatternPreset.Email]: /^[^\\s@]+@[^\\s@.]+(\\.[^\\s@.]+)+$/,\n [PatternPreset.Phone]: /^\\+?[\\d\\s().-]{6,20}$/,\n [PatternPreset.Url]: /^(https?:\\/\\/)?[^\\s.]+\\.[^\\s]{2,}$/i,\n [PatternPreset.Digits]: /^\\d+$/,\n [PatternPreset.Letters]: /^[\\p{L}\\s'-]+$/u,\n [PatternPreset.Slug]: /^[a-z0-9]+(-[a-z0-9]+)*$/,\n});\n\nexport interface ValidationRule {\n name: RuleName;\n /** `{ n }` for lengths/bounds · `{ preset } | { regex }` for pattern · `{ field }` for matches. */\n params?: Record<string, any>;\n /** Author's override. Absent → the shared message catalog supplies a translated key. */\n message?: string;\n}\n\nexport interface FieldOption {\n label: string;\n value: string;\n}\n\n/** Options pulled from a data source instead of typed by hand (a Select of CMS categories). */\nexport interface FieldOptionSource {\n source: string;\n sourcePath?: string;\n valuePath: string;\n labelPath: string;\n}\n\nexport interface FieldSpec {\n /** The submitted key. Derived from the label, unique within the form, editable. */\n name: string;\n control: ControlType;\n label: string;\n /** Surfaced as its own switch in the panel rather than buried in the rule list. */\n required?: boolean;\n rules?: ValidationRule[];\n options?: FieldOption[];\n optionsSource?: FieldOptionSource;\n defaultValue?: any;\n /** A Choices field that takes several answers: its value is a list (premium N1). */\n multiple?: boolean;\n}\n\n/** When a field is validated, once the author has stopped deciding it per field. */\nexport enum FeedbackTiming {\n /** Validate on submit, then live per-field once that field has been touched or has failed. */\n Smart = 'smart',\n Submit = 'submit',\n Live = 'live',\n}\n\n/** What happens to a submission, in order. Card #1 (`store`) is always present. */\nexport interface SubmitAction {\n type: string;\n config?: Record<string, any>;\n /** `retry` (default) · `fail` · `ignore`. */\n onFailure?: 'retry' | 'fail' | 'ignore';\n}\n\nexport interface FormSpec {\n formId: string;\n /** Author-facing name — the submissions inbox groups by it. */\n name: string;\n feedback: FeedbackTiming;\n fields: FieldSpec[];\n actions: SubmitAction[];\n antiSpam: { honeypot: boolean; minFillMs: number; turnstile?: boolean };\n retention?: { days: number };\n}\n\n/**\n * The rule a control type implies with no configuration. Choosing \"Email\" IS choosing email\n * validation — the single biggest reason the panel can stay empty and still validate well.\n */\nexport const IMPLIED_PATTERN: Readonly<Partial<Record<ControlType, PatternPreset>>> = Object.freeze({\n [ControlType.Email]: PatternPreset.Email,\n [ControlType.Tel]: PatternPreset.Phone,\n [ControlType.Url]: PatternPreset.Url,\n});\n\n/**\n * Whether this field's answer is a LIST rather than one value — a file list, or a Choices field that takes several\n * (premium N1). Per FIELD, not per control: the same Choices control is single or multiple by its `multiple` trait.\n * ONE reading for collect, validate, the runtimes' transport and the server (replaced the control-only\n * `MULTI_VALUE_CONTROLS`, which nothing read).\n */\nexport function isMultiValueField(field: Pick<FieldSpec, 'control' | 'multiple'> | null | undefined): boolean {\n if (!field) return false;\n if (field.control === ControlType.File) return true;\n return field.control === ControlType.Choices && field.multiple === true;\n}\n\n/** The controls whose answers must be one of the field's own options (the implied `oneOf` rule). */\nexport const OPTION_CONTROLS: ReadonlySet<ControlType> = new Set([ControlType.Choices, ControlType.Radio, ControlType.Select]);\n","// The default message for every rule, as an i18n KEY — never a rendered string.\n//\n// This is what lets the Validation panel stay empty and still produce good errors: an author who\n// configures nothing gets \"Enter a valid email address\", not \"Invalid\". The author's own `message`\n// on a rule always wins; this is the fallback, and it is the only place a default lives.\n//\n// Consumers translate the key with their own i18n (the CMS client via ngx-translate, the engine via\n// the page's locale bundle). The backend returns the key too, so a server-side rejection renders in\n// the visitor's language rather than in the server's.\n\nimport { RuleName } from './form.model';\n\n/** Namespace for every forms validation key. Keep in sync with `en.json` / `he.json`. */\nexport const MESSAGE_NAMESPACE = 'forms.validation';\n\n/**\n * Rule → i18n key. Params travel beside the key (`{ n: 8 }`, `{ field: 'Email' }`) so a translation\n * can place the number wherever its grammar needs it, rather than having it baked into the string.\n */\nexport const RULE_MESSAGE_KEYS: Readonly<Record<RuleName, string>> = Object.freeze({\n [RuleName.Required]: `${MESSAGE_NAMESPACE}.required`,\n [RuleName.MinLength]: `${MESSAGE_NAMESPACE}.minLength`,\n [RuleName.MaxLength]: `${MESSAGE_NAMESPACE}.maxLength`,\n [RuleName.Min]: `${MESSAGE_NAMESPACE}.min`,\n [RuleName.Max]: `${MESSAGE_NAMESPACE}.max`,\n // ⚠️ `.pattern.generic`, not `.pattern`: the preset keys below live UNDER `pattern`, and a JSON\n // translation bundle cannot have the same key be both a string and an object — ngx-translate\n // would hand back the object (or the raw key) for the generic case.\n [RuleName.Pattern]: `${MESSAGE_NAMESPACE}.pattern.generic`,\n [RuleName.Matches]: `${MESSAGE_NAMESPACE}.matches`,\n [RuleName.Accepted]: `${MESSAGE_NAMESPACE}.accepted`,\n [RuleName.FileType]: `${MESSAGE_NAMESPACE}.fileType`,\n [RuleName.FileSize]: `${MESSAGE_NAMESPACE}.fileSize`,\n [RuleName.OneOf]: `${MESSAGE_NAMESPACE}.oneOf`,\n [RuleName.ValidDate]: `${MESSAGE_NAMESPACE}.validDate`,\n});\n\n/**\n * What \"required\" says on a field you CHOOSE rather than type into (premium N1 / N8): \"Choose an option\", \"Choose at\n * least one\", \"Choose a date\" — never \"This field is required\" beside a row of chips.\n */\nexport const CHOICE_MESSAGE_KEYS = Object.freeze({\n One: `${MESSAGE_NAMESPACE}.choose`,\n Some: `${MESSAGE_NAMESPACE}.chooseSome`,\n Date: `${MESSAGE_NAMESPACE}.chooseDate`,\n});\n\n/** A Date outside its Earliest / Latest. The calendar refuses those days, so this is a stale page or a hand POST. */\nexport const DATE_MESSAGE_KEYS = Object.freeze({\n Min: `${MESSAGE_NAMESPACE}.dateMin`,\n Max: `${MESSAGE_NAMESPACE}.dateMax`,\n});\n\n/** The submit button's own words (premium N2): what it says once its form has sent, when the author wrote none. */\nexport const SUBMIT_MESSAGE_KEYS = Object.freeze({\n Sent: 'forms.submit.sent',\n});\n\n/**\n * A pattern failure deserves better than \"Invalid format\". Each preset gets its own key so the\n * message can say what a valid value looks like, which is the difference between a visitor fixing\n * a typo and a visitor giving up.\n */\nexport const PATTERN_MESSAGE_KEYS: Readonly<Record<string, string>> = Object.freeze({\n email: `${MESSAGE_NAMESPACE}.pattern.email`,\n phone: `${MESSAGE_NAMESPACE}.pattern.phone`,\n url: `${MESSAGE_NAMESPACE}.pattern.url`,\n digits: `${MESSAGE_NAMESPACE}.pattern.digits`,\n letters: `${MESSAGE_NAMESPACE}.pattern.letters`,\n slug: `${MESSAGE_NAMESPACE}.pattern.slug`,\n});\n\n/** Form-level outcomes the visitor sees in the Error state. One designed block, five reasons. */\nexport const FORM_ERROR_KEYS = Object.freeze({\n Network: `${MESSAGE_NAMESPACE}.form.network`,\n Rejected: `${MESSAGE_NAMESPACE}.form.rejected`,\n Spam: `${MESSAGE_NAMESPACE}.form.spam`,\n RateLimited: `${MESSAGE_NAMESPACE}.form.rateLimited`,\n Server: `${MESSAGE_NAMESPACE}.form.server`,\n});\n\n/** The English defaults, so a consumer that has not added the keys yet still shows real text. */\nexport const DEFAULT_EN_MESSAGES: Readonly<Record<string, string>> = Object.freeze({\n [RULE_MESSAGE_KEYS[RuleName.Required]]: 'This field is required',\n [RULE_MESSAGE_KEYS[RuleName.MinLength]]: 'Use at least {{n}} characters',\n [RULE_MESSAGE_KEYS[RuleName.MaxLength]]: 'Use no more than {{n}} characters',\n [RULE_MESSAGE_KEYS[RuleName.Min]]: 'Enter {{n}} or more',\n [RULE_MESSAGE_KEYS[RuleName.Max]]: 'Enter {{n}} or less',\n [RULE_MESSAGE_KEYS[RuleName.Pattern]]: 'Check the format of this value',\n [RULE_MESSAGE_KEYS[RuleName.Matches]]: 'This must match {{field}}',\n [RULE_MESSAGE_KEYS[RuleName.Accepted]]: 'Please tick this to continue',\n [RULE_MESSAGE_KEYS[RuleName.FileType]]: 'That file type isn’t accepted',\n [RULE_MESSAGE_KEYS[RuleName.FileSize]]: 'That file is larger than {{n}}MB',\n [PATTERN_MESSAGE_KEYS['email']]: 'Enter a valid email address',\n [PATTERN_MESSAGE_KEYS['phone']]: 'Enter a valid phone number',\n [PATTERN_MESSAGE_KEYS['url']]: 'Enter a valid web address',\n [PATTERN_MESSAGE_KEYS['digits']]: 'Use digits only',\n [PATTERN_MESSAGE_KEYS['letters']]: 'Use letters only',\n [PATTERN_MESSAGE_KEYS['slug']]: 'Use lowercase letters, numbers and hyphens',\n [FORM_ERROR_KEYS.Network]: 'We couldn’t reach the server — check your connection and try again',\n [FORM_ERROR_KEYS.Rejected]: 'Some answers need fixing',\n [FORM_ERROR_KEYS.Spam]: 'We couldn’t accept this submission',\n [FORM_ERROR_KEYS.RateLimited]: 'Too many attempts — please wait a moment and try again',\n [FORM_ERROR_KEYS.Server]: 'Something went wrong on our side — your answers are still here',\n [RULE_MESSAGE_KEYS[RuleName.OneOf]]: 'Choose one of the options',\n [RULE_MESSAGE_KEYS[RuleName.ValidDate]]: 'Choose a date from the calendar',\n [CHOICE_MESSAGE_KEYS.One]: 'Choose an option',\n [CHOICE_MESSAGE_KEYS.Some]: 'Choose at least one',\n [CHOICE_MESSAGE_KEYS.Date]: 'Choose a date',\n [DATE_MESSAGE_KEYS.Min]: 'Choose a later date',\n [DATE_MESSAGE_KEYS.Max]: 'Choose an earlier date',\n [SUBMIT_MESSAGE_KEYS.Sent]: 'Sent',\n});\n","/**\n * DATES — the date picker's pure half (premium components N8) and the date rules' one reading.\n *\n * A Date field's value is an ISO day, `YYYY-MM-DD`, compared as a string (the format sorts as the calendar does).\n * Its `min` / `max` rules take an ISO day OR an offset in days from today (`{ offsetDays: 0 }` = today), so \"from\n * today on\" stays true tomorrow without a re-save. ONE reading for the validator (client AND iox-cms), the calendar\n * (which days it refuses) and the builder's Earliest / Latest controls.\n *\n * The calendar model (six rows of seven, roving focus, the APG keys) lives here too, so the DOM runtime only draws\n * what this decides — the canvas, the engine's component path and its string path draw the SAME month.\n *\n * ⚠️ Framework-free, like the rest of forms-core. Local-time `Date` objects are used only to walk the calendar; a\n * day leaves this file as an ISO string.\n */\n\nimport { ControlType, FieldSpec, RuleName, ValidationRule } from './form.model';\n\nconst ISO_DAY = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst OFFSET = /^[+-]?\\d+$/;\nconst DAYS_IN_WEEK = 7;\n/** Always six rows, so the panel never changes size between months (APG; Emil 74 — one object, one size). */\nexport const CALENDAR_ROWS = 6;\n\nconst pad = (n: number, width = 2) => String(n).padStart(width, '0');\n\n/** The ISO day of a local `Date`. */\nexport function isoOfDate(d: Date): string {\n return `${pad(d.getFullYear(), 4)}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\n/** A local `Date` at midnight for an ISO day, or null when it is not one (2026-02-30 is not). */\nexport function dateOfIso(iso: unknown): Date | null {\n const m = typeof iso === 'string' ? ISO_DAY.exec(iso.trim()) : null;\n if (!m) return null;\n const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];\n const date = new Date(y, mo - 1, d);\n date.setFullYear(y);\n return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;\n}\n\n/** True for a real calendar day written `YYYY-MM-DD`. */\nexport function isIsoDate(value: unknown): boolean {\n return dateOfIso(value) !== null;\n}\n\n/** Today, as the device that runs this sees it (the visitor's local day in a browser; the server's on iox-cms). */\nexport function todayIso(now: Date = new Date()): string {\n return isoOfDate(now);\n}\n\n/** `iso` moved by `days` (negative goes back). */\nexport function addDaysIso(iso: string, days: number): string {\n const d = dateOfIso(iso);\n if (!d) return iso;\n return isoOfDate(new Date(d.getFullYear(), d.getMonth(), d.getDate() + days));\n}\n\n/** `iso` moved by `months`, its day clamped to the target month's last (31 Jan + 1 month = 28/29 Feb). */\nexport function addMonthsIso(iso: string, months: number): string {\n const d = dateOfIso(iso);\n if (!d) return iso;\n const first = new Date(d.getFullYear(), d.getMonth() + months, 1);\n const last = new Date(first.getFullYear(), first.getMonth() + 1, 0).getDate();\n return isoOfDate(new Date(first.getFullYear(), first.getMonth(), Math.min(d.getDate(), last)));\n}\n\n/** `iso` held inside [min, max] (either may be absent). */\nexport function clampIso(iso: string, min?: string | null, max?: string | null): string {\n if (min && iso < min) return min;\n if (max && iso > max) return max;\n return iso;\n}\n\n// ─── bounds: Earliest / Latest ───────────────────────────────────────────────\n\n/** A date rule's parameter: an ISO day, or a number of days from today. */\nexport interface DateBoundParams {\n date?: string;\n offsetDays?: number;\n}\n\n/**\n * A Field's `earliest` / `latest` trait → the rule parameter. The trait is one string so the panel and a saved page\n * stay simple: `''` = any day · an integer = that many days from today (`'0'` = today, `'30'` = a month ahead) · an\n * ISO day. Anything else reads as no bound.\n */\nexport function parseDateBound(raw: unknown): DateBoundParams | null {\n if (typeof raw === 'number' && Number.isInteger(raw)) return { offsetDays: raw };\n if (typeof raw !== 'string') return null;\n const text = raw.trim();\n if (!text) return null;\n if (OFFSET.test(text)) return { offsetDays: Number(text) };\n return isIsoDate(text) ? { date: text } : null;\n}\n\n/** The `min` / `max` rules a Date field's Earliest / Latest traits give it (none for \"any\"). */\nexport function dateBoundRules(earliest: unknown, latest: unknown): ValidationRule[] {\n const rules: ValidationRule[] = [];\n const min = parseDateBound(earliest);\n const max = parseDateBound(latest);\n if (min) rules.push({ name: RuleName.Min, params: { ...min } });\n if (max) rules.push({ name: RuleName.Max, params: { ...max } });\n return rules;\n}\n\n/** True when a rule's params are a DATE bound (an ISO day or an offset), never a number bound. */\nexport function isDateBoundParams(params: Record<string, any> | null | undefined): boolean {\n return !!params && (typeof params['date'] === 'string' || Number.isInteger(params['offsetDays']));\n}\n\n/** The ISO day a bound names today, or null when it names none. */\nexport function resolveDateBound(params: Record<string, any> | null | undefined, today: string): string | null {\n if (!params) return null;\n if (typeof params['date'] === 'string' && isIsoDate(params['date'])) return params['date'];\n if (Number.isInteger(params['offsetDays'])) return addDaysIso(today, params['offsetDays']);\n return null;\n}\n\n/** The first and last day a Date field accepts today — the calendar's refused days and the validator's range. */\nexport function fieldDateRange(field: Pick<FieldSpec, 'rules'> | null | undefined, today: string): { min: string | null; max: string | null } {\n let min: string | null = null;\n let max: string | null = null;\n for (const rule of field?.rules ?? []) {\n if (rule.name === RuleName.Min) min = resolveDateBound(rule.params, today) ?? min;\n if (rule.name === RuleName.Max) max = resolveDateBound(rule.params, today) ?? max;\n }\n return { min, max };\n}\n\n/** True when the field is a date picker (the control that reads these rules as days). */\nexport function isDateField(field: Pick<FieldSpec, 'control'> | null | undefined): boolean {\n return field?.control === ControlType.Date;\n}\n\n// ─── the week, the month, the keys ───────────────────────────────────────────\n\n/** Regions whose week starts on Sunday when the runtime cannot say (Intl.Locale#getWeekInfo is not everywhere). */\nconst SUNDAY_REGIONS: ReadonlySet<string> = new Set(['US', 'CA', 'IL', 'JP', 'BR', 'MX', 'PH', 'IN', 'KR', 'TW', 'ZA', 'AU']);\nconst SUNDAY_LANGUAGES: ReadonlySet<string> = new Set(['he', 'iw', 'ja', 'ko']);\n\n/**\n * The first day of the week for a locale, 0 = Sunday … 6 = Saturday. `Intl.Locale(…).getWeekInfo()` (or the older\n * `weekInfo` getter) when the runtime has it, else a small region table; a bare `en` reads as the US.\n */\nexport function weekStartFor(locale: string | null | undefined): number {\n const tag = locale || 'en';\n try {\n const Ctor = (Intl as any).Locale;\n if (Ctor) {\n const loc = new Ctor(tag);\n const info = typeof loc.getWeekInfo === 'function' ? loc.getWeekInfo() : loc.weekInfo;\n const first = Number(info?.firstDay);\n if (first >= 1 && first <= 7) return first % DAYS_IN_WEEK;\n }\n } catch { /* an unknown tag falls through to the table */ }\n const [language, region] = tag.split(/[-_]/);\n if (region && SUNDAY_REGIONS.has(region.toUpperCase())) return 0;\n if (!region && (language === 'en' || SUNDAY_LANGUAGES.has(language))) return 0;\n return 1;\n}\n\n/** One cell of the month grid. */\nexport interface CalendarDay {\n iso: string;\n day: number;\n today: boolean;\n selected: boolean;\n /** Outside Earliest / Latest: shown, announced as unavailable, never picked. */\n disabled: boolean;\n /** The roving tab stop — exactly one day of the month has it. */\n focus: boolean;\n}\n\nexport interface CalendarMonth {\n year: number;\n /** 0-based, as `Date` counts. */\n month: number;\n /** `CALENDAR_ROWS` × 7; null where the month has no day. */\n weeks: Array<Array<CalendarDay | null>>;\n /** The weekday of each column, 0 = Sunday — the header row reads these. */\n weekdays: number[];\n canPrev: boolean;\n canNext: boolean;\n}\n\nexport interface CalendarOptions {\n weekStart: number;\n today: string;\n min?: string | null;\n max?: string | null;\n selected?: string | null;\n}\n\n/** The month `focus` sits in, as six rows of seven — the ONE grid every renderer draws. */\nexport function calendarMonth(focus: string, options: CalendarOptions): CalendarMonth {\n const at = dateOfIso(focus) ?? dateOfIso(options.today) ?? new Date();\n const year = at.getFullYear();\n const month = at.getMonth();\n const lead = (new Date(year, month, 1).getDay() - options.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const days = new Date(year, month + 1, 0).getDate();\n const weeks: Array<Array<CalendarDay | null>> = [];\n for (let r = 0; r < CALENDAR_ROWS; r++) {\n const row: Array<CalendarDay | null> = [];\n for (let c = 0; c < DAYS_IN_WEEK; c++) {\n const n = r * DAYS_IN_WEEK + c - lead + 1;\n if (n < 1 || n > days) { row.push(null); continue; }\n const iso = isoOfDate(new Date(year, month, n));\n row.push({\n iso, day: n,\n today: iso === options.today,\n selected: iso === options.selected,\n disabled: (!!options.min && iso < options.min) || (!!options.max && iso > options.max),\n focus: iso === focus,\n });\n }\n weeks.push(row);\n }\n const monthKey = (iso: string | null | undefined) => (iso ? iso.slice(0, 7) : null);\n const here = monthKey(isoOfDate(new Date(year, month, 1)))!;\n const minMonth = monthKey(options.min);\n const maxMonth = monthKey(options.max);\n return {\n year, month, weeks,\n weekdays: Array.from({ length: DAYS_IN_WEEK }, (_, i) => (options.weekStart + i) % DAYS_IN_WEEK),\n canPrev: !minMonth || here > minMonth,\n canNext: !maxMonth || here < maxMonth,\n };\n}\n\n/** The keys the grid answers (APG date picker dialog). */\nexport enum CalendarKey {\n Left = 'ArrowLeft',\n Right = 'ArrowRight',\n Up = 'ArrowUp',\n Down = 'ArrowDown',\n Home = 'Home',\n End = 'End',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n}\n\nconst KEY_MOVES: Readonly<Record<CalendarKey, (iso: string, ctx: { ahead: number; dow: number; shift: boolean }) => string>> = {\n // The arrows follow the READING direction: in RTL \"→\" is a day back (APG; mirrored).\n [CalendarKey.Right]: (iso, c) => addDaysIso(iso, c.ahead),\n [CalendarKey.Left]: (iso, c) => addDaysIso(iso, -c.ahead),\n [CalendarKey.Down]: iso => addDaysIso(iso, DAYS_IN_WEEK),\n [CalendarKey.Up]: iso => addDaysIso(iso, -DAYS_IN_WEEK),\n [CalendarKey.Home]: (iso, c) => addDaysIso(iso, -c.dow),\n [CalendarKey.End]: (iso, c) => addDaysIso(iso, DAYS_IN_WEEK - 1 - c.dow),\n // A month; with Shift, a year.\n [CalendarKey.PageUp]: (iso, c) => addMonthsIso(iso, c.shift ? -12 : -1),\n [CalendarKey.PageDown]: (iso, c) => addMonthsIso(iso, c.shift ? 12 : 1),\n};\n\n/**\n * Where a key moves the focused day, held inside [min, max] — or null for a key the grid does not answer (Enter,\n * Space and Escape are the runtime's: they pick or close, they never move).\n */\nexport function calendarKeyTarget(key: string, focus: string, options: { weekStart: number; rtl?: boolean; shift?: boolean; min?: string | null; max?: string | null }): string | null {\n const move = KEY_MOVES[key as CalendarKey];\n const at = dateOfIso(focus);\n if (!move || !at) return null;\n const dow = (at.getDay() - options.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n return clampIso(move(focus, { ahead: options.rtl ? -1 : 1, dow, shift: !!options.shift }), options.min, options.max);\n}\n\n// ─── words ───────────────────────────────────────────────────────────────────\n\n/** The date in words, in the site's language: \"Thu, 20 November\" — the year only when it is not this year's. */\nexport function formatDateInWords(iso: string, locale: string | null | undefined, today: string): string {\n const d = dateOfIso(iso);\n if (!d) return '';\n const sameYear = iso.slice(0, 4) === today.slice(0, 4);\n try {\n return new Intl.DateTimeFormat(locale || undefined, { weekday: 'short', day: 'numeric', month: 'long', ...(sameYear ? {} : { year: 'numeric' }) }).format(d);\n } catch {\n return iso;\n }\n}\n\n/** The calendar's own words, by the site's language — the media-core `videoWords` precedent (a string-rendered\n * site has no translation service; the document's `lang` picks). */\nexport interface DatePickerWords {\n choose: string;\n previousMonth: string;\n nextMonth: string;\n close: string;\n}\n\nexport const DATE_PICKER_WORDS: Readonly<Record<'en' | 'he', DatePickerWords>> = Object.freeze({\n en: { choose: 'Choose a date', previousMonth: 'Previous month', nextMonth: 'Next month', close: 'Close' },\n he: { choose: 'בחרו תאריך', previousMonth: 'החודש הקודם', nextMonth: 'החודש הבא', close: 'סגירה' },\n});\n\n/** The words for a language tag (`he-IL` → Hebrew); English for anything else. */\nexport function datePickerWords(lang: string | null | undefined): DatePickerWords {\n const language = String(lang ?? '').toLowerCase().split(/[-_]/)[0];\n return language === 'he' || language === 'iw' ? DATE_PICKER_WORDS.he : DATE_PICKER_WORDS.en;\n}\n","// The validator. ONE implementation, run by the builder canvas, the SSR engine and `iox-cms`.\n//\n// Client-side validation is UX; server-side validation is truth. Because both call this function,\n// a visitor can never be told a value is fine and then have the server reject it, and a hand-crafted\n// POST can never bypass a rule the author configured.\n\nimport {\n ControlType,\n FieldSpec,\n FormSpec,\n IMPLIED_PATTERN,\n isMultiValueField,\n OPTION_CONTROLS,\n PATTERN_PRESETS,\n PatternPreset,\n RuleName,\n ValidationRule,\n} from './form.model';\nimport { addDaysIso, isDateBoundParams, isIsoDate, resolveDateBound, todayIso } from './dates';\nimport { CHOICE_MESSAGE_KEYS, DATE_MESSAGE_KEYS, PATTERN_MESSAGE_KEYS, RULE_MESSAGE_KEYS } from './messages';\n\nexport interface FieldError {\n /** i18n key, or the author's own override string when they set one. */\n messageKey: string;\n /** Interpolation values (`{ n: 8 }`, `{ field: 'Email' }`). */\n params?: Record<string, any>;\n}\n\nexport interface FieldResult extends Partial<FieldError> {\n valid: boolean;\n}\n\nexport interface FormResult {\n valid: boolean;\n /** Keyed by field name. Empty when valid. */\n errors: Record<string, FieldError>;\n}\n\n/**\n * When \"today\" is, for a Date's relative bounds (premium N8). A browser leaves it out: its own local day is the\n * visitor's. The SERVER passes `dateSlackDays: 1` — it cannot know the visitor's time zone, so a day either side of\n * its own today is still accepted.\n */\nexport interface ValidateOptions {\n today?: string;\n dateSlackDays?: number;\n}\n\n/** A file, as either runtime hands it over. Kept structural so this file imports no DOM types. */\ninterface FileLike {\n name?: string;\n size?: number;\n type?: string;\n}\n\n/**\n * Validate one field's value.\n *\n * Order is deliberate and is part of the contract:\n * 1. `required` (or `accepted` for a checkbox) — the only rules an EMPTY value can fail.\n * 2. Everything else, in the order the author arranged them, but ONLY for a non-empty value.\n *\n * That second point is what stops an optional \"Phone\" field from shouting \"enter a valid phone\n * number\" at someone who simply left it blank — the single most common validation-UX bug.\n * The FIRST failure wins: a visitor fixes one thing at a time.\n */\nexport function validateField(\n value: unknown,\n spec: FieldSpec,\n form: Record<string, unknown> = {},\n options: ValidateOptions = {},\n): FieldResult {\n const rules = effectiveRules(spec);\n const empty = isEmpty(value, spec.control);\n\n for (const rule of rules) {\n const appliesToEmpty = rule.name === RuleName.Required || rule.name === RuleName.Accepted;\n if (empty && !appliesToEmpty) continue;\n\n const failure = check(rule, value, spec, form, options);\n if (failure) {\n return {\n valid: false,\n messageKey: rule.message ?? failure.messageKey,\n params: failure.params,\n };\n }\n }\n return { valid: true };\n}\n\n/**\n * Validate a whole submission. Every field is checked (not short-circuited at the first bad one) so\n * the visitor sees every problem at once instead of fixing them one reload at a time.\n */\nexport function validateForm(\n values: Record<string, unknown>,\n spec: FormSpec,\n options: ValidateOptions = {},\n): FormResult {\n const errors: Record<string, FieldError> = {};\n for (const field of spec.fields ?? []) {\n const result = validateField(values?.[field.name], field, values ?? {}, options);\n if (!result.valid) {\n errors[field.name] = { messageKey: result.messageKey!, params: result.params };\n }\n }\n return { valid: Object.keys(errors).length === 0, errors };\n}\n\n/**\n * The answers in the shape each field takes (premium N1): a field that takes several answers gets a LIST (one answer\n * posted on its own is a list of one; nothing is an empty list). ONE reading for a host's transport and the server,\n * before validation — `isMultiValueField` decides. A single-answer field is left as posted: two answers to it is the\n * validator's to refuse, never quietly cut to one.\n */\nexport function normaliseAnswers(values: Record<string, unknown> | null | undefined, spec: Pick<FormSpec, 'fields'>): Record<string, unknown> {\n const out: Record<string, unknown> = { ...(values ?? {}) };\n for (const field of spec.fields ?? []) {\n if (!isMultiValueField(field) || field.control === ControlType.File) continue;\n if (!(field.name in out)) continue;\n out[field.name] = chosen(out[field.name]);\n }\n return out;\n}\n\n/** The name of the first field with an error, in spec order — what the browser should focus. */\nexport function firstInvalidField(spec: FormSpec, errors: Record<string, FieldError>): string | null {\n for (const field of spec.fields ?? []) if (errors[field.name]) return field.name;\n return null;\n}\n\n// ─── internals ───────────────────────────────────────────────────────────────\n\n/**\n * The author's rules, plus the ones the field's own configuration implies: `required` from the\n * switch (rather than making the author add a rule for the commonest case) and the pattern implied\n * by an Email/Tel/Url control. An explicitly declared rule of the same name always wins, so an\n * author who sets their own `pattern` on an Email field is not fighting an invisible second one.\n */\nfunction effectiveRules(spec: FieldSpec): ValidationRule[] {\n const declared = spec.rules ?? [];\n const has = (name: RuleName) => declared.some(r => r.name === name);\n const implied: ValidationRule[] = [];\n\n if (spec.required && !has(RuleName.Required)) {\n // A checkbox's \"required\" means TICKED, which is a different message and a different check.\n implied.push(spec.control === ControlType.Checkbox\n ? { name: RuleName.Accepted }\n : { name: RuleName.Required });\n }\n\n const preset = IMPLIED_PATTERN[spec.control];\n if (preset && !has(RuleName.Pattern)) {\n implied.push({ name: RuleName.Pattern, params: { preset } });\n }\n\n // An answer to a field of CHOICES must be one the form offered (premium N1) — only when the options are the\n // field's own: options from a data source are not known here, so they are not judged.\n if (OPTION_CONTROLS.has(spec.control) && !spec.optionsSource && (spec.options ?? []).length) {\n implied.push({ name: RuleName.OneOf });\n }\n // A Date's answer is a real day before any bound is asked about it (premium N8).\n if (spec.control === ControlType.Date) implied.push({ name: RuleName.ValidDate });\n\n return [...implied, ...declared];\n}\n\n/** \"Required\" in the words of the control: choose, not fill in. */\nfunction requiredMessageKey(spec: FieldSpec): string {\n if (spec.control === ControlType.Date) return CHOICE_MESSAGE_KEYS.Date;\n if (isMultiValueField(spec) && spec.control === ControlType.Choices) return CHOICE_MESSAGE_KEYS.Some;\n if (OPTION_CONTROLS.has(spec.control)) return CHOICE_MESSAGE_KEYS.One;\n return RULE_MESSAGE_KEYS[RuleName.Required];\n}\n\n/** The answers a field of choices gave, as a list — a single answer is a list of one, nothing is an empty list. */\nfunction chosen(value: unknown): unknown[] {\n if (Array.isArray(value)) return value;\n return value === null || value === undefined || value === '' ? [] : [value];\n}\n\n/** The `oneOf` verdict: every answer is one of the options, and a single-answer field got at most one. */\nfunction isOneOf(value: unknown, spec: FieldSpec): boolean {\n const offered = new Set((spec.options ?? []).map(o => String(o.value)));\n const answers = chosen(value);\n if (!isMultiValueField(spec) && answers.length > 1) return false;\n return answers.every(a => (typeof a === 'string' || typeof a === 'number') && offered.has(String(a)));\n}\n\n/** A Date bound, as a failure or null — the bound resolved against today, widened by the server's slack. */\nfunction dateBoundFailure(rule: ValidationRule, value: unknown, options: ValidateOptions): FieldError | null {\n const today = options.today ?? todayIso();\n const slack = Math.max(0, Math.trunc(options.dateSlackDays ?? 0));\n const bound = resolveDateBound(rule.params, today);\n if (!bound || !isIsoDate(value)) return null;\n const day = String(value);\n if (rule.name === RuleName.Min && day < addDaysIso(bound, -slack)) return { messageKey: DATE_MESSAGE_KEYS.Min };\n if (rule.name === RuleName.Max && day > addDaysIso(bound, slack)) return { messageKey: DATE_MESSAGE_KEYS.Max };\n return null;\n}\n\n/** Empty means \"the visitor gave us nothing\" — per control type, not a blanket falsy check. */\nfunction isEmpty(value: unknown, control: ControlType): boolean {\n if (value === null || value === undefined) return true;\n if (control === ControlType.Checkbox) return value === false;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === 'string') return value.trim() === '';\n return false;\n}\n\nfunction check(\n rule: ValidationRule,\n value: unknown,\n spec: FieldSpec,\n form: Record<string, unknown>,\n options: ValidateOptions,\n): FieldError | null {\n const fail = (messageKey: string, params?: Record<string, any>): FieldError => ({ messageKey, params });\n const defaultKey = RULE_MESSAGE_KEYS[rule.name];\n const n = Number(rule.params?.['n']);\n\n // A Date's min / max are DAYS (an ISO day or an offset from today), never a number to parseFloat — `2026-11-06`\n // read as 2026 is what the numeric reading did.\n if ((rule.name === RuleName.Min || rule.name === RuleName.Max) && spec.control === ControlType.Date && isDateBoundParams(rule.params)) {\n return dateBoundFailure(rule, value, options);\n }\n\n switch (rule.name) {\n case RuleName.Required:\n return isEmpty(value, spec.control) ? fail(requiredMessageKey(spec)) : null;\n\n case RuleName.Accepted:\n return value === true ? null : fail(defaultKey);\n\n case RuleName.OneOf:\n return isOneOf(value, spec) ? null : fail(defaultKey);\n\n case RuleName.ValidDate:\n return isIsoDate(value) ? null : fail(defaultKey);\n\n case RuleName.MinLength:\n return text(value).length < n ? fail(defaultKey, { n }) : null;\n\n case RuleName.MaxLength:\n return text(value).length > n ? fail(defaultKey, { n }) : null;\n\n case RuleName.Min: {\n const num = numeric(value);\n return num === null || num < n ? fail(defaultKey, { n }) : null;\n }\n\n case RuleName.Max: {\n const num = numeric(value);\n return num === null || num > n ? fail(defaultKey, { n }) : null;\n }\n\n case RuleName.Pattern: {\n const regex = patternFor(rule);\n if (!regex) return null; // an unparsable custom regex must not block a submission\n if (regex.test(text(value))) return null;\n const preset = rule.params?.['preset'] as string | undefined;\n return fail((preset && PATTERN_MESSAGE_KEYS[preset]) || defaultKey);\n }\n\n case RuleName.Matches: {\n const other = String(rule.params?.['field'] ?? '');\n return text(value) === text(form?.[other]) ? null : fail(defaultKey, { field: other });\n }\n\n case RuleName.FileType: {\n const accepted = list(rule.params?.['types']).map(t => t.toLowerCase().replace(/^\\./, ''));\n if (!accepted.length) return null;\n const bad = files(value).some(f => {\n const ext = (f.name ?? '').split('.').pop()?.toLowerCase() ?? '';\n const mime = (f.type ?? '').toLowerCase();\n return !accepted.some(t => t === ext || mime === t || mime.startsWith(t + '/'));\n });\n return bad ? fail(defaultKey, { types: accepted.join(', ') }) : null;\n }\n\n case RuleName.FileSize: {\n const maxBytes = n * 1024 * 1024;\n return files(value).some(f => (f.size ?? 0) > maxBytes) ? fail(defaultKey, { n }) : null;\n }\n\n default:\n return null;\n }\n}\n\nfunction patternFor(rule: ValidationRule): RegExp | null {\n const preset = rule.params?.['preset'] as PatternPreset | undefined;\n if (preset && PATTERN_PRESETS[preset]) return PATTERN_PRESETS[preset];\n const custom = rule.params?.['regex'];\n if (typeof custom !== 'string' || !custom) return null;\n // A malformed regex is the AUTHOR's mistake; failing open is the only safe reading, because\n // failing closed would make a live form permanently unsubmittable for every visitor.\n try { return new RegExp(custom); } catch { return null; }\n}\n\nconst text = (value: unknown): string =>\n value === null || value === undefined ? '' : String(value).trim();\n\nfunction numeric(value: unknown): number | null {\n const parsed = typeof value === 'number' ? value : parseFloat(text(value));\n return Number.isFinite(parsed) ? parsed : null;\n}\n\nconst list = (value: unknown): string[] =>\n Array.isArray(value) ? value.map(String)\n : typeof value === 'string' ? value.split(',').map(s => s.trim()).filter(Boolean)\n : [];\n\nconst files = (value: unknown): FileLike[] =>\n Array.isArray(value) ? value as FileLike[]\n : value && typeof value === 'object' ? [value as FileLike]\n : [];\n","import { FieldOption } from './form.model';\n\n/** `value|Label` separates a submitted value from what the visitor reads; a bare line is both. */\nconst OPTION_SEPARATOR = '|';\n\n/**\n * A Field's `optionsText` trait — the author's choices, one per line — as options. ONE parser for the\n * builder canvas, both engine paths and iox-cms: until 2026-10-19 nothing parsed the trait, so a Radio\n * group or a Dropdown from the tray rendered no choices at all on the canvas and on the live site.\n */\nexport function parseFieldOptions(text: unknown): FieldOption[] {\n if (typeof text !== 'string') return [];\n const out: FieldOption[] = [];\n for (const line of text.split(/\\r?\\n/)) {\n const raw = line.trim();\n if (!raw) continue;\n const at = raw.indexOf(OPTION_SEPARATOR);\n const value = (at === -1 ? raw : raw.slice(0, at)).trim();\n const label = (at === -1 ? raw : raw.slice(at + 1)).trim() || value;\n if (value) out.push({ value, label });\n }\n return out;\n}\n\n/** The choices a saved Field offers: an explicit `options` list wins, else its `optionsText` parsed. */\nexport function fieldOptionsOf(props: { options?: unknown; optionsText?: unknown } | null | undefined): FieldOption[] {\n if (Array.isArray(props?.options) && props!.options.length) return props!.options as FieldOption[];\n return parseFieldOptions(props?.optionsText);\n}\n","// Derive a FormSpec from a node tree.\n//\n// The tree the author edited is the SINGLE source of truth for \"what fields does this form have\".\n// The spec is derived from it — never maintained beside it — so a field cannot exist in one and not\n// the other. The builder runs this on save and stores the result in the page document; the backend\n// reads THAT stored spec to re-validate a submission (it must never trust a spec sent by the\n// browser). See iox-ai-guidance `architecture/builder/forms-and-inputs-plan.md` §5.1 and D11.\n\nimport {\n ControlType,\n FeedbackTiming,\n FieldSpec,\n FormSpec,\n RuleName,\n SubmitAction,\n ValidationRule,\n} from './form.model';\nimport { dateBoundRules } from './dates';\nimport { fieldOptionsOf } from './options';\n\n/** The minimum a node must look like. Structural on purpose: this file knows no renderer. */\nexport interface FormNodeLike {\n type: string;\n props?: Record<string, any>;\n children?: FormNodeLike[];\n}\n\nexport const FORM_NODE_TYPE = 'Form';\nexport const FIELD_NODE_TYPE = 'Field';\n\n/** Always present, never removable — the safety net that makes \"store first, deliver after\" true. */\nexport const STORE_ACTION: SubmitAction = Object.freeze({ type: 'store' });\n\n/**\n * Turn a label into the key that arrives in the submitted data — `Full name` → `fullName`.\n * Authors never have to invent keys (decision: auto-derive, with an editable override).\n *\n * Diacritics are stripped rather than dropped, so a Hebrew or accented label still yields a usable\n * ASCII key instead of an empty one; a label with no usable characters falls back to `field`.\n */\nexport function deriveFieldName(label: string): string {\n const words = (label ?? '')\n .normalize('NFD').replace(/[̀-ͯ]/g, '')\n .replace(/[^a-zA-Z0-9]+/g, ' ')\n .trim()\n .split(/\\s+/)\n .filter(Boolean);\n if (!words.length) return 'field';\n const [first, ...rest] = words;\n const name = first.toLowerCase() + rest.map(w => w[0].toUpperCase() + w.slice(1).toLowerCase()).join('');\n // A key must not start with a digit — it ends up as an object key and a form control id.\n return /^\\d/.test(name) ? `field${name}` : name;\n}\n\n/** Make `name` unique within `taken`, appending 2, 3, … — two \"Email\" fields must not collide. */\nexport function uniqueFieldName(name: string, taken: ReadonlySet<string>): string {\n if (!taken.has(name)) return name;\n let n = 2;\n while (taken.has(`${name}${n}`)) n++;\n return `${name}${n}`;\n}\n\n/** A Field's own key, before the form makes it unique: the author's override, else derived from the label. */\nexport function baseFieldName(props: { name?: unknown; label?: unknown } | null | undefined): string {\n const own = typeof props?.name === 'string' ? props.name : '';\n return own || deriveFieldName(String(props?.label ?? ''));\n}\n\n/**\n * THE naming rule (vectoriox/iox-ui#43): a form's fields, in document order, each its base name made unique against\n * the names before it — `email`, `email2`. The spec (`collectFormSpec`), the component path's runtime and the engine's\n * string renderer all name a field from here, so the input's `name` and the saved spec's key can never differ.\n */\nexport function uniqueFieldNames(baseNames: ReadonlyArray<string>): string[] {\n const taken = new Set<string>();\n return baseNames.map(base => {\n const name = uniqueFieldName(base, taken);\n taken.add(name);\n return name;\n });\n}\n\n/** The submitted name of every Field of a Form, in document order — `uniqueFieldNames` over its fields. */\nexport function formFieldNames(node: FormNodeLike | null | undefined): string[] {\n if (!node || node.type !== FORM_NODE_TYPE) return [];\n return uniqueFieldNames(collectFieldNodes(node.children ?? []).map(f => baseFieldName(f.props)));\n}\n\n/** Each Field node of a Form → the name it submits under (`formFieldNames`, by node). */\nexport function formFieldNameMap<N extends FormNodeLike>(node: N | null | undefined): Map<FormNodeLike, string> {\n const out = new Map<FormNodeLike, string>();\n if (!node || node.type !== FORM_NODE_TYPE) return out;\n const fields = collectFieldNodes(node.children ?? []);\n uniqueFieldNames(fields.map(f => baseFieldName(f.props))).forEach((name, i) => out.set(fields[i], name));\n return out;\n}\n\n/**\n * A Field's spec from its props and the name its form gave it — ONE reading for the saved spec and the component\n * path's runtime (it was written twice: `IoxFieldComponent.toSpec` never carried the options source, the default or a\n * Date's bounds). A Date's Earliest / Latest (`earliest` / `latest`) become its `min` / `max` rules (premium N8).\n */\nexport function fieldSpecOf(props: Record<string, any> | null | undefined, name: string): FieldSpec {\n const p = props ?? {};\n const control = (p['control'] as ControlType) || ControlType.Text;\n const spec: FieldSpec = { name, control, label: p['label'] ?? '' };\n if (p['required']) spec.required = true;\n const declared = normaliseRules(p['rules']);\n const bounds = control === ControlType.Date\n ? dateBoundRules(p['earliest'], p['latest']).filter(b => !declared.some(r => r.name === b.name))\n : [];\n const rules = [...declared, ...bounds];\n if (rules.length) spec.rules = rules;\n const options = fieldOptionsOf(p);\n if (options.length) spec.options = options;\n if (p['optionsSource']) spec.optionsSource = p['optionsSource'];\n if (p['defaultValue'] !== undefined && p['defaultValue'] !== '') spec.defaultValue = p['defaultValue'];\n if (control === ControlType.Choices && p['multiple'] === true) spec.multiple = true;\n return spec;\n}\n\n/**\n * Walk a Form subtree and produce its spec.\n *\n * Nested forms are not collected: a Field belongs to its NEAREST ancestor Form (decision D1), so the\n * walk stops at any inner Form node rather than stealing its fields.\n */\nexport function collectFormSpec(node: FormNodeLike | null | undefined): FormSpec | null {\n if (!node || node.type !== FORM_NODE_TYPE) return null;\n const props = node.props ?? {};\n\n const fieldNodes = collectFieldNodes(node.children ?? []);\n const names = uniqueFieldNames(fieldNodes.map(f => baseFieldName(f.props)));\n const fields: FieldSpec[] = fieldNodes.map((f, i) => fieldSpecOf(f.props, names[i]));\n\n return {\n formId: props['formId'] ?? '',\n name: props['name'] ?? 'Form',\n feedback: (props['feedback'] as FeedbackTiming) ?? FeedbackTiming.Smart,\n fields,\n actions: normaliseActions(props['actions']),\n antiSpam: {\n honeypot: props['honeypot'] !== false,\n minFillMs: Number(props['minFillMs'] ?? 1200),\n ...(props['turnstile'] ? { turnstile: true } : {}),\n },\n ...(props['retentionDays'] ? { retention: { days: Number(props['retentionDays']) } } : {}),\n };\n}\n\n/** Every Field in this subtree, in document order, not descending into a nested Form. */\nexport function collectFieldNodes(nodes: readonly FormNodeLike[]): FormNodeLike[] {\n const out: FormNodeLike[] = [];\n for (const node of nodes ?? []) {\n if (!node?.type) continue;\n if (node.type === FORM_NODE_TYPE) continue; // a nested form owns its own fields\n if (node.type === FIELD_NODE_TYPE) { out.push(node); continue; }\n out.push(...collectFieldNodes(node.children ?? []));\n }\n return out;\n}\n\n/** Drop anything that isn't a rule we know — a hand-edited page must not break validation. */\nfunction normaliseRules(raw: unknown): ValidationRule[] {\n if (!Array.isArray(raw)) return [];\n const known = new Set<string>(Object.values(RuleName));\n return raw\n .filter(r => r && known.has(r.name))\n .map(r => ({\n name: r.name as RuleName,\n ...(r.params ? { params: r.params } : {}),\n ...(r.message ? { message: r.message } : {}),\n }));\n}\n\n/** `store` is always first and always present, however the page was edited. */\nfunction normaliseActions(raw: unknown): SubmitAction[] {\n const declared: SubmitAction[] = Array.isArray(raw)\n ? raw.filter(a => a && typeof a.type === 'string')\n : [];\n return [STORE_ACTION, ...declared.filter(a => a.type !== STORE_ACTION.type)];\n}\n","// When a field's error is allowed to be VISIBLE — the pure half of the form runtime.\n//\n// Validity and visibility are different questions. A field can be invalid from the moment the page\n// loads (an empty required field always is), but showing that immediately means greeting a visitor\n// with a wall of red before they have typed anything. This module owns the second question, and it\n// owns it in one place so the builder canvas, the SSR engine and any future runtime agree.\n//\n// Framework-free, like the rest of forms-core.\n\nimport { FeedbackTiming, FormSpec } from './form.model';\nimport { FieldError, validateField, validateForm } from './validate';\n\n/** Everything the runtime needs to remember. Immutable — each transition returns a new state. */\nexport interface FormRuntimeState {\n /** Field names the visitor has left (blurred) at least once. */\n touched: ReadonlySet<string>;\n /** True once a submit has been attempted — after that, every error is fair game. */\n submitted: boolean;\n /** The current errors, whether or not they are being shown. */\n errors: Readonly<Record<string, FieldError>>;\n /** In flight — the submit button shows its loading label and the form is aria-busy. */\n submitting: boolean;\n}\n\nexport const INITIAL_FORM_STATE: FormRuntimeState = Object.freeze({\n touched: new Set<string>(),\n submitted: false,\n errors: {},\n submitting: false,\n});\n\n/**\n * Should this field's error be on screen right now?\n *\n * - `Submit` — only after a submit attempt. Quietest; nothing moves while typing.\n * - `Live` — as soon as it is invalid. Loudest; shouts at a half-typed email address.\n * - `Smart` — the default, and the reason the author gets one dropdown instead of a decision per\n * field: stay quiet until the visitor has either left the field or tried to submit.\n * After that, correct live, so fixing an error clears it as they type.\n */\nexport function shouldShowError(\n fieldName: string,\n state: FormRuntimeState,\n timing: FeedbackTiming | string = FeedbackTiming.Smart,\n): boolean {\n if (!state.errors[fieldName]) return false;\n switch (timing) {\n case FeedbackTiming.Live: return true;\n case FeedbackTiming.Submit: return state.submitted;\n default: return state.submitted || state.touched.has(fieldName);\n }\n}\n\n/**\n * Re-validate one field after a change. Only that field is re-checked, EXCEPT that a `matches` rule\n * makes another field's validity depend on this one — so a confirm-email field stops being wrong\n * the moment you fix the address it points at, rather than waiting for its own blur.\n */\nexport function onFieldChange(\n state: FormRuntimeState,\n fieldName: string,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const errors = { ...state.errors };\n const affected = [fieldName, ...dependentsOf(fieldName, spec)];\n\n for (const name of affected) {\n const field = (spec.fields ?? []).find(f => f.name === name);\n if (!field) continue;\n const result = validateField(values?.[name], field, values ?? {});\n if (result.valid) delete errors[name];\n else errors[name] = { messageKey: result.messageKey!, params: result.params };\n }\n return { ...state, errors };\n}\n\n/** Mark a field touched (on blur) and re-check it, so Smart timing can start showing its error. */\nexport function onFieldBlur(\n state: FormRuntimeState,\n fieldName: string,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const touched = new Set(state.touched);\n touched.add(fieldName);\n return { ...onFieldChange(state, fieldName, values, spec), touched };\n}\n\n/**\n * A submit attempt. Validates everything and flips `submitted`, so from here on every error shows\n * whatever the timing setting is — a visitor who pressed the button is owed the full picture.\n */\nexport function onSubmitAttempt(\n state: FormRuntimeState,\n values: Record<string, unknown>,\n spec: FormSpec,\n): FormRuntimeState {\n const { errors } = validateForm(values ?? {}, spec);\n return { ...state, submitted: true, errors };\n}\n\n/** Server-side rejection: adopt the server's errors verbatim. It is the authority, not the client. */\nexport function applyServerErrors(\n state: FormRuntimeState,\n errors: Record<string, FieldError>,\n): FormRuntimeState {\n return { ...state, submitted: true, submitting: false, errors: { ...errors } };\n}\n\n/** A clean slate after a successful submit, for a form configured to clear itself. */\nexport function resetFormState(): FormRuntimeState {\n return { touched: new Set<string>(), submitted: false, errors: {}, submitting: false };\n}\n\n/** Field names whose validity depends on `fieldName` through a `matches` rule. */\nfunction dependentsOf(fieldName: string, spec: FormSpec): string[] {\n return (spec.fields ?? [])\n .filter(f => (f.rules ?? []).some(r => r.params?.['field'] === fieldName))\n .map(f => f.name);\n}\n","/**\n * Which rules exist, and which controls they make sense on.\n *\n * The panel must not offer \"must be ticked\" on a text field, or a character limit on a date. That\n * knowledge belongs with the validator, not duplicated into the editor — otherwise the two drift and\n * an author configures a rule that silently never runs.\n *\n * Pure data, in forms-core, so the builder panel, the engine and the backend all read one catalog.\n */\n\nimport { ControlType, PatternPreset, RuleName } from './form.model';\n\n/** How a rule's parameter is edited. The panel maps these to its own controls. */\nexport enum RuleParamKind {\n /** No parameter — the rule is its own statement (`required`, `accepted`). */\n None = 'none',\n /** A single number (`{ n }`) — lengths and bounds. */\n Number = 'number',\n /** A preset regex, or a custom one (`{ preset }` / `{ regex }`). */\n Pattern = 'pattern',\n /** Another field in the same form (`{ field }`). */\n Field = 'field',\n}\n\nexport interface RuleDescriptor {\n name: RuleName;\n /** i18n key for the rule's name in the Add-rule menu. */\n labelKey: string;\n param: RuleParamKind;\n /** Controls this rule can apply to. Empty means every control. */\n controls: readonly ControlType[];\n /** Suggested starting value for the parameter, so a freshly added rule is already valid. */\n defaultParams?: Record<string, any>;\n}\n\n/** Text-ish controls: the ones whose value is a string a person typed. */\nconst TEXTUAL: readonly ControlType[] = [\n ControlType.Text, ControlType.Email, ControlType.Tel, ControlType.Url,\n ControlType.Password, ControlType.Textarea,\n];\n\n/** Controls with a comparable magnitude. A Date is not one of them: its bounds are DAYS (an ISO day or \"N days from\n * today\", `dates.ts`), set by the Field's own Earliest / Latest — a number box here read `2026-11-06` as 2026. */\nconst NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Time, ControlType.Range];\n\nexport const RULE_DESCRIPTORS: readonly RuleDescriptor[] = Object.freeze([\n {\n name: RuleName.MinLength, labelKey: 'forms.rules.minLength',\n param: RuleParamKind.Number, controls: TEXTUAL, defaultParams: { n: 2 },\n },\n {\n name: RuleName.MaxLength, labelKey: 'forms.rules.maxLength',\n param: RuleParamKind.Number, controls: TEXTUAL, defaultParams: { n: 200 },\n },\n {\n name: RuleName.Min, labelKey: 'forms.rules.min',\n param: RuleParamKind.Number, controls: NUMERIC, defaultParams: { n: 0 },\n },\n {\n name: RuleName.Max, labelKey: 'forms.rules.max',\n param: RuleParamKind.Number, controls: NUMERIC, defaultParams: { n: 100 },\n },\n {\n name: RuleName.Pattern, labelKey: 'forms.rules.pattern',\n param: RuleParamKind.Pattern, controls: TEXTUAL,\n defaultParams: { preset: PatternPreset.Email },\n },\n {\n // Cross-field: confirm-email, confirm-password.\n name: RuleName.Matches, labelKey: 'forms.rules.matches',\n param: RuleParamKind.Field, controls: [],\n },\n {\n // A checkbox's `required` already becomes `accepted`, so offering it again would be a\n // duplicate — it is here for a checkbox the author wants ticked WITHOUT marking it required.\n name: RuleName.Accepted, labelKey: 'forms.rules.accepted',\n param: RuleParamKind.None, controls: [ControlType.Checkbox, ControlType.Switch],\n },\n]);\n\n/** The rules that can be added to a field of this control type. */\nexport function rulesFor(control: ControlType | string): RuleDescriptor[] {\n return RULE_DESCRIPTORS.filter(rule =>\n rule.controls.length === 0 || rule.controls.includes(control as ControlType));\n}\n\n/**\n * The rules an author may still ADD — the catalog minus what is already on the field.\n *\n * Each rule appears once: two `maxLength` rules on one field is not a configuration anyone means,\n * and the validator would apply whichever came first. `pattern` is the exception a caller might\n * expect to repeat, and it deliberately does not: a second pattern can only contradict the first.\n */\nexport function addableRules(\n control: ControlType | string,\n existing: readonly { name: RuleName }[] = [],\n): RuleDescriptor[] {\n const used = new Set(existing.map(rule => rule.name));\n return rulesFor(control).filter(rule => !used.has(rule.name));\n}\n\n/** The preset options a Pattern rule offers, in the order the panel should list them. */\nexport const PATTERN_PRESET_OPTIONS: readonly { value: PatternPreset; labelKey: string }[] = Object.freeze([\n { value: PatternPreset.Email, labelKey: 'forms.rules.preset.email' },\n { value: PatternPreset.Phone, labelKey: 'forms.rules.preset.phone' },\n { value: PatternPreset.Url, labelKey: 'forms.rules.preset.url' },\n { value: PatternPreset.Digits, labelKey: 'forms.rules.preset.digits' },\n { value: PatternPreset.Letters, labelKey: 'forms.rules.preset.letters' },\n { value: PatternPreset.Slug, labelKey: 'forms.rules.preset.slug' },\n]);\n\n// ── MOVED to @vectoriox/iox-ui/actions-core (A0) ─────────────────────────────\n// The descriptor shape and the after-submit catalog are the ONE action vocabulary the whole\n// product shares; element actions (A1) consume the same shape. Re-exported here under the\n// original names so no forms consumer changes a line.\nexport type { ActionDescriptor } from '@vectoriox/iox-ui/actions-core';\nexport { FORM_SUBMIT_ACTION_DESCRIPTORS as ACTION_DESCRIPTORS, addableActions } from '@vectoriox/iox-ui/actions-core';\n","/**\n * The submit transport CONTRACT — what a host must provide to make a form actually send.\n *\n * The Form component deliberately owns no HTTP: the builder canvas must never post (an author\n * clicking Submit while designing would file a real submission), and the SSR engine posts through\n * Angular's HttpClient. What IS shared is everything around the call — the endpoint's shape, the\n * anti-spam fields, and how the server's answer maps onto the form's state. Those live here so the\n * two hosts cannot drift, and so a third host (a hand-built integration) has one thing to read.\n *\n * ⚠️ Framework-free, like the rest of forms-core. No Angular, no RxJS, no fetch.\n */\n\nimport { FieldError } from './validate';\n\n/** The field a honeypot input uses. Must match `iox-cms` `anti-spam.ts` — hence the comment there. */\nexport const HONEYPOT_FIELD = '_iox_hp';\n/** When the form was rendered, so the server can measure fill time. */\nexport const RENDERED_AT_FIELD = '_iox_t';\n\n/**\n * What the form hands its host. There is deliberately no `orgId`: the tenant is the HOST's\n * knowledge, not the form's, and a form that had to be told its org would be one more trait an\n * author could get wrong.\n */\nexport interface SubmitRequest {\n formId: string;\n values: Record<string, any>;\n}\n\n/**\n * The server's answer, normalised. Mirrors `SubmitResult` in `iox-cms`\n * `form-submissions.service.ts` — the two are one contract, so change them together.\n */\nexport interface SubmitResponse {\n ok: boolean;\n /** Per-field verdicts from the server's own validation pass, keyed by field name. */\n errors?: Record<string, FieldError>;\n /** Where to send the visitor after a successful submit, when the form has a redirect action. */\n redirect?: string;\n}\n\n/**\n * The one function a host implements. Rejecting (or throwing) means the call never reached the\n * server — the form shows its Error state, which is the honest thing to show for a dropped network.\n */\nexport type FormTransport = (request: SubmitRequest) => Promise<SubmitResponse>;\n\n/**\n * The public submit path. Built here rather than interpolated at each call site, so the engine and\n * any future host cannot disagree about it — and so changing it is one edit.\n *\n * ⚠️ ROOT-relative (leading slash), never base-relative. A live site is served under a per-org\n * `<base href=\"/<label>/\">`, so a relative `api/…` resolved to `/<label>/api/…` — a path the reverse\n * proxy (`/api` → iox-cms, everything else → the engine) hands to the ENGINE, which answers a POST with\n * 404: no visitor submission ever reached iox-cms from an org path (found 2026-10-19 by\n * e2e:forminsert:real). The org is already in the path segment after `site/`.\n */\nexport function submitEndpointPath(orgId: string, formId: string): string {\n return `/api/site/${encodeURIComponent(orgId)}/forms/${encodeURIComponent(formId)}/submit`;\n}\n\n/**\n * Add the anti-spam fields to the collected values.\n *\n * Both are invisible to a real visitor and cost them nothing (decision D12). `renderedAt` is the\n * time the form was rendered, NOT the time of submit — the server measures the difference to catch\n * a script that fills and posts instantly.\n */\nexport function withAntiSpamFields(\n values: Record<string, any>,\n renderedAt: number,\n honeypotValue = '',\n): Record<string, any> {\n return { ...values, [HONEYPOT_FIELD]: honeypotValue, [RENDERED_AT_FIELD]: renderedAt };\n}\n\n/**\n * Normalise whatever came back into a `SubmitResponse`.\n *\n * Fails CLOSED: anything that is not a recognisable success is treated as a failure. A malformed\n * body must never show the visitor a Success state for a submission that was not stored — that is\n * the one lie this feature must not tell.\n */\nexport function interpretSubmitResponse(body: any): SubmitResponse {\n if (!body || typeof body !== 'object' || body.ok !== true) {\n return {\n ok: false,\n errors: normaliseErrors(body?.errors),\n };\n }\n const redirect = typeof body.redirect === 'string' && body.redirect.trim()\n ? body.redirect.trim()\n : undefined;\n return { ok: true, redirect };\n}\n\n/** Keep only entries that actually carry a message, so a junk key cannot blank a field's error. */\nfunction normaliseErrors(raw: any): Record<string, FieldError> | undefined {\n if (!raw || typeof raw !== 'object') return undefined;\n const errors: Record<string, FieldError> = {};\n for (const [name, value] of Object.entries(raw as Record<string, any>)) {\n const messageKey = typeof value?.messageKey === 'string' ? value.messageKey : '';\n if (!messageKey) continue;\n errors[name] = value?.params ? { messageKey, params: value.params } : { messageKey };\n }\n return Object.keys(errors).length ? errors : undefined;\n}\n","/**\n * The submit LIFECYCLE's decisions — what a form shows after the server answers, what it says when a\n * submit fails, what a client needs to validate a form, and how its submit button follows its state.\n *\n * Two runtimes act on these and must agree: `IoxFormComponent` (the engine's component path) and the\n * string-form runtime (every header / footer global and every string-rendered page —\n * vectoriox/iox-client-engine#13). The builder canvas reads `submitButtonView` too, for its Sending state.\n *\n * ⚠️ Framework-free, like the rest of forms-core: no Angular, no DOM.\n */\n\nimport { FeedbackTiming, FieldSpec, FormSpec } from './form.model';\nimport { SubmitResponse } from './transport';\nimport { FieldError } from './validate';\n\n/** Which of the form's four states is showing — written on the form as `data-iox-state`. */\nexport enum FormRenderState {\n Idle = 'idle',\n Submitting = 'submitting',\n Success = 'success',\n Error = 'error',\n}\n\n/** The attribute every renderer writes a form's state on (the canvas switcher, both live paths). */\nexport const FORM_STATE_ATTRIBUTE = 'data-iox-state';\n\n/** What the form does once the server has answered. */\nexport interface SubmitOutcome {\n state: FormRenderState;\n /** Per-field verdicts to put back on the fields (the form stays Idle so the visitor can fix them). */\n errors?: Record<string, FieldError>;\n /** A success clears the answers, so they cannot be sent twice. */\n reset: boolean;\n redirect?: string;\n}\n\n/**\n * The server's answer → what the visitor sees. Only a confirmed success is Success; per-field verdicts\n * land on the fields; anything else (a dropped network included) is the designed Error block.\n */\nexport function submitOutcome(response: SubmitResponse | null | undefined): SubmitOutcome {\n if (response?.ok) return { state: FormRenderState.Success, reset: true, ...(response.redirect ? { redirect: response.redirect } : {}) };\n if (response?.errors && Object.keys(response.errors).length) return { state: FormRenderState.Idle, errors: response.errors, reset: false };\n return { state: FormRenderState.Error, reset: false };\n}\n\n/** What the live region says after a refused submit: how many fields need attention, or that it did not send. */\nexport function failureAnnouncement(errors: Readonly<Record<string, unknown>> | null | undefined): string {\n const count = errors ? Object.keys(errors).length : 0;\n if (!count) return 'That did not send.';\n return `${count} ${count === 1 ? 'field needs' : 'fields need'} attention.`;\n}\n\n/**\n * The fields a CLIENT needs to validate a form: never its actions (where submissions go — an email\n * address, a webhook) and never its anti-spam settings. A string-rendered form carries this on\n * `FORM_FIELDS_ATTRIBUTE`, the way a string slider carries its inputs.\n */\nexport interface ClientFormSpec {\n feedback: FeedbackTiming | string;\n fields: FieldSpec[];\n}\n\nexport const FORM_FIELDS_ATTRIBUTE = 'data-iox-form-fields';\n\nexport function clientFormSpec(spec: Pick<FormSpec, 'feedback' | 'fields'>): ClientFormSpec {\n return { feedback: spec.feedback ?? FeedbackTiming.Smart, fields: [...(spec.fields ?? [])] };\n}\n\n/** The attribute's value back into a spec, or null when it is missing or not one. */\nexport function parseClientFormSpec(raw: string | null | undefined): ClientFormSpec | null {\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw);\n if (!parsed || !Array.isArray(parsed.fields)) return null;\n return { feedback: typeof parsed.feedback === 'string' ? parsed.feedback : FeedbackTiming.Smart, fields: parsed.fields };\n } catch {\n return null;\n }\n}\n\n/** How a submit button wears its form's state (vectoriox/iox-ui#42, premium N2). */\nexport interface SubmitButtonView {\n busy: boolean;\n disabled: boolean;\n}\n\n/**\n * While its form sends, a submit button is busy, and disabled unless its author turned that off; once the form has\n * SENT it stays disabled, reading \"Sent\" with its check — nothing sends a lead twice (premium N2, the success in place).\n * ONE rule for the canvas's Sending / Success states, the component path and the string path. Its labels are the shared\n * CSS's, keyed on the same `data-iox-state`.\n */\nexport function submitButtonView(state: FormRenderState | string | null | undefined, disableWhileSubmitting = true): SubmitButtonView {\n const busy = state === FormRenderState.Submitting;\n const sent = state === FormRenderState.Success;\n return { busy, disabled: sent || (busy && disableWhileSubmitting !== false) };\n}\n\n/** On a submit button whose author turned \"Disable while sending\" off. */\nexport const SUBMIT_KEEP_ENABLED_ATTRIBUTE = 'data-iox-keep-enabled';\n\nexport enum SubmitLabelClass {\n Labels = 'iox-submit__labels',\n Idle = 'iox-submit__idle',\n Busy = 'iox-submit__busy',\n Sent = 'iox-submit__sent',\n Check = 'iox-submit__check',\n}\n\n/** The check the Sent label draws once (premium N2 — the rare-tier beat, Emil 135/136): one stroke, `pathLength` 100 so\n * the shared CSS draws it by `stroke-dashoffset` whatever its real length. */\nexport const SUBMIT_CHECK_SVG = `<svg class=\"${SubmitLabelClass.Check}\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">` +\n '<path d=\"M5 12.5l4.5 4.5L19 7.5\" pathLength=\"100\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>';\n\n/** \"Sent\" in the site's language, for a button whose author wrote no Sent words (a string-rendered site has no\n * translation service — the document's `lang` picks, like the date picker's words). */\nconst SENT_WORDS: Readonly<Record<string, string>> = Object.freeze({ en: 'Sent', he: 'נשלח' });\n\nexport function sentWord(lang: string | null | undefined): string {\n const language = String(lang ?? '').toLowerCase().split(/[-_]/)[0];\n return SENT_WORDS[language === 'iw' ? 'he' : language] ?? SENT_WORDS['en'];\n}\n\n/** A submit button's three labels: what it says at rest, while its form sends, and once it has sent. */\nexport interface SubmitLabels {\n idle: string;\n /** \"While sending\" — none: the button keeps its idle words while sending. */\n busy?: string | null;\n /** \"Sent\" — none: the catalog's word, translated by the host (`SUBMIT_MESSAGE_KEYS.Sent`). */\n sent: string;\n}\n\n/**\n * A submit button's words, as markup: its three labels stacked in one grid cell (the button keeps the longest one's\n * width and never jumps), each shown by the form's state through the shared CSS — swapped in place behind a 2px blur\n * (Emil 87/139). The string renderer's copy of `IoxSubmitButtonComponent`'s template; `escape` is the renderer's.\n */\nexport function submitButtonLabelsHtml(labels: SubmitLabels, escape: (v: string) => string): string {\n const busy = labels.busy || labels.idle;\n return `<span class=\"${SubmitLabelClass.Labels}\"><span class=\"${SubmitLabelClass.Idle}\">${escape(labels.idle)}</span>` +\n `<span class=\"${SubmitLabelClass.Busy}\">${escape(busy)}</span>` +\n `<span class=\"${SubmitLabelClass.Sent}\">${SUBMIT_CHECK_SVG}<span>${escape(labels.sent)}</span></span></span>`;\n}\n\nexport const FORM_HONEYPOT_CLASS = 'iox-form__hp';\nexport const FORM_ANNOUNCER_ATTRIBUTE = 'data-iox-form-announcer';\n\n/**\n * The honeypot and the failure announcer every form holds, as markup — what `IoxFormComponent`'s template\n * renders, for the string renderer. The honeypot is off-screen (some bots skip hidden inputs), out of the\n * Tab order and the accessibility tree; the announcer is present from the start (a live region added at\n * the moment it gains text is not reliably announced).\n */\nexport function formChromeHtml(honeypotField: string): string {\n return `<div class=\"${FORM_HONEYPOT_CLASS}\" aria-hidden=\"true\"><input type=\"text\" name=\"${honeypotField}\" tabindex=\"-1\" autocomplete=\"off\"></div>` +\n `<div class=\"${FORM_HONEYPOT_CLASS}\" ${FORM_ANNOUNCER_ATTRIBUTE} role=\"status\" aria-live=\"assertive\" aria-atomic=\"true\"></div>`;\n}\n","/**\n * FORM PRESETS — a complete, working form as one insert: its fields, its submit label and the words of\n * its Success and Error blocks. ONE definition (W1.1): the builder's Forms tray builds a preset from\n * here (`buildFormPreset`, iox-builder), and the site composer (`generation-core`) stamps the SAME preset\n * into a composed page, so a generated contact form is the real one — never a second, drifting copy.\n * Data only: framework-free, like the rest of forms-core.\n */\n\nimport type { ChannelKind } from './channel';\n\nexport enum FormPresetId {\n Contact = 'contact',\n Newsletter = 'newsletter',\n Application = 'application',\n Booking = 'booking',\n /** Premium N2: modelled on Doron's iox.studio brief — name, a phone that is also WhatsApp, the business, what they\n * need and a budget as chips, Send with WhatsApp beside it. */\n Lead = 'lead',\n}\n\nexport interface FormPresetField {\n label: string;\n control: string;\n required?: boolean;\n help?: string;\n placeholder?: string;\n /** Choices for select/radio/choices, `value|Label` per line — the Field's `optionsText` trait. */\n optionsText?: string;\n rows?: number;\n /** A Choices field that takes several answers (N1). */\n multiple?: boolean;\n /** A Choices field's appearance — `chips` (the default) or `list` (N1). */\n appearance?: string;\n /** A Date's first and last day — '' any · an integer: days from today · an ISO day (N8, `dates.ts`). */\n earliest?: string;\n latest?: string;\n}\n\n/** The second way to reach the studio, beside Send (N2). Its address is the studio's own and starts EMPTY. */\nexport interface FormPresetChannel {\n kind: `${ChannelKind}`;\n label: string;\n}\n\nexport interface FormPresetDef {\n id: `${FormPresetId}`;\n name: string;\n icon: string;\n /** One line in the panel: what it collects and where it goes. */\n description: string;\n /** The form's author-facing name, which the submissions inbox groups by. */\n formName: string;\n fields: FormPresetField[];\n submitLabel: string;\n successText: string;\n errorText: string;\n channel?: FormPresetChannel;\n /** `false`: the AI plan wire does not offer it yet (the lead preset ships in the builder in M3; generation takes it\n * up in premium M8 — the wire's enum is model-facing and does not change before then). */\n inPlan?: false;\n}\n\n/** The presets a generated plan may name (the plan wire's `form` enum) — every preset not held back by `inPlan`. */\nexport function planFormPresetIds(): string[] {\n return FORM_PRESETS.filter(p => p.inPlan !== false).map(p => p.id);\n}\n\n// forms-core is imported by both renderers (the field runtime), and a renderer that never reads the presets\n// must drop them: the call is `@__PURE__`, and the ids are written as the enum's VALUES (typed by it, pinned\n// to it by form-presets.spec) — a read of `FormPresetId.X` counts as a side effect to a bundler and kept the\n// whole list in the engine's bundle.\nexport const FORM_PRESETS: readonly FormPresetDef[] = /* @__PURE__ */ Object.freeze([\n {\n id: 'contact', name: 'Contact', icon: 'ph-thin ph-envelope-simple',\n description: 'Name, email and a message. Stored, and emailed to you.',\n formName: 'Contact form',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Message', control: 'textarea', required: true, rows: 5 },\n ],\n submitLabel: 'Send message',\n successText: 'Thanks — we’ll be in touch shortly.',\n errorText: 'We couldn’t send your message. Please try again — your answers are still here.',\n },\n {\n id: 'newsletter', name: 'Newsletter', icon: 'ph-thin ph-paper-plane-tilt',\n description: 'One email field plus consent. Stored.',\n formName: 'Newsletter signup',\n fields: [\n { label: 'Email', control: 'email', required: true, placeholder: 'you@company.com' },\n // Consent is a checkbox that must be TICKED — `required` on a checkbox becomes the\n // `accepted` rule, with its own message, rather than a generic \"this is required\".\n { label: 'Email me occasional updates', control: 'checkbox', required: true },\n ],\n submitLabel: 'Subscribe',\n successText: 'You’re on the list.',\n errorText: 'We couldn’t sign you up. Please try again.',\n },\n {\n id: 'application', name: 'Application', icon: 'ph-thin ph-read-cv-logo',\n description: 'Details plus a CV upload. Stored, with an auto-reply.',\n formName: 'Application',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Phone', control: 'tel' },\n { label: 'Role', control: 'select', required: true, optionsText: 'Design\\nEngineering\\nOther' },\n { label: 'CV', control: 'file', required: true, help: 'PDF or Word, up to 5MB' },\n { label: 'Anything else', control: 'textarea', rows: 4 },\n ],\n submitLabel: 'Apply',\n successText: 'Application received — we’ll read it properly and reply.',\n errorText: 'We couldn’t submit your application. Please try again.',\n },\n {\n id: 'booking', name: 'Booking request', icon: 'ph-thin ph-calendar-check',\n description: 'Date and party size. Stored, and it notifies you.',\n formName: 'Booking request',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n // The first day a booking may ask for is today (N8): the calendar refuses the past.\n { label: 'Date', control: 'date', required: true, earliest: '0' },\n { label: 'People', control: 'number', required: true },\n { label: 'Notes', control: 'textarea', rows: 3, help: 'Allergies, access needs, anything useful' },\n ],\n submitLabel: 'Request a booking',\n successText: 'Request received — we’ll confirm by email.',\n errorText: 'We couldn’t send your request. Please try again.',\n },\n {\n id: 'lead', name: 'Lead', icon: 'ph-thin ph-handshake',\n description: 'Name, phone, the business and what they need, as chips. Stored, with WhatsApp beside Send.',\n formName: 'Lead form',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Phone / WhatsApp', control: 'tel', required: true },\n { label: 'What is your business?', control: 'text' },\n // The words ARE the values: what arrives in the inbox and the email reads as the visitor chose it.\n { label: 'What do you need?', control: 'choices', multiple: true,\n optionsText: 'Website\\nBranding\\nPhotos & video\\nNot sure yet' },\n // Neutral sizes the author renames — never a price or a currency a studio could be held to.\n { label: 'Estimated budget', control: 'choices',\n optionsText: 'Small project\\nMedium\\nLarge\\nNot sure yet' },\n ],\n submitLabel: 'Send',\n successText: 'Thanks — we’ll get back to you soon.',\n errorText: 'We couldn’t send your details. Please try again — your answers are still here.',\n channel: { kind: 'whatsapp', label: 'Message us on WhatsApp' },\n inPlan: false,\n },\n]);\n\n/** The preset with this id, or undefined. */\nexport function formPresetById(id: string | null | undefined): FormPresetDef | undefined {\n return FORM_PRESETS.find(p => p.id === id);\n}\n","// Where form content may NOT render (Doron, 2026-10-20): inside a link or a button.\n//\n// HTML forbids interactive content inside `<a>` and `<button>`, and a click in a field may follow the\n// link. ONE table and ONE walk, shared by the builder's insert rule (refuse it), the builder's audit\n// (find it in a page saved before the rule) and the engine (warn about it, never rewrite it).\n\nimport { FIELD_NODE_TYPE, FORM_NODE_TYPE } from './collect';\n\nexport enum InteractiveTag {\n Anchor = 'a',\n Button = 'button',\n}\n\n/**\n * Every node type that renders as an interactive element, and the element(s) it can render. A ButtonBlock\n * renders `<a>` or `<button>` by its `tag` trait — both interactive, so switching the tag never lifts the\n * rule. Pinned to the engine components' selectors by `interactive-hosts.spec.ts`.\n */\nexport const INTERACTIVE_HOST_TAGS: Readonly<Record<string, readonly InteractiveTag[]>> = Object.freeze({\n // A LinkedContainer is an <a>, or — as an Accordion's header (CC2) — a <button>.\n LinkedContainer: [InteractiveTag.Anchor, InteractiveTag.Button],\n Link: [InteractiveTag.Anchor],\n Button: [InteractiveTag.Anchor],\n ButtonBlock: [InteractiveTag.Anchor, InteractiveTag.Button],\n SubmitButton: [InteractiveTag.Button],\n});\n\nexport const FIELD_GROUP_NODE_TYPE = 'FieldGroup';\nexport const SUBMIT_BUTTON_NODE_TYPE = 'SubmitButton';\n\n/**\n * Form content — what a link or a button must never hold: a Form (its controls), a Field (an input, select\n * or textarea), a SubmitButton (a `<button>`) and a FieldGroup (it exists only to hold fields, so it moves as\n * one). A Success / Error block is text and lives only inside its form, so it is not on the list.\n */\nexport const FORM_CONTENT_TYPES: ReadonlySet<string> = new Set([\n FORM_NODE_TYPE, FIELD_NODE_TYPE, FIELD_GROUP_NODE_TYPE, SUBMIT_BUTTON_NODE_TYPE,\n]);\n\n/** The minimum a node must look like — a builder ComponentNode and a saved layout node both do. */\nexport interface NestingNode {\n id?: string;\n type?: string;\n label?: string;\n children?: NestingNode[] | null;\n}\n\nexport function isInteractiveHost(node: NestingNode | null | undefined): boolean {\n return !!node?.type && Object.prototype.hasOwnProperty.call(INTERACTIVE_HOST_TAGS, node.type);\n}\n\nexport function isFormContent(node: NestingNode | null | undefined): boolean {\n return !!node?.type && FORM_CONTENT_TYPES.has(node.type);\n}\n\n/**\n * The first form-content node in `node`'s subtree that sits inside an interactive host, or null. `insideHost`\n * is true when `node` is placed under a host already — so a Form dropped into a link and a link that holds a\n * Form are the same finding.\n */\nexport function formContentInHost(node: NestingNode | null | undefined, insideHost = false): NestingNode | null {\n if (!node) return null;\n if (insideHost && isFormContent(node)) return node;\n const nowInside = insideHost || isInteractiveHost(node);\n for (const child of node.children ?? []) {\n const found = formContentInHost(child, nowInside);\n if (found) return found;\n }\n return null;\n}\n\n/** One place a tree holds form content inside a link or a button. */\nexport interface MisplacedFormContent<N extends NestingNode = NestingNode> {\n /** The OUTERMOST interactive host holding it. */\n host: N;\n /** A MAXIMAL form-content subtree inside it — the Form, never each of its fields. */\n content: N;\n}\n\n/** Every form-content subtree a tree holds inside an interactive host, in document order. */\nexport function findFormContentInHosts<N extends NestingNode>(roots: readonly N[] | null | undefined): MisplacedFormContent<N>[] {\n const out: MisplacedFormContent<N>[] = [];\n const visit = (node: N, host: N | null): void => {\n if (host && isFormContent(node)) {\n out.push({ host, content: node });\n return;\n }\n const nextHost = host ?? (isInteractiveHost(node) ? node : null);\n for (const child of (node.children ?? []) as N[]) visit(child, nextHost);\n };\n for (const root of roots ?? []) visit(root, null);\n return out;\n}\n","/**\n * THE SECOND CHANNEL (premium components N2) — \"or message us on WhatsApp\", the button a form keeps beside its submit,\n * before AND after it sends.\n *\n * It is an ordinary node in the form's actions row (a ButtonBlock that links) carrying the ROLE `form.channel`, so the\n * shared CSS keeps it on screen when the form succeeds and the Publishable gate can find it. Its address is the\n * OWNER's fact: the builder builds it from what the author types (a number, an address, a link) and never invents one —\n * inserted empty, it blocks publishing until it is filled (generation-core `auditSite`, `empty-channel`).\n *\n * Framework-free, like the rest of forms-core.\n */\n\n/** The role the channel's node carries (`iox-role-form-channel`). */\nexport const FORM_CHANNEL_ROLE = 'form.channel';\n/** The role of the row that holds the submit button and the channel (`iox-role-form-actions`). */\nexport const FORM_ACTIONS_ROLE = 'form.actions';\n\nexport enum ChannelKind {\n WhatsApp = 'whatsapp',\n Phone = 'phone',\n Email = 'email',\n Link = 'link',\n}\n\nexport const CHANNEL_KINDS: ReadonlyArray<ChannelKind> = [ChannelKind.WhatsApp, ChannelKind.Phone, ChannelKind.Email, ChannelKind.Link];\n\nconst WHATSAPP_PREFIX = 'https://wa.me/';\nconst TEL_PREFIX = 'tel:';\nconst MAILTO_PREFIX = 'mailto:';\nconst HTTP = /^https?:\\/\\//i;\nconst EMAIL = /^[^\\s@]+@[^\\s@.]+(\\.[^\\s@.]+)+$/;\n/** A phone number's own characters; anything else is typing noise (spaces, dashes, brackets). */\nconst DIGITS = /\\d/g;\n/** WhatsApp's click-to-chat wants the full international number: digits only, no `+`, no leading `00`. */\nconst INTERNATIONAL_00 = /^00/;\n/** A number shorter than this is not a number anyone can be reached on. */\nconst MIN_DIGITS = 6;\n\n/**\n * The address a channel links to, built from what the author typed — or `''` when it gives nothing a visitor could\n * use (no digits, not an email). Never a guess: a WhatsApp number keeps exactly the digits typed (the panel asks for\n * the country code), a link without a scheme gets `https://`.\n */\nexport function channelHref(kind: ChannelKind | string, input: unknown): string {\n const raw = typeof input === 'string' ? input.trim() : '';\n if (!raw) return '';\n switch (kind) {\n case ChannelKind.WhatsApp: {\n const digits = (raw.match(DIGITS) ?? []).join('').replace(INTERNATIONAL_00, '');\n return digits.length >= MIN_DIGITS ? `${WHATSAPP_PREFIX}${digits}` : '';\n }\n case ChannelKind.Phone: {\n const digits = (raw.match(DIGITS) ?? []).join('');\n if (digits.length < MIN_DIGITS) return '';\n return `${TEL_PREFIX}${raw.startsWith('+') ? '+' : ''}${digits}`;\n }\n case ChannelKind.Email:\n return EMAIL.test(raw) ? `${MAILTO_PREFIX}${raw}` : '';\n case ChannelKind.Link:\n return HTTP.test(raw) ? raw : `https://${raw.replace(/^\\/+/, '')}`;\n default:\n return '';\n }\n}\n\n/** A channel's address back into what the panel shows: its kind and the value the author typed. */\nexport function parseChannelHref(href: unknown): { kind: ChannelKind; value: string } {\n const text = typeof href === 'string' ? href.trim() : '';\n if (text.toLowerCase().startsWith(WHATSAPP_PREFIX)) return { kind: ChannelKind.WhatsApp, value: text.slice(WHATSAPP_PREFIX.length).split(/[?#]/)[0] };\n if (text.toLowerCase().startsWith(TEL_PREFIX)) return { kind: ChannelKind.Phone, value: text.slice(TEL_PREFIX.length) };\n if (text.toLowerCase().startsWith(MAILTO_PREFIX)) return { kind: ChannelKind.Email, value: text.slice(MAILTO_PREFIX.length).split('?')[0] };\n if (!text) return { kind: ChannelKind.WhatsApp, value: '' };\n return { kind: ChannelKind.Link, value: text };\n}\n\n/** True when the channel goes somewhere a visitor can use — the gate's \"filled\". */\nexport function isChannelFilled(href: unknown): boolean {\n const { kind, value } = parseChannelHref(href);\n return !!value && channelHref(kind, value) !== '';\n}\n\n/** A WhatsApp or web channel opens in a new tab; a call or an email hands over to the device. */\nexport function channelOpensNewTab(kind: ChannelKind | string): boolean {\n return kind === ChannelKind.WhatsApp || kind === ChannelKind.Link;\n}\n","/**\n * A Field as MARKUP — the string renderer's copy of `IoxFieldComponent`'s template, in ONE place (it lived in the\n * engine's `layout-renderer.service.ts`, a second copy beside the component). The engine's string path writes it; the\n * component mirrors it element for element, so hydration replaces like with like and the shared CSS (iox-forms.css,\n * the contract's field baseline) reaches both.\n *\n * Choices (premium N1): a `<fieldset>` whose `<legend>` is the label, its options native radios (one answer — the\n * arrow keys move and pick, with no script) or checkboxes (several), each inside a `<label>` that IS the chip; the\n * input is visually hidden, never removed. Date (N8): a `<button>` that says the date in words and opens the look's\n * calendar, with a hidden input carrying the ISO day — the raw SSR is the final markup (nothing shifts on hydrate).\n *\n * Framework-free, like the rest of forms-core: `escape` is the caller's.\n */\n\nimport { ChoiceAppearance, ControlType } from './form.model';\nimport { datePickerWords } from './dates';\nimport { fieldOptionsOf } from './options';\n\n/** The classes the markup carries — the runtimes and the shared CSS key on these, never on a literal. */\nexport enum FieldClass {\n Root = 'iox-field',\n Label = 'iox-field__label',\n LabelHidden = 'iox-field__label--hidden',\n Required = 'iox-field__required',\n Control = 'iox-field__control',\n Help = 'iox-field__help',\n Error = 'iox-field__error',\n Group = 'iox-field__group',\n Option = 'iox-field__option',\n Choices = 'iox-field__choices',\n ChoicesChips = 'iox-field__choices--chips',\n ChoicesList = 'iox-field__choices--list',\n Chips = 'iox-field__chips',\n Chip = 'iox-field__chip',\n ChipInput = 'iox-field__control--chip',\n DateButton = 'iox-field__control--date',\n DateValue = 'iox-field__date-value',\n DateIcon = 'iox-field__date-icon',\n DateInput = 'iox-field__date-input',\n}\n\n/** On the date button: the raw Earliest / Latest (`'0'`, an ISO day), resolved by the visitor's own today. */\nexport const DATE_MIN_ATTRIBUTE = 'data-iox-date-min';\nexport const DATE_MAX_ATTRIBUTE = 'data-iox-date-max';\n/** On the date's words while no day is chosen (the placeholder's colour keys on it). */\nexport const DATE_EMPTY_ATTRIBUTE = 'data-iox-empty';\n\n/** The calendar glyph inside the date button: one path set, drawn in currentColor, never announced. */\nexport const DATE_ICON_SVG = '<svg class=\"iox-field__date-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">' +\n '<rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15.5\" rx=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/>' +\n '<path d=\"M3.5 10h17M8 3v4M16 3v4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"/></svg>';\n\n/** The controls that are a plain `<input type=…>`; anything else unknown is a text input. */\nconst INPUT_TYPES: ReadonlySet<string> = new Set(['email', 'tel', 'url', 'number', 'password', 'time', 'file', 'hidden']);\n\n/** The `<input type>` of a control that renders as a plain input. */\nexport function inputTypeOf(control: string): string {\n return INPUT_TYPES.has(control) ? control : 'text';\n}\n\n/** A Choices field's appearance; anything unknown reads as chips (the default). */\nexport function choiceAppearanceOf(props: Record<string, any> | null | undefined): ChoiceAppearance {\n return props?.['appearance'] === ChoiceAppearance.List ? ChoiceAppearance.List : ChoiceAppearance.Chips;\n}\n\nexport interface FieldMarkupOptions {\n /** The name the field submits under — its FORM's unique name for it (`formFieldNames`, vectoriox/iox-ui#43). */\n name: string;\n /** The control's id; the label, help and error ids derive from it. */\n id: string;\n /** The node's classes (`iox-node-…`, the element-style marker…). */\n cls: string;\n /** Anything else the host element carries, written verbatim (an entrance's style). */\n attrs?: string;\n /** The site's language (the date's words). */\n lang?: string | null;\n escape: (value: string) => string;\n}\n\n/** A Field's whole element, as the string renderer writes it. */\nexport function fieldHtml(props: Record<string, any> | null | undefined, options: FieldMarkupOptions): string {\n const p = props ?? {};\n const { name, id, escape: esc } = options;\n const control = String(p['control'] ?? ControlType.Text);\n const required = !!p['required'];\n const help = p['help'] ? `<p class=\"${FieldClass.Help}\" id=\"${id}-help\">${esc(String(p['help']))}</p>` : '';\n const describedBy = p['help'] ? ` aria-describedby=\"${id}-help\"` : '';\n const labelClass = p['labelHidden'] ? `${FieldClass.Label} ${FieldClass.LabelHidden}` : FieldClass.Label;\n const mark = required ? `<span class=\"${FieldClass.Required}\" aria-hidden=\"true\">*</span>` : '';\n const text = esc(String(p['label'] ?? ''));\n const label = `<label class=\"${labelClass}\" id=\"${id}-label\" for=\"${id}\">${text}${mark}</label>`;\n const hidden = control === ControlType.Hidden ? ' hidden' : '';\n const open = `<div class=\"${FieldClass.Root} ${options.cls}\" data-iox-field=\"${esc(name)}\"${hidden}${options.attrs ?? ''}>`;\n\n if (control === ControlType.Choices) {\n return `${open}${choicesHtml(p, options, `<legend class=\"${labelClass}\" id=\"${id}-label\">${text}${mark}</legend>`, describedBy)}${help}</div>`;\n }\n return `${open}${label}${controlHtml(p, control, options, describedBy)}${help}</div>`;\n}\n\nfunction controlHtml(p: Record<string, any>, control: string, options: FieldMarkupOptions, describedBy: string): string {\n const { id, escape: esc } = options;\n const name = esc(options.name);\n const required = p['required'] ? ' required' : '';\n const placeholder = p['placeholder'] ? ` placeholder=\"${esc(String(p['placeholder']))}\"` : '';\n const choices = fieldOptionsOf(p);\n const option = (o: { value: string; label: string }) => `<option value=\"${esc(o.value)}\">${esc(o.label)}</option>`;\n const num = (v: unknown, d: number) => (Number.isFinite(Number(v)) && v !== '' && v !== null ? Number(v) : d);\n\n switch (control) {\n case ControlType.Textarea:\n return `<textarea class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\" rows=\"${num(p['rows'], 4)}\"${placeholder}${required}${describedBy}></textarea>`;\n case ControlType.Select:\n return `<select class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\"${required}${describedBy}>` +\n `<option value=\"\">${esc(String(p['placeholder'] ?? ''))}</option>${choices.map(option).join('')}</select>`;\n case ControlType.Switch:\n return `<input class=\"${FieldClass.Control} iox-field__control--switch\" type=\"checkbox\" role=\"switch\" id=\"${id}\" name=\"${name}\"${describedBy}>`;\n case ControlType.Range:\n return `<input class=\"${FieldClass.Control} iox-field__control--range\" type=\"range\" id=\"${id}\" name=\"${name}\" ` +\n `min=\"${num(p['rangeMin'], 0)}\" max=\"${num(p['rangeMax'], 100)}\" step=\"${num(p['rangeStep'], 1)}\"${describedBy}>`;\n case ControlType.Radio:\n return `<div class=\"${FieldClass.Group}\" role=\"radiogroup\" aria-labelledby=\"${id}-label\">` +\n choices.map(o => `<label class=\"${FieldClass.Option}\"><input class=\"${FieldClass.Control} iox-field__control--radio\" type=\"radio\" name=\"${name}\" ` +\n `value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`).join('') + `</div>`;\n case ControlType.Checkbox:\n return `<input class=\"${FieldClass.Control} iox-field__control--checkbox\" type=\"checkbox\" id=\"${id}\" name=\"${name}\"${required}${describedBy}>`;\n case ControlType.Date:\n return dateHtml(p, options, describedBy);\n default:\n return `<input class=\"${FieldClass.Control}\" id=\"${id}\" name=\"${name}\" type=\"${inputTypeOf(control)}\"${placeholder}${required}${describedBy}>`;\n }\n}\n\n/** A Choices field's fieldset: the legend, then the options as chips or as a list. */\nfunction choicesHtml(p: Record<string, any>, options: FieldMarkupOptions, legend: string, describedBy: string): string {\n const { escape: esc } = options;\n const name = esc(options.name);\n const multiple = p['multiple'] === true;\n const type = multiple ? 'checkbox' : 'radio';\n const chips = choiceAppearanceOf(p) === ChoiceAppearance.Chips;\n const items = fieldOptionsOf(p).map(o => chips\n ? `<label class=\"${FieldClass.Chip}\"><input class=\"${FieldClass.Control} ${FieldClass.ChipInput}\" type=\"${type}\" name=\"${name}\" value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`\n : `<label class=\"${FieldClass.Option}\"><input class=\"${FieldClass.Control}\" type=\"${type}\" name=\"${name}\" value=\"${esc(o.value)}\"><span>${esc(o.label)}</span></label>`).join('');\n const look = chips ? FieldClass.ChoicesChips : FieldClass.ChoicesList;\n const row = chips ? FieldClass.Chips : FieldClass.Group;\n return `<fieldset class=\"${FieldClass.Choices} ${look}\"${describedBy}>${legend}<div class=\"${row}\">${items}</div></fieldset>`;\n}\n\n/** The date picker's button + hidden input. The calendar itself is the runtime's, opened on press. */\nfunction dateHtml(p: Record<string, any>, options: FieldMarkupOptions, describedBy: string): string {\n const { id, escape: esc } = options;\n const words = datePickerWords(options.lang);\n const empty = esc(String(p['placeholder'] || words.choose));\n const bound = (attr: string, raw: unknown) => (typeof raw === 'string' && raw.trim() !== '') || typeof raw === 'number' ? ` ${attr}=\"${esc(String(raw).trim())}\"` : '';\n return `<button type=\"button\" class=\"${FieldClass.Control} ${FieldClass.DateButton}\" id=\"${id}\" aria-haspopup=\"dialog\" aria-expanded=\"false\" ` +\n `aria-labelledby=\"${id}-label ${id}-value\"${describedBy}${bound(DATE_MIN_ATTRIBUTE, p['earliest'])}${bound(DATE_MAX_ATTRIBUTE, p['latest'])}>` +\n `<span class=\"${FieldClass.DateValue}\" id=\"${id}-value\" ${DATE_EMPTY_ATTRIBUTE}>${empty}</span>${DATE_ICON_SVG}</button>` +\n `<input type=\"hidden\" class=\"${FieldClass.DateInput}\" name=\"${esc(options.name)}\" value=\"\">`;\n}\n","/*\n * @vectoriox/iox-ui/forms-core — the shared, FRAMEWORK-FREE core of the forms feature.\n *\n * ⚠️ Nothing in this entry point may import Angular, RxJS, the DOM, or Node. It is consumed by\n * THREE runtimes: the builder canvas (Angular), the SSR engine (Angular), and `iox-cms` (NestJS,\n * plain Node). The main `@vectoriox/iox-ui` entry pulls in `@angular/core`, which Nest must never\n * load — that is the entire reason this secondary entry point exists.\n *\n * Client-side validation is UX; server-side validation is truth. Both run THIS code, so they cannot\n * disagree. See iox-ai-guidance `architecture/builder/forms-and-inputs-plan.md` §5.\n */\n\nexport * from './form.model';\nexport * from './messages';\nexport * from './validate';\nexport * from './collect';\nexport * from './options';\nexport * from './runtime';\nexport * from './rule-catalog';\nexport * from './transport';\nexport * from './submit-lifecycle';\nexport * from './form-presets';\nexport * from './nesting';\nexport * from './dates';\nexport * from './channel';\nexport * from './field-markup';\n","import { Injectable, InjectionToken } from '@angular/core';\n\nimport {\n DEFAULT_EN_MESSAGES,\n FeedbackTiming,\n FieldError,\n FieldSpec,\n FormRuntimeState,\n FormSpec,\n INITIAL_FORM_STATE,\n onFieldBlur,\n onFieldChange,\n onSubmitAttempt,\n resetFormState,\n shouldShowError,\n uniqueFieldNames,\n} from '../../../forms-core/public-api';\n\n/**\n * A Field as its form's runtime knows it. Functions, not values: a trait edited on the canvas takes effect without\n * re-registering. `baseName` is the field's own key (its override, else its label's); the FORM makes it unique against\n * the fields before it — forms-core `uniqueFieldNames`, the rule the saved spec and the string renderer use (iox-ui#43).\n * `spec` is handed that unique name. A registration without `baseName` is named by its spec.\n */\nexport interface RegisteredField {\n baseName?: () => string;\n spec: (name: string) => FieldSpec;\n getValue: () => any;\n}\n\n/**\n * How a message KEY becomes text a visitor reads.\n *\n * Translation belongs to the consumer, not the library: the CMS client has ngx-translate, the SSR\n * engine has the page's locale bundle. Providing this token is how each one plugs its own in. The\n * default below interpolates the built-in English strings, so a consumer that provides nothing\n * still shows real sentences rather than raw keys.\n */\nexport type FormMessageResolver = (key: string, params?: Record<string, any>) => string;\n\nexport const IOX_FORM_MESSAGES = new InjectionToken<FormMessageResolver>('IOX_FORM_MESSAGES', {\n providedIn: 'root',\n factory: () => defaultMessageResolver,\n});\n\n/** `{{n}}` / `{{field}}` interpolation over the built-in English catalog. */\nexport const defaultMessageResolver: FormMessageResolver = (key, params) => {\n const template = DEFAULT_EN_MESSAGES[key] ?? key;\n if (!params) return template;\n return template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, name) => String(params[name] ?? ''));\n};\n\n/**\n * Per-form runtime. **Provided by `IoxFormComponent`**, so every Field created into that form's\n * `childrenHost` resolves THIS instance through its element injector — which is exactly how a field\n * finds its form without a form-id, matching the ancestry rule (decision D1). A Field outside any\n * form injects nothing and simply renders.\n *\n * All the decisions live in the pure `forms-core` runtime; this class only holds the mutable state,\n * the registered fields and the Angular-shaped API. Nothing here decides *when* an error shows.\n */\n@Injectable()\nexport class FormRuntimeService {\n /** Registered fields, in DOM order — the order the spec, the unique names and focus-first-invalid depend on. */\n private readonly fields: RegisteredField[] = [];\n\n private _state: FormRuntimeState = INITIAL_FORM_STATE;\n private _spec: FormSpec | null = null;\n private _timing: FeedbackTiming | string = FeedbackTiming.Smart;\n\n get state(): FormRuntimeState { return this._state; }\n get submitting(): boolean { return this._state.submitting; }\n\n /** Set by the Form from its own traits. */\n configure(spec: FormSpec, timing: FeedbackTiming | string): void {\n this._spec = spec;\n this._timing = timing;\n }\n\n /**\n * A Field announces itself here on init. It passes FUNCTIONS rather than values so the runtime\n * always reads the field's current spec and value — a trait edited on the canvas takes effect\n * without re-registering anything.\n */\n register(field: RegisteredField): () => void {\n this.fields.push(field);\n return () => {\n const index = this.fields.indexOf(field);\n if (index >= 0) this.fields.splice(index, 1);\n };\n }\n\n /** Every registered field's submitted name, in order — unique within the form (iox-ui#43). */\n private names(): string[] {\n return uniqueFieldNames(this.fields.map(f => (f.baseName ? f.baseName() : f.spec('').name)));\n }\n\n /** The name the form gives one registered field, or null when it is not this form's. */\n nameOf(field: RegisteredField): string | null {\n const index = this.fields.indexOf(field);\n return index < 0 ? null : this.names()[index];\n }\n\n /** The live spec, derived from what is registered right now. */\n specNow(): FormSpec {\n const base = this._spec ?? {\n formId: '', name: '', feedback: FeedbackTiming.Smart,\n fields: [], actions: [], antiSpam: { honeypot: true, minFillMs: 1200 },\n };\n const names = this.names();\n return { ...base, fields: this.fields.map((f, i) => ({ ...f.spec(names[i]), name: names[i] })) };\n }\n\n /** Current values, keyed by submitted field name. */\n values(): Record<string, any> {\n const out: Record<string, any> = {};\n const names = this.names();\n this.fields.forEach((field, i) => { out[names[i]] = field.getValue(); });\n return out;\n }\n\n onChange(name: string): void {\n this._state = onFieldChange(this._state, name, this.values(), this.specNow());\n }\n\n onBlur(name: string): void {\n this._state = onFieldBlur(this._state, name, this.values(), this.specNow());\n }\n\n /** Validate everything. Returns whether the submission may proceed. */\n validateAll(): boolean {\n this._state = onSubmitAttempt(this._state, this.values(), this.specNow());\n return Object.keys(this._state.errors).length === 0;\n }\n\n setSubmitting(submitting: boolean): void {\n this._state = { ...this._state, submitting };\n }\n\n /** The server rejected it — its verdict replaces ours. */\n applyErrors(errors: Record<string, FieldError>): void {\n this._state = { ...this._state, submitted: true, submitting: false, errors: { ...errors } };\n }\n\n reset(): void {\n this._state = resetFormState();\n }\n\n /** Whether this field's error is allowed on screen right now. */\n showsError(name: string): boolean {\n return shouldShowError(name, this._state, this._timing);\n }\n\n errorFor(name: string): FieldError | undefined {\n return this._state.errors[name];\n }\n\n /** The first invalid field in registration (DOM) order — what submit should focus. */\n firstInvalidName(): string | null {\n for (const name of this.names()) {\n if (this._state.errors[name]) return name;\n }\n return null;\n }\n}\n","import { prefersReducedMotion } from '../../motion/motion';\n\n/**\n * The shake a failing field gives after a refused submit (premium components N2) — Emil 134: the named effect for\n * rejected input. ONE function for the component path, the string path and the canvas (a field put in its error state\n * on the canvas shakes once, so the author sees the motion they are designing).\n *\n * WAAPI, `composite: 'add'`, so it moves the field from wherever its own transform puts it. A second refused submit\n * CANCELS the running shake and starts clean — never two stacked (Emil 52/62). Under reduced motion there is no shake:\n * focus and the message still happen (Emil 192 — the meaning survives without the movement).\n */\n\n/** ±6 → ±4 → rest: a decaying side-to-side (the prototype's, Doron-approved). */\nexport const SHAKE_KEYFRAMES: ReadonlyArray<Keyframe> = Object.freeze([\n { transform: 'translateX(0px)' },\n { transform: 'translateX(-6px)' },\n { transform: 'translateX(6px)' },\n { transform: 'translateX(-4px)' },\n { transform: 'translateX(4px)' },\n { transform: 'translateX(0px)' },\n]);\n/** Under Emil's UI budget (28) and long enough to read as \"no\" (134). */\nexport const SHAKE_DURATION_MS = 320;\n/** Emil 18 — the strong ease-out. */\nexport const SHAKE_EASING = 'cubic-bezier(0.23, 1, 0.32, 1)';\n\nconst RUNNING = '__ioxShake';\n\n/** Shake `el` once; returns the animation, or null when nothing plays (no element, no WAAPI, reduced motion). */\nexport function shakeElement(el: Element | null | undefined, reducedMotion: boolean = prefersReducedMotion()): Animation | null {\n if (!el) return null;\n const host = el as Element & { [RUNNING]?: Animation };\n host[RUNNING]?.cancel();\n delete host[RUNNING];\n if (reducedMotion || typeof (el as HTMLElement).animate !== 'function') return null;\n const animation = (el as HTMLElement).animate(SHAKE_KEYFRAMES as Keyframe[], { duration: SHAKE_DURATION_MS, easing: SHAKE_EASING, composite: 'add' });\n host[RUNNING] = animation;\n animation.onfinish = () => { if (host[RUNNING] === animation) delete host[RUNNING]; };\n return animation;\n}\n","import { FormRenderState, SUBMIT_KEEP_ENABLED_ATTRIBUTE, submitButtonView } from '../../../forms-core/public-api';\n\nconst SUBMIT_BUTTON_SELECTOR = '.iox-submit';\nconst FORM_SELECTOR = 'form, .iox-form';\n\n/**\n * Put every submit button of `form` in the form's state (vectoriox/iox-ui#42): busy (`aria-busy`) and — unless its\n * author turned it off — disabled while the form sends; itself again otherwise. The ONE applier: the component path's\n * form, the string runtime and the canvas's Sending state all call it, from the shared `submitButtonView`. A button\n * inside a nested form belongs to that form, not this one.\n */\nexport function syncSubmitButtons(form: Element | null | undefined, state: FormRenderState | string | null | undefined): void {\n if (!form?.querySelectorAll) return;\n for (const button of Array.from(form.querySelectorAll<HTMLElement>(SUBMIT_BUTTON_SELECTOR))) {\n if (button.closest?.(FORM_SELECTOR) !== form) continue;\n const view = submitButtonView(state, !button.hasAttribute(SUBMIT_KEEP_ENABLED_ATTRIBUTE));\n if (view.busy) button.setAttribute('aria-busy', 'true');\n else button.removeAttribute('aria-busy');\n if (view.disabled) button.setAttribute('disabled', '');\n else button.removeAttribute('disabled');\n }\n}\n","import { Component, ElementRef, EventEmitter, Inject, InjectionToken, Input, OnChanges, OnInit, Optional, Output, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport {\n failureAnnouncement,\n FeedbackTiming,\n FormRenderState,\n FormTransport,\n HONEYPOT_FIELD,\n submitOutcome,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { FormRuntimeService } from './form-runtime.service';\nimport { shakeElement } from './shake';\nimport { syncSubmitButtons } from './submit-buttons';\n\n/**\n * How a host makes the form actually send. The SSR engine provides one (an HttpClient POST); the\n * builder canvas deliberately does NOT — an author pressing Submit while designing must never file\n * a real submission. Without it the component keeps its original behaviour and only emits\n * `formSubmit`, which is also the escape hatch for a host that wants the transport itself.\n */\nexport const IOX_FORM_TRANSPORT = new InjectionToken<FormTransport>('IOX_FORM_TRANSPORT');\n\n/** Where a successful submit sends the visitor. Provided by the host; absent on the canvas. */\nexport const IOX_FORM_NAVIGATOR = new InjectionToken<(url: string) => void>('IOX_FORM_NAVIGATOR');\n\n/** Which of the form's four states the canvas / runtime is showing — forms-core's, shared with the string runtime. */\nexport { FormRenderState } from '../../../forms-core/public-api';\n\n/**\n * Directive-host Form: the real `<form>` IS the host — no wrapper, no inner/outer split. Children\n * (fields, layout, the submit button, and the two state blocks) render into it via `childrenHost`.\n *\n * Scope is ANCESTRY, not naming (decision D1): a Field belongs to its nearest ancestor Form, so\n * there is no form-id to pick and nothing to mis-wire. The runtime finds its fields by walking the\n * DOM it owns.\n *\n * `renderState` drives which children are visible. In the builder it is set by the canvas state\n * switcher so an author can DESIGN the success and error blocks; at runtime the same input is\n * driven by the submit lifecycle. One mechanism, two drivers — the author designs exactly what a\n * visitor will see.\n *\n * ⚠️ `novalidate` is deliberate: the browser's native bubbles would pre-empt our own messages,\n * which are styleable, translated and announced. Validation still runs — ours does it.\n */\n@Component({\n selector: 'form[iox-form]',\n // The honeypot is part of the form's own markup, not a child node: it must exist on every form\n // without an author adding it, and it must never be visible or reachable. `tabindex=\"-1\"` and\n // `aria-hidden` keep it away from keyboard and screen-reader users; only a bot filling every\n // input will touch it.\n template: `\n <div class=\"iox-form__hp\" aria-hidden=\"true\">\n <input type=\"text\" [attr.name]=\"honeypotField\" tabindex=\"-1\" autocomplete=\"off\" />\n </div>\n <!-- Failure announcement (board 11). Visually hidden and always PRESENT — an aria-live\n region added to the DOM at the moment it gains text is not reliably announced; the\n region has to be there first and only its content change. -->\n <div *ngIf=\"announceFailure\"\n class=\"iox-form__hp\"\n role=\"status\"\n aria-live=\"assertive\"\n aria-atomic=\"true\">{{ announcement }}</div>\n <ng-container #childrenHost></ng-container>\n `,\n host: {\n '[class]': \"'iox-form iox-node-' + nodeId\",\n '[attr.novalidate]': \"''\",\n '[attr.data-iox-form]': 'formId || null',\n '[attr.data-iox-state]': 'renderState',\n '[attr.aria-busy]': \"renderState === 'submitting' ? 'true' : null\",\n '(submit)': 'onSubmit($event)',\n },\n // Per-form instance. A Field created into `childrenHost` resolves THIS one through its element\n // injector — which is how a field finds its form without a form-id (decision D1).\n providers: [FormRuntimeService],\n // Visibility rules and the honeypot's off-screen box live in the SHARED `styles/iox-forms.css` asset,\n // not here: the string renderer writes the same markup, so a scoped copy would drift.\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormComponent implements OnChanges, OnInit {\n @Input() nodeId = '';\n /** Stable id the submit endpoint resolves the saved spec by. */\n @Input() formId = '';\n /** Author-facing name — what the submissions inbox groups by. */\n @Input() name = '';\n /** Which state shows. Every change puts the submit buttons in it too (busy / disabled — iox-ui#42), through the\n * ONE applier the string runtime and the canvas call. */\n @Input() set renderState(state: FormRenderState | string) {\n this._renderState = state;\n syncSubmitButtons(this.host?.nativeElement, state);\n }\n get renderState(): FormRenderState | string { return this._renderState; }\n private _renderState: FormRenderState | string = FormRenderState.Idle;\n @Input() feedback: FeedbackTiming | string = FeedbackTiming.Smart;\n\n /**\n * Move focus to the first field that failed, instead of leaving the visitor to hunt for red\n * text. On by default — the single most valuable thing a failed submit can do.\n */\n @Input() focusFirstProblem = true;\n\n /**\n * Speak the failure the moment it happens. Without this a screen-reader user only learns a\n * submit failed if they happen to tab back into the message — the error text is rendered, but\n * nothing directs them to it.\n */\n @Input() announceFailure = true;\n\n /** What the live region is currently saying. Empty between attempts so the same failure\n * announces again rather than being swallowed as an unchanged value. */\n announcement = '';\n\n /**\n * Emitted ONLY when client-side validation passes, carrying the collected values. The host\n * (builder canvas or engine runtime) owns the transport — posting, retries and the server's\n * verdict — so the same component serves both renderers.\n */\n @Output() formSubmit = new EventEmitter<{ values: Record<string, any>; event: Event }>();\n /** Emitted when a submit attempt was refused locally, so a host can react (analytics, focus). */\n @Output() validationFailed = new EventEmitter<Record<string, any>>();\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n /** Exposed to the template so the input's name and the server's check cannot drift. */\n readonly honeypotField = HONEYPOT_FIELD;\n /** When this form was rendered — the fill-time signal the server checks. */\n private renderedAt = 0;\n /** Guards against a double submit while a POST is in flight. */\n private inFlight = false;\n\n /**\n * Constructor injection rather than `inject()`, for the same reason as Field: this library's\n * specs construct components directly. `runtime` is provided by THIS component (see\n * `providers`), so every Field created into `childrenHost` resolves this instance by ancestry.\n */\n constructor(\n private readonly runtime: FormRuntimeService,\n private readonly host: ElementRef<HTMLElement>,\n @Optional() @Inject(IOX_FORM_TRANSPORT) private readonly transport: FormTransport | null = null,\n @Optional() @Inject(IOX_FORM_NAVIGATOR) private readonly navigate: ((url: string) => void) | null = null,\n ) {}\n\n ngOnInit(): void {\n // Stamp render time for the fill-time check. Taken ONCE, when the form appears — the whole\n // point is the gap between seeing the form and sending it.\n this.renderedAt = Date.now();\n }\n\n ngOnChanges(): void {\n // Traits are edited by DIRECT ASSIGNMENT on the canvas, which does not call ngOnChanges —\n // but `feedback` is also read live by `runtime.showsError`, so re-configuring here covers\n // the setInput path and the getter covers the rest.\n this.runtime.configure(this.runtime.specNow(), this.feedback);\n }\n\n onSubmit(event: Event): void {\n // Never let the browser navigate: a full page POST would lose the designed Success state\n // and every value the visitor typed.\n event.preventDefault();\n // Sent is final (premium N2): the button reads \"Sent\" and is disabled — an Enter in a field sends nothing twice.\n if (this.renderState === FormRenderState.Success) return;\n this.runtime.configure(this.runtime.specNow(), this.feedback);\n\n if (!this.runtime.validateAll()) {\n this.announce(this.runtime.state.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n this.validationFailed.emit(this.runtime.state.errors);\n return;\n }\n const values = this.runtime.values();\n this.formSubmit.emit({ values, event });\n\n // No transport means the host owns sending (the builder canvas, which must never post).\n if (!this.transport || this.inFlight) return;\n void this.send(values);\n }\n\n /**\n * The submit lifecycle, owned HERE so both hosts get the same one: submitting → the server's\n * verdict → success (and an optional redirect) or error. Only the HTTP call itself is the\n * host's, which is the one part that genuinely differs between the engine and anything else.\n */\n private async send(values: Record<string, any>): Promise<void> {\n this.inFlight = true;\n this.renderState = FormRenderState.Submitting;\n this.runtime.setSubmitting(true);\n\n let response: SubmitResponse;\n try {\n response = await this.transport!({\n formId: this.formId,\n values: withAntiSpamFields(values, this.renderedAt, this.honeypotValue()),\n });\n } catch {\n // The call never reached the server. Showing Success here would tell the visitor their\n // message was sent when nothing was stored — the one lie this feature must not tell.\n response = { ok: false };\n }\n\n this.inFlight = false;\n this.runtime.setSubmitting(false);\n this.applyResponse(response);\n }\n\n /** Turn the server's answer into what the visitor sees — the shared `submitOutcome`, which the string runtime\n * applies too. Public so a host-owned transport can reuse it. */\n applyResponse(response: SubmitResponse): void {\n const outcome = submitOutcome(response);\n this.renderState = outcome.state;\n if (outcome.errors) {\n this.runtime.applyErrors(outcome.errors);\n this.announce(outcome.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n return;\n }\n if (outcome.state === FormRenderState.Error) {\n this.announce(null);\n return;\n }\n // Clear the values so a visitor who stays on the page does not see their old answers behind\n // the success message, and cannot resubmit them by pressing enter.\n this.runtime.reset();\n this.resetControls();\n if (outcome.redirect && this.navigate) this.navigate(outcome.redirect);\n }\n\n /** The honeypot input's value, if the host rendered one. Absent reads as empty — never as spam. */\n private honeypotValue(): string {\n const input = this.host.nativeElement\n .querySelector?.<HTMLInputElement>(`input[name=\"${HONEYPOT_FIELD}\"]`);\n return input?.value ?? '';\n }\n\n /** Blank the real DOM controls after a success. The runtime state alone would leave them filled. */\n private resetControls(): void {\n const form = this.host.nativeElement as HTMLFormElement;\n if (typeof form.reset === 'function') form.reset();\n }\n\n /**\n * Put the failure into the live region. Cleared first so two identical failures in a row are\n * two announcements, not one — a live region only speaks on CHANGE, and \"same error again\"\n * is exactly when a visitor most needs telling.\n */\n private announce(errors: Record<string, any> | null): void {\n if (!this.announceFailure) return;\n const next = failureAnnouncement(errors);\n this.announcement = '';\n // A microtask is enough for the empty value to be committed before the new one lands.\n Promise.resolve().then(() => { this.announcement = next; });\n }\n\n /** Focus the first field that failed and shake it once (premium N2 — Emil 134; none under reduced motion). */\n private focusFirstInvalid(): void {\n const name = this.runtime.firstInvalidName();\n if (!name) return;\n // Compare the attribute rather than interpolating the name into a selector: `CSS.escape` is\n // a browser-only global (undefined on the server and under the unit-test runner), and an\n // author-overridden field key can contain characters a raw selector would choke on.\n const fields = this.host.nativeElement.querySelectorAll?.('[data-iox-field]') ?? [];\n for (const element of Array.from(fields) as HTMLElement[]) {\n if (element.getAttribute('data-iox-field') !== name) continue;\n element.querySelector<HTMLElement>('.iox-field__control')?.focus();\n shakeElement(element);\n return;\n }\n }\n}\n","/**\n * placeFloating — where a panel anchored to a control goes (premium components N8, reused by M5's tooltip and popover).\n *\n * ONE pure decision for every floating panel: under its anchor, aligned to the anchor's reading start (the left edge in\n * LTR, the right in RTL); above it when there is no room below and more above; held inside the viewport with a margin;\n * and the transform-origin AT the anchor, so the panel grows from the control that opened it (Emil 47) — even when the\n * clamp moved it sideways.\n *\n * Lives in the main entry: nothing server-side places a panel, and the date picker (now) and the floating family (M5)\n * are DOM runtimes of the main entry. Pure — no DOM read here: the caller measures, this decides, the caller writes.\n */\n\nexport interface FloatingRect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nexport interface FloatingSize {\n width: number;\n height: number;\n}\n\nexport interface FloatingViewport {\n width: number;\n height: number;\n}\n\nexport enum FloatingSide {\n Below = 'below',\n Above = 'above',\n}\n\nexport interface FloatingOptions {\n /** Space between the anchor and the panel. */\n gap?: number;\n /** Space the panel always keeps from the viewport's edges. */\n margin?: number;\n /** Right-to-left: the panel lines up with the anchor's right edge. */\n rtl?: boolean;\n}\n\nexport interface FloatingPlacement {\n top: number;\n left: number;\n side: FloatingSide;\n /** A CSS transform-origin in the panel's own box, pointing at the anchor's reading-start corner. */\n origin: string;\n}\n\n/** Emil's popover spacing: close enough to read as the control's, clear of its focus ring. */\nexport const FLOATING_GAP = 8;\n/** The viewport margin — a panel never touches the screen's edge. */\nexport const FLOATING_MARGIN = 12;\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), Math.max(min, max));\n\n/** Where `panel` goes beside `anchor` inside `viewport`. */\nexport function placeFloating(anchor: FloatingRect, panel: FloatingSize, viewport: FloatingViewport, options: FloatingOptions = {}): FloatingPlacement {\n const gap = options.gap ?? FLOATING_GAP;\n const margin = options.margin ?? FLOATING_MARGIN;\n const anchorBottom = anchor.top + anchor.height;\n const roomBelow = viewport.height - anchorBottom - gap - margin;\n const roomAbove = anchor.top - gap - margin;\n // Below is the default; above only when below is too short AND above is roomier (a field near the screen's foot).\n const side = roomBelow >= panel.height || roomBelow >= roomAbove ? FloatingSide.Below : FloatingSide.Above;\n const wantTop = side === FloatingSide.Below ? anchorBottom + gap : anchor.top - gap - panel.height;\n const top = clamp(wantTop, margin, viewport.height - margin - panel.height);\n\n const start = options.rtl ? anchor.left + anchor.width : anchor.left;\n const wantLeft = options.rtl ? start - panel.width : start;\n const left = clamp(wantLeft, margin, viewport.width - margin - panel.width);\n\n // The origin is the anchor's start corner, in the panel's own coordinates, kept on the panel's box.\n const originX = Math.round(clamp(start - left, 0, panel.width));\n const originY = side === FloatingSide.Below ? 0 : Math.round(panel.height);\n return { top: Math.round(top), left: Math.round(left), side, origin: `${originX}px ${originY}px` };\n}\n","import {\n CalendarMonth, calendarKeyTarget, calendarMonth, clampIso, DATE_EMPTY_ATTRIBUTE, DATE_MAX_ATTRIBUTE, DATE_MIN_ATTRIBUTE, datePickerWords, DatePickerWords,\n FieldClass, formatDateInWords, isIsoDate, parseDateBound, resolveDateBound, todayIso, weekStartFor, addMonthsIso,\n} from '../../../forms-core/public-api';\nimport { placeFloating } from '../../floating/place-floating';\n\n/**\n * THE DATE PICKER (premium components N8) — the APG date picker dialog, wearing the look. ONE DOM runtime for the\n * engine's component path and its string path; the builder canvas draws the same panel for its design-time Open state\n * (`showCalendarDesign`). The month, the keys and the bounds are forms-core's (`dates.ts`); this file only draws them,\n * places them and moves focus.\n *\n * - A modal `<dialog>` INSIDE the field, so it inherits the look's tokens and the section's scheme, and the field's\n * part styles reach it; on a laptop it is a popover under the field (above when there is no room) growing from it, on\n * a phone a bottom sheet (the shared CSS — `iox-forms.css` / `iox-design.css` — owns both looks and their motion).\n * - The grid always has six rows; a month change is instant (Emil 2/65 — rapid, keyboard-driven UI never animates).\n * - Roving focus: one day is the Tab stop. Arrows move a day (mirrored in RTL), Home/End the week, PageUp/PageDown a\n * month (Shift: a year), Enter/Space pick, Esc closes and gives focus back to the button. Refused days are\n * `aria-disabled` and never picked, by click or by key.\n */\n\nexport interface DatePickerOptions {\n /** The site's language (words, week start, the date in words); else the nearest `[lang]`, else the document's. */\n lang?: string | null;\n /** Right-to-left; else the field's computed direction. */\n rtl?: boolean | null;\n /** Today, for a test; else the visitor's local day. */\n today?: () => string;\n /** The component path's hook: a day was picked (the hidden input is written either way). */\n onPick?: (iso: string) => void;\n /** Page scroll is held while the calendar is open (Lenis would scroll the page under a fixed panel). */\n lockScroll?: () => void;\n unlockScroll?: () => void;\n /** Overrides the built-in words (a host with its own translations). */\n words?: Partial<DatePickerWords>;\n}\n\nexport enum CalendarClass {\n Panel = 'iox-cal',\n Grab = 'iox-cal__grab',\n Head = 'iox-cal__head',\n Title = 'iox-cal__title',\n Nav = 'iox-cal__nav',\n Prev = 'iox-cal__prev',\n Next = 'iox-cal__next',\n Grid = 'iox-cal__grid',\n Weekday = 'iox-cal__weekday',\n Cell = 'iox-cal__cell',\n Day = 'iox-cal__day',\n}\n\n/** On the panel while it leaves (the shared CSS plays the exit on it). */\nexport const CALENDAR_CLOSING_ATTRIBUTE = 'data-iox-closing';\n/** On a panel opened from the KEYBOARD: it appears and goes with no motion (Emil 2 — keyboard actions never animate). */\nexport const CALENDAR_INSTANT_ATTRIBUTE = 'data-iox-instant';\n/** On the panel the builder canvas draws for its design-time Open state (in the flow, inert). */\nexport const CALENDAR_DESIGN_ATTRIBUTE = 'data-iox-cal-design';\n/** A phone gets the sheet (the drawer curve, the scrim) — the same width the shared CSS keys on. */\nexport const CALENDAR_SHEET_QUERY = '(max-width: 767px)';\n\nconst RUNTIME = '__ioxDatePicker';\nconst ISO_ATTRIBUTE = 'data-iox-iso';\nconst CHEVRON_BACK = 'M15 18l-6-6 6-6';\nconst CHEVRON_AHEAD = 'M9 18l6-6-6-6';\n/** An 1 Feb 2026 is a Sunday: day `i` of the week is `SUNDAY + i`. */\nconst A_SUNDAY = new Date(2026, 1, 1);\nlet calendarSeq = 0;\n\nconst chevron = (doc: Document, d: string): SVGSVGElement => {\n const svg = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('width', '18'); svg.setAttribute('height', '18'); svg.setAttribute('viewBox', '0 0 24 24');\n svg.setAttribute('aria-hidden', 'true'); svg.setAttribute('focusable', 'false');\n const path = doc.createElementNS('http://www.w3.org/2000/svg', 'path');\n path.setAttribute('d', d); path.setAttribute('fill', 'none'); path.setAttribute('stroke', 'currentColor');\n path.setAttribute('stroke-width', '2'); path.setAttribute('stroke-linecap', 'round'); path.setAttribute('stroke-linejoin', 'round');\n svg.appendChild(path);\n return svg;\n};\n\nconst el = <K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, cls?: string, attrs: Record<string, string> = {}): HTMLElementTagNameMap[K] => {\n const node = doc.createElement(tag);\n if (cls) node.className = cls;\n for (const [k, v] of Object.entries(attrs)) node.setAttribute(k, v);\n return node;\n};\n\n/** The language the field speaks: the host's, the nearest `[lang]`, the document's. */\nexport function fieldLanguage(field: Element, lang?: string | null): string {\n return lang || field.closest('[lang]')?.getAttribute('lang') || field.ownerDocument?.documentElement?.lang || 'en';\n}\n\n/** The ms a transition list takes, the longest entry (duration + delay) — how long an exit plays. */\nfunction transitionMs(node: Element): number {\n const style = node.ownerDocument?.defaultView?.getComputedStyle(node);\n if (!style) return 0;\n const parse = (list: string) => list.split(',').map(t => (t.trim().endsWith('ms') ? parseFloat(t) : parseFloat(t) * 1000) || 0);\n const durations = parse(style.transitionDuration);\n const delays = parse(style.transitionDelay);\n return Math.max(0, ...durations.map((d, i) => d + (delays[i % delays.length] ?? 0)));\n}\n\n/** The panel's skeleton: grab handle, the month and its arrows, the weekday row. The body is `paintMonth`'s. */\nfunction buildPanel(doc: Document, tag: 'dialog' | 'div', words: DatePickerWords, locale: string, weekdays: number[], rtl: boolean): HTMLElement {\n const id = `iox-cal-${++calendarSeq}`;\n const panel = el(doc, tag, CalendarClass.Panel, { 'aria-label': words.choose, dir: rtl ? 'rtl' : 'ltr', 'data-lenis-prevent': '' });\n panel.appendChild(el(doc, 'span', CalendarClass.Grab, { 'aria-hidden': 'true' }));\n const head = el(doc, 'div', CalendarClass.Head);\n const title = el(doc, 'h2', CalendarClass.Title, { id: `${id}-title`, 'aria-live': 'polite' });\n const nav = el(doc, 'div', CalendarClass.Nav);\n const prev = el(doc, 'button', CalendarClass.Prev, { type: 'button', 'aria-label': words.previousMonth, title: words.previousMonth });\n const next = el(doc, 'button', CalendarClass.Next, { type: 'button', 'aria-label': words.nextMonth, title: words.nextMonth });\n prev.appendChild(chevron(doc, CHEVRON_BACK));\n next.appendChild(chevron(doc, CHEVRON_AHEAD));\n nav.append(prev, next);\n head.append(title, nav);\n const table = el(doc, 'table', CalendarClass.Grid, { role: 'grid', 'aria-labelledby': `${id}-title` });\n const row = el(doc, 'tr');\n const short = new Intl.DateTimeFormat(locale, { weekday: 'narrow' });\n const long = new Intl.DateTimeFormat(locale, { weekday: 'long' });\n for (const dow of weekdays) {\n const day = new Date(A_SUNDAY.getFullYear(), A_SUNDAY.getMonth(), A_SUNDAY.getDate() + dow);\n const th = el(doc, 'th', CalendarClass.Weekday, { scope: 'col', abbr: long.format(day) });\n th.textContent = short.format(day);\n row.appendChild(th);\n }\n const thead = el(doc, 'thead');\n thead.appendChild(row);\n table.append(thead, el(doc, 'tbody'));\n panel.append(head, table);\n return panel;\n}\n\n/** Draw one month into the panel: its title, its six rows, which arrows can move. */\nfunction paintMonth(panel: HTMLElement, model: CalendarMonth, locale: string): void {\n const doc = panel.ownerDocument;\n const title = panel.querySelector(`.${CalendarClass.Title}`);\n if (title) title.textContent = new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(new Date(model.year, model.month, 1));\n const full = new Intl.DateTimeFormat(locale, { dateStyle: 'full' });\n const body = panel.querySelector('tbody')!;\n body.textContent = '';\n for (const week of model.weeks) {\n const tr = el(doc, 'tr');\n for (const day of week) {\n const td = el(doc, 'td', CalendarClass.Cell, { role: 'gridcell' });\n if (day) {\n const button = el(doc, 'button', CalendarClass.Day, { type: 'button', tabindex: day.focus ? '0' : '-1', [ISO_ATTRIBUTE]: day.iso });\n button.setAttribute('aria-label', full.format(new Date(model.year, model.month, day.day)));\n button.textContent = String(day.day);\n if (day.today) button.setAttribute('aria-current', 'date');\n if (day.disabled) button.setAttribute('aria-disabled', 'true');\n if (day.selected) td.setAttribute('aria-selected', 'true');\n td.appendChild(button);\n }\n tr.appendChild(td);\n }\n body.appendChild(tr);\n }\n (panel.querySelector(`.${CalendarClass.Prev}`) as HTMLButtonElement | null)?.toggleAttribute('disabled', !model.canPrev);\n (panel.querySelector(`.${CalendarClass.Next}`) as HTMLButtonElement | null)?.toggleAttribute('disabled', !model.canNext);\n}\n\n/** The date field's parts. */\nfunction partsOf(field: Element): { button: HTMLButtonElement | null; input: HTMLInputElement | null; words: HTMLElement | null } {\n return {\n button: field.querySelector<HTMLButtonElement>(`button.${FieldClass.DateButton}`),\n input: field.querySelector<HTMLInputElement>(`input.${FieldClass.DateInput}`),\n words: field.querySelector<HTMLElement>(`.${FieldClass.DateValue}`),\n };\n}\n\n/** Write a day (or nothing) into a date field: the hidden input carries it, the button says it in words. */\nexport function setDateFieldValue(field: Element, iso: string, options: { lang?: string | null; today?: string; placeholder?: string } = {}): void {\n const { input, words } = partsOf(field);\n const day = isIsoDate(iso) ? iso : '';\n if (input) input.value = day;\n if (!words) return;\n const lang = fieldLanguage(field, options.lang);\n if (day) {\n words.textContent = formatDateInWords(day, lang, options.today ?? todayIso());\n words.removeAttribute(DATE_EMPTY_ATTRIBUTE);\n } else {\n words.textContent = options.placeholder ?? words.getAttribute('data-iox-placeholder') ?? datePickerWords(lang).choose;\n words.setAttribute(DATE_EMPTY_ATTRIBUTE, '');\n }\n}\n\n/** The days a field accepts today, from the raw Earliest / Latest its button carries. */\nfunction rangeOf(button: Element, today: string): { min: string | null; max: string | null } {\n const bound = (attr: string) => resolveDateBound(parseDateBound(button.getAttribute(attr) ?? ''), today);\n return { min: bound(DATE_MIN_ATTRIBUTE), max: bound(DATE_MAX_ATTRIBUTE) };\n}\n\n/** One live date field. Built by `attachDatePicker`; idempotent per field. */\nexport class DatePickerRuntime {\n private panel: HTMLDialogElement | null = null;\n private focusIso = '';\n private closing = false;\n private readonly listeners: Array<[EventTarget, string, EventListener]> = [];\n\n constructor(private readonly field: HTMLElement, private readonly options: DatePickerOptions = {}) {\n const { button, words } = partsOf(field);\n if (words && !words.hasAttribute('data-iox-placeholder') && words.hasAttribute(DATE_EMPTY_ATTRIBUTE)) {\n words.setAttribute('data-iox-placeholder', words.textContent ?? '');\n }\n // A click the keyboard made (Enter / Space on the button) has no pointer: `detail` 0.\n if (button) this.listen(button, 'click', e => this.open((e as MouseEvent).detail === 0));\n // A successful submit resets the form: a hidden input keeps its value through `form.reset()` (its value IS its\n // attribute), so the field clears itself. A host that renders the field (`onPick` — the component path) owns\n // its words and its value: the runtime never writes over what the host's view tracks.\n const form = field.closest('form');\n if (form && !options.onPick) this.listen(form, 'reset', () => setDateFieldValue(field, '', { lang: this.lang() }));\n (field as unknown as Record<string, unknown>)[RUNTIME] = this;\n }\n\n get isOpen(): boolean { return !!this.panel; }\n\n value(): string { return partsOf(this.field).input?.value ?? ''; }\n\n destroy(): void {\n this.dismiss(true);\n for (const [target, type, fn] of this.listeners) target.removeEventListener(type, fn);\n this.listeners.length = 0;\n delete (this.field as unknown as Record<string, unknown>)[RUNTIME];\n }\n\n /** Open the calendar; `instant` (opened from the keyboard) skips the entrance and, later, the exit. */\n open(instant = false): void {\n const { button } = partsOf(this.field);\n if (!button || this.panel || (button as HTMLButtonElement).disabled) return;\n const doc = this.field.ownerDocument;\n const lang = this.lang();\n const rtl = this.rtl();\n const today = this.today();\n const { min, max } = rangeOf(button, today);\n const selected = this.value();\n this.focusIso = clampIso(isIsoDate(selected) ? selected : today, min, max);\n const weekStart = weekStartFor(lang);\n const model = () => calendarMonth(this.focusIso, { weekStart, today, min, max, selected: this.value() || null });\n const panel = buildPanel(doc, 'dialog', this.words(lang), lang, model().weekdays, rtl) as HTMLDialogElement;\n const sheet = !!doc.defaultView?.matchMedia?.(CALENDAR_SHEET_QUERY).matches;\n paintMonth(panel, model(), lang);\n if (instant) panel.setAttribute(CALENDAR_INSTANT_ATTRIBUTE, '');\n this.field.appendChild(panel);\n this.panel = panel;\n this.closing = false;\n\n const repaint = (focusDay: boolean) => {\n paintMonth(panel, model(), lang);\n if (focusDay) this.focusDay();\n };\n const pickable = (b: Element | null): b is HTMLElement => !!b && b.getAttribute('aria-disabled') !== 'true';\n this.listen(panel, 'click', e => {\n const target = e.target as Element;\n const day = target.closest?.(`.${CalendarClass.Day}`);\n // Enter / Space on a day is a click with no pointer: the calendar goes at once (Emil 2).\n if (day) { if (pickable(day)) this.pick(day.getAttribute(ISO_ATTRIBUTE)!, (e as MouseEvent).detail === 0); return; }\n if (target.closest?.(`.${CalendarClass.Prev}`)) { this.focusIso = clampIso(addMonthsIso(this.focusIso, -1), min, max); repaint(false); return; }\n if (target.closest?.(`.${CalendarClass.Next}`)) { this.focusIso = clampIso(addMonthsIso(this.focusIso, 1), min, max); repaint(false); return; }\n // A modal dialog hears clicks on its backdrop as its own: outside the panel's box closes it.\n const r = panel.getBoundingClientRect();\n const { clientX: x, clientY: y } = e as MouseEvent;\n if (x < r.left || x > r.right || y < r.top || y > r.bottom) this.close();\n });\n this.listen(panel, 'keydown', e => {\n const key = e as KeyboardEvent;\n if (!(key.target as Element)?.closest?.(`.${CalendarClass.Day}`)) return;\n const next = calendarKeyTarget(key.key, this.focusIso, { weekStart, rtl, shift: key.shiftKey, min, max });\n if (!next) return;\n key.preventDefault();\n this.focusIso = next;\n repaint(true);\n });\n // Esc: the dialog's own cancel — a keyboard action, so it goes at once (Emil 2), focus back on the button.\n this.listen(panel, 'cancel', e => { e.preventDefault(); this.close(true); });\n\n if (sheet) panel.setAttribute('data-iox-cal-sheet', '');\n panel.showModal();\n if (!sheet) this.place(rtl);\n this.focusDay();\n button.setAttribute('aria-expanded', 'true');\n this.options.lockScroll?.();\n }\n\n /** Close with the exit the shared CSS plays (faster than the entrance — Emil 30), then give focus back; `instant`\n * (a keyboard close — Esc, Enter on a day) or a panel opened from the keyboard goes at once (Emil 2). */\n close(instant = false): void {\n if (!this.panel || this.closing) return;\n this.closing = true;\n const panel = this.panel;\n partsOf(this.field).button?.setAttribute('aria-expanded', 'false');\n if (instant || panel.hasAttribute(CALENDAR_INSTANT_ATTRIBUTE)) { this.dismiss(false); return; }\n panel.setAttribute(CALENDAR_CLOSING_ATTRIBUTE, '');\n const ms = transitionMs(panel);\n if (ms <= 0) { this.dismiss(false); return; }\n setTimeout(() => this.dismiss(false), ms);\n }\n\n private pick(iso: string, instant = false): void {\n const { button } = partsOf(this.field);\n if (this.options.onPick) this.options.onPick(iso);\n else setDateFieldValue(this.field, iso, { lang: this.lang(), today: this.today() });\n // The form's runtime hears the change on the control it knows (the button carries `iox-field__control`).\n button?.dispatchEvent(new Event('input', { bubbles: true }));\n button?.dispatchEvent(new Event('change', { bubbles: true }));\n this.close(instant);\n }\n\n private dismiss(silent: boolean): void {\n const panel = this.panel;\n if (!panel) return;\n this.panel = null;\n this.closing = false;\n if (panel.open) panel.close();\n panel.remove();\n this.options.unlockScroll?.();\n const { button } = partsOf(this.field);\n button?.setAttribute('aria-expanded', 'false');\n if (!silent) button?.focus({ preventScroll: true });\n }\n\n private focusDay(): void {\n const day = this.panel?.querySelector<HTMLElement>(`.${CalendarClass.Day}[${ISO_ATTRIBUTE}=\"${this.focusIso}\"]`);\n day?.focus({ preventScroll: true });\n }\n\n /** Under the field, aligned to its reading start; above when there is no room — the ONE `placeFloating`. */\n private place(rtl: boolean): void {\n const panel = this.panel;\n const { button } = partsOf(this.field);\n const view = this.field.ownerDocument.defaultView;\n if (!panel || !button || !view) return;\n const anchor = button.getBoundingClientRect();\n const spot = placeFloating(\n { top: anchor.top, left: anchor.left, width: anchor.width, height: anchor.height },\n { width: panel.offsetWidth, height: panel.offsetHeight },\n { width: view.innerWidth, height: view.innerHeight },\n { rtl },\n );\n panel.style.top = `${spot.top}px`;\n panel.style.left = `${spot.left}px`;\n panel.style.transformOrigin = spot.origin;\n panel.setAttribute('data-iox-side', spot.side);\n }\n\n private lang(): string { return fieldLanguage(this.field, this.options.lang); }\n\n private rtl(): boolean {\n if (typeof this.options.rtl === 'boolean') return this.options.rtl;\n return this.field.ownerDocument.defaultView?.getComputedStyle(this.field).direction === 'rtl';\n }\n\n private today(): string { return this.options.today?.() ?? todayIso(); }\n\n private words(lang: string): DatePickerWords { return { ...datePickerWords(lang), ...(this.options.words ?? {}) }; }\n\n private listen(target: EventTarget, type: string, fn: (e: Event) => void): void {\n target.addEventListener(type, fn);\n this.listeners.push([target, type, fn]);\n }\n}\n\n/** The runtime already running a field, if any. */\nexport function datePickerOf(field: Element | null | undefined): DatePickerRuntime | null {\n return ((field as unknown as Record<string, unknown> | null)?.[RUNTIME] as DatePickerRuntime | undefined) ?? null;\n}\n\n/** Run a date field — once: a field already running is returned as is. Null when `field` holds no date button. */\nexport function attachDatePicker(field: Element | null | undefined, options: DatePickerOptions = {}): DatePickerRuntime | null {\n if (!field || !partsOf(field).button) return null;\n return datePickerOf(field) ?? new DatePickerRuntime(field as HTMLElement, options);\n}\n\n/** Run every date field under `root` (the string path: a page's or a global's markup). */\nexport function attachDatePickers(root: ParentNode | null | undefined, options: DatePickerOptions = {}): DatePickerRuntime[] {\n if (!root?.querySelectorAll) return [];\n const out: DatePickerRuntime[] = [];\n root.querySelectorAll<HTMLElement>(`.${FieldClass.Root}`).forEach(field => {\n const runtime = attachDatePicker(field, options);\n if (runtime) out.push(runtime);\n });\n return out;\n}\n\n/**\n * The builder canvas's design-time Open state: the SAME panel, drawn in the flow under the date button (a modal in the\n * top layer would escape the canvas's zoom and cover the builder), inert — the author selects the Field and styles\n * its Calendar parts; nothing in it takes focus or a click. `false` removes it.\n */\nexport function showCalendarDesign(field: Element | null | undefined, show: boolean, options: { lang?: string | null; rtl?: boolean | null; today?: string } = {}): void {\n if (!field) return;\n const existing = field.querySelector(`:scope > [${CALENDAR_DESIGN_ATTRIBUTE}]`);\n if (!show) { existing?.remove(); return; }\n if (existing) return;\n const { button } = partsOf(field);\n if (!button) return;\n const lang = fieldLanguage(field, options.lang);\n const today = options.today ?? todayIso();\n const { min, max } = rangeOf(button, today);\n const selected = (partsOf(field).input?.value || '') || null;\n const focus = clampIso(selected ?? today, min, max);\n const model = calendarMonth(focus, { weekStart: weekStartFor(lang), today, min, max, selected });\n const rtl = typeof options.rtl === 'boolean' ? options.rtl : field.ownerDocument.defaultView?.getComputedStyle(field).direction === 'rtl';\n const panel = buildPanel(field.ownerDocument, 'div', datePickerWords(lang), lang, model.weekdays, rtl);\n panel.setAttribute(CALENDAR_DESIGN_ATTRIBUTE, '');\n panel.setAttribute('inert', '');\n panel.setAttribute('aria-hidden', 'true');\n paintMonth(panel, model, lang);\n const after = partsOf(field).input ?? button;\n after.insertAdjacentElement('afterend', panel);\n}\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Input, OnDestroy, OnInit, Optional, Output } from '@angular/core';\n\nimport {\n baseFieldName, ChoiceAppearance, choiceAppearanceOf, ControlType, datePickerWords, FieldOption, fieldOptionsOf, FieldSpec, fieldSpecOf,\n formatDateInWords, inputTypeOf, isIsoDate, isMultiValueField, todayIso, ValidationRule,\n} from '../../../forms-core/public-api';\nimport { IS_PREVIEW } from '../builder-tokens';\nimport { PageScrollProvider } from '../../services/page-scroll.provider';\nimport { attachDatePicker, DatePickerRuntime, fieldLanguage, showCalendarDesign } from './date-picker.runtime';\nimport { FormMessageResolver, FormRuntimeService, IOX_FORM_MESSAGES, RegisteredField } from './form-runtime.service';\nimport { shakeElement } from './shake';\n\nlet fieldSeq = 0;\n\n/**\n * The compound Field: label + control + help + error + required mark, as ONE node (decision D2).\n *\n * This is the biggest divergence from Webflow, and it is deliberate. There, a form field is four\n * loose elements an author can delete — and they do delete the label, which breaks the\n * `for`/`id` pairing and with it screen-reader support. Here the structure is fixed and\n * accessibility is guaranteed by construction: the label can be visually hidden, never removed.\n *\n * The PARTS are styled through the virtual-trait mechanism (`__labelStyles`, `__errorStyles`, …)\n * that already compiles `::marker` rules for List — so per-part styling invents no new concept in\n * the style engine. Each part carries a stable class the compiler targets.\n *\n * ⚠️ Control type is a TRAIT, not a component per type (decision D4) — one component, one config,\n * and choosing `email` also chooses email validation.\n *\n * The markup is forms-core `fieldHtml`'s, element for element (the engine's string path writes it): Choices is a\n * fieldset of chips or rows (premium N1), Date is a button + a hidden ISO input that opens the look's calendar (N8).\n * The submitted name is the FORM's unique name for this field (forms-core `uniqueFieldNames`, vectoriox/iox-ui#43).\n */\n@Component({\n selector: 'div[iox-field]',\n template: `\n @switch (control) {\n @case ('choices') {\n <fieldset [class]=\"'iox-field__choices ' + (appearance === 'list' ? 'iox-field__choices--list' : 'iox-field__choices--chips')\"\n [attr.aria-describedby]=\"describedBy\">\n <legend class=\"iox-field__label\" [class.iox-field__label--hidden]=\"labelHidden\" [id]=\"controlId + '-label'\">{{ label }}@if (required) {<span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>}</legend>\n <div [class]=\"appearance === 'list' ? 'iox-field__group' : 'iox-field__chips'\">\n @for (option of choices; track option.value) {\n <label [class]=\"appearance === 'list' ? 'iox-field__option' : 'iox-field__chip'\">\n <input [class]=\"appearance === 'list' ? 'iox-field__control' : 'iox-field__control iox-field__control--chip'\"\n [type]=\"multiple ? 'checkbox' : 'radio'\"\n [name]=\"fieldName\"\n [value]=\"option.value\"\n [checked]=\"isChosen(option.value)\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"toggle(option.value, $any($event.target).checked)\"\n (blur)=\"touch($event)\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n </fieldset>\n }\n @default {\n <label class=\"iox-field__label\"\n [class.iox-field__label--hidden]=\"labelHidden\"\n [id]=\"controlId + '-label'\"\n [attr.for]=\"controlId\">{{ label }}@if (required) {<span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>}</label>\n }\n }\n\n @switch (control) {\n @case ('choices') {}\n @case ('textarea') {\n <textarea class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [rows]=\"rows\"\n [attr.placeholder]=\"placeholder || null\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [value]=\"value ?? ''\"\n (input)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\"></textarea>\n }\n @case ('select') {\n <select class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\">\n <option value=\"\" [selected]=\"!value\">{{ placeholder || '' }}</option>\n @for (option of choices; track option.value) {\n <option [value]=\"option.value\" [selected]=\"option.value === value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('switch') {\n <input class=\"iox-field__control iox-field__control--switch\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [checked]=\"value === true\"\n (change)=\"emit($any($event.target).checked)\"\n (blur)=\"touch($event)\">\n }\n @case ('range') {\n <input class=\"iox-field__control iox-field__control--range\"\n type=\"range\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.min]=\"rangeMin\"\n [attr.max]=\"rangeMax\"\n [attr.step]=\"rangeStep\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [value]=\"value ?? rangeMin\"\n (input)=\"emit(+$any($event.target).value)\"\n (blur)=\"touch($event)\">\n }\n @case ('checkbox') {\n <input class=\"iox-field__control iox-field__control--checkbox\"\n type=\"checkbox\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [checked]=\"value === true\"\n (change)=\"emit($any($event.target).checked)\"\n (blur)=\"touch($event)\">\n }\n @case ('radio') {\n <div class=\"iox-field__group\" role=\"radiogroup\" [attr.aria-labelledby]=\"controlId + '-label'\">\n @for (option of choices; track option.value) {\n <label class=\"iox-field__option\">\n <input class=\"iox-field__control iox-field__control--radio\"\n type=\"radio\"\n [name]=\"fieldName\"\n [value]=\"option.value\"\n [checked]=\"option.value === value\"\n [attr.disabled]=\"disabled ? '' : null\"\n (change)=\"emit(option.value)\"\n (blur)=\"touch($event)\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n }\n @case ('date') {\n <button type=\"button\"\n class=\"iox-field__control iox-field__control--date\"\n [id]=\"controlId\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"designOpen ? 'true' : 'false'\"\n [attr.aria-labelledby]=\"controlId + '-label ' + controlId + '-value'\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.data-iox-date-min]=\"earliest || null\"\n [attr.data-iox-date-max]=\"latest || null\"\n (blur)=\"touch($event)\"><span class=\"iox-field__date-value\" [id]=\"controlId + '-value'\" [attr.data-iox-empty]=\"dateWords ? null : ''\">{{ dateWords || datePlaceholder }}</span><svg class=\"iox-field__date-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15.5\" rx=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/><path d=\"M3.5 10h17M8 3v4M16 3v4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"/></svg></button>\n <input type=\"hidden\" class=\"iox-field__date-input\" [name]=\"fieldName\" [value]=\"dateIso\">\n }\n @default {\n <input class=\"iox-field__control\"\n [id]=\"controlId\"\n [name]=\"fieldName\"\n [type]=\"inputType\"\n [attr.placeholder]=\"placeholder || null\"\n [attr.required]=\"required ? '' : null\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.accept]=\"control === 'file' ? (accept || null) : null\"\n [value]=\"control === 'file' ? '' : (value ?? '')\"\n (input)=\"emit($any($event.target).value)\"\n (blur)=\"touch($event)\">\n }\n }\n\n @if (help) {\n <p class=\"iox-field__help\" [id]=\"controlId + '-help'\">{{ help }}</p>\n }\n @if (invalid && errorText) {\n <p class=\"iox-field__error\" [id]=\"controlId + '-error'\" role=\"alert\">{{ errorText }}</p>\n }\n `,\n host: {\n '[class]': \"'iox-field iox-node-' + nodeId\",\n '[class.iox-invalid]': 'invalid',\n '[class.iox-valid]': 'showValid',\n '[attr.data-iox-field]': 'fieldName || null',\n '[hidden]': \"control === 'hidden' ? true : null\",\n },\n styles: [`\n :host { box-sizing: border-box; display: block; }\n /* Visually hidden, still announced — the label can be hidden but never deleted. */\n .iox-field__label--hidden {\n position: absolute; width: 1px; height: 1px; margin: -1px;\n padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;\n }\n `],\n standalone: false,\n})\nexport class IoxFieldComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** The submitted key. Blank means \"derive it from the label\" — authors never invent keys. */\n @Input() name = '';\n @Input() label = '';\n @Input() set control(value: ControlType | string) {\n this._control = value || ControlType.Text;\n this.syncDate();\n }\n get control(): ControlType | string { return this._control; }\n private _control: ControlType | string = ControlType.Text;\n @Input() placeholder = '';\n @Input() help = '';\n @Input() required = false;\n @Input() disabled = false;\n @Input() labelHidden = false;\n @Input() requiredMark = '*';\n @Input() rows = 4;\n @Input() rangeMin: number | string = 0;\n @Input() rangeMax: number | string = 100;\n @Input() rangeStep: number | string = 1;\n @Input() accept = '';\n /** Choices (N1): several answers (checkboxes) or one (radios). */\n @Input() multiple = false;\n /** Choices (N1): `chips` (the default) or `list` — the look's radio / checkbox rows. */\n @Input() set appearance(value: ChoiceAppearance | string | null | undefined) {\n this._appearance = choiceAppearanceOf({ appearance: value });\n }\n get appearance(): ChoiceAppearance { return this._appearance; }\n private _appearance: ChoiceAppearance = ChoiceAppearance.Chips;\n /** Date (N8): the first and last day it takes — '' any · N days from today · an ISO day (forms-core `dates.ts`). */\n @Input() earliest = '';\n @Input() latest = '';\n /** Explicit choices (bound data, a hand-built node). Wins over `optionsText`. */\n @Input() set options(value: FieldOption[] | null | undefined) {\n this._options = Array.isArray(value) ? value : [];\n this.refreshChoices();\n }\n get options(): FieldOption[] { return this._options; }\n /** The author's choices, one per line (`value|Label`) — the Field's trait. A SETTER: the builder\n * assigns traits directly, with no ngOnChanges. */\n @Input() set optionsText(value: string | null | undefined) {\n this._optionsText = value ?? '';\n this.refreshChoices();\n }\n get optionsText(): string { return this._optionsText; }\n /** What the radio group / dropdown renders: the shared forms-core reading of the two inputs above. */\n choices: FieldOption[] = [];\n private _options: FieldOption[] = [];\n private _optionsText = '';\n @Input() value: any = '';\n /** Rules beyond `required` — carried on the node, interpreted by forms-core. */\n @Input() rules: ValidationRule[] = [];\n /**\n * Forces the error appearance without a real failure — how the builder lets an author DESIGN\n * the error state (decision D5). At runtime the state comes from the runtime service instead.\n * Turning it on shakes the field once, so the author sees the motion they are designing (N2).\n */\n @Input() set forceInvalid(value: boolean) {\n const was = this._forceInvalid;\n this._forceInvalid = !!value;\n if (this._forceInvalid && !was && this.viewReady) shakeElement(this.host?.nativeElement);\n }\n get forceInvalid(): boolean { return this._forceInvalid; }\n private _forceInvalid = false;\n /** Placeholder shown while designing the error state, so the block has something to style. */\n @Input() designErrorText = 'Please check this field';\n /** Only after a successful check — never on an untouched field. */\n @Input() showValid = false;\n /** The builder canvas's design-time Open state for a Date (N8): the calendar drawn under the field, inert. */\n @Input() set designOpen(value: boolean) {\n this._designOpen = !!value;\n this.syncDesignCalendar();\n }\n get designOpen(): boolean { return this._designOpen; }\n private _designOpen = false;\n\n @Output() valueChange = new EventEmitter<any>();\n @Output() touched = new EventEmitter<void>();\n\n /** Stable per instance so `for`/`id` and `aria-describedby` always pair up. */\n readonly controlId = `iox-field-${++fieldSeq}`;\n\n private unregister?: () => void;\n private registration: RegisteredField | null = null;\n private picker: DatePickerRuntime | null = null;\n private viewReady = false;\n\n /**\n * Classic constructor injection, not `inject()`: this library's specs construct components\n * directly (its vitest setup cannot run `TestBed.createComponent`), and a field initializer\n * calling `inject()` throws NG0203 outside an injection context.\n *\n * `runtime` is optional because a Field dropped OUTSIDE any Form must still render — it simply\n * has nothing to submit to. That is the same ancestry rule from the other side. `isPreview` says the field is\n * LIVE (the engine, the admin's Preview): only then does its date button open a calendar — on the editing canvas\n * a click selects the field, and the calendar is the design-time Open state.\n */\n constructor(\n @Optional() private readonly runtime: FormRuntimeService | null,\n @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver,\n @Optional() private readonly host?: ElementRef<HTMLElement> | null,\n @Optional() @Inject(IS_PREVIEW) private readonly isPreview?: boolean | null,\n @Optional() private readonly pageScroll?: PageScrollProvider | null,\n ) {}\n\n ngOnInit(): void {\n this.registration = {\n // Functions, not values: a trait edited on the canvas takes effect with no re-register.\n baseName: () => baseFieldName({ name: this.name, label: this.label }),\n spec: (name: string) => this.toSpec(name),\n getValue: () => this.value,\n };\n this.unregister = this.runtime?.register(this.registration);\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.syncDate();\n this.syncDesignCalendar();\n }\n\n ngOnDestroy(): void {\n this.unregister?.();\n this.picker?.destroy();\n this.picker = null;\n }\n\n /** The submitted key: the form's unique name for this field (iox-ui#43), else the field's own base name. */\n get fieldName(): string {\n return (this.registration && this.runtime?.nameOf(this.registration)) || baseFieldName({ name: this.name, label: this.label });\n }\n\n /** Failing AND allowed to say so — or forced, while an author designs the state. */\n get invalid(): boolean {\n if (this.forceInvalid) return true;\n return !!this.runtime?.showsError(this.fieldName);\n }\n\n /** The message a visitor reads. Translation is the consumer's, via IOX_FORM_MESSAGES. */\n get errorText(): string {\n if (this.forceInvalid) return this.designErrorText;\n const error = this.runtime?.errorFor(this.fieldName);\n return error ? this.resolveMessage(error.messageKey, error.params) : '';\n }\n\n /** The field's spec under the name its form gave it — forms-core `fieldSpecOf`, the reading the saved spec uses. */\n private toSpec(name: string): FieldSpec {\n return fieldSpecOf({\n control: this.control, label: this.label, required: this.required, rules: this.rules, options: this.choices,\n multiple: this.multiple, earliest: this.earliest, latest: this.latest,\n }, name);\n }\n\n private refreshChoices(): void {\n this.choices = fieldOptionsOf({ options: this._options, optionsText: this._optionsText });\n }\n\n /** `file`, `number`… map straight through; everything else is a text input (forms-core `inputTypeOf`). */\n get inputType(): string {\n return inputTypeOf(String(this.control));\n }\n\n /** A Date's chosen day (the hidden input's value) — '' while none is. */\n get dateIso(): string {\n return isIsoDate(this.value) ? String(this.value) : '';\n }\n\n /** A Date's chosen day in words, in the field's language — '' while none is. */\n get dateWords(): string {\n const iso = this.dateIso;\n if (!iso) return '';\n const lang = this.host?.nativeElement ? fieldLanguage(this.host.nativeElement) : 'en';\n return formatDateInWords(iso, lang, todayIso());\n }\n\n /** What an unpicked Date says: the author's hint, else \"Choose a date\" in the field's language. */\n get datePlaceholder(): string {\n if (this.placeholder) return this.placeholder;\n return datePickerWords(this.host?.nativeElement ? fieldLanguage(this.host.nativeElement) : null).choose;\n }\n\n /** Whether a Choices option is chosen — one answer, or one of several. */\n isChosen(optionValue: string): boolean {\n if (isMultiValueField({ control: this.control as ControlType, multiple: this.multiple })) {\n return Array.isArray(this.value) && this.value.includes(optionValue);\n }\n return this.value === optionValue;\n }\n\n /** A Choices option ticked or unticked: the answer becomes the list of ticked ones, or the one picked. */\n toggle(optionValue: string, checked: boolean): void {\n if (!isMultiValueField({ control: this.control as ControlType, multiple: this.multiple })) {\n this.emit(optionValue);\n return;\n }\n const current: string[] = Array.isArray(this.value) ? this.value : [];\n const next = checked ? [...current.filter(v => v !== optionValue), optionValue] : current.filter(v => v !== optionValue);\n // In the options' order, whatever order they were ticked in.\n this.emit(this.choices.map(c => c.value).filter(v => next.includes(v)));\n }\n\n /** Help and error are BOTH announced, in that order, when both are present. */\n get describedBy(): string | null {\n const ids: string[] = [];\n if (this.help) ids.push(`${this.controlId}-help`);\n if (this.invalid && this.errorText) ids.push(`${this.controlId}-error`);\n return ids.length ? ids.join(' ') : null;\n }\n\n emit(value: any): void {\n this.value = value;\n this.runtime?.onChange(this.fieldName);\n this.valueChange.emit(value);\n }\n\n touch(event?: Event): void {\n // Leaving one chip for the next, or the date button for its own calendar, is not leaving the FIELD.\n const next = (event as FocusEvent | undefined)?.relatedTarget as Node | null | undefined;\n if (next && this.host?.nativeElement?.contains?.(next)) return;\n // Blur is what lets Smart timing start speaking for this field.\n this.runtime?.onBlur(this.fieldName);\n this.touched.emit();\n }\n\n /** A live Date runs the ONE date picker; any other control (or the canvas) runs none. */\n private syncDate(): void {\n const element = this.host?.nativeElement;\n if (!this.viewReady || !element) return;\n const live = this.control === ControlType.Date && this.isPreview === true && typeof window !== 'undefined';\n if (!live) { this.picker?.destroy(); this.picker = null; return; }\n // The view may not have rendered the button yet after a control change: attach on the next frame's DOM.\n queueMicrotask(() => {\n if (this.picker || this.control !== ControlType.Date) return;\n this.picker = attachDatePicker(element, {\n onPick: iso => this.emit(iso),\n lockScroll: () => this.pageScroll?.stop(),\n unlockScroll: () => this.pageScroll?.start(),\n });\n });\n }\n\n /** The canvas's Open state: the calendar drawn under the field (never on a live page). */\n private syncDesignCalendar(): void {\n const element = this.host?.nativeElement;\n if (!this.viewReady || !element || this.isPreview === true) return;\n queueMicrotask(() => showCalendarDesign(element, this._designOpen && this.control === ControlType.Date));\n }\n}\n","import { Component, ElementRef, Inject, Input, Optional } from '@angular/core';\n\nimport { DEFAULT_EN_MESSAGES, sentWord, SUBMIT_MESSAGE_KEYS } from '../../../forms-core/public-api';\nimport { defaultMessageResolver, FormMessageResolver, IOX_FORM_MESSAGES } from './form-runtime.service';\n\n/**\n * Directive-host SubmitButton: the real `<button type=\"submit\">` IS the host.\n *\n * It carries no destination configuration of its own — \"what happens with the data\" is an ordered\n * action list on the FORM (decision D9), so there is nothing here to wire and nothing to get out of\n * sync. The button owns only its own appearance.\n *\n * It follows its FORM's state (vectoriox/iox-ui#42, premium N2): its three labels — at rest, \"While sending\", \"Sent\"\n * with a check — are all in the markup, stacked in one cell, and the shared iox-forms.css shows the one the form's\n * `data-iox-state` names, swapped in place behind a 2px blur (Emil 87/139); the check draws once on Sent. Busy and\n * disabled are written by the ONE applier (`syncSubmitButtons`) the form's runtimes and the canvas call. The string\n * renderer writes the same markup (forms-core `submitButtonLabelsHtml`).\n */\n@Component({\n selector: 'button[iox-submit]',\n // The class names are forms-core `SubmitLabelClass` (a literal here: a decorator must be static) — pinned by the spec.\n template: `<span class=\"iox-submit__labels\"><span class=\"iox-submit__idle\">{{ label }}</span><span class=\"iox-submit__busy\">{{ loadingLabel || label }}</span><span class=\"iox-submit__sent\"><svg class=\"iox-submit__check\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" pathLength=\"100\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg><span>{{ sentWords }}</span></span></span>`,\n host: {\n '[class]': \"'iox-submit iox-node-' + nodeId\",\n '[attr.type]': \"'submit'\",\n // forms-core SUBMIT_KEEP_ENABLED_ATTRIBUTE — read by `syncSubmitButtons`.\n '[attr.data-iox-keep-enabled]': 'disableWhileSubmitting === false ? \"\" : null',\n },\n styles: [`:host { box-sizing: border-box; cursor: pointer; }`],\n standalone: false,\n})\nexport class IoxSubmitButtonComponent {\n @Input() nodeId = '';\n @Input() label = 'Submit';\n @Input() loadingLabel = 'Sending…';\n /** What it says once its form has sent (N2). Empty: the catalog's \"Sent\", in the host's language. */\n @Input() sentLabel = '';\n @Input() disableWhileSubmitting = true;\n\n constructor(\n @Optional() @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver | null = null,\n @Optional() private readonly host: ElementRef<HTMLElement> | null = null,\n ) {}\n\n /** The author's Sent words; else the host's translation of the catalog's; else \"Sent\" in the page's language. */\n get sentWords(): string {\n if (this.sentLabel) return this.sentLabel;\n const key = SUBMIT_MESSAGE_KEYS.Sent;\n const translated = (this.resolveMessage ?? defaultMessageResolver)(key);\n if (translated && translated !== key && translated !== DEFAULT_EN_MESSAGES[key]) return translated;\n const element = this.host?.nativeElement;\n return sentWord(element?.closest?.('[lang]')?.getAttribute('lang') ?? element?.ownerDocument?.documentElement?.lang);\n }\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\n/**\n * The Success and Error blocks — real, fully styleable container nodes that the Form auto-creates\n * and the author cannot delete (decision D7). Hiding one is allowed; removing it is not, because\n * \"the author deleted the success block and the form went quiet\" is Webflow's commonest form\n * failure and we designed it out.\n *\n * ⚠️ VISIBILITY IS NOT AN INPUT. Which block shows is decided by CSS keyed on the parent form's\n * `data-iox-state` attribute (see `iox-form-states.css` / the engine's `styles.scss`):\n *\n * .iox-form-success { display: none }\n * .iox-form[data-iox-state=\"success\"] .iox-form-success { display: block }\n *\n * That is deliberate. It means the builder's state switcher and the runtime's submit lifecycle\n * drive the SAME mechanism through one attribute, with no input plumbing down the tree and no\n * chance of the canvas and the live site disagreeing about what a visitor sees. The selector\n * out-specifies `.iox-node-{id}`, so the state machine owns visibility and the author owns\n * everything else about the block.\n */\n@Component({\n selector: 'div[iox-form-success]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-form-success iox-node-' + nodeId\",\n '[attr.role]': \"'status'\",\n '[attr.aria-live]': \"'polite'\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormSuccessComponent {\n @Input() nodeId = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n\n/**\n * The Error block. One design, five reasons: the renderer writes the resolved reason text into\n * `message`, so an author designs the block once and every failure mode (network, rejected, spam,\n * rate-limited, server) renders through it.\n *\n * `role=\"alert\"` rather than `status`: a failed submit must interrupt, because the visitor is\n * about to walk away believing they sent it.\n */\n@Component({\n selector: 'div[iox-form-error]',\n template: `\n @if (message) {\n <p class=\"iox-form-error__message\">{{ message }}</p>\n }\n <ng-container #childrenHost></ng-container>\n `,\n host: {\n '[class]': \"'iox-form-error iox-node-' + nodeId\",\n '[attr.role]': \"'alert'\",\n '[attr.aria-live]': \"'assertive'\",\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxFormErrorComponent {\n @Input() nodeId = '';\n /** Already-translated reason. Resolving the key is the host's job. */\n @Input() message = '';\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n}\n","import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';\n\nconst PLACEMENTS = ['top', 'bottom', 'start', 'end'];\nconst isOn = (v: unknown) => v === true || v === 'true';\nconst isOff = (v: unknown) => v === false || v === 'false';\n\n/**\n * The Dialog's LIVE twin on the engine's component path (actions plan A1b; design-system DS2).\n * Directive-host: the `<dialog>` IS the host, carrying exactly the markup the string renderer\n * writes (`data-iox-dialog`, the opt-in backdrop-close / consent-role / placement attributes and\n * the close X), so the runtime's dialog actions, the consent prompt and `styles.scss` treat both\n * paths alike. Ships CLOSED — only the dialog actions open it. Before this existed, a page holding\n * a Dialog fell back to the string renderer wholesale.\n */\n@Component({\n selector: 'dialog[iox-dialog]',\n template: `@if (closeButtonShown) {<button type=\"button\" class=\"iox-dialog-close\" data-iox-dialog-close aria-label=\"Close\">×</button>}<ng-container #childrenHost></ng-container>`,\n host: {\n '[class]': \"'iox-node-' + nodeId\",\n 'data-iox-dialog': '',\n '[attr.data-iox-dialog-backdrop-close]': \"backdropCloses ? '' : null\",\n '[attr.data-iox-consent-role]': \"consentRoleOn ? '' : null\",\n '[attr.data-iox-dialog-placement]': 'placementAttr',\n },\n styles: [`:host { box-sizing: border-box; }`],\n standalone: false,\n})\nexport class IoxDialogComponent {\n @Input() nodeId = '';\n @Input() placement: string = 'center';\n @Input() closeOnBackdrop: boolean | string = true;\n @Input() showCloseButton: boolean | string = true;\n @Input() consentRole: boolean | string = false;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n get backdropCloses(): boolean { return !isOff(this.closeOnBackdrop); }\n get closeButtonShown(): boolean { return !isOff(this.showCloseButton); }\n get consentRoleOn(): boolean { return isOn(this.consentRole); }\n get placementAttr(): string | null { return PLACEMENTS.includes(String(this.placement)) ? String(this.placement) : null; }\n}\n","import { AfterViewInit, Component, ElementRef, HostBinding, Inject, Input, OnDestroy, Optional, PLATFORM_ID, ViewChild } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport {\n attachVideoAt, planVideo, VideoAttribute, VideoClass, videoInnerHtml, VideoKind, VideoPlan, videoRootAttributes, VideoRuntime, videoWords,\n} from '@vectoriox/iox-ui/media-core';\n\nimport { IS_PREVIEW } from '../builder-tokens';\n\nconst escapeHtml = (v: string) => v.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n\n/**\n * `iox-video` — the Video's ONE component (CC3, board 5), like the Gallery's: the builder canvas, the admin's Preview\n * and the engine's component path all render it; the engine's string path writes the same markup from the same\n * `videoInnerHtml`. On the EDITING canvas (no `IS_PREVIEW`) it draws the poster ONLY — never a `<video>`, never a\n * player: an iframe would eat the selection's clicks and would leak before consent. Live, it attaches the shared\n * media-core runtime (the facade behind consent, the background video's pause button).\n *\n * Inputs recompute in SETTERS: the builder's trait panel assigns them directly (no ngOnChanges).\n */\n@Component({\n selector: 'iox-video',\n template: `<div #root\n [class]=\"'${VideoClass.Root} iox-node-' + nodeId\"\n [attr.data-iox-video]=\"attrs['${VideoAttribute.Root}'] ?? null\"\n [attr.data-iox-video-source]=\"attrs['${VideoAttribute.Source}'] ?? null\"\n [attr.data-iox-video-id]=\"attrs['${VideoAttribute.Id}'] ?? null\"\n [attr.data-iox-video-hash]=\"attrs['${VideoAttribute.Hash}'] ?? null\"\n [attr.data-iox-video-mode]=\"attrs['${VideoAttribute.Mode}'] ?? null\"\n [attr.data-iox-video-autoplay]=\"attrs['${VideoAttribute.Autoplay}'] ?? null\"\n [attr.data-iox-video-consent]=\"attrs['${VideoAttribute.Consent}'] ?? null\"\n [attr.data-iox-video-title]=\"attrs['${VideoAttribute.Title}'] ?? null\"\n [attr.data-iox-video-poster-empty]=\"attrs['${VideoAttribute.PosterEmpty}'] ?? null\"\n [attr.data-iox-video-frames]=\"attrs['${VideoAttribute.Frames}'] ?? null\"\n [innerHTML]=\"html\"></div>`,\n // A flex item's min-width is its content: without min-width 0 the host kept a 640px video 640 wide on a 390px phone\n // (the node's own max-width: 100% resolved against the host). The string path has no host and always shrank.\n styles: [':host { display: block; min-width: 0; max-width: 100%; }'],\n standalone: false,\n})\nexport class IoxVideoComponent implements AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n\n private readonly values: Record<string, unknown> = {};\n @Input() set videoSource(v: unknown) { this.set('videoSource', v); }\n get videoSource(): unknown { return this.values['videoSource']; }\n @Input() set src(v: unknown) { this.set('src', v); }\n get src(): unknown { return this.values['src']; }\n @Input() set poster(v: unknown) { this.set('poster', v); }\n get poster(): unknown { return this.values['poster']; }\n @Input() set mode(v: unknown) { this.set('mode', v); }\n get mode(): unknown { return this.values['mode']; }\n @Input() set autoplay(v: unknown) { this.set('autoplay', v); }\n get autoplay(): unknown { return this.values['autoplay']; }\n @Input() set title(v: unknown) { this.set('title', v); }\n get title(): unknown { return this.values['title']; }\n @Input() set captions(v: unknown) { this.set('captions', v); }\n get captions(): unknown { return this.values['captions']; }\n @Input() set captionsLang(v: unknown) { this.set('captionsLang', v); }\n get captionsLang(): unknown { return this.values['captionsLang']; }\n @Input() set consentCategory(v: unknown) { this.set('consentCategory', v); }\n get consentCategory(): unknown { return this.values['consentCategory']; }\n @Input() set frames(v: unknown) { this.set('frames', v); }\n get frames(): unknown { return this.values['frames']; }\n\n @ViewChild('root', { static: true }) private root?: ElementRef<HTMLElement>;\n\n /**\n * A Video the scroll plays usually fills its stage with height: 100%, which is a percent of this host. The host stays a\n * box, because a node's width and margin live on it, so it passes the height down. Where a Scene flows, 100% of an\n * auto stage is auto. An ordinary Video keeps its own height, so what stands beside it stays put.\n */\n @HostBinding('style.height') get hostHeight(): string | null {\n return this.plan?.kind === VideoKind.Frames ? '100%' : null;\n }\n\n plan!: VideoPlan;\n attrs: Record<string, string> = {};\n html: SafeHtml = '';\n\n private runtime: VideoRuntime | null = null;\n private readonly browser: boolean;\n private readonly live: boolean;\n private viewReady = false;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n @Inject(PLATFORM_ID) platformId: object,\n @Optional() @Inject(IS_PREVIEW) isPreview: boolean | null,\n ) {\n this.browser = isPlatformBrowser(platformId);\n this.live = !!isPreview;\n this.render();\n }\n\n ngAfterViewInit(): void {\n this.viewReady = true;\n this.attach();\n }\n\n ngOnDestroy(): void {\n this.runtime?.destroy();\n this.runtime = null;\n }\n\n private set(name: string, value: unknown): void {\n if (this.values[name] === value) return;\n this.values[name] = value;\n this.render();\n }\n\n private render(): void {\n this.plan = planVideo({ props: this.values }, null);\n this.attrs = videoRootAttributes(this.plan);\n const lang = typeof document !== 'undefined' ? document.documentElement?.getAttribute('lang') : null;\n this.html = this.sanitizer.bypassSecurityTrustHtml(videoInnerHtml(this.plan, { esc: escapeHtml, canvas: !this.live, words: videoWords(lang) }));\n if (this.viewReady) {\n // The new markup lands with this change detection; the runtime re-attaches to it after.\n this.runtime?.destroy();\n this.runtime = null;\n queueMicrotask(() => this.attach());\n }\n }\n\n private attach(): void {\n if (!this.browser || !this.live || this.runtime) return;\n const el = this.root?.nativeElement;\n if (!el?.hasAttribute(VideoAttribute.Root)) return;\n this.runtime = attachVideoAt(el);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { BuilderImageComponent } from './image/image.component';\nimport { BuilderSpacerComponent } from './spacer/spacer.component';\nimport { CardComponent } from './card/card.component';\nimport { BuilderDividerComponent } from './divider/divider.component';\nimport { BuilderIconComponent } from './icon/icon.component';\nimport { BuilderLinkComponent } from './link/link.component';\nimport { BuilderButtonComponent } from './button/button.component';\nimport { BuilderHeadingComponent } from './heading/heading.component';\nimport { TextBlockComponent } from './text/text.component';\nimport { SectionComponent } from './section/section.component';\nimport { ContainerComponent } from './container/container.component';\nimport { LinkedContainerComponent } from './linked-container/linked-container.component';\nimport { ClientRepeaterComponent } from './repeater/repeater.component';\nimport { ButtonBlockComponent } from './button-block/button-block.component';\nimport { ClientSliderContainerComponent } from './slider-container/slider-container.component';\nimport { ClientSliderSlideComponent } from './slider-slide/slider-slide.component';\nimport { ClientListComponent } from './list/list.component';\nimport { ClientListItemComponent } from './list-item/list-item.component';\nimport { ClientGalleryComponent } from './gallery/gallery.component';\nimport { IoxFormComponent } from './form/form.component';\nimport { IoxFieldComponent } from './form/field.component';\nimport { IoxSubmitButtonComponent } from './form/submit-button.component';\nimport { IoxFormSuccessComponent, IoxFormErrorComponent } from './form/form-state-blocks.component';\nimport { IoxDialogComponent } from './dialog/dialog.component';\nimport { IoxVideoComponent } from './video/video.component';\n\nconst COMPONENTS = [\n BuilderImageComponent,\n BuilderSpacerComponent,\n CardComponent,\n BuilderDividerComponent,\n BuilderIconComponent,\n BuilderLinkComponent,\n BuilderButtonComponent,\n BuilderHeadingComponent,\n TextBlockComponent,\n SectionComponent,\n ContainerComponent,\n LinkedContainerComponent,\n ClientRepeaterComponent,\n ButtonBlockComponent,\n ClientSliderContainerComponent,\n ClientSliderSlideComponent,\n ClientListComponent,\n ClientListItemComponent,\n ClientGalleryComponent,\n IoxVideoComponent,\n IoxFormComponent,\n IoxFieldComponent,\n IoxSubmitButtonComponent,\n IoxFormSuccessComponent,\n IoxFormErrorComponent,\n IoxDialogComponent,\n];\n\n@NgModule({\n declarations: COMPONENTS,\n imports: [CommonModule],\n exports: COMPONENTS,\n})\nexport class IoxBuilderComponentsModule {}\n","import { Injectable, Type } from '@angular/core';\n\nimport { BuilderImageComponent } from './image/image.component';\nimport { BuilderSpacerComponent } from './spacer/spacer.component';\nimport { CardComponent } from './card/card.component';\nimport { BuilderDividerComponent } from './divider/divider.component';\nimport { BuilderIconComponent } from './icon/icon.component';\nimport { BuilderLinkComponent } from './link/link.component';\nimport { BuilderButtonComponent } from './button/button.component';\nimport { BuilderHeadingComponent } from './heading/heading.component';\nimport { TextBlockComponent } from './text/text.component';\nimport { SectionComponent } from './section/section.component';\nimport { ContainerComponent } from './container/container.component';\nimport { LinkedContainerComponent } from './linked-container/linked-container.component';\nimport { ClientRepeaterComponent } from './repeater/repeater.component';\nimport { ButtonBlockComponent } from './button-block/button-block.component';\nimport { ClientSliderContainerComponent } from './slider-container/slider-container.component';\nimport { ClientSliderSlideComponent } from './slider-slide/slider-slide.component';\nimport { ClientListComponent } from './list/list.component';\nimport { ClientListItemComponent } from './list-item/list-item.component';\nimport { ClientGalleryComponent } from './gallery/gallery.component';\nimport { IoxFormComponent } from './form/form.component';\nimport { IoxFieldComponent } from './form/field.component';\nimport { IoxSubmitButtonComponent } from './form/submit-button.component';\nimport { IoxFormSuccessComponent, IoxFormErrorComponent } from './form/form-state-blocks.component';\nimport { IoxDialogComponent } from './dialog/dialog.component';\nimport { IoxVideoComponent } from './video/video.component';\n\n/**\n * Single source of truth for the IOX component type → Angular class mapping.\n * Used by the client engine (iox-client-engine) to resolve component classes\n * from IoxLayoutNode.type strings at render time.\n *\n * All 13 builder components are registered here:\n * - Leaf (Phase 2a): Image, Spacer, Card, Divider, Icon\n * - Inline-editable (Phase 2b): Link, Button, Heading, Text\n * - Layout shells (Phase 2c): Section, Container, LinkedContainer\n * - Repeater (Phase 2d): ClientRepeaterComponent\n *\n * Section/Container/LinkedContainer/Repeater expose childrenHost: ViewContainerRef\n * for ClientRenderDirective to insert child components into.\n */\n@Injectable({ providedIn: 'root' })\nexport class IoxComponentRegistryService {\n private readonly map = new Map<string, Type<any>>([\n ['Image', BuilderImageComponent],\n ['Spacer', BuilderSpacerComponent],\n ['Card', CardComponent],\n ['Divider', BuilderDividerComponent],\n ['Icon', BuilderIconComponent],\n ['Link', BuilderLinkComponent],\n ['Button', BuilderButtonComponent],\n ['Heading', BuilderHeadingComponent],\n ['Text', TextBlockComponent],\n ['Section', SectionComponent],\n ['Container', ContainerComponent],\n ['LinkedContainer', LinkedContainerComponent],\n ['Repeater', ClientRepeaterComponent],\n ['ButtonBlock', ButtonBlockComponent],\n ['SliderContainer', ClientSliderContainerComponent],\n ['SliderSlide', ClientSliderSlideComponent],\n ['List', ClientListComponent],\n ['ListItem', ClientListItemComponent],\n ['Gallery', ClientGalleryComponent],\n // Forms. FieldGroup is config-only (it reuses ContainerComponent), like List/ListItem.\n ['Form', IoxFormComponent],\n ['Field', IoxFieldComponent],\n ['FieldGroup', ContainerComponent],\n ['SubmitButton', IoxSubmitButtonComponent],\n ['FormSuccess', IoxFormSuccessComponent],\n ['FormError', IoxFormErrorComponent],\n // Dialog (DS2) — the live <dialog> twin, so a page holding one no longer falls back to\n // the string renderer.\n ['Dialog', IoxDialogComponent],\n // Video (CC3) — one component for the canvas (poster only), Preview and the live site.\n ['Video', IoxVideoComponent],\n ]);\n\n getComponent(type: string): Type<any> | undefined {\n return this.map.get(type);\n }\n\n hasComponent(type: string): boolean {\n return this.map.has(type);\n }\n\n registeredTypes(): string[] {\n return [...this.map.keys()];\n }\n}\n","/**\n * tree-relations — framework-agnostic helpers for reasoning about a rendered node\n * tree's structural relationships. Lives in @vectoriox/iox-ui because BOTH renderers\n * depend on iox-ui (the engine does NOT depend on iox-builder), so the same logic\n * drives the builder canvas AND the SSR site — no fork.\n * See iox-ai-guidance `architecture/builder/targeted-hover-state-plan.md`.\n */\n\n/**\n * Minimal shape both renderers can satisfy. `styleId` (present on repeater/slider/symbol\n * clones) points back to the template node's css id; when set it is the id used in the\n * compiled selector, so we resolve against it in preference to `id`.\n */\nexport interface StyleTreeNode {\n id?: string;\n styleId?: string;\n children?: StyleTreeNode[] | null;\n}\n\n/** The css id a node contributes to selectors: its clone `styleId`, else its own `id`. */\nexport function nodeCssId(node: StyleTreeNode): string | undefined {\n return node.styleId ?? node.id;\n}\n\n/**\n * Path of css ids from the root down to (and including) the node whose css id === `cssId`.\n * Returns `null` when no node matches. First match wins (depth-first, pre-order).\n */\nfunction pathToCssId(nodes: readonly StyleTreeNode[], cssId: string): string[] | null {\n for (const node of nodes) {\n const ownId = nodeCssId(node);\n if (ownId === cssId) return [ownId];\n if (node.children?.length) {\n const childPath = pathToCssId(node.children, cssId);\n if (childPath) return ownId ? [ownId, ...childPath] : childPath;\n }\n }\n return null;\n}\n\n/**\n * The css id of the NEAREST COMMON ANCESTOR of two nodes (identified by their css ids),\n * used to scope a `:has()` targeted-state selector so it stays repetition-safe.\n *\n * The result may equal `styledCssId` (the trigger sits INSIDE the styled node) or\n * `triggerCssId` (the styled node sits inside the trigger) — both are valid scopes;\n * `buildTargetedStateSelector` picks the right selector shape for each. Returns\n * `undefined` only when a valid scope can't exist: an id is blank, the two ids are the\n * same node, or they share no ancestor in `root`. Callers MUST skip emitting the rule\n * when this is `undefined` — never emit an unscoped (page-global) `:has()`, which would\n * break under repetition.\n */\nexport function nearestCommonAncestorId(\n root: readonly StyleTreeNode[],\n styledCssId: string,\n triggerCssId: string,\n): string | undefined {\n if (!styledCssId || !triggerCssId || styledCssId === triggerCssId) return undefined;\n\n const styledPath = pathToCssId(root, styledCssId);\n const triggerPath = pathToCssId(root, triggerCssId);\n if (!styledPath || !triggerPath) return undefined;\n\n // Walk both paths together; the last shared prefix element is the common ancestor.\n let common: string | undefined;\n const shorter = Math.min(styledPath.length, triggerPath.length);\n for (let i = 0; i < shorter; i++) {\n if (styledPath[i] !== triggerPath[i]) break;\n common = styledPath[i];\n }\n return common;\n}\n\n/**\n * Build the selector BODY (no leading `.`, matching the builder's `compile()` convention)\n * for a targeted state, given the resolved scope. Three topologies, one shared rule:\n *\n * - trigger INSIDE styled (scope === styled): `iox-node-{styled}:has(.iox-node-{trigger}:{base})`\n * - styled INSIDE trigger (scope === trigger): `iox-node-{trigger}:{base} .iox-node-{styled}`\n * - separate subtrees (scope is above both): `iox-node-{scope}:has(.iox-node-{trigger}:{base}) .iox-node-{styled}`\n *\n * `scopeCssId` MUST be a value returned by `nearestCommonAncestorId` for the same pair.\n */\nexport function buildTargetedStateSelector(\n scopeCssId: string,\n triggerCssId: string,\n styledCssId: string,\n base: string,\n): string {\n return buildTargetedSuffixSelector(scopeCssId, triggerCssId, styledCssId, `:${base}`);\n}\n\n/**\n * The same three topologies for any trigger SUFFIX — a pseudo-class (`:hover`) or an attribute the renderers\n * write (`[data-iox-on]`, CC2's \"Item open\").\n */\nexport function buildTargetedSuffixSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, suffix: string): string {\n if (scopeCssId === styledCssId) {\n return `iox-node-${styledCssId}:has(.iox-node-${triggerCssId}${suffix})`;\n }\n if (scopeCssId === triggerCssId) {\n return `iox-node-${triggerCssId}${suffix} .iox-node-${styledCssId}`;\n }\n return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}${suffix}) .iox-node-${styledCssId}`;\n}\n\n/**\n * The targeted states and what follows the TRIGGER's class in each: `trigger-hover` — the chosen element is\n * hovered; `trigger-on` — the chosen item is open (CC2: an Icon turns when ITS item opens; the trigger is the\n * item, an ancestor, so the rule is `.item[data-iox-on] .icon`). Shared by the builder canvas and both\n * engine paths.\n */\nexport const TARGETED_STATE_SUFFIX: Readonly<Record<string, string>> = {\n 'trigger-hover': ':hover',\n 'trigger-on': '[data-iox-on]',\n};\n\n/** The selector body of a targeted state's rule, or null for a state that is not targeted. */\nexport function targetedStateSelector(state: string, scopeCssId: string, triggerCssId: string, styledCssId: string): string | null {\n const suffix = TARGETED_STATE_SUFFIX[state];\n return suffix ? buildTargetedSuffixSelector(scopeCssId, triggerCssId, styledCssId, suffix) : null;\n}\n","/**\n * parts — the failure design (forms-and-inputs-plan.md Part 2, board 7). A compound component\n * like Field is not one styleable surface: its label, control, help text, error message and\n * required mark are each their own descendant, addressed by a stable class the component itself\n * renders (`IoxFieldComponent`'s `iox-field__label`/`__control`/`__help`/`__error`/`__required`).\n *\n * Lives in @vectoriox/iox-ui because BOTH renderers depend on iox-ui (the engine does not depend\n * on iox-builder) — same reason `buildTargetedStateSelector` lives here. No new compiler: this\n * builds a selector STRING, then the existing `compile()`/`compileDeclarations()` path renders it\n * exactly like any other rule.\n */\n\n/**\n * The selector BODY (no leading `.`, matching the builder's `compile()` convention) for a node,\n * optionally scoped to one of its parts, optionally further scoped to a validation state.\n *\n * buildPartSelector('abc') -> 'iox-node-abc'\n * buildPartSelector('abc', 'iox-field__error') -> 'iox-node-abc .iox-field__error'\n * buildPartSelector('abc', undefined, 'iox-invalid') -> 'iox-node-abc.iox-invalid'\n * buildPartSelector('abc', 'iox-field__error', 'iox-invalid')\n * -> 'iox-node-abc.iox-invalid .iox-field__error'\n *\n * The validation class always attaches to the NODE itself (that's where `IoxFieldComponent` sets\n * `.iox-invalid`/`.iox-valid`), never to the part — a part has no host class of its own to hang a\n * compound selector off.\n */\nexport function buildPartSelector(nodeId: string, partClass?: string, validationClass?: string): string {\n const base = validationClass ? `iox-node-${nodeId}.${validationClass}` : `iox-node-${nodeId}`;\n return partClass ? `${base} .${partClass}` : base;\n}\n\n/**\n * Design-time validation \"states\" (wrong/accepted) — not real CSS pseudo-classes. `IoxFieldComponent`\n * already carries `.iox-invalid`/`.iox-valid` host classes it sets from `forceInvalid`/`showValid`\n * (decision D5), so authoring \"Wrong\"/\"Accepted\" styles compiles to a CLASS-compound selector via\n * `buildPartSelector`, never a `:pseudo-class` (`:wrong` isn't real CSS). Lives here (not\n * `@vectoriox/iox-builder`'s `ElementState`/`VALIDATION_STATE_CLASS`, which re-export these same\n * values) because the SSR engine needs the mapping too and does not depend on iox-builder.\n */\nexport const VALIDATION_STATES = ['wrong', 'accepted'] as const;\n\nexport const VALIDATION_STATE_CLASS: Record<string, string> = {\n wrong: 'iox-invalid',\n accepted: 'iox-valid',\n};\n\n/**\n * type -> part key -> the stable class that part's own template already renders. The single\n * source of truth for which classes a part maps to, so the builder (render.directive.ts) and the\n * SSR engine (layout-renderer.service.ts) resolve a part's selector identically without either\n * duplicating the string literals. `iox-builder`'s `FieldComponentConfig.parts` (the picker's\n * display labels) is built FROM this map, not the other way round.\n */\nexport const PART_CLASS_NAMES: Record<string, Record<string, string>> = {\n Field: {\n label: 'iox-field__label',\n control: 'iox-field__control',\n help: 'iox-field__help',\n error: 'iox-field__error',\n required: 'iox-field__required',\n // Premium M3: a Choices field's chip (N1), a Date's calendar and each of its days (N8) — the classes forms-core\n // `fieldHtml` and the date picker runtime render.\n chip: 'iox-field__chip',\n calendar: 'iox-cal',\n calendarDay: 'iox-cal__day',\n },\n};\n\n/** The class a declared part compiles against, e.g. ('Field', 'error') -> 'iox-field__error'.\n * Undefined when the type declares no such part (or no parts at all). */\nexport function partClassName(type: string, partKey: string): string | undefined {\n return PART_CLASS_NAMES[type]?.[partKey];\n}\n","/**\n * WHERE a state rule lands — the ONE selector planner both renderers emit state and part rules through\n * (vectoriox/iox-client-engine#14). Before it the builder and the engine each kept a copy: the builder matched a\n * structural state (first / last / odd / even child) on the OUTER element, the engine on `.iox-node` — on the\n * engine's component path the INNER element, the only child of its host, so \"last child\" matched every item; and\n * the engine dropped every part state but Wrong / Accepted while the builder applied a part's hover at all times.\n *\n * Returns full selectors (with their dots). Framework-free.\n */\n\nimport { buildPartSelector, VALIDATION_STATE_CLASS } from './parts';\nimport { HOVER_STATES, stateSelectorSuffix } from './style-compiler';\nimport { targetedStateSelector, TARGETED_STATE_SUFFIX } from './tree-relations';\n\n/**\n * Properties that govern how a node sits in its PARENT's layout (flex / grid item, block child) — they live on the\n * OUTER element: the component's host, or the one element the string renderer and the canvas's collapsed hosts write.\n * Everything else is \"inner\". One list for both renderers (it was typed twice).\n */\nexport const OUTER_STYLE_PROPS: ReadonlySet<string> = new Set([\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'alignSelf', 'flexGrow', 'flexShrink', 'flexBasis', 'order',\n 'gridColumn', 'gridRow', 'justifySelf',\n 'width',\n]);\n\n/** Structural pseudo-classes — matched on the element that IS the sibling among siblings (the outer). */\nexport const STRUCTURAL_STATES: ReadonlyArray<string> = ['first-child', 'last-child', 'nth-child(odd)', 'nth-child(even)'];\n\n/** States whose pseudo-class lives on the PARENT (`parent-hover` → the parent's `:hover`). */\nexport const RELATIONAL_STATE_PSEUDO: Readonly<Record<string, string>> = { 'parent-hover': 'hover' };\n\nexport function isStructuralState(state: string): boolean {\n return STRUCTURAL_STATES.includes(state);\n}\n\n/** What a state rule needs besides the node: its parent (relational) or its scope and trigger (targeted). */\nexport interface StateScope {\n parentId?: string | null;\n scopeId?: string | null;\n triggerId?: string | null;\n}\n\n/** A state rule's selectors: `inner` for the node's own element; `outer`, when set, for the OUTER_STYLE_PROPS. */\nexport interface StateRulePlan {\n inner: string;\n outer?: string;\n}\n\n/**\n * The selectors of `cssId`'s rule for `state`, or null when the state cannot be scoped yet (a relational state with\n * no parent, a targeted one with no scope — never an unscoped, page-global rule).\n *\n * A structural state is matched on the outer element, and its styles reach the node's own element whether that is\n * the same element (the string path, a one-element node, the canvas's collapsed hosts) or inside it (a component's\n * host, a Repeater's row wrapper); its outer props stay on the outer element. Every other state is the node's own.\n */\nexport function planStateRule(cssId: string, state: string, scope: StateScope = {}): StateRulePlan | null {\n if (TARGETED_STATE_SUFFIX[state]) {\n const body = scope.scopeId && scope.triggerId ? targetedStateSelector(state, scope.scopeId, scope.triggerId, cssId) : null;\n return body ? { inner: `.${body}` } : null;\n }\n const relational = RELATIONAL_STATE_PSEUDO[state];\n if (relational) return scope.parentId ? { inner: `.iox-node-${scope.parentId}:${relational} .iox-node-${cssId}` } : null;\n const validationClass = VALIDATION_STATE_CLASS[state];\n if (validationClass) return { inner: `.${buildPartSelector(cssId, undefined, validationClass)}` };\n if (isStructuralState(state)) {\n const outer = `.iox-outer-${cssId}:${state}`;\n return { inner: `${outer}.iox-node-${cssId}, ${outer} .iox-node-${cssId}`, outer };\n }\n return { inner: `.iox-node-${cssId}${stateSelectorSuffix(state)}` };\n}\n\n/**\n * The selector of a PART's rule (a Field's label, control, help, error — `PART_CLASS_NAMES`), optionally in a state:\n * Wrong / Accepted and a component state on the NODE (that is where the class / attribute is), Hover / Pressed /\n * Focus on the PART itself. Null for a state a part does not take (structural, relational, targeted).\n */\nexport function planPartRule(cssId: string, partClass: string, state?: string | null): string | null {\n if (!state) return `.${buildPartSelector(cssId, partClass)}`;\n const validationClass = VALIDATION_STATE_CLASS[state];\n if (validationClass) return `.${buildPartSelector(cssId, partClass, validationClass)}`;\n if (isStructuralState(state) || RELATIONAL_STATE_PSEUDO[state] || TARGETED_STATE_SUFFIX[state]) return null;\n const suffix = stateSelectorSuffix(state);\n // An attribute state (`current`, `on`) is the node's; a pseudo-class is the part's own.\n return suffix.startsWith('[') ? `.iox-node-${cssId}${suffix} .${partClass}` : `.iox-node-${cssId} .${partClass}${suffix}`;\n}\n\n/** Split a style map into the node's own props and its OUTER_STYLE_PROPS. */\nexport function splitOuterProps(styles: Record<string, any>): { inner: Record<string, any>; outer: Record<string, any> } {\n const inner: Record<string, any> = {};\n const outer: Record<string, any> = {};\n for (const [k, v] of Object.entries(styles)) (OUTER_STYLE_PROPS.has(k) ? outer : inner)[k] = v;\n return { inner, outer };\n}\n\n/**\n * The devices a hover rule is for (G1 — Emil 91, mobile-native M1): a phone has no hover, and a tap fires a false\n * one that STICKS until the next tap elsewhere. Every hover, parent-hover and trigger-hover rule — the node's own and\n * a part's — is emitted inside this query by both renderers; `:active` (a real press on touch) never is.\n */\nexport const HOVER_MEDIA_QUERY = '(hover: hover) and (pointer: fine)';\n\n/** True for a state driven by a pointer hovering something (its own, its parent's, a chosen trigger's). */\nexport function isHoverState(state: string | null | undefined): boolean {\n return !!state && HOVER_STATES.includes(state);\n}\n\n/** `css` as it is emitted for `state`: inside `HOVER_MEDIA_QUERY` for a hover state, unchanged otherwise. */\nexport function gateHoverRule(state: string | null | undefined, css: string): string {\n return css && isHoverState(state) ? `@media ${HOVER_MEDIA_QUERY} {\\n${css}\\n}` : css;\n}\n","/**\n * \"This link is the page you're on\" (CC1, N2). ONE decision for the builder canvas and both engine\n * paths: a link whose target is the current page renders `aria-current=\"page\"` — in the raw SSR too —\n * and the `current` style state compiles to that attribute (`[aria-current=\"page\"]`), so the look and\n * the announcement can never disagree.\n *\n * Paths are compared APP-relative: the engine's string path writes base-relative hrefs (`work`, `./`\n * for home), the canvas writes the route (`/work`), and a browser hands back an absolute pathname\n * under the tenant's `<base href=\"/<org>/\">` — `baseHref` strips that.\n */\n\nexport interface CurrentLinkOptions {\n /** Also current on the pages BELOW the link's (`/work` while on `/work/sample-project`). Never for home. */\n prefix?: boolean;\n /** The document's base path (`/<org>/`), stripped from both sides when present. */\n baseHref?: string | null;\n}\n\n/** The value a current link carries. */\nexport const ARIA_CURRENT_PAGE = 'page';\n\nconst EXTERNAL = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/** True for an href that leaves the site (a scheme, protocol-relative) or stays on the page (`#…`, empty). */\nexport function isExternalOrFragment(href: string | null | undefined): boolean {\n const h = String(href ?? '').trim();\n return !h || h.startsWith('#') || EXTERNAL.test(h);\n}\n\n/**\n * An app path in one comparable form: no query or hash, no base, no leading `./` or slashes, no\n * trailing slash. Home is `''`.\n */\nexport function normalizeAppPath(path: string | null | undefined, baseHref?: string | null): string {\n let p = String(path ?? '').trim().replace(/[?#].*$/, '');\n const base = String(baseHref ?? '').trim().replace(/\\/+$/, '');\n if (base && base !== '/' && (p === base || p.startsWith(`${base}/`))) p = p.slice(base.length);\n p = p.replace(/^(?:\\.\\/)+/, '').replace(/\\/{2,}/g, '/').replace(/^\\/+/, '').replace(/\\/+$/, '');\n return p === '.' ? '' : p;\n}\n\n/** Whether `href` points at the page at `currentPath` (both app-relative, or absolute under `baseHref`). */\nexport function isCurrentLink(href: string | null | undefined, currentPath: string | null | undefined, options: CurrentLinkOptions = {}): boolean {\n if (currentPath == null || isExternalOrFragment(href)) return false;\n const target = normalizeAppPath(href, options.baseHref);\n const here = normalizeAppPath(currentPath, options.baseHref);\n if (target === here) return true;\n return !!options.prefix && target !== '' && here.startsWith(`${target}/`);\n}\n","import { HeaderAttribute, HeaderBehaviour } from '@vectoriox/iox-ui/design-core';\n\nimport { MatchMediaHost, prefersReducedMotion } from '../motion/motion';\nimport { ScrollSource } from '../motion/scrolled';\n\n/**\n * A header that HIDES (premium components T2, M4): it steps aside while the page scrolls down and comes back the moment\n * it scrolls up — ONE runtime for the live site (the window's scroll) and the builder canvas (its Lenis scroll, handed in\n * through `update`). It never moves while the visitor is inside it: keyboard focus in the header, or its own drawer\n * open, keeps it in place, and it is always there at the top of the page.\n *\n * Motion (Emil 30/41/52/59/192): `translate` only, from the live value (a run interrupted by a change of direction turns\n * back from where it is — never stacked); the exit is faster than the return (dur-fast out, dur-ui back, on the look's\n * standard easing — the tokens collapse with the look's motion); under reduced motion it fades in place (opacity, no\n * movement — gentler, not zero), and is not clickable while faded. The return RELEASES (no inline frame is left), the\n * hidden frame is held, as every exit in the product (M2's settle rule).\n *\n * A header that only STAYS needs no runtime: the shared CSS keeps it at the top (`iox-design.css`).\n */\n\n/** Page px the scroll must travel in one direction before the header answers — past a trackpad's jitter. */\nexport const HEADER_SCROLL_HYSTERESIS_PX = 6;\nconst FALLBACK_HIDE_MS = 150;\nconst FALLBACK_SHOW_MS = 200;\nconst FALLBACK_EASING = 'ease-out';\nconst HIDE_DURATION_TOKEN = '--iox-dur-fast';\nconst SHOW_DURATION_TOKEN = '--iox-dur-ui';\nconst EASING_TOKEN = '--iox-ease-standard';\nconst SUPPORTED_EASING = /^(linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier\\(.+\\)|linear\\(.+\\)|steps\\(.+\\))$/;\nconst OPEN_DIALOG = 'dialog[open]';\n\nexport interface HeaderRuntimeOptions {\n /** Where reduced motion is asked (the window; a stub in a spec). */\n host?: MatchMediaHost | null;\n}\n\n/** `120ms` / `0.2s` → milliseconds; anything else → null. */\nexport function durationMs(value: string | null | undefined): number | null {\n const m = /^(-?\\d*\\.?\\d+)(ms|s)$/.exec(String(value ?? '').trim());\n if (!m) return null;\n const n = Number(m[1]) * (m[2] === 's' ? 1000 : 1);\n return Number.isFinite(n) && n >= 0 ? n : null;\n}\n\n/**\n * Whether a hiding header should step aside now: the page moved DOWN past the header's own height, the header is not\n * held (focus inside, its drawer open). Pure: the direction and the offsets come from the caller.\n */\nexport function headerShouldHide(offset: number, delta: number, headerHeight: number, held: boolean): boolean {\n if (held || !(delta > 0)) return false;\n return offset > Math.max(0, headerHeight);\n}\n\nexport class HeaderRuntime {\n private lastOffset = 0;\n private hidden = false;\n private height = 0;\n private anim: Animation | null = null;\n private readonly resize: ResizeObserver | null;\n private readonly onFocusIn = (): void => this.setHidden(false);\n\n constructor(private readonly header: HTMLElement, private readonly options: HeaderRuntimeOptions = {}) {\n const view = header.ownerDocument?.defaultView as (Window & { ResizeObserver?: typeof ResizeObserver }) | null;\n this.height = header.offsetHeight;\n this.resize = view?.ResizeObserver ? new view.ResizeObserver(() => { this.height = this.header.offsetHeight; }) : null;\n this.resize?.observe(header);\n header.addEventListener('focusin', this.onFocusIn);\n }\n\n /** True while the header has stepped aside. */\n get isHidden(): boolean {\n return this.hidden;\n }\n\n /** The page now stands at `offset` page px (layout px — the canvas divides out its zoom). */\n update(offset: number): void {\n if (!Number.isFinite(offset)) return;\n const delta = offset - this.lastOffset;\n if (offset <= this.height) {\n // Its own height from the top: the header is where it belongs, whichever way the page moves.\n this.lastOffset = offset;\n this.setHidden(false);\n return;\n }\n if (Math.abs(delta) < HEADER_SCROLL_HYSTERESIS_PX) return;\n this.lastOffset = offset;\n this.setHidden(headerShouldHide(offset, delta, this.height, this.held()));\n }\n\n /** Back in place now, with no motion (a page change, the runtime going away). */\n reset(): void {\n this.anim?.cancel();\n this.anim = null;\n this.hidden = false;\n this.header.removeAttribute(HeaderAttribute.Hidden);\n }\n\n destroy(): void {\n this.reset();\n this.resize?.disconnect();\n this.header.removeEventListener('focusin', this.onFocusIn);\n }\n\n private held(): boolean {\n return this.header.matches(':focus-within') || !!this.header.querySelector(OPEN_DIALOG);\n }\n\n private setHidden(hidden: boolean): void {\n if (hidden === this.hidden) return;\n this.hidden = hidden;\n this.header.toggleAttribute(HeaderAttribute.Hidden, hidden);\n const reduce = prefersReducedMotion(this.options.host ?? this.header.ownerDocument?.defaultView ?? null);\n const prop = reduce ? 'opacity' : 'translate';\n const shown = reduce ? '1' : '0px 0px';\n const away = reduce ? '0' : '0px -100%';\n const style = this.header.ownerDocument?.defaultView?.getComputedStyle(this.header);\n // From the live value when a run is in flight (a change of direction mid-way turns back from where it is).\n const from = this.anim ? (style?.getPropertyValue(prop) || (hidden ? shown : away)) : (hidden ? shown : away);\n this.anim?.cancel();\n this.anim = null;\n if (typeof this.header.animate !== 'function') return;\n const duration = durationMs(style?.getPropertyValue(hidden ? HIDE_DURATION_TOKEN : SHOW_DURATION_TOKEN)) ?? (hidden ? FALLBACK_HIDE_MS : FALLBACK_SHOW_MS);\n const easing = style?.getPropertyValue(EASING_TOKEN)?.trim() ?? '';\n const anim = this.header.animate([{ [prop]: from }, { [prop]: hidden ? away : shown }], {\n duration, easing: SUPPORTED_EASING.test(easing) ? easing : FALLBACK_EASING, fill: hidden ? 'forwards' : 'none',\n });\n this.anim = anim;\n if (!hidden) anim.finished?.then(() => { if (this.anim === anim) { anim.cancel(); this.anim = null; } }).catch(() => { /* interrupted */ });\n }\n}\n\nconst HIDING_SELECTOR = `[${HeaderAttribute.Behaviour}=\"${HeaderBehaviour.Hides}\"]`;\n\n/** The headers that hide while the page scrolls down: in `root`, or among `elements` (each, and what it holds — what a\n * runtime instance owns: the page's nodes or the globals'). */\nexport function hidingHeadersIn(root: ParentNode | Iterable<Element>): HTMLElement[] {\n if (typeof (root as ParentNode).querySelectorAll === 'function') return Array.from((root as ParentNode).querySelectorAll<HTMLElement>(HIDING_SELECTOR));\n const out = new Set<HTMLElement>();\n for (const el of root as Iterable<Element>) {\n if (el.matches?.(HIDING_SELECTOR)) out.add(el as HTMLElement);\n el.querySelectorAll?.<HTMLElement>(HIDING_SELECTOR).forEach(h => out.add(h));\n }\n return [...out];\n}\n\n/**\n * The live site's door: every hiding header in `root` (or among `elements`) follows `source` (the window), through ONE\n * passive listener read once per frame. Returns the stop.\n */\nexport function watchHeaders(source: ScrollSource, root: ParentNode | Iterable<Element>, options: HeaderRuntimeOptions = {}): () => void {\n const runtimes = hidingHeadersIn(root).map(el => new HeaderRuntime(el, options));\n if (!runtimes.length) return () => { /* nothing to stop */ };\n let frame = 0;\n const raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : (fn: FrameRequestCallback) => setTimeout(() => fn(0), 16) as unknown as number;\n const caf = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : (id: number) => clearTimeout(id);\n const sync = () => {\n frame = 0;\n const offset = source.scrollY ?? source.scrollTop ?? 0;\n for (const r of runtimes) r.update(offset);\n };\n const onScroll = () => { if (!frame) frame = raf(sync); };\n source.addEventListener('scroll', onScroll, { passive: true });\n sync();\n return () => {\n source.removeEventListener('scroll', onScroll);\n if (frame) caf(frame);\n for (const r of runtimes) r.destroy();\n };\n}\n","import { dialogDomId, dialogOpenerAttributes, OpenerNodeLike } from '@vectoriox/iox-ui/actions-core';\nimport { HeaderAttribute, headerAttributes, HeaderTrait } from '@vectoriox/iox-ui/design-core';\nimport { SLIDE_CAPTION_TRAIT, SLIDE_TYPE } from '@vectoriox/iox-ui/composite-core';\n\nimport { ARIA_CURRENT_PAGE, CurrentLinkOptions, isCurrentLink } from '../navigation/current-link';\nimport { A11yTrait, ACCESSIBLE_NAME_TYPES, CURRENT_LINK_TYPES } from './a11y-traits';\n\nexport { A11yTrait, ACCESSIBLE_NAME_TYPES, CURRENT_LINK_TYPES } from './a11y-traits';\nimport { breakpointDef } from '../style-compiler/responsive';\n\n/**\n * The accessibility attributes a node renders (CC1: N2 current page, N3 dialog openers, N4 a drawer\n * that closes when the window widens, N6 accessible names). ONE function decides them and every\n * renderer applies the answer with its own transport: the engine's string path serialises it, the\n * engine's component path and the builder canvas set it on the node's element. A node that wants\n * none of it gets `{}` and renders exactly as before.\n */\n\n\n\n\n/** The types that are pure decoration to assistive technology (an Icon has no name of its own). */\nexport const DECORATIVE_TYPES: ReadonlyArray<string> = ['Icon'];\n\nexport const DIALOG_NODE_TYPE = 'Dialog';\n/** Named for assistive technology, but never an icon-only CONTROL the audit should flag: a Dialog, a carousel. */\nconst NAME_NOT_REQUIRED_TYPES: ReadonlyArray<string> = [DIALOG_NODE_TYPE, 'SliderContainer'];\nconst SLIDER_PAUSE_ROLE = 'slider.pause';\n/** A Segmented control's root (CC4b) is a radio group that must be named (board 10: an empty name is an audit\n * finding). The main entry does not import composite-core, so the role is spelled here — a11y spec pins it. */\nexport const NAMED_GROUP_ROLES: ReadonlyArray<string> = ['segmented'];\n\n/** Carries the min-width (px) at which an open dialog closes itself; the engine listens on it. */\nexport const DIALOG_CLOSE_ABOVE_ATTRIBUTE = 'data-iox-dialog-close-above';\n\n/** A slide's caption (premium M4, T3): the Slider's Caption part shows the caption of the slide in view. */\nexport const SLIDE_CAPTION_ATTRIBUTE = 'data-iox-caption';\n\nexport enum A11yAttribute {\n Label = 'aria-label',\n Hidden = 'aria-hidden',\n Current = 'aria-current',\n Id = 'id',\n}\n\n/** Every attribute this module may set — what `syncNodeA11yAttributes` owns on an element. */\nexport const MANAGED_A11Y_ATTRIBUTES: ReadonlyArray<string> = [\n A11yAttribute.Label, A11yAttribute.Hidden, A11yAttribute.Current, A11yAttribute.Id,\n 'aria-haspopup', 'aria-expanded', 'aria-controls', DIALOG_CLOSE_ABOVE_ATTRIBUTE,\n HeaderAttribute.Behaviour, HeaderAttribute.Edge, SLIDE_CAPTION_ATTRIBUTE,\n];\n\n/** A node as any renderer holds it: serialized (`props`), or the builder's (`traits[]`). */\nexport interface A11yNodeSource extends OpenerNodeLike {\n id?: string;\n styleId?: string;\n type?: string;\n props?: Readonly<Record<string, unknown>> | null;\n traits?: ReadonlyArray<{ name?: string; default?: unknown }> | Readonly<Record<string, { name?: string; default?: unknown }>> | null;\n}\n\n/** A content trait's value from `props` (serialized) or `traits[]` (builder). */\nexport function nodeTraitValue(node: A11yNodeSource | null | undefined, name: string): unknown {\n if (!node) return undefined;\n if (node.props && name in node.props) return node.props[name];\n const traits = node.traits ? (Array.isArray(node.traits) ? node.traits : Object.values(node.traits)) : [];\n return (traits as ReadonlyArray<{ name?: string; default?: unknown }>).find(t => t?.name === name)?.default;\n}\n\n/** The min-width (CSS px) above a breakpoint — where a dialog set to \"close when wider than\" it closes. */\nexport function dialogCloseAboveMinWidth(breakpoint: unknown): number | null {\n const max = typeof breakpoint === 'string' ? breakpointDef(breakpoint)?.maxWidth : null;\n return max == null ? null : max + 1;\n}\n\n/** `(min-width: 768px)` for a min-width carried in `data-iox-dialog-close-above`. */\nexport function closeAboveMediaQuery(minWidth: number | string): string {\n return `(min-width: ${Number(minWidth)}px)`;\n}\n\nexport interface NodeA11yContext {\n /** The app path of the page being rendered (`/work`). Absent = no current-link decision. */\n currentPath?: string | null;\n /** The href the renderer gives this node (a page link's resolved route, or its URL). */\n href?: string | null;\n currentLink?: CurrentLinkOptions;\n}\n\nfunction trimmed(v: unknown): string {\n return typeof v === 'string' ? v.trim() : '';\n}\n\n/** The attributes a node renders. */\nexport function nodeA11yAttributes(node: A11yNodeSource | null | undefined, ctx: NodeA11yContext = {}): Record<string, string> {\n if (!node?.type) return {};\n const out: Record<string, string> = {};\n const name = ACCESSIBLE_NAME_TYPES.includes(node.type) ? trimmed(nodeTraitValue(node, A11yTrait.AccessibleName)) : '';\n if (name) out[A11yAttribute.Label] = name;\n if (DECORATIVE_TYPES.includes(node.type)) out[A11yAttribute.Hidden] = 'true';\n if (CURRENT_LINK_TYPES.includes(node.type) && isCurrentLink(ctx.href, ctx.currentPath, ctx.currentLink)) {\n out[A11yAttribute.Current] = ARIA_CURRENT_PAGE;\n }\n Object.assign(out, dialogOpenerAttributes(node));\n if (node.type === DIALOG_NODE_TYPE) {\n const id = node.styleId ?? node.id;\n if (id) out[A11yAttribute.Id] = dialogDomId(id);\n const minWidth = dialogCloseAboveMinWidth(nodeTraitValue(node, A11yTrait.CloseAbove));\n if (minWidth !== null) out[DIALOG_CLOSE_ABOVE_ATTRIBUTE] = String(minWidth);\n }\n // T2 (M4): how a header behaves as the page scrolls — the shared CSS and the header runtime read these.\n Object.assign(out, headerAttributes(nodeTraitValue(node, HeaderTrait.Behaviour), nodeTraitValue(node, HeaderTrait.Edge)));\n if (node.type === SLIDE_TYPE) {\n const caption = trimmed(nodeTraitValue(node, SLIDE_CAPTION_TRAIT));\n if (caption) out[SLIDE_CAPTION_ATTRIBUTE] = caption;\n }\n return out;\n}\n\n/** The attributes as an HTML string fragment (` name=\"value\"`…) for a string renderer. */\nexport function serializeA11yAttributes(attrs: Readonly<Record<string, string>>, escape: (v: string) => string): string {\n return Object.entries(attrs).map(([k, v]) => ` ${k}=\"${escape(v)}\"`).join('');\n}\n\nconst applied = new WeakMap<object, ReadonlyArray<string>>();\n\n/**\n * Make an element's managed attributes match `attrs` — set what is there, remove what this function\n * set before and is gone now. An attribute it never set (a component's own `aria-*`) is left alone.\n */\nexport function syncNodeA11yAttributes(\n el: { setAttribute(n: string, v: string): void; removeAttribute(n: string): void } | null | undefined,\n attrs: Readonly<Record<string, string>>,\n): void {\n if (!el) return;\n for (const name of applied.get(el) ?? []) if (!(name in attrs)) el.removeAttribute(name);\n for (const [name, value] of Object.entries(attrs)) el.setAttribute(name, value);\n applied.set(el, Object.keys(attrs).filter(n => MANAGED_A11Y_ATTRIBUTES.includes(n)));\n}\n\n/** The types whose words are the node's own (`content` / `label`), not its children's. */\nconst OWN_WORDS: Readonly<Record<string, string>> = { Text: 'content', Heading: 'content', Link: 'label', SubmitButton: 'label' };\nconst ICON_TYPE = 'Icon';\n\ninterface NameScan { words: boolean; icon: boolean; }\n\nfunction scanNames(node: A11yNodeSource & { children?: ReadonlyArray<unknown> | null }, acc: NameScan): void {\n const prop = node.type ? OWN_WORDS[node.type] : undefined;\n if (prop && trimmed(nodeTraitValue(node, prop))) acc.words = true;\n if (node.type === ICON_TYPE) acc.icon = true;\n for (const child of (node.children ?? []) as ReadonlyArray<A11yNodeSource & { children?: ReadonlyArray<unknown> }>) scanNames(child, acc);\n}\n\n/**\n * True for a control that shows ONLY an icon and has no Accessible name — announced as an unnamed\n * button or link (WCAG 4.1.2, CC1 N6). The responsive audit flags it; an Icon on its own is decoration.\n */\nexport function needsAccessibleName(node: (A11yNodeSource & { children?: ReadonlyArray<unknown> | null }) | null | undefined): boolean {\n if (!node?.type || !ACCESSIBLE_NAME_TYPES.includes(node.type) || NAME_NOT_REQUIRED_TYPES.includes(node.type)) return false;\n // A Slider's pause control is named by its runtime (\"Stop / Start automatic slide show\", CC3).\n if ((node as { role?: string }).role === SLIDER_PAUSE_ROLE) return false;\n if (trimmed(nodeTraitValue(node, A11yTrait.AccessibleName))) return false;\n const acc: NameScan = { words: false, icon: false };\n scanNames(node, acc);\n return acc.icon && !acc.words;\n}\n\n/**\n * True for a GROUP that must be named and is not — a Segmented control's radio group (CC4b, board 10): a screen reader\n * says \"radio group\" and nothing about what is being chosen. The responsive audit flags it; named in Bindings ▸\n * Accessibility.\n */\nexport function needsGroupName(node: (A11yNodeSource & { role?: string | null }) | null | undefined): boolean {\n return !!node?.role && NAMED_GROUP_ROLES.includes(node.role) && !trimmed(nodeTraitValue(node, A11yTrait.AccessibleName));\n}\n","/**\n * THE interaction keyframes (composite plan T2 · CC1 N5). Both runtimes — the builder's\n * InteractionEngineService and the live site's ClientInteractionService — animate an element action\n * from this ONE table. Before it, each kept its own copy and they drifted: `show`/`hide` animated\n * `visibility` on the canvas and not on the site, and `toggleVisibility` ran 0→1 on the canvas and\n * 1→0 on the site, so the same hamburger opened on one and closed on the other.\n *\n * `toggleVisibility` is stateful: it HIDES a visible element and SHOWS a hidden one\n * (`resolveToggleVisibility`), and its frames are then exactly `hide`'s or `show`'s. Hidden ends at\n * `visibility: hidden`, so a hidden element leaves the tab order and the accessibility tree too.\n * It is still visual-only — the element keeps its box — which is why the actions picker says so and\n * why the mobile-nav pattern uses a Dialog instead (D9).\n */\n\nimport { playTextReveal, revealClipPath, SCENE_REVEAL_DEFAULT, SceneRevealFrom, TextRevealBy } from '@vectoriox/iox-ui/scene-core';\n\nimport { motionAllowed } from './motion';\n\nexport type InteractionKeyframe = Readonly<Record<string, string | number>>;\n\n/** The attribute a runtime puts on an element an interaction has hidden (and removes on reveal). */\nexport const INTERACTION_HIDDEN_ATTRIBUTE = 'data-iox-hidden';\n\nexport enum VisibilityActionType {\n Show = 'show',\n Hide = 'hide',\n Toggle = 'toggleVisibility',\n}\n\n/** The reveals (premium sites SC3): a wipe from a chosen side, a picture settling, text rising line by line. */\nexport enum RevealActionType {\n Clip = 'clipReveal',\n Zoom = 'zoomOut',\n Text = 'revealText',\n}\n\n/** Actions that reveal an element (hidden → visible). Their FIRST frame is the pre-state. */\nexport const ENTRANCE_ACTION_TYPES: ReadonlySet<string> =\n new Set(['fadeIn', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'scaleIn', VisibilityActionType.Show, RevealActionType.Clip, RevealActionType.Zoom, RevealActionType.Text]);\n\n/** Actions that hide an element (visible → hidden). */\nexport const EXIT_ACTION_TYPES: ReadonlySet<string> = new Set(['fadeOut', 'scaleOut', VisibilityActionType.Hide]);\n\nconst DEFAULT_DISTANCE = 20;\nconst DEFAULT_DEGREES = 360;\nconst ZOOM_START = 1.15;\nconst SHOWN_PERCENT = 100;\n\nconst SHOWN = { opacity: 1, visibility: 'visible' } as const;\nconst HIDDEN = { opacity: 0, visibility: 'hidden' } as const;\n\n/** What `toggleVisibility` does to an element: show it when hidden, hide it when visible. */\nexport function resolveToggleVisibility(isHidden: boolean): VisibilityActionType.Show | VisibilityActionType.Hide {\n return isHidden ? VisibilityActionType.Show : VisibilityActionType.Hide;\n}\n\n/** The action a runtime actually plays: `toggleVisibility` resolved against the element's state. */\nexport function effectiveActionType(type: string, isHidden: boolean): string {\n return type === VisibilityActionType.Toggle ? resolveToggleVisibility(isHidden) : type;\n}\n\n/**\n * The keyframes of an animation action, or null for a type that is not an animation (dialogs,\n * context, navigation…). `toggleVisibility` must be resolved first (`effectiveActionType`); asked\n * directly it answers with `hide`'s frames, the toggle of an element that starts visible.\n */\nexport function buildInteractionKeyframes(type: string, params?: Readonly<Record<string, unknown>> | null): InteractionKeyframe[] | null {\n const dist = Number(params?.['distance'] ?? DEFAULT_DISTANCE);\n const deg = Number(params?.['degrees'] ?? DEFAULT_DEGREES);\n switch (type) {\n case 'fadeIn': return [{ opacity: 0 }, { opacity: 1 }];\n case 'fadeOut': return [{ opacity: 1 }, { opacity: 0 }];\n case 'moveUp': return [{ opacity: 0, transform: `translateY(${dist}px)` }, { opacity: 1, transform: 'translateY(0)' }];\n case 'moveDown': return [{ opacity: 0, transform: `translateY(-${dist}px)` }, { opacity: 1, transform: 'translateY(0)' }];\n case 'moveLeft': return [{ opacity: 0, transform: `translateX(${dist}px)` }, { opacity: 1, transform: 'translateX(0)' }];\n case 'moveRight': return [{ opacity: 0, transform: `translateX(-${dist}px)` }, { opacity: 1, transform: 'translateX(0)' }];\n case 'scaleIn': return [{ opacity: 0, transform: 'scale(0.8)' }, { opacity: 1, transform: 'scale(1)' }];\n case 'scaleOut': return [{ opacity: 1, transform: 'scale(1)' }, { opacity: 0, transform: 'scale(0.8)' }];\n case 'rotate': return [{ transform: 'rotate(0deg)' }, { transform: `rotate(${deg}deg)` }];\n case RevealActionType.Clip: return clipFrames(params);\n case RevealActionType.Zoom: return [{ transform: `scale(${ZOOM_START})` }, { transform: 'scale(1)' }];\n // A whole-element fade is what plays when text cannot split, and what reduced motion and the pre-state read.\n case RevealActionType.Text: return [{ opacity: 0 }, { opacity: 1 }];\n case VisibilityActionType.Show: return [HIDDEN, SHOWN];\n case VisibilityActionType.Hide:\n case VisibilityActionType.Toggle: return [SHOWN, HIDDEN];\n default: return null;\n }\n}\n\nfunction revealFromOf(params?: Readonly<Record<string, unknown>> | null): SceneRevealFrom {\n const from = params?.['from'];\n return Object.values(SceneRevealFrom).includes(from as SceneRevealFrom) ? (from as SceneRevealFrom) : SCENE_REVEAL_DEFAULT;\n}\n\nfunction clipFrames(params: Readonly<Record<string, unknown>> | null | undefined, inlineSign: 1 | -1 = 1): InteractionKeyframe[] {\n const from = revealFromOf(params);\n return [{ opacity: 1, clipPath: revealClipPath(0, from, inlineSign) }, { opacity: 1, clipPath: revealClipPath(SHOWN_PERCENT, from, inlineSign) }];\n}\n\nconst INLINE_FROMS: ReadonlySet<SceneRevealFrom> = new Set([SceneRevealFrom.Start, SceneRevealFrom.End]);\n\nexport interface AnimateActionOptions {\n /** The frames are `buildInteractionKeyframes`' reversed: a reverse pass never splits text, it just fades back. */\n reverse?: boolean;\n}\n\n/** The id every interaction run's Animation carries — how a re-trigger finds the runs it interrupts. */\nexport const INTERACTION_ANIMATION_ID = 'iox-interaction';\n\n/**\n * What a run that has ended leaves on its element (vectoriox/iox-client-engine#12, iox-ui#41) — ONE rule for the\n * canvas and the live site.\n *\n * `Release`: the last frame IS the element's natural state (an entrance, an exit played back, a one-shot like a\n * rotate). The run is cancelled and no frame is written inline, so the stylesheet applies again — the element\n * style's `:hover` / `:active` transforms included. Before, the last frame (`transform: translateY(0)`) was locked\n * inline on the site and kept by `fill: both` on the canvas, and an element that had entered never pressed again.\n *\n * `Hold`: the last frame HIDES the element (an exit, an entrance played back): it is kept, inline.\n */\nexport enum SettleMode {\n Release = 'release',\n Hold = 'hold',\n}\n\nexport function settleModeFor(type: string, reverse = false): SettleMode {\n const hides = reverse ? ENTRANCE_ACTION_TYPES.has(type) : EXIT_ACTION_TYPES.has(type);\n return hides ? SettleMode.Hold : SettleMode.Release;\n}\n\nexport interface SettleOptions {\n /** Properties a runtime never writes inline — the canvas never a transform (one inside the scaled page breaks Lenis). */\n readonly skip?: ReadonlySet<string>;\n}\n\n/** Every CSS property a run's frames touch. */\nfunction framePropertyNames(frames: ReadonlyArray<InteractionKeyframe> | null | undefined): string[] {\n const names = new Set<string>();\n for (const frame of frames ?? []) for (const key of Object.keys(frame)) names.add(keyframePropertyName(key));\n return [...names];\n}\n\n/**\n * Leave `el` as a run that has ended — or one that never plays, under reduced motion — should (`SettleMode`). The\n * frame is written (Hold) or released (Release) BEFORE `anim` is cancelled, so nothing flashes between the two.\n */\nexport function settleInteraction(\n el: HTMLElement,\n frames: ReadonlyArray<InteractionKeyframe> | null | undefined,\n mode: SettleMode,\n options: SettleOptions = {},\n anim?: Animation | null,\n): void {\n if (mode === SettleMode.Hold) {\n for (const [prop, value] of keyframeStyleEntries(finalKeyframe(frames))) {\n if (!options.skip?.has(prop)) el.style.setProperty(prop, value);\n }\n } else {\n for (const prop of framePropertyNames(frames)) el.style.removeProperty(prop);\n }\n anim?.cancel();\n}\n\n/** The keyframe properties an Animation animates (camelCase, as `getKeyframes` names them). */\nfunction animatedKeys(anim: Animation): string[] {\n const keyframes = (anim.effect as KeyframeEffect | null)?.getKeyframes?.() ?? [];\n const skip = new Set(['offset', 'computedOffset', 'easing', 'composite']);\n return keyframes.flatMap(k => Object.keys(k).filter(key => !skip.has(key)));\n}\n\n/**\n * Interrupt (Emil 52/59/62): the interaction runs in flight on `el` over the same properties are stopped — never\n * stacked — and the new run starts from what the element shows NOW (its presentation value), not from frame 0: a\n * hover-out halfway through the hover-in turns back from where it is, a re-trigger continues. Untouched when\n * nothing is running (the run starts from its own first frame, as before).\n */\nexport function framesFromLiveValue(el: HTMLElement, frames: ReadonlyArray<InteractionKeyframe>): InteractionKeyframe[] {\n const first = frames[0];\n if (!first) return [...frames];\n const keys = new Set(Object.keys(first));\n const running = (el.getAnimations?.() ?? [])\n .filter(a => a.id === INTERACTION_ANIMATION_ID && animatedKeys(a).some(k => keys.has(k)));\n if (!running.length) return [...frames];\n const style = el.ownerDocument?.defaultView?.getComputedStyle(el);\n const live: Record<string, string | number> = { ...first };\n for (const key of keys) {\n const value = style?.getPropertyValue(keyframePropertyName(key));\n if (value) live[key] = value;\n }\n for (const anim of running) anim.cancel();\n return [live, ...frames.slice(1)];\n}\n\n/**\n * Play an element action and settle it when it ends — THE call both runtimes make for an animated action: it starts\n * from the live value (`framesFromLiveValue`, inside `animateAction`) and ends by the ONE settle rule. A run that is\n * interrupted is never settled: the run that interrupted it owns the element now.\n */\nexport function playInteraction(\n el: HTMLElement,\n action: { type: string; params?: Readonly<Record<string, unknown>> | null },\n frames: ReadonlyArray<InteractionKeyframe>,\n timing: KeyframeAnimationOptions,\n options: AnimateActionOptions & SettleOptions = {},\n): Animation {\n const anim = animateAction(el, action, frames, { fill: 'both', ...timing }, { reverse: options.reverse });\n const mode = settleModeFor(action.type, options.reverse);\n anim.finished?.then(() => settleInteraction(el, frames, mode, options, anim)).catch(() => { /* interrupted */ });\n return anim;\n}\n\n/**\n * Start an element action's animation: THE call both runtimes make. Most actions are one `element.animate`; a text\n * reveal plays its pieces and a clip reveal opens from the side the page's direction makes of Start and End, then takes\n * its clip away so a resting element never crops its own shadow. Each still comes back as one Animation.\n */\nexport function animateAction(\n el: HTMLElement,\n action: { type: string; params?: Readonly<Record<string, unknown>> | null },\n frames: ReadonlyArray<InteractionKeyframe>,\n timing: KeyframeAnimationOptions,\n options: AnimateActionOptions = {},\n): Animation {\n if (action.type === RevealActionType.Text && !options.reverse) {\n const by = action.params?.['by'] === TextRevealBy.Word ? TextRevealBy.Word : TextRevealBy.Line;\n const reveal = playTextReveal(el, by, timing);\n if (reveal) return reveal;\n }\n if (action.type !== RevealActionType.Clip) return tagged(el.animate(framesFromLiveValue(el, frames) as Keyframe[], timing));\n const rtl = INLINE_FROMS.has(revealFromOf(action.params)) && el.ownerDocument.defaultView?.getComputedStyle(el).direction === 'rtl';\n const mirrored = rtl ? clipFrames(action.params, -1) : frames;\n const played = rtl && options.reverse ? [...mirrored].reverse() : mirrored;\n const anim = tagged(el.animate(framesFromLiveValue(el, played) as Keyframe[], timing));\n if (!options.reverse) anim.addEventListener('finish', () => anim.cancel(), { once: true });\n return anim;\n}\n\nfunction tagged(anim: Animation): Animation {\n try { anim.id = INTERACTION_ANIMATION_ID; } catch { /* a stub without an id */ }\n return anim;\n}\n\n/** `translateX` → `translate-x`, `opacity` → `opacity`: the CSS property name of a keyframe key. */\nexport function keyframePropertyName(key: string): string {\n return key.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\n\n/** A keyframe as `[css-property, value]` pairs — what a runtime writes inline. */\nexport function keyframeStyleEntries(frame: InteractionKeyframe | null | undefined): Array<[string, string]> {\n return Object.entries(frame ?? {}).map(([k, v]) => [keyframePropertyName(k), String(v)]);\n}\n\n/**\n * The inline pre-state an ENTRANCE action puts on its element before it plays — its first frame as\n * CSS — so the server render ships it already hidden (no visible→hidden flash). `{}` for anything else.\n */\nexport function entrancePreStateStyle(type: string, params?: Readonly<Record<string, unknown>> | null): Record<string, string> {\n if (!ENTRANCE_ACTION_TYPES.has(type)) return {};\n // Hidden by opacity until it plays: a fully clipped element does not intersect anything, so its first frame as a\n // pre-state would mean \"Enter viewport\" never fires and it stays hidden for good.\n if (type === RevealActionType.Clip) return { opacity: '0' };\n return Object.fromEntries(keyframeStyleEntries(buildInteractionKeyframes(type, params)?.[0]));\n}\n\n/** Triggers that play an entrance by themselves — the page loading or arriving, the element scrolling into view. */\nexport const SELF_PLAYING_TRIGGERS: ReadonlySet<string> = new Set(['pageLoad', 'pageEnter', 'viewportEnter']);\n\n/**\n * Whether an entrance on `trigger` starts hidden (its pre-state). Always — a menu revealed by a click must stay hidden\n * until the click — except a self-playing one under reduced motion: it would only ever reveal what is already there,\n * so it starts shown and never moves (M1-6b: \"nothing moves and nothing stays hidden\"). Both runtimes ask this.\n */\nexport function entranceStartsHidden(trigger: string, reducedMotion: boolean = !motionAllowed()): boolean {\n return !(reducedMotion && SELF_PLAYING_TRIGGERS.has(trigger));\n}\n\n/** The attribute a SERVER render puts on an element it ships in its entrance's first frame (`entrancePreStateStyle`).\n * The live runtime takes the element over — and drops the attribute — when it attaches; until then the fallback CSS\n * below reads it. */\nexport const ENTRANCE_PRESTATE_ATTRIBUTE = 'data-iox-enter';\n\nconst SHOWN_NOW = 'opacity:1!important;transform:none!important;clip-path:none!important;visibility:visible!important;pointer-events:auto!important';\n\n/**\n * What keeps a server-rendered entrance from hiding content where nothing will play it (AI plan §5 \"Entrances that hide\n * content\"; M1-6b): under reduced motion every pre-stated element is shown at once, before any script; and if the\n * runtime never takes an element over (a script that failed), it is revealed after a few seconds. One stylesheet for\n * the engine's head — `ENTRANCE_NOSCRIPT_CSS` covers a visitor with no script at all.\n */\nexport const ENTRANCE_FALLBACK_CSS =\n `[${ENTRANCE_PRESTATE_ATTRIBUTE}]{animation:iox-enter-safety 1ms linear 6s forwards}` +\n `@keyframes iox-enter-safety{to{opacity:1;transform:none;clip-path:none;visibility:visible;pointer-events:auto}}` +\n `@media (prefers-reduced-motion: reduce){[${ENTRANCE_PRESTATE_ATTRIBUTE}]{${SHOWN_NOW};animation:none!important}}`;\n\n/** The same, for a visitor with no script: every pre-stated element shown at once (served inside `<noscript>`). */\nexport const ENTRANCE_NOSCRIPT_CSS = `[${ENTRANCE_PRESTATE_ATTRIBUTE}]{${SHOWN_NOW};animation:none!important}`;\n\nconst FULLY_SHOWN_CLIP = /^inset\\((0%?\\s*)+\\)$/;\n\n/**\n * The frame an animation comes to rest on (what reduced motion applies at once). A clip that has fully opened rests as\n * no clip at all: `inset(0)` would still crop the element's shadow and stack it, for the rest of the visit.\n */\nexport function finalKeyframe(frames: ReadonlyArray<InteractionKeyframe> | null | undefined): InteractionKeyframe | null {\n if (!frames?.length) return null;\n const last = frames[frames.length - 1];\n return typeof last['clipPath'] === 'string' && FULLY_SHOWN_CLIP.test(last['clipPath']) ? { ...last, clipPath: 'none' } : last;\n}\n","/**\n * What an interaction's easing may be (G6, decision D8): one of the five CSS keywords, a `cubic-bezier()`, or the\n * NAME of one of the look's easing tokens — so an author's entrance moves on the same curve as the site's buttons and\n * dialogs (Emil 21: one token system), and Spring plays the look's spring (a `linear()` curve, `springToLinear`).\n * Both runtimes resolve it the same way, through the CSS custom property on the element itself.\n */\n\nexport enum EasingKeyword {\n Linear = 'linear',\n Ease = 'ease',\n EaseIn = 'ease-in',\n EaseOut = 'ease-out',\n EaseInOut = 'ease-in-out',\n}\n\n/** The look's easing tokens an interaction may name (their `--iox-<name>` holds the curve). */\nexport enum EasingToken {\n Standard = 'ease-standard',\n Enter = 'ease-enter',\n Exit = 'ease-exit',\n Spring = 'ease-spring',\n}\n\nexport const EASING_KEYWORDS: ReadonlyArray<string> = Object.values(EasingKeyword);\nexport const EASING_TOKENS: ReadonlyArray<string> = Object.values(EasingToken);\n\n/** What an unknown or unresolvable easing plays as: a deceleration, never ease-in (Emil 17). */\nexport const DEFAULT_INTERACTION_EASING = EasingKeyword.EaseOut;\n\nconst NUMBER = '\\\\s*(-?\\\\d*\\\\.?\\\\d+)\\\\s*';\nconst CUBIC_BEZIER = new RegExp(`^cubic-bezier\\\\(${NUMBER},${NUMBER},${NUMBER},${NUMBER}\\\\)$`);\n\n/** A well-formed `cubic-bezier(x1, y1, x2, y2)` whose x values sit in [0, 1] (what CSS and WAAPI accept). */\nexport function isCubicBezier(value: unknown): boolean {\n const m = CUBIC_BEZIER.exec(String(value ?? '').trim());\n if (!m) return false;\n const [x1, , x2] = [Number(m[1]), Number(m[2]), Number(m[3])];\n return x1 >= 0 && x1 <= 1 && x2 >= 0 && x2 <= 1;\n}\n\nexport function isEasingToken(value: unknown): value is EasingToken {\n return EASING_TOKENS.includes(String(value ?? ''));\n}\n\n/** True for anything an interaction may store as its easing. */\nexport function isInteractionEasing(value: unknown): boolean {\n return EASING_KEYWORDS.includes(String(value ?? '')) || isEasingToken(value) || isCubicBezier(value);\n}\n\n/** Anything that reads a computed custom property (an element in a document; a stub in a spec). */\ninterface StyledElement {\n ownerDocument?: { defaultView?: { getComputedStyle(el: unknown): { getPropertyValue(name: string): string } } | null } | null;\n}\n\n/** A token's value is a timing function WAAPI plays: a keyword, a cubic-bezier, or a `linear()` / `steps()` curve (the\n * spring's). Read by shape, so it answers alike in every browser, on the server and in a spec. */\nconst TIMING_FUNCTION = /^(linear|steps)\\(.+\\)$/;\nfunction supportedEasing(value: string): boolean {\n return EASING_KEYWORDS.includes(value) || isCubicBezier(value) || TIMING_FUNCTION.test(value);\n}\n\n/**\n * The timing function WAAPI plays for `easing` on `el`: a keyword or a curve as stored; a token name → the token's\n * value as the element sees it (`--iox-ease-spring` → its `linear()`), so a section scheme or the canvas's token scope\n * applies; anything else, or a token the element cannot resolve → `fallback`.\n */\nexport function resolveInteractionEasing(easing: unknown, el?: StyledElement | null, fallback: string = DEFAULT_INTERACTION_EASING): string {\n const value = String(easing ?? '').trim();\n if (EASING_KEYWORDS.includes(value) || isCubicBezier(value)) return value;\n if (!isEasingToken(value)) return fallback;\n const resolved = el?.ownerDocument?.defaultView?.getComputedStyle(el).getPropertyValue(`--iox-${value}`)?.trim();\n return resolved && supportedEasing(resolved) ? resolved : fallback;\n}\n","/**\n * When a pointer event should move something (G7 — Emil 85/86/91, mobile-native M1/M5). Both runtimes ask here.\n *\n * · A hover trigger answers a mouse or a pen only: a finger has no hover, and a tap's emulated mouseenter left the\n * hover state on until the next tap elsewhere.\n * · Press feedback lands on pointer-DOWN, at once — the click (pointer-up) commits. Only an action that is pure\n * feedback moves early: an animation of the pressed element itself that hides nothing and shows nothing. Opening,\n * closing, navigating and toggling stay on the click, so dragging away still cancels them. A keyboard press (Enter,\n * Space) has no pointer-down, so it never animates (Emil 2).\n */\n\nimport { buildInteractionKeyframes, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, VisibilityActionType } from './interaction-keyframes';\n\nexport enum PointerKind {\n Mouse = 'mouse',\n Pen = 'pen',\n Touch = 'touch',\n}\n\nconst HOVERING_POINTERS: ReadonlySet<string> = new Set([PointerKind.Mouse, PointerKind.Pen]);\n\n/** True for a pointer that really hovers — a mouse or a pen, never a finger. An event with no pointer type (a synthetic\n * `mouseenter`) counts as a mouse. */\nexport function isHoverPointer(event: { pointerType?: string | null } | null | undefined): boolean {\n const kind = event?.pointerType;\n return !kind || HOVERING_POINTERS.has(kind);\n}\n\n/** The minimal action shape this reads. */\nexport interface PressAction {\n type: string;\n target?: string;\n disabled?: boolean;\n params?: Readonly<Record<string, unknown>> | null;\n}\n\n/** True for an action that is press FEEDBACK: it animates the pressed element itself and neither hides nor shows it. */\nexport function isPressFeedback(action: PressAction | null | undefined): boolean {\n if (!action || action.disabled) return false;\n if (action.target && action.target !== 'self') return false;\n if (ENTRANCE_ACTION_TYPES.has(action.type) || EXIT_ACTION_TYPES.has(action.type) || action.type === VisibilityActionType.Toggle) return false;\n return !!buildInteractionKeyframes(action.type, action.params);\n}\n\n/** A click interaction's actions split by when they run: the feedback on pointer-down, the rest on the click. */\nexport function splitPressFeedback<T extends PressAction>(actions: ReadonlyArray<T> | null | undefined): { onPress: T[]; onClick: T[] } {\n const onPress: T[] = [];\n const onClick: T[] = [];\n for (const action of actions ?? []) (isPressFeedback(action) ? onPress : onClick).push(action);\n return { onPress, onClick };\n}\n","import { SCROLLED_ATTRIBUTE } from '../style-compiler/style-compiler';\n\n/** How far the page has to move before it counts as scrolled — past a trackpad's rest jitter. */\nexport const SCROLLED_THRESHOLD_PX = 8;\n\n/** True once `offset` has passed the threshold. */\nexport function isScrolled(offset: number, threshold = SCROLLED_THRESHOLD_PX): boolean {\n return Number.isFinite(offset) && offset > threshold;\n}\n\n/** Anything that scrolls: a window (`scrollY`) or an element (`scrollTop`). */\nexport interface ScrollSource {\n addEventListener(type: 'scroll', fn: () => void, options?: AddEventListenerOptions): void;\n removeEventListener(type: 'scroll', fn: () => void): void;\n scrollY?: number;\n scrollTop?: number;\n}\n\n/**\n * Keep `SCROLLED_ATTRIBUTE` on `target` while `source` has scrolled past the threshold — what the Scrolled state (G4)\n * compiles against, on the live site (the window → the document element) and on the canvas (its scroller → the page).\n * One passive listener, read once per frame, written only when it changes. Returns the stop.\n */\nexport function watchScrolled(source: ScrollSource, target: Element, threshold = SCROLLED_THRESHOLD_PX): () => void {\n let frame = 0;\n const raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : (fn: FrameRequestCallback) => setTimeout(() => fn(0), 16) as unknown as number;\n const caf = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : (id: number) => clearTimeout(id);\n const sync = () => {\n frame = 0;\n const scrolled = isScrolled(source.scrollY ?? source.scrollTop ?? 0, threshold);\n if (scrolled !== target.hasAttribute(SCROLLED_ATTRIBUTE)) target.toggleAttribute(SCROLLED_ATTRIBUTE, scrolled);\n };\n const onScroll = () => { if (!frame) frame = raf(sync); };\n source.addEventListener('scroll', onScroll, { passive: true });\n sync();\n return () => {\n source.removeEventListener('scroll', onScroll);\n if (frame) caf(frame);\n target.removeAttribute(SCROLLED_ATTRIBUTE);\n };\n}\n","/**\n * page-style — the ONE compiler that turns a page's style settings into CSS.\n *\n * A page's background / typography is authored once (builder Page panel) and has to render\n * in BOTH renderers: the builder canvas frame and the SSR engine's `<body>`. Before this\n * existed the engine applied it with hand-written `body.style.x = …` assignments buried in\n * the FONT LOADER, and the builder applied nothing at all — so every background an author\n * set was invisible until the site was published. See\n * iox-ai-guidance `architecture/builder/render-parity.md`.\n *\n * Pure and transport-agnostic on purpose: it returns CSS declarations and nothing else.\n * Each consumer applies them its own way (engine → `document.body`, builder → the canvas\n * viewport element). Kebab-case keys so the result works with both `el.style.setProperty`\n * and Angular's `[ngStyle]`.\n */\n\n/** The page-level style bundle, persisted as `page.pageSettings.style`. */\nexport interface PageStyleSettings {\n backgroundColor: string;\n backgroundType: 'solid' | 'gradient' | 'image';\n backgroundGradient: string;\n backgroundImage: string;\n fontFamily: string;\n textColor: string;\n /**\n * Content max-width. Deliberately NOT compiled: it is a constraint on the page's\n * content column, not a property of the page surface, and there is no agreed element\n * to hang it on in either renderer. Stored and edited today, applied by nobody —\n * emitting it onto the page surface here would silently clamp whole layouts.\n */\n maxWidth: string;\n}\n\n/** Background fallback when a gradient/image type is selected but its value is empty. */\nconst EMPTY_BACKGROUND = '#fff';\n\nexport interface PageStyleOptions {\n /**\n * `pageSettings.designSystem` (design-system DS3). A page created with the design system — or\n * adopted into it (DS7) — falls back to the org's tokens for whatever it does not set itself:\n * `background: var(--iox-page-bg)` (a PAINT — Glass and Midnight are gradients, so the shorthand),\n * `color: var(--iox-text)`, `font-family: var(--iox-font-body)`. A page without the flag (every\n * page saved before DS3) compiles exactly as before, so a seeded org never puts a new ground under\n * legacy text — the page follows the same opt-in rule as the element-style marker (§3b-bis).\n */\n designSystem?: boolean;\n}\n\n/** The three page-style fields a design-system page can inherit from the look. */\nexport enum PageStyleField {\n Background = 'background',\n TextColor = 'textColor',\n FontFamily = 'fontFamily',\n}\n\n/** Where a page-style field's value comes from. */\nexport enum PageStyleSource {\n /** The page sets it itself. */\n Own = 'own',\n /** A design-system page that sets nothing wears the look's token. */\n Look = 'look',\n /** A page without the flag that sets nothing: the consumer's own default shows through. */\n Unset = 'unset',\n}\n\n/** The token a design-system page falls back to, per field (spec tokens only). */\nexport const PAGE_STYLE_TOKENS: Readonly<Record<PageStyleField, string>> = {\n [PageStyleField.Background]: 'page-bg',\n [PageStyleField.TextColor]: 'text',\n [PageStyleField.FontFamily]: 'font-body',\n};\n\n/** The CSS property each field compiles to when it falls back (`page-bg` is a PAINT, so the shorthand). */\nconst FIELD_CSS_KEY: Readonly<Record<PageStyleField, string>> = {\n [PageStyleField.Background]: 'background',\n [PageStyleField.TextColor]: 'color',\n [PageStyleField.FontFamily]: 'font-family',\n};\n\nconst tokenVar = (name: string): string => `var(--iox-${name})`;\n\n/** The token fallbacks of a design-system page, as CSS declarations. */\nexport const PAGE_TOKEN_FALLBACKS: Readonly<Record<string, string>> = Object.fromEntries(\n Object.values(PageStyleField).map(f => [FIELD_CSS_KEY[f], tokenVar(PAGE_STYLE_TOKENS[f])]),\n);\n\n/** What each field clears to when it goes back to the look — '' (never a copied literal), so it keeps\n * following every future look. Background clears its image and gradient with it: they are one ground. */\nconst FIELD_RESET: Readonly<Record<PageStyleField, Partial<PageStyleSettings>>> = {\n [PageStyleField.Background]: { backgroundColor: '', backgroundGradient: '', backgroundImage: '', backgroundType: 'solid' },\n [PageStyleField.TextColor]: { textColor: '' },\n [PageStyleField.FontFamily]: { fontFamily: '' },\n};\n\nconst BACKGROUND_KEYS = ['background', 'background-color'];\n\n/** The keys a field's OWN value compiles to — background has two (a flat colour, or a paint). */\nconst FIELD_OWN_KEYS: Readonly<Record<PageStyleField, ReadonlyArray<string>>> = {\n [PageStyleField.Background]: BACKGROUND_KEYS,\n [PageStyleField.TextColor]: ['color'],\n [PageStyleField.FontFamily]: ['font-family'],\n};\n\n/** One field as a panel shows it: where its value comes from and, when it is the look's, which token. */\nexport interface PageStyleFieldState {\n field: PageStyleField;\n source: PageStyleSource;\n /** The token the field falls back to — set only when `source` is `Look`. */\n token: string | null;\n}\n\n/**\n * Where each page-style field comes from — decided by the SAME compile the renderers run, so the\n * Page panel can never say \"from the look\" for a field the canvas paints from the page, or the other\n * way round. A flagged page's empty field is the look's token; an unflagged page's is `Unset`.\n */\nexport function describePageStyle(\n style: Partial<PageStyleSettings> | null | undefined,\n options: PageStyleOptions = {},\n): Record<PageStyleField, PageStyleFieldState> {\n const own = compileOwnStyle(style);\n const describe = (field: PageStyleField): PageStyleFieldState => {\n if (FIELD_OWN_KEYS[field].some(k => k in own)) return { field, source: PageStyleSource.Own, token: null };\n return options.designSystem\n ? { field, source: PageStyleSource.Look, token: PAGE_STYLE_TOKENS[field] }\n : { field, source: PageStyleSource.Unset, token: null };\n };\n return {\n [PageStyleField.Background]: describe(PageStyleField.Background),\n [PageStyleField.TextColor]: describe(PageStyleField.TextColor),\n [PageStyleField.FontFamily]: describe(PageStyleField.FontFamily),\n };\n}\n\n/** The style with one field handed back to the look: cleared to '', every other key kept. */\nexport function resetPageStyleField<T extends Partial<PageStyleSettings>>(style: T | null | undefined, field: PageStyleField): T {\n return { ...(style ?? {}), ...FIELD_RESET[field] } as T;\n}\n\n/**\n * Compile page style settings into CSS declarations.\n *\n * Only keys the author actually set are emitted, so a consumer's own default (the builder's\n * white canvas, the engine's stylesheet) shows through untouched when a page says nothing.\n *\n * `backgroundType` selects which background field wins — it is derived from the author's\n * colour/image choice rather than picked directly (see the builder's page-background.util).\n */\nexport function compilePageStyle(\n style: Partial<PageStyleSettings> | null | undefined,\n options: PageStyleOptions = {},\n): Record<string, string> {\n const css = compileOwnStyle(style);\n if (!options.designSystem) return css;\n for (const field of Object.values(PageStyleField)) {\n if (!FIELD_OWN_KEYS[field].some(k => k in css)) css[FIELD_CSS_KEY[field]] = tokenVar(PAGE_STYLE_TOKENS[field]);\n }\n return css;\n}\n\n/** A value only the `background` shorthand can carry: a `var()` (which may hold a gradient) or a gradient. */\nfunction isPaint(value: string): boolean {\n return /var\\(|gradient\\(/i.test(value);\n}\n\n/** What the page itself sets — the only thing a page without the design-system flag compiles to. */\nfunction compileOwnStyle(style: Partial<PageStyleSettings> | null | undefined): Record<string, string> {\n if (!style) return {};\n const css: Record<string, string> = {};\n\n if (style.fontFamily) css['font-family'] = style.fontFamily;\n if (style.textColor) css['color'] = style.textColor;\n\n switch (style.backgroundType) {\n case 'gradient':\n css['background'] = style.backgroundGradient || EMPTY_BACKGROUND;\n break;\n case 'image':\n css['background'] = style.backgroundImage\n ? `url(${style.backgroundImage}) center/cover no-repeat`\n : EMPTY_BACKGROUND;\n break;\n default:\n // 'solid' and legacy pages with no type at all. A token reference or a gradient is a\n // PAINT (page-bg is a gradient stack in Glass and Midnight): `background-color` would be\n // invalid at computed-value time and the page would lose its ground.\n if (style.backgroundColor) css[isPaint(style.backgroundColor) ? 'background' : 'background-color'] = style.backgroundColor;\n break;\n }\n\n return css;\n}\n","/**\n * Binding pipes — render-time value transforms (UI label: \"Filters\").\n *\n * A binding resolves a raw value (`resolvePath(sourceData, path)`); a pipe chain then reshapes it for\n * display (format a timestamp, upper-case, truncate, …). This is the SINGLE shared implementation used\n * by BOTH the builder canvas and the SSR engine — the engine renders layout JSON to a STRING and can't\n * use Angular pipes, and `resolvePath` is already duplicated across the apply points, so the transform\n * MUST be one pure, transport-agnostic function applied identically everywhere. Never fork it.\n *\n * See iox-ai-guidance/architecture/builder/binding-filters-plan.md.\n */\n\n/** One transform in a binding's chain. `args` are positional, matching the pipe's descriptor order. */\nexport interface IoxPipe {\n name: string;\n args?: any[];\n}\n\n/** Runtime context threaded to every pipe — the locale keeps date/number output identical on the\n * builder canvas and the SSR engine (both pass the site's language). */\nexport interface PipeContext {\n locale?: string;\n}\n\ntype PipeFn = (value: any, args: any[], ctx: PipeContext) => any;\n\n// ── Date / time (Intl locale presets — locale-aware, zero-dep, browser + Node identical) ──────────\nconst DATE_PRESETS: Record<string, Intl.DateTimeFormatOptions> = {\n short: { dateStyle: 'short' },\n medium: { dateStyle: 'medium' },\n long: { dateStyle: 'long' },\n full: { dateStyle: 'full' },\n};\nconst DATETIME_PRESETS: Record<string, Intl.DateTimeFormatOptions> = {\n short: { dateStyle: 'short', timeStyle: 'short' },\n medium: { dateStyle: 'medium', timeStyle: 'short' },\n long: { dateStyle: 'long', timeStyle: 'medium' },\n full: { dateStyle: 'full', timeStyle: 'long' },\n};\n\n/** Coerce an ISO string / epoch number / Date to a valid Date, or null (→ pipes pass the value through). */\nfunction toDate(value: any): Date | null {\n if (value instanceof Date) return isNaN(value.getTime()) ? null : value;\n if (typeof value === 'number') { const d = new Date(value); return isNaN(d.getTime()) ? null : d; }\n if (typeof value === 'string' && value.trim() !== '') { const d = new Date(value); return isNaN(d.getTime()) ? null : d; }\n return null;\n}\n\nfunction formatDate(value: any, args: any[], ctx: PipeContext, presets: Record<string, Intl.DateTimeFormatOptions>): any {\n const d = toDate(value);\n if (!d) return value; // never throw — unparseable input passes through unchanged\n const preset = (args[0] as string) || 'medium';\n return new Intl.DateTimeFormat(ctx.locale, presets[preset] ?? presets['medium']).format(d);\n}\n\n/** The registry — adding a pipe here (+ a descriptor below) makes it work on both sides and appear in\n * the authoring UI. Keyed by name; unknown names are passed through by `applyBindingPipes`. */\nexport const PIPE_REGISTRY: Record<string, PipeFn> = {\n date: (v, args, ctx) => formatDate(v, args, ctx, DATE_PRESETS),\n datetime: (v, args, ctx) => formatDate(v, args, ctx, DATETIME_PRESETS),\n uppercase: (v) => (v == null ? v : String(v).toUpperCase()),\n lowercase: (v) => (v == null ? v : String(v).toLowerCase()),\n truncate: (v, args) => {\n if (v == null) return v;\n const s = String(v);\n const len = Number(args[0]) || 100;\n const suffix = args[1] != null ? String(args[1]) : '…';\n return s.length > len ? s.slice(0, len) + suffix : s;\n },\n number: (v, args, ctx) => {\n const n = typeof v === 'number' ? v : parseFloat(v);\n if (!Number.isFinite(n)) return v;\n const opts: Intl.NumberFormatOptions = {};\n if (args[0] != null && args[0] !== '') { opts.minimumFractionDigits = Number(args[0]); opts.maximumFractionDigits = Number(args[0]); }\n return new Intl.NumberFormat(ctx.locale, opts).format(n);\n },\n};\n\n/**\n * Apply a binding's pipe chain to a resolved value, LEFT→RIGHT. Pure. An empty/undefined chain returns\n * the value untouched; an unknown pipe name is skipped (forward-compatible with newer authored pipes).\n * Call this at every binding-resolution point (builder canvas + engine SSR + engine hydration).\n */\nexport function applyBindingPipes(value: any, pipes?: IoxPipe[], ctx: PipeContext = {}): any {\n if (!pipes?.length) return value;\n return pipes.reduce((v, p) => {\n const fn = p && PIPE_REGISTRY[p.name];\n return fn ? fn(v, p.args ?? [], ctx) : v;\n }, value);\n}\n\n// ── Descriptors — metadata that DATA-DRIVES the authoring UI (no if-chains per control). ───────────\nexport interface PipeArgSpec {\n /** Positional key (order defines the `args` index). */\n key: string;\n /** Default English label; consumers may map `name`/`key` to their own i18n keys. */\n label: string;\n control: 'select' | 'text' | 'number';\n options?: { label: string; value: any }[];\n default?: any;\n}\nexport interface PipeDescriptor {\n name: string;\n label: string;\n args: PipeArgSpec[];\n}\n\nconst PRESET_OPTIONS = [\n { label: 'Short', value: 'short' },\n { label: 'Medium', value: 'medium' },\n { label: 'Long', value: 'long' },\n { label: 'Full', value: 'full' },\n];\n\nexport const PIPE_DESCRIPTORS: PipeDescriptor[] = [\n { name: 'date', label: 'Date', args: [{ key: 'preset', label: 'Format', control: 'select', options: PRESET_OPTIONS, default: 'medium' }] },\n { name: 'datetime', label: 'Date & time', args: [{ key: 'preset', label: 'Format', control: 'select', options: PRESET_OPTIONS, default: 'medium' }] },\n { name: 'uppercase', label: 'UPPERCASE', args: [] },\n { name: 'lowercase', label: 'lowercase', args: [] },\n { name: 'truncate', label: 'Truncate', args: [{ key: 'length', label: 'Max length', control: 'number', default: 100 }] },\n { name: 'number', label: 'Number', args: [{ key: 'decimals', label: 'Decimals', control: 'number', default: null }] },\n];\n","import { ComponentRef, Type, reflectComponentType } from '@angular/core';\n\n/**\n * Declared-input reflection + safe input application, shared by every dynamic renderer\n * (builder `RenderDirective`, builder bindings panel, SSR `ClientTreeRendererService`).\n *\n * WHY THIS EXISTS: `ComponentRef.setInput(name, value)` for an input the component does NOT\n * declare does **not throw** — in dev mode it calls `reportUnknownPropertyError`, which\n * `console.error`s `NG0303: Can't set value of the '<name>' input ...` and returns without\n * setting anything. A `try/catch` around `setInput` is therefore dead code (nothing is thrown)\n * AND the value is silently dropped. On every (re-)render — drag, duplicate, save-triggered\n * re-render, repeater/slider clones — that spams the console and skips the write.\n *\n * The fix is to reflect the component's declared inputs ONCE (cached) and only `setInput` names\n * that exist; anything else is assigned directly on the instance (harmless for consumers that\n * read the raw property, e.g. a `sourcePath`/`source` binding pushed to a SliderContainer).\n */\n\n/** Per-component-class cache of declared public input names (templateName / alias). */\nconst inputNameCache = new WeakMap<Type<unknown>, Set<string>>();\n\n/**\n * The public input names (`@Input()` / `input()` / `model()`, honouring aliases) a component\n * class declares. Cached per class — `reflectComponentType` is not free. Returns an empty set\n * for a class Angular can't reflect (e.g. a non-component).\n */\nexport function declaredInputNames(type: Type<unknown>): Set<string> {\n let names = inputNameCache.get(type);\n if (!names) {\n const mirror = reflectComponentType(type);\n names = new Set((mirror?.inputs ?? []).map(i => i.templateName));\n inputNameCache.set(type, names);\n }\n return names;\n}\n\n/**\n * Set `name` on `ref` as an Angular input **only** when the component declares it (so change\n * detection + signal inputs work); otherwise assign directly on the instance and mark it for\n * check. Never produces an NG0303 error and never silently drops the value. Returns `true` if\n * it was applied as a real input, `false` if it fell back to direct assignment.\n */\nexport function safeSetInput(ref: ComponentRef<unknown>, name: string, value: unknown): boolean {\n if (declaredInputNames(ref.componentType).has(name)) {\n ref.setInput(name, value);\n return true;\n }\n (ref.instance as Record<string, unknown>)[name] = value;\n ref.changeDetectorRef.markForCheck();\n return false;\n}\n","/**\n * THE binding path resolver — one implementation, shared by every renderer.\n *\n * Resolves a dot-notation path with optional array brackets against a data object:\n * `title`, `author.name`, `tags[0]`, `items[2].title`.\n *\n * This lived in three places before (iox-builder's binding-path.util, the engine's string\n * renderer, and the engine's component renderer) and had already drifted: the component-renderer\n * copy was missing the `$` case below, so a repeater over a primitive array rendered in the SSR\n * HTML and then blanked on hydration. See render-parity.md.\n */\nexport function resolvePath(obj: any, path: string): any {\n // Empty path (or `$`) means \"the value itself\" — used to bind to an item that IS a primitive\n // (e.g. a Repeater over `gallery: string[]`, where each item is the URL string). See\n // binding-panel-redesign-plan.md.\n if (path === '' || path === '$' || path == null) return obj;\n return path.split('.').reduce((current, key) => {\n if (current == null) return undefined;\n const bracketMatch = key.match(/^(\\w+)\\[(\\d+)]$/);\n if (bracketMatch) {\n const arr = current[bracketMatch[1]];\n return Array.isArray(arr) ? arr[parseInt(bracketMatch[2], 10)] : undefined;\n }\n return current[key];\n }, obj);\n}\n","import { IoxPipe, PipeContext, applyBindingPipes } from '../binding-pipes';\nimport { resolvePath } from './resolve-path';\n\n/** The part of an `IoxBinding` that turns source data into a value. */\nexport interface BoundValueSpec {\n /** Dot/bracket path into the source data. Empty or absent means the source value itself. */\n path?: string;\n /** Render-time transforms (UI label \"Filters\"), applied after the path lookup. */\n pipes?: IoxPipe[];\n}\n\n/**\n * Resolve one binding's value out of its already-selected source data: path lookup, then pipes.\n *\n * Trivial on its own, which is exactly why it had been retyped at three call sites — the engine's\n * string renderer, the engine's component renderer and the builder canvas — plus a fourth needed by\n * page SEO. `resolvePath` itself was forked five times before it was shared, and the copy that\n * drifted caused a repeater to render in the SSR HTML and then blank on hydration.\n *\n * What is NOT here: picking the source (`resolvedData[binding.source]`) and deciding what an empty\n * context slot means. Those are per-renderer policy — the string renderer clears the prop, the\n * builder skips it — so they stay with the caller.\n */\nexport function resolveBoundValue(sourceData: unknown, binding: BoundValueSpec, ctx: PipeContext = {}): unknown {\n const raw = binding.path ? resolvePath(sourceData, binding.path) : sourceData;\n return applyBindingPipes(raw, binding.pipes, ctx);\n}\n","/**\n * The canonical shape of a page's SEO metadata, plus the flat tag list both renderers emit.\n *\n * ⚠️ This file is the ONLY declaration of that shape. Before it existed, `iox-cms` stored\n * `seo.og.title` while the SSR engine read a flat `seo.ogTitle`, so no Open Graph tag had ever been\n * emitted, and `iox-cms-client` carried a third, hand-copied variant of the same schema. See\n * iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\n/** Open Graph subset we author and emit. */\nexport interface SeoOg {\n title?: string;\n description?: string;\n image?: string;\n}\n\n/** Twitter-card subset. Emitted only when `card` is set — see `seoToTags`. */\nexport interface SeoTwitter {\n card?: string;\n title?: string;\n description?: string;\n image?: string;\n}\n\n/** Sitemap participation for this page. Consumed by the sitemap route (plan phase 3). */\nexport interface SeoSitemap {\n include?: boolean;\n priority?: number;\n changeFreq?: string;\n}\n\n/**\n * A page's stored SEO metadata, normalized.\n *\n * `keywords` has no authoring field — search engines have ignored the tag for over a decade — but\n * it is read and emitted when a document already carries one, because the engine used to read it.\n */\nexport interface SeoDoc {\n title?: string;\n description?: string;\n keywords?: string;\n canonicalUrl?: string;\n robots?: string;\n og?: SeoOg;\n twitter?: SeoTwitter;\n structuredData?: unknown;\n sitemap?: SeoSitemap;\n}\n\n/**\n * A binding on an SEO field. Structurally the resolvable part of an `IoxBinding` — `source` picks an\n * entry in the page's resolved data (`$current` on a template page), `path` walks into it, `pipes`\n * are the render-time transforms. Typed loosely because the pipe catalog lives in the main\n * `@vectoriox/iox-ui` entry point, which this framework-free one must not import.\n */\nexport interface SeoBinding {\n source: string;\n path?: string;\n pipes?: readonly unknown[];\n}\n\n/**\n * One SEO field as stored once it carries more than a typed string.\n *\n * The ladder is `override` → `binding` → auto; `auto: false` opts that field out of the automatic\n * value, leaving it genuinely empty. A bare `string` in a stored document means `{ override }`, so\n * nothing has to be migrated.\n */\nexport interface SeoFieldValue {\n override?: string;\n binding?: SeoBinding;\n auto?: false;\n}\n\n/** A stored SEO document, before resolution: any text field may be a plain string or a value object. */\nexport type SeoRawDoc = Record<string, unknown>;\n\n/**\n * The text fields that can carry a binding, as dotted paths into the document.\n *\n * One list, used by the resolver and (phase 2) by the panel that draws the bind affordance — so a\n * field can never be bindable in the UI and ignored at render time. `robots`, `sitemap.*` and\n * `structuredData` are deliberately absent: they are pick-lists and blobs, not prose.\n */\nexport const SEO_BINDABLE_FIELDS: readonly string[] = [\n 'title',\n 'description',\n 'canonicalUrl',\n 'og.title',\n 'og.description',\n 'og.image',\n 'twitter.title',\n 'twitter.description',\n 'twitter.image',\n];\n\n/** Where an automatic value comes from when a field has neither an override nor a binding. */\nexport type SeoAutoSource = 'contentTitle' | 'contentDescription' | 'contentImage' | 'pageUrl';\n\n/**\n * The bottom rung of the ladder, as a table rather than a chain of ifs.\n *\n * Deliberately short. `og:title` and `twitter:*` are NOT here — `seoToTags` already falls back to\n * the page title for them, and materialising a copy of a value we did not author would only make\n * later drift harder to see.\n */\nexport const SEO_AUTO_SOURCES: ReadonlyArray<{ field: string; source: SeoAutoSource }> = [\n { field: 'title', source: 'contentTitle' },\n { field: 'description', source: 'contentDescription' },\n { field: 'og.image', source: 'contentImage' },\n { field: 'canonicalUrl', source: 'pageUrl' },\n];\n\n/** `<title>`. */\nexport interface SeoTitleTag {\n kind: 'title';\n content: string;\n}\n\n/**\n * A `<meta>` tag. `attr` says which attribute identifies it — Open Graph is addressed by\n * `property`, everything else by `name`. Both renderers need that distinction to update rather\n * than duplicate a tag.\n */\nexport interface SeoMetaTag {\n kind: 'meta';\n attr: 'name' | 'property';\n key: string;\n content: string;\n}\n\n/** A `<link>`, currently only `rel=\"canonical\"`. */\nexport interface SeoLinkTag {\n kind: 'link';\n rel: string;\n href: string;\n}\n\nexport type SeoTag = SeoTitleTag | SeoMetaTag | SeoLinkTag;\n\n/** Context that lets `seoToTags` fill gaps without reaching for the DOM or a data source. */\nexport interface SeoTagContext {\n /** Used as `<title>` when the document has none — usually the page name. */\n fallbackTitle?: string;\n}\n\n/** Recommended maximum before search results truncate the title. */\nexport const SEO_TITLE_MAX = 60;\n\n/** Recommended maximum before search results truncate the description. */\nexport const SEO_DESCRIPTION_MAX = 160;\n\nexport const SEO_ROBOTS_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Index, Follow', value: 'index, follow' },\n { label: 'Index, No Follow', value: 'index, nofollow' },\n { label: 'No Index, Follow', value: 'noindex, follow' },\n { label: 'No Index, No Follow', value: 'noindex, nofollow' },\n];\n\nexport const SEO_TWITTER_CARD_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Summary', value: 'summary' },\n { label: 'Summary Large Image', value: 'summary_large_image' },\n { label: 'App', value: 'app' },\n { label: 'Player', value: 'player' },\n];\n\nexport const SEO_CHANGE_FREQ_OPTIONS: ReadonlyArray<{ label: string; value: string }> = [\n { label: 'Always', value: 'always' },\n { label: 'Hourly', value: 'hourly' },\n { label: 'Daily', value: 'daily' },\n { label: 'Weekly', value: 'weekly' },\n { label: 'Monthly', value: 'monthly' },\n { label: 'Yearly', value: 'yearly' },\n { label: 'Never', value: 'never' },\n];\n","import { SeoDoc, SeoOg, SeoSitemap, SeoTwitter } from './seo.model';\n\n/**\n * Coerce whatever a page document happens to hold into a `SeoDoc`.\n *\n * Every consumer calls this before reading `seo`, because four shapes are in the wild:\n * • the current nested shape (`og.title`);\n * • the flat shape the SSR engine used to read (`ogTitle`) — never actually written, but a\n * document hand-edited against the old engine code could carry it;\n * • `\"\"` for \"not set\", which must not become an empty `<meta>`;\n * • `{ override: '…' }`, the per-field value object that plan phase 2 introduces — tolerated here\n * so the ladder can land without a second normalizer.\n *\n * Empty branches are dropped rather than left as `{}`, so `if (seo.og)` is a meaningful test.\n */\nexport function normalizeSeoDoc(raw: unknown): SeoDoc {\n const src = asRecord(raw);\n if (!src) return {};\n\n const og = compact<SeoOg>({\n title: seoString(pick(src, 'og', 'title') ?? src['ogTitle']),\n description: seoString(pick(src, 'og', 'description') ?? src['ogDescription']),\n image: seoString(pick(src, 'og', 'image') ?? src['ogImage']),\n });\n\n const twitter = compact<SeoTwitter>({\n card: seoString(pick(src, 'twitter', 'card')),\n title: seoString(pick(src, 'twitter', 'title')),\n description: seoString(pick(src, 'twitter', 'description')),\n image: seoString(pick(src, 'twitter', 'image')),\n });\n\n const sitemap = compact<SeoSitemap>({\n include: bool(pick(src, 'sitemap', 'include')),\n priority: num(pick(src, 'sitemap', 'priority')),\n changeFreq: seoString(pick(src, 'sitemap', 'changeFreq')),\n });\n\n const structuredData = structured(src['structuredData']);\n\n const doc = compact<SeoDoc>({\n title: seoString(src['title']),\n description: seoString(src['description']),\n keywords: seoString(src['keywords']),\n canonicalUrl: seoString(src['canonicalUrl']),\n robots: seoString(src['robots']),\n og,\n twitter,\n sitemap,\n structuredData,\n });\n\n return doc ?? {};\n}\n\n/** Read `src[branch][leaf]` without assuming the branch exists or is an object. */\nfunction pick(src: Record<string, unknown>, branch: string, leaf: string): unknown {\n const nested = asRecord(src[branch]);\n return nested ? nested[leaf] : undefined;\n}\n\n/**\n * A field's value as a trimmed string, or `undefined`. Exported because the resolver needs the exact\n * same coercion for a value it has just pulled out of a data source.\n *\n * Unwraps the value object: a bound or auto field has no `override`, so it correctly resolves to\n * `undefined` here and `resolveSeo` fills it in from the lower rungs.\n */\nexport function seoString(value: unknown): string | undefined {\n const wrapper = asRecord(value);\n const raw = wrapper ? wrapper['override'] : value;\n if (typeof raw === 'number') return String(raw);\n if (typeof raw !== 'string') return undefined;\n const trimmed = raw.trim();\n return trimmed.length ? trimmed : undefined;\n}\n\n/**\n * `UIFormToDTO` can hand back `\"true\"` / `\"false\"` for a switch (see\n * `architecture/cms/shop.md` — the boolean/number coercion pitfall), so accept both.\n */\nfunction bool(value: unknown): boolean | undefined {\n if (typeof value === 'boolean') return value;\n if (value === 'true') return true;\n if (value === 'false') return false;\n return undefined;\n}\n\nfunction num(value: unknown): number | undefined {\n if (typeof value === 'number') return Number.isFinite(value) ? value : undefined;\n if (typeof value !== 'string' || !value.trim().length) return undefined;\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\n/** JSON-LD is stored as an object or as a JSON string from the `json` controller. */\nfunction structured(value: unknown): unknown {\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed.length) return undefined;\n try {\n return JSON.parse(trimmed);\n } catch {\n return undefined;\n }\n }\n if (Array.isArray(value)) return value.length ? value : undefined;\n const record = asRecord(value);\n return record && Object.keys(record).length ? record : undefined;\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\n/** Drop `undefined` values and empty nested objects, so absence is always `undefined`. */\nfunction compact<T extends object>(value: Record<string, unknown>): T | undefined {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) {\n if (entry === undefined) continue;\n out[key] = entry;\n }\n return (Object.keys(out).length ? out : undefined) as T | undefined;\n}\n","import { SeoDoc, SeoTag, SeoTagContext } from './seo.model';\nimport { normalizeSeoDoc } from './normalize';\n\n/**\n * Turn a page's SEO document into the flat list of head tags to emit.\n *\n * Both renderers call this, so a page cannot describe itself differently to a crawler than the\n * builder previews. The order is fixed and part of the contract: title, description, keywords,\n * canonical, Open Graph, Twitter, robots.\n *\n * Fallbacks are deliberately shallow — `og:title` reuses the page title, `twitter:*` reuses the\n * Open Graph values — because a social scraper that finds no `og:title` falls back to `<title>`\n * itself, and duplicating a value we did not author only makes the drift harder to see. The\n * \"derive from the page content\" half of the ladder (first h1, first paragraph, first image) is\n * `resolveSeo`, which runs BEFORE this and hands its output in as a filled-in `SeoDoc`.\n */\nexport function seoToTags(seo: SeoDoc | unknown, ctx: SeoTagContext = {}): SeoTag[] {\n const doc = normalizeSeoDoc(seo);\n const tags: SeoTag[] = [];\n\n const title = doc.title ?? trimmed(ctx.fallbackTitle);\n if (title) tags.push({ kind: 'title', content: title });\n if (doc.description) tags.push({ kind: 'meta', attr: 'name', key: 'description', content: doc.description });\n if (doc.keywords) tags.push({ kind: 'meta', attr: 'name', key: 'keywords', content: doc.keywords });\n if (doc.canonicalUrl) tags.push({ kind: 'link', rel: 'canonical', href: doc.canonicalUrl });\n\n // Open Graph. `og:url` reuses the canonical URL, which is what it means.\n const ogTitle = doc.og?.title ?? title;\n const ogDescription = doc.og?.description ?? doc.description;\n if (ogTitle) tags.push({ kind: 'meta', attr: 'property', key: 'og:title', content: ogTitle });\n if (ogDescription) tags.push({ kind: 'meta', attr: 'property', key: 'og:description', content: ogDescription });\n if (doc.og?.image) tags.push({ kind: 'meta', attr: 'property', key: 'og:image', content: doc.og.image });\n if (doc.canonicalUrl) tags.push({ kind: 'meta', attr: 'property', key: 'og:url', content: doc.canonicalUrl });\n\n // Twitter. Emitted ONLY when a card type is chosen: without `twitter:card` the other tags are\n // ignored anyway, so writing them would be noise that looks like configuration.\n if (doc.twitter?.card) {\n tags.push({ kind: 'meta', attr: 'name', key: 'twitter:card', content: doc.twitter.card });\n const twitterTitle = doc.twitter.title ?? ogTitle;\n const twitterDescription = doc.twitter.description ?? ogDescription;\n const twitterImage = doc.twitter.image ?? doc.og?.image;\n if (twitterTitle) tags.push({ kind: 'meta', attr: 'name', key: 'twitter:title', content: twitterTitle });\n if (twitterDescription) {\n tags.push({ kind: 'meta', attr: 'name', key: 'twitter:description', content: twitterDescription });\n }\n if (twitterImage) tags.push({ kind: 'meta', attr: 'name', key: 'twitter:image', content: twitterImage });\n }\n\n if (doc.robots) tags.push({ kind: 'meta', attr: 'name', key: 'robots', content: doc.robots });\n\n return tags;\n}\n\nfunction trimmed(value: string | undefined): string | undefined {\n const out = value?.trim();\n return out?.length ? out : undefined;\n}\n","import {\n SEO_CHANGE_FREQ_OPTIONS,\n SEO_DESCRIPTION_MAX,\n SEO_ROBOTS_OPTIONS,\n SEO_TITLE_MAX,\n SEO_TWITTER_CARD_OPTIONS,\n} from './seo.model';\n\n/**\n * The authoring schema for the `seo` object, in the platform's standard property dialect: `label`\n * at property level, rendering metadata under `controller`.\n *\n * ONE builder, two callers: `iox-cms` spreads it into `PagesSchema` (the stored schema) and\n * `iox-cms-client` feeds it to `<dynamic-form>`. Those used to be two hand-written copies that had\n * already drifted — different controller types for the same field, and the client's copy missing\n * `structuredData` entirely.\n *\n * `keywords` is deliberately absent: the tag is emitted when a document carries one, but there is\n * no reason to invite new ones.\n */\nexport function buildSeoSchemaProperties(): Record<string, unknown> {\n return {\n title: {\n type: 'string',\n label: 'Meta Title',\n controller: {\n type: 'text',\n placeholder: 'Page title for search engines',\n maxLength: SEO_TITLE_MAX,\n },\n },\n description: {\n type: 'string',\n label: 'Meta Description',\n controller: {\n type: 'textarea',\n placeholder: 'Brief description for search results',\n maxLength: SEO_DESCRIPTION_MAX,\n },\n },\n canonicalUrl: {\n type: 'string',\n label: 'Canonical URL',\n controller: {\n type: 'text',\n placeholder: 'https://example.com/page',\n },\n },\n robots: {\n type: 'string',\n label: 'Robots',\n controller: {\n type: 'select',\n options: SEO_ROBOTS_OPTIONS.map(option => ({ ...option })),\n },\n },\n og: {\n type: 'object',\n label: 'Open Graph',\n controller: { type: 'object' },\n properties: {\n title: {\n type: 'string',\n label: 'OG Title',\n controller: { type: 'text', placeholder: 'Title for social sharing' },\n },\n description: {\n type: 'string',\n label: 'OG Description',\n controller: { type: 'textarea', placeholder: 'Description for social sharing' },\n },\n image: {\n type: 'string',\n label: 'OG Image',\n controller: { type: 'media' },\n },\n },\n },\n twitter: {\n type: 'object',\n label: 'Twitter Card',\n controller: { type: 'object' },\n properties: {\n card: {\n type: 'string',\n label: 'Card Type',\n controller: {\n type: 'select',\n options: SEO_TWITTER_CARD_OPTIONS.map(option => ({ ...option })),\n },\n },\n title: {\n type: 'string',\n label: 'Twitter Title',\n controller: { type: 'text' },\n },\n description: {\n type: 'string',\n label: 'Twitter Description',\n controller: { type: 'textarea' },\n },\n image: {\n type: 'string',\n label: 'Twitter Image',\n controller: { type: 'media' },\n },\n },\n },\n structuredData: {\n type: 'object',\n label: 'Structured Data (JSON-LD)',\n // `code`, not `json`: the client registers `code` (CodeMirror) and has no `json`\n // controller, so a `json` declaration silently falls back to a plain text box.\n controller: { type: 'code', options: { language: 'json' } },\n },\n sitemap: {\n type: 'object',\n label: 'Sitemap Settings',\n controller: { type: 'object' },\n properties: {\n include: {\n type: 'boolean',\n label: 'Include in Sitemap',\n controller: { type: 'switch' },\n },\n priority: {\n type: 'number',\n label: 'Priority',\n controller: { type: 'range', options: { min: 0, max: 1, step: 0.1 } },\n },\n changeFreq: {\n type: 'string',\n label: 'Change Frequency',\n controller: {\n type: 'select',\n options: SEO_CHANGE_FREQ_OPTIONS.map(option => ({ ...option })),\n },\n },\n },\n },\n };\n}\n","/*\n * @vectoriox/iox-ui/seo-core — the shared, FRAMEWORK-FREE core of page SEO.\n *\n * ⚠️ Nothing in this entry point may import Angular, RxJS, the DOM, or Node. It is consumed by\n * THREE runtimes: the builder panel (Angular), the SSR engine (Angular), and `iox-cms` (NestJS,\n * plain Node) — the same reason `forms-core` exists.\n *\n * A page describes itself to a crawler exactly once: `seoToTags` is the only place that decides\n * which head tags a page emits, and `buildSeoSchemaProperties` the only place that declares what an\n * author can fill in. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\nexport * from './seo.model';\nexport * from './normalize';\nexport * from './tags';\nexport * from './schema';\n","import {\n SEO_AUTO_SOURCES,\n SEO_BINDABLE_FIELDS,\n SEO_DESCRIPTION_MAX,\n SeoAutoSource,\n SeoBinding,\n SeoDoc,\n SeoFieldValue,\n normalizeSeoDoc,\n seoString,\n} from '../../seo-core/public-api';\nimport { resolveBoundValue } from '../binding/resolve-bound-value';\n\n/**\n * Turn a page's STORED SEO document into the resolved one a crawler should see.\n *\n * Runs the ladder, per field: `override` → `binding` → auto. It lives in the main entry point rather\n * than `seo-core` because the binding rung needs `resolvePath` + `applyBindingPipes` from here, and\n * `iox-cms` (which imports `seo-core` under plain Node) never resolves anything — it only stores and\n * declares. `seoToTags` then turns this output into head tags.\n *\n * The reason this exists: `applyPageSeo(page.seo)` used to hand the stored strings straight to the\n * head, never consulting the resolved route item, so all 24 pages rendered from one template shipped\n * the same `<title>`. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\n/** What the ladder's lower two rungs need. All optional — a static page supplies almost none of it. */\nexport interface SeoResolveContext {\n /** The page's resolved data sources, keyed by alias (`$current` on a template page). */\n resolvedData?: Record<string, unknown> | null;\n /** The page's layout tree, for the \"derive from the content\" rung. */\n tree?: readonly unknown[] | null;\n /** Title of last resort, when the page has no heading at all. */\n pageName?: string;\n /** Absolute URL of the page being rendered — the automatic canonical. */\n pageUrl?: string;\n}\n\n/** A node binding, as the renderers store it: `prop` names the input the value lands on. */\ninterface NodeBinding extends SeoBinding {\n prop?: string;\n}\n\n/** `SeoBinding.pipes` is typed loosely in the framework-free core; narrow it once, here. */\nfunction boundSpec(binding: SeoBinding): { path?: string; pipes?: any[] } {\n return { path: binding.path, pipes: binding.pipes as any[] | undefined };\n}\n\n/** What the layout tree yields for the bottom rung. */\nexport interface SeoDerivedContent {\n title?: string;\n description?: string;\n image?: string;\n}\n\nexport function resolveSeo(seo: unknown, ctx: SeoResolveContext = {}): SeoDoc {\n // Rung 1 is exactly what the normalizer already produces: overrides, plus every non-bindable\n // field (robots, sitemap, structuredData) carried through untouched.\n const out = normalizeSeoDoc(seo) as Record<string, unknown>;\n const raw = (seo && typeof seo === 'object' && !Array.isArray(seo) ? seo : {}) as Record<string, unknown>;\n\n // Derivation walks the whole tree, so do it once and only if some field will actually ask.\n let derived: SeoDerivedContent | undefined;\n const content = (): SeoDerivedContent => (derived ??= deriveSeoFromContent(ctx.tree, ctx.resolvedData));\n\n for (const field of SEO_BINDABLE_FIELDS) {\n if (readField(out, field) !== undefined) continue; // an override won\n\n const stored = fieldValue(raw, field);\n\n // Rung 2 — the binding.\n if (stored?.binding) {\n const value = resolveSeoBinding(stored.binding, ctx.resolvedData);\n if (value !== undefined) {\n writeField(out, field, value);\n continue;\n }\n }\n\n // Rung 3 — derive it, unless this field opted out.\n if (stored?.auto === false) continue;\n const source = SEO_AUTO_SOURCES.find(entry => entry.field === field)?.source;\n const auto = source ? autoValue(source, content, ctx) : undefined;\n if (auto !== undefined) writeField(out, field, auto);\n }\n\n // One last pass so a resolved value gets the same trimming and empty-branch dropping as a stored\n // one — `if (seo.og)` must keep meaning something.\n return normalizeSeoDoc(out);\n}\n\n/** Resolve one SEO binding against the page's data. `undefined` when its source did not resolve. */\nfunction resolveSeoBinding(binding: SeoBinding, resolvedData: SeoResolveContext['resolvedData']): string | undefined {\n const sourceData = resolvedData?.[binding.source];\n if (sourceData == null) return undefined;\n return seoString(resolveBoundValue(sourceData, boundSpec(binding)));\n}\n\nfunction autoValue(source: SeoAutoSource, content: () => SeoDerivedContent, ctx: SeoResolveContext): string | undefined {\n switch (source) {\n case 'contentTitle':\n return content().title ?? seoString(ctx.pageName);\n case 'contentDescription':\n return content().description;\n case 'contentImage':\n return content().image;\n case 'pageUrl':\n return seoString(ctx.pageUrl);\n }\n}\n\n/**\n * Derive a title, description and image from the page's own content, in document order.\n *\n * ⚠️ Node bindings are resolved here too. On a template page the `<h1>` is normally bound to\n * `$current.title`, so reading `props.content` alone would return the design-time placeholder — the\n * same trap that made context slots fall through to component defaults. An unresolved binding yields\n * nothing rather than the placeholder.\n *\n * Node shapes are the renderers' own: `Heading` has `level` + `content`, `Text` has `content` (rich\n * HTML from the editor) + `tag`, `Image` has `src`.\n */\nexport function deriveSeoFromContent(\n tree: readonly unknown[] | null | undefined,\n resolvedData?: Record<string, unknown> | null,\n): SeoDerivedContent {\n const out: SeoDerivedContent = {};\n /** A heading that is not an h1 — used only if the page has no h1 at all. */\n let fallbackHeading: string | undefined;\n\n const visit = (nodes: readonly unknown[] | null | undefined): void => {\n for (const node of nodes ?? []) {\n const current = node as Record<string, any> | null;\n if (!current) continue;\n\n const props = resolveNodeProps(current, resolvedData);\n\n switch (current['type']) {\n case 'Heading': {\n const text = plainText(props['content']);\n if (text) {\n if (props['level'] === 'h1') out.title ??= text;\n else fallbackHeading ??= text;\n }\n break;\n }\n case 'Text': {\n // `span` is inline decoration, not a paragraph.\n if (props['tag'] !== 'span') out.description ??= truncate(plainText(props['content']), SEO_DESCRIPTION_MAX);\n break;\n }\n case 'Image': {\n out.image ??= seoString(props['src']);\n break;\n }\n }\n\n visit(current['children']);\n }\n };\n\n visit(tree);\n out.title ??= fallbackHeading;\n return out;\n}\n\n/** A node's props with its bindings applied — only what derivation reads, never the whole node. */\nfunction resolveNodeProps(node: Record<string, any>, resolvedData?: Record<string, unknown> | null): Record<string, any> {\n const props: Record<string, any> = { ...(node['props'] ?? {}) };\n for (const binding of (node['bindings'] ?? []) as NodeBinding[]) {\n if (!binding?.prop) continue;\n const sourceData = resolvedData?.[binding.source];\n // A bound prop whose source did not resolve must NOT fall through to the design-time default.\n props[binding.prop] = sourceData == null ? undefined : resolveBoundValue(sourceData, boundSpec(binding));\n }\n return props;\n}\n\n/**\n * Editor content is rich HTML. Strip it to prose: tags out, block boundaries become spaces so words\n * do not fuse, the handful of entities an editor emits decoded, whitespace collapsed.\n */\nfunction plainText(value: unknown): string | undefined {\n const raw = seoString(value);\n if (!raw) return undefined;\n const text = raw\n .replace(/<(br|\\/p|\\/div|\\/li|\\/h[1-6])\\s*\\/?>/gi, ' ')\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/gi, ' ')\n .replace(/&amp;/gi, '&')\n .replace(/&lt;/gi, '<')\n .replace(/&gt;/gi, '>')\n .replace(/&quot;/gi, '\"')\n .replace(/&#39;|&apos;/gi, \"'\")\n .replace(/\\s+/g, ' ')\n .trim();\n return text.length ? text : undefined;\n}\n\n/** Cut to `max` characters on a word boundary, with an ellipsis only when something was cut. */\nfunction truncate(value: string | undefined, max: number): string | undefined {\n if (!value || value.length <= max) return value;\n const cut = value.slice(0, max - 1);\n const lastSpace = cut.lastIndexOf(' ');\n return (lastSpace > max * 0.6 ? cut.slice(0, lastSpace) : cut).trimEnd() + '…';\n}\n\n// ── dotted-path access over the document, so the field table stays data and not a switch ───────────\n\nfunction fieldValue(raw: Record<string, unknown>, field: string): SeoFieldValue | undefined {\n const value = readField(raw, field);\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined;\n return value as SeoFieldValue;\n}\n\nfunction readField(doc: Record<string, unknown>, field: string): unknown {\n const [branch, leaf] = field.split('.');\n if (!leaf) return doc[branch];\n const nested = doc[branch];\n return nested && typeof nested === 'object' ? (nested as Record<string, unknown>)[leaf] : undefined;\n}\n\nfunction writeField(doc: Record<string, unknown>, field: string, value: string): void {\n const [branch, leaf] = field.split('.');\n if (!leaf) {\n doc[branch] = value;\n return;\n }\n const nested = (doc[branch] && typeof doc[branch] === 'object' ? doc[branch] : {}) as Record<string, unknown>;\n nested[leaf] = value;\n doc[branch] = nested;\n}\n","import {\n SEO_BINDABLE_FIELDS,\n SEO_DESCRIPTION_MAX,\n SEO_TITLE_MAX,\n SeoBinding,\n SeoFieldValue,\n buildSeoSchemaProperties,\n seoString,\n} from '../../seo-core/public-api';\nimport { SeoResolveContext, resolveSeo } from './resolve-seo';\n\n/**\n * The authoring-side view of the SEO ladder: which rung won for each field, and what to show.\n *\n * The panel must never re-derive this. The chip an author reads (\"AUTO\" / \"BOUND\" / \"MANUAL\") has to\n * mean exactly what the renderer will do, and the only way to guarantee that is to compute it from\n * the same `resolveSeo` the renderer uses. See iox-ai-guidance `architecture/cms/seo-plan.md`.\n */\n\nexport type SeoFieldSource =\n /** The author typed it. */\n | 'manual'\n /** A binding supplies it — the value is only known at render time. */\n | 'bound'\n /** Derived from the page's own content or URL. */\n | 'auto'\n /** Nothing supplies it: automatic derivation is off, or there was nothing to derive. */\n | 'empty';\n\nexport interface SeoFieldState {\n /** Dotted path into the document, e.g. `title`, `og.image`. */\n field: string;\n /** What the author typed, when they did. Drives the input's value. */\n override: string;\n /** The binding, when one is set. */\n binding?: SeoBinding;\n /** The value as far as it can be known here — empty for a bound field. */\n resolved: string;\n /** Which rung won. */\n source: SeoFieldSource;\n /** Recommended length, where one applies — for the character counter. */\n maxLength?: number;\n /**\n * The input controller this field is authored with — `text`, `textarea`, `image`, … — taken\n * from the SHARED schema, which is the single place that declares it.\n *\n * A panel renders the declared control; it never hand-rolls one. An `image` field rendered as a\n * text box throws away a picker the schema already asked for, and a raw `<input>` shares no\n * sizing, disabled state, RTL or theme with the rest of the app. See iox-ai-guidance\n * `CLAUDE.md` → Non-Negotiable Standards.\n */\n control: string;\n /** Whatever the declared controller needs — select options, code language, range bounds. */\n options?: unknown;\n}\n\n/** field path → its declared controller, flattened out of the schema once. */\nfunction controllerMap(): Record<string, { type: string; options?: unknown }> {\n const out: Record<string, { type: string; options?: unknown }> = {};\n const walk = (properties: Record<string, any>, prefix: string) => {\n for (const [key, property] of Object.entries(properties ?? {})) {\n const path = prefix ? `${prefix}.${key}` : key;\n if (property?.properties) walk(property.properties, path);\n else if (property?.controller) {\n out[path] = { type: property.controller.type, options: property.controller.options };\n }\n }\n };\n walk(buildSeoSchemaProperties() as Record<string, any>, '');\n return out;\n}\n\nconst MAX_LENGTHS: Record<string, number> = {\n title: SEO_TITLE_MAX,\n description: SEO_DESCRIPTION_MAX,\n 'og.description': SEO_DESCRIPTION_MAX,\n 'twitter.description': SEO_DESCRIPTION_MAX,\n};\n\n/**\n * Describe every bindable field for the authoring panel.\n *\n * ⚠️ `resolved` is deliberately EMPTY for a bound field on the builder side. The canvas has no\n * page-level resolved data — each component fetches its own — so a bound value genuinely is not\n * knowable here. Showing the binding expression and saying so is honest; inventing a preview from\n * design-time props is how a placeholder ends up looking like real content.\n */\nexport function describeSeoFields(seo: unknown, ctx: SeoResolveContext = {}): SeoFieldState[] {\n const raw = asRecord(seo) ?? {};\n const resolvedDoc = resolveSeo(seo, ctx) as unknown as Record<string, unknown>;\n const controllers = controllerMap();\n\n return SEO_BINDABLE_FIELDS.map(field => {\n const stored = fieldValue(raw, field);\n const override = seoString(readField(raw, field)) ?? '';\n const binding = stored?.binding;\n const resolved = seoString(readField(resolvedDoc, field)) ?? '';\n\n let source: SeoFieldSource;\n if (override) source = 'manual';\n else if (binding) source = 'bound';\n else if (resolved) source = 'auto';\n else source = 'empty';\n\n return {\n field,\n override,\n binding,\n // A bound field's value comes from data this side cannot see.\n resolved: source === 'bound' ? '' : resolved,\n source,\n maxLength: MAX_LENGTHS[field],\n control: controllers[field]?.type ?? 'text',\n options: controllers[field]?.options,\n };\n });\n}\n\n/** Set a field's typed value. An empty string CLEARS the override so the lower rungs take over. */\nexport function setSeoOverride(seo: unknown, field: string, value: string): Record<string, unknown> {\n const next = clone(seo);\n const text = value?.trim() ?? '';\n const existing = fieldValue(next, field);\n\n if (!text) {\n // Nothing else on the field → drop it entirely, so the document stays free of `{}` husks.\n if (!existing?.binding && existing?.auto !== false) writeField(next, field, undefined);\n else writeField(next, field, stripUndefined({ binding: existing?.binding, auto: existing?.auto }));\n return next;\n }\n\n writeField(next, field, stripUndefined({ override: text, binding: existing?.binding, auto: existing?.auto }));\n return next;\n}\n\n/** Attach or replace a field's binding. `undefined` removes it. */\nexport function setSeoBinding(seo: unknown, field: string, binding: SeoBinding | undefined): Record<string, unknown> {\n const next = clone(seo);\n const existing = fieldValue(next, field);\n const value = stripUndefined({ override: existing?.override, binding, auto: existing?.auto });\n writeField(next, field, Object.keys(value).length ? value : undefined);\n return next;\n}\n\n/** Turn the automatic rung on or off for a field. Off leaves the field genuinely empty. */\nexport function setSeoAuto(seo: unknown, field: string, enabled: boolean): Record<string, unknown> {\n const next = clone(seo);\n const existing = fieldValue(next, field);\n const value = stripUndefined({\n override: existing?.override,\n binding: existing?.binding,\n auto: enabled ? undefined : (false as const),\n });\n writeField(next, field, Object.keys(value).length ? value : undefined);\n return next;\n}\n\n/**\n * Set a field that is NOT part of the ladder — `robots`, `twitter.card`, `structuredData`,\n * `sitemap.*`. These are pick-lists, switches and blobs: they have no override/binding/auto, so they\n * are stored as plain values, exactly as the normalizer reads them.\n *\n * `undefined`, `null` and `''` remove the field, so an unset pick-list leaves no husk behind.\n */\nexport function setSeoValue(seo: unknown, field: string, value: unknown): Record<string, unknown> {\n const next = clone(seo);\n const empty = value === undefined || value === null || (typeof value === 'string' && !value.trim());\n writeField(next, field, empty ? undefined : value);\n return next;\n}\n\n/** Read any field's plain stored value — the counterpart of `setSeoValue`. */\nexport function getSeoValue(seo: unknown, field: string): unknown {\n return readField(asRecord(seo) ?? {}, field);\n}\n\n/** Drop everything an author set on a field — back to the automatic rung. */\nexport function resetSeoField(seo: unknown, field: string): Record<string, unknown> {\n const next = clone(seo);\n writeField(next, field, undefined);\n return next;\n}\n\n// ── shared dotted-path plumbing ───────────────────────────────────────────────────────────────\n\nfunction clone(seo: unknown): Record<string, unknown> {\n return JSON.parse(JSON.stringify(asRecord(seo) ?? {}));\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\nfunction stripUndefined<T extends object>(value: T): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) if (entry !== undefined) out[key] = entry;\n return out;\n}\n\nfunction fieldValue(doc: Record<string, unknown>, field: string): SeoFieldValue | undefined {\n const value = readField(doc, field);\n return asRecord(value) as SeoFieldValue | undefined;\n}\n\nfunction readField(doc: Record<string, unknown>, field: string): unknown {\n const [branch, leaf] = field.split('.');\n if (!leaf) return doc[branch];\n const nested = asRecord(doc[branch]);\n return nested ? nested[leaf] : undefined;\n}\n\nfunction writeField(doc: Record<string, unknown>, field: string, value: unknown): void {\n const [branch, leaf] = field.split('.');\n if (!leaf) {\n if (value === undefined) delete doc[branch];\n else doc[branch] = value;\n return;\n }\n const nested = (asRecord(doc[branch]) ?? {}) as Record<string, unknown>;\n if (value === undefined) delete nested[leaf];\n else nested[leaf] = value;\n if (Object.keys(nested).length) doc[branch] = nested;\n else delete doc[branch];\n}\n","/**\n * Element context state — shared types.\n *\n * A **context slot** is a data-source alias whose value is WRITTEN at runtime (by an interaction)\n * instead of fetched. That is the whole trick: bindings need no new grammar, because a slot is just\n * another key in the `resolvedData` map both renderers already resolve against.\n *\n * See architecture/builder/element-context-state-plan.md.\n */\n\n/** How a slot behaves before anyone has interacted with the page. */\nexport type ContextSlotDefault =\n /** Empty until an interaction fills it. The preview is hidden by CSS until then. */\n | 'none'\n /** Pre-filled with the first item of `source`, so the page is never empty. */\n | 'first';\n\n/** Declared on the PAGE — always page-level, never promoted to the org library. */\nexport interface IoxContextSlot {\n /**\n * The bindable alias, e.g. `currentItem`. Shares the page's data-source alias namespace, so it\n * must be unique among sources AND slots, and must not start with `$` (reserved for system\n * aliases).\n */\n key: string;\n /** The data-source alias whose items this slot holds. Types the slot for the bind picker. */\n source: string;\n /** Defaults to `'none'`. */\n default?: ContextSlotDefault;\n}\n\n/**\n * What a `setContext` action writes. Three shapes, one for each way an element can know a value.\n */\nexport type ContextValueSpec =\n /** `$item` — the row's own item, read from the enclosing loop scope. Configured once. */\n | { kind: 'item' }\n /** An explicit source + path, for a standalone element that is not inside a loop. */\n | { kind: 'source'; source: string; path?: string }\n /** A fixed value. */\n | { kind: 'literal'; value: unknown };\n\n/** The parameters of a `setContext` interaction action. */\nexport interface SetContextParams {\n /** Which slot to write. */\n slot: string;\n /** What to write into it. */\n value: ContextValueSpec;\n /**\n * When true this action does NOT auto-reverse on `mouseleave`.\n *\n * `hover` binds both ends and runs actions reversed on leave, which is what we want on a LIST\n * container (leave → clear) and exactly what we do NOT want on a row: a row clearing itself on\n * its own leave makes every row-to-row move flicker. Rows set this; container clears don't.\n */\n noReverse?: boolean;\n}\n\n/** Where a slot's value came from — stored as a reference, never a snapshot copy. */\nexport interface ContextItemRef {\n /** The source alias the item belongs to. */\n source: string;\n /** Position in the resolved array — the O(1) read path. */\n index: number;\n /** Optional stable id, used only to repair the index if the collection re-fetched or reordered. */\n id?: string;\n}\n","import { resolvePath } from '../binding/resolve-path';\nimport { ContextValueSpec, IoxContextSlot } from './context-slot.model';\n\n/**\n * Pure context resolution — no Angular, no transport. Shared by the builder canvas and the SSR\n * engine so a slot behaves identically in both. See element-context-state-plan.md.\n */\n\n/** What an interaction knows at the moment it fires. */\nexport interface ContextWriteScope {\n /** The enclosing loop's item, when the element sits inside a repeater/slider row. */\n item?: unknown;\n /** The page's resolved data, for `{ kind: 'source' }` specs. */\n resolvedData?: Record<string, unknown>;\n}\n\n/**\n * Turn a `setContext` value spec into the value to store.\n *\n * Returns `undefined` when the spec cannot be satisfied (e.g. `$item` on an element that is not in\n * a loop), which the store treats as \"don't write\" rather than \"write empty\".\n */\nexport function resolveContextValue(spec: ContextValueSpec | undefined, scope: ContextWriteScope = {}): unknown {\n if (!spec) return undefined;\n switch (spec.kind) {\n case 'item':\n return scope.item;\n case 'literal':\n return spec.value;\n case 'source': {\n const data = scope.resolvedData?.[spec.source];\n if (data == null) return undefined;\n return spec.path ? resolvePath(data, spec.path) : data;\n }\n default:\n return undefined;\n }\n}\n\n/**\n * The value each slot holds before any interaction.\n *\n * `'first'` pre-fills from the resolved source so the page is never empty; `'none'` (the default)\n * leaves the key ABSENT — not set to undefined — so `resolvedData` looks exactly as it does for a\n * source that returned nothing, and bindings simply don't resolve.\n */\nexport function initialSlotValues(\n slots: readonly IoxContextSlot[] | undefined,\n resolvedData: Record<string, unknown> = {},\n): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const slot of slots ?? []) {\n if (slot?.default !== 'first') continue;\n const items = resolvedData[slot.source];\n if (Array.isArray(items) && items.length) out[slot.key] = items[0];\n }\n return out;\n}\n\n/**\n * Merge live slot values over the page's resolved data, producing the map bindings resolve against.\n *\n * Slot keys share the data-source namespace, so a slot deliberately shadows a source of the same\n * name — the same way a repeater row shadows its own source alias with the single item.\n */\nexport function withContextSlots(\n resolvedData: Record<string, unknown> | undefined,\n slotValues: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n return { ...(resolvedData ?? {}), ...(slotValues ?? {}) };\n}\n\n/** The set of declared slot keys — what marks a binding as \"live\". */\nexport function contextSlotKeys(slots: readonly IoxContextSlot[] | undefined): Set<string> {\n return new Set((slots ?? []).map(s => s?.key).filter((k): k is string => !!k));\n}\n\n/**\n * Does this node read a context slot? Nodes that do must be REGISTERED at render time and\n * re-applied when the store changes — they are the only ones whose props are not final after the\n * first render.\n */\nexport function nodeUsesContext(node: unknown, slotKeys: ReadonlySet<string>): boolean {\n if (!slotKeys.size) return false;\n const bindings = (node as { bindings?: { source?: string }[] } | null)?.bindings;\n if (!Array.isArray(bindings)) return false;\n return bindings.some(b => !!b?.source && slotKeys.has(b.source));\n}\n\n/**\n * Is a slot key a legal user alias?\n *\n * Slots live in the page's data-source alias namespace, so uniqueness is the existing rule. The one\n * extra constraint is the reserved `$` prefix (system aliases — `$route`, `$current`, …).\n */\nexport function isValidSlotKey(key: string | undefined | null): boolean {\n if (!key) return false;\n const trimmed = key.trim();\n if (!trimmed || trimmed.startsWith('$')) return false;\n return /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed);\n}\n","import { Injectable, computed, signal } from '@angular/core';\n\n/**\n * The runtime context channel: named slots an interaction writes and bindings read.\n *\n * Signal-backed because writes are HOT — a hover fires on every row crossing. A write must cost a\n * signal set and re-apply one input on the registered nodes; it must never re-clone a repeater or\n * re-render the loop. See element-context-state-plan.md (trap T2).\n *\n * Provided in root and reset by the consumer on page navigation — slots are page-level state.\n */\n@Injectable({ providedIn: 'root' })\nexport class ContextStore {\n private readonly _values = signal<Readonly<Record<string, unknown>>>({});\n\n /** All live slot values. Merge over `resolvedData` with `withContextSlots` to resolve bindings. */\n readonly values = this._values.asReadonly();\n\n /** The keys currently holding a value — what the \"is this slot populated?\" CSS state keys off. */\n readonly populatedKeys = computed(() => new Set(Object.keys(this._values())));\n\n /**\n * Write a slot. An `undefined` value is IGNORED rather than stored: a spec that could not be\n * satisfied (e.g. `$item` outside a loop) must not silently blank a populated slot.\n */\n set(key: string, value: unknown): void {\n if (!key || value === undefined) return;\n const current = this._values();\n if (Object.is(current[key], value)) return; // no-op writes must not wake subscribers\n this._values.set({ ...current, [key]: value });\n }\n\n /** Remove a slot's value entirely, so the key is ABSENT (not undefined) for binding resolution. */\n clear(key: string): void {\n if (!key) return;\n const current = this._values();\n if (!(key in current)) return;\n const next = { ...current };\n delete next[key];\n this._values.set(next);\n }\n\n /** Drop every slot — call on page navigation; context is page-level state. */\n resetAll(): void {\n if (!Object.keys(this._values()).length) return;\n this._values.set({});\n }\n\n /** Seed the initial values (from `initialSlotValues`) without clobbering later writes. */\n seed(values: Record<string, unknown>): void {\n const incoming = Object.entries(values ?? {}).filter(([, v]) => v !== undefined);\n if (!incoming.length) return;\n this._values.set({ ...Object.fromEntries(incoming), ...this._values() });\n }\n\n /** Non-reactive read — for imperative code that must not create a dependency. */\n peek(key: string): unknown {\n return this._values()[key];\n }\n\n /** Whether a slot currently holds a value. */\n has(key: string): boolean {\n return key in this._values();\n }\n}\n","import { ContextValueSpec, SetContextParams } from './context-slot.model';\n\n/**\n * What a context action DOES on a given interaction pass — the single definition of the semantics,\n * shared by the builder's InteractionEngineService and the engine's ClientInteractionService so the\n * two runtimes cannot drift.\n *\n * ## Why a \"pass\"\n *\n * A `hover` interaction binds BOTH ends: `mouseenter` runs the actions forward, `mouseleave` replays\n * them on a reverse pass. For an animation, reverse means \"play the keyframes backwards\". A context\n * write has no backwards, so its reverse behaviour has to be stated explicitly — that is this table:\n *\n * | action | forward | reverse (mouseleave) |\n * |----------------|---------|---------------------------|\n * | `setContext` | set | clear, UNLESS `noReverse` |\n * | `clearContext` | clear | nothing |\n *\n * `noReverse` is what a repeater ROW sets. Without it, leaving a row clears the slot, so every\n * row-to-row move blinks and the gaps between rows blank the preview. Clearing belongs to the LIST\n * container, not the row. See element-context-state-plan.md §5.\n *\n * NOTE: this is unrelated to `INVERSE_ACTION`, which only auto-populates the reverse actions of a\n * CLICK-toggle (click sets, click again clears).\n */\nexport type ContextActionEffect =\n | { op: 'set'; slot: string; value: ContextValueSpec }\n | { op: 'clear'; slot: string };\n\n/** The action shape this reads — structural, so both runtimes can pass their own action objects. */\nexport interface ContextActionLike {\n type?: string;\n params?: Partial<SetContextParams> | Record<string, unknown> | null;\n}\n\n/** Action types this module handles. Anything else is not a context action. */\nexport const CONTEXT_ACTION_TYPES = ['setContext', 'clearContext'] as const;\n\nexport function isContextAction(action: ContextActionLike | null | undefined): boolean {\n return !!action?.type && (CONTEXT_ACTION_TYPES as readonly string[]).includes(action.type);\n}\n\n/**\n * Resolve an action + pass into the store operation to perform, or `null` for \"do nothing\".\n *\n * Returning `null` (rather than throwing or guessing) is what lets a runtime call this for every\n * action on every pass and simply skip the misses.\n */\nexport function contextActionEffect(\n action: ContextActionLike | null | undefined,\n pass: 'forward' | 'reverse' = 'forward',\n): ContextActionEffect | null {\n if (!isContextAction(action)) return null;\n\n const params = (action!.params ?? {}) as Partial<SetContextParams>;\n const slot = typeof params.slot === 'string' ? params.slot.trim() : '';\n if (!slot) return null;\n\n if (action!.type === 'clearContext') {\n // A clear has no meaningful reverse — leaving the element must not re-populate the slot.\n return pass === 'forward' ? { op: 'clear', slot } : null;\n }\n\n // setContext\n if (pass === 'forward') {\n return params.value ? { op: 'set', slot, value: params.value } : null;\n }\n return params.noReverse ? null : { op: 'clear', slot };\n}\n","import { contextActionEffect } from './context-actions';\nimport { IoxContextSlot } from './context-slot.model';\n\n/**\n * Which slot keys are actually IN USE on a page — derived from the layout tree itself.\n *\n * A slot only matters at runtime if something writes it (a `setContext`/`clearContext` action) or\n * reads it (a binding whose `source` names it). Deriving the set from the tree means the runtime\n * works without waiting on the page model: a DECLARED `IoxContextSlot` adds typing for the bind\n * picker and a `default`, but is not required for the channel to function.\n *\n * Union of declared + in-use, so a declared-but-unused slot still seeds its default, and a slot used\n * by a symbol dropped onto a page that never declared it still works (it just has no default).\n */\nexport function collectContextSlotKeys(\n nodes: readonly unknown[] | undefined,\n /** Declared VARIABLES — page resources of `type: 'variable'`, or legacy slot declarations. */\n declared: readonly (IoxContextSlot | { alias?: string; type?: string })[] = [],\n): Set<string> {\n const written = new Set<string>();\n const read = new Set<string>();\n walk(nodes, written, read);\n // A binding only names a SLOT if something writes that key; otherwise it names a data source.\n const keys = new Set(written);\n for (const key of read) if (written.has(key)) keys.add(key);\n for (const decl of declared) {\n // A declared variable (a data source of type 'variable') or a legacy IoxContextSlot.\n const key = (decl as IoxContextSlot)?.key\n ?? ((decl as { type?: string })?.type === 'variable' ? (decl as { alias?: string }).alias : undefined);\n if (key) keys.add(key);\n }\n return keys;\n}\n\nfunction walk(nodes: readonly unknown[] | undefined, written: Set<string>, read: Set<string>): void {\n for (const raw of nodes ?? []) {\n const node = raw as {\n interactions?: { actions?: unknown[]; reverseActions?: unknown[] }[];\n bindings?: { source?: string }[];\n children?: unknown[];\n } | null;\n if (!node) continue;\n\n for (const ix of node.interactions ?? []) {\n for (const action of [...(ix?.actions ?? []), ...(ix?.reverseActions ?? [])]) {\n const effect = contextActionEffect(action as never, 'forward')\n ?? contextActionEffect(action as never, 'reverse');\n if (effect) written.add(effect.slot);\n }\n }\n for (const binding of node.bindings ?? []) {\n if (binding?.source) read.add(binding.source);\n }\n if (Array.isArray(node.children)) walk(node.children, written, read);\n }\n}\n","/**\n * Whether an interaction action is switched ON.\n *\n * An author can disable a single action inside an interaction (the switch on its accordion row)\n * without deleting it — useful while tuning a multi-action sequence. Disabling must hold in BOTH\n * runtimes, so the rule lives here and the builder engine and the SSR engine both read it: a\n * disabled action must not animate, must not write context, and must not receive a PRE-STATE\n * (otherwise it would leave the element hidden with nothing left to reveal it).\n */\nexport interface ToggleableAction {\n disabled?: boolean;\n}\n\n/** Default is ENABLED — `disabled` is absent on every action authored before the switch existed. */\nexport function isActionEnabled(action: ToggleableAction | null | undefined): boolean {\n return !!action && action.disabled !== true;\n}\n\n/** The actions that should actually run, preserving order. */\nexport function activeActions<T extends ToggleableAction>(actions: readonly T[] | undefined): T[] {\n return (actions ?? []).filter(isActionEnabled);\n}\n","/**\n * Cinematic page-transition presets — the SINGLE SOURCE OF TRUTH shared by the page builder\n * (preview) and the SSR client engine (production). Pure, transport-agnostic: this module only\n * describes WAAPI keyframe pairs + timing/ordering. It never touches the DOM.\n *\n * A page transition plays TWO synchronized WAAPI animations at once — an `out` animation on a\n * snapshot of the outgoing page and an `in` animation on the incoming page — inside a shared\n * `perspective` container, gated on BOTH finishing (the \"cinematic\" feel, à la Codrops\n * PageTransitions). The consumer supplies the DOM (snapshot layer + live page) and calls\n * `element.animate(frames, options)`; it does NOT redefine the frames.\n *\n * @see architecture/builder/page-transitions.md\n */\nimport { BetweenId, resolveDesignMotion, SPEC_AXES } from '@vectoriox/iox-ui/design-core';\n\nimport { Breakpoint, breakpointDef } from '../style-compiler/responsive';\n\n/** Perspective (px) applied to the transition container unless a preset overrides it. */\nexport const DEFAULT_PAGE_TRANSITION_PERSPECTIVE = 1200;\n\n/**\n * Default transition duration (ms). Deliberately long — a slow, settled transition is most of what\n * makes a page change read as \"premium\"; the same motion at ~400ms feels like a snap.\n */\nexport const DEFAULT_PAGE_TRANSITION_DURATION = 1500;\n\n/**\n * Default easing: a strong symmetric in-out. Paired with the long duration this is the \"smoothness\"\n * — slow to leave, quick through the middle, gentle to settle.\n */\nexport const DEFAULT_PAGE_TRANSITION_EASING = 'cubic-bezier(0.76, 0, 0.24, 1)';\n\n/** Default preset used when a page has no transition configured at all. */\nexport const DEFAULT_PAGE_TRANSITION = 'parallax-up';\n\nexport type PageTransitionCategory = 'parallax' | 'reveal' | 'curtain' | 'move' | 'fade' | 'scale' | 'rotate';\n\nexport interface PageTransitionPreset {\n category: PageTransitionCategory;\n label: string;\n /** Keyframes for the OUTGOING page (played on a fixed snapshot). */\n outKeyframes: Keyframe[];\n /** Keyframes for the INCOMING page. */\n inKeyframes: Keyframe[];\n /** Which layer is stacked on top during the transition. Default: 'in'. */\n ontop?: 'in' | 'out';\n /** `transform-origin` for the outgoing layer (3D hinge effects). */\n outTransformOrigin?: string;\n /** `transform-origin` for the incoming layer. */\n inTransformOrigin?: string;\n /** Override the container perspective (px) for this preset. */\n perspective?: number;\n /** Delay before the OUT animation starts, as a fraction (0..1) of the duration. */\n outDelayRatio?: number;\n /** Delay before the IN animation starts, as a fraction (0..1) of the duration. */\n inDelayRatio?: number;\n /**\n * Optional full-screen overlay panel (curtain / wipe). When present the transition plays as\n * COVER → swap → UNCOVER instead of the two page layers animating against each other: the panel\n * sweeps in to hide the screen, the outgoing page is dropped behind it, then the panel sweeps\n * out to reveal the incoming page. Each half gets HALF the total duration.\n *\n * Trade-off: the swap is hidden, so you lose the \"both pages visible at once\" depth of the\n * parallax family — this is drama rather than spatial continuity.\n */\n overlay?: {\n coverKeyframes: Keyframe[];\n uncoverKeyframes: Keyframe[];\n };\n}\n\n// ── Keyframe helpers ────────────────────────────────────────────────────────\nconst FADE_OUT: Keyframe[] = [{ opacity: 1 }, { opacity: 0 }];\nconst FADE_IN: Keyframe[] = [{ opacity: 0 }, { opacity: 1 }];\n\nconst move = (from: string, to: string): Keyframe[] => [{ transform: from }, { transform: to }];\n\n/** Gentle recede for the outgoing page under a mask/reveal — it stays put but drops back a little,\n * so the page underneath never looks like a frozen screenshot. */\nconst RECEDE_SOFT: Keyframe[] = [\n { transform: 'scale(1)', opacity: 1 },\n { transform: 'scale(0.94)', opacity: 0.6 },\n];\n\n/** Barely-there settle for the incoming page under a curtain — the panel hides most of it, so this\n * only takes the edge off the reveal. Ends at identity (required: IN frames must not persist). */\nconst SETTLE_IN: Keyframe[] = [{ transform: 'scale(1.04)' }, { transform: 'scale(1)' }];\n\n// ── The preset catalog ──────────────────────────────────────────────────────\n// Keyed by a stable preset id persisted in pageSettings.routeAnimation.transition.\nexport const PAGE_TRANSITION_PRESETS: Record<string, PageTransitionPreset> = {\n // ── Parallax (the default family) ──────────────────────────────────────────\n // The outgoing page travels only HALF the distance while shrinking and dimming, so it recedes\n // *behind* the incoming page rather than sliding away. That travel difference (50% vs 100%) is\n // what reads as depth — there is no 3D here at all. Pair with the long default duration.\n 'parallax-up': {\n category: 'parallax', label: 'Parallax up (recommended)',\n outKeyframes: [\n { transform: 'translateY(0) scale(1)', opacity: 1 },\n { transform: 'translateY(-50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateY(100%)', 'translateY(0)'),\n ontop: 'in',\n },\n 'parallax-down': {\n category: 'parallax', label: 'Parallax down',\n outKeyframes: [\n { transform: 'translateY(0) scale(1)', opacity: 1 },\n { transform: 'translateY(50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateY(-100%)', 'translateY(0)'),\n ontop: 'in',\n },\n 'parallax-left': {\n category: 'parallax', label: 'Parallax left',\n outKeyframes: [\n { transform: 'translateX(0) scale(1)', opacity: 1 },\n { transform: 'translateX(-50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n ontop: 'in',\n },\n 'parallax-right': {\n category: 'parallax', label: 'Parallax right',\n outKeyframes: [\n { transform: 'translateX(0) scale(1)', opacity: 1 },\n { transform: 'translateX(50%) scale(0.8)', opacity: 0.4 },\n ],\n inKeyframes: move('translateX(-100%)', 'translateX(0)'),\n ontop: 'in',\n },\n\n // ── Reveal (clip-path) ─────────────────────────────────────────────────────\n // The incoming page is UNMASKED over the outgoing one, which recedes gently behind. No overlay\n // panel is involved — the mask is animated directly on the incoming layer, so this needs no\n // extra DOM. (WAAPI interpolates clip-path only between the SAME shape function with the same\n // number of points — keep each pair consistent.)\n 'circle-reveal': {\n category: 'reveal', label: 'Circle reveal (iris)',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [\n { clipPath: 'circle(0% at 50% 50%)' },\n { clipPath: 'circle(75% at 50% 50%)' },\n ],\n ontop: 'in',\n },\n 'wipe-right': {\n category: 'reveal', label: 'Wipe → right',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-left': {\n category: 'reveal', label: 'Wipe ← left',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 0 0 100%)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-down': {\n category: 'reveal', label: 'Wipe ↓ down',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'wipe-up': {\n category: 'reveal', label: 'Wipe ↑ up',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(100% 0 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n 'diagonal-wipe': {\n category: 'reveal', label: 'Diagonal wipe',\n outKeyframes: RECEDE_SOFT,\n // 4-point polygons on both ends so WAAPI can interpolate them.\n inKeyframes: [\n { clipPath: 'polygon(0% 0%, 0% 0%, -40% 100%, -40% 100%)' },\n { clipPath: 'polygon(0% 0%, 140% 0%, 100% 100%, -40% 100%)' },\n ],\n ontop: 'in',\n },\n 'inset-reveal': {\n category: 'reveal', label: 'Box reveal (from centre)',\n outKeyframes: RECEDE_SOFT,\n inKeyframes: [{ clipPath: 'inset(50% 50% 50% 50%)' }, { clipPath: 'inset(0 0 0 0)' }],\n ontop: 'in',\n },\n\n // ── Curtain (overlay panel sweeps across, hiding the swap) ────────────────\n // A solid panel covers the screen, the outgoing page is dropped behind it, then the panel\n // sweeps away revealing the incoming page. Colour comes from routeAnimation.curtainColor, or\n // the incoming page's own background.\n 'curtain-up': {\n category: 'curtain', label: 'Curtain up',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateY(100%)', 'translateY(0)'),\n uncoverKeyframes: move('translateY(0)', 'translateY(-100%)'),\n },\n },\n 'curtain-down': {\n category: 'curtain', label: 'Curtain down',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateY(-100%)', 'translateY(0)'),\n uncoverKeyframes: move('translateY(0)', 'translateY(100%)'),\n },\n },\n 'curtain-left': {\n category: 'curtain', label: 'Curtain left',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateX(100%)', 'translateX(0)'),\n uncoverKeyframes: move('translateX(0)', 'translateX(-100%)'),\n },\n },\n 'curtain-right': {\n category: 'curtain', label: 'Curtain right',\n outKeyframes: RECEDE_SOFT, inKeyframes: SETTLE_IN, ontop: 'in',\n overlay: {\n coverKeyframes: move('translateX(-100%)', 'translateX(0)'),\n uncoverKeyframes: move('translateX(0)', 'translateX(100%)'),\n },\n },\n\n // ── Move / Push (both pages travel the full distance, side by side — no overlap) ─────\n 'move-left': {\n category: 'move', label: 'Push left',\n outKeyframes: move('translateX(0)', 'translateX(-100%)'),\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n },\n 'move-right': {\n category: 'move', label: 'Push right',\n outKeyframes: move('translateX(0)', 'translateX(100%)'),\n inKeyframes: move('translateX(-100%)', 'translateX(0)'),\n },\n 'move-up': {\n category: 'move', label: 'Push up',\n outKeyframes: move('translateY(0)', 'translateY(-100%)'),\n inKeyframes: move('translateY(100%)', 'translateY(0)'),\n },\n 'move-down': {\n category: 'move', label: 'Push down',\n outKeyframes: move('translateY(0)', 'translateY(100%)'),\n inKeyframes: move('translateY(-100%)', 'translateY(0)'),\n },\n\n // ── Fade (incoming sits on top; outgoing dissolves or holds) ───────────────\n 'fade': {\n category: 'fade', label: 'Fade',\n outKeyframes: FADE_OUT, inKeyframes: FADE_IN, ontop: 'in',\n },\n 'fade-from-right': {\n category: 'fade', label: 'Fade / from right',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateX(100%)', opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }],\n ontop: 'in',\n },\n 'fade-from-left': {\n category: 'fade', label: 'Fade / from left',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateX(-100%)', opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }],\n ontop: 'in',\n },\n 'fade-from-bottom': {\n category: 'fade', label: 'Fade / from bottom',\n outKeyframes: FADE_OUT,\n inKeyframes: [{ transform: 'translateY(100%)', opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }],\n ontop: 'in',\n },\n\n // ── Scale ──────────────────────────────────────────────────────────────────\n 'scale-down-up': {\n category: 'scale', label: 'Scale down / scale up',\n outKeyframes: [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }],\n inKeyframes: [{ transform: 'scale(1.2)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'scale-down': {\n category: 'scale', label: 'Scale down / from right',\n outKeyframes: [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }],\n inKeyframes: move('translateX(100%)', 'translateX(0)'),\n ontop: 'in',\n },\n 'scale-up': {\n category: 'scale', label: 'Move to left / scale up',\n outKeyframes: move('translateX(0)', 'translateX(-100%)'),\n inKeyframes: [{ transform: 'scale(0.8)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }],\n ontop: 'out',\n },\n\n // ── Rotate / 3D (the cinematic \"wow\" family) ───────────────────────────────\n 'flip': {\n category: 'rotate', label: 'Flip',\n outKeyframes: [{ transform: 'rotateY(0deg)', opacity: 1 }, { transform: 'rotateY(-180deg)', opacity: 0 }],\n inKeyframes: [{ transform: 'rotateY(180deg)', opacity: 0 }, { transform: 'rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'cube-left': {\n category: 'rotate', label: 'Cube / to left',\n outKeyframes: [{ transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateZ(-800px) rotateY(-90deg)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateZ(-800px) rotateY(90deg)', opacity: 0.3 }, { transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'cube-right': {\n category: 'rotate', label: 'Cube / to right',\n outKeyframes: [{ transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateZ(-800px) rotateY(90deg)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateZ(-800px) rotateY(-90deg)', opacity: 0.3 }, { transform: 'translateZ(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '50% 50%', inTransformOrigin: '50% 50%',\n },\n 'carousel-left': {\n category: 'rotate', label: 'Carousel / to left',\n outKeyframes: [{ transform: 'translateX(0) scale(1)', opacity: 1 }, { transform: 'translateX(-150%) scale(0.4)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateX(200%) scale(0.4)', opacity: 0.3 }, { transform: 'translateX(0) scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'carousel-right': {\n category: 'rotate', label: 'Carousel / to right',\n outKeyframes: [{ transform: 'translateX(0) scale(1)', opacity: 1 }, { transform: 'translateX(150%) scale(0.4)', opacity: 0.3 }],\n inKeyframes: [{ transform: 'translateX(-200%) scale(0.4)', opacity: 0.3 }, { transform: 'translateX(0) scale(1)', opacity: 1 }],\n ontop: 'in',\n },\n 'fall': {\n category: 'rotate', label: 'Fall',\n outKeyframes: [{ transform: 'translateZ(0) rotateX(0deg)', opacity: 1 }, { transform: 'translateZ(-500px) rotateX(90deg)', opacity: 0 }],\n inKeyframes: FADE_IN,\n outTransformOrigin: '50% 50%', ontop: 'out', inDelayRatio: 0.3,\n },\n 'newspaper': {\n category: 'rotate', label: 'Newspaper',\n outKeyframes: [{ transform: 'scale(1) rotate(0deg)', opacity: 1 }, { transform: 'scale(0) rotate(720deg)', opacity: 0 }],\n inKeyframes: [{ transform: 'scale(0) rotate(-720deg)', opacity: 0 }, { transform: 'scale(1) rotate(0deg)', opacity: 1 }],\n ontop: 'in', inDelayRatio: 0.5,\n },\n 'fold-left': {\n category: 'rotate', label: 'Fold / unfold',\n outKeyframes: [{ transform: 'translateX(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateX(-100%) rotateY(-90deg)', opacity: 0.6 }],\n inKeyframes: [{ transform: 'translateX(100%) rotateY(90deg)', opacity: 0.6 }, { transform: 'translateX(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '0% 50%', inTransformOrigin: '100% 50%', ontop: 'in',\n },\n 'room-left': {\n category: 'rotate', label: 'Room / to left',\n outKeyframes: [{ transform: 'translateX(0) rotateY(0deg)', opacity: 1 }, { transform: 'translateX(-100%) rotateY(90deg)', opacity: 0.4 }],\n inKeyframes: [{ transform: 'translateX(100%) rotateY(-90deg)', opacity: 0.4 }, { transform: 'translateX(0) rotateY(0deg)', opacity: 1 }],\n outTransformOrigin: '100% 50%', inTransformOrigin: '0% 50%',\n },\n};\n\n// ── \"Feel\" — duration + easing as a named vibe ───────────────────────────────\n// Most authors want to pick a *feeling*, not a bezier. A feel sets duration + easing together;\n// editing either by hand simply falls back to 'custom' (see feelFor).\nexport interface TransitionFeel {\n value: string;\n label: string;\n duration: number;\n easing: string;\n description: string;\n}\n\nexport const TRANSITION_FEELS: TransitionFeel[] = [\n { value: 'calm', label: 'Calm', duration: 1800, easing: 'cubic-bezier(0.33, 1, 0.68, 1)', description: 'Slow and unhurried — editorial, luxury' },\n { value: 'cinematic', label: 'Cinematic', duration: 1500, easing: DEFAULT_PAGE_TRANSITION_EASING, description: 'Long settle with a strong middle — the default' },\n { value: 'smooth', label: 'Smooth', duration: 1200, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', description: 'Quick out of the gate, glides to a stop' },\n { value: 'snappy', label: 'Snappy', duration: 600, easing: 'cubic-bezier(0.16, 1, 0.3, 1)', description: 'Fast and responsive — app-like' },\n { value: 'crazy', label: 'Crazy', duration: 900, easing: 'cubic-bezier(0.68, -0.6, 0.32, 1.6)', description: 'Overshoots and springs back' },\n];\n\n/** The feel matching this duration+easing exactly, else 'custom'. Drives the panel's selector. */\nexport function feelFor(duration: number | string | undefined, easing: string | undefined): string {\n const d = toFiniteNumber(duration, DEFAULT_PAGE_TRANSITION_DURATION);\n const e = easing || DEFAULT_PAGE_TRANSITION_EASING;\n return TRANSITION_FEELS.find(f => f.duration === d && f.easing === e)?.value ?? 'custom';\n}\n\n/** The duration+easing patch for a feel id (undefined for 'custom' / unknown). */\nexport function applyFeel(feel: string): { duration: number; easing: string } | undefined {\n const f = TRANSITION_FEELS.find(x => x.value === feel);\n return f ? { duration: f.duration, easing: f.easing } : undefined;\n}\n\n// ── Two-select UI metadata (category ▾ → transition ▾) ───────────────────────\nexport interface PageTransitionCategoryMeta {\n value: PageTransitionCategory;\n label: string;\n presets: { value: string; label: string }[];\n}\n\n/** Built from PAGE_TRANSITION_PRESETS so the two lists can never drift apart. */\nexport const PAGE_TRANSITION_CATEGORIES: PageTransitionCategoryMeta[] = (() => {\n const order: { value: PageTransitionCategory; label: string }[] = [\n { value: 'parallax', label: 'Smooth (parallax)' },\n { value: 'reveal', label: 'Reveal (mask)' },\n { value: 'curtain', label: 'Curtain (overlay)' },\n { value: 'move', label: 'Push / slide' },\n { value: 'fade', label: 'Fade' },\n { value: 'scale', label: 'Scale' },\n { value: 'rotate', label: 'Rotate / 3D' },\n ];\n return order.map(cat => ({\n ...cat,\n presets: Object.entries(PAGE_TRANSITION_PRESETS)\n .filter(([, p]) => p.category === cat.value)\n .map(([value, p]) => ({ value, label: p.label })),\n }));\n})();\n\n// ── Resolver: preset → concrete WAAPI frames + options ───────────────────────\nexport interface PageTransitionOptions {\n /** Total transition duration (ms). Accepts a numeric string — builder inputs persist strings. */\n duration?: number | string;\n easing?: string;\n /** Container perspective (px); a preset-specific perspective still wins. */\n perspective?: number | string;\n}\n\n/** Coerce a possibly-string / invalid numeric setting to a usable finite, non-negative number. */\nfunction toFiniteNumber(value: unknown, fallback: number): number {\n const n = typeof value === 'number' ? value : Number(value);\n return Number.isFinite(n) && n >= 0 ? n : fallback;\n}\n\nexport interface ResolvedPageTransition {\n outFrames: Keyframe[];\n inFrames: Keyframe[];\n outOptions: KeyframeAnimationOptions;\n inOptions: KeyframeAnimationOptions;\n ontop: 'in' | 'out';\n perspective: number;\n outTransformOrigin?: string;\n inTransformOrigin?: string;\n /** Present only for curtain presets — each half runs for HALF the total duration. */\n overlay?: {\n coverFrames: Keyframe[];\n uncoverFrames: Keyframe[];\n coverOptions: KeyframeAnimationOptions;\n uncoverOptions: KeyframeAnimationOptions;\n };\n}\n\n/**\n * Resolve a persisted preset id + timing into the two WAAPI animations the consumer runs.\n * Returns `null` for unknown / 'none' presets (caller should skip the transition).\n */\nexport function resolvePageTransition(\n name: string | null | undefined,\n opts: PageTransitionOptions = {},\n): ResolvedPageTransition | null {\n if (!name || name === 'none') return null;\n const preset = PAGE_TRANSITION_PRESETS[name];\n if (!preset) return null;\n\n // Builder numeric inputs persist as STRINGS (e.g. duration:\"413\"), and WAAPI throws on a\n // non-numeric `duration` — which silently kills the whole transition. Coerce defensively here,\n // the single point where these values become animation options, so every consumer is protected\n // and already-saved string data keeps working.\n const duration = toFiniteNumber(opts.duration, DEFAULT_PAGE_TRANSITION_DURATION);\n const easing = opts.easing || DEFAULT_PAGE_TRANSITION_EASING;\n const perspective = toFiniteNumber(\n preset.perspective ?? opts.perspective, DEFAULT_PAGE_TRANSITION_PERSPECTIVE,\n );\n\n const clampRatio = (r?: number) => Math.max(0, Math.min(1, r ?? 0));\n const outDelay = clampRatio(preset.outDelayRatio) * duration;\n const inDelay = clampRatio(preset.inDelayRatio) * duration;\n\n return {\n outFrames: preset.outKeyframes,\n inFrames: preset.inKeyframes,\n // OUT plays on a throwaway snapshot → 'both' (hold keyframe[0] during delay, keyframe[last] after).\n outOptions: { duration, easing, delay: outDelay, fill: 'both' },\n // IN plays on the LIVE page host, so it must NOT persist its end state: a lingering `transform`\n // makes that host a containing block for absolutely-positioned descendants, collapsing a\n // `position:absolute; inset:0` page shell (iox-page-component) to 0 height. Every `in` preset\n // ends at identity (translate 0 / scale 1 / opacity 1), so 'backwards' — which only holds\n // keyframe[0] during the delay — is visually identical and leaves no residue.\n inOptions: { duration, easing, delay: inDelay, fill: 'backwards' },\n ontop: preset.ontop ?? 'in',\n perspective,\n outTransformOrigin: preset.outTransformOrigin,\n inTransformOrigin: preset.inTransformOrigin,\n overlay: preset.overlay && {\n coverFrames: preset.overlay.coverKeyframes,\n uncoverFrames: preset.overlay.uncoverKeyframes,\n // Cover and uncover split the total duration; 'both' holds the panel in place between\n // the two halves so the swap is never visible through a gap.\n coverOptions: { duration: duration / 2, easing, fill: 'both' },\n uncoverOptions: { duration: duration / 2, easing, fill: 'both' },\n },\n };\n}\n\n// ── Orchestration timeline (pure ordering / gating decision) ─────────────────\nexport type TransitionPhase = 'leave' | 'transition' | 'enter';\n\nexport interface TransitionTimelineInput {\n /** At least one element on the outgoing page has a `pageLeave` interaction. */\n hasLeave: boolean;\n /** A page transition preset is configured (and not 'none'). */\n hasTransition: boolean;\n /** At least one element on the incoming page has a `pageEnter` interaction. */\n hasEnter: boolean;\n}\n\n/**\n * The ordered phases a navigation runs, given what is present. The order is INVARIANT:\n * every element `leave` animation finishes before the page `transition` starts, and the page\n * `transition` finishes before any element `enter` animation begins. Phases with nothing to\n * play are omitted. The engine iterates this list and `await`s each phase's completion.\n */\nexport function buildTransitionTimeline(input: TransitionTimelineInput): TransitionPhase[] {\n const phases: TransitionPhase[] = [];\n if (input.hasLeave) phases.push('leave');\n if (input.hasTransition) phases.push('transition');\n if (input.hasEnter) phases.push('enter');\n return phases;\n}\n\n// ── Back-compat migration from the legacy single-page route-animation presets ─\n/**\n * Map a legacy `enter` preset (none/fade/slideUp/slideDown/zoomIn/zoomOut/blurIn/flip) to the\n * nearest cinematic paired `transition` id, so pages saved before this system keep animating.\n * Returns 'fade' for anything unmapped, and 'none' for 'none'.\n */\nexport function legacyEnterToTransition(enter: string | null | undefined): string {\n switch (enter) {\n case 'none': return 'none';\n case 'slideUp': return 'fade-from-bottom';\n case 'slideDown': return 'fade';\n case 'zoomIn': return 'scale-down-up';\n case 'zoomOut': return 'scale-down-up';\n case 'blurIn': return 'fade';\n case 'flip': return 'flip';\n case 'fade': return 'fade';\n // Never configured (or an unrecognised value) → the default parallax transition.\n default: return DEFAULT_PAGE_TRANSITION;\n }\n}\n\n/**\n * Resolve the effective transition id for a page's route-animation settings: the explicit\n * `transition` when present, otherwise migrated from the legacy `enter` preset.\n */\nexport function effectiveTransitionId(anim: { transition?: string | null; enter?: string | null } | null | undefined): string {\n if (!anim) return DEFAULT_PAGE_TRANSITION;\n if (anim.transition) return anim.transition;\n return legacyEnterToTransition(anim.enter);\n}\n\n// ── Between pages: the look's choice → the transition a page plays (AI plan rev 3.1 §3p) ───────────────\n/** The settings a page's own `routeAnimation` carries (Page ▸ Design ▸ Route animation). */\nexport interface RouteAnimationLike {\n transition?: string | null;\n enter?: string | null;\n duration?: number | string;\n easing?: string;\n perspective?: number | string;\n curtainColor?: string;\n}\n\nexport interface PageTransitionContext {\n /** `pageSettings.designSystem` — only a design-system page follows the look. */\n designSystem?: boolean;\n /** The look's Between pages choice (`designMotion.between`); absent = `PRE_MOTION.between`. */\n between?: string | null;\n /** The viewport is a phone (`PHONE_TRANSITION_QUERY`): Slide and Cinematic play their `phone` choice. */\n phone?: boolean;\n /** The page reads right to left: a Slide pushes from the other side. */\n rtl?: boolean;\n /** The page's initial (hydrated) load — no outgoing page. */\n initial?: boolean;\n}\n\n/** What `resolvePageTransition` is asked for. `transition: 'none'` is a valid, silent choice. */\nexport interface PlannedPageTransition {\n transition: string;\n duration?: number | string;\n easing?: string;\n perspective?: number | string;\n curtainColor?: string;\n /** The page follows the look (rather than its own Route animation). */\n fromLook: boolean;\n}\n\nexport const NO_PAGE_TRANSITION = 'none';\n\n/** The widest viewport a page change treats as a phone (MO-D5): the Mobile landscape breakpoint. */\nexport const PHONE_TRANSITION_QUERY = `(max-width: ${breakpointDef(Breakpoint.Mobile)!.maxWidth}px)`;\n\n/** What a window can tell `pageTransitionOf`: the media query and the computed direction. */\nexport interface TransitionViewport {\n matchMedia?: (query: string) => { matches: boolean };\n getComputedStyle?: (el: Element) => { direction?: string };\n}\n\n/**\n * The part of the context only the browser knows — is this a phone, does the page read right to left —\n * read the same way by every runtime that plays a page change (the engine, Preview). No window → neither.\n */\nexport function viewportTransitionContext(view: TransitionViewport | null | undefined, el: Element | null | undefined): Pick<PageTransitionContext, 'phone' | 'rtl'> {\n return {\n phone: !!view?.matchMedia?.(PHONE_TRANSITION_QUERY)?.matches,\n rtl: !!el && view?.getComputedStyle?.(el)?.direction === 'rtl',\n };\n}\n\n/** The page set its own transition (a preset id, or a legacy `enter` that migrates to one). */\nexport function hasOwnPageTransition(anim: RouteAnimationLike | null | undefined): boolean {\n return !!(anim?.transition || anim?.enter);\n}\n\n/**\n * The ONE decision of what plays when a page arrives, for the engine and every builder preview:\n * • a page with its own Route animation plays it, exactly as before (an unflagged page too: with none set\n * it keeps the platform default, `effectiveTransitionId`);\n * • a design-system page with none follows the look's Between pages — never on its initial load (MO-D6:\n * no IN half, no server pre-state), as Fade on a phone for Slide and Cinematic (MO-D5), mirrored in RTL.\n * Reduced motion is the runtime's own question (`motionAllowed`), asked before anything plays.\n */\nexport function pageTransitionOf(anim: RouteAnimationLike | null | undefined, ctx: PageTransitionContext = {}): PlannedPageTransition {\n if (!ctx.designSystem || hasOwnPageTransition(anim)) {\n return {\n transition: effectiveTransitionId(anim),\n duration: anim?.duration, easing: anim?.easing, perspective: anim?.perspective, curtainColor: anim?.curtainColor,\n fromLook: false,\n };\n }\n if (ctx.initial) return { transition: NO_PAGE_TRANSITION, fromLook: true };\n let choice: BetweenChoice = SPEC_AXES.betweens[resolveDesignMotion({ between: ctx.between }).between];\n if (ctx.phone && choice.phone) choice = SPEC_AXES.betweens[choice.phone as BetweenId];\n const feel = choice.feel ? applyFeel(choice.feel) : undefined;\n return {\n transition: ctx.rtl && choice.rtl ? choice.rtl : choice.transition,\n ...(feel ?? {}),\n fromLook: true,\n };\n}\n\ntype BetweenChoice = { readonly transition: string; readonly feel?: string; readonly rtl?: string; readonly phone?: string };\n\n","import { ResolvedPageTransition } from './page-transition-presets';\n\n/** The two layers a builder preview of a page change plays on, and the stage that holds them. */\nexport interface TransitionPreviewLayers {\n /** Holds both layers; it carries the perspective the 3D presets need. */\n stage: HTMLElement;\n /** The page that leaves. */\n out: HTMLElement | null;\n /** The page that arrives. */\n in: HTMLElement | null;\n}\n\n/**\n * Play a resolved page change (`resolvePageTransition`) on two stacked layers — the ONE dual-layer preview the\n * builder's Page panel and the Design step's specimen both play (rev 3.1 §3o). The live site plays the same\n * frames through its own transition service. Resolves when the arriving layer has finished (or at once when\n * there is no arriving layer). The layers are left at their last frame: the caller decides what to show after.\n */\nexport function playDualLayerTransition(resolved: ResolvedPageTransition, layers: TransitionPreviewLayers): Promise<void> {\n const { stage, out, in: inc } = layers;\n stage.style.perspective = `${resolved.perspective}px`;\n if (out) {\n if (resolved.outTransformOrigin) out.style.transformOrigin = resolved.outTransformOrigin;\n out.getAnimations().forEach(a => a.cancel());\n out.animate(resolved.outFrames, resolved.outOptions);\n }\n if (!inc) return Promise.resolve();\n if (resolved.inTransformOrigin) inc.style.transformOrigin = resolved.inTransformOrigin;\n inc.style.zIndex = resolved.ontop === 'in' ? '2' : '1';\n inc.getAnimations().forEach(a => a.cancel());\n return inc.animate(resolved.inFrames, resolved.inOptions).finished.then(() => undefined, () => undefined);\n}\n","import {\n ClientFormSpec,\n FieldSpec,\n failureAnnouncement,\n FORM_ANNOUNCER_ATTRIBUTE,\n FORM_FIELDS_ATTRIBUTE,\n FORM_STATE_ATTRIBUTE,\n FormRenderState,\n FormRuntimeState,\n FormTransport,\n HONEYPOT_FIELD,\n INITIAL_FORM_STATE,\n isMultiValueField,\n ControlType,\n FieldClass,\n onFieldBlur,\n onFieldChange,\n onSubmitAttempt,\n parseClientFormSpec,\n resetFormState,\n shouldShowError,\n submitOutcome,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { defaultMessageResolver, FormMessageResolver } from './form-runtime.service';\nimport { shakeElement } from './shake';\nimport { syncSubmitButtons } from './submit-buttons';\n\n/** What a host gives a string-rendered form: the POST (the engine's), where a redirect goes, how a message reads. */\nexport interface StringFormOptions {\n transport?: FormTransport | null;\n navigate?: ((url: string) => void) | null;\n messages?: FormMessageResolver;\n}\n\nconst FIELD_ATTRIBUTE = 'data-iox-field';\nconst CONTROL_CLASS = 'iox-field__control';\nconst ERROR_CLASS = 'iox-field__error';\nconst HELP_CLASS = 'iox-field__help';\nconst INVALID_CLASS = 'iox-invalid';\nconst BOOTED = '__ioxStringForm';\n\n/**\n * A form the SSR engine's string renderer wrote — every header / footer global, every string-rendered page —\n * run with the behaviour `IoxFormComponent` gives a component-path form (vectoriox/iox-client-engine#13): the\n * forms-core runtime decides when an error shows, a valid submit POSTs through the host's transport with the\n * anti-spam fields, the form moves idle → submitting → success / error on `data-iox-state` (the shared CSS shows\n * the designed block), the first problem takes focus and the failure is announced. Nothing posts natively.\n *\n * Its fields come from the form itself (`data-iox-form-fields`, the spec minus its destinations), so the\n * runtime needs no node tree. Idempotent per element.\n */\nexport class StringFormRuntime {\n private state: FormRuntimeState = INITIAL_FORM_STATE;\n private inFlight = false;\n private readonly renderedAt = Date.now();\n private readonly listeners: Array<[string, EventListener]> = [];\n private readonly messages: FormMessageResolver;\n\n constructor(private readonly form: HTMLFormElement, private readonly spec: ClientFormSpec, private readonly options: StringFormOptions = {}) {\n this.messages = options.messages ?? defaultMessageResolver;\n this.listen('input', e => this.onEdit(e));\n this.listen('change', e => this.onEdit(e));\n this.listen('focusout', e => this.onLeave(e));\n this.listen('submit', e => this.onSubmit(e));\n (form as any)[BOOTED] = this;\n }\n\n destroy(): void {\n for (const [type, fn] of this.listeners) this.form.removeEventListener(type, fn);\n this.listeners.length = 0;\n delete (this.form as any)[BOOTED];\n }\n\n /** The visitor's answers, keyed by the spec's field names. */\n values(): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const field of this.spec.fields) out[field.name] = this.valueOf(field);\n return out;\n }\n\n private listen(type: string, fn: (e: Event) => void): void {\n this.form.addEventListener(type, fn);\n this.listeners.push([type, fn]);\n }\n\n private fieldNameOf(event: Event): string | null {\n const target = event.target as Element | null;\n if (!target?.classList?.contains(CONTROL_CLASS)) return null;\n return target.closest(`[${FIELD_ATTRIBUTE}]`)?.getAttribute(FIELD_ATTRIBUTE) ?? null;\n }\n\n private onEdit(event: Event): void {\n const name = this.fieldNameOf(event);\n if (!name) return;\n this.state = onFieldChange(this.state, name, this.values(), this.fullSpec());\n this.render();\n }\n\n private onLeave(event: Event): void {\n const name = this.fieldNameOf(event);\n if (!name) return;\n // Leaving one chip for the next, or the date button for its own calendar, is not leaving the FIELD: Smart timing\n // must not say \"Choose a date\" while the visitor is choosing one.\n const next = (event as FocusEvent).relatedTarget as Node | null;\n if (next && this.fieldElement(name)?.contains(next)) return;\n this.state = onFieldBlur(this.state, name, this.values(), this.fullSpec());\n this.render();\n }\n\n private onSubmit(event: Event): void {\n // Never the browser's own submission: it would reload the page with the answers in the address and send nothing.\n event.preventDefault();\n // Sent is final (premium N2): the button reads \"Sent\" and is disabled — nothing sends twice.\n if (this.inFlight || this.form.getAttribute(FORM_STATE_ATTRIBUTE) === FormRenderState.Success) return;\n const values = this.values();\n this.state = onSubmitAttempt(this.state, values, this.fullSpec());\n this.render();\n if (Object.keys(this.state.errors).length) {\n this.announce(this.state.errors);\n this.focusFirstInvalid();\n return;\n }\n if (!this.options.transport) return;\n void this.send(values);\n }\n\n private async send(values: Record<string, unknown>): Promise<void> {\n this.inFlight = true;\n this.setRenderState(FormRenderState.Submitting);\n let response: SubmitResponse;\n try {\n response = await this.options.transport!({\n formId: this.form.getAttribute('data-iox-form') ?? '',\n values: withAntiSpamFields(values, this.renderedAt, this.honeypotValue()),\n });\n } catch {\n // The call never reached the server — the Error block, never Success.\n response = { ok: false };\n }\n this.inFlight = false;\n this.apply(response);\n }\n\n private apply(response: SubmitResponse): void {\n const outcome = submitOutcome(response);\n this.setRenderState(outcome.state);\n if (outcome.errors) {\n this.state = { ...this.state, submitted: true, submitting: false, errors: { ...outcome.errors } };\n this.render();\n this.announce(outcome.errors);\n this.focusFirstInvalid();\n return;\n }\n if (outcome.state === FormRenderState.Error) {\n this.announce(null);\n return;\n }\n this.form.reset();\n this.state = resetFormState();\n this.render();\n if (outcome.redirect) this.options.navigate?.(outcome.redirect);\n }\n\n private setRenderState(state: FormRenderState): void {\n this.form.setAttribute(FORM_STATE_ATTRIBUTE, state);\n if (state === FormRenderState.Submitting) this.form.setAttribute('aria-busy', 'true');\n else this.form.removeAttribute('aria-busy');\n syncSubmitButtons(this.form, state);\n this.state = { ...this.state, submitting: state === FormRenderState.Submitting };\n }\n\n private fullSpec() {\n return { formId: '', name: '', feedback: this.spec.feedback as any, fields: this.spec.fields, actions: [], antiSpam: { honeypot: true, minFillMs: 0 } };\n }\n\n private fieldElement(name: string): HTMLElement | null {\n // Compared, never interpolated into a selector: a field key may hold characters a selector chokes on.\n for (const el of Array.from(this.form.querySelectorAll<HTMLElement>(`[${FIELD_ATTRIBUTE}]`))) {\n if (el.getAttribute(FIELD_ATTRIBUTE) === name && el.closest('form') === this.form) return el;\n }\n return null;\n }\n\n private controlsOf(field: HTMLElement): HTMLInputElement[] {\n return Array.from(field.querySelectorAll<HTMLInputElement>(`.${CONTROL_CLASS}`));\n }\n\n private valueOf(spec: FieldSpec): unknown {\n const el = this.fieldElement(spec.name);\n if (!el) return undefined;\n // A Date's answer is the ISO day its hidden input carries (N8) — never the button's words.\n if (spec.control === ControlType.Date) return el.querySelector<HTMLInputElement>(`input.${FieldClass.DateInput}`)?.value ?? '';\n const controls = this.controlsOf(el);\n const first = controls[0];\n if (!first) return undefined;\n // Several answers (Choices, N1): the ticked options' values, in the options' order — forms-core decides.\n if (isMultiValueField(spec)) return controls.filter(c => c.checked).map(c => c.value);\n if (first.type === 'radio') return controls.find(c => c.checked)?.value ?? '';\n if (first.type === 'checkbox') return first.checked;\n if (first.type === 'range') return Number(first.value);\n return first.value;\n }\n\n /** Every field's error, aria-invalid, describedby and invalid class — as `IoxFieldComponent` renders them. */\n private render(): void {\n for (const field of this.spec.fields) {\n const el = this.fieldElement(field.name);\n if (!el) continue;\n const error = this.state.errors[field.name];\n const shown = !!error && shouldShowError(field.name, this.state, this.spec.feedback);\n const text = shown ? this.messages(error!.messageKey, error!.params) : '';\n el.classList.toggle(INVALID_CLASS, shown && !!text);\n this.renderError(el, shown ? text : '');\n }\n }\n\n private renderError(field: HTMLElement, text: string): void {\n const controls = this.controlsOf(field);\n const id = (controls[0]?.id || `iox-field-${field.getAttribute(FIELD_ATTRIBUTE)}`) + '-error';\n let p = field.querySelector<HTMLElement>(`.${ERROR_CLASS}`);\n if (text) {\n if (!p) {\n p = field.ownerDocument.createElement('p');\n p.className = ERROR_CLASS;\n p.id = id;\n p.setAttribute('role', 'alert');\n field.appendChild(p);\n }\n p.textContent = text;\n } else {\n p?.remove();\n }\n const helpId = field.querySelector(`.${HELP_CLASS}`)?.id;\n const describedBy = [helpId, text ? id : ''].filter(Boolean).join(' ');\n for (const control of controls) {\n if (text) control.setAttribute('aria-invalid', 'true');\n else control.removeAttribute('aria-invalid');\n if (describedBy) control.setAttribute('aria-describedby', describedBy);\n else control.removeAttribute('aria-describedby');\n }\n }\n\n private announce(errors: Record<string, unknown> | null): void {\n const region = this.form.querySelector<HTMLElement>(`[${FORM_ANNOUNCER_ATTRIBUTE}]`);\n if (!region) return;\n // Cleared first: a live region speaks on CHANGE, and the same failure twice must be said twice.\n region.textContent = '';\n const next = failureAnnouncement(errors);\n Promise.resolve().then(() => { region.textContent = next; });\n }\n\n /** Focus the first field that failed and shake it once (premium N2 — the ONE `shakeElement`). */\n private focusFirstInvalid(): void {\n for (const field of this.spec.fields) {\n if (!this.state.errors[field.name]) continue;\n const el = this.fieldElement(field.name);\n this.controlsOf(el ?? this.form)[0]?.focus();\n shakeElement(el);\n return;\n }\n }\n\n private honeypotValue(): string {\n return this.form.querySelector<HTMLInputElement>(`input[name=\"${HONEYPOT_FIELD}\"]`)?.value ?? '';\n }\n}\n\n/** The runtime already running a form element, if any. */\nexport function stringFormRuntimeOf(form: Element | null | undefined): StringFormRuntime | null {\n return ((form as any)?.[BOOTED] as StringFormRuntime | undefined) ?? null;\n}\n\n/**\n * Run a string-rendered form (one carrying `data-iox-form-fields`) — once: a form already running is returned as is.\n * Null for an element that is not one (a component-path form never carries the attribute; it runs itself).\n */\nexport function attachStringForm(form: Element | null | undefined, options: StringFormOptions = {}): StringFormRuntime | null {\n if (!form || (form as HTMLElement).tagName !== 'FORM') return null;\n const running = stringFormRuntimeOf(form);\n if (running) return running;\n const spec = parseClientFormSpec(form.getAttribute(FORM_FIELDS_ATTRIBUTE));\n return spec ? new StringFormRuntime(form as HTMLFormElement, spec, options) : null;\n}\n","/*\n * Public API Surface of iox-ui\n */\n\nexport * from './lib/view-position/view-position.directive';\nexport * from './lib/view-position/view-position.module';\n\nexport * from './lib/iox-aos/iox-aos.directive';\nexport * from './lib/iox-aos/iox-aos-container.component';\nexport * from './lib/iox-aos/iox-aos.service';\nexport * from './lib/iox-aos/iox-aos.module';\n\nexport * from './lib/iox-ui.module';\nexport * from './lib/iox-page/page-component/page-component.component';\nexport * from './lib/iox-page/iox-page.module';\nexport * from './lib/services/page-scroll.provider';\nexport * from './lib/services/component-instance-registry.service';\n\n// CMS client infra\n\n// Builder components — extracted from iox-cms-client for shared use in builder + client engine\nexport * from './lib/builder-components/builder-tokens';\nexport * from './lib/builder-components/iox-builder-components.module';\nexport * from './lib/builder-components/iox-component-registry.service';\nexport * from './lib/builder-components/image/image.component';\nexport * from './lib/builder-components/spacer/spacer.component';\nexport * from './lib/builder-components/card/card.component';\nexport * from './lib/builder-components/divider/divider.component';\nexport * from './lib/builder-components/icon/icon.component';\nexport * from './lib/builder-components/link/link.component';\nexport * from './lib/builder-components/button/button.component';\nexport * from './lib/builder-components/button-block/button-block.component';\nexport * from './lib/builder-components/heading/heading.component';\nexport * from './lib/builder-components/text/text.component';\nexport * from './lib/builder-components/section/section.component';\nexport * from './lib/builder-components/container/container.component';\nexport * from './lib/builder-components/linked-container/linked-container.component';\nexport * from './lib/builder-components/repeater/repeater.component';\nexport * from './lib/builder-components/slider-container/slider-container.component';\nexport * from './lib/builder-components/slider-container/swiper-modules';\nexport * from './lib/builder-components/slider-container/slider-options';\nexport * from './lib/builder-components/slider-container/slider-boot';\nexport * from './lib/builder-components/slider-slide/slider-slide.component';\nexport * from './lib/builder-components/list/list.component';\nexport * from './lib/builder-components/list-item/list-item.component';\n\nexport * from './lib/style-compiler/style-compiler';\nexport * from './lib/style-compiler/virtual-traits';\nexport * from './lib/style-compiler/tree-relations';\nexport * from './lib/style-compiler/parts';\nexport * from './lib/style-compiler/state-selectors';\nexport * from './lib/style-compiler/responsive';\nexport * from './lib/style-compiler/swiper-breakpoints';\n// CC1 — navigation that works at every width: the current page link, the accessibility attributes every\n// renderer writes (names, openers, the drawer's close-above), reduced motion and the ONE interaction\n// keyframe table both runtimes animate from.\nexport * from './lib/navigation/current-link';\n// Premium components M4 (T2): a header that steps aside on the way down and comes back on the way up.\nexport * from './lib/navigation/header-runtime';\nexport * from './lib/a11y/node-attributes';\nexport * from './lib/motion/motion';\nexport * from './lib/motion/scroll-plan';\nexport * from './lib/motion/interaction-keyframes';\nexport * from './lib/motion/interaction-easing';\nexport * from './lib/motion/pointer-intent';\nexport * from './lib/motion/scrolled';\n// Design system — tokens, flavors, token CSS, fonts. Lives in the framework-free entry point\n// `@vectoriox/iox-ui/design-core` (iox-cms imports it under plain Node); re-exported here BY PACKAGE\n// PATH, so the main FESM imports that entry instead of bundling a second copy of the contract.\nexport * from '@vectoriox/iox-ui/design-core';\nexport * from './lib/page-style/page-style';\n// Data sources — the planner, the resolvers, the referenced-alias walk. Framework-free entry\n// `@vectoriox/iox-ui/data-core` (iox-cms reads it too); re-exported here BY PACKAGE PATH.\nexport * from '@vectoriox/iox-ui/data-core';\nexport * from './lib/binding-pipes';\nexport * from './lib/render/component-input.util';\n\n// Icon class repair — a Phosphor class needs a weight AND a name; one saved without its weight\n// renders as an invisible box. Shared by the builder's Icon component and the SSR renderer.\nexport * from './lib/icons/normalize-icon-class';\n\n// Binding path resolution — ONE implementation for every renderer (builder canvas, SSR string\n// renderer, SSR component renderer). Previously forked three ways and already drifted.\nexport * from './lib/binding/resolve-path';\n// …and the path + pipes pair, which had been retyped at every one of those call sites.\nexport * from './lib/binding/resolve-bound-value';\n\n// Page SEO — the resolution ladder (override → binding → auto). The shape, the tag emitter and the\n// authoring schema are in the framework-free entry point `@vectoriox/iox-ui/seo-core`, which\n// `iox-cms` imports under plain Node; only the ladder needs the binding resolver, so only it lives\n// here. See iox-ai-guidance architecture/cms/seo-plan.md.\nexport * from './lib/seo/resolve-seo';\n// …and the authoring-side view of the same ladder, so the panel's chip cannot disagree with what\n// the renderer does.\nexport * from './lib/seo/seo-fields';\n\n// Element context state — named runtime slots an interaction writes and bindings read. A slot is a\n// data-source alias whose value is written rather than fetched, so bindings need no new grammar.\nexport * from './lib/context/context-slot.model';\nexport * from './lib/context/context-value';\nexport * from './lib/context/context-store';\nexport * from './lib/context/context-actions';\nexport * from './lib/context/context-collect';\nexport * from './lib/context/action-enabled';\nexport * from './lib/page-transition/page-transition-presets';\nexport * from './lib/page-transition/page-transition-preview';\n\n// Gallery — shared pure core (URL resolver, effect registry, crossfade loop). The Gallery\n// component twins (builder + engine) are added in later phases; this is Phase 0 logic only.\nexport * from './lib/builder-components/gallery/gallery.model';\nexport * from './lib/builder-components/gallery/gallery-effects';\nexport * from './lib/builder-components/gallery/gallery-loop';\nexport * from './lib/builder-components/gallery/gallery.component';\nexport * from './lib/builder-components/video/video.component';\n\n// Forms — the component twins. The framework-free core (validation, spec) is a SEPARATE entry\n// point, `@vectoriox/iox-ui/forms-core`, so NestJS can import it without Angular.\nexport * from './lib/builder-components/form/form.component';\nexport * from './lib/builder-components/form/field.component';\nexport * from './lib/builder-components/form/submit-button.component';\nexport * from './lib/builder-components/form/form-state-blocks.component';\nexport * from './lib/builder-components/dialog/dialog.component';\n// The per-form runtime and the i18n hook. A consumer MUST be able to import IOX_FORM_MESSAGES to\n// plug its own translations in, so this belongs on the public surface, not just as a type used by\n// the components' signatures.\nexport * from './lib/builder-components/form/form-runtime.service';\n// The string-rendered form's runtime (every header / footer global) — the component's behaviour, by DOM.\nexport * from './lib/builder-components/form/string-form.runtime';\nexport * from './lib/builder-components/form/submit-buttons';\n// Premium components M3: the date picker's DOM runtime (N8), the failing field's shake (N2) and the ONE anchored\n// placement every floating panel uses (N8 now, M5's tooltip / popover next).\nexport * from './lib/builder-components/form/date-picker.runtime';\nexport * from './lib/builder-components/form/shake';\nexport * from './lib/floating/place-floating';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AOSService","i1.IoxAnimateContainer","i1.PageScrollProvider","pick","num","i1.FormRuntimeService","i2","i2.PageScrollProvider","i1","trimmed","asRecord","readField","fieldValue","writeField"],"mappings":";;;;;;;;;;;;;;;;;;;MAOa,qBAAqB,CAAA;AAkB9B,IAAA,WAAA,CAAoB,IAAe,EAAA;QAAf,IAAA,CAAA,IAAI,GAAJ,IAAI;QAVhB,IAAA,CAAA,gBAAgB,GAAS,MAAM;QAC/B,IAAA,CAAA,UAAU,GAAU,CAAC;QACtB,IAAA,CAAA,UAAU,GAAY,KAAK;QAC3B,IAAA,CAAA,YAAY,GAAY,KAAK;AAG1B,QAAA,IAAA,CAAA,OAAO,GAAqB,IAAI,YAAY,EAAE;AAC9C,QAAA,IAAA,CAAA,OAAO,GAAqB,IAAI,YAAY,EAAE;AAC9C,QAAA,IAAA,CAAA,MAAM,GAAqB,IAAI,YAAY,EAAE;QAGnD,IAAI,CAAC,sBAAsB,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,CAAA,gBAAA,EAAmB,IAAI,CAAC,eAAe,CAAA,CAAE,CAAC;IAC1D;IAGA,eAAe,GAAA;QACX,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS;QACzD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY;QAC1D,OAAO,CAAC,GAAG,CAAC,CAAA,mBAAA,EAAsB,IAAI,CAAC,gBAAgB,CAAA,CAAE,CAAC;IA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