@vectoriox/iox-ui 5.2.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/consent-core/index.d.ts +60 -0
- package/consent-core/package.json +3 -0
- package/fesm2022/vectoriox-iox-ui-consent-core.mjs +141 -0
- package/fesm2022/vectoriox-iox-ui-consent-core.mjs.map +1 -0
- package/fesm2022/vectoriox-iox-ui.mjs +90 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +62 -2
- package/package.json +5 -1
- package/src/consent-core/consent-mode.ts +38 -0
- package/src/consent-core/consent.model.ts +64 -0
- package/src/consent-core/public-api.ts +14 -0
- package/src/consent-core/storage.ts +43 -0
|
@@ -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/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/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/lib/style-compiler/responsive.ts","../../../projects/iox-ui/src/lib/style-compiler/swiper-breakpoints.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/data-source/data-source-resolver.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/validate.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/public-api.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-runtime.service.ts","../../../projects/iox-ui/src/lib/builder-components/form/form.component.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/iox-builder-components.module.ts","../../../projects/iox-ui/src/lib/builder-components/iox-component-registry.service.ts","../../../projects/iox-ui/src/lib/style-compiler/style-compiler.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/token-css.ts","../../../projects/iox-ui/src/lib/page-style/page-style.ts","../../../projects/iox-ui/src/lib/data-source/relative-sources.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/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","import { Injectable, NgZone, inject } from '@angular/core';\nimport Lenis from 'lenis';\n\n@Injectable()\nexport class PageScrollProvider {\n // inject() (not a ctor param) so subclasses like SsrSafePageScrollProvider keep `super()`.\n private zone = inject(NgZone);\n private lenis?: Lenis;\n private rafId?: number;\n\n init(options?: ConstructorParameters<typeof Lenis>[0]): void {\n if (this.lenis) {\n this.lenis.destroy();\n }\n if (this.rafId != null) {\n cancelAnimationFrame(this.rafId);\n }\n this.lenis = new Lenis(options || {});\n this.startLoop();\n }\n\n scrollTo(y: number, options?: { duration?: number; immediate?: boolean }): void {\n this.instance.scrollTo(y, options);\n }\n\n scrollToTop(options?: { duration?: number; immediate?: boolean }): void {\n this.scrollTo(0, options);\n }\n\n get instance(): Lenis {\n if (!this.lenis) {\n throw new Error('PageScrollProvider: call init() before accessing the instance.');\n }\n return this.lenis;\n }\n\n private startLoop(): void {\n if (!this.lenis) {\n return;\n }\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, OnDestroy } from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\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, OnDestroy {\n @Input() class = '';\n @ViewChild('page') public page!: ElementRef<HTMLDivElement>;\n private scrollSubscription!: Subscription;\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\n this.pageScrollProvider.init({\n wrapper: this.page.nativeElement,\n content: this.page.nativeElement.querySelector('.page-mask')!,\n duration: 1.2,\n easing: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),\n });\n }\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","<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]': 'alt',\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 /**\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 || 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 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@Component({\n selector: 'a[iox-link]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': \"isPreview ? resolvedHref : null\",\n '[attr.target]': \"isPreview ? target : null\",\n '[style.pointer-events]': \"isPreview ? null : 'none'\",\n '[class]': \"'builder-link iox-node-' + nodeId\",\n '(click)': 'onLinkClick($event)',\n },\n styles: [`:host { display: inline; cursor: pointer; 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 :host {\n display: inline-block;\n padding: 0.6rem 1.5rem;\n border-radius: 6px;\n font-size: 0.9rem;\n text-decoration: none;\n cursor: pointer;\n text-align: center;\n transition: opacity 0.15s;\n }\n :host.variant-primary { background: #cb9090; color: #fff; border: 1px solid #cb9090; }\n :host.variant-outlined { background: transparent; color: #cb9090; border: 1px solid #cb9090; }\n :host.variant-text { 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","import { ChangeDetectionStrategy, 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 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@Component({\n selector: 'h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading]',\n template: `{{ content }}`,\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 reset the UA margin + the editing affordances.\n styles: [`:host { margin: 0; } :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\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 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 in :host (they'd out-specify styleProps `.iox-node`).\n styles: [`:host { margin: 0; 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/** Directive-host container: the `<div>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'div[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/** Directive-host linked container: the `<a>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'a[iox-linked-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[attr.href]': 'resolvedHref',\n '[attr.target]': 'target',\n '[class]': \"'linked-container-root iox-node-' + nodeId\",\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) {\n this.elRef.nativeElement.addEventListener('click', this.capturePreventDefault, true);\n }\n }\n\n ngOnDestroy(): void {\n if (!this.isPreview) {\n this.elRef.nativeElement.removeEventListener('click', this.capturePreventDefault, true);\n }\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\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 */\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]': \"tag === 'a' ? (href || null) : null\",\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() href = '';\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","// 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'] as const;\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]);\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/**\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\n const backdropStr = buildFns(BACKDROP_FUNS, merged(BACKDROP_FUNS));\n if (backdropStr) result['backdropFilter'] = backdropStr;\n\n // transform\n const transformStr = buildFns(TRANSFORM_FUNS, merged(TRANSFORM_FUNS));\n if (transformStr) result['transform'] = transformStr;\n\n // transition — only emit when duration is non-zero\n const dur = raw['transitionDuration'] ?? base['transitionDuration'];\n const ease = raw['transitionTimingFunction'] ?? base['transitionTimingFunction'];\n const del = raw['transitionDelay'] ?? base['transitionDelay'];\n if (dur && ease && dur !== '0ms' && dur !== '0s') {\n const delPart = del && del !== '0ms' && del !== '0s' ? ` ${del}` : '';\n result['transition'] = `all ${dur} ${ease}${delPart}`;\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","// 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 { composeVirtualTraits, VIRTUAL_TRAIT_GROUPS, VirtualTraitGroup } from './virtual-traits';\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 if (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) && 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 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 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","import {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { buildSwiperBreakpoints, mergeSwiperBreakpoints, SWIPER_RESPONSIVE_TRAITS } from '../../style-compiler/swiper-breakpoints';\n\n@Component({\n selector: 'iox-slider-container',\n template: `\n <div class=\"swiper\" [class]=\"'iox-node-' + nodeId\" [attr.dir]=\"dir\" [style.direction]=\"dir\" #swiperEl>\n <div class=\"swiper-wrapper\">\n <ng-container #childrenHost></ng-container>\n </div>\n <div *ngIf=\"enableNavigation\" class=\"swiper-button-prev\"></div>\n <div *ngIf=\"enableNavigation\" class=\"swiper-button-next\"></div>\n <div *ngIf=\"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 OnInit, AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** Language (writing) direction. Rendered as the `dir` attribute so it survives SSR and drives\n * Swiper's RTL layout — must match the builder's app-slider-container, which had `dir` while\n * this engine-runtime component did not (RTL showed in the editor but never on the live site). */\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n @Input() loop = false;\n @Input() slidesPerView = 1;\n /** Declared by the config since the slider shipped, but never declared HERE — so `safeSetInput`\n * dropped it and the panel control did nothing on either renderer. */\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() 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() gridRows = 1;\n /** Advanced escape hatch: raw Swiper `breakpoints` JSON. Merged OVER the map derived from the\n * node's per-breakpoint traits, so an explicit hand-written value always wins. */\n @Input() breakpoints = '';\n /** The node's per-breakpoint overrides. Only its `inputs` layer is read here — the style layers\n * are compiled to CSS by the style engine, not handed to Swiper. */\n @Input() responsive: ResponsiveOverrides | null = null;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n @ViewChild('swiperEl', { static: true })\n swiperEl!: { nativeElement: HTMLElement };\n\n private _swiper: any = null;\n\n /** The base (Base-breakpoint) values of the traits Swiper reads per width. Read from the live\n * inputs rather than the node, so the builder's direct-assignment edits are picked up too. */\n private collectSwiperInputs(): Record<string, any> {\n const all: Record<string, any> = {\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween,\n };\n const out: Record<string, any> = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) if (all[name] !== undefined) out[name] = all[name];\n return out;\n }\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n\n constructor(@Inject(PLATFORM_ID) private platformId: object) {}\n\n ngOnInit(): void {}\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n // Defer so all child slides are rendered first\n requestAnimationFrame(() => this._initSwiper());\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 _initSwiper(): Promise<void> {\n const el = this.swiperEl?.nativeElement;\n if (!el) return;\n\n const [{ default: Swiper }, swiperModules] = await Promise.all([\n import('swiper'),\n import('swiper/modules'),\n ]);\n\n const {\n Navigation, Pagination, Scrollbar, Autoplay,\n Keyboard, Mousewheel, Zoom, Grid, Parallax,\n EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCards, EffectCreative,\n } = swiperModules as any;\n\n const modules: any[] = [];\n if (this.enableNavigation) modules.push(Navigation);\n if (this.enablePagination) modules.push(Pagination);\n if (this.enableScrollbar) modules.push(Scrollbar);\n if (this.enableAutoplay) modules.push(Autoplay);\n if (this.enableKeyboard) modules.push(Keyboard);\n if (this.enableMousewheel) modules.push(Mousewheel);\n if (this.enableZoom) modules.push(Zoom);\n if (this.enableGrid) modules.push(Grid);\n if (this.enableParallax) modules.push(Parallax);\n\n const effectMap: Record<string, any> = {\n fade: EffectFade, cube: EffectCube, flip: EffectFlip,\n coverflow: EffectCoverflow, cards: EffectCards, creative: EffectCreative,\n };\n if (this.effect !== 'slide' && effectMap[this.effect]) {\n modules.push(effectMap[this.effect]);\n }\n\n const config: Record<string, any> = {\n modules,\n // Swiper reads the container's `dir` attribute, but pass it explicitly so RTL is applied\n // on init regardless of attribute timing.\n dir: this.dir,\n direction: this.direction,\n loop: this.loop,\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween,\n speed: this.speed,\n effect: this.effect,\n grabCursor: this.grabCursor,\n centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide,\n };\n\n if (this.enableNavigation) config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n if (this.enablePagination) config['pagination'] = { el: '.swiper-pagination', type: this.paginationType, clickable: this.paginationClickable };\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: true };\n if (this.enableAutoplay) config['autoplay'] = { delay: this.autoplayDelay, pauseOnMouseEnter: this.autoplayPauseOnMouseEnter, disableOnInteraction: this.autoplayDisableOnInteraction };\n if (this.enableGrid && this.gridRows > 1) config['grid'] = { rows: this.gridRows };\n // Per-breakpoint traits (slidesPerView/slidesPerGroup/spaceBetween) become Swiper's own\n // mobile-first `breakpoints` map via the SHARED converter — the desktop-first → mobile-first\n // inversion lives there, tested, not at each call site. The hand-written `breakpoints` JSON\n // stays as an advanced escape hatch and is merged OVER the derived map.\n const derived = buildSwiperBreakpoints(this.collectSwiperInputs(), this.responsive);\n const breakpointMap = mergeSwiperBreakpoints(derived, this.breakpoints);\n if (breakpointMap) config['breakpoints'] = breakpointMap;\n\n this._swiper = new Swiper(el, config);\n this.instanceRegistry.register(this.nodeId, this._swiper);\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 { margin: 0; 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 * Shared data-source resolving pattern — the SINGLE source of truth for how an IoxDataSource\n * becomes a backend fetch, consumed by BOTH the page builder (iox-cms-client bindings panel) and\n * the SSR client engine (iox-client-engine DataSourceResolverService). There must be no second\n * copy of this decision logic; only the transport differs between the two:\n *\n * builder → authenticated org-scoped controllers (admin session):\n * single by id → GET admin.../resources/:type/:id (ContentService.getContentById)\n * collection → GET admin.../resources/:type (ContentService.getContent)\n * engine → @Public() controllers (no auth, isPublished filter applied server-side):\n * single by id → GET api/:type/:id (UserResourcesController)\n * collection → GET api/:type?filters (UserResourcesController)\n *\n * The DECISION (by-id vs collection, which id, which filters, how to pick the single result) is\n * identical for both — that's what this module owns. Each app maps the returned {@link DataSourcePlan}\n * onto its own transport. A single item is ALWAYS fetched by its id as a path segment — never a\n * `?_id=` query — to match the builder's getContentById.\n */\n\nexport type DataSourceMode = 'single' | 'list';\nexport type DataSourceDomain = 'cms' | 'shop';\n\nexport interface DataSourceRouteFilter {\n field?: string;\n routeParam?: string;\n defaultId?: string;\n}\n\nexport interface DataSourceQueryFilter {\n field?: string;\n /** URL query param the value is read from. OMIT for a CONSTANT filter — then `defaultValue`\n * alone is the value, so `isReviewShow=true` filters identically in preview and on the site. */\n queryParam?: string;\n /** Value used when the query param is absent — i.e. always, for a constant filter, and in the\n * builder preview, where there are no live query params. NOT preview-only: it is the runtime\n * fallback too. An empty default with no query-param value means the filter is DROPPED. */\n defaultValue?: string;\n}\n\nexport interface DataSourceRequestSpec {\n contentType?: string;\n limit?: number;\n filterByRouteParam?: DataSourceRouteFilter;\n filterByQueryParams?: DataSourceQueryFilter[];\n}\n\n/** Structural (duck-typed) view of an IoxDataSource — kept free of the editor model so both libs\n * can depend on it without pulling in iox-builder. */\nexport interface DataSourceSpec {\n alias?: string;\n type?: string; // 'cms' | 'shop' | 'external-api' | 'static'\n mode?: DataSourceMode;\n request?: {\n cms?: DataSourceRequestSpec;\n shop?: DataSourceRequestSpec;\n endpoint?: string;\n data?: any;\n /** `derived` alias: a VIEW into another variable — resolve `from` then getByPath(value, path)\n * (e.g. galleryImages = product.gallery). See repeater-binding-ux-plan.md. */\n derived?: { from: string; path: string };\n };\n}\n\nexport type DataSourcePlan =\n | { kind: 'by-id'; domain: DataSourceDomain; resource: string; id: string; mode: DataSourceMode }\n | { kind: 'collection'; domain: DataSourceDomain; resource: string; filter: Record<string, any>; limit?: number; mode: DataSourceMode }\n | { kind: 'external'; endpoint: string; mode: DataSourceMode }\n | { kind: 'static'; data: any; mode: DataSourceMode }\n | { kind: 'derived'; from: string; path: string; mode: DataSourceMode }\n | { kind: 'none' };\n\n/**\n * Match a page route template against an actual path and extract named params.\n * matchRouteParams('/project/:projectId', 'project/68abc') → { projectId: '68abc' }\n * Both sides are normalised (leading slash stripped) and split on '/'; values are URL-decoded.\n */\nexport function matchRouteParams(template: string | undefined, actual: string | undefined): Record<string, string> {\n const t = (template ?? '').replace(/^\\/+/, '').split('/');\n const a = (actual ?? '').replace(/^\\/+/, '').split('/');\n const params: Record<string, string> = {};\n for (let i = 0; i < t.length; i++) {\n const seg = t[i];\n if (seg && seg.startsWith(':')) params[seg.slice(1)] = decodeURIComponent(a[i] ?? '');\n }\n return params;\n}\n\n/**\n * Build the query filter for a data-source request from its filterByRouteParam / filterByQueryParams\n * config. `field` is filtered by the route-param value (falling back to `defaultId`); query filters\n * map each `field` to a query-param value (falling back to `defaultValue`), and a filter with NO\n * `queryParam` is a constant on `defaultValue`. Empty values are omitted so the source isn't\n * accidentally filtered to nothing.\n */\nexport function buildDataSourceFilter(\n req: DataSourceRequestSpec | undefined,\n routeParams: Record<string, any> = {},\n queryParams: Record<string, any> = {},\n): Record<string, any> {\n const params: Record<string, any> = {};\n const byRoute = req?.filterByRouteParam;\n if (byRoute?.field && byRoute?.routeParam) {\n const value = routeParams[byRoute.routeParam] ?? byRoute.defaultId;\n if (value !== undefined && value !== null && value !== '') params[byRoute.field] = value;\n }\n for (const q of req?.filterByQueryParams ?? []) {\n if (!q?.field) continue;\n // No queryParam → a CONSTANT filter: defaultValue is the value, in the builder preview and\n // on the live site alike. With a queryParam the URL wins and defaultValue is the fallback.\n const value = q.queryParam ? (queryParams[q.queryParam] ?? q.defaultValue) : q.defaultValue;\n if (value !== undefined && value !== null && value !== '') params[q.field] = value;\n }\n return params;\n}\n\n/**\n * Mirrors the builder's getContentById decision. When a SINGLE source is filtered by the item id\n * (`_id`) via a route param, the item is fetched by PATH (`.../:type/:id`), not a `?_id=` query.\n * Returns that id (route-param value, else `defaultId`), or `null` when the source isn't a\n * single-by-id fetch — in which case the caller uses the collection endpoint + filters. The\n * path-based form only applies to the id field; a single source filtered by any other field still\n * goes through the collection endpoint.\n */\nexport function resolveSingleItemId(req: DataSourceRequestSpec | undefined, routeParams: Record<string, any> = {}): string | null {\n const byRoute = req?.filterByRouteParam;\n if (!byRoute?.routeParam) return null;\n if (byRoute.field && byRoute.field !== '_id') return null;\n const value = routeParams[byRoute.routeParam] ?? byRoute.defaultId;\n return value !== undefined && value !== null && value !== '' ? String(value) : null;\n}\n\n/**\n * Resolve an IoxDataSource into a transport-agnostic {@link DataSourcePlan}. This is the shared\n * decision both the builder and the SSR engine run; each then executes the plan with its own\n * HTTP layer. Single sources with a route-param id resolve to a `by-id` (path) fetch — exactly like\n * the builder's getContentById.\n */\nexport function planDataSource(\n ds: DataSourceSpec | undefined,\n routeParams: Record<string, any> = {},\n queryParams: Record<string, any> = {},\n): DataSourcePlan {\n const mode: DataSourceMode = ds?.mode === 'single' ? 'single' : 'list';\n switch (ds?.type) {\n case 'cms':\n case 'shop': {\n const domain = ds.type as DataSourceDomain;\n const req = domain === 'cms' ? ds.request?.cms : ds.request?.shop;\n const resource = req?.contentType;\n if (!resource) return { kind: 'none' };\n const id = mode === 'single' ? resolveSingleItemId(req, routeParams) : null;\n if (id) return { kind: 'by-id', domain, resource, id, mode };\n const filter = buildDataSourceFilter(req, routeParams, queryParams);\n const plan: DataSourcePlan = { kind: 'collection', domain, resource, filter, mode };\n if (req?.limit) (plan as any).limit = req.limit;\n return plan;\n }\n case 'external-api': {\n const endpoint = ds.request?.endpoint;\n return endpoint ? { kind: 'external', endpoint, mode } : { kind: 'none' };\n }\n case 'static':\n return { kind: 'static', data: ds.request?.data ?? null, mode };\n case 'derived': {\n const d = ds.request?.derived;\n return d?.from ? { kind: 'derived', from: d.from, path: d.path ?? '', mode } : { kind: 'none' };\n }\n case 'variable':\n // A VARIABLE is a page-local resource whose value is WRITTEN at runtime by an interaction\n // (setContext), never fetched. It resolves to nothing here on purpose: the page renders\n // its empty state until something writes it. `request.variable.itemsFrom` only names the\n // source whose items it holds, so the bind picker can suggest fields.\n return { kind: 'none' };\n default:\n return { kind: 'none' };\n }\n}\n\n/**\n * The aliases on a page that are VARIABLES — runtime-written resources, not fetched data.\n *\n * Shared so the builder and the SSR engine agree on which aliases start empty and are filled by\n * interactions. See element-context-state-plan.md.\n */\nexport function variableAliases(dataSources: readonly { alias?: string; type?: string }[] | undefined): Set<string> {\n const out = new Set<string>();\n for (const ds of dataSources ?? []) {\n if (ds?.type === 'variable' && ds.alias) out.add(ds.alias);\n }\n return out;\n}\n\n/** The source alias whose items a variable holds, if it declares one (for field suggestions). */\nexport function variableItemsFrom(\n dataSources: readonly { alias?: string; type?: string; request?: any }[] | undefined,\n alias: string,\n): string | undefined {\n for (const ds of dataSources ?? []) {\n if (ds?.type === 'variable' && ds.alias === alias) return ds.request?.variable?.itemsFrom || undefined;\n }\n return undefined;\n}\n\n/**\n * Normalise a collection response into the shape a source expects: unwraps `{items}`/`{data}`\n * envelopes, then returns the first item for a `single` source or the whole array for a `list`.\n * A `by-id` response is already the item, so callers pass it through unchanged.\n */\nexport function normalizeCollectionResult(mode: DataSourceMode, data: any): any {\n const items = Array.isArray(data) ? data : (data?.items ?? data?.data ?? []);\n return mode === 'single' ? (items[0] ?? null) : items;\n}\n\n/** Navigate a dot/bracket path into an object, e.g. `gallery`, `details.images`, `variants[0].skus`.\n * Returns undefined if any segment is missing. Kept minimal + self-contained so it is shareable by\n * both the builder and the SSR engine (the two have divergent local `resolvePath` copies). */\nexport function getByPath(obj: any, path: string): any {\n if (obj == null || !path) return obj;\n // Turn `a[0].b` into ['a','0','b'].\n const segments = path.replace(/\\[(\\w+)\\]/g, '.$1').split('.').filter(Boolean);\n let cur = obj;\n for (const seg of segments) {\n if (cur == null) return undefined;\n cur = cur[seg];\n }\n return cur;\n}\n\n/**\n * The array a Repeater (or a repeating Slider) iterates over — the SHARED decision so the builder\n * canvas and the SSR engine agree (see data-source-resolving.md).\n * - No `sourcePath`: the resolved source IS the list. An array passes through; a lone object degrades\n * to a single-row list (back-compat with the old `fetchItems`); null/undefined → `[]`.\n * - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the\n * nested array property (e.g. `gallery`). Non-array / missing → `[]`.\n */\n/**\n * Fill in `derived` aliases in an already-resolved map. Given the data sources and a map of resolved\n * NON-derived values (by alias), compute each `type:'derived'` alias as `getByPath(parent, path)` in\n * dependency order (chains resolved by iterating until stable). Mutates + returns the map. Used by the\n * SSR engine after it resolves the root sources; the builder resolves derived lazily per alias.\n */\nexport function resolveDerivedInto(dataSources: DataSourceSpec[], resolved: Record<string, any>): Record<string, any> {\n const derived = (dataSources ?? []).filter(d => d?.type === 'derived' && !!d.alias);\n let changed = true, guard = 0;\n while (changed && guard++ < 25) {\n changed = false;\n for (const d of derived) {\n if (d.alias! in resolved) continue;\n const from = d.request?.derived?.from;\n if (from && from in resolved) {\n resolved[d.alias!] = getByPath(resolved[from], d.request!.derived!.path ?? '');\n changed = true;\n }\n }\n }\n return resolved;\n}\n\nexport function resolveRepeaterItems(resolved: any, sourcePath?: string | null): any[] {\n if (sourcePath) {\n const nested = getByPath(resolved, sourcePath);\n return Array.isArray(nested) ? nested : [];\n }\n if (Array.isArray(resolved)) return resolved;\n return resolved == null ? [] : [resolved];\n}\n\n// ── Referenced data sources (shared: builder-save + SSR resolve) ─────────────────────────────────\n// Which data-source aliases a node tree uses, so a consumer resolves ONLY what a page/global needs\n// (not the whole org library). Used by cms-client (persist globals' sources) and the SSR engine\n// (resolve the referenced subset per page). See org-data-sources-plan.md.\n\n/** Aliases referenced anywhere in a node tree: a repeater/slider `source` (a `bindings` entry with\n * `prop === 'source'`, or `props.source` for the slider) plus every binding's `source`. */\nexport function collectReferencedAliases(nodes: any[], acc: Set<string> = new Set<string>()): Set<string> {\n for (const n of nodes ?? []) {\n for (const b of n?.bindings ?? []) { if (b?.source) acc.add(b.source); }\n if (n?.props?.source) acc.add(n.props.source);\n if (n?.children?.length) collectReferencedAliases(n.children, acc);\n }\n return acc;\n}\n\n/** The subset of `all` whose `alias` is referenced by `nodes` (shallow — direct references only). */\nexport function referencedDataSources(nodes: any[], all: any[]): any[] {\n const aliases = collectReferencedAliases(nodes);\n return (all ?? []).filter(ds => aliases.has(ds?.alias));\n}\n\n/** Like `referencedDataSources`, but also pulls in a referenced source's DEPENDENCIES (transitively),\n * none of which the layout names directly:\n * - a `derived` alias needs its `request.derived.from` parent;\n * - a `relative` (route-context) alias needs its `request.relative.subjectFrom` (the current item)\n * and `request.relative.from` (the collection it navigates).\n * Use this when RESOLVING (the engine) so derived views and siblings/related don't resolve to nothing. */\nexport function referencedDataSourcesDeep(nodes: any[], all: any[]): any[] {\n const byAlias = new Map((all ?? []).map(d => [d?.alias, d]));\n const wanted = collectReferencedAliases(nodes);\n const queue = [...wanted];\n const enqueue = (alias?: string) => {\n if (alias && !wanted.has(alias)) { wanted.add(alias); queue.push(alias); }\n };\n while (queue.length) {\n const ds: any = byAlias.get(queue.pop() as string);\n enqueue(ds?.request?.derived?.from);\n enqueue(ds?.request?.relative?.subjectFrom);\n enqueue(ds?.request?.relative?.from);\n }\n return (all ?? []).filter(d => wanted.has(d?.alias));\n}\n\n/** Base URLs for the PUBLIC content controllers. Both must end with `/`. The builder and the SSR\n * engine pass their own host (they proxy `/api` differently) but MUST target the public\n * (`@Public()`) controllers, never the authed admin ones — data resolving is storefront data. */\nexport interface DataSourceEndpoints {\n /** cms resources, e.g. `${HOST}` (engine, HOST ends `/api/`) or `${HOST}api/` (builder). */\n cmsBase: string;\n /** shop resources, e.g. `${HOST}shop/` (engine) or `${HOST}api/shop/` (builder). */\n shopBase: string;\n}\n\nexport interface DataSourceRequest {\n url: string;\n params: Record<string, any>;\n}\n\n/**\n * Turn a resolved {@link DataSourcePlan} into the concrete public HTTP request (url + params) — the\n * SINGLE place that decides the URL shape, shared by the builder binding preview and the SSR engine\n * so both hit the SAME public endpoints (no admin, no duplication). Returns `null` for `static` /\n * `none` plans (no HTTP call). A single item is a PATH segment (`/:resource/:id`), never `?_id=`.\n */\nexport function dataSourcePlanToRequest(plan: DataSourcePlan, endpoints: DataSourceEndpoints): DataSourceRequest | null {\n const baseFor = (domain: DataSourceDomain) => (domain === 'shop' ? endpoints.shopBase : endpoints.cmsBase);\n switch (plan.kind) {\n case 'by-id':\n return { url: `${baseFor(plan.domain)}${plan.resource}/${encodeURIComponent(plan.id)}`, params: {} };\n case 'collection': {\n const params: Record<string, any> = { ...plan.filter };\n if (plan.limit) params['limit'] = plan.limit;\n return { url: `${baseFor(plan.domain)}${plan.resource}`, params };\n }\n case 'external':\n return { url: plan.endpoint, params: {} };\n default:\n return null;\n }\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 '../../data-source/data-source-resolver';\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\nexport class GalleryLoop {\n private readonly scheduler: GalleryLoopScheduler;\n private showMs: number;\n private fadeMs: number;\n private readonly onChange: (state: GalleryLoopState) => void;\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 }\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.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';\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 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 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 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 Radio = 'radio',\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}\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}\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/** Controls whose value is a list rather than a scalar. */\nexport const MULTI_VALUE_CONTROLS: ReadonlySet<ControlType> = new Set([ControlType.File]);\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});\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});\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 PATTERN_PRESETS,\n PatternPreset,\n RuleName,\n ValidationRule,\n} from './form.model';\nimport { 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/** 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): 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);\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): FormResult {\n const errors: Record<string, FieldError> = {};\n for (const field of spec.fields ?? []) {\n const result = validateField(values?.[field.name], field, values ?? {});\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/** 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 return [...implied, ...declared];\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): 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 switch (rule.name) {\n case RuleName.Required:\n return isEmpty(value, spec.control) ? fail(defaultKey) : null;\n\n case RuleName.Accepted:\n return value === true ? 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","// 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';\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/**\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 fields: FieldSpec[] = [];\n const taken = new Set<string>();\n for (const fieldNode of collectFieldNodes(node.children ?? [])) {\n const spec = toFieldSpec(fieldNode, taken);\n taken.add(spec.name);\n fields.push(spec);\n }\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\nfunction toFieldSpec(node: FormNodeLike, taken: ReadonlySet<string>): FieldSpec {\n const props = node.props ?? {};\n const label = props['label'] ?? '';\n // The author's explicit override wins; otherwise derive from the label.\n const name = uniqueFieldName(props['name'] || deriveFieldName(label), taken);\n\n const spec: FieldSpec = {\n name,\n control: (props['control'] as ControlType) ?? ControlType.Text,\n label,\n };\n if (props['required']) spec.required = true;\n const rules = normaliseRules(props['rules']);\n if (rules.length) spec.rules = rules;\n if (Array.isArray(props['options']) && props['options'].length) spec.options = props['options'];\n if (props['optionsSource']) spec.optionsSource = props['optionsSource'];\n if (props['defaultValue'] !== undefined && props['defaultValue'] !== '') {\n spec.defaultValue = props['defaultValue'];\n }\n return spec;\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. */\nconst NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Date, ControlType.Time];\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],\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 * Deliberately relative and WITHOUT a leading slash: the engine mounts under a per-org base href.\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 * @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 './runtime';\nexport * from './rule-catalog';\nexport * from './transport';\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} from '../../../forms-core/public-api';\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 and focus-first-invalid depend on. */\n private readonly fields: { spec: () => FieldSpec; getValue: () => any }[] = [];\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: { spec: () => FieldSpec; getValue: () => any }): () => 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 /** 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 return { ...base, fields: this.fields.map(f => f.spec()) };\n }\n\n /** Current values, keyed by submitted field name. */\n values(): Record<string, any> {\n const out: Record<string, any> = {};\n for (const field of this.fields) out[field.spec().name] = 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 field of this.fields) {\n const name = field.spec().name;\n if (this._state.errors[name]) return name;\n }\n return null;\n }\n}\n","import { Component, ElementRef, EventEmitter, Inject, InjectionToken, Input, OnChanges, OnInit, Optional, Output, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport {\n FeedbackTiming,\n FormTransport,\n HONEYPOT_FIELD,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { FormRuntimeService } from './form-runtime.service';\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. */\nexport enum FormRenderState {\n Idle = 'idle',\n Submitting = 'submitting',\n Success = 'success',\n Error = 'error',\n}\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 live in the SHARED `styles/iox-forms.css` asset, not here: three renderers\n // need them and none share a component, so a scoped copy would be a third copy that drifts.\n styles: [`\n :host { box-sizing: border-box; }\n /* Off-screen rather than display:none — some bots skip hidden inputs. */\n .iox-form__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }\n `],\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 @Input() 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 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. Public so a host-owned transport can reuse it. */\n applyResponse(response: SubmitResponse): void {\n if (!response?.ok) {\n // Per-field verdicts go back onto the fields; anything else is a whole-form failure,\n // which is what the designed Error block is for.\n if (response?.errors) {\n this.runtime.applyErrors(response.errors);\n this.renderState = FormRenderState.Idle;\n this.announce(response.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n return;\n }\n this.renderState = FormRenderState.Error;\n this.announce(null);\n return;\n }\n\n this.renderState = FormRenderState.Success;\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 (response.redirect && this.navigate) this.navigate(response.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 count = errors ? Object.keys(errors).length : 0;\n const next = count\n ? `${count} ${count === 1 ? 'field needs' : 'fields need'} attention.`\n : 'That did not send.';\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 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 return;\n }\n }\n}\n","import { Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Optional, Output } from '@angular/core';\n\nimport { ControlType, FieldOption, FieldSpec, ValidationRule, deriveFieldName } from '../../../forms-core/public-api';\nimport { FormMessageResolver, FormRuntimeService, IOX_FORM_MESSAGES } from './form-runtime.service';\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@Component({\n selector: 'div[iox-field]',\n template: `\n <label class=\"iox-field__label\"\n [class.iox-field__label--hidden]=\"labelHidden\"\n [attr.for]=\"controlId\">\n {{ label }}\n @if (required) {\n <span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>\n }\n </label>\n\n @switch (control) {\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()\"></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()\">\n <option value=\"\" [selected]=\"!value\">{{ placeholder || '' }}</option>\n @for (option of options; track option.value) {\n <option [value]=\"option.value\" [selected]=\"option.value === value\">{{ option.label }}</option>\n }\n </select>\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()\">\n }\n @case ('radio') {\n <div class=\"iox-field__group\" role=\"radiogroup\" [attr.aria-labelledby]=\"controlId + '-label'\">\n @for (option of options; track option.value) {\n <label class=\"iox-field__option\">\n <input 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()\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\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()\">\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, 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() 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() accept = '';\n @Input() options: FieldOption[] = [];\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 */\n @Input() 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\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\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.\n */\n constructor(\n @Optional() private readonly runtime: FormRuntimeService | null,\n @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver,\n ) {}\n\n ngOnInit(): void {\n this.unregister = this.runtime?.register({\n // Functions, not values: a trait edited on the canvas takes effect with no re-register.\n spec: () => this.toSpec(),\n getValue: () => this.value,\n });\n }\n\n ngOnDestroy(): void {\n this.unregister?.();\n }\n\n /** The submitted key: the author's override, else derived from the label. */\n get fieldName(): string {\n return this.name || deriveFieldName(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 private toSpec(): FieldSpec {\n const spec: FieldSpec = {\n name: this.fieldName,\n control: (this.control as ControlType) ?? ControlType.Text,\n label: this.label,\n };\n if (this.required) spec.required = true;\n if (this.rules?.length) spec.rules = this.rules;\n if (this.options?.length) spec.options = this.options;\n return spec;\n }\n\n /** `file`, `date`, `number`… map straight through; everything else is a text input. */\n get inputType(): string {\n const passthrough = ['email', 'tel', 'url', 'number', 'password', 'date', 'time', 'file', 'hidden'];\n return passthrough.includes(String(this.control)) ? String(this.control) : 'text';\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(): void {\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","import { Component, Input } from '@angular/core';\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 and its busy state.\n *\n * While submitting it shows `loadingLabel` and is disabled, which is the whole double-submit\n * defence on the client side (the server's rate limit is the real one).\n */\n@Component({\n selector: 'button[iox-submit]',\n template: `{{ submitting && loadingLabel ? loadingLabel : label }}`,\n host: {\n '[class]': \"'iox-submit iox-node-' + nodeId\",\n '[attr.type]': \"'submit'\",\n '[attr.disabled]': 'submitting && disableWhileSubmitting ? \"\" : null',\n '[attr.aria-busy]': 'submitting ? \"true\" : 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 @Input() disableWhileSubmitting = true;\n /** Driven by the form's lifecycle, not by the author. */\n @Input() submitting = false;\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 { 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';\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 IoxFormComponent,\n IoxFieldComponent,\n IoxSubmitButtonComponent,\n IoxFormSuccessComponent,\n IoxFormErrorComponent,\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';\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 ]);\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","/**\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\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+)vh/g, 'calc($1 * var(--preview-vh, 1vh))')\n .replace(/(-?\\d*\\.?\\d+)vw/g, 'calc($1 * var(--preview-vw, 1vw))');\n}\n\n/** camelCase style key → kebab-case CSS property. */\nexport function styleKeyToKebab(key: string): string {\n return key.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);\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 // 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 'clip-path': ['none'],\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};\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 * 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 * @param type Node type (registry key).\n * @param styleProps The node's persisted styleProps.\n * @param hasHoverState Whether the node has a non-empty hover / parent-hover state.\n */\nexport function renderDefaultDeclarations(\n type: string,\n styleProps: Record<string, any>,\n hasHoverState: boolean,\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 // Default transition so own/parent hover animates smoothly (parity with the builder).\n if (hasHoverState && sp['transition'] === undefined) {\n out.push('transition: all 0.2s ease');\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","/**\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 if (scopeCssId === styledCssId) {\n return `iox-node-${styledCssId}:has(.iox-node-${triggerCssId}:${base})`;\n }\n if (scopeCssId === triggerCssId) {\n return `iox-node-${triggerCssId}:${base} .iox-node-${styledCssId}`;\n }\n return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}:${base}) .iox-node-${styledCssId}`;\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 },\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 * Design-token → CSS compilation, shared by BOTH renderers (flavors plan F0).\n *\n * A token row is `{ name, value }` plus, since F0, an optional per-scheme override:\n * `values.dark`. The shape exists NOW — before any dark-mode UI — because retrofitting it\n * later means rewriting every org's `designtokens` collection (flavors plan §10 C3).\n *\n * ⚠️ The appended-last contract: the dark block REDEFINES custom properties under\n * `@media (prefers-color-scheme: dark)`. Per the responsive-breakpoints A3 lesson, every\n * consumer appends it AFTER all of its base rules — the engine pushes it after the page's\n * css blocks, the builder registry keeps it as its last token rule. Custom properties are\n * order-insensitive against node rules, but keeping one ordering rule for every @media\n * block in the product is cheaper than remembering which ones are exempt.\n */\n\n/** The transport-agnostic token row. `source` marks seeded rows (`flavor:<id>@<ver>`). */\nexport interface DesignTokenLike {\n name: string;\n value: string;\n /** Per-scheme overrides. Only `dark` exists today; absent means the base value everywhere. */\n values?: { dark?: string };\n type?: string;\n source?: string;\n}\n\nconst usable = (t: DesignTokenLike | null | undefined): t is DesignTokenLike =>\n !!t && typeof t.name === 'string' && t.name !== '' &&\n typeof t.value === 'string' && t.value !== '';\n\n/** `{ 'iox-brand': '#2f6f62', … }` — the builder registry's input shape for base values. */\nexport function tokensToVarMap(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): Record<string, string> {\n const map: Record<string, string> = {};\n for (const t of tokens ?? []) {\n if (usable(t)) map[`iox-${t.name}`] = t.value;\n }\n return map;\n}\n\n/** Only the tokens that carry a dark override, as `{ 'iox-name': darkValue }`. */\nexport function tokensToDarkVarMap(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): Record<string, string> {\n const map: Record<string, string> = {};\n for (const t of tokens ?? []) {\n const dark = t?.values?.dark;\n if (usable(t) && typeof dark === 'string' && dark !== '') map[`iox-${t.name}`] = dark;\n }\n return map;\n}\n\n/**\n * The two CSS blocks a renderer emits. `base` goes FIRST (before node rules), `dark` goes\n * LAST (after every base rule); either may be '' when there is nothing to say.\n */\nexport function compileTokenCss(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): { base: string; dark: string } {\n const baseVars = Object.entries(tokensToVarMap(tokens))\n .map(([k, v]) => ` --${k}: ${v};`).join('\\n');\n const darkVars = Object.entries(tokensToDarkVarMap(tokens))\n .map(([k, v]) => ` --${k}: ${v};`).join('\\n');\n return {\n base: baseVars ? `:root {\\n${baseVars}\\n}` : '',\n dark: darkVars ? `@media (prefers-color-scheme: dark) {\\n :root {\\n${darkVars}\\n }\\n}` : '',\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\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): 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.\n if (style.backgroundColor) css['background-color'] = style.backgroundColor;\n break;\n }\n\n return css;\n}\n","/**\n * Shared RELATIVE (route-context) data resolving — the SINGLE source of truth for how a detail page\n * derives values FROM its current route item, consumed by BOTH the page builder (iox-cms-client) and\n * the SSR client engine (iox-client-engine). Companion to `data-source-resolver.ts`.\n *\n * These are the pure, transport-agnostic pieces behind the Route binding scope\n * (`$route` / `$current` / `$siblings` / `$related`). Resolution is a DEPENDENT SECOND PASS: the\n * consumer resolves `$current` first (the existing single by-id fetch via `planDataSource`), then\n * calls these to derive the relative values — there is NO new `DataSourcePlan` kind (`$related` still\n * feeds a normal `collection` plan built from {@link buildRelatedFilter}). See\n * `architecture/builder/relative-data-sources-plan.md`.\n *\n * There must be no second copy of this decision logic; only the transport (which HTTP layer fetches\n * the ordered collection / related list) differs between the two consumers.\n */\n\nimport { getByPath } from './data-source-resolver';\n\n/** Aliases in the Route scope are platform-owned and start with this prefix; a USER alias may never\n * start with it, which keeps the Route scope structurally collision-proof with Local/Global. Used to\n * validate new/renamed aliases and to render the reserved (read-only) item state in the bind picker. */\nexport const RESERVED_ALIAS_PREFIX = '$';\n\n/** True for a platform-owned Route-scope alias (`$route`, `$current`, `$siblings`, `$related`, …). */\nexport function isReservedAlias(alias: string | null | undefined): boolean {\n return typeof alias === 'string' && alias.startsWith(RESERVED_ALIAS_PREFIX);\n}\n\n/** The `$siblings` value: the current item's neighbours within an ordered set. */\nexport interface SiblingsResult<T = any> {\n /** The item before the current one (`null` at the start, unless `wrap`). */\n prev: T | null;\n /** The item after the current one (`null` at the end, unless `wrap`). */\n next: T | null;\n /** Zero-based position of the current item in the ordered set; `-1` when not found. */\n index: number;\n /** Total items in the set. */\n count: number;\n /** `true` when the current item is the first in the set. */\n isFirst: boolean;\n /** `true` when the current item is the last in the set. */\n isLast: boolean;\n}\n\nexport interface ResolveSiblingsOptions {\n /** Field identifying the current item within the list. Default `_id`. */\n idField?: string;\n /** Dot/bracket path to sort by BEFORE locating neighbours (e.g. `order`, `date`). Omit to use the\n * list's existing order. The same item neighbours differently per ordering, so this is the one\n * choice `$siblings` requires. */\n sortBy?: string;\n /** Sort direction when `sortBy` is set. Default `asc`. */\n sortDir?: 'asc' | 'desc';\n /** Wrap around the ends (`last.next` → first, `first.prev` → last). Only applies when `count > 1`.\n * Default `false`. */\n wrap?: boolean;\n}\n\nconst EMPTY_SIBLINGS: SiblingsResult = { prev: null, next: null, index: -1, count: 0, isFirst: false, isLast: false };\n\n/** Generic, deterministic comparator: numbers numerically, Dates by time, everything else by\n * locale-aware string compare (ISO date strings sort correctly this way). Nullish sorts first. */\nfunction compareValues(a: any, b: any): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === 'number' && typeof b === 'number') return a - b;\n const da = a instanceof Date ? a.getTime() : NaN;\n const db = b instanceof Date ? b.getTime() : NaN;\n if (!isNaN(da) && !isNaN(db)) return da - db;\n return String(a).localeCompare(String(b));\n}\n\n/**\n * Locate the current item within an ordered set and return its neighbours + position. Pure: the input\n * list is never mutated (sorting works on a shallow copy). `currentId` is compared to each item's\n * `idField` via string equality (route-param values are strings). When the current id isn't found,\n * `index` is `-1` and `prev`/`next` are `null` (but `count` still reflects the set size).\n */\nexport function resolveSiblings<T = any>(\n items: T[] | null | undefined,\n currentId: string | number | null | undefined,\n options: ResolveSiblingsOptions = {},\n): SiblingsResult<T> {\n const list = Array.isArray(items) ? items.slice() : [];\n const count = list.length;\n if (count === 0) return { ...EMPTY_SIBLINGS };\n\n const idField = options.idField ?? '_id';\n if (options.sortBy) {\n const dir = options.sortDir === 'desc' ? -1 : 1;\n list.sort((a, b) => dir * compareValues(getByPath(a, options.sortBy!), getByPath(b, options.sortBy!)));\n }\n\n const cid = currentId == null ? null : String(currentId);\n const index = cid == null ? -1 : list.findIndex(it => String(getByPath(it, idField)) === cid);\n if (index === -1) return { prev: null, next: null, index: -1, count, isFirst: false, isLast: false };\n\n const canWrap = !!options.wrap && count > 1;\n const prev = index > 0 ? list[index - 1] : (canWrap ? list[count - 1] : null);\n const next = index < count - 1 ? list[index + 1] : (canWrap ? list[0] : null);\n return { prev, next, index, count, isFirst: index === 0, isLast: index === count - 1 };\n}\n\nexport interface BuildRelatedFilterOptions {\n /** Field(s) on the current item whose value(s) the related items must match (e.g. `category`,\n * or `['category', 'brand']`). Each contributes an equality filter on that field. */\n matchFields: string | string[];\n}\n\n/** A value usable as an equality filter param: a non-empty scalar. Objects/arrays/nullish are skipped\n * so a related query isn't built from an unresolved rel object (surfaced as a config issue in the UI\n * rather than silently matching everything). Multi-value match is a v2 concern. */\nfunction isScalarFilterValue(v: any): boolean {\n if (v == null) return false;\n if (typeof v === 'string') return v !== '';\n if (typeof v === 'number') return Number.isFinite(v);\n return typeof v === 'boolean';\n}\n\n/**\n * Build the collection filter for `$related` from the resolved current item: an equality match on\n * each `matchField`'s value (e.g. same `category`). Feeds a normal `collection` plan — no new plan\n * kind. Fields whose value is not a scalar (or is empty) are omitted, matching\n * `buildDataSourceFilter`'s \"don't over-filter\" rule. Exclude-self is applied to the RESULT via\n * {@link excludeSelf} (the public query controllers are equality-only, so it can't be a `$ne` param).\n */\nexport function buildRelatedFilter(current: any, options: BuildRelatedFilterOptions): Record<string, any> {\n const fields = Array.isArray(options.matchFields) ? options.matchFields : [options.matchFields];\n const filter: Record<string, any> = {};\n for (const field of fields) {\n if (!field) continue;\n const value = getByPath(current, field);\n if (isScalarFilterValue(value)) filter[field] = value;\n }\n return filter;\n}\n\n/**\n * Drop the current item from a list by `idField` (default `_id`). Used to exclude self from a\n * `$related` result after fetch. A nullish/empty `currentId` leaves the list unchanged.\n */\nexport function excludeSelf<T = any>(items: T[] | null | undefined, currentId: string | number | null | undefined, idField = '_id'): T[] {\n if (!Array.isArray(items)) return [];\n if (currentId == null || currentId === '') return items;\n const cid = String(currentId);\n return items.filter(it => String(getByPath(it, idField)) !== cid);\n}\n\n/** The resolved Route-scope context bound values read from (`$route.projectId`, `$current.title`,\n * `$siblings.next`, `$related`). Assembled by each consumer during its dependent second pass. */\nexport interface RouteContext {\n /** Route path params for the current URL (from `matchRouteParams`). */\n $route: Record<string, string>;\n /** The resolved current item (the page's single by-id source). */\n $current: any;\n /** Neighbours of the current item within a chosen ordered set. */\n $siblings?: SiblingsResult;\n /** Items related to the current one (same-attribute), excluding self. */\n $related?: any[];\n}\n\n// ── Relative source declaration + the shared second-pass resolver ────────────────────────────────\n// A relative source is declared like a `derived` one (`type:'relative'`), and resolved AFTER the\n// root/derived sources by a PURE pass over the resolved map — mirroring `resolveDerivedInto`, so the\n// SSR engine and the builder canvas agree with no forked logic. `planDataSource` returns `none` for\n// it (not fetched); each consumer excludes `relative` from its fetched roots and runs this pass.\n\nexport type RelativeSourceKind = 'route' | 'current' | 'siblings' | 'related';\n\nexport interface RelativeSourceSpec {\n kind: RelativeSourceKind;\n /** The source alias this derives from: for `current` the subject single-source; for\n * `siblings`/`related` the COLLECTION alias to locate within / search. Unused for `route`. */\n from?: string;\n /** `siblings`/`related`: the SUBJECT source alias (the current item) whose id / field values drive\n * the computation. Defaults to `from` when omitted. May reference `$current`. */\n subjectFrom?: string;\n /** Field identifying an item. Default `_id`. */\n idField?: string;\n /** `siblings`: sort the set before locating neighbours. */\n sortBy?: string;\n sortDir?: 'asc' | 'desc';\n wrap?: boolean;\n /** `siblings`: resolve to a SINGLE neighbour ITEM (`next`/`prev`) instead of the whole\n * `{prev,next,index,count,…}` object — so a source can be named e.g. `nextProject` and bound\n * directly (`nextProject.route`). Omit for the whole-object shape. */\n pick?: 'next' | 'prev';\n /** `related`: field(s) on the subject the results must match. */\n matchFields?: string | string[];\n /** `related`: drop the subject from its own results. Default `true`. */\n excludeSelf?: boolean;\n}\n\n/** Duck-typed view of a data source carrying an optional relative descriptor (avoids a hard dep on\n * the full editor model / a circular type import). */\ninterface RelativeCapableSource {\n alias?: string;\n type?: string;\n request?: { relative?: RelativeSourceSpec };\n}\n\n/** The already-resolved inputs a single relative source computes from. Assembled by each consumer:\n * the batch pass reads them from the resolved map; the builder resolves them async per alias. */\nexport interface RelativeInputs {\n /** The subject item (the current resource) — for `current`/`siblings`/`related`. */\n subject?: any;\n /** The collection to locate within / search — for `siblings`/`related`. */\n collection?: any;\n /** Route path params — for `route`. */\n routeParams?: Record<string, any>;\n}\n\n/** Resolve kinds in a fixed order so a `siblings`/`related` source may reference `$current` (or any\n * earlier relative alias) via `subjectFrom` and still see it resolved. */\nconst KIND_ORDER: Record<RelativeSourceKind, number> = { route: 0, current: 1, siblings: 2, related: 3 };\n\n/** Does an item satisfy every field in an equality predicate map (string-compared)? */\nfunction matchesFilter(item: any, filter: Record<string, any>): boolean {\n return Object.keys(filter).every(k => String(getByPath(item, k)) === String(filter[k]));\n}\n\n/**\n * Compute ONE relative source's value from its already-resolved {@link RelativeInputs} — the SHARED\n * kind→computation decision, so the batch pass ({@link resolveRelativeInto}) and the builder's async\n * per-alias resolver produce identical results with no forked switch. `route` → the route params;\n * `current` → the subject; `siblings` → {@link resolveSiblings} over the collection; `related` → the\n * collection filtered by {@link buildRelatedFilter}'s predicate (+ {@link excludeSelf}).\n */\nexport function computeRelative(spec: RelativeSourceSpec, inputs: RelativeInputs): any {\n const idField = spec.idField ?? '_id';\n switch (spec.kind) {\n case 'route':\n return inputs.routeParams ?? {};\n case 'current':\n return inputs.subject ?? null;\n case 'siblings': {\n const siblings = resolveSiblings(inputs.collection, getByPath(inputs.subject, idField), {\n idField, sortBy: spec.sortBy, sortDir: spec.sortDir, wrap: spec.wrap,\n });\n // `pick` resolves the source directly to that neighbour item (named-source shape,\n // e.g. `nextProject`); without it the caller binds a sub-path of the whole object.\n return spec.pick ? siblings[spec.pick] : siblings;\n }\n case 'related': {\n const filter = buildRelatedFilter(inputs.subject, { matchFields: spec.matchFields ?? [] });\n const pool = Array.isArray(inputs.collection) ? inputs.collection : [];\n const items = pool.filter(it => matchesFilter(it, filter));\n return spec.excludeSelf !== false ? excludeSelf(items, getByPath(inputs.subject, idField), idField) : items;\n }\n default:\n return null;\n }\n}\n\n/**\n * Compute every `type:'relative'` source into `resolved` (keyed by alias), IN PLACE. Pure w.r.t. HTTP\n * — it only reads already-resolved roots + the route params, so both consumers run it identically as\n * a second pass. Delegates each source to {@link computeRelative}. `current`'s subject is `from`;\n * `siblings`/`related` take `collection` = `from` and `subject` = `subjectFrom ?? from`. Mutates and\n * returns `resolved`.\n */\nexport function resolveRelativeInto(\n dataSources: RelativeCapableSource[],\n resolved: Record<string, any>,\n routeParams: Record<string, any> = {},\n): Record<string, any> {\n const relatives = (dataSources ?? [])\n .filter(d => d?.type === 'relative' && !!d.alias && !!d.request?.relative)\n .sort((a, b) => KIND_ORDER[a.request!.relative!.kind] - KIND_ORDER[b.request!.relative!.kind]);\n\n for (const d of relatives) {\n const spec = d.request!.relative!;\n const subjectAlias = spec.kind === 'current' ? spec.from : (spec.subjectFrom ?? spec.from);\n resolved[d.alias!] = computeRelative(spec, {\n subject: subjectAlias ? resolved[subjectAlias] : undefined,\n collection: spec.from ? resolved[spec.from] : undefined,\n routeParams,\n });\n }\n return resolved;\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: 'image' },\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: 'image' },\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(/ /gi, ' ')\n .replace(/&/gi, '&')\n .replace(/</gi, '<')\n .replace(/>/gi, '>')\n .replace(/"/gi, '\"')\n .replace(/'|'/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 */\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 * 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-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/responsive';\nexport * from './lib/style-compiler/swiper-breakpoints';\nexport * from './lib/style-compiler/token-css';\nexport * from './lib/page-style/page-style';\nexport * from './lib/data-source/data-source-resolver';\nexport * from './lib/data-source/relative-sources';\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';\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';\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';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AOSService","i1.IoxAnimateContainer","i1.PageScrollProvider","pick","i1.FormRuntimeService","i2","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,CAA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AM,GAAsB,EAAE;IACpC,IAAI,KAAK,CAAC,QAAQ;AAAE,QAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACxC,IAAI,KAAK,CAAC,aAAa;AAAE,QAAA,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;IAClD,IAAI,KAAK,CAAC,QAAQ;AAAE,QAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AACxC,IAAA,OAAO,MAAM;AACjB;AAEA;AACA;;;;AAIG;AACG,SAAU,uBAAuB,CAAC,KAAgC,EAAA;IACpE,QAAQ,KAAK;AACT,QAAA,KAAK,MAAM,EAAO,OAAO,MAAM;AAC/B,QAAA,KAAK,SAAS,EAAI,OAAO,kBAAkB;AAC3C,QAAA,KAAK,WAAW,EAAE,OAAO,MAAM;AAC/B,QAAA,KAAK,QAAQ,EAAK,OAAO,eAAe;AACxC,QAAA,KAAK,SAAS,EAAI,OAAO,eAAe;AACxC,QAAA,KAAK,QAAQ,EAAK,OAAO,MAAM;AAC/B,QAAA,KAAK,MAAM,EAAO,OAAO,MAAM;AAC/B,QAAA,KAAK,MAAM,EAAO,OAAO,MAAM;;AAE/B,QAAA,SAAkB,OAAO,uBAAuB;;AAExD;AAEA;;;AAGG;AACG,SAAU,qBAAqB,CAAC,IAA8E,EAAA;AAChH,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,uBAAuB;IACzC,IAAI,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC,UAAU;AAC3C,IAAA,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9C;;AC9hBA;;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/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/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/lib/style-compiler/responsive.ts","../../../projects/iox-ui/src/lib/style-compiler/swiper-breakpoints.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/data-source/data-source-resolver.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/validate.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/public-api.ts","../../../projects/iox-ui/src/lib/builder-components/form/form-runtime.service.ts","../../../projects/iox-ui/src/lib/builder-components/form/form.component.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/iox-builder-components.module.ts","../../../projects/iox-ui/src/lib/builder-components/iox-component-registry.service.ts","../../../projects/iox-ui/src/lib/style-compiler/style-compiler.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/token-css.ts","../../../projects/iox-ui/src/lib/style-compiler/flavor.ts","../../../projects/iox-ui/src/lib/page-style/page-style.ts","../../../projects/iox-ui/src/lib/data-source/relative-sources.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/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","import { Injectable, NgZone, inject } from '@angular/core';\nimport Lenis from 'lenis';\n\n@Injectable()\nexport class PageScrollProvider {\n // inject() (not a ctor param) so subclasses like SsrSafePageScrollProvider keep `super()`.\n private zone = inject(NgZone);\n private lenis?: Lenis;\n private rafId?: number;\n\n init(options?: ConstructorParameters<typeof Lenis>[0]): void {\n if (this.lenis) {\n this.lenis.destroy();\n }\n if (this.rafId != null) {\n cancelAnimationFrame(this.rafId);\n }\n this.lenis = new Lenis(options || {});\n this.startLoop();\n }\n\n scrollTo(y: number, options?: { duration?: number; immediate?: boolean }): void {\n this.instance.scrollTo(y, options);\n }\n\n scrollToTop(options?: { duration?: number; immediate?: boolean }): void {\n this.scrollTo(0, options);\n }\n\n get instance(): Lenis {\n if (!this.lenis) {\n throw new Error('PageScrollProvider: call init() before accessing the instance.');\n }\n return this.lenis;\n }\n\n private startLoop(): void {\n if (!this.lenis) {\n return;\n }\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, OnDestroy } from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\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, OnDestroy {\n @Input() class = '';\n @ViewChild('page') public page!: ElementRef<HTMLDivElement>;\n private scrollSubscription!: Subscription;\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\n this.pageScrollProvider.init({\n wrapper: this.page.nativeElement,\n content: this.page.nativeElement.querySelector('.page-mask')!,\n duration: 1.2,\n easing: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),\n });\n }\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","<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]': 'alt',\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 /**\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 || 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 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@Component({\n selector: 'a[iox-link]',\n template: `{{ label }}`,\n host: {\n '[attr.href]': \"isPreview ? resolvedHref : null\",\n '[attr.target]': \"isPreview ? target : null\",\n '[style.pointer-events]': \"isPreview ? null : 'none'\",\n '[class]': \"'builder-link iox-node-' + nodeId\",\n '(click)': 'onLinkClick($event)',\n },\n styles: [`:host { display: inline; cursor: pointer; 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 :host {\n display: inline-block;\n padding: 0.6rem 1.5rem;\n border-radius: 6px;\n font-size: 0.9rem;\n text-decoration: none;\n cursor: pointer;\n text-align: center;\n transition: opacity 0.15s;\n }\n :host.variant-primary { background: #cb9090; color: #fff; border: 1px solid #cb9090; }\n :host.variant-outlined { background: transparent; color: #cb9090; border: 1px solid #cb9090; }\n :host.variant-text { 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","import { ChangeDetectionStrategy, 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 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@Component({\n selector: 'h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading]',\n template: `{{ content }}`,\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 reset the UA margin + the editing affordances.\n styles: [`:host { margin: 0; } :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\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 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 in :host (they'd out-specify styleProps `.iox-node`).\n styles: [`:host { margin: 0; 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/** Directive-host container: the `<div>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'div[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/** Directive-host linked container: the `<a>` IS the host — no wrapper, no inner/outer split. */\n@Component({\n selector: 'a[iox-linked-container]',\n template: `<ng-container #childrenHost></ng-container>`,\n host: {\n '[attr.href]': 'resolvedHref',\n '[attr.target]': 'target',\n '[class]': \"'linked-container-root iox-node-' + nodeId\",\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) {\n this.elRef.nativeElement.addEventListener('click', this.capturePreventDefault, true);\n }\n }\n\n ngOnDestroy(): void {\n if (!this.isPreview) {\n this.elRef.nativeElement.removeEventListener('click', this.capturePreventDefault, true);\n }\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\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 */\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]': \"tag === 'a' ? (href || null) : null\",\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() href = '';\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","// 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'] as const;\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]);\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/**\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\n const backdropStr = buildFns(BACKDROP_FUNS, merged(BACKDROP_FUNS));\n if (backdropStr) result['backdropFilter'] = backdropStr;\n\n // transform\n const transformStr = buildFns(TRANSFORM_FUNS, merged(TRANSFORM_FUNS));\n if (transformStr) result['transform'] = transformStr;\n\n // transition — only emit when duration is non-zero\n const dur = raw['transitionDuration'] ?? base['transitionDuration'];\n const ease = raw['transitionTimingFunction'] ?? base['transitionTimingFunction'];\n const del = raw['transitionDelay'] ?? base['transitionDelay'];\n if (dur && ease && dur !== '0ms' && dur !== '0s') {\n const delPart = del && del !== '0ms' && del !== '0s' ? ` ${del}` : '';\n result['transition'] = `all ${dur} ${ease}${delPart}`;\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","// 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 { composeVirtualTraits, VIRTUAL_TRAIT_GROUPS, VirtualTraitGroup } from './virtual-traits';\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 if (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) && 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 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 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","import {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { ResponsiveOverrides } from '../../style-compiler/responsive';\nimport { buildSwiperBreakpoints, mergeSwiperBreakpoints, SWIPER_RESPONSIVE_TRAITS } from '../../style-compiler/swiper-breakpoints';\n\n@Component({\n selector: 'iox-slider-container',\n template: `\n <div class=\"swiper\" [class]=\"'iox-node-' + nodeId\" [attr.dir]=\"dir\" [style.direction]=\"dir\" #swiperEl>\n <div class=\"swiper-wrapper\">\n <ng-container #childrenHost></ng-container>\n </div>\n <div *ngIf=\"enableNavigation\" class=\"swiper-button-prev\"></div>\n <div *ngIf=\"enableNavigation\" class=\"swiper-button-next\"></div>\n <div *ngIf=\"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 OnInit, AfterViewInit, OnDestroy {\n @Input() nodeId = '';\n /** Language (writing) direction. Rendered as the `dir` attribute so it survives SSR and drives\n * Swiper's RTL layout — must match the builder's app-slider-container, which had `dir` while\n * this engine-runtime component did not (RTL showed in the editor but never on the live site). */\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n @Input() loop = false;\n @Input() slidesPerView = 1;\n /** Declared by the config since the slider shipped, but never declared HERE — so `safeSetInput`\n * dropped it and the panel control did nothing on either renderer. */\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() 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() gridRows = 1;\n /** Advanced escape hatch: raw Swiper `breakpoints` JSON. Merged OVER the map derived from the\n * node's per-breakpoint traits, so an explicit hand-written value always wins. */\n @Input() breakpoints = '';\n /** The node's per-breakpoint overrides. Only its `inputs` layer is read here — the style layers\n * are compiled to CSS by the style engine, not handed to Swiper. */\n @Input() responsive: ResponsiveOverrides | null = null;\n\n @ViewChild('childrenHost', { read: ViewContainerRef, static: true })\n childrenHost!: ViewContainerRef;\n\n @ViewChild('swiperEl', { static: true })\n swiperEl!: { nativeElement: HTMLElement };\n\n private _swiper: any = null;\n\n /** The base (Base-breakpoint) values of the traits Swiper reads per width. Read from the live\n * inputs rather than the node, so the builder's direct-assignment edits are picked up too. */\n private collectSwiperInputs(): Record<string, any> {\n const all: Record<string, any> = {\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween,\n };\n const out: Record<string, any> = {};\n for (const name of SWIPER_RESPONSIVE_TRAITS) if (all[name] !== undefined) out[name] = all[name];\n return out;\n }\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n\n constructor(@Inject(PLATFORM_ID) private platformId: object) {}\n\n ngOnInit(): void {}\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n // Defer so all child slides are rendered first\n requestAnimationFrame(() => this._initSwiper());\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 _initSwiper(): Promise<void> {\n const el = this.swiperEl?.nativeElement;\n if (!el) return;\n\n const [{ default: Swiper }, swiperModules] = await Promise.all([\n import('swiper'),\n import('swiper/modules'),\n ]);\n\n const {\n Navigation, Pagination, Scrollbar, Autoplay,\n Keyboard, Mousewheel, Zoom, Grid, Parallax,\n EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCards, EffectCreative,\n } = swiperModules as any;\n\n const modules: any[] = [];\n if (this.enableNavigation) modules.push(Navigation);\n if (this.enablePagination) modules.push(Pagination);\n if (this.enableScrollbar) modules.push(Scrollbar);\n if (this.enableAutoplay) modules.push(Autoplay);\n if (this.enableKeyboard) modules.push(Keyboard);\n if (this.enableMousewheel) modules.push(Mousewheel);\n if (this.enableZoom) modules.push(Zoom);\n if (this.enableGrid) modules.push(Grid);\n if (this.enableParallax) modules.push(Parallax);\n\n const effectMap: Record<string, any> = {\n fade: EffectFade, cube: EffectCube, flip: EffectFlip,\n coverflow: EffectCoverflow, cards: EffectCards, creative: EffectCreative,\n };\n if (this.effect !== 'slide' && effectMap[this.effect]) {\n modules.push(effectMap[this.effect]);\n }\n\n const config: Record<string, any> = {\n modules,\n // Swiper reads the container's `dir` attribute, but pass it explicitly so RTL is applied\n // on init regardless of attribute timing.\n dir: this.dir,\n direction: this.direction,\n loop: this.loop,\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup,\n spaceBetween: this.spaceBetween,\n speed: this.speed,\n effect: this.effect,\n grabCursor: this.grabCursor,\n centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide,\n };\n\n if (this.enableNavigation) config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n if (this.enablePagination) config['pagination'] = { el: '.swiper-pagination', type: this.paginationType, clickable: this.paginationClickable };\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: true };\n if (this.enableAutoplay) config['autoplay'] = { delay: this.autoplayDelay, pauseOnMouseEnter: this.autoplayPauseOnMouseEnter, disableOnInteraction: this.autoplayDisableOnInteraction };\n if (this.enableGrid && this.gridRows > 1) config['grid'] = { rows: this.gridRows };\n // Per-breakpoint traits (slidesPerView/slidesPerGroup/spaceBetween) become Swiper's own\n // mobile-first `breakpoints` map via the SHARED converter — the desktop-first → mobile-first\n // inversion lives there, tested, not at each call site. The hand-written `breakpoints` JSON\n // stays as an advanced escape hatch and is merged OVER the derived map.\n const derived = buildSwiperBreakpoints(this.collectSwiperInputs(), this.responsive);\n const breakpointMap = mergeSwiperBreakpoints(derived, this.breakpoints);\n if (breakpointMap) config['breakpoints'] = breakpointMap;\n\n this._swiper = new Swiper(el, config);\n this.instanceRegistry.register(this.nodeId, this._swiper);\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 { margin: 0; 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 * Shared data-source resolving pattern — the SINGLE source of truth for how an IoxDataSource\n * becomes a backend fetch, consumed by BOTH the page builder (iox-cms-client bindings panel) and\n * the SSR client engine (iox-client-engine DataSourceResolverService). There must be no second\n * copy of this decision logic; only the transport differs between the two:\n *\n * builder → authenticated org-scoped controllers (admin session):\n * single by id → GET admin.../resources/:type/:id (ContentService.getContentById)\n * collection → GET admin.../resources/:type (ContentService.getContent)\n * engine → @Public() controllers (no auth, isPublished filter applied server-side):\n * single by id → GET api/:type/:id (UserResourcesController)\n * collection → GET api/:type?filters (UserResourcesController)\n *\n * The DECISION (by-id vs collection, which id, which filters, how to pick the single result) is\n * identical for both — that's what this module owns. Each app maps the returned {@link DataSourcePlan}\n * onto its own transport. A single item is ALWAYS fetched by its id as a path segment — never a\n * `?_id=` query — to match the builder's getContentById.\n */\n\nexport type DataSourceMode = 'single' | 'list';\nexport type DataSourceDomain = 'cms' | 'shop';\n\nexport interface DataSourceRouteFilter {\n field?: string;\n routeParam?: string;\n defaultId?: string;\n}\n\nexport interface DataSourceQueryFilter {\n field?: string;\n /** URL query param the value is read from. OMIT for a CONSTANT filter — then `defaultValue`\n * alone is the value, so `isReviewShow=true` filters identically in preview and on the site. */\n queryParam?: string;\n /** Value used when the query param is absent — i.e. always, for a constant filter, and in the\n * builder preview, where there are no live query params. NOT preview-only: it is the runtime\n * fallback too. An empty default with no query-param value means the filter is DROPPED. */\n defaultValue?: string;\n}\n\nexport interface DataSourceRequestSpec {\n contentType?: string;\n limit?: number;\n filterByRouteParam?: DataSourceRouteFilter;\n filterByQueryParams?: DataSourceQueryFilter[];\n}\n\n/** Structural (duck-typed) view of an IoxDataSource — kept free of the editor model so both libs\n * can depend on it without pulling in iox-builder. */\nexport interface DataSourceSpec {\n alias?: string;\n type?: string; // 'cms' | 'shop' | 'external-api' | 'static'\n mode?: DataSourceMode;\n request?: {\n cms?: DataSourceRequestSpec;\n shop?: DataSourceRequestSpec;\n endpoint?: string;\n data?: any;\n /** `derived` alias: a VIEW into another variable — resolve `from` then getByPath(value, path)\n * (e.g. galleryImages = product.gallery). See repeater-binding-ux-plan.md. */\n derived?: { from: string; path: string };\n };\n}\n\nexport type DataSourcePlan =\n | { kind: 'by-id'; domain: DataSourceDomain; resource: string; id: string; mode: DataSourceMode }\n | { kind: 'collection'; domain: DataSourceDomain; resource: string; filter: Record<string, any>; limit?: number; mode: DataSourceMode }\n | { kind: 'external'; endpoint: string; mode: DataSourceMode }\n | { kind: 'static'; data: any; mode: DataSourceMode }\n | { kind: 'derived'; from: string; path: string; mode: DataSourceMode }\n | { kind: 'none' };\n\n/**\n * Match a page route template against an actual path and extract named params.\n * matchRouteParams('/project/:projectId', 'project/68abc') → { projectId: '68abc' }\n * Both sides are normalised (leading slash stripped) and split on '/'; values are URL-decoded.\n */\nexport function matchRouteParams(template: string | undefined, actual: string | undefined): Record<string, string> {\n const t = (template ?? '').replace(/^\\/+/, '').split('/');\n const a = (actual ?? '').replace(/^\\/+/, '').split('/');\n const params: Record<string, string> = {};\n for (let i = 0; i < t.length; i++) {\n const seg = t[i];\n if (seg && seg.startsWith(':')) params[seg.slice(1)] = decodeURIComponent(a[i] ?? '');\n }\n return params;\n}\n\n/**\n * Build the query filter for a data-source request from its filterByRouteParam / filterByQueryParams\n * config. `field` is filtered by the route-param value (falling back to `defaultId`); query filters\n * map each `field` to a query-param value (falling back to `defaultValue`), and a filter with NO\n * `queryParam` is a constant on `defaultValue`. Empty values are omitted so the source isn't\n * accidentally filtered to nothing.\n */\nexport function buildDataSourceFilter(\n req: DataSourceRequestSpec | undefined,\n routeParams: Record<string, any> = {},\n queryParams: Record<string, any> = {},\n): Record<string, any> {\n const params: Record<string, any> = {};\n const byRoute = req?.filterByRouteParam;\n if (byRoute?.field && byRoute?.routeParam) {\n const value = routeParams[byRoute.routeParam] ?? byRoute.defaultId;\n if (value !== undefined && value !== null && value !== '') params[byRoute.field] = value;\n }\n for (const q of req?.filterByQueryParams ?? []) {\n if (!q?.field) continue;\n // No queryParam → a CONSTANT filter: defaultValue is the value, in the builder preview and\n // on the live site alike. With a queryParam the URL wins and defaultValue is the fallback.\n const value = q.queryParam ? (queryParams[q.queryParam] ?? q.defaultValue) : q.defaultValue;\n if (value !== undefined && value !== null && value !== '') params[q.field] = value;\n }\n return params;\n}\n\n/**\n * Mirrors the builder's getContentById decision. When a SINGLE source is filtered by the item id\n * (`_id`) via a route param, the item is fetched by PATH (`.../:type/:id`), not a `?_id=` query.\n * Returns that id (route-param value, else `defaultId`), or `null` when the source isn't a\n * single-by-id fetch — in which case the caller uses the collection endpoint + filters. The\n * path-based form only applies to the id field; a single source filtered by any other field still\n * goes through the collection endpoint.\n */\nexport function resolveSingleItemId(req: DataSourceRequestSpec | undefined, routeParams: Record<string, any> = {}): string | null {\n const byRoute = req?.filterByRouteParam;\n if (!byRoute?.routeParam) return null;\n if (byRoute.field && byRoute.field !== '_id') return null;\n const value = routeParams[byRoute.routeParam] ?? byRoute.defaultId;\n return value !== undefined && value !== null && value !== '' ? String(value) : null;\n}\n\n/**\n * Resolve an IoxDataSource into a transport-agnostic {@link DataSourcePlan}. This is the shared\n * decision both the builder and the SSR engine run; each then executes the plan with its own\n * HTTP layer. Single sources with a route-param id resolve to a `by-id` (path) fetch — exactly like\n * the builder's getContentById.\n */\nexport function planDataSource(\n ds: DataSourceSpec | undefined,\n routeParams: Record<string, any> = {},\n queryParams: Record<string, any> = {},\n): DataSourcePlan {\n const mode: DataSourceMode = ds?.mode === 'single' ? 'single' : 'list';\n switch (ds?.type) {\n case 'cms':\n case 'shop': {\n const domain = ds.type as DataSourceDomain;\n const req = domain === 'cms' ? ds.request?.cms : ds.request?.shop;\n const resource = req?.contentType;\n if (!resource) return { kind: 'none' };\n const id = mode === 'single' ? resolveSingleItemId(req, routeParams) : null;\n if (id) return { kind: 'by-id', domain, resource, id, mode };\n const filter = buildDataSourceFilter(req, routeParams, queryParams);\n const plan: DataSourcePlan = { kind: 'collection', domain, resource, filter, mode };\n if (req?.limit) (plan as any).limit = req.limit;\n return plan;\n }\n case 'external-api': {\n const endpoint = ds.request?.endpoint;\n return endpoint ? { kind: 'external', endpoint, mode } : { kind: 'none' };\n }\n case 'static':\n return { kind: 'static', data: ds.request?.data ?? null, mode };\n case 'derived': {\n const d = ds.request?.derived;\n return d?.from ? { kind: 'derived', from: d.from, path: d.path ?? '', mode } : { kind: 'none' };\n }\n case 'variable':\n // A VARIABLE is a page-local resource whose value is WRITTEN at runtime by an interaction\n // (setContext), never fetched. It resolves to nothing here on purpose: the page renders\n // its empty state until something writes it. `request.variable.itemsFrom` only names the\n // source whose items it holds, so the bind picker can suggest fields.\n return { kind: 'none' };\n default:\n return { kind: 'none' };\n }\n}\n\n/**\n * The aliases on a page that are VARIABLES — runtime-written resources, not fetched data.\n *\n * Shared so the builder and the SSR engine agree on which aliases start empty and are filled by\n * interactions. See element-context-state-plan.md.\n */\nexport function variableAliases(dataSources: readonly { alias?: string; type?: string }[] | undefined): Set<string> {\n const out = new Set<string>();\n for (const ds of dataSources ?? []) {\n if (ds?.type === 'variable' && ds.alias) out.add(ds.alias);\n }\n return out;\n}\n\n/** The source alias whose items a variable holds, if it declares one (for field suggestions). */\nexport function variableItemsFrom(\n dataSources: readonly { alias?: string; type?: string; request?: any }[] | undefined,\n alias: string,\n): string | undefined {\n for (const ds of dataSources ?? []) {\n if (ds?.type === 'variable' && ds.alias === alias) return ds.request?.variable?.itemsFrom || undefined;\n }\n return undefined;\n}\n\n/**\n * Normalise a collection response into the shape a source expects: unwraps `{items}`/`{data}`\n * envelopes, then returns the first item for a `single` source or the whole array for a `list`.\n * A `by-id` response is already the item, so callers pass it through unchanged.\n */\nexport function normalizeCollectionResult(mode: DataSourceMode, data: any): any {\n const items = Array.isArray(data) ? data : (data?.items ?? data?.data ?? []);\n return mode === 'single' ? (items[0] ?? null) : items;\n}\n\n/** Navigate a dot/bracket path into an object, e.g. `gallery`, `details.images`, `variants[0].skus`.\n * Returns undefined if any segment is missing. Kept minimal + self-contained so it is shareable by\n * both the builder and the SSR engine (the two have divergent local `resolvePath` copies). */\nexport function getByPath(obj: any, path: string): any {\n if (obj == null || !path) return obj;\n // Turn `a[0].b` into ['a','0','b'].\n const segments = path.replace(/\\[(\\w+)\\]/g, '.$1').split('.').filter(Boolean);\n let cur = obj;\n for (const seg of segments) {\n if (cur == null) return undefined;\n cur = cur[seg];\n }\n return cur;\n}\n\n/**\n * The array a Repeater (or a repeating Slider) iterates over — the SHARED decision so the builder\n * canvas and the SSR engine agree (see data-source-resolving.md).\n * - No `sourcePath`: the resolved source IS the list. An array passes through; a lone object degrades\n * to a single-row list (back-compat with the old `fetchItems`); null/undefined → `[]`.\n * - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the\n * nested array property (e.g. `gallery`). Non-array / missing → `[]`.\n */\n/**\n * Fill in `derived` aliases in an already-resolved map. Given the data sources and a map of resolved\n * NON-derived values (by alias), compute each `type:'derived'` alias as `getByPath(parent, path)` in\n * dependency order (chains resolved by iterating until stable). Mutates + returns the map. Used by the\n * SSR engine after it resolves the root sources; the builder resolves derived lazily per alias.\n */\nexport function resolveDerivedInto(dataSources: DataSourceSpec[], resolved: Record<string, any>): Record<string, any> {\n const derived = (dataSources ?? []).filter(d => d?.type === 'derived' && !!d.alias);\n let changed = true, guard = 0;\n while (changed && guard++ < 25) {\n changed = false;\n for (const d of derived) {\n if (d.alias! in resolved) continue;\n const from = d.request?.derived?.from;\n if (from && from in resolved) {\n resolved[d.alias!] = getByPath(resolved[from], d.request!.derived!.path ?? '');\n changed = true;\n }\n }\n }\n return resolved;\n}\n\nexport function resolveRepeaterItems(resolved: any, sourcePath?: string | null): any[] {\n if (sourcePath) {\n const nested = getByPath(resolved, sourcePath);\n return Array.isArray(nested) ? nested : [];\n }\n if (Array.isArray(resolved)) return resolved;\n return resolved == null ? [] : [resolved];\n}\n\n// ── Referenced data sources (shared: builder-save + SSR resolve) ─────────────────────────────────\n// Which data-source aliases a node tree uses, so a consumer resolves ONLY what a page/global needs\n// (not the whole org library). Used by cms-client (persist globals' sources) and the SSR engine\n// (resolve the referenced subset per page). See org-data-sources-plan.md.\n\n/** Aliases referenced anywhere in a node tree: a repeater/slider `source` (a `bindings` entry with\n * `prop === 'source'`, or `props.source` for the slider) plus every binding's `source`. */\nexport function collectReferencedAliases(nodes: any[], acc: Set<string> = new Set<string>()): Set<string> {\n for (const n of nodes ?? []) {\n for (const b of n?.bindings ?? []) { if (b?.source) acc.add(b.source); }\n if (n?.props?.source) acc.add(n.props.source);\n if (n?.children?.length) collectReferencedAliases(n.children, acc);\n }\n return acc;\n}\n\n/** The subset of `all` whose `alias` is referenced by `nodes` (shallow — direct references only). */\nexport function referencedDataSources(nodes: any[], all: any[]): any[] {\n const aliases = collectReferencedAliases(nodes);\n return (all ?? []).filter(ds => aliases.has(ds?.alias));\n}\n\n/** Like `referencedDataSources`, but also pulls in a referenced source's DEPENDENCIES (transitively),\n * none of which the layout names directly:\n * - a `derived` alias needs its `request.derived.from` parent;\n * - a `relative` (route-context) alias needs its `request.relative.subjectFrom` (the current item)\n * and `request.relative.from` (the collection it navigates).\n * Use this when RESOLVING (the engine) so derived views and siblings/related don't resolve to nothing. */\nexport function referencedDataSourcesDeep(nodes: any[], all: any[]): any[] {\n const byAlias = new Map((all ?? []).map(d => [d?.alias, d]));\n const wanted = collectReferencedAliases(nodes);\n const queue = [...wanted];\n const enqueue = (alias?: string) => {\n if (alias && !wanted.has(alias)) { wanted.add(alias); queue.push(alias); }\n };\n while (queue.length) {\n const ds: any = byAlias.get(queue.pop() as string);\n enqueue(ds?.request?.derived?.from);\n enqueue(ds?.request?.relative?.subjectFrom);\n enqueue(ds?.request?.relative?.from);\n }\n return (all ?? []).filter(d => wanted.has(d?.alias));\n}\n\n/** Base URLs for the PUBLIC content controllers. Both must end with `/`. The builder and the SSR\n * engine pass their own host (they proxy `/api` differently) but MUST target the public\n * (`@Public()`) controllers, never the authed admin ones — data resolving is storefront data. */\nexport interface DataSourceEndpoints {\n /** cms resources, e.g. `${HOST}` (engine, HOST ends `/api/`) or `${HOST}api/` (builder). */\n cmsBase: string;\n /** shop resources, e.g. `${HOST}shop/` (engine) or `${HOST}api/shop/` (builder). */\n shopBase: string;\n}\n\nexport interface DataSourceRequest {\n url: string;\n params: Record<string, any>;\n}\n\n/**\n * Turn a resolved {@link DataSourcePlan} into the concrete public HTTP request (url + params) — the\n * SINGLE place that decides the URL shape, shared by the builder binding preview and the SSR engine\n * so both hit the SAME public endpoints (no admin, no duplication). Returns `null` for `static` /\n * `none` plans (no HTTP call). A single item is a PATH segment (`/:resource/:id`), never `?_id=`.\n */\nexport function dataSourcePlanToRequest(plan: DataSourcePlan, endpoints: DataSourceEndpoints): DataSourceRequest | null {\n const baseFor = (domain: DataSourceDomain) => (domain === 'shop' ? endpoints.shopBase : endpoints.cmsBase);\n switch (plan.kind) {\n case 'by-id':\n return { url: `${baseFor(plan.domain)}${plan.resource}/${encodeURIComponent(plan.id)}`, params: {} };\n case 'collection': {\n const params: Record<string, any> = { ...plan.filter };\n if (plan.limit) params['limit'] = plan.limit;\n return { url: `${baseFor(plan.domain)}${plan.resource}`, params };\n }\n case 'external':\n return { url: plan.endpoint, params: {} };\n default:\n return null;\n }\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 '../../data-source/data-source-resolver';\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\nexport class GalleryLoop {\n private readonly scheduler: GalleryLoopScheduler;\n private showMs: number;\n private fadeMs: number;\n private readonly onChange: (state: GalleryLoopState) => void;\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 }\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.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';\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 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 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 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 Radio = 'radio',\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}\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}\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/** Controls whose value is a list rather than a scalar. */\nexport const MULTI_VALUE_CONTROLS: ReadonlySet<ControlType> = new Set([ControlType.File]);\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});\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});\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 PATTERN_PRESETS,\n PatternPreset,\n RuleName,\n ValidationRule,\n} from './form.model';\nimport { 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/** 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): 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);\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): FormResult {\n const errors: Record<string, FieldError> = {};\n for (const field of spec.fields ?? []) {\n const result = validateField(values?.[field.name], field, values ?? {});\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/** 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 return [...implied, ...declared];\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): 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 switch (rule.name) {\n case RuleName.Required:\n return isEmpty(value, spec.control) ? fail(defaultKey) : null;\n\n case RuleName.Accepted:\n return value === true ? 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","// 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';\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/**\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 fields: FieldSpec[] = [];\n const taken = new Set<string>();\n for (const fieldNode of collectFieldNodes(node.children ?? [])) {\n const spec = toFieldSpec(fieldNode, taken);\n taken.add(spec.name);\n fields.push(spec);\n }\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\nfunction toFieldSpec(node: FormNodeLike, taken: ReadonlySet<string>): FieldSpec {\n const props = node.props ?? {};\n const label = props['label'] ?? '';\n // The author's explicit override wins; otherwise derive from the label.\n const name = uniqueFieldName(props['name'] || deriveFieldName(label), taken);\n\n const spec: FieldSpec = {\n name,\n control: (props['control'] as ControlType) ?? ControlType.Text,\n label,\n };\n if (props['required']) spec.required = true;\n const rules = normaliseRules(props['rules']);\n if (rules.length) spec.rules = rules;\n if (Array.isArray(props['options']) && props['options'].length) spec.options = props['options'];\n if (props['optionsSource']) spec.optionsSource = props['optionsSource'];\n if (props['defaultValue'] !== undefined && props['defaultValue'] !== '') {\n spec.defaultValue = props['defaultValue'];\n }\n return spec;\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. */\nconst NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Date, ControlType.Time];\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],\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 * Deliberately relative and WITHOUT a leading slash: the engine mounts under a per-org base href.\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 * @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 './runtime';\nexport * from './rule-catalog';\nexport * from './transport';\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} from '../../../forms-core/public-api';\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 and focus-first-invalid depend on. */\n private readonly fields: { spec: () => FieldSpec; getValue: () => any }[] = [];\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: { spec: () => FieldSpec; getValue: () => any }): () => 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 /** 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 return { ...base, fields: this.fields.map(f => f.spec()) };\n }\n\n /** Current values, keyed by submitted field name. */\n values(): Record<string, any> {\n const out: Record<string, any> = {};\n for (const field of this.fields) out[field.spec().name] = 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 field of this.fields) {\n const name = field.spec().name;\n if (this._state.errors[name]) return name;\n }\n return null;\n }\n}\n","import { Component, ElementRef, EventEmitter, Inject, InjectionToken, Input, OnChanges, OnInit, Optional, Output, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport {\n FeedbackTiming,\n FormTransport,\n HONEYPOT_FIELD,\n SubmitResponse,\n withAntiSpamFields,\n} from '../../../forms-core/public-api';\nimport { FormRuntimeService } from './form-runtime.service';\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. */\nexport enum FormRenderState {\n Idle = 'idle',\n Submitting = 'submitting',\n Success = 'success',\n Error = 'error',\n}\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 live in the SHARED `styles/iox-forms.css` asset, not here: three renderers\n // need them and none share a component, so a scoped copy would be a third copy that drifts.\n styles: [`\n :host { box-sizing: border-box; }\n /* Off-screen rather than display:none — some bots skip hidden inputs. */\n .iox-form__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }\n `],\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 @Input() 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 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. Public so a host-owned transport can reuse it. */\n applyResponse(response: SubmitResponse): void {\n if (!response?.ok) {\n // Per-field verdicts go back onto the fields; anything else is a whole-form failure,\n // which is what the designed Error block is for.\n if (response?.errors) {\n this.runtime.applyErrors(response.errors);\n this.renderState = FormRenderState.Idle;\n this.announce(response.errors);\n if (this.focusFirstProblem) this.focusFirstInvalid();\n return;\n }\n this.renderState = FormRenderState.Error;\n this.announce(null);\n return;\n }\n\n this.renderState = FormRenderState.Success;\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 (response.redirect && this.navigate) this.navigate(response.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 count = errors ? Object.keys(errors).length : 0;\n const next = count\n ? `${count} ${count === 1 ? 'field needs' : 'fields need'} attention.`\n : 'That did not send.';\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 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 return;\n }\n }\n}\n","import { Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Optional, Output } from '@angular/core';\n\nimport { ControlType, FieldOption, FieldSpec, ValidationRule, deriveFieldName } from '../../../forms-core/public-api';\nimport { FormMessageResolver, FormRuntimeService, IOX_FORM_MESSAGES } from './form-runtime.service';\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@Component({\n selector: 'div[iox-field]',\n template: `\n <label class=\"iox-field__label\"\n [class.iox-field__label--hidden]=\"labelHidden\"\n [attr.for]=\"controlId\">\n {{ label }}\n @if (required) {\n <span class=\"iox-field__required\" aria-hidden=\"true\">{{ requiredMark }}</span>\n }\n </label>\n\n @switch (control) {\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()\"></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()\">\n <option value=\"\" [selected]=\"!value\">{{ placeholder || '' }}</option>\n @for (option of options; track option.value) {\n <option [value]=\"option.value\" [selected]=\"option.value === value\">{{ option.label }}</option>\n }\n </select>\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()\">\n }\n @case ('radio') {\n <div class=\"iox-field__group\" role=\"radiogroup\" [attr.aria-labelledby]=\"controlId + '-label'\">\n @for (option of options; track option.value) {\n <label class=\"iox-field__option\">\n <input 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()\">\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\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()\">\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, 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() 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() accept = '';\n @Input() options: FieldOption[] = [];\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 */\n @Input() 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\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\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.\n */\n constructor(\n @Optional() private readonly runtime: FormRuntimeService | null,\n @Inject(IOX_FORM_MESSAGES) private readonly resolveMessage: FormMessageResolver,\n ) {}\n\n ngOnInit(): void {\n this.unregister = this.runtime?.register({\n // Functions, not values: a trait edited on the canvas takes effect with no re-register.\n spec: () => this.toSpec(),\n getValue: () => this.value,\n });\n }\n\n ngOnDestroy(): void {\n this.unregister?.();\n }\n\n /** The submitted key: the author's override, else derived from the label. */\n get fieldName(): string {\n return this.name || deriveFieldName(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 private toSpec(): FieldSpec {\n const spec: FieldSpec = {\n name: this.fieldName,\n control: (this.control as ControlType) ?? ControlType.Text,\n label: this.label,\n };\n if (this.required) spec.required = true;\n if (this.rules?.length) spec.rules = this.rules;\n if (this.options?.length) spec.options = this.options;\n return spec;\n }\n\n /** `file`, `date`, `number`… map straight through; everything else is a text input. */\n get inputType(): string {\n const passthrough = ['email', 'tel', 'url', 'number', 'password', 'date', 'time', 'file', 'hidden'];\n return passthrough.includes(String(this.control)) ? String(this.control) : 'text';\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(): void {\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","import { Component, Input } from '@angular/core';\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 and its busy state.\n *\n * While submitting it shows `loadingLabel` and is disabled, which is the whole double-submit\n * defence on the client side (the server's rate limit is the real one).\n */\n@Component({\n selector: 'button[iox-submit]',\n template: `{{ submitting && loadingLabel ? loadingLabel : label }}`,\n host: {\n '[class]': \"'iox-submit iox-node-' + nodeId\",\n '[attr.type]': \"'submit'\",\n '[attr.disabled]': 'submitting && disableWhileSubmitting ? \"\" : null',\n '[attr.aria-busy]': 'submitting ? \"true\" : 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 @Input() disableWhileSubmitting = true;\n /** Driven by the form's lifecycle, not by the author. */\n @Input() submitting = false;\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 { 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';\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 IoxFormComponent,\n IoxFieldComponent,\n IoxSubmitButtonComponent,\n IoxFormSuccessComponent,\n IoxFormErrorComponent,\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';\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 ]);\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","/**\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\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+)vh/g, 'calc($1 * var(--preview-vh, 1vh))')\n .replace(/(-?\\d*\\.?\\d+)vw/g, 'calc($1 * var(--preview-vw, 1vw))');\n}\n\n/** camelCase style key → kebab-case CSS property. */\nexport function styleKeyToKebab(key: string): string {\n return key.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);\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 // 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 'clip-path': ['none'],\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};\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 * 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 * @param type Node type (registry key).\n * @param styleProps The node's persisted styleProps.\n * @param hasHoverState Whether the node has a non-empty hover / parent-hover state.\n */\nexport function renderDefaultDeclarations(\n type: string,\n styleProps: Record<string, any>,\n hasHoverState: boolean,\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 // Default transition so own/parent hover animates smoothly (parity with the builder).\n if (hasHoverState && sp['transition'] === undefined) {\n out.push('transition: all 0.2s ease');\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","/**\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 if (scopeCssId === styledCssId) {\n return `iox-node-${styledCssId}:has(.iox-node-${triggerCssId}:${base})`;\n }\n if (scopeCssId === triggerCssId) {\n return `iox-node-${triggerCssId}:${base} .iox-node-${styledCssId}`;\n }\n return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}:${base}) .iox-node-${styledCssId}`;\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 },\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 * Design-token → CSS compilation, shared by BOTH renderers (flavors plan F0).\n *\n * A token row is `{ name, value }` plus, since F0, an optional per-scheme override:\n * `values.dark`. The shape exists NOW — before any dark-mode UI — because retrofitting it\n * later means rewriting every org's `designtokens` collection (flavors plan §10 C3).\n *\n * ⚠️ The appended-last contract: the dark block REDEFINES custom properties under\n * `@media (prefers-color-scheme: dark)`. Per the responsive-breakpoints A3 lesson, every\n * consumer appends it AFTER all of its base rules — the engine pushes it after the page's\n * css blocks, the builder registry keeps it as its last token rule. Custom properties are\n * order-insensitive against node rules, but keeping one ordering rule for every @media\n * block in the product is cheaper than remembering which ones are exempt.\n */\n\n/** The transport-agnostic token row. `source` marks seeded rows (`flavor:<id>@<ver>`). */\nexport interface DesignTokenLike {\n name: string;\n value: string;\n /** Per-scheme overrides. Only `dark` exists today; absent means the base value everywhere. */\n values?: { dark?: string };\n type?: string;\n source?: string;\n}\n\nconst usable = (t: DesignTokenLike | null | undefined): t is DesignTokenLike =>\n !!t && typeof t.name === 'string' && t.name !== '' &&\n typeof t.value === 'string' && t.value !== '';\n\n/** `{ 'iox-brand': '#2f6f62', … }` — the builder registry's input shape for base values. */\nexport function tokensToVarMap(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): Record<string, string> {\n const map: Record<string, string> = {};\n for (const t of tokens ?? []) {\n if (usable(t)) map[`iox-${t.name}`] = t.value;\n }\n return map;\n}\n\n/** Only the tokens that carry a dark override, as `{ 'iox-name': darkValue }`. */\nexport function tokensToDarkVarMap(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): Record<string, string> {\n const map: Record<string, string> = {};\n for (const t of tokens ?? []) {\n const dark = t?.values?.dark;\n if (usable(t) && typeof dark === 'string' && dark !== '') map[`iox-${t.name}`] = dark;\n }\n return map;\n}\n\n/**\n * The two CSS blocks a renderer emits. `base` goes FIRST (before node rules), `dark` goes\n * LAST (after every base rule); either may be '' when there is nothing to say.\n */\nexport function compileTokenCss(tokens: ReadonlyArray<DesignTokenLike> | null | undefined): { base: string; dark: string } {\n const baseVars = Object.entries(tokensToVarMap(tokens))\n .map(([k, v]) => ` --${k}: ${v};`).join('\\n');\n const darkVars = Object.entries(tokensToDarkVarMap(tokens))\n .map(([k, v]) => ` --${k}: ${v};`).join('\\n');\n return {\n base: baseVars ? `:root {\\n${baseVars}\\n}` : '',\n dark: darkVars ? `@media (prefers-color-scheme: dark) {\\n :root {\\n${darkVars}\\n }\\n}` : '',\n };\n}\n","import { styleKeyToKebab } from './style-compiler';\n\n/**\n * Flavors (flavors-and-theming-plan.md, F1): the design language a studio launches with,\n * expressed as data. THE invariant — a flavor never writes a literal into a node; it writes\n * tokens, and element defaults that REFERENCE tokens. To that end a pack's `defaults` map\n * holds TOKEN NAMES, not CSS values: the resolver builds `var(--iox-<name>, <packValue>)`,\n * so smuggling a literal in is impossible by construction, and the validator only has to\n * check that every referenced token exists.\n *\n * The fallback is the bootstrap: until F2 seeds the org's `designtokens` rows, no `--iox-*`\n * var is defined anywhere, and `var(--iox-radius-control, 4px)` must still paint identically\n * in the builder canvas and the SSR page. Once tokens ARE seeded (or re-themed), the var wins\n * over the fallback everywhere — which is exactly the §3 propagation story.\n */\n\nexport interface FlavorTokenDef {\n name: string;\n value: string;\n /** Dark-scheme override, seeded into DesignToken.values.dark at F2. */\n values?: { dark?: string };\n type?: 'color' | 'spacing' | 'size' | 'font' | 'other';\n /** Tokens-panel grouping (flavors plan §10 C5). */\n group?: 'colour' | 'type' | 'space' | 'radius' | 'shadow' | 'motion';\n}\n\nexport interface FlavorPack {\n id: string;\n /** Bumped when the pack's values change; seeding stamps `flavor:<id>@<version>` as DesignToken.source. */\n version: number;\n label: string;\n blurb: string;\n tokens: FlavorTokenDef[];\n /** type → styleTrait → TOKEN NAME (never a CSS value — see the module header). */\n defaults: Record<string, Record<string, string>>;\n}\n\n/** trait → `var(--iox-<token>, <packValue>)` for one node type. Unknown type → {}. */\nexport function resolveFlavorDefaults(\n type: string,\n pack: FlavorPack | null | undefined,\n): Record<string, string> {\n const map = pack?.defaults?.[type];\n if (!map) return {};\n const byName = new Map((pack!.tokens ?? []).map(t => [t.name, t.value]));\n const out: Record<string, string> = {};\n for (const [trait, tokenName] of Object.entries(map)) {\n const fallback = byName.get(tokenName);\n if (fallback === undefined) continue; // validator fails the build; runtime stays safe\n out[trait] = `var(--iox-${tokenName}, ${fallback})`;\n }\n return out;\n}\n\n/**\n * The ENGINE's half of the cascade: kebab `prop: var(…)` declarations for every pack default\n * the node's persisted styleProps does NOT set. Appended beside renderDefaultDeclarations —\n * same guard-on-undefined discipline, so a node saved post-F1 (var already serialised via the\n * builder's trait defaults) is untouched, and a legacy node picks the pack default up at\n * render time. Node styleProps always wins.\n */\nexport function flavorDefaultDeclarations(\n type: string,\n styleProps: Record<string, any> | null | undefined,\n pack: FlavorPack | null | undefined,\n): string[] {\n const sp = styleProps ?? {};\n const out: string[] = [];\n for (const [trait, value] of Object.entries(resolveFlavorDefaults(type, pack))) {\n if (sp[trait] === undefined) out.push(`${styleKeyToKebab(trait)}: ${value}`);\n }\n return out;\n}\n\n/**\n * The CI gate (flavors plan §10 C4): a pack may only name types and traits that exist in the\n * live component registry, and tokens it defines itself. Returns human-readable errors; a\n * consumer spec feeds it the REAL registry and asserts [].\n */\nexport function validateFlavorPack(\n pack: FlavorPack,\n knownTraitsByType: Record<string, ReadonlySet<string> | string[]>,\n): string[] {\n const errors: string[] = [];\n const tokenNames = new Set((pack.tokens ?? []).map(t => t.name));\n for (const t of pack.tokens ?? []) {\n if (!t.name) errors.push(`${pack.id}: token with empty name`);\n if (!t.value) errors.push(`${pack.id}: token \"${t.name}\" has no value`);\n }\n for (const [type, traits] of Object.entries(pack.defaults ?? {})) {\n const known = knownTraitsByType[type];\n if (!known) { errors.push(`${pack.id}: unknown component type \"${type}\"`); continue; }\n const knownSet = known instanceof Set ? known : new Set(known);\n for (const [trait, tokenName] of Object.entries(traits)) {\n if (!knownSet.has(trait)) errors.push(`${pack.id}: \"${type}\" has no style trait \"${trait}\"`);\n if (!tokenNames.has(tokenName)) errors.push(`${pack.id}: \"${type}.${trait}\" references undefined token \"${tokenName}\"`);\n if (/[:(]|^#|\\d/.test(tokenName)) errors.push(`${pack.id}: \"${type}.${trait}\" must name a token, not a value (\"${tokenName}\")`);\n }\n }\n return errors;\n}\n\n/**\n * Swiss — the default pack (flavors plan §8: \"the flavor that can never embarrass anyone\").\n * Deliberately SMALL at F1: radius + control padding on the clickables, surface radius on Card.\n * Colour, type and motion arrive with the brand step (F2) — a colour default here would repaint\n * legacy pages before anyone chose anything.\n */\nexport const SWISS_FLAVOR: FlavorPack = {\n id: 'swiss',\n version: 1,\n label: 'Swiss',\n blurb: 'Grid discipline, hairline rules, near-zero motion.',\n tokens: [\n { name: 'radius-control', value: '4px', type: 'size', group: 'radius' },\n { name: 'radius-surface', value: '4px', type: 'size', group: 'radius' },\n { name: 'space-control', value: '10px 18px', type: 'spacing', group: 'space' },\n { name: 'space-stack', value: '12px', type: 'spacing', group: 'space' },\n ],\n defaults: {\n Button: { borderRadius: 'radius-control', padding: 'space-control' },\n ButtonBlock: { borderRadius: 'radius-control', padding: 'space-control' },\n Card: { borderRadius: 'radius-surface' },\n },\n};\n\n/** What both renderers use until F2 lets an org choose. */\nexport const DEFAULT_FLAVOR: FlavorPack = SWISS_FLAVOR;\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\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): 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.\n if (style.backgroundColor) css['background-color'] = style.backgroundColor;\n break;\n }\n\n return css;\n}\n","/**\n * Shared RELATIVE (route-context) data resolving — the SINGLE source of truth for how a detail page\n * derives values FROM its current route item, consumed by BOTH the page builder (iox-cms-client) and\n * the SSR client engine (iox-client-engine). Companion to `data-source-resolver.ts`.\n *\n * These are the pure, transport-agnostic pieces behind the Route binding scope\n * (`$route` / `$current` / `$siblings` / `$related`). Resolution is a DEPENDENT SECOND PASS: the\n * consumer resolves `$current` first (the existing single by-id fetch via `planDataSource`), then\n * calls these to derive the relative values — there is NO new `DataSourcePlan` kind (`$related` still\n * feeds a normal `collection` plan built from {@link buildRelatedFilter}). See\n * `architecture/builder/relative-data-sources-plan.md`.\n *\n * There must be no second copy of this decision logic; only the transport (which HTTP layer fetches\n * the ordered collection / related list) differs between the two consumers.\n */\n\nimport { getByPath } from './data-source-resolver';\n\n/** Aliases in the Route scope are platform-owned and start with this prefix; a USER alias may never\n * start with it, which keeps the Route scope structurally collision-proof with Local/Global. Used to\n * validate new/renamed aliases and to render the reserved (read-only) item state in the bind picker. */\nexport const RESERVED_ALIAS_PREFIX = '$';\n\n/** True for a platform-owned Route-scope alias (`$route`, `$current`, `$siblings`, `$related`, …). */\nexport function isReservedAlias(alias: string | null | undefined): boolean {\n return typeof alias === 'string' && alias.startsWith(RESERVED_ALIAS_PREFIX);\n}\n\n/** The `$siblings` value: the current item's neighbours within an ordered set. */\nexport interface SiblingsResult<T = any> {\n /** The item before the current one (`null` at the start, unless `wrap`). */\n prev: T | null;\n /** The item after the current one (`null` at the end, unless `wrap`). */\n next: T | null;\n /** Zero-based position of the current item in the ordered set; `-1` when not found. */\n index: number;\n /** Total items in the set. */\n count: number;\n /** `true` when the current item is the first in the set. */\n isFirst: boolean;\n /** `true` when the current item is the last in the set. */\n isLast: boolean;\n}\n\nexport interface ResolveSiblingsOptions {\n /** Field identifying the current item within the list. Default `_id`. */\n idField?: string;\n /** Dot/bracket path to sort by BEFORE locating neighbours (e.g. `order`, `date`). Omit to use the\n * list's existing order. The same item neighbours differently per ordering, so this is the one\n * choice `$siblings` requires. */\n sortBy?: string;\n /** Sort direction when `sortBy` is set. Default `asc`. */\n sortDir?: 'asc' | 'desc';\n /** Wrap around the ends (`last.next` → first, `first.prev` → last). Only applies when `count > 1`.\n * Default `false`. */\n wrap?: boolean;\n}\n\nconst EMPTY_SIBLINGS: SiblingsResult = { prev: null, next: null, index: -1, count: 0, isFirst: false, isLast: false };\n\n/** Generic, deterministic comparator: numbers numerically, Dates by time, everything else by\n * locale-aware string compare (ISO date strings sort correctly this way). Nullish sorts first. */\nfunction compareValues(a: any, b: any): number {\n if (a == null && b == null) return 0;\n if (a == null) return -1;\n if (b == null) return 1;\n if (typeof a === 'number' && typeof b === 'number') return a - b;\n const da = a instanceof Date ? a.getTime() : NaN;\n const db = b instanceof Date ? b.getTime() : NaN;\n if (!isNaN(da) && !isNaN(db)) return da - db;\n return String(a).localeCompare(String(b));\n}\n\n/**\n * Locate the current item within an ordered set and return its neighbours + position. Pure: the input\n * list is never mutated (sorting works on a shallow copy). `currentId` is compared to each item's\n * `idField` via string equality (route-param values are strings). When the current id isn't found,\n * `index` is `-1` and `prev`/`next` are `null` (but `count` still reflects the set size).\n */\nexport function resolveSiblings<T = any>(\n items: T[] | null | undefined,\n currentId: string | number | null | undefined,\n options: ResolveSiblingsOptions = {},\n): SiblingsResult<T> {\n const list = Array.isArray(items) ? items.slice() : [];\n const count = list.length;\n if (count === 0) return { ...EMPTY_SIBLINGS };\n\n const idField = options.idField ?? '_id';\n if (options.sortBy) {\n const dir = options.sortDir === 'desc' ? -1 : 1;\n list.sort((a, b) => dir * compareValues(getByPath(a, options.sortBy!), getByPath(b, options.sortBy!)));\n }\n\n const cid = currentId == null ? null : String(currentId);\n const index = cid == null ? -1 : list.findIndex(it => String(getByPath(it, idField)) === cid);\n if (index === -1) return { prev: null, next: null, index: -1, count, isFirst: false, isLast: false };\n\n const canWrap = !!options.wrap && count > 1;\n const prev = index > 0 ? list[index - 1] : (canWrap ? list[count - 1] : null);\n const next = index < count - 1 ? list[index + 1] : (canWrap ? list[0] : null);\n return { prev, next, index, count, isFirst: index === 0, isLast: index === count - 1 };\n}\n\nexport interface BuildRelatedFilterOptions {\n /** Field(s) on the current item whose value(s) the related items must match (e.g. `category`,\n * or `['category', 'brand']`). Each contributes an equality filter on that field. */\n matchFields: string | string[];\n}\n\n/** A value usable as an equality filter param: a non-empty scalar. Objects/arrays/nullish are skipped\n * so a related query isn't built from an unresolved rel object (surfaced as a config issue in the UI\n * rather than silently matching everything). Multi-value match is a v2 concern. */\nfunction isScalarFilterValue(v: any): boolean {\n if (v == null) return false;\n if (typeof v === 'string') return v !== '';\n if (typeof v === 'number') return Number.isFinite(v);\n return typeof v === 'boolean';\n}\n\n/**\n * Build the collection filter for `$related` from the resolved current item: an equality match on\n * each `matchField`'s value (e.g. same `category`). Feeds a normal `collection` plan — no new plan\n * kind. Fields whose value is not a scalar (or is empty) are omitted, matching\n * `buildDataSourceFilter`'s \"don't over-filter\" rule. Exclude-self is applied to the RESULT via\n * {@link excludeSelf} (the public query controllers are equality-only, so it can't be a `$ne` param).\n */\nexport function buildRelatedFilter(current: any, options: BuildRelatedFilterOptions): Record<string, any> {\n const fields = Array.isArray(options.matchFields) ? options.matchFields : [options.matchFields];\n const filter: Record<string, any> = {};\n for (const field of fields) {\n if (!field) continue;\n const value = getByPath(current, field);\n if (isScalarFilterValue(value)) filter[field] = value;\n }\n return filter;\n}\n\n/**\n * Drop the current item from a list by `idField` (default `_id`). Used to exclude self from a\n * `$related` result after fetch. A nullish/empty `currentId` leaves the list unchanged.\n */\nexport function excludeSelf<T = any>(items: T[] | null | undefined, currentId: string | number | null | undefined, idField = '_id'): T[] {\n if (!Array.isArray(items)) return [];\n if (currentId == null || currentId === '') return items;\n const cid = String(currentId);\n return items.filter(it => String(getByPath(it, idField)) !== cid);\n}\n\n/** The resolved Route-scope context bound values read from (`$route.projectId`, `$current.title`,\n * `$siblings.next`, `$related`). Assembled by each consumer during its dependent second pass. */\nexport interface RouteContext {\n /** Route path params for the current URL (from `matchRouteParams`). */\n $route: Record<string, string>;\n /** The resolved current item (the page's single by-id source). */\n $current: any;\n /** Neighbours of the current item within a chosen ordered set. */\n $siblings?: SiblingsResult;\n /** Items related to the current one (same-attribute), excluding self. */\n $related?: any[];\n}\n\n// ── Relative source declaration + the shared second-pass resolver ────────────────────────────────\n// A relative source is declared like a `derived` one (`type:'relative'`), and resolved AFTER the\n// root/derived sources by a PURE pass over the resolved map — mirroring `resolveDerivedInto`, so the\n// SSR engine and the builder canvas agree with no forked logic. `planDataSource` returns `none` for\n// it (not fetched); each consumer excludes `relative` from its fetched roots and runs this pass.\n\nexport type RelativeSourceKind = 'route' | 'current' | 'siblings' | 'related';\n\nexport interface RelativeSourceSpec {\n kind: RelativeSourceKind;\n /** The source alias this derives from: for `current` the subject single-source; for\n * `siblings`/`related` the COLLECTION alias to locate within / search. Unused for `route`. */\n from?: string;\n /** `siblings`/`related`: the SUBJECT source alias (the current item) whose id / field values drive\n * the computation. Defaults to `from` when omitted. May reference `$current`. */\n subjectFrom?: string;\n /** Field identifying an item. Default `_id`. */\n idField?: string;\n /** `siblings`: sort the set before locating neighbours. */\n sortBy?: string;\n sortDir?: 'asc' | 'desc';\n wrap?: boolean;\n /** `siblings`: resolve to a SINGLE neighbour ITEM (`next`/`prev`) instead of the whole\n * `{prev,next,index,count,…}` object — so a source can be named e.g. `nextProject` and bound\n * directly (`nextProject.route`). Omit for the whole-object shape. */\n pick?: 'next' | 'prev';\n /** `related`: field(s) on the subject the results must match. */\n matchFields?: string | string[];\n /** `related`: drop the subject from its own results. Default `true`. */\n excludeSelf?: boolean;\n}\n\n/** Duck-typed view of a data source carrying an optional relative descriptor (avoids a hard dep on\n * the full editor model / a circular type import). */\ninterface RelativeCapableSource {\n alias?: string;\n type?: string;\n request?: { relative?: RelativeSourceSpec };\n}\n\n/** The already-resolved inputs a single relative source computes from. Assembled by each consumer:\n * the batch pass reads them from the resolved map; the builder resolves them async per alias. */\nexport interface RelativeInputs {\n /** The subject item (the current resource) — for `current`/`siblings`/`related`. */\n subject?: any;\n /** The collection to locate within / search — for `siblings`/`related`. */\n collection?: any;\n /** Route path params — for `route`. */\n routeParams?: Record<string, any>;\n}\n\n/** Resolve kinds in a fixed order so a `siblings`/`related` source may reference `$current` (or any\n * earlier relative alias) via `subjectFrom` and still see it resolved. */\nconst KIND_ORDER: Record<RelativeSourceKind, number> = { route: 0, current: 1, siblings: 2, related: 3 };\n\n/** Does an item satisfy every field in an equality predicate map (string-compared)? */\nfunction matchesFilter(item: any, filter: Record<string, any>): boolean {\n return Object.keys(filter).every(k => String(getByPath(item, k)) === String(filter[k]));\n}\n\n/**\n * Compute ONE relative source's value from its already-resolved {@link RelativeInputs} — the SHARED\n * kind→computation decision, so the batch pass ({@link resolveRelativeInto}) and the builder's async\n * per-alias resolver produce identical results with no forked switch. `route` → the route params;\n * `current` → the subject; `siblings` → {@link resolveSiblings} over the collection; `related` → the\n * collection filtered by {@link buildRelatedFilter}'s predicate (+ {@link excludeSelf}).\n */\nexport function computeRelative(spec: RelativeSourceSpec, inputs: RelativeInputs): any {\n const idField = spec.idField ?? '_id';\n switch (spec.kind) {\n case 'route':\n return inputs.routeParams ?? {};\n case 'current':\n return inputs.subject ?? null;\n case 'siblings': {\n const siblings = resolveSiblings(inputs.collection, getByPath(inputs.subject, idField), {\n idField, sortBy: spec.sortBy, sortDir: spec.sortDir, wrap: spec.wrap,\n });\n // `pick` resolves the source directly to that neighbour item (named-source shape,\n // e.g. `nextProject`); without it the caller binds a sub-path of the whole object.\n return spec.pick ? siblings[spec.pick] : siblings;\n }\n case 'related': {\n const filter = buildRelatedFilter(inputs.subject, { matchFields: spec.matchFields ?? [] });\n const pool = Array.isArray(inputs.collection) ? inputs.collection : [];\n const items = pool.filter(it => matchesFilter(it, filter));\n return spec.excludeSelf !== false ? excludeSelf(items, getByPath(inputs.subject, idField), idField) : items;\n }\n default:\n return null;\n }\n}\n\n/**\n * Compute every `type:'relative'` source into `resolved` (keyed by alias), IN PLACE. Pure w.r.t. HTTP\n * — it only reads already-resolved roots + the route params, so both consumers run it identically as\n * a second pass. Delegates each source to {@link computeRelative}. `current`'s subject is `from`;\n * `siblings`/`related` take `collection` = `from` and `subject` = `subjectFrom ?? from`. Mutates and\n * returns `resolved`.\n */\nexport function resolveRelativeInto(\n dataSources: RelativeCapableSource[],\n resolved: Record<string, any>,\n routeParams: Record<string, any> = {},\n): Record<string, any> {\n const relatives = (dataSources ?? [])\n .filter(d => d?.type === 'relative' && !!d.alias && !!d.request?.relative)\n .sort((a, b) => KIND_ORDER[a.request!.relative!.kind] - KIND_ORDER[b.request!.relative!.kind]);\n\n for (const d of relatives) {\n const spec = d.request!.relative!;\n const subjectAlias = spec.kind === 'current' ? spec.from : (spec.subjectFrom ?? spec.from);\n resolved[d.alias!] = computeRelative(spec, {\n subject: subjectAlias ? resolved[subjectAlias] : undefined,\n collection: spec.from ? resolved[spec.from] : undefined,\n routeParams,\n });\n }\n return resolved;\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: 'image' },\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: 'image' },\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(/ /gi, ' ')\n .replace(/&/gi, '&')\n .replace(/</gi, '<')\n .replace(/>/gi, '>')\n .replace(/"/gi, '\"')\n .replace(/'|'/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 */\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 * 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-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/responsive';\nexport * from './lib/style-compiler/swiper-breakpoints';\nexport * from './lib/style-compiler/token-css';\nexport * from './lib/style-compiler/flavor';\nexport * from './lib/page-style/page-style';\nexport * from './lib/data-source/data-source-resolver';\nexport * from './lib/data-source/relative-sources';\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';\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';\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';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AOSService","i1.IoxAnimateContainer","i1.PageScrollProvider","pick","i1.FormRuntimeService","i2","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,I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