@vectoriox/iox-builder 4.12.0 → 4.12.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectoriox-iox-builder.mjs","sources":["../../../projects/iox-builder/src/lib/models/component.model.ts","../../../projects/iox-builder/src/lib/utils/clone-ids.util.ts","../../../projects/iox-builder/src/lib/models/wrap-node.ts","../../../projects/iox-builder/src/lib/panels/panel-event.service.ts","../../../projects/iox-builder/src/lib/panels/panel.model.ts","../../../projects/iox-builder/src/lib/style-compose.ts","../../../projects/iox-builder/src/lib/utils/node-path.util.ts","../../../projects/iox-builder/src/lib/utils/breakpoint-counts.util.ts","../../../projects/iox-builder/src/lib/utils/insert-target.util.ts","../../../projects/iox-builder/src/lib/utils/form-selection.util.ts","../../../projects/iox-builder/src/lib/utils/structure-ops.util.ts","../../../projects/iox-builder/src/lib/utils/responsive-audit.util.ts","../../../projects/iox-builder/src/lib/models/layout-presets.ts","../../../projects/iox-builder/src/lib/services/component-registry.service.ts","../../../projects/iox-builder/src/lib/overlay/overlay.service.ts","../../../projects/iox-builder/src/lib/utils/drop-label.util.ts","../../../projects/iox-builder/src/lib/utils/spring-motion.util.ts","../../../projects/iox-builder/src/lib/utils/drag-redirect.util.ts","../../../projects/iox-builder/src/lib/services/symbol-registry.service.ts","../../../projects/iox-builder/src/lib/services/drag-engine.service.ts","../../../projects/iox-builder/src/lib/services/data-source-registry.service.ts","../../../projects/iox-builder/src/lib/services/viewport.service.ts","../../../projects/iox-builder/src/lib/services/component-instance-registry.service.ts","../../../projects/iox-builder/src/lib/services/interaction-engine.service.ts","../../../projects/iox-builder/src/lib/services/interaction-preset-registry.service.ts","../../../projects/iox-builder/src/lib/services/builder-clipboard.service.ts","../../../projects/iox-builder/src/lib/services/style-registry.service.ts","../../../projects/iox-builder/src/lib/services/moveable-canvas.service.ts","../../../projects/iox-builder/src/lib/services/selecto-canvas.service.ts","../../../projects/iox-builder/src/lib/render/render.directive.ts","../../../projects/iox-builder/src/lib/services/preset-registry.service.ts","../../../projects/iox-builder/src/lib/directives/iox-draggable.directive.ts","../../../projects/iox-builder/src/lib/overlay/overlay.component.ts","../../../projects/iox-builder/src/lib/overlay/overlay.component.html","../../../projects/iox-builder/src/lib/tokens/builder.tokens.ts","../../../projects/iox-builder/src/lib/toolbar/toolbar.component.ts","../../../projects/iox-builder/src/lib/toolbar/toolbar.component.html","../../../projects/iox-builder/src/lib/panels/layer-tree/layer-tree.component.ts","../../../projects/iox-builder/src/lib/panels/layer-tree/layer-tree.component.html","../../../projects/iox-builder/src/lib/breadcrumb/breadcrumb-bar.component.ts","../../../projects/iox-builder/src/lib/breadcrumb/breadcrumb-bar.component.html","../../../projects/iox-builder/src/lib/audit/audit-panel.component.ts","../../../projects/iox-builder/src/lib/audit/audit-panel.component.html","../../../projects/iox-builder/src/lib/builder.component.ts","../../../projects/iox-builder/src/lib/builder.component.html","../../../projects/iox-builder/src/lib/components/section/section.component.ts","../../../projects/iox-builder/src/lib/components/container/container.component.ts","../../../projects/iox-builder/src/lib/directives/iox-dropzone.directive.ts","../../../projects/iox-builder/src/lib/components/linked-container/linked-container.component.ts","../../../projects/iox-builder/src/lib/utils/binding-path.util.ts","../../../projects/iox-builder/src/lib/services/builder-data-source.service.ts","../../../projects/iox-builder/src/lib/components/repeater/repeater.component.ts","../../../projects/iox-builder/src/lib/components/button-block/button-block.component.ts","../../../projects/iox-builder/src/lib/components/slider-container/slider-container.component.ts","../../../projects/iox-builder/src/lib/components/slider-slide/slider-slide.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel-child.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel.component.html","../../../projects/iox-builder/src/lib/services/builder-history.service.ts","../../../projects/iox-builder/src/lib/iox-builder.module.ts","../../../projects/iox-builder/src/lib/models/essential-traits.ts","../../../projects/iox-builder/src/lib/models/form-presets.ts","../../../projects/iox-builder/src/lib/components/button/button.config.ts","../../../projects/iox-builder/src/lib/components/button-block/button-block.config.ts","../../../projects/iox-builder/src/lib/components/card/card.config.ts","../../../projects/iox-builder/src/lib/components/container/container.config.ts","../../../projects/iox-builder/src/lib/components/divider/divider.config.ts","../../../projects/iox-builder/src/lib/components/gallery/gallery.config.ts","../../../projects/iox-builder/src/lib/components/form/form.config.ts","../../../projects/iox-builder/src/lib/components/heading/heading.config.ts","../../../projects/iox-builder/src/lib/components/icon/icon.config.ts","../../../projects/iox-builder/src/lib/components/image/image.config.ts","../../../projects/iox-builder/src/lib/components/link/link.config.ts","../../../projects/iox-builder/src/lib/components/linked-container/linked-container.config.ts","../../../projects/iox-builder/src/lib/components/list-item/list-item.config.ts","../../../projects/iox-builder/src/lib/components/text/text.config.ts","../../../projects/iox-builder/src/lib/components/list/list.config.ts","../../../projects/iox-builder/src/lib/components/repeater/repeater.config.ts","../../../projects/iox-builder/src/lib/components/section/section.config.ts","../../../projects/iox-builder/src/lib/components/slider-slide/slider-slide.config.ts","../../../projects/iox-builder/src/lib/components/slider-container/slider-container.config.ts","../../../projects/iox-builder/src/lib/components/spacer/spacer.config.ts","../../../projects/iox-builder/src/public-api.ts","../../../projects/iox-builder/src/vectoriox-iox-builder.ts"],"sourcesContent":["import { DEFAULT_WIDTH_BY_TYPE, IoxContextSlot, RelativeSourceSpec, ResponsiveOverrides, SetContextParams } from '@vectoriox/iox-ui';\n\nexport enum StyleCategory {\n Layout = 'Layout',\n /** How THIS node participates in its parent's flex/grid flow (align-self, flex-grow, grid-column…).\n * Distinct from Layout, which configures the node as a container for its OWN children. */\n ChildLayout = 'Child Layout',\n Size = 'Size',\n Typography = 'Typography',\n Spacing = 'Spacing',\n Border = 'Border',\n Position = 'Position',\n Background = 'Background',\n Effects = 'Effects',\n List = 'List',\n // Legacy — kept for backward compat; prefer Size\n Dimensions = 'Dimensions',\n}\n\nexport interface IoxBinding {\n prop: string;\n source: string;\n path: string;\n fallback?: any;\n /** Render-time transform chain (UI: \"Filters\"), applied LEFT→RIGHT after resolvePath by the shared\n * `applyBindingPipes` from `@vectoriox/iox-ui` — same on the builder canvas and the SSR engine.\n * Shape mirrors iox-ui's `IoxPipe` (kept inline so this model needs no cross-package import). */\n pipes?: { name: string; args?: any[] }[];\n}\n\n/**\n * When mode=single: looks up a single CMS item by matching a schema field\n * against a URL path param (e.g. /project/:projectId → field _id).\n * `defaultId` is used as a fallback value in the builder preview when no\n * live route is active.\n */\nexport interface DsFilterByRouteParam {\n field: string;\n routeParam: string;\n defaultId?: string;\n}\n\n/**\n * When mode=query: each entry filters a schema field, either from a URL query string key\n * (e.g. ?status=active → field \"status\") or by a constant.\n * `queryParam` OMITTED → constant filter: `defaultValue` is always the value.\n * `queryParam` present → the URL value wins and `defaultValue` is the fallback (which is what the\n * builder preview always uses — design time has no live query params).\n */\nexport interface DsFilterByQueryParam {\n field: string;\n queryParam?: string;\n defaultValue?: string;\n}\n\nexport enum DataSourceType {\n Cms = 'cms',\n Shop = 'shop',\n ExternalApi = 'external-api',\n InternalApi = 'internal-api',\n Static = 'static',\n /** A VIEW into another variable: `{ from: <alias>, path }` (e.g. galleryImages = product.gallery).\n * Resolves to the value one (or more) level(s) into a parent variable — page-scoped. */\n Derived = 'derived',\n /** A ROUTE-CONTEXT value derived from the current route item — `$route`/`$current`/`$siblings`/\n * `$related`. Not fetched: computed by the shared `computeRelative` from other resolved sources.\n * See relative-data-sources-plan.md. */\n Relative = 'relative',\n /** A page-local VARIABLE: a named resource whose value is WRITTEN at runtime by an interaction\n * (`setContext`), never fetched. Starts empty; elements bind to it like any other alias.\n * `request.variable.itemsFrom` names the source whose items it holds, for field suggestions.\n * See element-context-state-plan.md. */\n Variable = 'variable',\n}\n\nexport interface IoxDataSource {\n id: string;\n type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived' | 'relative' | 'variable';\n mode: 'single' | 'query';\n alias: string;\n request: {\n method?: 'GET' | 'POST';\n endpoint?: string;\n /** `derived` alias: resolve `from` (another alias) then getByPath(value, path). */\n derived?: { from: string; path: string };\n /** `relative` alias: a route-context computation (kind + from/subjectFrom/sortBy/matchFields…),\n * resolved by the shared `computeRelative`. */\n relative?: RelativeSourceSpec;\n /** `variable` alias: written at runtime by an interaction. `itemsFrom` names the source whose\n * items it holds — optional, and used only to suggest fields in the bind picker. */\n variable?: { itemsFrom?: string };\n cms?: {\n contentType: string;\n filter?: any;\n limit?: number;\n sort?: any;\n /** Single-result lookup: match field against a route path param */\n filterByRouteParam?: DsFilterByRouteParam;\n /** Array-result filtering: match fields against URL query params */\n filterByQueryParams?: DsFilterByQueryParam[];\n };\n shop?: {\n contentType: 'products' | 'categories' | 'subCategories';\n filterByRouteParam?: DsFilterByRouteParam;\n filterByQueryParams?: DsFilterByQueryParam[];\n };\n params?: Record<string, any>;\n };\n}\n\n// ── Interactions / Animations ────────────────────────────────\n\n/**\n * Element context state — the shared types live in @vectoriox/iox-ui (the engine cannot import\n * iox-builder), and are re-exported here so builder code has one import site. See\n * element-context-state-plan.md.\n */\nexport type { IoxContextSlot, SetContextParams };\n\nexport type InteractionTrigger =\n | 'pageLoad' | 'click' | 'hover' | 'viewportEnter' | 'scrollProgress'\n // Page-transition choreography (see page-transitions.md). pageLeave plays on navigate-AWAY and\n // the route swap waits for all of them; pageEnter plays after the page transition completes.\n | 'pageLeave' | 'pageEnter'\n // Swiper container-level events (used as triggers on a SliderContainer node)\n | 'swiperSlideChange' | 'swiperReachBeginning' | 'swiperReachEnd'\n | 'swiperAutoplayStart' | 'swiperAutoplayStop'\n // Swiper slide-level events (used as triggers on a SliderSlide node)\n | 'swiperSlideActive' | 'swiperSlideInactive';\n\nexport type InteractionActionType =\n | 'fadeIn' | 'fadeOut'\n | 'moveUp' | 'moveDown' | 'moveLeft' | 'moveRight'\n | 'scaleIn' | 'scaleOut'\n | 'rotate'\n | 'show' | 'hide' | 'toggleVisibility'\n // Element context state — write/clear a named runtime slot other elements bind to. Not an\n // animation: these carry `SetContextParams` in `params`. See element-context-state-plan.md.\n | 'setContext' | 'clearContext'\n // Swiper imperative method actions (target must be a labeled SliderContainer node)\n | 'swiperNext' | 'swiperPrev' | 'swiperGoToSlide'\n | 'swiperAutoplayStart' | 'swiperAutoplayStop' | 'swiperAutoplayPause';\n\nexport interface InteractionAction {\n type: InteractionActionType;\n /** 'self' targets the node that owns the interaction; otherwise a node ID. */\n target: 'self' | string;\n /** Duration in milliseconds. */\n duration: number;\n /** Delay in milliseconds before the action starts. */\n delay: number;\n easing: 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';\n /**\n * Extra parameters — `{ distance: 20 }` for move actions. For `setContext`/`clearContext` this\n * holds a `SetContextParams` (`{ slot, value, noReverse? }`), read structurally by the shared\n * `contextActionEffect` in @vectoriox/iox-ui. Kept as an index signature because animation\n * actions access it by key (`params?.['degrees']`).\n */\n params?: Record<string, any>;\n /** If true, the action only plays once (relevant for viewport/scroll triggers). */\n once?: boolean;\n /**\n * Switched OFF by the author without deleting it — useful while tuning a multi-action sequence.\n * Absent means enabled. Honoured by BOTH runtimes via the shared `isActionEnabled`: a disabled\n * action does not animate, does not write context, and receives no pre-state.\n */\n disabled?: boolean;\n}\n\nexport interface IoxInteraction {\n id: string;\n trigger: InteractionTrigger;\n actions: InteractionAction[];\n /**\n * Optional second set of actions for click-toggle behaviour.\n * When set, the first click runs `actions` and the second click runs\n * `reverseActions`, alternating on every subsequent click.\n * Only meaningful for trigger === 'click'.\n */\n reverseActions?: InteractionAction[];\n}\n\n/**\n * Maps each action type to its logical inverse for auto-populating toggle\n * reverse actions. Types without a natural inverse are omitted.\n */\nexport const INVERSE_ACTION: Partial<Record<InteractionActionType, InteractionActionType>> = {\n fadeIn: 'fadeOut',\n fadeOut: 'fadeIn',\n show: 'hide',\n hide: 'show',\n scaleIn: 'scaleOut',\n scaleOut: 'scaleIn',\n moveUp: 'moveDown',\n moveDown: 'moveUp',\n moveLeft: 'moveRight',\n moveRight: 'moveLeft',\n // Click-toggle only: click sets the slot, click again clears it. This map does NOT drive\n // hover-leave — that runs the same actions on a reverse pass, whose context semantics live in\n // `contextActionEffect` (@vectoriox/iox-ui).\n setContext: 'clearContext',\n clearContext: 'setContext',\n};\n\n// ── Component capability declarations ─────────────────────────────────────────\n\n/** An event that a component can emit, usable as an interaction trigger. */\nexport interface ComponentEventDef {\n /** Value stored on IoxInteraction.trigger (e.g. 'swiperSlideChange'). */\n value: string;\n label: string;\n icon?: string;\n}\n\n/** An imperative method a component exposes, usable as an interaction action. */\nexport interface ComponentMethodDef {\n /** Value stored on InteractionAction.type (e.g. 'swiperNext'). */\n value: string;\n label: string;\n /** Optional parameters the user can configure when this action is selected. */\n params?: { name: string; type: 'number' | 'string' | 'boolean'; label: string }[];\n}\n\nexport const TRIGGER_OPTIONS: { value: InteractionTrigger; label: string; icon: string }[] = [\n { value: 'pageLoad', label: 'Page load', icon: 'ph-thin ph-play' },\n { value: 'pageEnter', label: 'Page enter', icon: 'ph-thin ph-sign-in' },\n { value: 'pageLeave', label: 'Page leave', icon: 'ph-thin ph-sign-out' },\n { value: 'viewportEnter', label: 'Enter viewport', icon: 'ph-thin ph-eye' },\n { value: 'click', label: 'Click', icon: 'ph-thin ph-cursor-click' },\n { value: 'hover', label: 'Hover', icon: 'ph-thin ph-hand-pointing' },\n { value: 'scrollProgress', label: 'Scroll progress', icon: 'ph-thin ph-arrow-fat-lines-down' },\n];\n\nexport const ACTION_TYPE_OPTIONS: { value: InteractionActionType; label: string }[] = [\n { value: 'fadeIn', label: 'Fade in' },\n { value: 'fadeOut', label: 'Fade out' },\n { value: 'moveUp', label: 'Move up' },\n { value: 'moveDown', label: 'Move down' },\n { value: 'moveLeft', label: 'Move left' },\n { value: 'moveRight', label: 'Move right' },\n { value: 'scaleIn', label: 'Scale in' },\n { value: 'scaleOut', label: 'Scale out' },\n { value: 'rotate', label: 'Rotate' },\n { value: 'show', label: 'Show' },\n { value: 'hide', label: 'Hide' },\n { value: 'toggleVisibility', label: 'Toggle visibility' },\n { value: 'setContext', label: 'Set context' },\n { value: 'clearContext', label: 'Clear context' },\n];\n\nexport const EASING_OPTIONS = ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out'];\n\n// ── Style Presets ─────────────────────────────────────────────────────────────\n\n/**\n * A named, reusable collection of CSS style properties stored at the org level.\n * Elements reference a preset by `stylePresetId`. At render time the engine\n * merges `preset.styleProps → element.styleOverrides` so local overrides win.\n */\nexport interface StylePreset {\n id: string;\n name: string;\n /** Flat CSS property map — same shape as IoxLayoutNode.styleProps. */\n styleProps: Record<string, any>;\n /** Per-state style overrides stored alongside the preset (e.g. hover, active, focus). */\n stateStyles?: Partial<Record<ElementState, Record<string, any>>>;\n}\n\n/** A reusable element definition whose instances all stay in sync.\n * Stored in the `symbols` backend collection; referenced by ComponentNode.symbolId. */\nexport interface IoxSymbol {\n id: string;\n name: string;\n /** Full serialised node tree — same shape as a page layout node. */\n node: Record<string, any>;\n}\n\n/**\n * A named, reusable collection of IoxInteraction[] stored at the org level.\n * Elements reference a preset by `interactionPresetId`. Editing the preset\n * propagates updated interactions to all linked elements immediately.\n */\nexport interface InteractionPreset {\n id: string;\n name: string;\n interactions: IoxInteraction[];\n}\n\nexport type ElementState =\n | 'hover' | 'active' | 'focus'\n | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)'\n | 'parent-hover'\n | 'trigger-hover';\n\n/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */\nexport const INTERACTION_STATES: ElementState[] = ['hover', 'active', 'focus'];\n\n/** Structural pseudo-classes — compiled to .iox-outer-{id}:state */\nexport const STRUCTURAL_STATES: ElementState[] = ['first-child', 'last-child', 'nth-child(odd)', 'nth-child(even)'];\n\n/**\n * Relational pseudo-classes — the styled element is a descendant, the pseudo-class\n * lives on an ANCESTOR. Compiled to `.iox-node-{parentId}:{base} .iox-node-{id} { … }`,\n * so they require the ancestor's css id (`relativeToId`) at compile time.\n * `RELATIONAL_STATE_BASE` maps each relational state to the ancestor pseudo-class.\n */\nexport const RELATIONAL_STATES: ElementState[] = ['parent-hover'];\n\nexport const RELATIONAL_STATE_BASE: Partial<Record<ElementState, string>> = {\n 'parent-hover': 'hover',\n};\n\n/**\n * Targeted relational pseudo-classes — the styled element restyles when an ARBITRARY\n * chosen element (the `trigger`, not the DOM parent) matches a pseudo-class. Compiled to\n * `.iox-node-{scopeId}:has(.iox-node-{triggerId}:{base}) .iox-node-{id} { … }`, where\n * `scopeId` is the NEAREST COMMON ANCESTOR of the styled node and the trigger. Scoping the\n * `:has()` to that ancestor keeps the rule repetition-safe (each cloned subtree matches\n * independently) with a single shared CSS rule.\n *\n * The trigger node id per state is stored on `ComponentNode.stateTriggers`.\n * `TARGETED_STATE_BASE` maps each targeted state to the trigger's pseudo-class.\n */\nexport const TARGETED_STATES: ElementState[] = ['trigger-hover'];\n\nexport const TARGETED_STATE_BASE: Partial<Record<ElementState, string>> = {\n 'trigger-hover': 'hover',\n};\n\nexport const SUPPORTED_STATES: ElementState[] = [...INTERACTION_STATES, ...STRUCTURAL_STATES, ...RELATIONAL_STATES, ...TARGETED_STATES];\n\nexport interface ComponentNode {\n id?: string;\n /**\n * The CSS class key (`iox-node-{styleId}`) used by the style engine.\n * Set on clone nodes to point back to the original template node's id,\n * so all repeated rows share a single CSS rule.\n * Absent on original (non-clone) nodes — they use `id` directly.\n */\n styleId?: string;\n type: string;\n inputs?: Record<string, any>;\n traits?: ComponentTrait[];\n styleTraits?: StyleTraitGroup[];\n bindings?: IoxBinding[];\n interactions?: IoxInteraction[];\n children?: ComponentNode[];\n isGlobal?: boolean;\n globalPosition?: 'before' | 'after';\n /** ID of the org-level StylePreset applied to this node. */\n stylePresetId?: string;\n /**\n * CSS properties explicitly overridden by the user after a preset was applied.\n * Serialized to `styleProps` in the page layout JSON when a preset is active.\n * Absent when no preset is applied (full styles stored in styleTraits instead).\n */\n styleOverrides?: Record<string, any>;\n /**\n * Per-state style overrides. Only stores properties that differ from the base\n * style — same sparse pattern as styleOverrides. Each key maps to a flat CSS\n * property map that is compiled to `.iox-node-{id}:hover { … }` etc.\n */\n stateStyles?: Partial<Record<ElementState, Record<string, any>>>;\n /**\n * For TARGETED_STATES (e.g. `trigger-hover`): the node id whose pseudo-class drives\n * that state. Keyed by state so future targeted states (trigger-active/focus) slot in.\n * The styled node restyles when this trigger node is hovered; the compiler scopes the\n * `:has()` selector to the nearest common ancestor of the two. Only nodes with a `label`\n * appear in the trigger picker.\n */\n stateTriggers?: Partial<Record<ElementState, string>>;\n /**\n * Per-breakpoint overrides — SPARSE, shaped like `stateStyles`:\n * `{ mobile: { styleProps: {…}, stateStyles: { hover: {…} } } }`. Base styles stay in\n * `styleTraits`; absent means the node looks the same at every width. Read and written only\n * through the shared helpers in `@vectoriox/iox-ui` (`resolveStyleProps`, `setOverride`,\n * `clearOverride`, `planResponsiveRules`) so builder and SSR engine agree.\n * See iox-ai-guidance `architecture/builder/responsive-breakpoints-plan.md`.\n */\n responsive?: ResponsiveOverrides;\n /** User-defined display name for this node. Used in the layer tree and as an\n * interaction target identifier. Only nodes with a label appear in the\n * interaction target picker. */\n label?: string;\n /** ID of the org-level IoxSymbol this node is linked to.\n * Absent on stamps (independent copies). When present, any style change\n * on this node propagates to all other instances of the same symbol. */\n symbolId?: string;\n /** Set when the user detaches an instance from its symbol. Remembers the\n * origin symbol ID so the instance can be re-linked (resynced) later. */\n detachedSymbolId?: string;\n /** ID of the org-level InteractionPreset applied to this node.\n * When set, node.interactions reflects the preset's interactions. */\n interactionPresetId?: string;\n}\n\n/**\n * Build a full StyleTraitGroup[] schema populated with values from a flat\n * styleProps map. Used when editing a preset in the Style panel — the panel\n * receives the same `StyleTraitGroup[]` shape regardless of context.\n */\nexport function buildPresetStyleTraits(styleProps: Record<string, any>): StyleTraitGroup[] {\n const allGroups: GroupStyleConfig[] = [\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n new PositionGroupStyleConfig(),\n ];\n return allGroups.map(group => ({\n ...group,\n traits: group.traits.map(trait => ({\n ...trait,\n default: styleProps[trait.name] !== undefined ? styleProps[trait.name] : trait.default,\n })),\n }));\n}\n\nexport enum TraitInputType {\n Text = 'text',\n Number = 'number',\n Select = 'select',\n Checkbox = 'checkbox',\n Color = 'colorPicker',\n DirectionalSize = 'directionalSize',\n SelectButton = 'selectButton',\n Scrub = 'scrub',\n Range = 'range',\n Icon = 'icon',\n Media = 'media',\n /** Ordered list of images (URL / one-by-one / filebox; per-item binding in a later phase).\n * Controller registered in the consumer (iox-cms-client) as `mediaList`. Value: GalleryImage[]. */\n MediaList = 'mediaList',\n FontFamily = 'fontFamily',\n GridTemplate = 'gridTemplate',\n SectionLabel = 'sectionLabel',\n Textarea = 'textarea',\n}\n\nexport interface TraitOptionMap {\n [key: string]: any;\n}\n\n/** Named label/value pair for select options where the display label differs from the CSS value. */\nexport interface TraitSelectOption {\n label: string;\n value: string;\n}\n\nexport interface QuadSizeSegment {\n key: string;\n icon: string;\n ariaLabel?: string;\n}\n\n/** Conditional visibility: this trait only shows when a controlling trait matches one of the given values.\n * `scope` selects whose trait is inspected:\n * - `'self'` (default): a sibling trait on the SAME node/group (e.g. grid tracks show when this node's display=grid).\n * - `'parent'`: the same-named trait on the node's PARENT (e.g. flex-child props show when the PARENT's display=flex).\n * Parent-scoped conditions are resolved by the style panel, which threads the parent's live value in. */\nexport interface TraitShowCondition {\n /** name of the controlling trait (a sibling when scope='self'; read off the parent when scope='parent') */\n trait: string;\n /** one value or an array of values that make this trait visible */\n values: string | string[];\n /** whose trait to inspect — defaults to 'self' (a sibling in the same group). */\n scope?: 'self' | 'parent';\n}\n\nexport interface ComponentTrait {\n name: string;\n label: string;\n type: TraitInputType;\n options?: string[] | TraitSelectOption[] | TraitOptionMap;\n default?: any;\n inline?: boolean;\n /** When set, this trait is hidden unless the named sibling trait has one of the specified values. */\n showWhen?: TraitShowCondition;\n /** OPT-IN: may hold a different value per breakpoint (`responsive[bp].inputs`). See TraitConfig. */\n responsive?: boolean;\n}\n\n// StyleTrait is the same shape as ComponentTrait — unified type\nexport type StyleTrait = ComponentTrait;\n\nexport interface StyleTraitGroup {\n category: string;\n traits: ComponentTrait[];\n}\n\nexport function generateNodeId(): string {\n return Math.random().toString(36).substr(2, 9);\n}\n\nexport class ComponentConfig {\n public id: string;\n public type: string;\n public selector: string;\n public icon: string;\n public category: string;\n public inputs: Record<string, any>;\n public traits: ComponentTrait[];\n public styleTraits: StyleTraitGroup[];\n /** Layout components (e.g. Section) set this to []. Leaf components leave it undefined.\n * RenderDirective uses `node.children !== undefined` to detect layout components. */\n public children?: ComponentNode[];\n /** When true, the component is excluded from the Components panel drag list.\n * Use for internal-only types (e.g. SliderSlide) that are created programmatically. */\n public hidden?: boolean;\n /** Events this component emits that can be used as interaction triggers.\n * The Interactions panel appends these to the trigger dropdown for nodes of this type. */\n public componentEvents?: ComponentEventDef[];\n /** Imperative methods this component exposes that can be used as interaction actions.\n * The Interactions panel appends these to the action dropdown when targeting this component. */\n public componentMethods?: ComponentMethodDef[];\n\n constructor(type: string, selector: string, icon = 'ph-thin ph-cube', category = 'General') {\n this.id = generateNodeId();\n this.type = type;\n this.selector = selector;\n this.icon = icon;\n this.category = category;\n this.inputs = {};\n this.traits = [];\n this.styleTraits = [];\n }\n\n /** Override specific trait defaults after styleTraits are set.\n * Call this at the end of each subclass constructor. */\n protected applyStyleDefaults(defaults: Record<string, any>): void {\n // Single source of truth for container-type width defaults: when a subclass does\n // not set width explicitly, fill it from the shared DEFAULT_WIDTH_BY_TYPE map — the\n // same map the SSR engine resolves from. See render-parity.md.\n if (defaults['width'] === undefined && DEFAULT_WIDTH_BY_TYPE[this.type] !== undefined) {\n defaults = { ...defaults, width: DEFAULT_WIDTH_BY_TYPE[this.type] };\n }\n for (const group of this.styleTraits) {\n for (const trait of group.traits) {\n if (defaults[trait.name] !== undefined) {\n trait.default = defaults[trait.name];\n }\n }\n }\n }\n}\n\nexport class TraitConfig {\n public name: string;\n public label: string;\n public type: TraitInputType;\n public options?: string[] | TraitSelectOption[] | TraitOptionMap;\n public default?: any;\n public inline?: boolean;\n public showWhen?: TraitShowCondition;\n /**\n * OPT-IN: this trait can hold a different value per breakpoint, stored in\n * `ComponentNode.responsive[bp].inputs` and resolved by the shared `resolveInputs`.\n *\n * Opt-in rather than universal because most traits are not layout decisions — a slider's\n * `loop` or a link's `target` has one answer at every width, and offering a breakpoint control\n * on all 30 slider traits would bury the three that matter. Set it only where the value is\n * genuinely a per-width layout choice (slidesPerView, limit, …).\n */\n public responsive?: boolean;\n\n constructor(\n name: string,\n label: string,\n type: TraitInputType,\n options?: string[] | TraitSelectOption[] | TraitOptionMap,\n defaultValue?: any,\n inline?: boolean,\n showWhen?: TraitShowCondition,\n responsive?: boolean,\n ) {\n this.name = name;\n this.label = label;\n this.type = type;\n this.options = options;\n this.default = defaultValue;\n this.inline = inline;\n this.showWhen = showWhen;\n this.responsive = responsive;\n }\n}\n\n// StyleTraitConfig is unified with TraitConfig — single class for both traits and style traits\nexport { TraitConfig as StyleTraitConfig };\n\nexport class GroupStyleConfig {\n public category: string;\n public traits: TraitConfig[];\n\n constructor(category: string, traits: TraitConfig[]) {\n this.category = category;\n this.traits = traits;\n }\n}\n\n// ─── Unit constants ───────────────────────────────────────────────────────────\n\nexport const UNITS_ALL: string[] = ['px', '%', 'rem', 'em', 'vw', 'vh'];\nexport const UNITS_NO_VW: string[] = ['px', '%', 'rem', 'em', 'vh'];\nexport const UNITS_FIXED: string[] = ['px', '%', 'rem', 'em'];\nexport const UNITS_DEG: string[] = ['deg'];\n\n// ─── Shared panel utilities ──────────────────────────────────────────────────\n\nexport function resolveTraitControllerType(type: TraitInputType): string {\n switch (type) {\n case TraitInputType.Number: return 'number';\n case TraitInputType.Select: return 'select';\n case TraitInputType.Checkbox: return 'switch';\n case TraitInputType.Color: return 'colorPicker';\n case TraitInputType.DirectionalSize: return 'directionalSize';\n case TraitInputType.SelectButton: return 'selectButton';\n case TraitInputType.Scrub: return 'scrub';\n case TraitInputType.Range: return 'range';\n case TraitInputType.SectionLabel: return 'sectionLabel';\n case TraitInputType.Icon: return 'icon';\n case TraitInputType.Media: return 'media';\n case TraitInputType.MediaList: return 'mediaList';\n case TraitInputType.FontFamily: return 'select';\n case TraitInputType.GridTemplate: return 'gridTemplate';\n case TraitInputType.Textarea: return 'textarea';\n default: return 'text';\n }\n}\n\nexport function resolveTraitOptions(trait: ComponentTrait): any {\n if (\n trait.type === TraitInputType.Color ||\n trait.type === TraitInputType.DirectionalSize ||\n trait.type === TraitInputType.SelectButton ||\n trait.type === TraitInputType.Scrub ||\n trait.type === TraitInputType.Range ||\n trait.type === TraitInputType.Media\n ) {\n return trait.options;\n }\n if (trait.type === TraitInputType.FontFamily) {\n // FontFamily options are injected dynamically by the style panel via FontManagerService.\n // Return empty array here; the panel overrides this in resolveOptions().\n return [];\n }\n if (trait.type !== TraitInputType.Select) {\n return undefined;\n }\n const opts = (trait.options as any[]) ?? [];\n // Already formatted as {label, value}[]\n if (opts.length > 0 && typeof opts[0] === 'object' && 'label' in opts[0]) {\n return opts;\n }\n return opts.map((option: string) => ({ label: option, value: option }));\n}\n\n// ─── Style Groups ─────────────────────────────────────────────────────────────\n\nconst NON_STATIC_POSITIONS = ['relative', 'absolute', 'fixed', 'sticky'];\n\nexport class PositionGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Position, [\n new TraitConfig('position', 'Position', TraitInputType.Select,\n ['static', 'relative', 'absolute', 'fixed', 'sticky'], 'static'),\n new TraitConfig('top', 'T', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('right', 'R', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('bottom', 'B', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('left', 'L', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('zIndex', 'Z', TraitInputType.Scrub, { min: -99, max: 9999, step: 1, units: [''] }, '0', false,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n ]);\n }\n}\n\n// ─── Layout ───────────────────────────────────────────────────────────────────\n\nexport class LayoutGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Layout, [\n new TraitConfig('display', 'Display', TraitInputType.Select,\n ['block', 'inline', 'inline-block', 'flex', 'grid'], 'block'),\n\n // ── Flex-only ─────────────────────────────────────────────────────\n new TraitConfig('flexDirection', 'Direction', TraitInputType.SelectButton, [\n { value: 'row', label: 'Horizontal', icon: 'ph-thin ph-arrow-right' },\n { value: 'row-reverse', label: 'Horizontal Reversed', icon: 'ph-thin ph-arrow-left' },\n { value: 'column', label: 'Vertical', icon: 'ph-thin ph-arrow-down' },\n { value: 'column-reverse', label: 'Vertical Reversed', icon: 'ph-thin ph-arrow-up' },\n ], 'row', false, { trait: 'display', values: 'flex' }),\n new TraitConfig('flexWrap', 'Flex Wrap', TraitInputType.SelectButton, [\n { value: 'nowrap', label: 'No Wrap', icon: 'ph-thin ph-minus' },\n { value: 'wrap', label: 'Wrap', icon: 'ph-thin ph-arrow-elbow-down-right' },\n { value: 'wrap-reverse', label: 'Wrap Reversed', icon: 'ph-thin ph-arrow-elbow-up-right' },\n ], 'nowrap', false, { trait: 'display', values: 'flex' }),\n\n // ── Shared flex + grid ────────────────────────────────────────────\n new TraitConfig('justifyContent', 'Justify', TraitInputType.SelectButton, [\n { value: 'flex-start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'flex-end', label: 'End', icon: 'ph-thin ph-align-right' },\n { value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-arrows-out-line-horizontal' },\n { value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },\n { value: 'space-evenly', label: 'Space Evenly', icon: 'ph-thin ph-dots-six' },\n ], 'flex-start', false, { trait: 'display', values: ['flex', 'grid'] }),\n new TraitConfig('alignItems', 'Align Items', TraitInputType.SelectButton, [\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n ], 'stretch', false, { trait: 'display', values: ['flex', 'grid'] }),\n new TraitConfig('gap', 'Gap', TraitInputType.Scrub,\n { min: 0, max: 200, step: 1, units: UNITS_FIXED }, '0px', false,\n { trait: 'display', values: ['flex', 'grid'] }),\n\n // ── Grid-only ─────────────────────────────────────────────────────\n new TraitConfig('gridTemplateColumns', 'Columns', TraitInputType.GridTemplate,\n undefined, '1fr', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('gridTemplateRows', 'Rows', TraitInputType.GridTemplate,\n undefined, 'auto', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('justifyItems', 'Justify Items', TraitInputType.SelectButton, [\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-horizontal' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-right' },\n ], 'stretch', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('alignContent', 'Align Content', TraitInputType.SelectButton, [\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n { value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-arrows-out-line-vertical' },\n { value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n ], 'stretch', false, { trait: 'display', values: 'grid' }),\n\n // ── Direction (always visible) ────────────────────────────────────\n new TraitConfig('direction', 'Text Direction', TraitInputType.SelectButton, [\n { value: 'ltr', label: 'LTR' },\n { value: 'rtl', label: 'RTL' },\n ], 'ltr'),\n ]);\n }\n}\n\n// ─── Child Layout ───────────────────────────────────────────────────────────\n//\n// How THIS node sits inside its PARENT's flex/grid container. Every trait here is a\n// child-flow property that the style engine routes to the OUTER host element (see\n// StyleRegistryService.OUTER_PROPS) so it acts on the flex/grid item, not the inner div.\n//\n// Visibility is PARENT-scoped (`scope: 'parent'`): the trait shows based on the PARENT's\n// `display`, not this node's own. When the parent is neither flex nor grid, every trait\n// is hidden and the style panel drops the whole (now-empty) group. `align-self`/`order`\n// apply to both flex and grid items; `justify-self`/`grid-column`/`grid-row` are grid-only;\n// `flex-grow`/`flex-shrink`/`flex-basis` are flex-only.\nconst PARENT_FLEX_OR_GRID: TraitShowCondition = { trait: 'display', values: ['flex', 'grid'], scope: 'parent' };\nconst PARENT_FLEX: TraitShowCondition = { trait: 'display', values: 'flex', scope: 'parent' };\nconst PARENT_GRID: TraitShowCondition = { trait: 'display', values: 'grid', scope: 'parent' };\n\nexport class ChildLayoutGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.ChildLayout, [\n // ── Shared flex + grid child ──────────────────────────────────────\n new TraitConfig('alignSelf', 'Align Self', TraitInputType.SelectButton, [\n { value: 'auto', label: 'Auto', icon: 'ph-thin ph-minus' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n ], 'auto', false, PARENT_FLEX_OR_GRID),\n new TraitConfig('order', 'Order', TraitInputType.Scrub,\n { min: -99, max: 99, step: 1, units: [''] }, '0', false, PARENT_FLEX_OR_GRID),\n\n // ── Flex-only child ───────────────────────────────────────────────\n new TraitConfig('flexGrow', 'Grow', TraitInputType.Scrub,\n { min: 0, max: 10, step: 1, units: [''] }, '0', false, PARENT_FLEX),\n new TraitConfig('flexShrink', 'Shrink', TraitInputType.Scrub,\n { min: 0, max: 10, step: 1, units: [''] }, '1', false, PARENT_FLEX),\n new TraitConfig('flexBasis', 'Basis', TraitInputType.Scrub,\n { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', false, PARENT_FLEX),\n\n // ── Grid-only child ───────────────────────────────────────────────\n // Free-text so users can express `auto`, `span 2`, or explicit lines `1 / 3`.\n new TraitConfig('justifySelf', 'Justify Self', TraitInputType.SelectButton, [\n { value: 'auto', label: 'Auto', icon: 'ph-thin ph-minus' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-horizontal' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-right' },\n ], 'auto', false, PARENT_GRID),\n new TraitConfig('gridColumn', 'Column', TraitInputType.Text, undefined, 'auto', false, PARENT_GRID),\n new TraitConfig('gridRow', 'Row', TraitInputType.Text, undefined, 'auto', false, PARENT_GRID),\n ]);\n }\n}\n\n// ─── Size (replaces Dimensions) ───────────────────────────────────────────────\n\nexport class SizeGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Size, [\n new TraitConfig('width', 'W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('height', 'H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('minWidth', 'Min W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('minHeight', 'Min H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('maxWidth', 'Max W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('maxHeight', 'Max H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n // aspect-ratio is a preset ratio (or 'auto') — a Select popup of standard ratios, no units.\n new TraitConfig('aspectRatio', 'Aspect Ratio', TraitInputType.Select,\n ['auto', '1/1', '4/3', '3/2', '16/9', '9/16', '3/4', '2/3', '21/9'], 'auto'),\n // object-fit is a style trait (applies to replaced elements, e.g. images). Lives here so\n // it flows through the CSS engine (styleProps) instead of a per-component inline binding.\n new TraitConfig('objectFit', 'Object Fit', TraitInputType.Select,\n ['cover', 'contain', 'fill', 'none', 'scale-down'], 'cover'),\n // overflow — how content that exceeds the box is handled. `visible` is the CSS initial\n // (dropped as a no-op by the compiler); other values emit. Applies to the node's own box\n // (inner element), so it is NOT an OUTER_PROP.\n new TraitConfig('overflow', 'Overflow', TraitInputType.Select, [\n { label: 'Visible', value: 'visible' },\n { label: 'Hidden', value: 'hidden' },\n { label: 'Scroll', value: 'scroll' },\n { label: 'Auto', value: 'auto' },\n { label: 'Clip', value: 'clip' },\n ], 'visible'),\n ]);\n }\n}\n\n/** @deprecated Use SizeGroupStyleConfig instead. */\nexport class DimensionsGroupStyleConfig extends SizeGroupStyleConfig {}\n\n// ─── Background ───────────────────────────────────────────────────────────────\n\nexport class BackgroundGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Background, [\n new TraitConfig('backgroundColor', 'Background', TraitInputType.Color,\n { allowGradient: true, allowTransparent: true, formats: ['hex', 'rgb', 'hsl', 'transparent'] }, 'transparent'),\n ]);\n }\n}\n\nexport class SpacingGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Spacing, [\n new TraitConfig('margin', 'Margin', TraitInputType.DirectionalSize, {\n allowNegative: true,\n allowLinkedSlider: true,\n slider: { min: 0, max: 200, step: 1 }\n }, '0px 0px 0px 0px'),\n new TraitConfig('padding', 'Padding', TraitInputType.DirectionalSize, {\n allowNegative: false,\n allowLinkedSlider: true,\n slider: { min: 0, max: 200, step: 1 }\n }, '0px 0px 0px 0px')\n ]);\n }\n}\n\nexport class BorderGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Border, [\n new TraitConfig('borderWidth', 'Border Width', TraitInputType.DirectionalSize, {\n units: UNITS_FIXED,\n allowNegative: false,\n allowLinkedSlider: true,\n slider: { min: 0, max: 32, step: 1 }\n }, '0px'),\n new TraitConfig('borderStyle', 'Border Style', TraitInputType.SelectButton, [\n { value: 'solid', icon: 'ph-thin ph-line-segment' },\n { value: 'dashed', icon: 'ph-thin ph-dots-three' },\n { value: 'dotted', icon: 'ph-thin ph-dots-six' },\n ], 'solid'),\n new TraitConfig('borderColor', 'Border Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: false, formats: ['hex', 'rgb', 'hsl'] }, '#CCCCCC'),\n new TraitConfig('borderRadius', 'Border Radius', TraitInputType.DirectionalSize, {\n units: UNITS_FIXED,\n allowNegative: false,\n allowLinkedSlider: true,\n linkByDefault: true,\n slider: { min: 0, max: 120, step: 1 },\n segments: [\n { key: 'top-left', icon: 'ph-arrow-bend-up-left', ariaLabel: 'top left radius' },\n { key: 'top-right', icon: 'ph-arrow-bend-up-right', ariaLabel: 'top right radius' },\n { key: 'bottom-right', icon: 'ph-arrow-bend-down-right', ariaLabel: 'bottom right radius' },\n { key: 'bottom-left', icon: 'ph-arrow-bend-down-left', ariaLabel: 'bottom left radius' }\n ]\n }, '0px')\n ]);\n }\n}\n\nexport class TypographyGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Typography, [\n new TraitConfig('fontFamily', 'Font Family', TraitInputType.FontFamily, [],\n 'Poppins, sans-serif'),\n new TraitConfig('fontSize', 'Font Size', TraitInputType.Scrub,\n { min: 8, max: 200, step: 1, units: UNITS_ALL }, '16px'),\n new TraitConfig('fontWeight', 'Weight', TraitInputType.Scrub,\n { min: 100, max: 900, step: 100, units: [''] }, '400'),\n new TraitConfig('color', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: false, formats: ['hex', 'rgb', 'hsl'] }, '#000000'),\n // Unitless on purpose (`units: ['']`): a unitless line-height inherits as a RATIO — each\n // descendant multiplies it by its OWN font-size — whereas `1.5em`/`24px` inherits a fixed\n // computed length that ignores the child's font-size. min:0 so a line box can be collapsed\n // completely (icons/glyph-only elements), which `0.5` used to block.\n new TraitConfig('lineHeight', 'Line Height', TraitInputType.Scrub,\n { min: 0, max: 5, step: 0.05, units: [''] }, '1.5'),\n new TraitConfig('letterSpacing', 'Spacing', TraitInputType.Scrub,\n { min: -5, max: 50, step: 0.5, units: UNITS_FIXED }, '0px'),\n new TraitConfig('textAlign', '', TraitInputType.SelectButton, [\n { value: 'left', icon: 'ph-thin ph-text-align-left' },\n { value: 'center', icon: 'ph-thin ph-text-align-center' },\n { value: 'right', icon: 'ph-thin ph-text-align-right' },\n { value: 'justify', icon: 'ph-thin ph-text-align-justify' },\n ], 'left'),\n new TraitConfig('fontStyle', '', TraitInputType.SelectButton,\n { items: [{ value: 'italic', icon: 'ph-thin ph-text-italic', label: 'Italic' }], allowEmpty: true, noneValue: 'normal' },\n 'normal', true),\n new TraitConfig('textDecoration', '', TraitInputType.SelectButton,\n { items: [{ value: 'underline', icon: 'ph-thin ph-text-underline', label: 'Underline' }], allowEmpty: true, noneValue: 'none' },\n 'none', true),\n new TraitConfig('_sep_stroke', 'Stroke', TraitInputType.SectionLabel),\n new TraitConfig('WebkitTextStrokeWidth', 'Width', TraitInputType.Scrub,\n { min: 0, max: 10, step: 0.5, units: ['px'] }, '0px', true),\n new TraitConfig('WebkitTextStrokeColor', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: true, formats: ['hex', 'rgb', 'hsl'] }, 'transparent', true),\n ]);\n }\n}\n\nexport class EffectsGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Effects, [\n // ── Visibility ────────────────────────────────────────\n new TraitConfig('opacity', 'Opacity', TraitInputType.Scrub,\n { min: 0, max: 1, step: 0.01, units: [''] }, '1'),\n new TraitConfig('mixBlendMode', 'Blend Mode', TraitInputType.Select, [\n 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'color-dodge', 'color-burn', 'hard-light', 'soft-light',\n 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity',\n ], 'normal'),\n new TraitConfig('cursor', 'Cursor', TraitInputType.Select, [\n 'auto', 'default', 'pointer', 'text', 'move', 'not-allowed',\n 'grab', 'grabbing', 'crosshair', 'zoom-in', 'zoom-out', 'none',\n ], 'auto'),\n\n // ── Shadow ────────────────────────────────────────────\n new TraitConfig('_sep_shadow', 'Shadow', TraitInputType.SectionLabel),\n new TraitConfig('boxShadow', 'Box Shadow', TraitInputType.Text, undefined, ''),\n new TraitConfig('textShadow', 'Text Shadow', TraitInputType.Text, undefined, ''),\n\n // ── Transform (virtual — composed to CSS transform: …) ─\n new TraitConfig('_sep_transform', 'Transform', TraitInputType.SectionLabel),\n new TraitConfig('translateX', 'TX', TraitInputType.Scrub,\n { min: -2000, max: 2000, step: 1, units: UNITS_ALL }, '0px', true),\n new TraitConfig('translateY', 'TY', TraitInputType.Scrub,\n { min: -2000, max: 2000, step: 1, units: UNITS_ALL }, '0px', true),\n new TraitConfig('scaleX', 'Scale X', TraitInputType.Range,\n { min: 0, max: 3, step: 0.01, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('scaleY', 'Scale Y', TraitInputType.Range,\n { min: 0, max: 3, step: 0.01, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('rotate', 'Rotate', TraitInputType.Scrub,\n { min: -360, max: 360, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('skewX', 'Skew X', TraitInputType.Scrub,\n { min: -180, max: 180, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('skewY', 'Skew Y', TraitInputType.Scrub,\n { min: -180, max: 180, step: 1, units: UNITS_DEG }, '0deg', true),\n\n // ── Filter (virtual — composed to CSS filter: …) ──────\n new TraitConfig('_sep_filter', 'Filter', TraitInputType.SectionLabel),\n new TraitConfig('filterBlur', 'Blur', TraitInputType.Scrub,\n { min: 0, max: 50, step: 1, units: ['px'] }, '0px', true),\n new TraitConfig('filterHueRotate', 'Hue Rotate', TraitInputType.Scrub,\n { min: 0, max: 360, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('filterBrightness', 'Brightness', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterContrast', 'Contrast', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterSaturate', 'Saturate', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterGrayscale', 'Grayscale', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n new TraitConfig('filterSepia', 'Sepia', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n new TraitConfig('filterInvert', 'Invert', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n\n // ── Backdrop filter (virtual — composed to CSS backdrop-filter: …)\n new TraitConfig('_sep_backdrop', 'Backdrop', TraitInputType.SectionLabel),\n new TraitConfig('backdropBlur', 'Blur', TraitInputType.Scrub,\n { min: 0, max: 50, step: 1, units: ['px'] }, '0px', true),\n new TraitConfig('backdropBrightness', 'Brightness', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n new TraitConfig('backdropContrast', 'Contrast', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n new TraitConfig('backdropSaturate', 'Saturate', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n\n // ── Clip (clip-path — mask the node to a shape) ───────────\n new TraitConfig('_sep_clip', 'Clip', TraitInputType.SectionLabel),\n new TraitConfig('clipPath', 'Shape', TraitInputType.Select, [\n { label: 'None', value: 'none' },\n { label: 'Circle', value: 'circle(50%)' },\n { label: 'Ellipse', value: 'ellipse(50% 40%)' },\n { label: 'Inset', value: 'inset(10%)' },\n { label: 'Rounded inset', value: 'inset(10% round 16px)' },\n { label: 'Triangle', value: 'polygon(50% 0%, 0% 100%, 100% 100%)' },\n { label: 'Diamond', value: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)' },\n { label: 'Hexagon', value: 'polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)' },\n { label: 'Chevron', value: 'polygon(0 0, 75% 0, 100% 50%, 75% 100%, 0 100%, 25% 50%)' },\n ], 'none'),\n\n // ── Transition (virtual — composed to CSS transition: all …) ──\n new TraitConfig('_sep_transition', 'Transition', TraitInputType.SectionLabel),\n new TraitConfig('transitionDuration', 'Duration', TraitInputType.Scrub,\n { min: 0, max: 3000, step: 50, units: ['ms'] }, '0ms', true),\n new TraitConfig('transitionDelay', 'Delay', TraitInputType.Scrub,\n { min: 0, max: 2000, step: 50, units: ['ms'] }, '0ms', true),\n new TraitConfig('transitionTimingFunction', 'Easing', TraitInputType.Select, [\n 'ease', 'linear', 'ease-in', 'ease-out', 'ease-in-out',\n ], 'ease'),\n ]);\n }\n}\n\nexport class ListGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.List, [\n new TraitConfig('listStyleType', 'Marker Style', TraitInputType.Select, [\n { label: 'None', value: 'none' },\n { label: 'Disc', value: 'disc' },\n { label: 'Circle', value: 'circle' },\n { label: 'Square', value: 'square' },\n { label: 'Decimal', value: 'decimal' },\n { label: 'Lower Alpha', value: 'lower-alpha' },\n { label: 'Upper Alpha', value: 'upper-alpha' },\n { label: 'Lower Roman', value: 'lower-roman' },\n { label: 'Upper Roman', value: 'upper-roman' },\n ], 'disc'),\n new TraitConfig('listStylePosition', 'Marker Position', TraitInputType.SelectButton, [\n { value: 'outside', label: 'Outside' },\n { value: 'inside', label: 'Inside' },\n ], 'outside'),\n new TraitConfig('columnCount', 'Columns', TraitInputType.Scrub,\n { min: 1, max: 6, step: 1, units: [''] }, '1'),\n new TraitConfig('columnGap', 'Column Gap', TraitInputType.Scrub,\n { min: 0, max: 200, step: 1, units: UNITS_FIXED }, '0px'),\n new TraitConfig('_sep_marker', 'Marker', TraitInputType.SectionLabel),\n new TraitConfig('markerColor', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: true, formats: ['hex', 'rgb', 'hsl', 'transparent'] }, ''),\n new TraitConfig('markerFontSize', 'Size', TraitInputType.Scrub,\n { min: 4, max: 100, step: 1, units: UNITS_FIXED }, ''),\n ]);\n }\n}\n\n/**\n * Returns a fresh set of all 8 style-group configs in canonical display order.\n * Every call produces new TraitConfig instances so different component nodes\n * never share mutable state.\n */\nexport function buildFullStyleTraits(): GroupStyleConfig[] {\n return [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new ChildLayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n}\n\nexport function flattenSchemaFields(\n properties: Record<string, any>,\n prefix = ''\n): { label: string; value: string }[] {\n const result: { label: string; value: string }[] = [];\n\n for (const [key, field] of Object.entries(properties)) {\n const fullPath = prefix ? `${prefix}.${key}` : key;\n\n if (field.type === 'object' && field.properties) {\n result.push(...flattenSchemaFields(field.properties, fullPath));\n } else {\n result.push({ label: fullPath, value: fullPath });\n }\n }\n\n return result;\n}\n\n/**\n * The ARRAY (repeatable) properties of a schema — used by the Bindings panel to auto-suggest which\n * property of a SINGLE resource a Repeater can iterate over (e.g. `product.gallery`). A field is\n * repeatable when its schema `type` is `embedded`/`array` (an embedded list) or it is a MANY\n * relation (`rel.type` contains \"many\", case-insensitive). Top-level only — the repeat target is a\n * property of the resource, not a deep leaf.\n */\nexport function arraySchemaFields(properties: Record<string, any>): { label: string; value: string }[] {\n const out: { label: string; value: string }[] = [];\n for (const [key, field] of Object.entries(properties ?? {})) {\n const type = (field?.type ?? '').toString().toLowerCase();\n const relType = (field?.rel?.type ?? '').toString().toLowerCase();\n if (type === 'embedded' || type === 'array' || (type === 'rel' && relType.includes('many'))) {\n out.push({ label: key, value: key });\n }\n }\n return out;\n}\n\n/**\n * Describe the ITEM shape of an array PROPERTY, straight from the schema — the authoritative source\n * (a resolved sample may be missing, or ambiguous). Given a resource's schema `properties` and the\n * dot-path to an array field (e.g. `gallery` or `info.items`):\n * - **object item** → its primitive leaf fields (flattened): `[{label:'url',value:'url'}, …]`.\n * - **primitive item** (`string[]`/`number[]`) → `isPrimitive:true` (caller offers \"(the item value)\").\n * - **can't tell** (many-relation whose items are related docs, or path not found) → both empty, so\n * the caller falls back to a resolved sample.\n * JSON-schema arrays store the item schema under `.items`; embedded objects under `.properties`.\n */\nexport function arrayItemSchemaFields(\n properties: Record<string, any>,\n arrayPath: string,\n): { fields: { label: string; value: string }[]; isPrimitive: boolean } {\n const parts = (arrayPath ?? '').split('.').filter(Boolean);\n let field: any = undefined;\n let cursor: any = properties ?? {};\n for (const part of parts) {\n field = cursor?.[part];\n if (!field) return { fields: [], isPrimitive: false };\n cursor = field.properties ?? field.items?.properties ?? {};\n }\n if (!field) return { fields: [], isPrimitive: false };\n\n const itemProps = field.items?.properties ?? (field.type === 'embedded' ? field.properties : undefined);\n if (itemProps && Object.keys(itemProps).length) {\n return { fields: flattenSchemaFields(itemProps), isPrimitive: false };\n }\n // Many-relation: items are related documents — needs the related schema, so let the caller sample.\n const relType = (field.rel?.type ?? '').toString().toLowerCase();\n if (field.type === 'rel' || relType.includes('many')) return { fields: [], isPrimitive: false };\n // Otherwise a primitive-item array (string[]/number[]/…): the item is bound as its own value.\n return { fields: [], isPrimitive: true };\n}","import { ComponentNode } from '../models/component.model';\n\nconst freshId = () => Math.random().toString(36).substr(2, 9);\n\n/**\n * Assign fresh ids to a cloned ComponentNode subtree AND remap intra-subtree references to the\n * new ids. Used by every author-time clone path (duplicate, paste, block/external drop) so a copied\n * structure stays self-consistent.\n *\n * Absolute node-id references that break under duplication if left unmapped:\n * - `stateTriggers[state]` — the trigger-hover target (see style-engine.md → Targeted states)\n * - interaction `action.target` / `reverseActions.target`\n * A reference pointing OUTSIDE the cloned subtree (id not in the map) is left untouched — the copy\n * intentionally still points at the external node.\n *\n * `styleId` strategy:\n * - `'clear'` (default) — drop styleId so the clone OWNS its own CSS rule (independent copy).\n * - `'regenerate'` — keep a styleId but give it a fresh value (legacy builder.component path).\n */\nexport function regenerateNodeIds(root: ComponentNode, opts: { styleId?: 'clear' | 'regenerate' } = {}): void {\n const idMap = new Map<string, string>();\n const assign = (node: ComponentNode): void => {\n const oldId = node.id;\n node.id = freshId();\n if (opts.styleId === 'regenerate') {\n if (node.styleId) node.styleId = freshId();\n } else {\n node.styleId = undefined;\n }\n if (oldId) idMap.set(oldId, node.id);\n (node.children || []).forEach(assign);\n };\n assign(root);\n remapNodeReferences(root, idMap);\n}\n\n/** Remap absolute node-id references inside a subtree to their new ids (per `idMap`). Ids not in\n * the map (references to nodes outside the cloned subtree) are preserved. */\nexport function remapNodeReferences(node: ComponentNode, idMap: Map<string, string>): void {\n const triggers = node.stateTriggers as Record<string, string> | undefined;\n if (triggers) {\n for (const state of Object.keys(triggers)) {\n const mapped = idMap.get(triggers[state]);\n if (mapped) triggers[state] = mapped;\n }\n }\n for (const interaction of node.interactions || []) {\n const actions = [...(interaction.actions || []), ...((interaction as any).reverseActions || [])];\n for (const action of actions) {\n if (action?.target && action.target !== 'self') {\n const mapped = idMap.get(action.target);\n if (mapped) action.target = mapped;\n }\n }\n }\n (node.children || []).forEach(child => remapNodeReferences(child, idMap));\n}\n","import { ComponentNode } from './component.model';\n\n/**\n * Locate a node within a forest (array of root nodes + their descendants) by\n * reference identity. Returns the parent array holding the node and its index,\n * or `null` if the node is not present.\n *\n * Reference-based to match the rest of the builder tree operations, which pass\n * the live `ComponentNode` object around (see `findNodeInTree`).\n */\nexport function findNodeLocation(\n roots: ComponentNode[],\n target: ComponentNode,\n): { parent: ComponentNode[]; index: number } | null {\n for (let i = 0; i < roots.length; i++) {\n if (roots[i] === target) {\n return { parent: roots, index: i };\n }\n const kids = roots[i].children;\n if (kids) {\n const found = findNodeLocation(kids, target);\n if (found) return found;\n }\n }\n return null;\n}\n\n/**\n * Wrap `target` inside `wrapper`, in place, within the forest it already lives in.\n *\n * The wrapper replaces the target at its original position and takes the target\n * as its only child. **Context is preserved** — the operation never moves the\n * node between the page and global trees; the caller passes the forest the node\n * lives in (page layout OR global elements), and the surgery stays inside it.\n *\n * Global flags (`isGlobal`/`globalPosition`) are carried ONLY by the top-level\n * node of the global forest. When wrapping such a node, those flags transfer to\n * the wrapper — which becomes the new top-level global node — and are cleared on\n * the now-inner node, so the element keeps rendering in its global slot. Wrapping\n * anything else (a page node, or a child nested inside a global element) leaves\n * all global flags untouched.\n *\n * @returns the wrapper on success, or `null` if the target was not found (in\n * which case nothing is mutated).\n */\nexport function wrapNode(\n roots: ComponentNode[],\n target: ComponentNode,\n wrapper: ComponentNode,\n): ComponentNode | null {\n const loc = findNodeLocation(roots, target);\n if (!loc) return null;\n\n if (target.isGlobal) {\n wrapper.isGlobal = true;\n wrapper.globalPosition = target.globalPosition;\n target.isGlobal = false;\n target.globalPosition = undefined;\n }\n\n wrapper.children = [target];\n loc.parent.splice(loc.index, 1, wrapper);\n return wrapper;\n}\n","import { Injectable } from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\n\nexport enum PanelEventTypes {\n ELEMENT_SELECT = 'elementselect',\n ELEMENT_DESELECT = 'elementdeselect',\n PANEL_SELECTED = 'panelselect',\n PANEL_OPEN = 'panelopen',\n PANEL_CLOSE = 'panelclose',\n BINDING_CHANGED = 'bindingchanged',\n NODE_RENDERED = 'noderendered',\n /** Open the Style panel in preset-edit mode for the given preset ID. */\n PRESET_EDIT = 'presetedit',\n /** Fired after a preset is created, updated, or deleted so panels refresh their list. */\n PRESETS_CHANGED = 'presetschanged',\n /** Fired when a linked symbol instance's styles change — propagates to all instances. */\n SYMBOLS_CHANGED = 'symbolschanged',\n /** Fired on every structural or style mutation — used by BuilderHistoryService to snapshot. */\n LAYOUT_CHANGED = 'layoutchanged',\n /** Open the Interactions panel in preset-edit mode for the given preset ID. */\n INTERACTION_PRESET_EDIT = 'interactionpresetedit',\n /** Fired after an interaction preset is created, updated, or deleted so panels refresh. */\n INTERACTION_PRESETS_CHANGED = 'interactionpresetschanged',\n /** Open the Interactions panel and EXPAND a specific interaction for editing (data = interaction\n * id). Emitted when the overlay interaction badge is clicked so that badge → \"edit THIS\n * interaction\", without firing the element's (live) animation. */\n INTERACTION_EDIT = 'interactionedit',\n /** A node's `interactions` were added/removed/edited. Carries `{ node }`.\n * Repeater/Slider listen so their PREVIEW CLONES are re-cloned with the new interactions —\n * clones are attached by ELEMENT at render time, so without this a new interaction only starts\n * working after a save + reload. */\n INTERACTION_CHANGED = 'interactionchanged',\n /** CLICK-TO-INSERT (B2): a components-panel entry was clicked. Carries the same payload a drag\n * would (`string` component type, or a block / symbol object). The builder resolves WHERE from\n * the current selection — see `resolveInsertTarget`. */\n INSERT_COMPONENT = 'insertcomponent',\n}\n\nexport interface PanelEvent {\n type: PanelEventTypes;\n data: any;\n}\n\n@Injectable()\nexport class PanelEventService {\n private panelEventSubject = new Subject<PanelEvent>();\n\n subscribe(next: (panelEvent: PanelEvent) => void): Subscription {\n return this.panelEventSubject.asObservable().subscribe(next);\n }\n\n emit(type: PanelEventTypes, data?: any): void {\n this.panelEventSubject.next({ type, data });\n }\n}","import { Breakpoint } from '@vectoriox/iox-ui';\n\nexport enum PanelTypes {\n BINDINGS = 'Bindings',\n STYLES = 'Styles',\n TRAITS = 'Traits',\n PAGE = 'Page',\n INTERACTIONS = 'Interactions',\n}\n\n// ── Route animation presets ──────────────────────────────\nexport type RouteAnimationPreset =\n | 'none'\n | 'fade'\n | 'slideUp'\n | 'slideDown'\n | 'zoomIn'\n | 'zoomOut'\n | 'blurIn'\n | 'flip';\n\nexport const ROUTE_ANIMATION_OPTIONS: { label: string; value: RouteAnimationPreset; description: string }[] = [\n { value: 'none', label: 'None', description: 'No animation' },\n { value: 'fade', label: 'Fade', description: 'Opacity cross-dissolve' },\n { value: 'slideUp', label: 'Slide Up', description: 'Rise from below + fade' },\n { value: 'slideDown', label: 'Slide Down', description: 'Drop from above + fade' },\n { value: 'zoomIn', label: 'Zoom In', description: 'Scale up from 96% + fade' },\n { value: 'zoomOut', label: 'Zoom Out', description: 'Scale down from 104% + fade' },\n { value: 'blurIn', label: 'Blur', description: 'Unblur + fade' },\n { value: 'flip', label: 'Flip', description: 'Perspective tilt + fade' },\n];\n\nexport const EASING_OPTIONS: { label: string; value: string }[] = [\n // Strong symmetric in-out — the default. Slow to leave, quick through the middle, gentle to\n // settle; this is what makes a long page transition read as smooth rather than sluggish.\n { label: 'Smooth (default)', value: 'cubic-bezier(0.76, 0, 0.24, 1)' },\n { label: 'Expo Out', value: 'cubic-bezier(0.16, 1, 0.3, 1)' },\n { label: 'Ease', value: 'ease' },\n { label: 'Ease In', value: 'ease-in' },\n { label: 'Ease Out', value: 'ease-out' },\n { label: 'Ease In Out', value: 'ease-in-out' },\n { label: 'Linear', value: 'linear' },\n { label: 'Spring', value: 'cubic-bezier(0.34, 1.56, 0.64, 1)' },\n];\n\n// ── Page-level settings ──────────────────────────────────\nexport interface PageStyleSettings {\n backgroundColor: string;\n backgroundType: 'solid' | 'gradient' | 'image';\n backgroundGradient: string;\n backgroundImage: string;\n fontFamily: string;\n textColor: string;\n maxWidth: string;\n}\n\nexport interface PageScrollSettings {\n enabled: boolean;\n lerp: number;\n wheelMultiplier: number;\n touchMultiplier: number;\n direction: 'vertical' | 'horizontal';\n infinite: boolean;\n}\n\nexport interface PageRouteAnimationSettings {\n /** @deprecated legacy single-page enter preset — kept for back-compat migration to `transition`. */\n enter: RouteAnimationPreset;\n /** @deprecated legacy single-page leave preset — kept for back-compat migration to `transition`. */\n leave: RouteAnimationPreset;\n duration: number;\n easing: string;\n /**\n * Cinematic paired out/in transition preset id (see PAGE_TRANSITION_PRESETS in @vectoriox/iox-ui).\n * When set it supersedes the legacy `enter`/`leave` fields.\n */\n transition?: string;\n /** Container perspective (px) for 3D transitions. Falls back to the preset / global default. */\n perspective?: number;\n /** Panel colour for the curtain-* (overlay) presets. Defaults to the page's own background. */\n curtainColor?: string;\n}\n\n// Legacy → cinematic transition migration lives in @vectoriox/iox-ui alongside the preset catalog:\n// import { legacyEnterToTransition, effectiveTransitionId } from '@vectoriox/iox-ui';\n\nexport interface PageSettings {\n style: PageStyleSettings;\n scroll: PageScrollSettings;\n routeAnimation: PageRouteAnimationSettings;\n}\n\nexport function defaultPageSettings(): PageSettings {\n return {\n style: {\n backgroundColor: '#ffffff',\n backgroundType: 'solid',\n backgroundGradient: 'linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%)',\n backgroundImage: '',\n fontFamily: 'Poppins, sans-serif',\n textColor: '#000000',\n maxWidth: '1440px',\n },\n scroll: {\n enabled: true,\n lerp: 0.1,\n wheelMultiplier: 1,\n touchMultiplier: 1,\n direction: 'vertical',\n infinite: false,\n },\n routeAnimation: {\n enter: 'fade',\n leave: 'fade',\n // Defaults mirror DEFAULT_PAGE_TRANSITION* in @vectoriox/iox-ui: the parallax look at a\n // long duration with the smooth in-out curve.\n transition: 'parallax-up',\n duration: 1500,\n easing: 'cubic-bezier(0.76, 0, 0.24, 1)',\n },\n };\n}\n\nexport enum ToolbarAction {\n SelectParent = 'select-parent',\n Duplicate = 'duplicate',\n Delete = 'delete',\n Play = 'play',\n SaveAsBlock = 'save-as-block',\n MakeGlobal = 'make-global',\n RemoveGlobal = 'remove-global',\n EditPreset = 'edit-preset',\n DetachSymbol = 'detach-symbol',\n ResyncSymbol = 'resync-symbol',\n EditInteractionPreset = 'edit-interaction-preset',\n CopyPreset = 'copy-preset',\n PastePreset = 'paste-preset',\n CopyInteractionPreset = 'copy-interaction-preset',\n PasteInteractionPreset = 'paste-interaction-preset',\n Copy = 'copy',\n Paste = 'paste',\n AddSlide = 'add-slide',\n Wrap = 'wrap',\n /** Open the components panel to insert into / after the selection (B2 quick-add). */\n AddElement = 'add-element',\n}\n\nexport enum NodeAction {\n Delete = 'delete',\n Duplicate = 'duplicate',\n}\n\nexport enum BuilderMode {\n Select = 'select',\n Style = 'style',\n Pan = 'pan'\n}\n\n/**\n * Builder-only presentation of the shared breakpoints. The breakpoint SET — ids, max widths, labels,\n * preview widths — lives once in `@vectoriox/iox-ui` `BREAKPOINTS`; this adds only what the toolbar\n * and canvas need and the SSR engine never will: an icon and a simulated viewport height.\n * (Replaces the old DeviceMode / DEVICE_OPTIONS, which only resized the canvas and stored nothing.)\n */\nexport interface BreakpointPresentation {\n icon: string;\n /** Simulated browser viewport height in CSS px — a landscape phone is short. */\n previewHeight: number;\n /** Show the icon rotated 90°: Phosphor has no landscape-phone glyph. */\n landscape?: boolean;\n}\n\nexport const BREAKPOINT_PRESENTATION: Readonly<Record<Breakpoint, BreakpointPresentation>> = Object.freeze({\n [Breakpoint.Base]: { icon: 'ph-thin ph-desktop', previewHeight: 900 },\n [Breakpoint.Laptop]: { icon: 'ph-thin ph-laptop', previewHeight: 800 },\n [Breakpoint.Tablet]: { icon: 'ph-thin ph-device-tablet', previewHeight: 1024 },\n [Breakpoint.Mobile]: { icon: 'ph-thin ph-device-mobile', previewHeight: 320, landscape: true },\n [Breakpoint.Small]: { icon: 'ph-thin ph-device-mobile', previewHeight: 844 },\n});\n\nexport interface ZoomOption {\n label: string;\n value: number | 'fit';\n}\n\nexport const ZOOM_OPTIONS: ZoomOption[] = [\n { label: '25%', value: 25 },\n { label: '50%', value: 50 },\n { label: '75%', value: 75 },\n { label: '100%', value: 100 },\n { label: 'Fit', value: 'fit' },\n];\n\nexport interface ScreenWidthOption {\n label: string;\n width: number;\n}\n\nexport const SCREEN_WIDTH_OPTIONS: ScreenWidthOption[] = [\n { label: '1280', width: 1280 },\n { label: '1440', width: 1440 },\n { label: '1920', width: 1920 },\n { label: '2560', width: 2560 },\n];","// Virtual trait composition now lives in @vectoriox/iox-ui so the SSR engine (which does NOT depend\n// on iox-builder) can use the SAME logic — otherwise the engine emitted raw virtual keys\n// (translate-x, filter-blur…) as invalid CSS. This is a re-export passthrough to keep existing\n// iox-builder imports (`../style-compose`) working with no duplicated implementation.\nexport { composeVirtualTraits, VIRTUAL_TRAIT_KEYS } from '@vectoriox/iox-ui';\n","/**\n * node-path — pure ancestor-chain helpers for the builder's node tree.\n *\n * The builder needs a node's ancestor chain in several places: the breadcrumb bar,\n * \"select parent\", and the parent-scoped style traits (Child Layout). Each of those\n * used to re-walk the tree with its own private recursion. `nodeAncestorPath` is the\n * single walk they all derive from.\n *\n * Builder-only on purpose: the SSR engine never needs a breadcrumb, so this stays in\n * `iox-builder` rather than `@vectoriox/iox-ui` (which is the home for logic BOTH\n * renderers consume). Structural helpers the two renderers share live in\n * `@vectoriox/iox-ui` `style-compiler/tree-relations.ts`.\n */\n\n/** Minimal shape these helpers need — any node with optional children. */\nexport interface TreePathNode {\n children?: TreePathNode[] | null;\n}\n\n/**\n * The chain of nodes from a root down to (and including) `target`, matched by\n * REFERENCE identity. Returns `null` when `target` is not in the tree.\n *\n * Depth-first, pre-order; first match wins. Reference identity (not `id`) is the right\n * matcher here because the builder mutates nodes in place and repeater/slider clones\n * deliberately share a template's `styleId` — matching by id would return the template's\n * path for a clone.\n */\nexport function nodeAncestorPath<T extends TreePathNode>(\n roots: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T[] | null {\n if (!roots?.length || !target) return null;\n for (const node of roots) {\n if (node === target) return [node];\n const childPath = nodeAncestorPath(node.children as readonly T[] | undefined, target);\n if (childPath) return [node, ...childPath];\n }\n return null;\n}\n\n/**\n * The immediate parent of `target`, or `null` when it is a root node or not in the tree.\n * Derived from `nodeAncestorPath` so there is exactly one tree walk to keep correct.\n */\nexport function findParentOf<T extends TreePathNode>(\n roots: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T | null {\n const path = nodeAncestorPath(roots, target);\n return path && path.length >= 2 ? path[path.length - 2] : null;\n}\n\n/**\n * The ancestor chain across BOTH builder trees — the page layout and the global\n * elements overlay, which are separate roots. Returns the first tree that contains\n * the node, or `null` when neither does.\n */\nexport function nodeAncestorPathInEither<T extends TreePathNode>(\n layout: readonly T[] | null | undefined,\n globalElements: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T[] | null {\n return nodeAncestorPath(layout, target) ?? nodeAncestorPath(globalElements, target);\n}\n","import { Breakpoint, BREAKPOINTS, countOverrides, ResponsiveOverrides } from '@vectoriox/iox-ui';\n\n/** Override counts per breakpoint — what the breakpoint bar's dots show. Base is never present. */\nexport type BreakpointCounts = Partial<Record<Breakpoint, number>>;\n\ninterface CountableNode {\n responsive?: ResponsiveOverrides;\n children?: CountableNode[] | null;\n}\n\n/** Counts for ONE node (the selection). Breakpoints with nothing overridden are omitted. */\nexport function nodeBreakpointCounts(node: CountableNode | null | undefined): BreakpointCounts {\n const counts: BreakpointCounts = {};\n if (!node?.responsive) return counts;\n for (const { id } of BREAKPOINTS) {\n if (id === Breakpoint.Base) continue;\n const n = countOverrides(node.responsive, id);\n if (n) counts[id] = n;\n }\n return counts;\n}\n\n/** Counts summed over whole trees (the page, when nothing is selected). */\nexport function treeBreakpointCounts(...roots: Array<readonly CountableNode[] | null | undefined>): BreakpointCounts {\n const counts: BreakpointCounts = {};\n const visit = (nodes: readonly CountableNode[] | null | undefined) => {\n for (const node of nodes ?? []) {\n for (const [bp, n] of Object.entries(nodeBreakpointCounts(node)) as [Breakpoint, number][]) {\n counts[bp] = (counts[bp] ?? 0) + n;\n }\n visit(node.children);\n }\n };\n roots.forEach(visit);\n return counts;\n}\n","import { nodeAncestorPath, TreePathNode } from './node-path.util';\n\n/** Where a click-inserted element lands: the array it goes into and the index within it. */\nexport interface InsertTarget<T> {\n /** The live children array to splice into (a container's `children`, or the page root). */\n children: T[];\n index: number;\n /** The node that owns `children`, or `null` for the page root. */\n parent: T | null;\n}\n\n/**\n * Resolve where \"click to insert\" puts a new element, from the current selection — the rule the\n * components panel and the canvas \"+\" share (builder-usability-plan.md, B2):\n *\n * nothing selected → appended to the page root\n * a CONTAINER selected → appended INSIDE it (its last child)\n * a LEAF selected → inserted AFTER it, as its next sibling\n *\n * `isContainer` decides what can hold children — the builder passes \"has a registered drop zone\",\n * the same test a drag uses, so a click can never insert somewhere a drop couldn't.\n * A selection not found in `roots` (stale) falls back to appending to the root.\n */\nexport function resolveInsertTarget<T extends TreePathNode & { children?: T[] | null }>(\n roots: T[],\n selected: T | null | undefined,\n isContainer: (node: T) => boolean,\n): InsertTarget<T> {\n const append = (children: T[], parent: T | null): InsertTarget<T> => ({ children, index: children.length, parent });\n if (!selected) return append(roots, null);\n\n const path = nodeAncestorPath(roots, selected);\n if (!path) return append(roots, null);\n\n if (isContainer(selected)) {\n if (!selected.children) selected.children = [];\n return append(selected.children, selected);\n }\n\n const parent = path.length >= 2 ? path[path.length - 2] : null;\n const siblings = parent ? (parent.children ?? (parent.children = [])) : roots;\n return { children: siblings, index: siblings.indexOf(selected) + 1, parent };\n}\n","import { ComponentNode } from '../models/component.model';\n\n/** The node type that scopes a form. Kept here so the rule has one name, not a scattered literal. */\nexport const FORM_TYPE = 'Form';\n\n/**\n * The form the current selection belongs to — the NEAREST Form ancestor, or the selection itself\n * when a Form is selected.\n *\n * This is the selection-side expression of decision D1: a field belongs to its nearest ancestor\n * form. Searching the path from the deepest node outward is what makes \"nearest\" true, and it is\n * why a nested form (were one ever allowed) could not capture an outer form's toolbar.\n *\n * @param path Ancestor chain from the root down to the selected node, as `selectedPath` holds it.\n */\nexport function nearestFormNode(path: readonly ComponentNode[] | null | undefined): ComponentNode | null {\n if (!path?.length) return null;\n for (let i = path.length - 1; i >= 0; i--) {\n if (path[i]?.type === FORM_TYPE) return path[i];\n }\n return null;\n}\n","/**\n * STRUCTURE OPS (A4) — the one-click layout changes people actually make at a narrow width, as pure\n * \"what to write\" functions. Each returns a flat style map the caller stores in the node's\n * `responsive[bp]` layer (or in the base styles at Base) through the shared `setOverride`.\n *\n * All of it is ordinary CSS the SSR engine already renders — there is no second tree and no\n * per-width HTML. See responsive-breakpoints-plan.md (D5).\n */\n\nexport type StyleMap = Record<string, any>;\n\n/** CSS lengths that are a FIXED pixel size — the ones that stop a layout fitting a phone. */\nconst PX_LENGTH = /^-?\\d+(\\.\\d+)?px$/i;\n\n/**\n * Hide / show at a width. Hiding is `display: none` INSIDE that breakpoint's rules — the node stays\n * in the DOM and in the SSR output (one HTML document serves every width), so hidden content still\n * ships bytes and is still indexed. Showing again clears the override rather than guessing a value.\n *\n * @returns the props to write, or `null` meaning \"clear the display override at this breakpoint\".\n */\nexport function visibilityProps(hidden: boolean): StyleMap | null {\n return hidden ? { display: 'none' } : null;\n}\n\n/** True when this node is hidden by the resolved styles at some width. */\nexport function isHiddenAt(resolvedStyleProps: StyleMap | null | undefined): boolean {\n return String(resolvedStyleProps?.['display'] ?? '') === 'none';\n}\n\n/**\n * Stack a container's children in one column — the most common mobile edit, and four separate\n * controls today (display, direction, wrap, columns). A grid becomes a single-column grid; anything\n * else becomes a column flex box.\n */\nexport function stackChildrenProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap {\n const display = String(resolvedStyleProps?.['display'] ?? '');\n if (display === 'grid' || display === 'inline-grid') {\n return { gridTemplateColumns: 'repeat(1, minmax(0, 1fr))' };\n }\n return { display: 'flex', flexDirection: 'column', flexWrap: 'nowrap' };\n}\n\n/**\n * Collapse a grid to `count` columns (a flex row is stacked instead — it has no column track).\n * `count` is clamped to at least 1.\n */\nexport function collapseColumnsProps(resolvedStyleProps: StyleMap | null | undefined, count: number): StyleMap {\n const columns = Math.max(1, Math.floor(count));\n const display = String(resolvedStyleProps?.['display'] ?? '');\n if (display === 'grid' || display === 'inline-grid') {\n return { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` };\n }\n return columns === 1 ? stackChildrenProps(resolvedStyleProps) : { flexWrap: 'wrap' };\n}\n\n/** How many equal columns a `repeat(N, …)` track list describes, or null when it isn't one. */\nexport function columnCountOf(resolvedStyleProps: StyleMap | null | undefined): number | null {\n const match = /^repeat\\(\\s*(\\d+)\\s*,/.exec(String(resolvedStyleProps?.['gridTemplateColumns'] ?? ''));\n return match ? Number(match[1]) : null;\n}\n\n/**\n * Make fixed pixel sizes fluid: `width: 520px` → `width: 100%` with the original kept as\n * `max-width`, so the element still never exceeds its designed size on a wide screen. `minWidth` in\n * px is dropped to 0 — it is what actually forces horizontal scrolling on a phone.\n *\n * @returns the props to write; EMPTY when there is nothing fixed to fluidise.\n */\nexport function fluidiseProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap {\n const out: StyleMap = {};\n const width = String(resolvedStyleProps?.['width'] ?? '');\n const minWidth = String(resolvedStyleProps?.['minWidth'] ?? '');\n if (PX_LENGTH.test(width)) {\n out['width'] = '100%';\n const maxWidth = String(resolvedStyleProps?.['maxWidth'] ?? '');\n if (!maxWidth || maxWidth === 'none') out['maxWidth'] = width;\n }\n if (PX_LENGTH.test(minWidth) && parseFloat(minWidth) > 0) out['minWidth'] = '0px';\n return out;\n}\n\n/** True when `fluidiseProps` would change anything — drives the button's disabled state. */\nexport function canFluidise(resolvedStyleProps: StyleMap | null | undefined): boolean {\n return Object.keys(fluidiseProps(resolvedStyleProps)).length > 0;\n}\n\n/**\n * Reorder children AT ONE WIDTH using CSS `order`, leaving the tree — and so the DOM and\n * screen-reader order — untouched. Returns one value per child BY CHILD INDEX: the `order` it must\n * take, or `null` for \"no override needed\".\n *\n * Either every child gets an explicit `order` or none does: CSS defaults `order` to 0, so a partial\n * set would mix overridden children with unordered ones and read as an arbitrary interleave.\n *\n * @param count How many children there are.\n * @param from Index of the child being moved.\n * @param to Index it should occupy.\n */\nexport function reorderProps(count: number, from: number, to: number): Array<number | null> {\n const none = Array.from({ length: Math.max(0, count) }, () => null);\n if (from < 0 || from >= count || to < 0 || to >= count || from === to) return none;\n\n // Visual order after the move, as a list of CHILD indices.\n const sequence = Array.from({ length: count }, (_, i) => i);\n sequence.splice(to, 0, ...sequence.splice(from, 1));\n\n const orderByChild: Array<number | null> = none.slice();\n sequence.forEach((childIndex, position) => { orderByChild[childIndex] = position; });\n return orderByChild;\n}\n","import { canFluidise, fluidiseProps, StyleMap } from './structure-ops.util';\n\n/**\n * RESPONSIVE AUDIT (A5) — find what is broken at a width, from the node tree plus ONE measurement\n * pass. A builder that lets you author five widths must also tell you which of them are broken.\n *\n * Pure: the caller measures (one `getBoundingClientRect` per node, off the animation path) and\n * passes the numbers in. Every finding that can be repaired carries the exact props to write, so a\n * fix is one `setOverride` per key — one undo step, and it shows as an ordinary override.\n */\n\nexport enum AuditCode {\n Overflow = 'overflow',\n FixedWidth = 'fixed-width',\n TapTarget = 'tap-target',\n TinyText = 'tiny-text',\n UnboundedImage = 'unbounded-image',\n /** A slider showing more slides than the width can carry — each one unreadably narrow. */\n SlidesOverflow = 'slides-overflow',\n /** An out-of-flow node whose box lands outside the frame, so it is unreachable at this width. */\n OffscreenAbsolute = 'offscreen-absolute',\n}\n\nexport enum AuditSeverity {\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n}\n\n/** One node, resolved at the width being audited. */\nexport interface AuditNode {\n id: string;\n type: string;\n label?: string;\n /** Styles RESOLVED at this breakpoint (base + every wider layer + this one). */\n styleProps: StyleMap;\n /** Component TRAITS resolved at this breakpoint — the per-width values a media query cannot\n * express (a slider's `slidesPerView`). Absent for nodes with no traits worth auditing. */\n inputs?: Record<string, any>;\n /** Laid-out size in CSS px at this width. */\n width: number;\n height: number;\n /** Laid-out position in CSS px, relative to the canvas frame. Absent when not measured. */\n left?: number;\n top?: number;\n}\n\nexport interface AuditFinding {\n nodeId: string;\n nodeName: string;\n code: AuditCode;\n severity: AuditSeverity;\n /** Human summary — the builder library is English-only, like the rest of its chrome. */\n message: string;\n /** Props to write into this breakpoint's layer to repair it; absent when no safe auto-fix. */\n fix?: StyleMap;\n /** TRAIT values to write into this breakpoint's layer — some failures are not fixable with CSS.\n * Applied through `setInputOverride`, the trait twin of `setOverride`. */\n inputFix?: Record<string, any>;\n}\n\n/** WCAG 2.5.8 minimum target size. */\nconst MIN_TAP_PX = 44;\n/** Below this, iOS Safari zooms the page when an adjacent input is focused. */\nconst MIN_TEXT_PX = 12;\n/** Types a visitor taps. */\nconst TAPPABLE = new Set(['Button', 'ButtonBlock', 'Link', 'LinkedContainer']);\n/** Narrower than this, a slide shows too little of its content to be worth showing at all. */\nconst MIN_SLIDE_PX = 200;\n/** Out-of-flow positioning that can put a node outside the frame. */\nconst OUT_OF_FLOW = new Set(['absolute', 'fixed']);\n\nconst nameOf = (node: AuditNode) => node.label || node.type;\nconst pxOf = (value: unknown): number | null => {\n const match = /^(-?\\d+(?:\\.\\d+)?)px$/i.exec(String(value ?? ''));\n return match ? Number(match[1]) : null;\n};\n\n/**\n * Audit nodes laid out at `viewportWidth`. Returns findings ordered by severity (errors first),\n * then by the order the nodes were given — so the worst thing is at the top of the list.\n */\nexport function auditNodes(nodes: readonly AuditNode[], viewportWidth: number): AuditFinding[] {\n const findings: AuditFinding[] = [];\n\n for (const node of nodes) {\n const name = nameOf(node);\n const styles = node.styleProps ?? {};\n if (String(styles['display'] ?? '') === 'none') continue; // hidden here — nothing to report\n\n // 1. Wider than the viewport: the page scrolls sideways.\n if (node.width > viewportWidth + 0.5) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.Overflow, severity: AuditSeverity.Error,\n message: `${name} is ${Math.round(node.width)}px wide in a ${viewportWidth}px viewport — the page scrolls sideways.`,\n fix: canFluidise(styles) ? fluidiseProps(styles) : { maxWidth: '100%' },\n });\n } else if (canFluidise(styles)) {\n // 2. A fixed px size that still fits, but will not on a narrower phone.\n const width = pxOf(styles['width']);\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.FixedWidth, severity: AuditSeverity.Warning,\n message: width !== null\n ? `${name} has a fixed width of ${width}px — it cannot shrink on a narrower screen.`\n : `${name} has a fixed minimum width — it forces sideways scrolling below that size.`,\n fix: fluidiseProps(styles),\n });\n }\n\n // 3. Tap targets below the WCAG minimum.\n if (TAPPABLE.has(node.type) && node.width > 0 && node.height > 0\n && (node.width < MIN_TAP_PX || node.height < MIN_TAP_PX)) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.TapTarget, severity: AuditSeverity.Warning,\n message: `${name} is ${Math.round(node.width)}×${Math.round(node.height)}px — below the ${MIN_TAP_PX}px minimum tap target.`,\n fix: { minHeight: `${MIN_TAP_PX}px`, minWidth: `${MIN_TAP_PX}px` },\n });\n }\n\n // 4. Text too small to read (and small enough to trigger iOS zoom).\n const fontSize = pxOf(styles['fontSize']);\n if (fontSize !== null && fontSize < MIN_TEXT_PX) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.TinyText, severity: AuditSeverity.Warning,\n message: `${name} renders at ${fontSize}px — under the ${MIN_TEXT_PX}px readable minimum.`,\n fix: { fontSize: `${MIN_TEXT_PX}px` },\n });\n }\n\n // 5. An image with a fixed height and no ratio crops unpredictably as the width changes.\n if (node.type === 'Image' && pxOf(styles['height']) !== null\n && !String(styles['aspectRatio'] ?? '').trim().replace(/^auto$/, '')) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.UnboundedImage, severity: AuditSeverity.Info,\n message: `${name} has a fixed height and no aspect ratio — it crops unpredictably as the width changes.`,\n fix: { height: 'auto', aspectRatio: '16 / 9' },\n });\n }\n\n // 6. A slider showing more slides than this width can carry. NOT a CSS problem: slide count\n // is a component trait, so the fix is a per-breakpoint TRAIT override (P3-G1), not a style.\n if (node.type === 'SliderContainer' && node.width > 0) {\n const perView = Number(node.inputs?.['slidesPerView']);\n if (Number.isFinite(perView) && perView > 1) {\n const slideWidth = node.width / perView;\n if (slideWidth < MIN_SLIDE_PX) {\n const fits = Math.max(1, Math.floor(node.width / MIN_SLIDE_PX));\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.SlidesOverflow, severity: AuditSeverity.Warning,\n message: `${name} shows ${perView} slides across ${Math.round(node.width)}px — ${Math.round(slideWidth)}px each. Show ${fits} at this width.`,\n inputFix: { slidesPerView: fits },\n });\n }\n }\n }\n\n // 7. An out-of-flow node that has left the frame. Measured, not inferred: a negative offset\n // is legitimate design until it actually puts the content beyond the edge.\n if (OUT_OF_FLOW.has(String(styles['position'] ?? '')) && node.left !== undefined && node.width > 0) {\n const right = node.left + node.width;\n const offLeft = right <= 0.5;\n const offRight = node.left >= viewportWidth - 0.5;\n if (offLeft || offRight) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.OffscreenAbsolute, severity: AuditSeverity.Error,\n message: `${name} is positioned ${offLeft ? 'left of' : 'beyond'} the ${viewportWidth}px viewport — it cannot be seen or tapped at this width.`,\n // No blind auto-fix: the author's intent (a decorative overflow vs a mistake)\n // is not knowable from geometry. Selecting the node is the useful action.\n });\n }\n }\n }\n\n const rank = { [AuditSeverity.Error]: 0, [AuditSeverity.Warning]: 1, [AuditSeverity.Info]: 2 };\n return findings\n .map((finding, index) => ({ finding, index }))\n .sort((a, b) => rank[a.finding.severity] - rank[b.finding.severity] || a.index - b.index)\n .map(entry => entry.finding);\n}\n\n/** Counts per severity — the per-breakpoint summary strip. */\nexport function summarise(findings: readonly AuditFinding[]): Record<AuditSeverity, number> {\n const out = { [AuditSeverity.Error]: 0, [AuditSeverity.Warning]: 0, [AuditSeverity.Info]: 0 };\n for (const finding of findings) out[finding.severity]++;\n return out;\n}\n","import { ComponentNode } from './component.model';\nimport { Breakpoint, ResponsiveOverrides, setOverride } from '@vectoriox/iox-ui';\n\n/**\n * LAYOUT PRESETS (B4) — the structures people build over and over, as one insert that is ALREADY\n * responsive. A preset is a container plus children (Webflow's Quick Stack idea), not a new\n * component type: what it inserts is ordinary nodes you can edit or take apart afterwards.\n *\n * The point is the `responsive` layers: a beginner gets a working phone layout without knowing what\n * a breakpoint is, and an expert gets the boring part typed for them.\n */\n\nexport interface LayoutPresetChildStyles {\n [prop: string]: string;\n}\n\nexport interface LayoutPresetDef {\n id: string;\n name: string;\n icon: string;\n /** One line in the panel — what it is and what it does when it gets narrow. */\n description: string;\n /** Styles for the container itself, at base. */\n container: LayoutPresetChildStyles;\n /** Per-breakpoint container overrides — this is what makes the preset responsive. */\n containerResponsive?: Partial<Record<Breakpoint, LayoutPresetChildStyles>>;\n /** How many child containers to create. */\n childCount: number;\n /** Styles applied to every child at base. */\n child?: LayoutPresetChildStyles;\n /** Per-child, per-breakpoint overrides, by child index (e.g. reordering a split hero). */\n childResponsive?: Array<Partial<Record<Breakpoint, LayoutPresetChildStyles>>>;\n}\n\nconst GRID = (columns: string) => ({ display: 'grid', gridTemplateColumns: columns, gap: '24px', width: '100%' });\nconst ONE_COLUMN = { gridTemplateColumns: 'repeat(1, minmax(0, 1fr))' };\n\nexport const LAYOUT_PRESETS: readonly LayoutPresetDef[] = Object.freeze([\n {\n id: 'stack', name: 'Stack', icon: 'ph-thin ph-rows',\n description: 'Vertical flow with even spacing.',\n container: { display: 'flex', flexDirection: 'column', gap: '24px', width: '100%' },\n childCount: 2,\n },\n {\n id: 'two-columns', name: 'Two columns', icon: 'ph-thin ph-columns',\n description: 'Side by side; stacks on a phone.',\n container: GRID('repeat(2, minmax(0, 1fr))'),\n containerResponsive: { [Breakpoint.Small]: ONE_COLUMN },\n childCount: 2,\n },\n {\n id: 'three-columns', name: 'Three columns', icon: 'ph-thin ph-columns',\n description: 'Three across; two on a tablet, one on a phone.',\n container: GRID('repeat(3, minmax(0, 1fr))'),\n containerResponsive: {\n [Breakpoint.Tablet]: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' },\n [Breakpoint.Small]: ONE_COLUMN,\n },\n childCount: 3,\n },\n {\n id: 'sidebar-main', name: 'Sidebar + main', icon: 'ph-thin ph-layout',\n description: 'Fixed sidebar beside flexible content; the sidebar drops under it on a tablet.',\n container: GRID('280px minmax(0, 1fr)'),\n containerResponsive: { [Breakpoint.Tablet]: ONE_COLUMN },\n childCount: 2,\n },\n {\n id: 'card-grid', name: 'Card grid', icon: 'ph-thin ph-squares-four',\n description: 'A grid of cards: three, then two, then one.',\n container: GRID('repeat(3, minmax(0, 1fr))'),\n containerResponsive: {\n [Breakpoint.Tablet]: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' },\n [Breakpoint.Small]: ONE_COLUMN,\n },\n childCount: 6,\n child: { minHeight: '160px' },\n },\n {\n id: 'split-hero', name: 'Split hero', icon: 'ph-thin ph-square-split-horizontal',\n description: 'Text beside media; on a phone the media moves above the text.',\n container: GRID('minmax(0, 1.2fr) minmax(0, 1fr)'),\n containerResponsive: { [Breakpoint.Small]: ONE_COLUMN },\n childCount: 2,\n // On a phone the MEDIA (child 2) leads — CSS order only, the DOM order never changes.\n childResponsive: [{ [Breakpoint.Small]: { order: '1' } }, { [Breakpoint.Small]: { order: '0' } }],\n },\n]);\n\n/** Set a style trait's value on a node built from a component config. */\nexport function setStyleTrait(node: ComponentNode, name: string, value: any): void {\n for (const group of node.styleTraits ?? []) {\n const trait = group.traits.find(t => t.name === name);\n if (trait) { trait.default = value; return; }\n }\n}\n\nfunction applyResponsive(node: ComponentNode, layers: Partial<Record<Breakpoint, LayoutPresetChildStyles>> | undefined): void {\n if (!layers) return;\n let responsive: ResponsiveOverrides | undefined = node.responsive;\n for (const [bp, styles] of Object.entries(layers)) {\n for (const [prop, value] of Object.entries(styles ?? {})) {\n responsive = setOverride(responsive, bp as Breakpoint, prop, value);\n }\n }\n node.responsive = responsive;\n}\n\n/**\n * Build a preset's node tree. `createNode` makes an empty node of a type (the component registry in\n * the builder) — passed in so this stays pure and testable.\n *\n * @returns the container node, or `null` when the container type can't be created.\n */\nexport function buildLayoutPreset(\n def: LayoutPresetDef,\n createNode: (type: string) => ComponentNode | null,\n): ComponentNode | null {\n const container = createNode('Container');\n if (!container) return null;\n for (const [prop, value] of Object.entries(def.container)) setStyleTrait(container, prop, value);\n applyResponsive(container, def.containerResponsive);\n\n const children: ComponentNode[] = [];\n for (let i = 0; i < def.childCount; i++) {\n const child = createNode('Container');\n if (!child) continue;\n for (const [prop, value] of Object.entries(def.child ?? {})) setStyleTrait(child, prop, value);\n applyResponsive(child, def.childResponsive?.[i]);\n children.push(child);\n }\n container.children = children;\n return container;\n}\n","import { Injectable, Type } from '@angular/core';\n\n@Injectable()\nexport class ComponentRegistryService {\n private components: Record<string, { type: string; component: Type<any>; config: any }> = {};\n\n getComponent(type: string): Type<any> | null {\n return this.components[type]?.component ?? null;\n }\n\n hasComponent(type: string): boolean {\n return !!this.components[type];\n }\n\n createConfig(type: string): any | null {\n const configType = this.components[type]?.config;\n return configType ? new configType() : null;\n }\n\n register(type: string, component: Type<any>, config: any): void {\n this.components[type] = { type, component, config };\n }\n\n getAll() {\n return Object.values(this.components);\n }\n}","import { ComponentRef, Injectable } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { ComponentNode } from '../models/component.model';\nimport { BuilderMode, ToolbarAction } from '../panels/panel.model';\n\nexport interface OverlayBoxSpacing {\n top: number; right: number; bottom: number; left: number;\n}\n\nexport interface OverlayBoxModel {\n margin: OverlayBoxSpacing;\n padding: OverlayBoxSpacing;\n border: OverlayBoxSpacing;\n}\n\nexport interface OverlayEntry {\n element: HTMLElement;\n componentName: string;\n boxModel?: OverlayBoxModel; // populated for hover only\n mode: BuilderMode;\n node?: ComponentNode;\n componentRef?: ComponentRef<any>;\n}\n\nexport { ToolbarAction } from '../panels/panel.model';\n\nexport interface NodeRef {\n element: HTMLElement;\n componentRef: ComponentRef<any>;\n}\n\n@Injectable()\nexport class OverlayService {\n private hoverSubject = new BehaviorSubject<OverlayEntry | null>(null);\n private selectSubject = new BehaviorSubject<OverlayEntry | null>(null);\n private nodeMap = new Map<ComponentNode, NodeRef>();\n\n public hover$ = this.hoverSubject.asObservable();\n public select$ = this.selectSubject.asObservable();\n\n private containerElement: HTMLElement | null = null;\n private scrollContainerElement: HTMLElement | null = null;\n private intersectionRootElement: HTMLElement | null = null;\n\n /** Emits the scroll container element whenever it is registered. */\n public scrollContainer$ = new Subject<HTMLElement>();\n\n /** Emits cursor coords when a canvas element is right-clicked. */\n public contextMenu$ = new Subject<{ x: number; y: number }>();\n\n triggerContextMenu(x: number, y: number): void {\n this.contextMenu$.next({ x, y });\n }\n\n setContainer(container: HTMLElement | null): void {\n this.containerElement = container;\n }\n\n getContainer(): HTMLElement | null {\n return this.containerElement;\n }\n\n setScrollContainer(el: HTMLElement | null): void {\n this.scrollContainerElement = el;\n if (el) { this.scrollContainer$.next(el); }\n }\n\n getScrollContainer(): HTMLElement | null {\n return this.scrollContainerElement;\n }\n\n /** The clipping container used as IntersectionObserver root in builder mode (.preview-scroll). */\n setIntersectionRoot(el: HTMLElement | null): void {\n this.intersectionRootElement = el;\n }\n\n getIntersectionRoot(): HTMLElement | null {\n return this.intersectionRootElement;\n }\n\n /**\n * Resolve the styled element (the one carrying `.iox-node-{id}` — where padding/margin/size live).\n * Directive-host components (Image/Heading/Container/Section/…) put `iox-node-{id}` on the HOST\n * itself, so the host IS the styled element. Legacy wrapper components (Card/Repeater/Slider) put\n * it on the first child. Prefer the host when it's the styled element; fall back to the first\n * child otherwise. (Before this, directive-host containers outlined their first child — e.g. a\n * container's outline landed on the image inside it, desyncing from Moveable's resize handles.)\n */\n getStyledElement(host: HTMLElement): HTMLElement {\n for (let i = 0; i < host.classList.length; i++) {\n if (host.classList[i].startsWith('iox-node-')) return host;\n }\n return (host.firstElementChild as HTMLElement) || host;\n }\n\n // ── Node → Element registry ──────────────────────────────\n registerNode(node: ComponentNode, element: HTMLElement, componentRef: ComponentRef<any>): void {\n this.nodeMap.set(node, { element, componentRef });\n }\n\n unregisterNode(node: ComponentNode): void {\n this.nodeMap.delete(node);\n }\n\n getNodeRef(node: ComponentNode): NodeRef | undefined {\n return this.nodeMap.get(node);\n }\n\n /** Return all registered node → ref entries. */\n getAllNodeEntries(): IterableIterator<[ComponentNode, NodeRef]> {\n return this.nodeMap.entries();\n }\n\n /** Find a registered node whose host element matches the given DOM element. */\n findNodeByElement(element: HTMLElement): { node: ComponentNode; ref: NodeRef } | undefined {\n for (const [node, ref] of this.nodeMap) {\n if (ref.element === element) {\n return { node, ref };\n }\n }\n return undefined;\n }\n\n /**\n * Walk up the DOM from a node's registered host element to the nearest ANCESTOR\n * element that is itself a registered node. Used to resolve the immediate parent\n * for relational style states (e.g. parent-hover). Returns undefined for root nodes.\n */\n getParentEntry(node: ComponentNode): { node: ComponentNode; ref: NodeRef } | undefined {\n const ref = this.nodeMap.get(node);\n if (!ref) return undefined;\n let el = ref.element.parentElement;\n while (el) {\n const match = this.findNodeByElement(el);\n if (match) return match;\n el = el.parentElement;\n }\n return undefined;\n }\n\n setHover(element: HTMLElement, componentName: string, mode: BuilderMode): void {\n if (this.selectSubject.getValue()?.element === element) return;\n this.hoverSubject.next({ element, componentName, boxModel: this.buildBoxModel(element), mode });\n }\n\n clearHover(): void {\n this.hoverSubject.next(null);\n }\n\n /** Current selection snapshot (null if nothing is selected). */\n getCurrentSelection(): OverlayEntry | null {\n return this.selectSubject.getValue();\n }\n\n setSelect(element: HTMLElement, componentName: string, mode: BuilderMode, node?: ComponentNode, componentRef?: ComponentRef<any>): void {\n this.hoverSubject.next(null);\n this.selectSubject.next({ element, componentName, mode, node, componentRef });\n }\n\n clearSelect(): void {\n this.selectSubject.next(null);\n }\n\n refreshSelect(): void {\n const current = this.selectSubject.getValue();\n if (!current) return;\n this.selectSubject.next({ ...current });\n }\n\n /** Lightweight swap for drag-preview tracking. */\n updateSelectElement(element: HTMLElement): void {\n const current = this.selectSubject.getValue();\n if (!current) return;\n this.selectSubject.next({ ...current, element });\n }\n\n buildBoxModel(host: HTMLElement): OverlayBoxModel {\n const inner = this.getStyledElement(host);\n // Margin lives on the wrapper div (host.parentElement) — iox-outer-{id} is\n // applied there so it participates in the parent flex layout.\n const wrapper = (host.parentElement as HTMLElement) || host;\n const si = window.getComputedStyle(inner);\n const sw = window.getComputedStyle(wrapper);\n const px = (v: string) => { const n = Number.parseFloat(v); return Number.isFinite(n) ? n : 0; };\n return {\n margin: { top: px(sw.marginTop), right: px(sw.marginRight), bottom: px(sw.marginBottom), left: px(sw.marginLeft) },\n padding: { top: px(si.paddingTop), right: px(si.paddingRight), bottom: px(si.paddingBottom), left: px(si.paddingLeft) },\n border: { top: px(si.borderTopWidth), right: px(si.borderRightWidth), bottom: px(si.borderBottomWidth), left: px(si.borderLeftWidth) },\n };\n }\n\n}","/**\n * The text on the drop indicator's chip — \"into Card grid · position 2 of 3\" (B2).\n *\n * The most common drag failure is landing a node one level off and not noticing; naming the PARENT\n * and the slot makes the target unambiguous before the pointer is released.\n *\n * @param containerName The target container's label or type; blank / unknown → \"the page\".\n * @param index Insert index within the container (0-based).\n * @param childCount How many children it has now — the node being dropped makes `childCount + 1`.\n */\nexport function dropTargetLabel(containerName: string | null | undefined, index: number, childCount: number): string {\n const name = (containerName ?? '').trim() || 'the page';\n const total = Math.max(0, childCount) + 1;\n const position = Math.min(Math.max(index, 0), total - 1) + 1;\n return `into ${name} · position ${position} of ${total}`;\n}\n","/**\n * Per-frame exponential smoothing step — moves `current` a fraction of the way\n * toward `target`. Used to ease the drag ghost toward the pointer instead of\n * snapping to it 1:1 on every dragmove (see DragEngineService._ghostFollowStep).\n */\nexport function easeToward(current: number, target: number, smoothing: number): number {\n return current + (target - current) * smoothing;\n}\n","/**\n * Decides which element a drag gesture should actually operate on.\n *\n * A drag must never silently descend into a nested child just because the pointer happened to\n * be over it while its ANCESTOR is the currently selected node, and the overlay's drag-handle\n * (which carries no node of its own — it lives outside the canvas DOM entirely) must always\n * redirect to whatever is currently selected. In both cases the redirect target is the\n * currently-selected element; otherwise the gesture proceeds on its natural origin unchanged.\n */\nexport function resolveDragTarget(\n el: HTMLElement,\n selectedElement: HTMLElement | null,\n isDragHandle: boolean,\n): HTMLElement {\n if (!selectedElement || el === selectedElement) return el;\n const isDescendantOfSelected = selectedElement.contains(el);\n return (isDragHandle || isDescendantOfSelected) ? selectedElement : el;\n}\n","import { Injectable } from '@angular/core';\n\nimport { IoxSymbol } from '../models/component.model';\n\n/**\n * SymbolRegistryService — in-memory store for org-level symbols.\n *\n * Loaded once per page by PageUiComponent alongside the page layout.\n * Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.\n */\n@Injectable()\nexport class SymbolRegistryService {\n private symbols = new Map<string, IoxSymbol>();\n /** symbolIds that have a live reusable block in the DB — used to guard isDetachedSymbol. */\n private blockSymbolIds = new Set<string>();\n\n setSymbols(symbols: IoxSymbol[]): void {\n this.symbols.clear();\n for (const s of symbols) {\n this.symbols.set(s.id, s);\n }\n }\n\n getSymbol(id: string): IoxSymbol | undefined {\n return this.symbols.get(id);\n }\n\n getAll(): IoxSymbol[] {\n return Array.from(this.symbols.values());\n }\n\n upsert(symbol: IoxSymbol): void {\n this.symbols.set(symbol.id, symbol);\n }\n\n remove(id: string): void {\n this.symbols.delete(id);\n }\n\n /** Set the symbolIds that have a live reusable block. Called on page load. */\n setBlockSymbolIds(ids: Set<string>): void {\n this.blockSymbolIds = new Set(ids);\n }\n\n /** Returns true only when the symbol has a live backing reusable block. */\n isBlockSymbol(id: string): boolean {\n return this.blockSymbolIds.has(id);\n }\n\n /** Remove a symbolId from the block-backed set (called when a block is deleted). */\n removeBlockSymbolId(id: string): void {\n this.blockSymbolIds.delete(id);\n }\n}\n","import { ChangeDetectorRef, Injectable } from '@angular/core';\nimport interact from 'interactjs';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { ComponentNode } from '../models/component.model';\nimport { regenerateNodeIds } from '../utils/clone-ids.util';\nimport { dropTargetLabel } from '../utils/drop-label.util';\nimport { easeToward } from '../utils/spring-motion.util';\nimport { resolveDragTarget } from '../utils/drag-redirect.util';\nimport { ComponentRegistryService } from './component-registry.service';\nimport { SymbolRegistryService } from './symbol-registry.service';\nimport { OverlayService } from '../overlay/overlay.service';\n\n/** Marks the overlay's dedicated drag-handle chrome (see overlay.component.html) — it carries no\n * node of its own, so a drag started on it always redirects to whatever is currently selected. */\nexport const DRAG_HANDLE_ATTR = 'data-iox-drag-handle';\n\nexport interface DragPayload {\n type: 'internal' | 'external';\n data: ComponentNode | string;\n sourceId: string | null;\n sourceIndex: number;\n}\n\nexport interface IoxDropEvent {\n payload: DragPayload;\n targetId: string;\n insertIndex: number;\n}\n\n// Ease-out-quint — fast start, precise stop, no overshoot. Used for FLIP sibling\n// reflow and the insertion indicator open/close. Deliberately NOT a spring/back\n// curve (e.g. cubic-bezier(0.34,1.56,0.64,1)): multiple siblings animating with\n// overshoot at once reads as jitter, not polish — reserve overshoot for single-\n// element motion (ghost drop-settle, a later phase).\nconst MOTION_EASE = 'cubic-bezier(0.22, 1, 0.36, 1)';\n\n// Per-frame exponential smoothing factor for the drag ghost's cursor-follow.\n// Was: ghost position set 1:1 to the pointer every dragmove (rigid/teleporty).\n// Lower = more lag/weight, higher = snappier. 0.35 catches up to the pointer\n// within ~5-6 frames (~80-100ms) — reads as \"responsive but weighted\".\nconst GHOST_FOLLOW_SMOOTHING = 0.35;\n\nfunction deepCloneNode(node: ComponentNode): ComponentNode {\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n // Fresh ids + remap intra-subtree references (stateTriggers, interaction targets) so a cloned\n // structure stays self-consistent — e.g. trigger-hover keeps pointing at the clone's own trigger.\n regenerateNodeIds(clone);\n return clone;\n}\n\n@Injectable()\nexport class DragEngineService {\n\n constructor(\n private registry: ComponentRegistryService,\n private symbolRegistry: SymbolRegistryService,\n private overlayService: OverlayService,\n ) {}\n\n // ── Shared drop handler — used by all layout components ───────────────────\n\n handleDrop(\n children: ComponentNode[],\n event: IoxDropEvent,\n dropListId: string,\n cdr: ChangeDetectorRef,\n afterDrop?: () => void,\n ): void {\n const { payload, insertIndex } = event;\n\n if (payload.type === 'external') {\n const node = this.materialize(payload.data);\n if (node) {\n children.splice(insertIndex, 0, node);\n cdr.detectChanges();\n this.dropComplete$.next(node);\n }\n afterDrop?.();\n return;\n }\n\n const item = payload.data as ComponentNode;\n\n if (payload.sourceId !== dropListId) {\n const sourceData = payload.sourceId ? this.getData(payload.sourceId) : null;\n if (sourceData) {\n const srcIdx = sourceData.indexOf(item);\n if (srcIdx !== -1) {\n sourceData.splice(srcIdx, 1);\n this.getCdr(payload.sourceId!)?.detectChanges();\n }\n children.splice(insertIndex, 0, item);\n cdr.detectChanges();\n this.dropComplete$.next(item);\n } else {\n // Source not in the drop-zone registry → came from an external panel\n // (e.g. the built-in blocks panel stores one pre-built node object and\n // reuses it across drags), so materialise it like any external payload.\n const cloned = this.materialize(item);\n if (cloned) {\n children.splice(insertIndex, 0, cloned);\n cdr.detectChanges();\n this.dropComplete$.next(cloned);\n }\n }\n afterDrop?.();\n return;\n }\n\n const currentIdx = children.indexOf(item);\n if (currentIdx !== -1) {\n const adjustedIdx = insertIndex > currentIdx ? insertIndex - 1 : insertIndex;\n children.splice(currentIdx, 1);\n children.splice(adjustedIdx, 0, item);\n cdr.detectChanges();\n this.dropComplete$.next(item);\n }\n afterDrop?.();\n }\n\n /**\n * Turn a components-panel payload into a fresh ComponentNode: a built-in type string via the\n * registry, or a block / symbol / bare node deep-cloned with fresh ids (so each copy owns its\n * CSS rules and its intra-subtree references stay self-consistent). Prefers `symbol.node`\n * (always current) over a block's original snapshot.\n *\n * The ONE place a panel payload becomes a node — drag-drop and click-to-insert both use it, so\n * a clicked element is identical to a dragged one.\n */\n materialize(data: unknown): ComponentNode | null {\n if (typeof data === 'string') return this.registry.createConfig(data) ?? null;\n if (!data || typeof data !== 'object') return null;\n const blk = data as any;\n const symbolNode = blk.symbolId ? this.symbolRegistry.getSymbol(blk.symbolId)?.node : null;\n const cloned = deepCloneNode((symbolNode ?? blk.node ?? blk) as ComponentNode);\n if (blk.syncInstances && blk.symbolId) (cloned as any).symbolId = blk.symbolId;\n return cloned;\n }\n\n /**\n * CLICK-TO-INSERT (B2): place a panel payload at a resolved target without a drag. Emits\n * `dropComplete$` exactly like a drop, so the builder selects the new node and records one undo\n * step through the same path. Returns the inserted node, or null if the payload was unusable.\n */\n insertPayload(children: ComponentNode[], index: number, data: unknown): ComponentNode | null {\n const node = this.materialize(data);\n if (!node) return null;\n children.splice(Math.max(0, Math.min(index, children.length)), 0, node);\n this.cdrForData(children)?.detectChanges();\n this.dropComplete$.next(node);\n return node;\n }\n\n /** True when `children` is a registered drop zone's array — i.e. a real container that can hold\n * children. Click-to-insert uses the same test a drag does, so it can't insert where a drop\n * couldn't. */\n isDropContainer(children: unknown): boolean {\n for (const data of this.dataMap.values()) if (data === children) return true;\n return false;\n }\n\n private cdrForData(children: unknown): ChangeDetectorRef | undefined {\n for (const [id, data] of this.dataMap.entries()) if (data === children) return this.cdrMap.get(id);\n return undefined;\n }\n\n // ── Drop-zone registry ────────────────────────────────────\n\n private ids: string[] = [];\n private elMap = new Map<string, HTMLElement>();\n private dataMap = new Map<string, any[]>();\n private cdrMap = new Map<string, ChangeDetectorRef>();\n private dropCbMap = new Map<string, (e: IoxDropEvent) => void>();\n private postDropMap = new Map<string, () => void>();\n\n public readonly ids$ = new BehaviorSubject<string[]>([]);\n public readonly isDragging$ = new BehaviorSubject<boolean>(false);\n public readonly deepTarget$ = new BehaviorSubject<string | null>(null);\n /** Emits the dropped/inserted ComponentNode after every successful drop. */\n public readonly dropComplete$ = new Subject<ComponentNode>();\n\n // ── Active drag state ─────────────────────────────────────\n\n private _isDragging = false;\n private _payload: DragPayload | null = null;\n private _sourceEl: HTMLElement | null = null;\n\n /**\n * For internal drags: a DOM clone of the dragged element appended to <body>.\n * Lives outside any CSS transform, so position:fixed works in viewport coords.\n * For external drags: the label chip overlay.\n */\n private _overlay: HTMLElement | null = null;\n /** Where on the element the user grabbed it (for accurate ghost positioning). */\n private _grabOffsetX = 0;\n private _grabOffsetY = 0;\n\n // ── Ghost cursor-follow (eased, not 1:1) ───────────────────\n private _ghostX = 0;\n private _ghostY = 0;\n private _ghostTargetX = 0;\n private _ghostTargetY = 0;\n private _ghostRaf = 0;\n\n // ── Pointer tracking ──────────────────────────────────────\n\n private _lastPointerX = 0;\n private _lastPointerY = 0;\n\n // ── Deep-target tracking ──────────────────────────────────\n\n private _deepTargetId: string | null = null;\n\n /** Injected overlay div marking the active drop target. */\n private _targetOverlay: HTMLElement | null = null;\n private _targetChip: HTMLElement | null = null;\n\n // ── Insertion indicator ───────────────────────────────────\n\n private _indicator: HTMLElement | null = null;\n private _indicatorContainerId: string | null = null;\n private _indicatorIndex = -1;\n private _indicatorRaf = 0;\n\n /** Elements that have temporary FLIP inline styles — cleared on drag end. */\n private _flipEls = new Set<HTMLElement>();\n\n // ── Viewport scale ────────────────────────────────────────\n\n private _scale = 1;\n\n /** Called by BuilderComponent whenever the viewport scale changes. */\n setScale(scale: number): void { this._scale = scale; }\n\n // ── Dropzone rect cache — snapshotted at drag start and on scroll ─────────\n\n private _dropzoneRectCache = new Map<string, DOMRect>();\n\n private _snapshotRects(): void {\n this._dropzoneRectCache.clear();\n for (const id of this.ids) {\n const el = this._getEl(id);\n if (el) this._dropzoneRectCache.set(id, el.getBoundingClientRect());\n }\n }\n\n // ── Root-escape ───────────────────────────────────────────\n\n private readonly ROOT_ESCAPE_PX = 14;\n private _rootEscapeActiveFor: string | null = null;\n\n // ─────────────────────────────────────────────────────────\n // Element lookup — elMap first, DOM id fallback\n // ─────────────────────────────────────────────────────────\n\n private _getEl(id: string): HTMLElement | null {\n return this.elMap.get(id) ?? document.getElementById(id);\n }\n\n // ─────────────────────────────────────────────────────────\n // Drop-zone registration\n // ─────────────────────────────────────────────────────────\n\n registerDropzone(\n id: string,\n el: HTMLElement,\n data: any[],\n cdr: ChangeDetectorRef,\n dropCb: (e: IoxDropEvent) => void,\n postDrop?: () => void,\n ): void {\n if (!id) return;\n\n // Stamp id on element so DOM-walk helpers (_isRootContainer) find it.\n el.id = id;\n\n if (!this.ids.includes(id)) {\n this.ids = [...this.ids, id];\n this.ids$.next(this.ids);\n }\n this.elMap.set(id, el);\n this.dataMap.set(id, data);\n this.cdrMap.set(id, cdr);\n this.dropCbMap.set(id, dropCb);\n if (postDrop) this.postDropMap.set(id, postDrop);\n\n interact(el).dropzone({\n accept: '[data-iox-draggable]',\n overlap: 'pointer',\n });\n }\n\n unregisterDropzone(id: string, el: HTMLElement): void {\n this.ids = this.ids.filter(i => i !== id);\n this.elMap.delete(id);\n this.dataMap.delete(id);\n this.cdrMap.delete(id);\n this.dropCbMap.delete(id);\n this.postDropMap.delete(id);\n this.ids$.next(this.ids);\n try { interact(el).unset(); } catch { /* already unset */ }\n }\n\n // ─────────────────────────────────────────────────────────\n // Draggable registration\n // ─────────────────────────────────────────────────────────\n\n /** Payload getter per registered draggable element — looked up in _onDragStart when a drag\n * redirects onto the currently-selected element instead of its natural origin. */\n private _payloadMap = new Map<HTMLElement, () => DragPayload>();\n\n registerDraggable(el: HTMLElement, getPayload: () => DragPayload): void {\n el.setAttribute('data-iox-draggable', '');\n this._payloadMap.set(el, getPayload);\n\n interact(el).draggable({\n // Don't start a drag when the pointer goes down inside a contenteditable\n // element (e.g. a text block in inline-edit mode).\n ignoreFrom: '[contenteditable=\"true\"]',\n listeners: {\n start: (event) => this._onDragStart(event, el, getPayload),\n move: (event) => this._onDragMove(event),\n end: (event) => this._onDragEnd(event),\n },\n modifiers: [],\n });\n }\n\n unregisterDraggable(el: HTMLElement): void {\n el.removeAttribute('data-iox-draggable');\n this._payloadMap.delete(el);\n try { interact(el).unset(); } catch { /* already unset */ }\n }\n\n getData(id: string): any[] | undefined { return this.dataMap.get(id); }\n getCdr(id: string): ChangeDetectorRef | undefined { return this.cdrMap.get(id); }\n invokePostDrop(id: string): void { this.postDropMap.get(id)?.(); }\n\n /** Which registered dropzone's data array currently contains this node — used by the\n * overlay's drag-handle to resolve `ioxDragSourceId` for the selected node dynamically\n * (the handle isn't rendered inside any container, so it has no source id of its own). */\n findSourceIdForNode(node: ComponentNode): string | null {\n for (const [id, data] of this.dataMap) {\n if (data.includes(node)) return id;\n }\n return null;\n }\n\n consumeDeepTarget(): string | null {\n const v = this._deepTargetId;\n this._deepTargetId = null;\n return v;\n }\n\n // ─────────────────────────────────────────────────────────\n // Drag lifecycle\n // ─────────────────────────────────────────────────────────\n\n private _onDragStart(event: any, el: HTMLElement, getPayload: () => DragPayload): void {\n if (el.hasAttribute('data-editing')) {\n event.interaction.stop();\n return;\n }\n\n // A drag must operate on the CURRENTLY SELECTED node — never silently descend into a\n // nested child just because the pointer happened to be over it (e.g. clicking into a\n // selected Container's body actually grabbed a nested child's own registered draggable),\n // and never change the selection as a side effect of starting a drag. The overlay's\n // drag-handle (DRAG_HANDLE_ATTR) carries no node of its own — a drag started there always\n // redirects to whatever is selected. See utils/drag-redirect.util.ts for the decision.\n const selected = this.overlayService.getCurrentSelection();\n if (selected?.element) {\n const isHandle = el.hasAttribute(DRAG_HANDLE_ATTR);\n const target = resolveDragTarget(el, selected.element, isHandle);\n if (target !== el) {\n const redirectedPayload = this._payloadMap.get(target);\n if (redirectedPayload) {\n el = target;\n getPayload = redirectedPayload;\n } else if (isHandle) {\n // Nothing sensible to drag via the handle (selected node isn't draggable).\n event.interaction.stop();\n return;\n }\n }\n }\n\n this._payload = getPayload();\n this._sourceEl = el;\n this._isDragging = true;\n this._rootEscapeActiveFor = null;\n // Suppress native text selection for the duration of the drag — without this,\n // dragging the pointer across any text (canvas or sidebar) selects/highlights it.\n document.body.classList.add('iox-dragging');\n this._lastPointerX = event.client.x;\n this._lastPointerY = event.client.y;\n this.isDragging$.next(true);\n\n if (this._payload.type === 'internal') {\n // ── Clone the element and append to <body> ────────────────────────────\n //\n // DOM structure for a canvas item — two possible shapes:\n // (legacy wrapper, still used by slider slides / repeater items)\n // div[ioxDraggable] (el — the drag wrapper, may be wider than content)\n // └─ <app-card> / <app-section> … (Angular component host — the styled element)\n // (collapsed / directive-host, the common case post wrapper-collapse — task 9c)\n // el IS the styled element itself (carries its own `iox-node-{id}` class)\n //\n // el.getBoundingClientRect() gives the WRAPPER's rect in the legacy shape, which can\n // be wider than the visual element when the wrapper is in a flex container that\n // stretches it — wrong ghost dimensions, wrong grab offset. In the collapsed shape,\n // descending into el.firstElementChild would be actively wrong: for a container WITH\n // children, that grabs the first CHILD's rect/content instead of the container's own.\n //\n // OverlayService.getStyledElement() already carries this exact disambiguation (used\n // for the selection outline / box model) — reuse it instead of forking the logic:\n // el itself if it carries `iox-node-*`, else its first child.\n const hostEl = this.overlayService.getStyledElement(el);\n const rect = hostEl.getBoundingClientRect();\n this._grabOffsetX = event.client.x - rect.left;\n this._grabOffsetY = event.client.y - rect.top;\n\n // Scale factor: getBoundingClientRect() returns scaled viewport px,\n // but the clone renders at natural CSS px (no transform parent on body).\n // Apply the same scale transform so the clone matches the visual size\n // exactly — no explicit width/height, no overflow clipping.\n const scale = this._scale;\n\n // Cancel fill:forwards animations before cloning so the ghost shows\n // the element at its natural (un-animated) state, and so the original\n // element is clean after a same-position drop (where Angular won't\n // destroy/recreate the DOM node and InteractionEngine.detach() won't fire).\n hostEl.getAnimations().forEach(a => a.cancel());\n\n const clone = hostEl.cloneNode(true) as HTMLElement;\n // getBoundingClientRect() returns scaled viewport px. Divide by scale\n // to get the natural CSS px — this constrains the clone to match the\n // original's width when it's reparented to <body> (no canvas parent).\n // overflow:hidden suppresses scrollbars that can appear when the clone's\n // children lose their layout context (e.g. percentage-width children).\n const cssWidth = Math.round(rect.width / scale);\n const cssHeight = Math.round(rect.height / scale);\n clone.style.cssText = [\n 'position:fixed',\n `left:${rect.left}px`,\n `top:${rect.top}px`,\n `width:${cssWidth}px`,\n `height:${cssHeight}px`,\n `transform:scale(${scale})`,\n 'transform-origin:top left',\n 'pointer-events:none',\n 'overflow:hidden',\n 'z-index:9999',\n 'margin:0',\n ].join(';');\n clone.classList.add('iox-drag-moving');\n document.body.appendChild(clone);\n this._overlay = clone;\n this._startGhostFollow(rect.left, rect.top);\n\n // Hide original wrapper in-place (keeps layout space so container size is stable).\n el.classList.add('iox-drag-active-source');\n } else {\n // ── Sidebar external drag — show a label chip ─────────────────────────\n this._createExternalChip(this._payload, event.client.x, event.client.y);\n el.classList.add('iox-drag-source');\n }\n\n this._snapshotRects();\n }\n\n private _onDragMove(event: any): void {\n this._lastPointerX = event.client.x;\n this._lastPointerY = event.client.y;\n\n // Update the ghost's follow target; the rAF loop (_ghostFollowStep) eases\n // the clone/chip toward it rather than snapping to it every dragmove.\n if (this._overlay) {\n this._ghostTargetX = event.client.x - this._grabOffsetX;\n this._ghostTargetY = event.client.y - this._grabOffsetY;\n }\n\n this._updateDeepTarget();\n this._updateIndicator();\n }\n\n private _onDragEnd(event: any): void {\n document.body.classList.remove('iox-dragging');\n\n // Restore original element visibility BEFORE Angular re-renders on drop.\n if (this._sourceEl) {\n this._sourceEl.classList.remove('iox-drag-active-source');\n this._sourceEl.classList.remove('iox-drag-source');\n }\n document.querySelectorAll('.iox-drag-active-source')\n .forEach(el => el.classList.remove('iox-drag-active-source'));\n\n // Remove clone/chip overlay.\n this._removeOverlay();\n\n // Remove indicator BEFORE committing so calcInsertIndex sees a clean DOM.\n this._removeIndicator();\n document.body.classList.remove('iox-drag-has-indicator');\n\n // Clean up any FLIP transform/transition inline styles left on container children.\n for (const el of this._flipEls) {\n el.style.transform = '';\n el.style.transition = '';\n }\n this._flipEls.clear();\n\n this._commitDrop();\n\n this._removeTargetOverlay();\n document.querySelectorAll('.iox-drag-over').forEach(el => el.classList.remove('iox-drag-over'));\n this._rootEscapeActiveFor = null;\n this._isDragging = false;\n this._payload = null;\n this._sourceEl = null;\n this.isDragging$.next(false);\n this.deepTarget$.next(null);\n setTimeout(() => { this._deepTargetId = null; });\n }\n\n // ─────────────────────────────────────────────────────────\n // Drop commit\n // ─────────────────────────────────────────────────────────\n\n private _commitDrop(): void {\n if (!this._payload) return;\n\n const targetId = this._deepTargetId ?? 'canvas-preview';\n const insertIndex = this.calcInsertIndex(targetId);\n\n const dropCb = this.dropCbMap.get(targetId);\n if (!dropCb) return;\n\n dropCb({ payload: this._payload, targetId, insertIndex });\n }\n\n // ─────────────────────────────────────────────────────────\n // External-drag chip (sidebar items only)\n // ─────────────────────────────────────────────────────────\n\n private _createExternalChip(payload: DragPayload, pointerX: number, pointerY: number): void {\n this._removeOverlay();\n const label = typeof payload.data === 'string' ? payload.data : 'Component';\n const chip = document.createElement('div');\n chip.className = 'iox-drag-overlay iox-drag-overlay-chip';\n chip.textContent = label;\n // Chip follows 14px below-right of cursor.\n this._grabOffsetX = -14;\n this._grabOffsetY = -14;\n chip.style.left = (pointerX + 14) + 'px';\n chip.style.top = (pointerY + 14) + 'px';\n document.body.appendChild(chip);\n this._overlay = chip;\n this._startGhostFollow(pointerX + 14, pointerY + 14);\n }\n\n private _removeOverlay(): void {\n this._stopGhostFollow();\n this._overlay?.remove();\n this._overlay = null;\n this._grabOffsetX = 0;\n this._grabOffsetY = 0;\n }\n\n // ─────────────────────────────────────────────────────────\n // Ghost cursor-follow — eased toward the pointer via rAF instead of\n // snapped to it every dragmove event.\n // ─────────────────────────────────────────────────────────\n\n private _startGhostFollow(initialLeft: number, initialTop: number): void {\n this._ghostX = this._ghostTargetX = initialLeft;\n this._ghostY = this._ghostTargetY = initialTop;\n cancelAnimationFrame(this._ghostRaf);\n this._ghostRaf = requestAnimationFrame(this._ghostFollowStep);\n }\n\n private _ghostFollowStep = (): void => {\n if (!this._overlay) { this._ghostRaf = 0; return; }\n this._ghostX = easeToward(this._ghostX, this._ghostTargetX, GHOST_FOLLOW_SMOOTHING);\n this._ghostY = easeToward(this._ghostY, this._ghostTargetY, GHOST_FOLLOW_SMOOTHING);\n this._overlay.style.left = this._ghostX + 'px';\n this._overlay.style.top = this._ghostY + 'px';\n this._ghostRaf = requestAnimationFrame(this._ghostFollowStep);\n };\n\n private _stopGhostFollow(): void {\n cancelAnimationFrame(this._ghostRaf);\n this._ghostRaf = 0;\n }\n\n // ─────────────────────────────────────────────────────────\n // Deep-target detection (smallest bounding-rect area)\n // ─────────────────────────────────────────────────────────\n\n private _updateDeepTarget(): void {\n const px = this._lastPointerX;\n const py = this._lastPointerY;\n\n let bestId: string | null = null;\n let bestArea = Infinity;\n\n for (const id of this.ids) {\n const el = this._getEl(id);\n if (!el) continue;\n // Never drop an element into its own subtree: skip any dropzone\n // whose DOM element lives inside the dragged source wrapper.\n if (this._sourceEl?.contains(el)) continue;\n // Skip elements hidden by interaction pre-state, and any of their children.\n if (el.closest('[data-iox-hidden]')) continue;\n const rect = this._dropzoneRectCache.get(id) ?? el.getBoundingClientRect();\n if (px >= rect.left && px <= rect.right && py >= rect.top && py <= rect.bottom) {\n const area = rect.width * rect.height;\n if (area < bestArea) { bestArea = area; bestId = id; }\n }\n }\n\n // Root-escape with hysteresis.\n // Purpose: when the cursor is near the top/bottom edge of a root-level\n // section, treat the target as canvas-preview so the user can insert\n // between root sections.\n //\n // IMPORTANT: only activate if the cursor was ALREADY inside this section\n // (i.e. deepTarget is the section itself or a nested child of it).\n // Without this guard, crossing from Section A into the top 14px of\n // Section C immediately locks the target to canvas-preview and prevents\n // the user from ever reaching Section C's nested containers.\n if (this._rootEscapeActiveFor) {\n const escEl = this._getEl(this._rootEscapeActiveFor);\n if (escEl) {\n const r = this._dropzoneRectCache.get(this._rootEscapeActiveFor) ?? escEl.getBoundingClientRect();\n const inside = px >= r.left && px <= r.right && py >= r.top && py <= r.bottom;\n if (inside) { bestId = 'canvas-preview'; }\n else { this._rootEscapeActiveFor = null; }\n } else {\n this._rootEscapeActiveFor = null;\n }\n }\n\n if (!this._rootEscapeActiveFor &&\n bestId && bestId !== 'canvas-preview' && this._isRootContainer(bestId)) {\n const el = this._getEl(bestId);\n if (el) {\n const rect = this._dropzoneRectCache.get(bestId) ?? el.getBoundingClientRect();\n const nearEdge =\n py <= rect.top + this.ROOT_ESCAPE_PX ||\n py >= rect.bottom - this.ROOT_ESCAPE_PX;\n // Only escape if we were already targeting this section or\n // something nested inside it — not when crossing into it fresh.\n const wasInsideThisSection =\n this._deepTargetId === bestId ||\n this._isDescendantDropzone(this._deepTargetId, bestId);\n if (nearEdge && wasInsideThisSection) {\n this._rootEscapeActiveFor = bestId;\n bestId = 'canvas-preview';\n }\n }\n }\n\n if (bestId !== this._deepTargetId) {\n if (this._deepTargetId) {\n const old = this._getEl(this._deepTargetId);\n old?.classList.remove('iox-drag-over');\n }\n this._deepTargetId = bestId;\n if (bestId) {\n this._getEl(bestId)?.classList.add('iox-drag-over');\n }\n // Move injected overlay to the new target container.\n this._moveTargetOverlay(bestId);\n this.deepTarget$.next(bestId);\n\n // Reset indicator position state when container changes.\n this._indicatorIndex = -1;\n this._indicatorContainerId = null;\n }\n }\n\n // ─────────────────────────────────────────────────────────\n // Target overlay — fixed to <body>, sized from getBoundingClientRect\n // so it is always above all canvas content regardless of stacking\n // contexts or background colors inside the target container.\n // ─────────────────────────────────────────────────────────\n\n /** Call on every canvas scroll tick to keep the fixed-position drop-target\n * overlay aligned with the container element that moved in the viewport. */\n refreshDragOverlays(): void {\n if (!this._isDragging) return;\n this._snapshotRects();\n this._moveTargetOverlay(this._deepTargetId);\n }\n\n private _moveTargetOverlay(targetId: string | null): void {\n if (!targetId || targetId === 'canvas-preview') {\n this._removeTargetOverlay();\n return;\n }\n\n const el = this._getEl(targetId);\n if (!el) { this._removeTargetOverlay(); return; }\n\n if (!this._targetOverlay) {\n this._targetOverlay = document.createElement('div');\n this._targetOverlay.className = 'iox-drop-target-overlay';\n // Chip naming the target + slot — the most common drag failure is landing one level off\n // and not noticing (B2). Inline-styled like the indicator: no global CSS dependency.\n this._targetChip = document.createElement('div');\n this._targetChip.className = 'iox-drop-target-chip';\n this._targetChip.style.cssText = [\n 'position:absolute', 'left:0', 'top:-18px', 'max-width:100%', 'overflow:hidden',\n 'white-space:nowrap', 'text-overflow:ellipsis', 'padding:1px 6px',\n 'border-radius:4px 4px 0 0', 'background:#6366f1', 'color:#fff',\n 'font:500 10px/1.5 system-ui,sans-serif', 'pointer-events:none',\n ].join(';');\n this._targetOverlay.appendChild(this._targetChip);\n document.body.appendChild(this._targetOverlay);\n }\n this._updateTargetChip(targetId, el);\n\n const rect = el.getBoundingClientRect();\n this._targetOverlay.style.cssText = [\n 'position:fixed',\n `left:${rect.left}px`,\n `top:${rect.top}px`,\n `width:${rect.width}px`,\n `height:${rect.height}px`,\n 'pointer-events:none',\n 'z-index:9998',\n 'box-sizing:border-box',\n ].join(';');\n }\n\n private _removeTargetOverlay(): void {\n this._targetOverlay?.remove();\n this._targetOverlay = null;\n this._targetChip = null;\n }\n\n /** Name the drop target and the slot: \"into Card grid · position 2 of 4\". */\n private _updateTargetChip(targetId: string, el: HTMLElement): void {\n if (!this._targetChip) return;\n const name = this.overlayService.findNodeByElement(el)?.node;\n const childCount = this.getData(targetId)?.length ?? 0;\n const index = this._indicatorContainerId === targetId && this._indicatorIndex >= 0\n ? this._indicatorIndex : childCount;\n this._targetChip.textContent = dropTargetLabel(name?.label || name?.type, index, childCount);\n }\n\n private _isRootContainer(id: string): boolean {\n const el = this._getEl(id);\n if (!el) return false;\n let parent = el.parentElement;\n while (parent) {\n if (parent.id === 'canvas-preview') return true;\n if (parent.id && this.ids.includes(parent.id)) return false;\n parent = parent.parentElement;\n }\n return false;\n }\n\n /**\n * Returns true if the dropzone with `childId` is a DOM descendant of the\n * dropzone with `parentId`. Used to decide whether the cursor was already\n * \"inside\" a root section before triggering root-escape.\n */\n private _isDescendantDropzone(childId: string | null, parentId: string): boolean {\n if (!childId) return false;\n const childEl = this._getEl(childId);\n const parentEl = this._getEl(parentId);\n if (!childEl || !parentEl) return false;\n return parentEl.contains(childEl);\n }\n\n // ─────────────────────────────────────────────────────────\n // Insertion indicator (animates open so siblings shift smoothly)\n // ─────────────────────────────────────────────────────────\n\n private _updateIndicator(): void {\n const targetId = this._deepTargetId ?? 'canvas-preview';\n document.body.classList.add('iox-drag-has-indicator');\n const idx = this.calcInsertIndex(targetId);\n if (idx !== this._indicatorIndex || targetId !== this._indicatorContainerId) {\n this._indicatorIndex = idx;\n this._positionIndicator(targetId, idx);\n const el = this._getEl(targetId);\n if (el) this._updateTargetChip(targetId, el);\n }\n }\n\n private _positionIndicator(containerId: string, index: number): void {\n const container = this._getEl(containerId);\n if (!container) return;\n\n const cs = window.getComputedStyle(container);\n const isRow =\n (cs.display === 'flex' || cs.display === 'inline-flex') &&\n (!cs.flexDirection || cs.flexDirection === 'row' || cs.flexDirection === 'row-reverse');\n\n const containerChanged = this._indicatorContainerId !== containerId;\n\n if (containerChanged) {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicator?.remove();\n this._indicator = null;\n }\n\n const needsCreate = !this._indicator;\n if (needsCreate) {\n this._indicator = document.createElement('div');\n this._indicator.className = 'iox-insert-indicator';\n\n if (isRow) {\n // Start at width:0 with align-self:stretch so it spans the full\n // container height once visible. overflow:hidden keeps it invisible\n // at width:0 — no painted pixels, no phantom height like min-height\n // would cause. Animates width 0→3px on first appearance.\n this._indicator.style.cssText =\n 'flex-shrink:0;width:0;align-self:stretch;' +\n 'background:#6366f1;border-radius:2px;pointer-events:none;margin:0;' +\n `transition:width 140ms ${MOTION_EASE},margin 140ms ${MOTION_EASE};overflow:hidden;`;\n } else {\n this._indicator.style.cssText =\n 'height:0;width:100%;background:#6366f1;border-radius:2px;' +\n 'pointer-events:none;margin:0;display:block;' +\n `transition:height 140ms ${MOTION_EASE},margin 140ms ${MOTION_EASE};overflow:hidden;`;\n }\n }\n\n this._indicatorContainerId = containerId;\n\n const skipClasses = [\n 'section-placeholder', 'container-placeholder', 'repeater-placeholder',\n 'repeater-badge', 'repeater-preview-row', 'iox-insert-indicator',\n 'iox-drag-active-source',\n ];\n const children = Array.from(container.children).filter(\n el => !skipClasses.some(cls => el.classList.contains(cls))\n );\n\n // ── FLIP: snapshot sibling rects BEFORE DOM change (reposition case only) ──\n let beforeRects: Map<Element, DOMRect> | null = null;\n if (!needsCreate) {\n beforeRects = new Map<Element, DOMRect>();\n Array.from(container.children).forEach(child => {\n if (child !== this._indicator) {\n beforeRects!.set(child, child.getBoundingClientRect());\n }\n });\n }\n\n // Reposition indicator in DOM.\n if (!this._indicator) return;\n if (index >= children.length) {\n container.appendChild(this._indicator);\n } else {\n container.insertBefore(this._indicator, children[index]);\n }\n\n // ── FLIP: animate siblings from their old positions to their new positions ──\n if (beforeRects) {\n Array.from(container.children).forEach(child => {\n const before = beforeRects!.get(child);\n if (!before) return;\n const after = child.getBoundingClientRect();\n const dx = before.left - after.left;\n const dy = before.top - after.top;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n\n const el = child as HTMLElement;\n this._flipEls.add(el);\n // Invert: snap element back to where it was, then animate to new pos.\n el.style.transition = 'none';\n el.style.transform = `translate(${dx}px,${dy}px)`;\n requestAnimationFrame(() => {\n el.style.transition = `transform 140ms ${MOTION_EASE}`;\n el.style.transform = '';\n });\n });\n }\n\n // Animate indicator open (first appearance in this container only).\n if (needsCreate) {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicatorRaf = requestAnimationFrame(() => {\n if (!this._indicator) return;\n if (isRow) {\n this._indicator.style.width = '3px';\n this._indicator.style.margin = '0 3px';\n } else {\n this._indicator.style.height = '4px';\n this._indicator.style.margin = '3px 0';\n }\n });\n }\n }\n\n private _removeIndicator(): void {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicator?.remove();\n this._indicator = null;\n this._indicatorContainerId = null;\n this._indicatorIndex = -1;\n }\n\n // ─────────────────────────────────────────────────────────\n // calcInsertIndex\n // ─────────────────────────────────────────────────────────\n\n calcInsertIndex(containerId: string): number {\n const container = this._getEl(containerId);\n if (!container) return 0;\n\n const skipClasses = [\n 'section-placeholder', 'container-placeholder', 'repeater-placeholder',\n 'repeater-badge', 'repeater-preview-row', 'iox-insert-indicator',\n 'iox-drag-active-source',\n ];\n const children = Array.from(container.children).filter(\n el => !skipClasses.some(cls => el.classList.contains(cls))\n );\n if (!children.length) return 0;\n\n const cs = window.getComputedStyle(container);\n const isHorizontal =\n (cs.display === 'flex' || cs.display === 'inline-flex') &&\n (!cs.flexDirection || cs.flexDirection === 'row' || cs.flexDirection === 'row-reverse');\n\n for (let i = 0; i < children.length; i++) {\n const rect = children[i].getBoundingClientRect();\n if (isHorizontal) {\n if (this._lastPointerX < rect.left + rect.width / 2) return i;\n } else {\n if (this._lastPointerY < rect.top + rect.height / 2) return i;\n }\n }\n return children.length;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { IoxDataSource } from '../models/component.model';\n\n/**\n * Page-scoped registry that holds the current page's data sources.\n * Scoped to PageUiComponent.providers[] so every builder service\n * (BindingsComponent, BuilderRepeaterComponent) shares the same instance.\n *\n * Seeded by PageUiComponent.loadPage() from saved page data, then kept\n * up to date by BindingsComponent whenever the user adds/removes a source.\n */\n@Injectable()\nexport class DataSourceRegistryService {\n private _ds$ = new BehaviorSubject<IoxDataSource[]>([]);\n\n readonly dataSources$ = this._ds$.asObservable();\n\n setDataSources(ds: IoxDataSource[]): void {\n this._ds$.next(ds);\n }\n\n getDataSources(): IoxDataSource[] {\n return this._ds$.value;\n }\n\n findByAlias(alias: string): IoxDataSource | undefined {\n return this._ds$.value.find(ds => ds.alias === alias);\n }\n\n getAliasOptions(): { label: string; value: string }[] {\n return this._ds$.value.map(ds => ({ label: ds.alias, value: ds.alias }));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Breakpoint, breakpointDef, breakpointForWidth } from '@vectoriox/iox-ui';\n\nimport { BREAKPOINT_PRESENTATION } from '../panels/panel.model';\n\nexport interface ViewportState {\n /**\n * The breakpoint being edited — ALWAYS the one the canvas width falls in (derived, never set\n * independently), so the editing scope can't disagree with what the canvas is showing.\n */\n breakpoint: Breakpoint;\n /** Real canvas width in CSS pixels (e.g., 1440 for desktop). */\n width: number;\n /** Real canvas height in CSS pixels (e.g., 900 for desktop). Simulates the browser viewport. */\n height: number;\n /** Visual scale factor (0–1+). Canvas is rendered at `width × height` then scaled. */\n scale: number;\n}\n\nconst STORAGE_KEY = 'iox_builder_viewport';\nconst DEFAULT_WIDTH = breakpointDef(Breakpoint.Base)!.previewWidth;\n\n@Injectable()\nexport class ViewportService {\n private state: ViewportState = this.loadFromStorage();\n\n private stateSubject = new BehaviorSubject<ViewportState>(this.state);\n public state$ = this.stateSubject.asObservable();\n\n getState(): ViewportState {\n return this.state;\n }\n\n getScale(): number {\n return this.state.scale;\n }\n\n /** Show (and edit) `bp`: the canvas takes that breakpoint's preview width and height. */\n setBreakpoint(bp: Breakpoint): void {\n const def = breakpointDef(bp);\n if (!def) return;\n this.update({ width: def.previewWidth, height: BREAKPOINT_PRESENTATION[bp].previewHeight });\n }\n\n setScale(scale: number): void {\n this.update({ scale: Math.max(0.1, Math.min(2, scale)) });\n }\n\n /** Any canvas width — the breakpoint follows from it. */\n setWidth(width: number): void {\n this.update({ width });\n }\n\n /**\n * Calculate the scale that makes the canvas fit inside the available editor width.\n * @param availableWidth The pixel width of the editor area that holds the canvas.\n * @param padding Optional horizontal padding to subtract (default 40px total).\n */\n fitToWidth(availableWidth: number, padding = 40): void {\n const usable = availableWidth - padding;\n if (usable <= 0) return;\n const scale = Math.min(1, usable / this.state.width);\n this.setScale(scale);\n }\n\n /**\n * Calculate the scale that makes the canvas fit both the available width AND height.\n * Uses the smaller of the two scale factors so the entire viewport frame is visible.\n * @param containerWidth Available container width in screen pixels.\n * @param containerHeight Available container height in screen pixels.\n * @param padding Total padding to subtract from both dimensions (default 40px).\n */\n fitToSize(containerWidth: number, containerHeight: number, padding = 40): void {\n const usableW = containerWidth - padding;\n const usableH = containerHeight - padding;\n if (usableW <= 0 || usableH <= 0) return;\n const scaleX = usableW / this.state.width;\n const scaleY = usableH / this.state.height;\n this.setScale(Math.min(1, scaleX, scaleY));\n }\n\n /**\n * Convert a screen-space coordinate to canvas-space (unscaled).\n * Call this when translating pointer events into canvas-relative positions.\n */\n screenToCanvas(screenX: number, screenY: number, canvasRect: DOMRect): { x: number; y: number } {\n return {\n x: (screenX - canvasRect.left) / this.state.scale,\n y: (screenY - canvasRect.top) / this.state.scale,\n };\n }\n\n private update(partial: Partial<Omit<ViewportState, 'breakpoint'>>): void {\n const next = { ...this.state, ...partial };\n this.state = { ...next, breakpoint: breakpointForWidth(next.width) };\n this.stateSubject.next(this.state);\n this.saveToStorage();\n }\n\n private saveToStorage(): void {\n try {\n const { width, height, scale } = this.state;\n localStorage.setItem(STORAGE_KEY, JSON.stringify({ width, height, scale }));\n } catch {}\n }\n\n /**\n * Restores width / height / scale. Older builds also saved a `device` ('desktop' | 'tablet' |\n * 'mobile'); it is ignored — the saved width (1440 / 768 / 375) already resolves to the\n * matching breakpoint (Base / Tablet / Small), so old preferences carry over unchanged.\n */\n private loadFromStorage(): ViewportState {\n const defaults: ViewportState = {\n breakpoint: breakpointForWidth(DEFAULT_WIDTH),\n width: DEFAULT_WIDTH,\n height: BREAKPOINT_PRESENTATION[Breakpoint.Base].previewHeight,\n scale: 0.75,\n };\n try {\n const raw = localStorage.getItem(STORAGE_KEY);\n if (!raw) return defaults;\n const saved = JSON.parse(raw);\n const width = typeof saved.width === 'number' && saved.width > 0 ? saved.width : defaults.width;\n const breakpoint = breakpointForWidth(width);\n return {\n breakpoint,\n width,\n height: typeof saved.height === 'number' && saved.height > 0\n ? saved.height : BREAKPOINT_PRESENTATION[breakpoint].previewHeight,\n scale: typeof saved.scale === 'number' ? Math.max(0.1, Math.min(2, saved.scale)) : defaults.scale,\n };\n } catch {\n return defaults;\n }\n }\n}\n","// Re-exported from the shared iox-ui package so iox-builder consumers\n// don't need to import from two different packages.\nexport { ComponentInstanceRegistryService } from '@vectoriox/iox-ui';\n","import { Injectable, NgZone, inject } from '@angular/core';\n\nimport {\n ComponentNode,\n InteractionAction,\n InteractionTrigger,\n IoxInteraction,\n} from '../models/component.model';\nimport { OverlayService } from '../overlay/overlay.service';\nimport { ComponentInstanceRegistryService } from './component-instance-registry.service';\nimport { ContextStore, contextActionEffect, isActionEnabled, isContextAction, resolveContextValue } from '@vectoriox/iox-ui';\n\ninterface AttachedInteraction {\n node: ComponentNode;\n interaction: IoxInteraction;\n cleanup: () => void;\n}\n\n/**\n * Wires ComponentNode interactions to live DOM elements via the\n * OverlayService node-element registry.\n *\n * Call `attach(node)` after the node is rendered and registered.\n * Call `detach(node)` on destroy to tear down listeners/observers.\n */\n@Injectable()\nexport class InteractionEngineService {\n private attached = new Map<ComponentNode, AttachedInteraction[]>();\n\n /** Shared with the SSR engine — one store type, one set of semantics. */\n private contextStore = inject(ContextStore);\n /** Resolved data for the canvas, so a row marker (source + index) resolves back to its item. */\n private contextData: Record<string, any> = {};\n\n /** Elements that have had pre-state applied (hidden by attach). */\n private preStatedElements = new Set<HTMLElement>();\n\n /**\n * Toggle state for click interactions with reverseActions.\n * false = next click runs actions (primary); true = next click runs reverseActions.\n */\n private toggleStates = new Map<string, boolean>();\n\n /**\n * Pre-states queued for elements that weren't registered yet when the owner\n * node's attach() ran. Keyed by target node ID. Consumed when the target\n * element's own attach() fires.\n */\n private pendingPreStates = new Map<string, InteractionAction[]>();\n\n /** Action types that animate an element from hidden → visible. */\n private readonly ENTRANCE_TYPES = new Set([\n 'fadeIn', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'scaleIn', 'show',\n ]);\n\n /** Action types that animate an element from visible → hidden. */\n private readonly EXIT_TYPES = new Set(['fadeOut', 'scaleOut', 'hide']);\n\n private readonly SWIPER_ACTIONS = new Set([\n 'swiperNext', 'swiperPrev', 'swiperGoToSlide',\n 'swiperAutoplayStart', 'swiperAutoplayStop', 'swiperAutoplayPause',\n ]);\n\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n private ngZone = inject(NgZone);\n\n constructor(private overlayService: OverlayService) {}\n\n /**\n * Run all DOM-manipulation operations (pre-state, observers, animations)\n * outside the Angular zone so Zone.js does not schedule unnecessary CD ticks\n * for each RAF/IntersectionObserver/animation callback.\n * The caller is responsible for calling markForCheck() / refreshSelect() inside\n * the zone after this returns.\n */\n private runOutside<T>(fn: () => T): T {\n return this.ngZone.runOutsideAngular(fn);\n }\n\n /** Wire all interactions for a node to its rendered DOM element. */\n attach(node: ComponentNode): void { this.runOutside(() => this._attach(node)); }\n /** Attach interactions to a node whose element is NOT overlay-registered — e.g. repeater/slider\n * PREVIEW CLONES, which are non-selectable but must still animate (parity with the SSR runtime,\n * which animates every repeated row). See RenderDirective. */\n attachTo(node: ComponentNode, element: HTMLElement): void { this.runOutside(() => this._attach(node, element)); }\n private _attach(node: ComponentNode, elementOverride?: HTMLElement): void {\n const element = elementOverride ?? this.overlayService.getNodeRef(node)?.element;\n if (!element) return;\n\n const inBuilder = this.isBuilderMode();\n\n // Apply any pre-states queued for THIS element by earlier-registered nodes.\n // Pending entries are only added when appropriate (see loop below), so always consume.\n if (node.id) {\n const pending = this.pendingPreStates.get(node.id);\n if (pending) {\n for (const action of pending) {\n this.applyPreState(element, action);\n }\n this.pendingPreStates.delete(node.id);\n }\n }\n\n if (!node.interactions?.length) return;\n\n const cleanups: AttachedInteraction[] = [];\n\n for (const ix of node.interactions) {\n // Pre-state: hide target elements before their entrance animation fires so\n // the user sees a real hidden→visible animation on the canvas. Every trigger\n // now runs live in the builder (see attachInteraction), so pre-state is applied\n // for all of them EXCEPT scrollProgress — that trigger is unimplemented (no-op),\n // so pre-stating it would leave the element stuck at opacity:0 forever.\n const skipPreState = inBuilder && ix.trigger === 'scrollProgress';\n if (!skipPreState) {\n for (const action of ix.actions) {\n // A disabled action must not pre-state: it would hide the element with nothing\n // left to reveal it.\n if (!isActionEnabled(action)) continue;\n if (this.ENTRANCE_TYPES.has(action.type)) {\n const target = this.resolveTarget(node, action, element);\n if (target) {\n this.applyPreState(target, action);\n } else if (action.target && action.target !== 'self') {\n const list = this.pendingPreStates.get(action.target) ?? [];\n list.push(action);\n this.pendingPreStates.set(action.target, list);\n }\n }\n }\n }\n\n const cleanup = this.attachInteraction(node, ix, element);\n cleanups.push({ node, interaction: ix, cleanup });\n }\n\n this.attached.set(node, cleanups);\n }\n\n /** Tear down all interaction listeners for a node and reset its animated state. */\n detach(node: ComponentNode): void { this.runOutside(() => this._detach(node)); }\n private _detach(node: ComponentNode): void {\n const entries = this.attached.get(node);\n if (!entries) return;\n for (const entry of entries) {\n entry.cleanup();\n }\n this.attached.delete(node);\n\n // Reset toggle state so re-attach starts from the primary actions.\n for (const entry of entries) {\n if (entry.interaction.reverseActions?.length) {\n this.toggleStates.delete(entry.interaction.id);\n }\n }\n\n // Cancel Web Animations and strip any inline pre-state styles that\n // were applied by applyPreState() so the element returns to its natural CSS state.\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n ref.element.getAnimations().forEach(a => a.cancel());\n this.clearInlineAnimationStyles(ref.element);\n }\n\n // Also clean up pre-state on any target elements this node was animating.\n if (node.interactions) {\n for (const ix of node.interactions) {\n for (const action of ix.actions) {\n // Remove any pending pre-states for unregistered targets.\n if (action.target && action.target !== 'self') {\n const pending = this.pendingPreStates.get(action.target);\n if (pending) {\n const filtered = pending.filter(a => a !== action);\n if (filtered.length) {\n this.pendingPreStates.set(action.target, filtered);\n } else {\n this.pendingPreStates.delete(action.target);\n }\n }\n }\n // Clean up inline styles on already-registered target elements.\n const target = this.resolveTarget(node, action);\n if (target && this.preStatedElements.has(target)) {\n target.getAnimations().forEach(a => a.cancel());\n this.clearInlineAnimationStyles(target);\n this.preStatedElements.delete(target);\n }\n }\n }\n }\n }\n\n /** Re-attach interactions after they have been edited in the panel. */\n refresh(node: ComponentNode): void {\n this.runOutside(() => { this._detach(node); this._attach(node); });\n }\n\n /**\n * Replay all interactions on a node immediately, regardless of their trigger.\n * Used by the builder overlay play button for in-editor animation preview.\n * Uses fill:'none' so the element returns to its natural state after the preview.\n */\n replay(node: ComponentNode): void { this.runOutside(() => this._replay(node)); }\n private _replay(node: ComponentNode): void {\n if (!node.interactions?.length) return;\n\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n ref.element.getAnimations().forEach(a => a.cancel());\n // Clear any leftover inline styles so the pre-state applies cleanly.\n this.clearInlineAnimationStyles(ref.element);\n }\n\n // In builder mode pre-state is never applied on attach, so apply it now\n // to give an accurate hidden→visible preview. It is cleaned up via\n // executeAction's anim.finished handler once the animation completes.\n for (const ix of node.interactions) {\n for (const action of ix.actions) {\n if (this.ENTRANCE_TYPES.has(action.type)) {\n const target = this.resolveTarget(node, action);\n if (target) this.applyPreState(target, action);\n }\n }\n }\n\n for (const ix of node.interactions) {\n this.runActions(node, ix.actions);\n }\n }\n\n /**\n * Fire all interactions on the given node that match the specified trigger.\n * Used by Swiper (and future components) to dispatch their events into the\n * interaction engine without coupling to the engine's attach/detach lifecycle.\n */\n replayTrigger(nodeId: string, trigger: InteractionTrigger): void { this.runOutside(() => this._replayTrigger(nodeId, trigger)); }\n private _replayTrigger(nodeId: string, trigger: InteractionTrigger): void {\n for (const [node] of this.attached) {\n if (node.id !== nodeId) continue;\n for (const ix of (node.interactions ?? [])) {\n if (ix.trigger === trigger) {\n this.runActions(node, ix.actions);\n }\n }\n return;\n }\n }\n\n // ── Private ──────────────────────────────────────────────\n\n private attachInteraction(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n // All triggers run live in the builder canvas so the user sees the real\n // animation (pageLoad on attach, viewportEnter on scroll-into-view, click/hover).\n // The former NG0103 crash was caused by (a) Swiper's ResizeObserver created inside\n // the Angular zone — fixed in SliderContainerComponent via runOutsideAngular — and\n // (b) the overlay's Resize/MutationObservers synchronously re-dirtying the view\n // during synchronize() — fixed by coalescing overlay updates through a RAF.\n // scrollProgress is still unimplemented and returns a no-op below.\n switch (ix.trigger) {\n case 'pageLoad':\n return this.attachPageLoad(node, ix, element);\n case 'pageEnter':\n // In the builder canvas there is no navigation, so preview a page-enter the same\n // way as page-load (pre-stated hidden → animate in). In production the SSR engine\n // fires it only after the page transition completes (ClientInteractionService).\n return this.attachPageLoad(node, ix, element);\n case 'pageLeave':\n // Exit choreography that plays on navigate-away. There is no navigation in the\n // builder, so it does not auto-fire (element stays visible) — the overlay play\n // button previews it via replay(). In production the orchestrator awaits it.\n return () => {};\n case 'viewportEnter':\n return this.attachViewportEnter(node, ix, element);\n case 'click':\n return this.attachClick(node, ix, element);\n case 'hover':\n return this.attachHover(node, ix, element);\n case 'scrollProgress':\n // Scroll-progress is complex — deferred.\n return () => {};\n default:\n return () => {};\n }\n }\n\n // ── Triggers ─────────────────────────────────────────────\n\n private attachPageLoad(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const timer = setTimeout(() => {\n if (this.hasPreStatedAncestor(element)) {\n this.deferUntilVisible(element, () => this.runActions(node, ix.actions, element));\n } else {\n this.runActions(node, ix.actions, element);\n }\n }, 50);\n return () => clearTimeout(timer);\n }\n\n private attachViewportEnter(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const firedSet = new Set<string>();\n\n const fire = () => {\n const key = ix.id;\n if (ix.actions.some(a => a.once) && firedSet.has(key)) return;\n if (this.hasPreStatedAncestor(element)) {\n this.deferUntilVisible(element, () => {\n if (ix.actions.some(a => a.once) && firedSet.has(key)) return;\n firedSet.add(key);\n this.runActions(node, ix.actions, element);\n });\n return;\n }\n firedSet.add(key);\n this.runActions(node, ix.actions, element);\n };\n\n // IntersectionObserver with no root uses the browser viewport.\n // It respects overflow:hidden clipping from .preview-scroll so it fires\n // correctly as Lenis scrolls (Lenis changes scrollTop on .preview-scroll).\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) { cleanup(); fire(); }\n }\n }, { threshold: 0.1 });\n observer.observe(element);\n\n // Builder: also listen to Lenis scroll events on .preview-lenis-content\n // as a fallback in case IntersectionObserver misses elements behind a\n // CSS transform (scale) on iox-page-component.\n const lenisEl = this.overlayService.getScrollContainer();\n let scrollFired = false;\n const onScroll = () => {\n if (scrollFired) return;\n const rootEl = this.overlayService.getIntersectionRoot();\n if (!rootEl) return;\n const rootRect = rootEl.getBoundingClientRect();\n const elRect = element.getBoundingClientRect();\n const overlapH = Math.min(elRect.bottom, rootRect.bottom) - Math.max(elRect.top, rootRect.top);\n const elH = elRect.bottom - elRect.top;\n if (elH > 0 && overlapH / elH >= 0.1) { scrollFired = true; cleanup(); fire(); }\n };\n if (lenisEl) lenisEl.addEventListener('scroll', onScroll, { passive: true });\n\n const cleanup = () => {\n observer.disconnect();\n scrollFired = true;\n if (lenisEl) lenisEl.removeEventListener('scroll', onScroll);\n };\n return cleanup;\n }\n\n private isBuilderMode(): boolean {\n return document.body.classList.contains('builder-active');\n }\n\n /** Returns true if any DOM ancestor of element is currently faded out via pre-state. */\n private hasPreStatedAncestor(element: HTMLElement): boolean {\n let el = element.parentElement;\n while (el && el !== document.body) {\n if (this.preStatedElements.has(el)) return true;\n el = el.parentElement;\n }\n return false;\n }\n\n /** Polls via RAF until no ancestor is in pre-state, then fires callback. */\n private deferUntilVisible(element: HTMLElement, callback: () => void): void {\n const poll = () => {\n if (!this.hasPreStatedAncestor(element)) {\n callback();\n } else {\n requestAnimationFrame(poll);\n }\n };\n requestAnimationFrame(poll);\n }\n\n private attachClick(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const handler = () => {\n if (ix.reverseActions?.length) {\n // Toggle: alternate between primary and reverse actions on each click.\n const isToggled = this.toggleStates.get(ix.id) ?? false;\n this.runActions(node, isToggled ? ix.reverseActions : ix.actions, element);\n this.toggleStates.set(ix.id, !isToggled);\n } else {\n this.runActions(node, ix.actions, element);\n }\n };\n element.addEventListener('click', handler);\n return () => element.removeEventListener('click', handler);\n }\n\n private attachHover(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const enterHandler = () => this.runActions(node, ix.actions, element);\n const leaveHandler = () => {\n // Reverse animations on leave for hover triggers\n for (const action of ix.actions) {\n if (!isActionEnabled(action)) continue;\n // Context actions have no \"backwards\" — the shared table decides what leave does\n // (clear, unless the action sets noReverse). Same call the SSR engine makes.\n if (isContextAction(action)) {\n this.applyContextAction(action, element, 'reverse');\n continue;\n }\n const target = this.resolveTarget(node, action, element);\n if (!target) continue;\n this.reverseAction(target, action);\n }\n };\n element.addEventListener('mouseenter', enterHandler);\n element.addEventListener('mouseleave', leaveHandler);\n return () => {\n element.removeEventListener('mouseenter', enterHandler);\n element.removeEventListener('mouseleave', leaveHandler);\n };\n }\n\n // ── Actions ──────────────────────────────────────────────\n\n private runActions(node: ComponentNode, actions: InteractionAction[], selfEl?: HTMLElement | null): void {\n for (const action of actions) {\n if (!isActionEnabled(action)) continue; // switched off by the author\n if (this.SWIPER_ACTIONS.has(action.type)) {\n this.executeSwiperAction(action);\n continue;\n }\n // Context actions write STATE, not animation. `selfEl` is deliberate: $item is read by\n // walking up from the element actually hovered/clicked, which for a repeater PREVIEW ROW\n // is the clone — so each row publishes its own item, exactly as on the live site.\n if (isContextAction(action)) {\n this.applyContextAction(action, selfEl ?? null, 'forward');\n continue;\n }\n // selfEl lets 'self'-targeted actions resolve for preview CLONES, which aren't\n // overlay-registered (getNodeRef would return undefined) — see attachTo. (issue #2)\n const target = this.resolveTarget(node, action, selfEl);\n if (!target) continue;\n this.executeAction(target, action);\n }\n }\n\n /**\n * Execute a context action against the shared store. The forward/reverse semantics come from\n * `contextActionEffect` in @vectoriox/iox-ui — the same function the SSR engine calls, so the\n * builder canvas and the live site behave identically.\n */\n private applyContextAction(action: InteractionAction, el: HTMLElement | null, pass: 'forward' | 'reverse'): void {\n const effect = contextActionEffect(action as any, pass);\n if (!effect) return;\n if (effect.op === 'clear') {\n this.contextStore.clear(effect.slot);\n return;\n }\n const value = resolveContextValue(effect.value, {\n item: this.rowItemFor(el),\n resolvedData: this.contextData,\n });\n this.contextStore.set(effect.slot, value);\n }\n\n /** The repeater item this element belongs to — the nearest marked row ancestor. */\n private rowItemFor(el: HTMLElement | null): unknown {\n const row = el?.closest?.('[data-iox-row-idx]') as HTMLElement | null;\n if (!row) return undefined;\n const source = row.getAttribute('data-iox-row-src') ?? '';\n const index = Number(row.getAttribute('data-iox-row-idx'));\n const items = this.contextData?.[source];\n return Array.isArray(items) && Number.isInteger(index) ? items[index] : undefined;\n }\n\n /** Resolved data for the canvas, kept current by the repeater as it fetches. */\n setContextData(data: Record<string, any>): void {\n // MERGE, not replace — a page can hold several repeaters, each publishing its own source.\n this.contextData = { ...this.contextData, ...(data ?? {}) };\n }\n\n private executeSwiperAction(action: InteractionAction): void {\n // Target is the nodeId of the SliderContainer to control.\n const swiper = this.instanceRegistry.get(action.target) as any;\n if (!swiper) return;\n switch (action.type) {\n case 'swiperNext': swiper.slideNext(); break;\n case 'swiperPrev': swiper.slidePrev(); break;\n case 'swiperGoToSlide': swiper.slideTo(action.params?.['index'] ?? 0); break;\n case 'swiperAutoplayStart': swiper.autoplay?.start(); break;\n case 'swiperAutoplayStop': swiper.autoplay?.stop(); break;\n case 'swiperAutoplayPause': swiper.autoplay?.pause(); break;\n }\n }\n\n private resolveTarget(ownerNode: ComponentNode, action: InteractionAction, selfEl?: HTMLElement | null): HTMLElement | null {\n if (action.target === 'self' || !action.target) {\n return selfEl ?? this.overlayService.getNodeRef(ownerNode)?.element ?? null;\n }\n // Find by node ID\n for (const [n, ref] of this.overlayService.getAllNodeEntries()) {\n if (n.id === action.target) return ref.element;\n }\n return null;\n }\n\n private executeAction(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n\n // 'both' = backwards (holds first keyframe during delay) + forwards (holds last keyframe after end).\n const anim = element.animate(keyframes, {\n duration: action.duration,\n delay: action.delay,\n easing: action.easing,\n fill: 'both',\n });\n\n if (this.ENTRANCE_TYPES.has(action.type)) {\n anim.finished.then(() => {\n element.style.removeProperty('pointer-events');\n element.removeAttribute('data-iox-hidden');\n this.preStatedElements.delete(element);\n // Builder: clear inline pre-state so cancelling animations later\n // doesn't leave the element invisible after a play preview.\n if (this.isBuilderMode()) this.clearInlineAnimationStyles(element);\n }).catch(() => {});\n } else if (this.EXIT_TYPES.has(action.type)) {\n // Once the exit animation finishes the element is invisible —\n // disable pointer events so it doesn't silently block clicks underneath it.\n anim.finished.then(() => {\n element.style.setProperty('pointer-events', 'none');\n }).catch(() => {});\n }\n }\n\n /**\n * Freeze an element at the animation's starting frame immediately, before any\n * trigger fires. Called for ALL entrance-type actions regardless of trigger so\n * that a click-triggered fadeIn on a menu overlay also starts it hidden.\n *\n * In builder mode only opacity:0 is applied — transforms on canvas elements\n * inside iox-page-component's scale() transform break Lenis scroll. The transform\n * jump at animation t=0 is invisible because the element is already opacity:0.\n * In production the full keyframe is applied + pointer-events:none.\n */\n private applyPreState(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n const first = keyframes[0] as Record<string, string>;\n if (this.isBuilderMode()) {\n // No transforms — inline transforms on children inside iox-page-component's\n // scale() break Lenis scroll. pointer-events:none lets wheel events and\n // hover fall through to visible elements underneath.\n element.style.setProperty('opacity', '0');\n element.style.setProperty('pointer-events', 'none');\n } else {\n for (const [prop, val] of Object.entries(first)) {\n (element.style as any)[prop] = String(val);\n }\n element.style.setProperty('pointer-events', 'none');\n }\n element.setAttribute('data-iox-hidden', '');\n this.preStatedElements.add(element);\n }\n\n private clearInlineAnimationStyles(element: HTMLElement): void {\n element.style.removeProperty('opacity');\n element.style.removeProperty('transform');\n element.style.removeProperty('visibility');\n element.style.removeProperty('pointer-events');\n element.removeAttribute('data-iox-hidden');\n }\n\n private reverseAction(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n\n // Reverse: play the keyframes backwards\n element.animate([...keyframes].reverse(), {\n duration: action.duration,\n easing: action.easing,\n fill: 'forwards',\n });\n }\n\n private buildAnimation(action: InteractionAction): { keyframes: Keyframe[]; options: KeyframeAnimationOptions } {\n const dist = action.params?.['distance'] ?? 20;\n let keyframes: Keyframe[] = [];\n\n switch (action.type) {\n case 'fadeIn':\n keyframes = [{ opacity: 0 }, { opacity: 1 }];\n break;\n case 'fadeOut':\n keyframes = [{ opacity: 1 }, { opacity: 0 }];\n break;\n case 'moveUp':\n keyframes = [{ transform: `translateY(${dist}px)`, opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }];\n break;\n case 'moveDown':\n keyframes = [{ transform: `translateY(-${dist}px)`, opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }];\n break;\n case 'moveLeft':\n keyframes = [{ transform: `translateX(${dist}px)`, opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }];\n break;\n case 'moveRight':\n keyframes = [{ transform: `translateX(-${dist}px)`, opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }];\n break;\n case 'scaleIn':\n keyframes = [{ transform: 'scale(0.8)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }];\n break;\n case 'scaleOut':\n keyframes = [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }];\n break;\n case 'rotate':\n const deg = action.params?.['degrees'] ?? 360;\n keyframes = [{ transform: `rotate(0deg)` }, { transform: `rotate(${deg}deg)` }];\n break;\n case 'show':\n keyframes = [{ opacity: 0, visibility: 'hidden' }, { opacity: 1, visibility: 'visible' }];\n break;\n case 'hide':\n keyframes = [{ opacity: 1, visibility: 'visible' }, { opacity: 0, visibility: 'hidden' }];\n break;\n case 'toggleVisibility':\n // Toggle is stateful — handled separately via element style\n keyframes = [{ opacity: 0 }, { opacity: 1 }];\n break;\n }\n\n return {\n keyframes,\n options: {\n duration: action.duration,\n delay: action.delay,\n easing: action.easing,\n fill: 'forwards',\n },\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { InteractionPreset } from '../models/component.model';\n\n/**\n * InteractionPresetRegistryService — in-memory store for org-level interaction presets.\n *\n * Loaded once per page by PageUiComponent alongside the page layout.\n * Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.\n */\n@Injectable()\nexport class InteractionPresetRegistryService {\n private presets = new Map<string, InteractionPreset>();\n\n setPresets(presets: InteractionPreset[]): void {\n this.presets.clear();\n for (const p of presets) {\n this.presets.set(p.id, p);\n }\n }\n\n getPreset(id: string): InteractionPreset | undefined {\n return this.presets.get(id);\n }\n\n getAll(): InteractionPreset[] {\n return Array.from(this.presets.values());\n }\n\n upsert(preset: InteractionPreset): void {\n this.presets.set(preset.id, preset);\n }\n\n remove(id: string): void {\n this.presets.delete(id);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\nexport interface BuilderClipboard {\n node?: ComponentNode;\n presetId?: string;\n interactionPresetId?: string;\n}\n\n/**\n * BuilderClipboardService — in-memory typed clipboard for the page builder.\n *\n * Stores element copies, style preset references, and interaction preset references.\n * Lives in memory only — no navigator.clipboard usage.\n * Scoped to PageUiComponent.providers[] — one clipboard per builder instance.\n */\n@Injectable()\nexport class BuilderClipboardService {\n private _clip: BuilderClipboard = {};\n\n copyNode(node: ComponentNode): void {\n this._clip = { node: JSON.parse(JSON.stringify(node)) };\n }\n\n copyPreset(presetId: string): void {\n this._clip = { ...this._clip, presetId };\n }\n\n copyInteractionPreset(interactionPresetId: string): void {\n this._clip = { ...this._clip, interactionPresetId };\n }\n\n getNode(): ComponentNode | undefined { return this._clip.node; }\n getPresetId(): string | undefined { return this._clip.presetId; }\n getInteractionPresetId(): string | undefined { return this._clip.interactionPresetId; }\n\n clear(): void { this._clip = {}; }\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ElementState, STRUCTURAL_STATES, RELATIONAL_STATES, RELATIONAL_STATE_BASE, TARGETED_STATES, TARGETED_STATE_BASE } from '../models/component.model';\nimport {\n BREAKPOINTS, BreakpointQueryKind, buildTargetedStateSelector, compileDeclarations, DeclarationContext,\n OverrideBreakpoint, planResponsiveRules, resolveStyleProps, ResponsiveOverrides, wrapInBreakpointQuery,\n} from '@vectoriox/iox-ui';\n\n/**\n * CSS container name of the builder canvas frame (and of the global-elements overlay). Breakpoint\n * rules are emitted as `@container iox-canvas (max-width: …)`: the frame's layout width IS the\n * simulated viewport and is unaffected by the zoom `transform: scale`, whereas a `@media` query\n * would read the editor window. Set on the frame in builder.component.scss.\n */\nexport const BUILDER_CANVAS_CONTAINER = 'iox-canvas';\n\n/** The parent / trigger scope a relational or targeted state rule was last emitted with. */\ninterface StateScope {\n relativeToId?: string;\n triggerId?: string;\n}\n\n/** What a node's breakpoint rules are derived from — kept so they can be re-emitted when a\n * state scope arrives later (relational scopes resolve only after the parent renders). */\ninterface ResponsiveInput {\n styleProps: Record<string, any>;\n stateStyles: Record<string, Record<string, any>> | undefined;\n responsive: ResponsiveOverrides;\n}\n\n/**\n * StyleRegistryService — manages a single <style> tag for the builder canvas.\n *\n * Each builder component gets two CSS classes:\n * .iox-node-{id} — applied to the inner element; handles layout/visual props\n * (display, flex, background, border, padding, etc.)\n * .iox-outer-{id} — applied to the host element by RenderDirective; handles\n * properties that participate in the PARENT flow (margin,\n * align-self, flex-grow/shrink/basis, order).\n *\n * This split is necessary because margin on an inner wrapper only adds internal\n * space — it does not push sibling elements. Applying margin to the host element\n * (which IS the flex/block child in the parent container) makes it work correctly.\n *\n * State styles (hover/active/focus) are stored under key `${nodeId}:${state}`\n * and compiled to `.iox-node-{id}:hover { … }` selectors.\n *\n * Design token variables are stored under the reserved key `__tokens__` and\n * compiled to a `:root { … }` block prepended to all other rules.\n *\n * Scoped to PageUiComponent.providers[] — one stylesheet per builder instance.\n */\n@Injectable()\nexport class StyleRegistryService {\n readonly changes$ = new Subject<void>();\n\n private rules = new Map<string, string>();\n /** Breakpoint rules, kept apart so they flush AFTER every base rule — equal specificity, so\n * source order decides (plan trap 1). Keyed per breakpoint like `rules` (`id`, `id:state`). */\n private responsiveRules = new Map<OverrideBreakpoint, Map<string, string>>();\n private responsiveInputs = new Map<string, ResponsiveInput>();\n /** Which breakpoint rule keys each node owns — so re-emitting one node's rules is O(its rules),\n * not a scan of every breakpoint rule on the page (this runs on every node render). */\n private responsiveKeys = new Map<string, Array<[OverrideBreakpoint, string]>>();\n private stateScopes = new Map<string, StateScope>();\n private styleEl: HTMLStyleElement | null = null;\n\n /**\n * Properties that must live on the OUTER wrapper (.iox-outer-{id}) because they\n * affect how the element participates in its PARENT layout (flex/block flow).\n * Everything else goes to the INNER element (.iox-node-{id}).\n *\n * Exception — out-of-flow positioning (position:fixed/absolute):\n * When position is fixed or absolute, width is redirected to the inner element\n * (the positioned one) and a default width:100% is added if none is set, so the\n * element stays visible. top/right/bottom/left/zIndex are always inner because\n * they are co-ordinates of the positioned element, not the flow wrapper.\n * position itself goes to inner with `!important` to beat component-scoped CSS.\n */\n private static readonly OUTER_PROPS = new Set([\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'alignSelf', 'flexGrow', 'flexShrink', 'flexBasis', 'order',\n // Grid-child placement — like the flex-child props above, these position the node\n // within the PARENT's grid, so they must land on the outer host, not the inner div.\n 'gridColumn', 'gridRow', 'justifySelf',\n 'width',\n ]);\n\n /** Properties that need !important on the inner element to beat Angular's scoped-CSS specificity boost. */\n private static readonly IMPORTANT_PROPS = new Set(['position']);\n\n init(): void {\n this.styleEl = document.createElement('style');\n this.styleEl.id = 'iox-runtime-styles';\n document.head.appendChild(this.styleEl);\n }\n\n /**\n * Write or update the base styles for a node, or a pseudo-class state override.\n *\n * @param nodeId The node's CSS id (used in `.iox-node-{nodeId}`)\n * @param styles Flat CSS property map (camelCase keys)\n * @param state Optional pseudo-class state ('hover' | 'active' | 'focus' | …).\n * When provided, compiles to `.iox-node-{id}:{state} { … }`.\n * State rules are NOT partitioned into inner/outer.\n * @param relativeToId For RELATIONAL states (e.g. 'parent-hover') this is the ancestor\n * css id; compiles to `.iox-node-{relativeToId}:{base} .iox-node-{nodeId} { … }`.\n * For TARGETED states (e.g. 'trigger-hover') this is the SCOPE css id\n * (nearest common ancestor of the styled node + trigger).\n * @param triggerId For TARGETED states only: the css id of the trigger node whose\n * pseudo-class drives the state. Compiles a `:has()`-scoped selector.\n */\n upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string, triggerId?: string): void {\n if (!nodeId) return;\n\n if (state) {\n const key = `${nodeId}:${state}`;\n // Remember the scope a relational / targeted rule was given, so the same state at a\n // breakpoint is scoped identically without re-resolving it (see upsertResponsive).\n if (relativeToId || triggerId) this.stateScopes.set(key, { relativeToId, triggerId });\n const selector = this.stateSelector(nodeId, state, relativeToId, triggerId);\n const css = selector ? this.compile(selector, styles) : '';\n if (css) this.rules.set(key, css);\n else this.rules.delete(key);\n if (this.responsiveInputs.has(nodeId)) this.emitResponsive(nodeId);\n this.flush();\n return;\n }\n\n const { main, marker } = this.nodeRuleCss(nodeId, styles, this.isOutOfFlow(styles), DeclarationContext.Base);\n if (marker) this.rules.set(`${nodeId}::marker`, marker);\n else this.rules.delete(`${nodeId}::marker`);\n if (main) this.rules.set(nodeId, main);\n else this.rules.delete(nodeId);\n this.flush();\n }\n\n /**\n * Emit (or clear) a node's breakpoint rules. `planResponsiveRules` — shared with the SSR engine —\n * decides what each breakpoint emits; this only turns it into selectors, through the SAME\n * inner/outer split and state selectors as the base rules, compiled in the Override context\n * (a CSS initial value undoes the wider rule there, so it must not be dropped).\n *\n * @param styleProps The node's full BASE style map (raw — virtual traits not yet composed).\n */\n upsertResponsive(\n nodeId: string,\n styleProps: Record<string, any>,\n stateStyles: Record<string, Record<string, any>> | undefined,\n responsive: ResponsiveOverrides | undefined,\n ): void {\n if (!nodeId) return;\n const hasOverrides = !!responsive && Object.keys(responsive).length > 0;\n // The common case — a node with no overrides that never had any — costs nothing.\n if (!hasOverrides && !this.responsiveInputs.has(nodeId)) return;\n if (hasOverrides) this.responsiveInputs.set(nodeId, { styleProps, stateStyles, responsive: responsive! });\n else this.responsiveInputs.delete(nodeId);\n this.emitResponsive(nodeId);\n this.flush();\n }\n\n private emitResponsive(nodeId: string): void {\n this.clearResponsive(nodeId);\n const input = this.responsiveInputs.get(nodeId);\n if (!input) return;\n for (const layer of planResponsiveRules(input.styleProps, input.stateStyles, input.responsive)) {\n const bp = layer.breakpoint;\n // Where `width` lands depends on the position in force AT this breakpoint.\n const outOfFlow = this.isOutOfFlow(resolveStyleProps(input.styleProps, input.responsive, bp));\n const { main, marker } = this.nodeRuleCss(nodeId, layer.styleProps, outOfFlow, DeclarationContext.Override);\n if (main) this.setResponsiveRule(nodeId, bp, nodeId, main);\n if (marker) this.setResponsiveRule(nodeId, bp, `${nodeId}::marker`, marker);\n for (const [state, map] of Object.entries(layer.stateStyles)) {\n const scope = this.stateScopes.get(`${nodeId}:${state}`);\n const selector = this.stateSelector(nodeId, state as ElementState, scope?.relativeToId, scope?.triggerId);\n // A relational/targeted state whose scope isn't known yet is skipped; it is re-emitted\n // when the base state rule arrives with its scope (see upsert).\n const css = selector ? this.compile(selector, map, DeclarationContext.Override) : '';\n if (css) this.setResponsiveRule(nodeId, bp, `${nodeId}:${state}`, css);\n }\n }\n }\n\n private setResponsiveRule(nodeId: string, bp: OverrideBreakpoint, key: string, css: string): void {\n let bucket = this.responsiveRules.get(bp);\n if (!bucket) this.responsiveRules.set(bp, (bucket = new Map()));\n bucket.set(key, css);\n let owned = this.responsiveKeys.get(nodeId);\n if (!owned) this.responsiveKeys.set(nodeId, (owned = []));\n owned.push([bp, key]);\n }\n\n private clearResponsive(nodeId: string): void {\n for (const [bp, key] of this.responsiveKeys.get(nodeId) ?? []) this.responsiveRules.get(bp)?.delete(key);\n this.responsiveKeys.delete(nodeId);\n }\n\n private isOutOfFlow(styles: Record<string, any>): boolean {\n const pos = String(styles['position'] ?? '');\n return pos === 'fixed' || pos === 'absolute';\n }\n\n /**\n * The selector BODY (no leading dot) for a state rule, or null when a relational / targeted\n * state has no scope yet (emitting it unscoped would be wrong — a page-global `:has()`).\n */\n private stateSelector(nodeId: string, state: ElementState, relativeToId?: string, triggerId?: string): string | null {\n // Targeted states (trigger-hover): the styled node restyles when an ARBITRARY chosen\n // element is hovered. The selector is `:has()`-scoped to `relativeToId` (the nearest\n // common ancestor of styled + trigger) so it stays repetition-safe with one shared rule.\n if ((TARGETED_STATES as string[]).includes(state)) {\n const base = TARGETED_STATE_BASE[state];\n return relativeToId && triggerId && base\n ? buildTargetedStateSelector(relativeToId, triggerId, nodeId, base) : null;\n }\n // Relational states (parent-hover): the pseudo-class lives on an ANCESTOR\n // and cascades to this element. Requires the ancestor's css id.\n if ((RELATIONAL_STATES as string[]).includes(state)) {\n const base = RELATIONAL_STATE_BASE[state];\n return relativeToId && base ? `iox-node-${relativeToId}:${base} .iox-node-${nodeId}` : null;\n }\n // Structural pseudo-classes (first-child, last-child, nth-child) target the\n // outer wrapper element so they participate correctly in grid/flex layout.\n const prefix = (STRUCTURAL_STATES as string[]).includes(state) ? 'iox-outer' : 'iox-node';\n return `${prefix}-${nodeId}:${state}`;\n }\n\n /**\n * The inner + outer rule (joined) and the `::marker` rule for one composed style map.\n * `isOutOfFlow` is passed in rather than read from `styles` because a breakpoint layer is\n * sparse — the position in force may come from a wider layer.\n */\n private nodeRuleCss(nodeId: string, styles: Record<string, any>, isOutOfFlow: boolean, context: DeclarationContext): { main: string; marker: string } {\n // ::marker pseudo-element — emitted as a separate rule, not part of inner/outer split.\n const markerStyles = styles['__markerStyles'] as Record<string, any> | undefined;\n const marker = markerStyles && Object.keys(markerStyles).length\n ? this.compile(`iox-node-${nodeId}::marker`, markerStyles, context) : '';\n\n const inner: Record<string, any> = {};\n const outer: Record<string, any> = {};\n for (const [k, v] of Object.entries(styles)) {\n if (k === '__markerStyles') continue;\n const wantsOuter = StyleRegistryService.OUTER_PROPS.has(k);\n // width goes to inner for fixed/absolute (the positioned element owns its own width)\n if (wantsOuter && !(isOutOfFlow && k === 'width')) {\n outer[k] = v;\n } else {\n inner[k] = v;\n }\n }\n // Ensure fixed/absolute elements stay visible when no explicit width is set. A base-rule\n // render default only — a sparse breakpoint layer must not invent a width.\n if (context === DeclarationContext.Base && isOutOfFlow && inner['width'] === undefined) {\n inner['width'] = '100%';\n }\n const innerCss = this.compile(`iox-node-${nodeId}`, inner, context);\n const outerCss = this.compile(`iox-outer-${nodeId}`, outer, context);\n return { main: [innerCss, outerCss].filter(Boolean).join('\\n'), marker };\n }\n\n /**\n * Write the org-level design token variables as a `:root { … }` block.\n * Token names should be CSS custom property names without the `--` prefix\n * (e.g., `{ 'iox-primary-color': '#cb9090' }`).\n * Pass an empty object to clear all tokens.\n */\n upsertTokens(tokens: Record<string, string>): void {\n const entries = Object.entries(tokens)\n .filter(([, v]) => v !== undefined && v !== null && v !== '')\n .map(([k, v]) => ` --${k}: ${v};`);\n if (entries.length) {\n this.rules.set('__tokens__', `:root {\\n${entries.join('\\n')}\\n}`);\n } else {\n this.rules.delete('__tokens__');\n }\n this.flush();\n }\n\n remove(nodeId: string): void {\n if (!nodeId) return;\n // Remove base rule and all state rules for this node\n this.rules.delete(nodeId);\n for (const key of this.rules.keys()) {\n if (key.startsWith(`${nodeId}:`)) {\n this.rules.delete(key);\n }\n }\n for (const key of this.stateScopes.keys()) {\n if (key.startsWith(`${nodeId}:`)) this.stateScopes.delete(key);\n }\n this.responsiveInputs.delete(nodeId);\n this.clearResponsive(nodeId);\n this.flush();\n }\n\n destroy(): void {\n this.rules.clear();\n this.responsiveRules.clear();\n this.responsiveInputs.clear();\n this.responsiveKeys.clear();\n this.stateScopes.clear();\n if (this.styleEl) {\n this.styleEl.remove();\n this.styleEl = null;\n }\n }\n\n private compile(className: string, styles: Record<string, any>, context: DeclarationContext = DeclarationContext.Base): string {\n // Declaration compilation (kebab-case, viewport-unit rewrite, !important) lives in\n // the shared style-compiler so the SSR engine produces byte-identical output.\n // The inner/outer partition + selector emission stay here (builder-only concern).\n const decls = compileDeclarations(styles, StyleRegistryService.IMPORTANT_PROPS, context);\n if (!decls.length) return '';\n const body = decls.map(d => ` ${d};`).join('\\n');\n return `.${className} {\\n${body}\\n}`;\n }\n\n private _flushPending = false;\n\n private flush(): void {\n if (!this.styleEl || this._flushPending) return;\n this._flushPending = true;\n requestAnimationFrame(() => {\n this._flushPending = false;\n if (!this.styleEl) return;\n // __tokens__ always first so variables are available to all subsequent rules\n const tokenBlock = this.rules.get('__tokens__');\n const rest = Array.from(this.rules.entries())\n .filter(([k]) => k !== '__tokens__')\n .map(([, v]) => v);\n // Breakpoint rules LAST, widest → narrowest, each as a canvas container query.\n const breakpoints = BREAKPOINTS\n .map(({ id }) => this.responsiveRules.get(id as OverrideBreakpoint))\n .map((bucket, i) => bucket?.size\n ? wrapInBreakpointQuery(BREAKPOINTS[i].id, Array.from(bucket.values()).join('\\n'),\n BreakpointQueryKind.Container, BUILDER_CANVAS_CONTAINER)\n : '');\n this.styleEl.textContent = [tokenBlock, ...rest, ...breakpoints].filter(Boolean).join('\\n');\n this.changes$.next();\n });\n }\n}\n","import { ChangeDetectorRef, Injectable } from '@angular/core';\nimport Moveable from 'moveable';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService, DragPayload } from './drag-engine.service';\nimport { StyleRegistryService } from './style-registry.service';\n\n/**\n * MoveableCanvasService — Phase 1 of the Moveable + Selecto migration\n * (see iox-ai-guidance/architecture/builder/moveable-migration.md).\n *\n * Drives DRAG for the SELECTED element via Moveable instead of interact.js, while REUSING the\n * proven reorder machinery (`DragEngineService.handleDrop`). It is a pure INPUT device: during a\n * drag it applies a TRANSIENT transform, and on drop it RESETS the transform to nothing and instead\n * reorders the layout tree (constraint C1 — a persisted transform on an in-flow canvas element\n * breaks Lenis scroll). Everything here runs ONLY when `moveableMode` is on; interact.js is\n * untouched, so the flag-off path is byte-identical to today.\n *\n * Scale: Moveable reads `getBoundingClientRect()` (already post-scale) and works in viewport\n * client coordinates, so drop hit-testing via `elementsFromPoint` / rects is scale-correct without\n * extra math. The control box is rendered into the same overlay container the selection overlay uses.\n */\n@Injectable({ providedIn: 'root' })\nexport class MoveableCanvasService {\n private moveable: Moveable | null = null;\n private container: HTMLElement | null = null;\n private scaleGetter: () => number = () => 1;\n\n private target: HTMLElement | null = null;\n private node: ComponentNode | null = null;\n private sourceId: string | null = null;\n /** A rubber-band multi-select group is active; `groupAt` guards the immediate follow-up click. */\n private groupActive = false;\n private groupAt = 0;\n\n /** Called after a successful reorder so the host can emit LAYOUT_CHANGED / refresh selection. */\n onReorder: (() => void) | null = null;\n /** Called after a geometry commit (resize) so the host can emit LAYOUT_CHANGED (undo/save). */\n onLayoutChanged: (() => void) | null = null;\n\n constructor(\n private dragEngine: DragEngineService,\n private styleRegistry: StyleRegistryService,\n ) {}\n\n /** Preview device viewport size (CSS px) — reference for vw/vh unit conversion on resize. */\n private viewportGetter: () => { width: number; height: number } = () => ({ width: 0, height: 0 });\n\n /** Wire the Moveable control box into `container`; `scaleGetter` returns the live canvas zoom;\n * `viewportGetter` returns the previewed device viewport size (for vw/vh resize conversion). */\n init(container: HTMLElement, scaleGetter: () => number, viewportGetter?: () => { width: number; height: number }): void {\n this.container = container;\n this.scaleGetter = scaleGetter;\n if (viewportGetter) this.viewportGetter = viewportGetter;\n }\n\n /** Point Moveable at the selected element (skips inline-edit + preview-clone targets). */\n select(element: HTMLElement | null, node: ComponentNode | null): void {\n // Swallow the deselect+click that fire on the SAME mouseup that just ended a rubber-band\n // group selection — otherwise the trailing clearSelect (→ destroyMoveable) or click would\n // instantly collapse the fresh group. Must run BEFORE the null-check below. A later,\n // deliberate click is well outside the ~250ms window and clears the group normally.\n if (this.groupActive && Date.now() - this.groupAt < 250) return;\n this.groupActive = false;\n\n this.target = null;\n this.node = null;\n this.sourceId = null;\n if (!element || !node || !this.container) { this.destroyMoveable(); return; }\n // Preview clones (repeater/slider rows) and hidden nodes are not editable.\n if (element.closest('[data-iox-hidden]') || (node as any).__previewClone) { this.destroyMoveable(); return; }\n\n this.target = element;\n this.node = node;\n this.sourceId = this.resolveDropzoneId(element);\n this.ensureMoveable();\n // Single selection: the OverlayService draws the outline, so Moveable stays line-less (a\n // group selection re-enables the lines in selectGroup).\n (this.moveable as any).hideDefaultLines = true;\n this.moveable!.target = element;\n // Snap against sibling/cousin nodes (not self, ancestors, or own descendants).\n (this.moveable as any).elementGuidelines = this.guidelines(element);\n // Drag is initiated by grabbing the ELEMENT itself (like interact.js) — not a Moveable\n // overlay area — so a plain click still passes through to selection/child-selection and only\n // a movement past the threshold starts a drag. Keeps Moveable visually silent (no hit-area box).\n (this.moveable as any).dragTarget = element;\n this.moveable!.updateRect();\n }\n\n /**\n * Multi-select group (Selecto rubber-band → group move). With 2+ targets Moveable shows its\n * bounding box + handles for the whole group; with ≤1 it defers to the normal single-select\n * path (select()), which keeps the OverlayService as the sole owner of single-selection visuals.\n * Returns true when a group is active so the host can skip the single-select wiring.\n */\n selectGroup(elements: HTMLElement[]): boolean {\n const visible = (elements || []).filter(el => {\n if (el.closest('[data-iox-hidden]')) return false;\n // Out-of-flow (fixed/absolute) nodes are positioned independently — grouping them with\n // in-flow siblings for a reflow-move is meaningless, and a fixed node's control-box\n // measurement is unreliable in the transformed canvas (see moveable-migration.md gap).\n const pos = getComputedStyle(el).position;\n return pos !== 'fixed' && pos !== 'absolute' && pos !== 'sticky';\n });\n // Keep only the TOP-MOST selected nodes — Moveable can't group an element with its own\n // descendant, and moving a parent already moves its children (the rubber band grabs both).\n const targets = visible.filter(el => !visible.some(other => other !== el && other.contains(el)));\n if (targets.length <= 1) { return false; }\n this.target = null;\n this.node = null;\n this.groupActive = true;\n this.groupAt = Date.now();\n this.ensureMoveable();\n // A GROUP box is a legitimate visual (nothing single-select in the overlay to duplicate).\n (this.moveable as any).hideDefaultLines = false;\n this.moveable!.target = targets as any;\n this.moveable!.updateRect();\n return true;\n }\n\n /** Recompute the control-box position (call on scroll/zoom/layout changes). */\n refresh(): void { this.moveable?.updateRect(); }\n\n /** Snap guideline elements for `target`: every node host except itself, its ancestors, and its\n * own descendants — i.e. siblings/cousins to align edges/centers against. */\n private guidelines(target: HTMLElement): HTMLElement[] {\n if (!this.container) return [];\n const all = Array.from(this.container.querySelectorAll<HTMLElement>('[class*=\"iox-node-\"]'));\n return all.filter(el => el !== target && !target.contains(el) && !el.contains(target));\n }\n\n destroy(): void { this.destroyMoveable(); this.container = null; }\n\n // ── internals ────────────────────────────────────────────────────────────\n\n private ensureMoveable(): void {\n if (this.moveable) return;\n this.moveable = new Moveable(this.container!, {\n target: undefined,\n draggable: true,\n resizable: true, // Phase 3 — corner handles → styleProps width/height (C2)\n rotatable: false, // (out-of-flow only — C1)\n origin: false,\n zoom: 1,\n // The OverlayService owns ALL selection visuals (pink outline, hover margin/padding rings,\n // toolbar, badges) — Moveable draws NO box/lines. It shows ONLY the 4 corner RESIZE handles\n // (renderDirections) and provides the drag hit-area. `iox-moveable-silent` + SCSS in\n // builder.component.scss hide the lines and style the handles to match, below the overlay.\n hideDefaultLines: true,\n renderDirections: ['nw', 'ne', 'sw', 'se'],\n className: 'iox-moveable-silent',\n // Snap-to-guides: align edges/centers to sibling elements while dragging/resizing, with\n // the distance readout. elementGuidelines are refreshed per selection (see select()).\n snappable: true,\n snapThreshold: 6,\n snapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },\n elementSnapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },\n snapGap: true,\n isDisplaySnapDigit: true,\n } as any);\n\n this.moveable.on('dragStart', (e) => {\n // Never start a drag from inside inline text editing.\n if ((e.inputEvent?.target as HTMLElement)?.closest?.('[contenteditable=\"true\"]')) {\n e.stop?.();\n }\n });\n // Transient transform only — visual feedback during the drag (C1: reset on drop).\n this.moveable.on('drag', (e) => { e.target.style.transform = e.transform; });\n this.moveable.on('dragEnd', (e) => this.commitDrag(e));\n\n // Resize: live inline width/height for feedback, then commit to styleProps on end (C2 — never\n // a transform:scale, so no Lenis-scroll break; the panel + save + SSR all see the real size).\n this.moveable.on('resize', (e) => {\n e.target.style.width = `${Math.round(e.width)}px`;\n e.target.style.height = `${Math.round(e.height)}px`;\n e.target.style.transform = e.drag.transform; // keeps the box anchored while resizing\n });\n this.moveable.on('resizeEnd', (e) => this.commitResize(e));\n }\n\n private destroyMoveable(): void {\n if (this.moveable) { this.moveable.destroy(); this.moveable = null; }\n }\n\n private commitDrag(e: any): void {\n const el = e.target as HTMLElement;\n // C1: never persist the transform — reset it; the result is a tree reorder, not a position.\n el.style.transform = '';\n if (!this.node) return;\n\n const pointer = this.lastPointer(e);\n if (!pointer) { this.onReorder?.(); return; }\n\n const targetId = this.dropzoneUnderPoint(pointer.x, pointer.y, el);\n if (!targetId) { this.onReorder?.(); return; }\n\n const children = this.dragEngine.getData(targetId) as ComponentNode[] | undefined;\n const cdr = this.dragEngine.getCdr(targetId) as ChangeDetectorRef | undefined;\n if (!children || !cdr) { this.onReorder?.(); return; }\n\n const insertIndex = this.calcInsertIndex(targetId, pointer.y);\n const srcChildren = this.sourceId ? (this.dragEngine.getData(this.sourceId) as ComponentNode[] | undefined) : undefined;\n const sourceIndex = srcChildren ? srcChildren.indexOf(this.node) : -1;\n const payload: DragPayload = { type: 'internal', data: this.node, sourceId: this.sourceId ?? null, sourceIndex };\n this.dragEngine.handleDrop(children, { payload, targetId, insertIndex }, targetId, cdr, () => {\n this.onReorder?.();\n // Re-point the control box at the moved element's (possibly new) host.\n setTimeout(() => this.moveable?.updateRect(), 0);\n });\n }\n\n private commitResize(e: any): void {\n const el = e.target as HTMLElement;\n el.style.transform = ''; // C1: never persist a transform on an in-flow canvas element\n if (!this.node) { return; }\n const last = e.lastEvent ?? e;\n const wPx = last.width ?? el.getBoundingClientRect().width;\n const hPx = last.height ?? el.getBoundingClientRect().height;\n // C2: geometry goes to styleProps (width/height) — never a transform:scale. Keep the unit the\n // user CONFIGURED (%, vw, em, …) instead of always forcing px.\n this.applyStyle(this.node, {\n width: this.toConfiguredUnit(wPx, this.currentStyleValue('width'), el, 'width'),\n height: this.toConfiguredUnit(hPx, this.currentStyleValue('height'), el, 'height'),\n });\n // Clear the transient inline size so the styleProps `.iox-node` rule drives it (single source).\n el.style.width = '';\n el.style.height = '';\n this.onLayoutChanged?.();\n setTimeout(() => this.moveable?.updateRect(), 0);\n }\n\n /** The node's currently-configured value for a style trait (e.g. '100%', '120px'). */\n private currentStyleValue(name: string): string | undefined {\n for (const group of ((this.node as any)?.styleTraits ?? [])) {\n for (const trait of (group.traits ?? [])) {\n if (trait.name === name) return trait.default;\n }\n }\n return undefined;\n }\n\n /** Convert a pixel measurement into the unit the user configured, so resizing from the canvas\n * preserves %, vw/vh, em/rem etc. instead of always writing px. */\n private toConfiguredUnit(px: number, current: string | undefined, el: HTMLElement, axis: 'width' | 'height'): string {\n const round = (n: number) => Math.round(n * 100) / 100;\n const m = String(current ?? '').trim().match(/(px|%|vw|vh|vmin|vmax|rem|em)\\s*$/);\n const unit = m ? m[1] : 'px';\n switch (unit) {\n case '%': {\n const ref = axis === 'width' ? (el.parentElement?.clientWidth ?? 0) : (el.parentElement?.clientHeight ?? 0);\n return ref > 0 ? `${round(px / ref * 100)}%` : `${Math.round(px)}px`;\n }\n case 'vw': { const vw = this.viewportGetter().width; return vw > 0 ? `${round(px / vw * 100)}vw` : `${Math.round(px)}px`; }\n case 'vh': { const vh = this.viewportGetter().height; return vh > 0 ? `${round(px / vh * 100)}vh` : `${Math.round(px)}px`; }\n case 'vmin': { const { width, height } = this.viewportGetter(); const base = Math.min(width, height); return base > 0 ? `${round(px / base * 100)}vmin` : `${Math.round(px)}px`; }\n case 'vmax': { const { width, height } = this.viewportGetter(); const base = Math.max(width, height); return base > 0 ? `${round(px / base * 100)}vmax` : `${Math.round(px)}px`; }\n case 'rem': { const fs = parseFloat(getComputedStyle(el.ownerDocument.documentElement).fontSize) || 16; return `${round(px / fs)}rem`; }\n case 'em': { const fs = parseFloat(getComputedStyle(el).fontSize) || 16; return `${round(px / fs)}em`; }\n default: return `${Math.round(px)}px`;\n }\n }\n\n /** Write geometry changes into the node's styleTraits (the serialized source of truth) and the\n * central stylesheet, so the style panel, save (self-describing), and SSR engine all agree. */\n private applyStyle(node: ComponentNode, changes: Record<string, string>): void {\n const styles: Record<string, any> = {};\n for (const group of ((node as any).styleTraits ?? [])) {\n for (const trait of (group.traits ?? [])) {\n if (trait.name in changes) trait.default = changes[trait.name];\n if (trait.name !== undefined && trait.default !== undefined) styles[trait.name] = trait.default;\n }\n }\n const cssId = (node as any).styleId ?? node.id;\n if (cssId) this.styleRegistry.upsert(cssId, styles);\n }\n\n /** Final pointer position from the Moveable end event (client/viewport px). */\n private lastPointer(e: any): { x: number; y: number } | null {\n const ie = e.inputEvent as MouseEvent | undefined;\n if (ie && typeof ie.clientX === 'number') return { x: ie.clientX, y: ie.clientY };\n if (Array.isArray(e.clientX)) return { x: e.clientX[0], y: e.clientY[0] };\n if (typeof e.clientX === 'number') return { x: e.clientX, y: e.clientY };\n return null;\n }\n\n /** Walk up from an element to the nearest registered dropzone id (el.id is stamped by DragEngine). */\n private resolveDropzoneId(el: HTMLElement | null): string | null {\n let e: HTMLElement | null = el;\n while (e) {\n if (e.id && this.dragEngine.getData(e.id) !== undefined) return e.id;\n e = e.parentElement;\n }\n return null;\n }\n\n /** Topmost registered dropzone under the pointer that is NOT inside the dragged element's subtree. */\n private dropzoneUnderPoint(x: number, y: number, draggedEl: HTMLElement): string | null {\n const stack = document.elementsFromPoint(x, y) as HTMLElement[];\n for (const el of stack) {\n const id = this.resolveDropzoneId(el);\n if (!id) continue;\n const zoneEl = document.getElementById(id);\n if (zoneEl && draggedEl.contains(zoneEl)) continue; // don't drop into own subtree\n return id;\n }\n return null;\n }\n\n /** Insertion index within a dropzone by comparing pointer Y to each child's vertical midpoint. */\n private calcInsertIndex(targetId: string, y: number): number {\n const zoneEl = document.getElementById(targetId);\n if (!zoneEl) return 0;\n const childWraps = Array.from(zoneEl.children).filter(\n (c) => (c as HTMLElement).matches('.container-child, .section-child, [data-iox-draggable]'),\n ) as HTMLElement[];\n let idx = 0;\n for (const w of childWraps) {\n const r = w.getBoundingClientRect();\n if (y > r.top + r.height / 2) idx++;\n }\n return idx;\n }\n}\n","import { Injectable } from '@angular/core';\nimport Selecto from 'selecto';\n\n/**\n * SelectoCanvasService — Phase 1 of the Moveable + Selecto migration\n * (see iox-ai-guidance/architecture/builder/moveable-migration.md).\n *\n * Rubber-band MULTI-select on the canvas. Runs ONLY when `moveableMode` is on; interact.js is\n * untouched, so the flag-off path is byte-identical to today.\n *\n * - `selectFromInside: false` — a drag that STARTS on a node moves it (Moveable); the rubber band\n * only starts from empty canvas space, so single-element drag/select is unaffected.\n * - `selectByClick: false` — a plain click still flows through the existing single-select path\n * (OverlayService), so nothing about clicking changes.\n * - `rootContainer` is the UNtransformed `.preview` (Selecto explicitly wants a non-transformed\n * root): the rubber band and the targets' client rects are then in the same viewport space, so\n * hit-testing is correct even though the canvas content is `transform: scale()`d.\n *\n * On a rubber-band release it emits the selected node host elements; the host maps them to nodes and\n * drives Moveable with the group (see MoveableCanvasService.selectGroup).\n */\n@Injectable({ providedIn: 'root' })\nexport class SelectoCanvasService {\n private selecto: Selecto | null = null;\n\n /** Called on rubber-band release with the selected `.iox-node-*` host elements (may be empty). */\n onSelect: ((elements: HTMLElement[]) => void) | null = null;\n\n /** Count from the last rubber-band release (state/telemetry). */\n lastSelectedCount = 0;\n\n /**\n * Wire Selecto onto the canvas.\n * @param container untransformed element the rubber band renders into (`.preview`).\n * @param dragContainer element the drag is listened on (the same `.preview`).\n * @param selectableRoot the node container whose `.iox-node-*` descendants are selectable.\n */\n init(container: HTMLElement, dragContainer: HTMLElement, selectableRoot: HTMLElement): void {\n this.destroy();\n this.selecto = new Selecto({\n container,\n rootContainer: container,\n dragContainer,\n // Only real node hosts inside the canvas — never overlay/toolbar chrome.\n selectableTargets: [`#${selectableRoot.id || 'canvas-preview'} [class*=\"iox-node-\"]`],\n selectByClick: false,\n selectFromInside: false,\n hitRate: 0, // any intersection selects — forgiving rubber band\n });\n this.selecto.on('selectEnd', (e: any) => {\n this.lastSelectedCount = (e.selected as HTMLElement[]).length;\n this.onSelect?.((e.selected as HTMLElement[]).filter(el => !!el));\n });\n }\n\n /** Keep Selecto's selectable set fresh after layout changes (nodes added/removed/reordered). */\n refresh(): void { /* selectableTargets is a live function — nothing to recompute */ }\n\n destroy(): void {\n this.selecto?.destroy();\n this.selecto = null;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentRef,\n Directive,\n EnvironmentInjector,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewContainerRef,\n createComponent,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { safeSetInput, stateNamesIn } from '@vectoriox/iox-ui';\n\nimport { ComponentNode, ElementState, RELATIONAL_STATES, TARGETED_STATES } from '../models/component.model';\nimport { ComponentRegistryService } from '../services/component-registry.service';\nimport { DragEngineService } from '../services/drag-engine.service';\nimport { OverlayService } from '../overlay/overlay.service';\nimport { StyleRegistryService } from '../services/style-registry.service';\nimport { InteractionEngineService } from '../services/interaction-engine.service';\nimport { PanelEventService, PanelEventTypes } from '../panels/panel-event.service';\nimport { composeVirtualTraits } from '../style-compose';\n\n// Module-level counter — unique drop-list ID per Section instance across the whole app session.\nlet dropListCounter = 0;\n\n/**\n * Node types whose iox-ui component is a DIRECTIVE-HOST (element+attribute selector on the real\n * tag, e.g. `img[iox-img]`, `h1[iox-heading]`). The host IS the element, so we must NOT force an\n * inline `display:block` (it out-ranks both `:host` and the styleProps `.iox-node` rule — the same\n * bug the SSR engine hit). Mirrors the engine's DIRECTIVE_HOST_TYPES for the leaf/variable-tag set.\n * NOTE: Container/Section/List/ListItem render via iox-BUILDER wrapper components here (not\n * directive-hosts), so they are intentionally excluded.\n */\nconst DIRECTIVE_HOST_TYPES = new Set<string>([\n 'Image', 'Icon', 'Divider', 'Spacer', 'Button', 'Link', 'Heading', 'Text', 'ButtonBlock',\n // Phase 2 (9c): layout components converted to directive-hosts (host IS the real tag).\n 'Section', 'Container', 'List', 'ListItem',\n]);\n\nconst CONTAINER_TAGS = ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'];\n\n/**\n * RenderDirective — applied to <ng-container> to dynamically instantiate a\n * builder component with zero wrapper elements in the DOM.\n *\n * A directive's ViewContainerRef inserts the created component's host element as\n * a sibling of the ng-container comment node — directly inside the parent element\n * — so the resulting DOM has no extra <app-renderer> wrapper.\n *\n * Usage:\n * <ng-container [ioxRender]=\"node\"\n * (onClick)=\"handleClick($event)\"\n * (onMouseEnter)=\"handleMouseEnter($event)\"\n * (onMouseLeave)=\"handleMouseLeave()\">\n * </ng-container>\n */\n@Directive({\n selector: '[ioxRender]',\n standalone: false,\n})\nexport class RenderDirective implements OnInit, OnDestroy {\n @Input() ioxRender: ComponentNode | null = null;\n /**\n * WRAPPER-COLLAPSE opt-in (task 9c). When a parent renders a child DIRECTLY (no `iox-outer`\n * wrapper div), it passes the parent dropzone id here. The RenderDirective then puts the\n * `iox-outer-{id}` class on the node HOST (so the host is the single flex/grid item carrying both\n * `iox-outer` + `iox-node`, like the SSR engine) and registers drag on the host. When unset\n * (`null`), the legacy path is byte-identical — the parent's wrapper owns `iox-outer` + drag.\n */\n @Input() ioxDragSourceId: string | null = null;\n @Output() onClick = new EventEmitter<any>();\n @Output() onMouseEnter = new EventEmitter<any>();\n @Output() onMouseLeave = new EventEmitter<any>();\n\n private childSubs: Subscription[] = [];\n /** Host element drag was registered on (collapsed path) — unregistered on destroy. */\n private hostDragEl: HTMLElement | null = null;\n\n constructor(\n private vcr: ViewContainerRef,\n private injector: Injector,\n private envInjector: EnvironmentInjector,\n @Inject(DOCUMENT) private doc: Document,\n private registryService: ComponentRegistryService,\n private overlayService: OverlayService,\n private styleRegistry: StyleRegistryService,\n private interactionEngine: InteractionEngineService,\n private cdr: ChangeDetectorRef,\n private panelEventService: PanelEventService,\n private dragEngine: DragEngineService,\n ) {}\n\n /**\n * Tag for a variable-tag directive-host (whose selector lists several tags, so\n * `vcr.createComponent` would always pick the first). Reads the value from the node's traits.\n * Returns null for fixed-tag hosts and non-directive-host components.\n */\n private variableTag(node: ComponentNode): string | null {\n const traitVal = (name: string): any =>\n (Object.values(node.traits || {}) as any[]).find(t => t?.name === name)?.default;\n switch (node.type) {\n case 'Heading': {\n const l = traitVal('level');\n return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(l) ? l : 'h2';\n }\n case 'Text':\n return traitVal('tag') === 'span' ? 'span' : 'p';\n case 'ButtonBlock':\n return traitVal('tag') === 'a' ? 'a' : 'button';\n case 'Container':\n case 'List':\n case 'ListItem': {\n const t = traitVal('htmlTag');\n if (CONTAINER_TAGS.includes(t)) return t;\n return node.type === 'List' ? 'ul' : node.type === 'ListItem' ? 'li' : 'div';\n }\n default:\n return null;\n }\n }\n\n ngOnInit(): void {\n this.render(this.ioxRender);\n }\n\n ngOnDestroy(): void {\n this.childSubs.forEach(s => s.unsubscribe());\n if (this.hostDragEl) { this.dragEngine.unregisterDraggable(this.hostDragEl); this.hostDragEl = null; }\n if (this.ioxRender) {\n this.interactionEngine.detach(this.ioxRender);\n this.overlayService.unregisterNode(this.ioxRender);\n // Only remove the CSS rule if this node OWNS it (i.e. it is not a clone).\n // Clones set styleId to point at the template node's id — removing would\n // destroy the shared rule and break all other rows.\n const isClone = !!this.ioxRender.styleId;\n if (!isClone && this.ioxRender.id) {\n this.styleRegistry.remove(this.ioxRender.id);\n }\n }\n }\n\n /**\n * Walk up from `target` to find a registered parent component element.\n * Returns { element, node } if found, or null if the target is outside\n * all known builder components (e.g. the canvas background).\n */\n /**\n * The nearest ancestor node's cssId, read from the DOM `iox-node-{id}` classes (NOT the overlay\n * registry — at state-restore time the parent isn't registered yet, since it registers only\n * AFTER rendering its children). Used to key relational (parent-hover) rules. (issue #1)\n */\n private resolveParentNodeId(childEl: HTMLElement | null): string | undefined {\n let el = childEl?.parentElement ?? null;\n while (el) {\n for (let i = 0; i < el.classList.length; i++) {\n const c = el.classList[i];\n if (c.startsWith('iox-node-')) return c.slice('iox-node-'.length);\n }\n el = el.parentElement;\n }\n return undefined;\n }\n\n /** Nearest ANCESTOR of the styled element that is a registered iox-node AND contains the trigger\n * element — i.e. the DOM equivalent of `nearestCommonAncestorId`, resolved per rendered instance.\n * Used to re-emit a `trigger-hover` rule after a move/duplicate. Returns undefined if the trigger\n * isn't in the DOM yet (caller then skips rather than clobbering the existing rule). */\n private resolveTargetedScopeId(styledEl: HTMLElement | null, triggerCssId: string): string | undefined {\n let el = styledEl?.parentElement ?? null;\n while (el) {\n let cssId: string | undefined;\n for (let i = 0; i < el.classList.length; i++) {\n const c = el.classList[i];\n if (c.startsWith('iox-node-')) { cssId = c.slice('iox-node-'.length); break; }\n }\n if (cssId && el.querySelector(`.iox-node-${triggerCssId}`)) return cssId;\n el = el.parentElement;\n }\n return undefined;\n }\n\n private findParentNodeElement(target: HTMLElement): { element: HTMLElement; node: ComponentNode } | null {\n let el: HTMLElement | null = target;\n while (el) {\n const match = this.overlayService.findNodeByElement(el);\n if (match) {\n return { element: el, node: match.node };\n }\n el = el.parentElement;\n }\n return null;\n }\n\n private render(node: ComponentNode | null): void {\n if (!node) return;\n\n const componentClass = this.registryService.getComponent(node.type);\n if (!componentClass) return;\n\n // vcr.createComponent inserts the new component's host element after the ng-container\n // comment anchor — directly inside the parent element. No wrapper div is created.\n // Variable-tag directive-hosts (Heading/Text/ButtonBlock) list every allowed tag in their\n // selector, so vcr.createComponent would always pick the FIRST — create them on an explicit\n // hostElement of the right tag and insert that view instead (mirrors the SSR engine).\n const tag = this.variableTag(node);\n let componentRef: ComponentRef<any>;\n if (tag) {\n const hostElement = this.doc.createElement(tag);\n componentRef = createComponent(componentClass, {\n environmentInjector: this.envInjector,\n elementInjector: this.injector,\n hostElement,\n });\n this.vcr.insert(componentRef.hostView);\n } else {\n componentRef = this.vcr.createComponent(componentClass, { injector: this.injector });\n }\n\n // Apply regular trait defaults (title, image, description, etc.). safeSetInput() uses\n // setInput() for declared inputs (marks the view dirty, integrates with CD + signal inputs)\n // and falls back to direct assignment for anything the component doesn't declare — so a\n // trait that has no matching @Input (e.g. `sourcePath` on a SliderContainer) never emits the\n // NG0303 console error that a bare setInput() would. Skip SectionLabel traits — they are\n // UI-only panel headers with no matching input.\n Object.values(node.traits || {}).forEach((trait: any) => {\n if (trait.type === 'sectionLabel') return;\n safeSetInput(componentRef, trait.name, trait.default);\n });\n\n // Per-breakpoint TRAIT overrides — the same hand-off the SSR engine makes. A component that\n // declares a `responsive` input (SliderContainer) converts it to its own width config, so the\n // canvas and the live site agree without the canvas needing a resize listener. Dropped by\n // safeSetInput for every component that does not declare it.\n if ((node as any).responsive) safeSetInput(componentRef, 'responsive', (node as any).responsive);\n\n // Build initial style map from styleTraits defaults.\n const initialStyle: Record<string, any> = {};\n if (node.styleTraits?.length) {\n for (const group of node.styleTraits) {\n for (const trait of group.traits) {\n if (trait.default !== undefined) {\n initialStyle[trait.name] = trait.default;\n }\n }\n }\n }\n\n // Use styleId when present (clone nodes share the template node's CSS rule).\n const cssId = node.styleId ?? node.id;\n\n // Register CSS rules in the central stylesheet (inner + outer split).\n if (cssId) {\n const composedBase = composeVirtualTraits(initialStyle);\n this.styleRegistry.upsert(cssId, composedBase);\n // Restore per-state overrides saved from a previous session.\n // Every state set at base OR at any breakpoint — so a breakpoint-only state (a Mobile-only\n // parent-hover) still has its scope resolved and recorded for its breakpoint rule.\n const stateNames = stateNamesIn(node.stateStyles as any, node.responsive) as ElementState[];\n if (stateNames.length) {\n const childEl = componentRef.location?.nativeElement as HTMLElement | null;\n for (const state of stateNames) {\n const baseMap = (node.stateStyles as Record<string, any> | undefined)?.[state] ?? {};\n // A state set only at a breakpoint has no base rule: upsert an EMPTY map (records the\n // scope, emits nothing) rather than composing an empty override against the base,\n // which would re-declare the base's transform/filter as a pointless hover rule.\n const stateMap = Object.keys(baseMap).length ? baseMap : null;\n if ((RELATIONAL_STATES as string[]).includes(state)) {\n // Relational states (parent-hover) compile to\n // `.iox-node-{parentId}:hover .iox-node-{childId}` — they need the CURRENT parent id.\n // Resolve it from the DOM so the rule re-resolves after a cross-container MOVE (which\n // re-renders the child). If it can't be resolved yet (initial load: the parent registers\n // its class only after rendering its children), SKIP — do NOT clobber the correct rule\n // that page-ui's applyStateEnhancements already produced from the node tree. (issue #1)\n const relativeToId = this.resolveParentNodeId(childEl);\n if (!relativeToId) continue;\n this.styleRegistry.upsert(cssId, stateMap ? composeVirtualTraits(stateMap, initialStyle) : {}, state, relativeToId);\n } else if ((TARGETED_STATES as string[]).includes(state)) {\n // Targeted states (trigger-hover) compile to a `:has()` scoped to the nearest\n // common ancestor of the styled node + the chosen trigger. On a re-render (move,\n // duplicate, drop) we must RE-EMIT with a freshly-resolved scope — otherwise the\n // rule is clobbered and the hover stops working. Resolve the scope from the live\n // DOM (works per-instance); SKIP if the trigger isn't rendered yet, so we don't\n // clobber the correct rule page-ui's applyStateEnhancements already produced.\n const triggerCssId = node.stateTriggers?.[state];\n if (!triggerCssId) continue;\n const scopeId = this.resolveTargetedScopeId(childEl, triggerCssId);\n if (!scopeId) continue;\n this.styleRegistry.upsert(cssId, stateMap ? composeVirtualTraits(stateMap, initialStyle) : {}, state, scopeId, triggerCssId);\n } else if (stateMap) {\n this.styleRegistry.upsert(cssId, composeVirtualTraits(stateMap, initialStyle), state);\n }\n }\n }\n // Breakpoint layers — AFTER the state loop, so every scope resolved above is recorded.\n this.styleRegistry.upsertResponsive(cssId, initialStyle, node.stateStyles as any, node.responsive);\n }\n\n // Set nodeId — declared as @Input() on every builder component.\n if (cssId) {\n componentRef.setInput('nodeId', cssId);\n }\n\n // Pass the node reference. 'node' is NOT declared as @Input on leaf\n // components (Card, Text, etc.) — always use direct assignment to avoid\n // Angular NG0303 warnings that setInput() would trigger.\n (componentRef.instance as any)['node'] = node;\n\n // Layout components (Section/Container) read this.style internally for\n // CDK drop list orientation. 'style' is not declared as @Input so use\n // direct assignment; children and dropListId ARE @Input on all layouts.\n // Guard with Array.isArray so leaf nodes whose serialized data happens\n // to have a stale/empty children key don't trigger NG0303.\n const instance = componentRef.instance as any;\n if (Array.isArray(node.children) && 'dropListId' in instance) {\n instance['style'] = { ...initialStyle };\n componentRef.setInput('children', node.children);\n componentRef.setInput('dropListId', `section-${++dropListCounter}`);\n }\n\n // Forward child events from layout components (Section → builder)\n const childClick: EventEmitter<any> = instance['childClick'];\n const childMouseEnter: EventEmitter<any> = instance['childMouseEnter'];\n const childMouseLeave: EventEmitter<any> = instance['childMouseLeave'];\n if (childClick) this.childSubs.push(childClick.subscribe((e: any) => this.onClick.emit(e)));\n if (childMouseEnter) this.childSubs.push(childMouseEnter.subscribe((e: any) => this.onMouseEnter.emit(e)));\n if (childMouseLeave) this.childSubs.push(childMouseLeave.subscribe(() => this.onMouseLeave.emit()));\n\n componentRef.changeDetectorRef.detectChanges();\n\n // Attach overlay-driven DOM event listeners directly on the component host element.\n // For layout components the host element is <app-section>; for leaf components\n // it is e.g. <app-card>. Either way this is the correct inspectable element.\n const nativeEl: HTMLElement | null = componentRef.location?.nativeElement ?? null;\n\n // Custom element host defaults to display:inline. Set it to block so it participates\n // properly in layout and CDK can capture its bounding rect. SKIP for directive-hosts: the\n // host is a real element with its own display, and an inline style here out-ranks both\n // `:host` and the styleProps `.iox-node` rule (it would e.g. force Link's <a> to block).\n if (nativeEl && !DIRECTIVE_HOST_TYPES.has(node.type)) {\n nativeEl.style.display = 'block';\n }\n // Preview clones (repeater/slider-generated rows) are display-only — only the\n // template node is selectable/editable. Skip overlay registration + interaction\n // wiring for them so they can't be hovered, selected, or edited on the canvas.\n const isPreviewClone = !!(node as any).__previewClone;\n if (nativeEl && !isPreviewClone) {\n // WRAPPER-COLLAPSE (opt-in via ioxDragSourceId): the HOST is the flex/grid item, so it\n // carries `iox-outer-{id}` (margin/width) IN ADDITION to `iox-node-{id}` (visual) — one\n // element, like the engine — and drag is registered on it (the wrapper is gone). The\n // StyleRegistry's split still works: both classes are on this one host.\n if (this.ioxDragSourceId != null && cssId) {\n nativeEl.classList.add(`iox-outer-${cssId}`);\n const sourceId = this.ioxDragSourceId;\n this.dragEngine.registerDraggable(nativeEl, () => ({\n type: 'internal' as const,\n data: node,\n sourceId,\n sourceIndex: this.dragEngine.getData(sourceId)?.indexOf(node) ?? -1,\n }));\n this.hostDragEl = nativeEl;\n }\n // Register node → element mapping for parent lookups\n this.overlayService.registerNode(node, nativeEl, componentRef);\n // Notify BindingsComponent so it re-applies bindings on the new\n // ComponentRef — needed after cross-container drag where Angular\n // creates a fresh instance that hasn't had bindings pushed to it yet.\n this.panelEventService.emit(PanelEventTypes.NODE_RENDERED, { node });\n\n nativeEl.addEventListener('mouseenter', (event: MouseEvent) => {\n if ((event as any)._fromClick) return;\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onMouseEnter.emit({ element: nativeEl, node });\n });\n nativeEl.addEventListener('mouseleave', (event: MouseEvent) => {\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n // When leaving a child component, check if the mouse moved to a\n // parent component (e.g. card → section). If so, emit mouseenter\n // for that parent instead of clearing hover entirely.\n const related = event.relatedTarget as HTMLElement | null;\n if (related) {\n const parentEntry = this.findParentNodeElement(related);\n if (parentEntry) {\n this.onMouseEnter.emit(parentEntry);\n return;\n }\n }\n this.onMouseLeave.emit();\n });\n nativeEl.addEventListener('click', (event: MouseEvent) => {\n event.stopPropagation();\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onClick.emit({ element: nativeEl, node, componentRef });\n });\n nativeEl.addEventListener('contextmenu', (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onClick.emit({ element: nativeEl, node, componentRef });\n this.overlayService.triggerContextMenu(event.clientX, event.clientY);\n });\n }\n\n // Wire up interactions (animations) after the element is in the DOM. Preview clones are\n // non-selectable (not overlay-registered) but MUST still animate — parity with the SSR\n // runtime, which animates every repeated row — so attach by element (issue #2).\n if (!isPreviewClone) {\n this.interactionEngine.attach(node);\n } else if (nativeEl) {\n this.interactionEngine.attachTo(node, nativeEl);\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { StylePreset } from '../models/component.model';\n\n/**\n * PresetRegistryService — in-memory store for org-level style presets.\n *\n * Loaded once per page by PageUiComponent (alongside the page layout) and\n * injected into the overlay (for badge labels) and style panel (for apply /\n * create / edit / detach flows).\n *\n * Scoped to PageUiComponent.providers[] — one registry per builder instance.\n */\n@Injectable()\nexport class PresetRegistryService {\n private presets = new Map<string, StylePreset>();\n\n setPresets(presets: StylePreset[]): void {\n this.presets.clear();\n for (const p of presets) {\n this.presets.set(p.id, p);\n }\n }\n\n getPreset(id: string): StylePreset | undefined {\n return this.presets.get(id);\n }\n\n getAll(): StylePreset[] {\n return Array.from(this.presets.values());\n }\n\n upsert(preset: StylePreset): void {\n this.presets.set(preset.id, preset);\n }\n\n remove(id: string): void {\n this.presets.delete(id);\n }\n\n /**\n * Resolve the effective style map for a node that references a preset.\n * Merges preset base styles with the node's local overrides so that\n * element-level values always win.\n *\n * @param presetId ID of the applied preset.\n * @param overrides The node's `styleOverrides` record (may be empty).\n */\n resolveStyles(presetId: string, overrides: Record<string, any>): Record<string, any> {\n const preset = this.presets.get(presetId);\n if (!preset) return { ...overrides };\n return { ...preset.styleProps, ...overrides };\n }\n}\n","import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService } from '../services/drag-engine.service';\n\n@Directive({\n selector: '[ioxDraggable]',\n standalone: false,\n})\nexport class IoxDraggableDirective implements OnInit, OnDestroy {\n /** The node (for canvas items) or component type string (for sidebar items). */\n @Input() ioxDragData: ComponentNode | string = '';\n /** Drop-zone id the item lives in. Null for sidebar items. */\n @Input() ioxDragSourceId: string | null = null;\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n ) {}\n\n ngOnInit(): void {\n this.dragEngine.registerDraggable(this.el.nativeElement, () => {\n const data = this.ioxDragData;\n const type: 'internal' | 'external' = typeof data === 'string' ? 'external' : 'internal';\n const sourceIndex = type === 'internal' && this.ioxDragSourceId\n ? (this.dragEngine.getData(this.ioxDragSourceId)?.indexOf(data as ComponentNode) ?? -1)\n : -1;\n return { type, data, sourceId: this.ioxDragSourceId, sourceIndex };\n });\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDraggable(this.el.nativeElement);\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { OverlayEntry, OverlayService, ToolbarAction } from './overlay.service';\nimport { IoxInteraction } from '../models/component.model';\nimport { ViewportService } from '../services/viewport.service';\nimport { PresetRegistryService } from '../services/preset-registry.service';\nimport { SymbolRegistryService } from '../services/symbol-registry.service';\nimport { InteractionPresetRegistryService } from '../services/interaction-preset-registry.service';\nimport { InteractionEngineService } from '../services/interaction-engine.service';\nimport { BuilderClipboardService } from '../services/builder-clipboard.service';\nimport { StyleRegistryService } from '../services/style-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../panels/panel-event.service';\nimport { DragEngineService } from '../services/drag-engine.service';\n\n@Component({\n selector: 'app-overlay',\n templateUrl: './overlay.component.html',\n styleUrls: ['./overlay.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OverlayComponent implements OnInit, OnDestroy {\n @Output() toolbarAction = new EventEmitter<{ action: ToolbarAction; entry: OverlayEntry; position?: 'before' | 'after'; interaction?: IoxInteraction; wrapType?: string }>();\n\n /** Element types the selected node can be wrapped in (Wrap-in submenu). Phase 1: layout containers. */\n readonly wrapTargets: { type: string; label: string; icon: string }[] = [\n { type: 'Container', label: 'Container', icon: 'ph-thin ph-square' },\n { type: 'LinkedContainer', label: 'Linked Container', icon: 'ph-thin ph-link-simple' },\n ];\n\n /** Whether the Wrap-in flyout submenu is open (hover-driven). */\n public wrapSubmenuOpen = false;\n\n public hoverEntry: OverlayEntry | null = null;\n public selectEntry: OverlayEntry | null = null;\n\n // Hover: Chrome DevTools-style ring layers (clip-path punches out content area)\n public hiOutlineStyle: Record<string, string> = {};\n public hiMarginStyle: Record<string, string> = {};\n public hiPaddingStyle: Record<string, string> = {};\n\n // Select: simple IOX pink outline\n public selectOutlineStyle: Record<string, string> = {};\n\n // More dropdown — opened from the ⋯ button or from a right-click.\n // Position is set to fixed viewport coords so it appears at the cursor.\n public moreMenuVisible = false;\n public moreMenuStyle: Record<string, string> = {};\n\n // Badge context menu — opened by right-clicking a preset badge.\n public badgeMenuVisible = false;\n public badgeMenuType: 'style' | 'interaction' | null = null;\n public badgeMenuPos = { x: 0, y: 0 };\n // The specific IoxInteraction being right-clicked (interaction badges only).\n public badgeInteraction: IoxInteraction | null = null;\n\n // Tracks which badge was last clicked — used by Cmd+C in page-ui.\n public activeBadgeType: 'style' | 'interaction' | null = null;\n\n private subs: Subscription[] = [];\n private resizeObserver?: ResizeObserver;\n private containerResizeObserver?: ResizeObserver;\n private mutationObserver?: MutationObserver;\n // All overlay repositioning is funnelled through a single coalesced RAF.\n // Observer callbacks (Resize/Mutation) MUST NOT call updateAll()/markForCheck()\n // synchronously — during a live interaction animation they can fire while\n // Angular is inside ApplicationRef.synchronize(), re-dirtying the view within\n // the same loop and blowing past MAX_SYNC_RUNS → NG0103. scheduleUpdate() defers\n // the markForCheck to the next frame, outside the current synchronize() pass,\n // and collapses a burst of notifications into one update per frame.\n private _updateRaf = 0;\n private scheduleUpdate = (): void => {\n cancelAnimationFrame(this._updateRaf);\n this._updateRaf = requestAnimationFrame(() => this.updateAll());\n };\n private boundUpdate = () => this.scheduleUpdate();\n private boundScrollUpdate = () => this.scheduleUpdate();\n private activeScrollContainer: HTMLElement | null = null;\n\n constructor(\n private overlayService: OverlayService,\n private viewportService: ViewportService,\n private presetRegistry: PresetRegistryService,\n private symbolRegistry: SymbolRegistryService,\n private interactionPresetRegistry: InteractionPresetRegistryService,\n private interactionEngine: InteractionEngineService,\n private clipboard: BuilderClipboardService,\n private styleRegistry: StyleRegistryService,\n private panelEventService: PanelEventService,\n private cdr: ChangeDetectorRef,\n private dragEngine: DragEngineService,\n ) {}\n\n /** Resolves the selected node's OWNING dropzone id dynamically — the drag-handle isn't\n * rendered inside any container (it's overlay chrome), so it has no source id of its own. */\n get dragHandleSourceId(): string | null {\n const node = this.selectEntry?.node;\n return node ? this.dragEngine.findSourceIdForNode(node) : null;\n }\n\n ngOnInit(): void {\n this.subs.push(\n this.overlayService.hover$.subscribe(entry => {\n this.hoverEntry = entry;\n this.updateHover();\n this.cdr.markForCheck();\n }),\n this.overlayService.select$.subscribe(entry => {\n this.selectEntry = entry;\n if (!entry) this.activeBadgeType = null;\n this.observeSelectElement();\n this.updateSelect();\n this.cdr.markForCheck();\n })\n );\n\n window.addEventListener('resize', this.boundUpdate, { passive: true });\n\n // Re-calculate overlay positions whenever zoom / device changes.\n this.subs.push(\n this.viewportService.state$.subscribe(() => {\n // Delay one frame so the DOM has applied the new transform/width.\n this.scheduleUpdate();\n })\n );\n\n // Re-calculate when CSS rules change (margin/width applied via stylesheet).\n this.subs.push(\n this.styleRegistry.changes$.subscribe(() => this.scheduleUpdate())\n );\n\n // Watch the canvas container for size changes (e.g. right panel open/close\n // transition changes canvas width, shifting element positions).\n const container = this.overlayService.getContainer();\n if (container) {\n if (typeof ResizeObserver !== 'undefined') {\n this.containerResizeObserver = new ResizeObserver(this.scheduleUpdate);\n this.containerResizeObserver.observe(container);\n }\n }\n\n // iox-page-component's Lenis dispatches a synthetic 'scroll' event on\n // its wrapper element after each raf tick — listen to that to reposition\n // overlay boxes as the canvas scrolls.\n this.subs.push(\n this.overlayService.scrollContainer$.subscribe(el => {\n this.activeScrollContainer?.removeEventListener('scroll', this.boundScrollUpdate);\n this.activeScrollContainer = el;\n el.addEventListener('scroll', this.boundScrollUpdate, { passive: true });\n })\n );\n\n // Open the more menu when a canvas element is right-clicked.\n this.subs.push(\n this.overlayService.contextMenu$.subscribe(({ x, y }) => {\n this.moreMenuStyle = { top: `${y}px`, left: `${x}px` };\n this.moreMenuVisible = true;\n this.cdr.markForCheck();\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subs.forEach(s => s.unsubscribe());\n this.resizeObserver?.disconnect();\n this.containerResizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n cancelAnimationFrame(this._updateRaf);\n window.removeEventListener('resize', this.boundUpdate);\n this.activeScrollContainer?.removeEventListener('scroll', this.boundScrollUpdate);\n this.activeScrollContainer = null;\n }\n\n // ── Toolbar actions ──────────────────────────────────────\n onSelectParent(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.SelectParent, entry: this.selectEntry });\n }\n\n /** Quick-add (B2): open the components panel. The new element lands inside this node when it is\n * a container, otherwise right after it. */\n onAddElement(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.AddElement, entry: this.selectEntry });\n }\n\n onDuplicate(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Duplicate, entry: this.selectEntry });\n }\n\n onDelete(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Delete, entry: this.selectEntry });\n }\n\n onWrap(event: MouseEvent, wrapType: string): void {\n event.stopPropagation();\n this.wrapSubmenuOpen = false;\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Wrap, entry: this.selectEntry, wrapType });\n }\n\n /** Slider slides must stay direct children of the slider container — never wrap them. */\n get canWrap(): boolean {\n const type = this.selectEntry?.node?.type;\n return !!type && type !== 'SliderSlide';\n }\n\n onPlay(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Play, entry: this.selectEntry });\n }\n\n onSaveAsBlock(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.SaveAsBlock, entry: this.selectEntry });\n }\n\n onToggleMore(event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n if (this.moreMenuVisible) {\n this.moreMenuVisible = false;\n } else {\n this.moreMenuStyle = { top: `${event.clientY}px`, left: `${event.clientX}px` };\n this.moreMenuVisible = true;\n }\n this.cdr.markForCheck();\n }\n\n closeMoreMenu(): void {\n this.moreMenuVisible = false;\n this.wrapSubmenuOpen = false;\n this.cdr.markForCheck();\n }\n\n onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.moreMenuStyle = { top: `${event.clientY}px`, left: `${event.clientX}px` };\n this.moreMenuVisible = true;\n this.cdr.markForCheck();\n }\n\n onMakeGlobal(event: MouseEvent, position: 'before' | 'after'): void {\n event.stopPropagation();\n this.closeMoreMenu();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.MakeGlobal, entry: this.selectEntry, position });\n }\n\n onRemoveGlobal(event: MouseEvent): void {\n event.stopPropagation();\n this.closeMoreMenu();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.RemoveGlobal, entry: this.selectEntry });\n }\n\n get hasInteractions(): boolean {\n return !!this.selectEntry?.node?.interactions?.length;\n }\n\n get selectedNodeIsGlobal(): boolean {\n return !!this.selectEntry?.node?.isGlobal;\n }\n\n get selectedPresetName(): string | null {\n const id = this.selectEntry?.node?.stylePresetId;\n if (!id) return null;\n return this.presetRegistry.getPreset(id)?.name ?? null;\n }\n\n get isLinkedSymbol(): boolean {\n return !!this.selectEntry?.node?.symbolId;\n }\n\n get isDetachedSymbol(): boolean {\n const node = this.selectEntry?.node;\n if (!node || node.symbolId || !node.detachedSymbolId) return false;\n // Only show the re-link button when the backing block still exists.\n return this.symbolRegistry.isBlockSymbol(node.detachedSymbolId);\n }\n\n get linkedSymbolName(): string | null {\n const id = this.selectEntry?.node?.symbolId;\n if (!id) return null;\n return this.symbolRegistry.getSymbol(id)?.name ?? null;\n }\n\n get interactions(): IoxInteraction[] {\n return this.selectEntry?.node?.interactions ?? [];\n }\n\n triggerLabel(trigger: string): string {\n const labels: Record<string, string> = {\n pageLoad: 'Load', viewportEnter: 'Scroll', click: 'Click',\n hover: 'Hover', scrollProgress: 'Progress',\n };\n return labels[trigger] ?? trigger;\n }\n\n triggerIcon(trigger: string): string {\n const icons: Record<string, string> = {\n pageLoad: 'ph-thin ph-rocket-launch', viewportEnter: 'ph-thin ph-eye',\n click: 'ph-thin ph-cursor-click', hover: 'ph-thin ph-hand-pointing',\n scrollProgress: 'ph-thin ph-arrows-down-up',\n };\n return icons[trigger] ?? 'ph-thin ph-lightning';\n }\n\n actionLabel(ix: IoxInteraction): string {\n const first = ix.actions[0];\n if (!first) return '';\n const labels: Record<string, string> = {\n fadeIn: 'Fade In', fadeOut: 'Fade Out',\n moveUp: 'Move Up', moveDown: 'Move Down',\n moveLeft: 'Move Left', moveRight: 'Move Right',\n scaleIn: 'Scale In', scaleOut: 'Scale Out',\n rotate: 'Rotate', show: 'Show', hide: 'Hide',\n toggleVisibility: 'Toggle',\n };\n const label = labels[first.type] ?? first.type;\n return ix.actions.length > 1 ? `${label} +${ix.actions.length - 1}` : label;\n }\n\n get hasPresetInClipboard(): boolean { return !!this.clipboard.getPresetId(); }\n get hasInteractionPresetInClipboard(): boolean { return !!this.clipboard.getInteractionPresetId(); }\n\n onEditPreset(event: MouseEvent): void {\n event.stopPropagation();\n this.activeBadgeType = 'style';\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.EditPreset, entry: this.selectEntry });\n }\n\n /**\n * Interaction badge clicked. It must ONLY open the Interactions panel with THIS interaction\n * active — it must NOT fire the element's (live) animation. `preventDefault` + `stopPropagation`\n * fully swallow the pointer event so it can never reach the node's live `click` interaction\n * listener. The specific `ix` is forwarded so the builder can expand it in the panel.\n */\n onEditInteractionPreset(event: MouseEvent, ix?: IoxInteraction): void {\n event.preventDefault();\n event.stopPropagation();\n this.activeBadgeType = 'interaction';\n if (this.selectEntry) {\n this.toolbarAction.emit({ action: ToolbarAction.EditInteractionPreset, entry: this.selectEntry, interaction: ix });\n }\n }\n\n /** Swallow the follow-up click on the badge so it can't reach the canvas / a live interaction. */\n onBadgeClickSwallow(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // ── Badge context menu ───────────────────────────────────\n\n onBadgeContextMenu(event: MouseEvent, type: 'style' | 'interaction', ix?: IoxInteraction): void {\n event.preventDefault();\n event.stopPropagation();\n this.badgeMenuType = type;\n this.badgeInteraction = ix ?? null;\n this.badgeMenuPos = { x: event.clientX, y: event.clientY };\n this.badgeMenuVisible = true;\n this.moreMenuVisible = false;\n this.cdr.markForCheck();\n }\n\n onBadgeCopy(): void {\n if (this.badgeMenuType === 'style') {\n const id = this.selectEntry?.node?.stylePresetId;\n if (id) this.clipboard.copyPreset(id);\n }\n this.closeBadgeMenu();\n }\n\n onBadgeEdit(): void {\n const type = this.badgeMenuType;\n this.closeBadgeMenu();\n if (type === 'style' && this.selectEntry) {\n this.activeBadgeType = 'style';\n this.toolbarAction.emit({ action: ToolbarAction.EditPreset, entry: this.selectEntry });\n } else if (type === 'interaction' && this.selectEntry) {\n this.activeBadgeType = 'interaction';\n this.toolbarAction.emit({ action: ToolbarAction.EditInteractionPreset, entry: this.selectEntry });\n }\n }\n\n onBadgeRemoveInteraction(): void {\n const node = this.selectEntry?.node;\n if (!node || !this.badgeInteraction) return;\n node.interactions = (node.interactions ?? []).filter(i => i.id !== this.badgeInteraction!.id);\n if (!node.interactions.length) node.interactionPresetId = undefined;\n this.interactionEngine.refresh(node);\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, node);\n this.closeBadgeMenu();\n }\n\n closeBadgeMenu(): void {\n this.badgeMenuVisible = false;\n this.cdr.markForCheck();\n }\n\n get hasCopiedNode(): boolean { return !!this.clipboard.getNode(); }\n\n onCopyNode(event: MouseEvent): void {\n event.stopPropagation();\n const node = this.selectEntry?.node;\n if (node) this.clipboard.copyNode(node);\n this.closeMoreMenu();\n }\n\n onPasteNode(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Paste, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n onCopyPreset(event: MouseEvent): void {\n event.stopPropagation();\n const id = this.selectEntry?.node?.stylePresetId;\n if (id) this.clipboard.copyPreset(id);\n this.closeMoreMenu();\n }\n\n onPastePreset(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.PastePreset, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n onCopyInteractionPreset(event: MouseEvent): void {\n event.stopPropagation();\n const id = this.selectEntry?.node?.interactionPresetId;\n if (id) this.clipboard.copyInteractionPreset(id);\n this.closeMoreMenu();\n }\n\n onPasteInteractionPreset(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.PasteInteractionPreset, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n get isSliderContainer(): boolean {\n return this.selectEntry?.node?.type === 'SliderContainer';\n }\n\n onAddSlide(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.AddSlide, entry: this.selectEntry });\n }\n\n onDetachSymbol(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.DetachSymbol, entry: this.selectEntry });\n }\n\n onResyncSymbol(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.ResyncSymbol, entry: this.selectEntry });\n }\n\n private observeSelectElement(): void {\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n // Scroll listener is on the container permanently (attached in ngOnInit).\n // No need to re-attach it here.\n\n if (!this.selectEntry?.element) return;\n\n // Observe the inner styled element — that's where [ngStyle] applies CSS.\n const styledEl = this.overlayService.getStyledElement(this.selectEntry.element);\n\n // ResizeObserver — catches size changes.\n // Skip the first callback: it fires synchronously on observe() in the same\n // microtask as the select$ subscription which already calls updateAll().\n // Painting twice in one frame causes a visible flicker.\n if (typeof ResizeObserver !== 'undefined') {\n let skipFirst = true;\n this.resizeObserver = new ResizeObserver(() => {\n if (skipFirst) { skipFirst = false; return; }\n this.scheduleUpdate();\n });\n this.resizeObserver.observe(styledEl);\n }\n\n // MutationObserver — catches style attribute changes (margin, padding etc.)\n this.mutationObserver = new MutationObserver(this.scheduleUpdate);\n this.mutationObserver.observe(styledEl, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n\n private updateAll(): void {\n this.updateHover();\n this.updateSelect();\n this.cdr.markForCheck();\n }\n\n private updateHover(): void {\n if (!this.hoverEntry) {\n this.hiOutlineStyle = {};\n this.hiMarginStyle = {};\n this.hiPaddingStyle = {};\n return;\n }\n\n const styledEl = this.overlayService.getStyledElement(this.hoverEntry.element);\n const rect = styledEl.getBoundingClientRect();\n // Recalculate fresh — stored boxModel can be stale if CSS rules changed.\n const { margin, border, padding } = this.overlayService.buildBoxModel(this.hoverEntry.element);\n\n // All overlay boxes use position:fixed with raw viewport coords from\n // getBoundingClientRect() — no container offset subtraction.\n // This matches the approach used by the drop-target overlay and the drag\n // clone, both of which position correctly at any zoom level.\n // Using cRect subtraction + position:absolute inside .preview (which has\n // contain:layout paint) caused sub-pixel accumulation errors at zoom != 100%.\n const scale = this.viewportService.getScale();\n\n // Scale the spacing values: getComputedStyle returns unscaled CSS px,\n // getBoundingClientRect returns scaled viewport px. Both must match.\n const m = {\n top: margin.top * scale,\n right: margin.right * scale,\n bottom: margin.bottom * scale,\n left: margin.left * scale,\n };\n const mW = rect.width + m.left + m.right;\n const mH = rect.height + m.top + m.bottom;\n\n this.hiOutlineStyle = this.createBoxStyle(rect.top, rect.left, rect.width, rect.height);\n\n // Orange ring: margin-box with border-box punched out\n this.hiMarginStyle = {\n ...this.createBoxStyle(rect.top - m.top, rect.left - m.left, mW, mH),\n 'clip-path': this.createRingClipPath(mW, mH, m.top, m.right, m.bottom, m.left),\n };\n\n // Green ring: border-box with content-box punched out\n const bpTop = (border.top + padding.top) * scale;\n const bpRight = (border.right + padding.right) * scale;\n const bpBottom = (border.bottom + padding.bottom) * scale;\n const bpLeft = (border.left + padding.left) * scale;\n this.hiPaddingStyle = {\n ...this.createBoxStyle(rect.top, rect.left, rect.width, rect.height),\n 'clip-path': this.createRingClipPath(rect.width, rect.height, bpTop, bpRight, bpBottom, bpLeft),\n };\n }\n\n private updateSelect(): void {\n if (!this.selectEntry) {\n this.selectOutlineStyle = {};\n return;\n }\n\n const styledEl = this.overlayService.getStyledElement(this.selectEntry.element);\n const rect = styledEl.getBoundingClientRect();\n // position:fixed with raw viewport coords — same reasoning as updateHover.\n this.selectOutlineStyle = this.createBoxStyle(rect.top, rect.left, rect.width, rect.height);\n }\n\n /** Build position/size styles for a position:fixed overlay box. */\n private createBoxStyle(top: number, left: number, width: number, height: number): Record<string, string> {\n return {\n top: `${top}px`,\n left: `${left}px`,\n width: `${Math.max(width, 0)}px`,\n height: `${Math.max(height, 0)}px`,\n };\n }\n\n private createRingClipPath(w: number, h: number, inTop: number, inRight: number, inBottom: number, inLeft: number): string {\n const x1 = Math.max(inLeft, 0);\n const y1 = Math.max(inTop, 0);\n const x2 = Math.max(w - inRight, x1);\n const y2 = Math.max(h - inBottom, y1);\n // Each sub-rect must be explicitly closed so the bridge between them\n // is a zero-area line — prevents diagonal edge triangle artifacts.\n return `polygon(evenodd, 0px 0px, ${w}px 0px, ${w}px ${h}px, 0px ${h}px, 0px 0px, ${x1}px ${y1}px, ${x2}px ${y1}px, ${x2}px ${y2}px, ${x1}px ${y2}px, ${x1}px ${y1}px)`;\n }\n\n}\n","<div class=\"overlay-root\">\n\n <!-- HOVER — Chrome DevTools-style rings (content area stays transparent) -->\n <ng-container *ngIf=\"hoverEntry\">\n <div class=\"hi-outline\" [ngStyle]=\"hiOutlineStyle\"></div>\n <div class=\"hi-margin\" [ngStyle]=\"hiMarginStyle\"></div>\n <div class=\"hi-padding\" [ngStyle]=\"hiPaddingStyle\"></div>\n </ng-container>\n\n <!-- SELECT — IOX pink outline + toolbar -->\n <div class=\"select-outline\" *ngIf=\"selectEntry\" [ngStyle]=\"selectOutlineStyle\">\n\n <!-- Preset badges container — below the outline, start-aligned -->\n <div class=\"preset-badge\" *ngIf=\"selectedPresetName || interactions.length\">\n <div *ngIf=\"selectedPresetName\"\n class=\"preset-badge__item\"\n [class.preset-badge__item--active]=\"activeBadgeType === 'style'\"\n title=\"Style preset: {{ selectedPresetName }} — click to edit, right-click to copy\"\n (mousedown)=\"onEditPreset($event)\"\n (contextmenu)=\"onBadgeContextMenu($event, 'style')\">\n <i class=\"ph-fill ph-paint-bucket\"></i>\n <span>{{ selectedPresetName }}</span>\n </div>\n <div *ngFor=\"let ix of interactions\"\n class=\"preset-badge__item preset-badge__item--interaction\"\n [class.preset-badge__item--active]=\"activeBadgeType === 'interaction'\"\n [title]=\"triggerLabel(ix.trigger) + ': ' + actionLabel(ix) + ' — click to edit, right-click to remove'\"\n (mousedown)=\"onEditInteractionPreset($event, ix)\"\n (click)=\"onBadgeClickSwallow($event)\"\n (contextmenu)=\"onBadgeContextMenu($event, 'interaction', ix)\">\n <i [class]=\"triggerIcon(ix.trigger)\"></i>\n <span>{{ triggerLabel(ix.trigger) }}: {{ actionLabel(ix) }}</span>\n </div>\n </div>\n\n <div class=\"select-toolbar\" (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n\n <!-- Drag handle — grab here to move the selected element. A click-and-hold ANYWHERE\n on the element body would otherwise grab whatever nested child the pointer lands\n on; DragEngineService redirects any drag starting here to the selected node. -->\n <button *ngIf=\"selectEntry?.node\" class=\"toolbar-btn toolbar-btn--drag-handle\"\n ioxDraggable data-iox-drag-handle\n [ioxDragData]=\"selectEntry?.node\"\n [ioxDragSourceId]=\"dragHandleSourceId\"\n title=\"Drag to move\">\n <i class=\"ph-thin ph-dots-six-vertical\"></i>\n </button>\n <span class=\"toolbar-sep\"></span>\n\n <!-- Component name -->\n <span class=\"toolbar-name\">{{ selectEntry?.componentName }}</span>\n <span class=\"toolbar-sep\"></span>\n\n <!-- Quick actions -->\n <button *ngIf=\"isSliderContainer\" class=\"toolbar-btn toolbar-btn--add-slide\" title=\"Add slide\" (mousedown)=\"onAddSlide($event)\">\n <i class=\"ph-thin ph-plus\"></i>\n <span class=\"toolbar-btn__label\">Add slide</span>\n </button>\n <button class=\"toolbar-btn\" title=\"Add an element here\" aria-label=\"Add an element here\" (mousedown)=\"onAddElement($event)\">\n <i class=\"ph-thin ph-plus\"></i>\n </button>\n <button class=\"toolbar-btn\" title=\"Duplicate\" (mousedown)=\"onDuplicate($event)\">\n <i class=\"ph-thin ph-copy\"></i>\n </button>\n <button *ngIf=\"hasInteractions\" class=\"toolbar-btn toolbar-btn--play\" title=\"Play animations\" (mousedown)=\"onPlay($event)\">\n <i class=\"ph-thin ph-play\"></i>\n </button>\n <button *ngIf=\"isLinkedSymbol\" class=\"toolbar-btn toolbar-btn--symbol\"\n [title]=\"(linkedSymbolName ? linkedSymbolName : 'Symbol') + ' — click to detach'\"\n (mousedown)=\"onDetachSymbol($event)\">\n <i class=\"ph-thin ph-link\"></i>\n <span class=\"toolbar-btn__label\">{{ linkedSymbolName || 'Symbol' }}</span>\n </button>\n <button *ngIf=\"isDetachedSymbol\" class=\"toolbar-btn toolbar-btn--resync\"\n title=\"Detached — click to re-link\"\n (mousedown)=\"onResyncSymbol($event)\">\n <i class=\"ph-thin ph-link-break\"></i>\n <span class=\"toolbar-btn__label\">Detached</span>\n </button>\n <button class=\"toolbar-btn toolbar-btn--danger\" title=\"Delete\" (mousedown)=\"onDelete($event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n <span class=\"toolbar-sep\"></span>\n <button class=\"toolbar-btn\" title=\"Select parent\" (mousedown)=\"onSelectParent($event)\">\n <i class=\"ph-thin ph-arrow-up\"></i>\n </button>\n\n <!-- More menu trigger — opens a fixed-position dropdown at the cursor -->\n <button class=\"toolbar-btn toolbar-btn--more\" title=\"More actions\" (mousedown)=\"onToggleMore($event)\">\n <i class=\"ph-thin ph-dots-three\"></i>\n </button>\n </div>\n </div>\n\n <!-- Shared more/context menu — fixed-position, opened by ⋯ button or right-click -->\n <div *ngIf=\"moreMenuVisible\" class=\"toolbar-more-dropdown\" [ngStyle]=\"moreMenuStyle\"\n (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n <button class=\"more-item\" (mousedown)=\"onSelectParent($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-arrow-up\"></i>\n Select parent\n </button>\n <button class=\"more-item\" (mousedown)=\"onDuplicate($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-copy\"></i>\n Duplicate\n </button>\n <div *ngIf=\"canWrap\" class=\"more-item-submenu\"\n (mouseenter)=\"wrapSubmenuOpen = true\" (mouseleave)=\"wrapSubmenuOpen = false\">\n <button class=\"more-item\" (mousedown)=\"$event.stopPropagation()\">\n <i class=\"ph-thin ph-selection-plus\"></i>\n Wrap in\n <i class=\"ph-thin ph-caret-right more-item__chevron\"></i>\n </button>\n <div *ngIf=\"wrapSubmenuOpen\" class=\"more-submenu-flyout\">\n <button *ngFor=\"let target of wrapTargets\" class=\"more-item\"\n (mousedown)=\"onWrap($event, target.type); closeMoreMenu()\">\n <i [class]=\"target.icon\"></i>\n {{ target.label }}\n </button>\n </div>\n </div>\n <button class=\"more-item more-item--danger\" (mousedown)=\"onDelete($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-trash\"></i>\n Delete\n </button>\n <div class=\"more-divider\"></div>\n <button class=\"more-item\" (mousedown)=\"onCopyNode($event)\">\n <i class=\"ph-thin ph-scissors\"></i>\n Copy element\n </button>\n <button *ngIf=\"hasCopiedNode\" class=\"more-item\" (mousedown)=\"onPasteNode($event)\">\n <i class=\"ph-thin ph-clipboard\"></i>\n Paste element\n </button>\n <div class=\"more-divider\"></div>\n <button *ngIf=\"selectEntry?.node?.stylePresetId\" class=\"more-item\" (mousedown)=\"onCopyPreset($event)\">\n <i class=\"ph-thin ph-paint-bucket\"></i>\n Copy style preset\n </button>\n <button *ngIf=\"hasPresetInClipboard\" class=\"more-item\" (mousedown)=\"onPastePreset($event)\">\n <i class=\"ph-thin ph-paint-bucket\"></i>\n Paste style preset\n </button>\n <button *ngIf=\"selectEntry?.node?.interactionPresetId\" class=\"more-item\" (mousedown)=\"onCopyInteractionPreset($event)\">\n <i class=\"ph-thin ph-lightning\"></i>\n Copy interaction preset\n </button>\n <button *ngIf=\"hasInteractionPresetInClipboard\" class=\"more-item\" (mousedown)=\"onPasteInteractionPreset($event)\">\n <i class=\"ph-thin ph-lightning\"></i>\n Paste interaction preset\n </button>\n <div class=\"more-divider\"></div>\n <button *ngIf=\"isLinkedSymbol\" class=\"more-item\" (mousedown)=\"onDetachSymbol($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-link-break\"></i>\n Detach from symbol<ng-container *ngIf=\"linkedSymbolName\"> ({{ linkedSymbolName }})</ng-container>\n </button>\n <button *ngIf=\"isDetachedSymbol\" class=\"more-item more-item--resync\" (mousedown)=\"onResyncSymbol($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-link\"></i>\n Re-link to symbol\n </button>\n <button class=\"more-item\" (mousedown)=\"onSaveAsBlock($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-bookmark\"></i>\n Save as reusable block\n </button>\n <button *ngIf=\"hasInteractions\" class=\"more-item more-item--play\" (mousedown)=\"onPlay($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-play\"></i>\n Play animations\n </button>\n <div class=\"more-divider\"></div>\n <ng-container *ngIf=\"!selectedNodeIsGlobal; else removeGlobalItem\">\n <button class=\"more-item\" (mousedown)=\"onMakeGlobal($event, 'before')\">\n <i class=\"ph-thin ph-globe\"></i>\n Make Global (Before Content)\n </button>\n <button class=\"more-item\" (mousedown)=\"onMakeGlobal($event, 'after')\">\n <i class=\"ph-thin ph-globe\"></i>\n Make Global (After Content)\n </button>\n </ng-container>\n <ng-template #removeGlobalItem>\n <button class=\"more-item\" (mousedown)=\"onRemoveGlobal($event)\">\n <i class=\"ph-thin ph-globe\"></i>\n Remove from Global\n </button>\n </ng-template>\n </div>\n\n <!-- Backdrop to close the more menu -->\n <div *ngIf=\"moreMenuVisible\" class=\"overlay-context-backdrop\"\n (mousedown)=\"closeMoreMenu()\">\n </div>\n\n <!-- Badge context menu — options differ by badge type -->\n <div *ngIf=\"badgeMenuVisible\" class=\"badge-context-menu\"\n [ngStyle]=\"{ top: badgeMenuPos.y + 'px', left: badgeMenuPos.x + 'px' }\"\n (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n <ng-container *ngIf=\"badgeMenuType === 'style'\">\n <button class=\"more-item\" (mousedown)=\"onBadgeCopy()\">\n <i class=\"ph-thin ph-copy\"></i>\n Copy preset\n </button>\n <button class=\"more-item\" (mousedown)=\"onBadgeEdit()\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n Edit preset\n </button>\n </ng-container>\n <ng-container *ngIf=\"badgeMenuType === 'interaction'\">\n <button class=\"more-item\" (mousedown)=\"onBadgeEdit()\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n Edit in panel\n </button>\n <button class=\"more-item more-item--danger\" (mousedown)=\"onBadgeRemoveInteraction()\">\n <i class=\"ph-thin ph-trash\"></i>\n Remove interaction\n </button>\n </ng-container>\n </div>\n <div *ngIf=\"badgeMenuVisible\" class=\"overlay-context-backdrop\"\n (mousedown)=\"closeBadgeMenu()\">\n </div>\n\n</div>\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Canvas data preview used to come from host-provided content services (IOX_CONTENT_SERVICE /\n * IOX_SHOP_SERVICE), whose `getContent(contentType, orgId)` hit the ADMIN resources endpoint and\n * accepted no filters — so the Repeater/Slider ignored every data-source filter. Data now flows\n * through BuilderDataSourceService + the shared planDataSource, configured with\n * IOX_DATA_SOURCE_ENDPOINTS. Those tokens are gone; do not reintroduce a fetch that bypasses it.\n */\n\n/** Optional font manager. Provide from the host app to populate the fontFamily dropdown. */\nexport const IOX_FONT_MANAGER = new InjectionToken<IoxFontManager>('IOX_FONT_MANAGER');\n\nexport interface IoxFontManager {\n loadFonts(orgId: string): void;\n uploadedFonts$: import('rxjs').Observable<any>;\n getAllFontOptions(): { label: string; value: string }[];\n}\n\n/**\n * Translates the builder library's OWN chrome.\n *\n * The library cannot depend on ngx-translate — that is the host app's choice — but its toolbar was\n * hardcoded English, which shows through as untranslated controls in a Hebrew/RTL admin. This token\n * lets the host route those strings through its own i18n while the library keeps working standalone:\n * unprovided, `defaultBuilderLabels` returns the English text, so nothing ever renders a raw key.\n *\n * Keys are namespaced `builder.chrome.*` and listed in `BUILDER_CHROME_EN` below — that object is\n * the contract. A host providing this token should add those keys to its own bundles.\n */\nexport const IOX_BUILDER_LABELS = new InjectionToken<BuilderLabelResolver>('IOX_BUILDER_LABELS', {\n providedIn: 'root',\n factory: () => defaultBuilderLabels,\n});\n\nexport type BuilderLabelResolver = (key: string, fallback: string) => string;\n\n/** Standalone behaviour: the English text the library ships with. */\nexport const defaultBuilderLabels: BuilderLabelResolver = (_key, fallback) => fallback;\n\n/**\n * Every user-visible string in the builder's own chrome, so a host can copy this into its bundles\n * in one go rather than discovering keys one missing label at a time.\n */\nexport const BUILDER_CHROME_EN: Readonly<Record<string, string>> = Object.freeze({\n 'builder.chrome.select': 'Select',\n 'builder.chrome.pan': 'Pan',\n 'builder.chrome.style': 'Style',\n 'builder.chrome.publish': 'Publish',\n 'builder.chrome.unpublish': 'Unpublish',\n 'builder.chrome.breakpoint': 'Breakpoint',\n 'builder.chrome.formState': 'Form state',\n 'builder.chrome.formStateIdle': 'Idle',\n 'builder.chrome.formStateSubmitting': 'Sending',\n 'builder.chrome.formStateSuccess': 'Success',\n 'builder.chrome.formStateError': 'Error',\n 'builder.chrome.formStateHint': 'Show the form’s {state} state',\n 'builder.chrome.screenWidth': 'Screen width',\n 'builder.chrome.zoom': 'Zoom',\n 'builder.chrome.audit': 'Responsive audit',\n 'builder.chrome.auditHint': 'Responsive audit — what is broken at this width',\n 'builder.chrome.undo': 'Undo',\n 'builder.chrome.redo': 'Redo',\n 'builder.chrome.save': 'Save',\n 'builder.chrome.preview': 'Preview',\n});\n","import { Component, EventEmitter, Inject, Input, Output, ViewChild } from '@angular/core';\nimport { Popover } from 'primeng/popover';\n\nimport { Breakpoint, BREAKPOINTS, FormRenderState } from '@vectoriox/iox-ui';\nimport { BreakpointCounts } from '../utils/breakpoint-counts.util';\nimport { BUILDER_CHROME_EN, BuilderLabelResolver, IOX_BUILDER_LABELS } from '../tokens/builder.tokens';\nimport {\n BREAKPOINT_PRESENTATION,\n BuilderMode,\n ZOOM_OPTIONS,\n ScreenWidthOption,\n SCREEN_WIDTH_OPTIONS,\n} from '../panels/panel.model';\n\n@Component({\n selector: 'app-toolbar',\n templateUrl: './toolbar.component.html',\n styleUrls: ['./toolbar.component.scss'],\n standalone: false,\n})\nexport class ToolbarComponent {\n @Input() activeMode: BuilderMode = BuilderMode.Select;\n @Input() activeBreakpoint: Breakpoint = Breakpoint.Base;\n /** Overrides per breakpoint — for the selection, or the page when nothing is selected. */\n @Input() breakpointCounts: BreakpointCounts = {};\n /** Findings at the current width — shown as a count on the audit button. */\n @Input() auditCount = 0;\n @Input() auditOpen = false;\n @Input() activeZoom: number = 100;\n @Input() activeScreenWidth: number = 1440;\n @Input() canUndo = false;\n @Input() canRedo = false;\n @Input() isSaving = false;\n @Input() pageStatus: string = 'draft';\n /**\n * The form the selection sits inside, or null. CONTEXTUAL: the state switcher only appears when\n * there is a form to switch, because a permanently-present control for a rarely-present element\n * is exactly the toolbar clutter `builder-usability-plan.md` warns about.\n */\n @Input() formStateTarget: string | null = null;\n @Input() activeFormState: FormRenderState = FormRenderState.Idle;\n\n @Output() modeChange = new EventEmitter<BuilderMode>();\n @Output() breakpointChange = new EventEmitter<Breakpoint>();\n @Output() formStateChange = new EventEmitter<FormRenderState>();\n @Output() auditToggle = new EventEmitter<void>();\n @Output() zoomChange = new EventEmitter<number | 'fit'>();\n @Output() screenWidthChange = new EventEmitter<number>();\n @Output() undo = new EventEmitter<void>();\n @Output() redo = new EventEmitter<void>();\n @Output() save = new EventEmitter<void>();\n @Output() preview = new EventEmitter<void>();\n @Output() publishToggle = new EventEmitter<void>();\n\n get isPublished(): boolean {\n return this.pageStatus === 'published';\n }\n\n @ViewChild('modePopover') modePopover!: Popover;\n @ViewChild('zoomPopover') zoomPopover!: Popover;\n @ViewChild('widthPopover') widthPopover!: Popover;\n\n public modes = BuilderMode;\n public readonly breakpointIds = Breakpoint;\n /** Built once — the breakpoint set is fixed. Template binds fields, never method calls. */\n public readonly breakpointOptions = BREAKPOINTS.map(def => ({\n id: def.id,\n label: def.label,\n range: def.maxWidth === null ? 'default' : `≤ ${def.maxWidth}px`,\n ...BREAKPOINT_PRESENTATION[def.id],\n }));\n public zoomOptions = ZOOM_OPTIONS;\n public screenWidthOptions: ScreenWidthOption[] = SCREEN_WIDTH_OPTIONS;\n\n get activeModeIcon(): string {\n switch (this.activeMode) {\n case BuilderMode.Select: return 'ph-thin ph-cursor';\n case BuilderMode.Style: return 'ph-thin ph-paint-brush-broad';\n case BuilderMode.Pan: return 'ph-thin ph-hand';\n default: return 'ph-thin ph-cursor';\n }\n }\n\n get activeModeLabel(): string {\n switch (this.activeMode) {\n case BuilderMode.Style: return this.t('builder.chrome.style');\n case BuilderMode.Pan: return this.t('builder.chrome.pan');\n default: return this.t('builder.chrome.select');\n }\n }\n\n\n\n get zoomLabel(): string {\n return `${this.activeZoom}%`;\n }\n\n get sliderZoom(): number {\n return Math.min(100, Math.max(20, this.activeZoom));\n }\n\n // ── Mode ────────────────────────────────────────────────\n toggleModePopover(event: Event): void {\n this.modePopover.toggle(event);\n }\n\n selectMode(mode: BuilderMode): void {\n if (this.activeMode !== mode) {\n this.modeChange.emit(mode);\n }\n this.modePopover.hide();\n }\n\n constructor(@Inject(IOX_BUILDER_LABELS) private readonly labels: BuilderLabelResolver) {}\n\n // ── Breakpoint ──────────────────────────────────────────\n selectBreakpoint(bp: Breakpoint): void {\n if (this.activeBreakpoint !== bp) this.breakpointChange.emit(bp);\n }\n\n /** The four states, in the order a submission moves through them. */\n readonly formStates: { id: FormRenderState; labelKey: string; icon: string }[] = [\n { id: FormRenderState.Idle, labelKey: 'builder.chrome.formStateIdle', icon: 'ph-thin ph-textbox' },\n { id: FormRenderState.Submitting, labelKey: 'builder.chrome.formStateSubmitting', icon: 'ph-thin ph-circle-notch' },\n { id: FormRenderState.Success, labelKey: 'builder.chrome.formStateSuccess', icon: 'ph-thin ph-check-circle' },\n { id: FormRenderState.Error, labelKey: 'builder.chrome.formStateError', icon: 'ph-thin ph-warning-circle' },\n ];\n\n /**\n * Translate one of the builder's own chrome strings. Unprovided, the resolver returns the\n * English fallback from `BUILDER_CHROME_EN`, so the library still reads correctly standalone\n * and never renders a raw key.\n */\n t(key: string): string {\n return this.labels(key, BUILDER_CHROME_EN[key] ?? key);\n }\n\n /** \"Show the form's Success state\" — one key with a slot, not four sentences to translate. */\n formStateHint(state: { labelKey: string }): string {\n return this.t('builder.chrome.formStateHint').replace('{state}', this.t(state.labelKey));\n }\n\n get publishLabel(): string {\n return this.t(this.isPublished ? 'builder.chrome.unpublish' : 'builder.chrome.publish');\n }\n\n selectFormState(state: FormRenderState): void {\n if (this.activeFormState !== state) this.formStateChange.emit(state);\n }\n\n // ── Zoom slider ──────────────────────────────────────────\n onSliderChange(event: Event): void {\n const value = +(event.target as HTMLInputElement).value;\n this.zoomChange.emit(value);\n }\n\n // ── Screen width ─────────────────────────────────────────\n toggleWidthPopover(event: Event): void {\n this.widthPopover.toggle(event);\n }\n\n selectScreenWidth(width: number): void {\n if (this.activeScreenWidth !== width) {\n this.screenWidthChange.emit(width);\n }\n this.widthPopover.hide();\n }\n\n // ── Zoom ────────────────────────────────────────────────\n toggleZoomPopover(event: Event): void {\n this.zoomPopover.toggle(event);\n }\n\n selectZoom(value: number | 'fit'): void {\n this.zoomChange.emit(value);\n this.zoomPopover.hide();\n }\n}\n","<div class=\"builder-toolbar\">\n <!-- ── Mode switcher (stateful) ─────────────────────── -->\n <button class=\"tool-btn stateful\"\n (click)=\"toggleModePopover($event)\"\n [title]=\"activeModeLabel\">\n <i [class]=\"activeModeIcon\"></i>\n </button>\n\n <p-popover #modePopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Select\"\n (click)=\"selectMode(modes.Select)\">\n <i class=\"ph-thin ph-cursor\"></i>\n <span>{{ t('builder.chrome.select') }}</span>\n </button>\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Pan\"\n (click)=\"selectMode(modes.Pan)\">\n <i class=\"ph-thin ph-hand\"></i>\n <span>{{ t('builder.chrome.pan') }}</span>\n </button>\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Style\"\n (click)=\"selectMode(modes.Style)\">\n <i class=\"ph-thin ph-paint-brush-broad\"></i>\n <span>{{ t('builder.chrome.style') }}</span>\n </button>\n </div>\n </p-popover>\n\n <span class=\"divider\"></span>\n\n <!-- ── Undo / Redo (action) ─────────────────────────── -->\n <button class=\"tool-btn\" [title]=\"t('builder.chrome.undo')\" [disabled]=\"!canUndo\" (click)=\"undo.emit()\">\n <i class=\"ph-thin ph-arrow-counter-clockwise\"></i>\n </button>\n <button class=\"tool-btn\" [title]=\"t('builder.chrome.redo')\" [disabled]=\"!canRedo\" (click)=\"redo.emit()\">\n <i class=\"ph-thin ph-arrow-clockwise\"></i>\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Breakpoint bar — the EDITING SCOPE, not just a preview size ── -->\n <div class=\"breakpoint-bar\" role=\"group\" [attr.aria-label]=\"t('builder.chrome.breakpoint')\">\n @for (bp of breakpointOptions; track bp.id) {\n <button type=\"button\"\n class=\"bp-btn\"\n [class.is-active]=\"activeBreakpoint === bp.id\"\n [attr.aria-pressed]=\"activeBreakpoint === bp.id\"\n [title]=\"bp.label + ' · ' + bp.range\"\n [attr.aria-label]=\"bp.label\"\n (click)=\"selectBreakpoint(bp.id)\">\n <i [class]=\"bp.icon\" [class.bp-icon--landscape]=\"bp.landscape\" aria-hidden=\"true\"></i>\n @if (breakpointCounts[bp.id]) {\n <span class=\"bp-dot\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n\n <!-- ── Form state — CONTEXTUAL: only while the selection sits inside a form.\n This is what lets an author DESIGN the Success and Error blocks: switching here swaps what\n the canvas renders, exactly as the breakpoint bar above swaps the width. Without it those\n blocks are hidden by their own state CSS and cannot be reached. ── -->\n @if (formStateTarget) {\n <span class=\"divider\"></span>\n <div class=\"form-state-bar\" role=\"group\" [attr.aria-label]=\"t('builder.chrome.formState')\">\n @for (state of formStates; track state.id) {\n <button type=\"button\"\n class=\"bp-btn\"\n [class.is-active]=\"activeFormState === state.id\"\n [attr.aria-pressed]=\"activeFormState === state.id\"\n [title]=\"formStateHint(state)\"\n [attr.aria-label]=\"t(state.labelKey)\"\n (click)=\"selectFormState(state.id)\">\n <i [class]=\"state.icon\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- ── Screen width — Base only (any width above Laptop) ── -->\n @if (activeBreakpoint === breakpointIds.Base) {\n <button class=\"tool-btn stateful width-btn\"\n (click)=\"toggleWidthPopover($event)\"\n [title]=\"t('builder.chrome.screenWidth')\">\n <span class=\"width-label\">{{ activeScreenWidth }}</span>\n </button>\n }\n\n <p-popover #widthPopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n *ngFor=\"let w of screenWidthOptions\"\n [class.is-active]=\"activeScreenWidth === w.width\"\n (click)=\"selectScreenWidth(w.width)\">\n <span>{{ w.label }}</span>\n </button>\n </div>\n </p-popover>\n\n <!-- ── Zoom (stateful) ──────────────────────────────── -->\n <button class=\"tool-btn stateful zoom-btn\"\n (click)=\"toggleZoomPopover($event)\"\n [title]=\"t('builder.chrome.zoom')\">\n <span class=\"zoom-label\">{{ zoomLabel }}</span>\n </button>\n\n <p-popover #zoomPopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"zoom-popover\">\n <div class=\"zoom-slider-row\">\n <input class=\"zoom-slider\"\n type=\"range\"\n min=\"20\" max=\"100\" step=\"1\"\n [value]=\"sliderZoom\"\n (input)=\"onSliderChange($event)\">\n <span class=\"zoom-slider-value\">{{ zoomLabel }}</span>\n </div>\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n *ngFor=\"let z of zoomOptions\"\n [class.is-active]=\"z.value === activeZoom\"\n (click)=\"selectZoom(z.value)\">\n <span>{{ z.label }}</span>\n </button>\n </div>\n </div>\n </p-popover>\n\n <!-- ── Responsive audit (A5) ─────────────────────────────── -->\n <button class=\"tool-btn audit-toggle\"\n [class.is-open]=\"auditOpen\"\n [class.has-findings]=\"auditCount > 0\"\n type=\"button\"\n [title]=\"t('builder.chrome.auditHint')\"\n [attr.aria-label]=\"t('builder.chrome.audit')\"\n [attr.aria-pressed]=\"auditOpen\"\n (click)=\"auditToggle.emit()\">\n <i class=\"ph-thin ph-stethoscope\" aria-hidden=\"true\"></i>\n @if (auditCount) {\n <span class=\"audit-count\">{{ auditCount }}</span>\n }\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Save ────────────────────────────────────────────── -->\n <button class=\"tool-btn save-btn\"\n [class.is-saving]=\"isSaving\"\n [disabled]=\"isSaving\"\n [title]=\"t('builder.chrome.save')\"\n (click)=\"save.emit()\">\n <i class=\"ph-thin ph-floppy-disk\"></i>\n </button>\n\n <!-- ── Preview ──────────────────────────────────────────── -->\n <button class=\"tool-btn preview-btn\"\n [title]=\"t('builder.chrome.preview')\"\n (click)=\"preview.emit()\">\n <i class=\"ph-thin ph-eye\"></i>\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Publish / Unpublish ──────────────────────────────── -->\n <button class=\"tool-btn publish-btn\"\n [class.is-published]=\"isPublished\"\n [title]=\"publishLabel\"\n (click)=\"publishToggle.emit()\">\n <i [class]=\"isPublished ? 'ph-thin ph-cloud-slash' : 'ph-thin ph-cloud-arrow-up'\"></i>\n <span class=\"publish-label\">{{ publishLabel }}</span>\n </button>\n</div>\n","import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { ComponentRegistryService } from '../../services/component-registry.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderMode, NodeAction } from '../panel.model';\n\ninterface TreeNode {\n node: ComponentNode;\n icon: string;\n label: string;\n depth: number;\n expanded: boolean;\n hasChildren: boolean;\n /** Reference to the parent's children array that contains this node. */\n parentArray: ComponentNode[];\n /** Index of this node inside parentArray. */\n indexInParent: number;\n}\n\n@Component({\n selector: 'app-layer-tree',\n templateUrl: './layer-tree.component.html',\n styleUrls: ['./layer-tree.component.scss'],\n standalone: false,\n})\nexport class LayerTreeComponent implements OnInit, OnDestroy {\n @Input() layout: ComponentNode[] = [];\n @Input() globalElements: ComponentNode[] = [];\n @Output() nodeSelect = new EventEmitter<ComponentNode>();\n @Output() nodeAction = new EventEmitter<{ action: NodeAction; node: ComponentNode }>();\n @Output() nodeMove = new EventEmitter<void>();\n\n public flatTree: TreeNode[] = [];\n public flatGlobalTree: TreeNode[] = [];\n public selectedNodeId: string | null = null;\n public hoveredNodeId: string | null = null;\n\n public editingNodeId: string | null = null;\n public editingValue = '';\n\n public activeSection: 'page' | 'global' = 'page';\n\n /** Cache: component type → icon class */\n private iconMap = new Map<string, string>();\n private selectSub?: Subscription;\n /** Last-seen structural signature — used by ngDoCheck to skip no-op rebuilds. */\n private _layoutSig = '';\n private _globalSig = '';\n\n constructor(\n private registry: ComponentRegistryService,\n private overlayService: OverlayService,\n ) {}\n\n ngOnInit(): void {\n this.buildIconMap();\n this.rebuild();\n this.selectSub = this.overlayService.select$.subscribe(entry => {\n this.selectedNodeId = entry?.node?.id ?? null;\n });\n }\n\n ngOnDestroy(): void {\n this.selectSub?.unsubscribe();\n }\n\n // Runs on every CD cycle — exit immediately if structure hasn't changed.\n ngDoCheck(): void {\n const sig = this.sig(this.layout);\n const globalSig = this.sig(this.globalElements);\n if (sig !== this._layoutSig || globalSig !== this._globalSig) {\n this._layoutSig = sig;\n this._globalSig = globalSig;\n this.rebuild();\n }\n }\n\n /** Cheap structural signature: node IDs + nesting depth only. */\n private sig(nodes: ComponentNode[]): string {\n return nodes.map(n =>\n (n.id ?? n.type) + (n.children?.length ? '{' + this.sig(n.children) + '}' : '')\n ).join(',');\n }\n\n onNodeClick(treeNode: TreeNode): void {\n const node = treeNode.node;\n this.selectedNodeId = node.id ?? null;\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n this.overlayService.setSelect(\n ref.element,\n node.type,\n BuilderMode.Select,\n node,\n ref.componentRef,\n );\n // Scroll the element into view on the canvas\n ref.element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n this.nodeSelect.emit(node);\n }\n\n onNodeMouseEnter(treeNode: TreeNode): void {\n this.hoveredNodeId = treeNode.node.id ?? null;\n const ref = this.overlayService.getNodeRef(treeNode.node);\n if (ref) {\n this.overlayService.setHover(ref.element, treeNode.node.type, BuilderMode.Select);\n }\n }\n\n onNodeMouseLeave(): void {\n this.hoveredNodeId = null;\n this.overlayService.clearHover();\n }\n\n toggleExpand(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n treeNode.expanded = !treeNode.expanded;\n this.rebuild();\n }\n\n onDeleteNode(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.nodeAction.emit({ action: NodeAction.Delete, node: treeNode.node });\n }\n\n onDuplicateNode(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.nodeAction.emit({ action: NodeAction.Duplicate, node: treeNode.node });\n }\n\n startRename(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.editingNodeId = treeNode.node.id ?? null;\n this.editingValue = treeNode.node.label ?? '';\n }\n\n saveRename(treeNode: TreeNode): void {\n const val = this.editingValue.trim();\n treeNode.node.label = val || undefined;\n treeNode.label = treeNode.node.label ?? treeNode.node.type;\n this.editingNodeId = null;\n this.editingValue = '';\n }\n\n cancelRename(): void {\n this.editingNodeId = null;\n this.editingValue = '';\n }\n\n /**\n * CDK drop handler for tree reorder.\n * Works on the flat tree indices — maps back to parent arrays to do the move.\n */\n onTreeDrop(event: CdkDragDrop<TreeNode[]>): void {\n if (event.previousIndex === event.currentIndex) return;\n\n const draggedTreeNode = this.flatTree[event.previousIndex];\n if (!draggedTreeNode) return;\n\n const targetTreeNode = this.flatTree[event.currentIndex];\n if (!targetTreeNode) return;\n\n // Remove from source parent\n const srcArray = draggedTreeNode.parentArray;\n const srcIdx = draggedTreeNode.indexInParent;\n srcArray.splice(srcIdx, 1);\n\n // Determine destination: insert at the same position as the target node in its parent.\n // If dropping after the target, adjust index.\n const destArray = targetTreeNode.parentArray;\n let destIdx = targetTreeNode.indexInParent;\n\n // If dragging downward (previousIndex < currentIndex), the target index\n // may have shifted because we already removed the item from source.\n // If source and destination are the same array and srcIdx < destIdx, adjust.\n if (srcArray === destArray && srcIdx < destIdx) {\n destIdx--;\n }\n\n destArray.splice(destIdx, 0, draggedTreeNode.node);\n\n // Rebuild tree and notify builder\n this.rebuild();\n this.nodeMove.emit();\n }\n\n // ── Internals ────────────────────────────────────────────\n\n /** Build a type→icon lookup from the registry so we don't instantiate configs per node. */\n private buildIconMap(): void {\n for (const entry of this.registry.getAll()) {\n const instance = new entry.config();\n this.iconMap.set(entry.type, instance.icon || 'ph-thin ph-cube');\n }\n }\n\n private expandedState = new Map<string, boolean>();\n\n private rebuild(): void {\n // Save expanded state\n for (const tn of [...this.flatTree, ...this.flatGlobalTree]) {\n if (tn.node.id) {\n this.expandedState.set(tn.node.id, tn.expanded);\n }\n }\n const next: TreeNode[] = [];\n this.flattenTree(this.layout, 0, next);\n this.flatTree = next;\n\n const nextGlobal: TreeNode[] = [];\n this.flattenTree(this.globalElements, 0, nextGlobal);\n this.flatGlobalTree = nextGlobal;\n }\n\n private flattenTree(nodes: ComponentNode[], depth: number, out: TreeNode[], parentArr?: ComponentNode[]): void {\n const arr = parentArr ?? nodes;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const hasChildren = !!(node.children && node.children.length);\n const expanded = node.id ? (this.expandedState.get(node.id) ?? true) : true;\n const treeNode: TreeNode = {\n node,\n icon: this.iconMap.get(node.type) || 'ph-thin ph-cube',\n label: node.label ?? node.type,\n depth,\n expanded,\n hasChildren,\n parentArray: arr,\n indexInParent: i,\n };\n out.push(treeNode);\n if (node.children && expanded) {\n this.flattenTree(node.children, depth + 1, out, node.children);\n }\n }\n }\n}\n","<div class=\"layer-tree\">\n <div class=\"tree-header\">\n <button class=\"section-tab\" [class.section-tab--active]=\"activeSection === 'page'\" (click)=\"activeSection = 'page'\">\n <i class=\"ph-thin ph-stack\"></i> Page\n </button>\n <button class=\"section-tab\" [class.section-tab--active]=\"activeSection === 'global'\" (click)=\"activeSection = 'global'\">\n <i class=\"ph-thin ph-globe\"></i> Global\n <span *ngIf=\"flatGlobalTree.length\" class=\"section-tab-badge\">{{ flatGlobalTree.length }}</span>\n </button>\n </div>\n\n <!-- ── Page elements tree ───────────────────── -->\n <div *ngIf=\"activeSection === 'page'\"\n class=\"tree-body\"\n cdkDropList\n [cdkDropListData]=\"flatTree\"\n (cdkDropListDropped)=\"onTreeDrop($event)\">\n <div *ngIf=\"!flatTree.length\" class=\"tree-empty\">\n <i class=\"ph-thin ph-tree-structure\"></i>\n <span>No layers yet</span>\n </div>\n\n <div *ngFor=\"let tn of flatTree\"\n class=\"tree-row\"\n cdkDrag\n [cdkDragData]=\"tn\"\n [class.is-selected]=\"tn.node.id === selectedNodeId\"\n [class.is-hovered]=\"tn.node.id === hoveredNodeId\"\n [style.padding-inline-start.px]=\"12 + tn.depth * 16\"\n (click)=\"onNodeClick(tn)\"\n (mouseenter)=\"onNodeMouseEnter(tn)\"\n (mouseleave)=\"onNodeMouseLeave()\">\n\n <i class=\"ph-thin ph-dots-six-vertical drag-handle\" cdkDragHandle></i>\n\n <button *ngIf=\"tn.hasChildren\" class=\"expand-btn\" (click)=\"toggleExpand(tn, $event)\">\n <i class=\"ph-thin\" [ngClass]=\"tn.expanded ? 'ph-caret-down' : 'ph-caret-right'\"></i>\n </button>\n <span *ngIf=\"!tn.hasChildren\" class=\"expand-spacer\"></span>\n\n <i [class]=\"tn.icon\" class=\"node-icon\"></i>\n <ng-container *ngIf=\"editingNodeId === tn.node.id; else staticLabel\">\n <input class=\"node-rename-input\"\n [value]=\"editingValue\"\n (input)=\"editingValue = $any($event.target).value\"\n (keydown.enter)=\"saveRename(tn)\"\n (keydown.escape)=\"cancelRename()\"\n (blur)=\"saveRename(tn)\"\n (click)=\"$event.stopPropagation()\"\n autofocus>\n </ng-container>\n <ng-template #staticLabel>\n <span class=\"node-label\" [class.node-label--named]=\"tn.node.label\">{{ tn.label }}</span>\n </ng-template>\n\n <span class=\"node-actions\">\n <button class=\"action-btn\" title=\"Rename\" (click)=\"startRename(tn, $event)\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n </button>\n <button class=\"action-btn\" title=\"Duplicate\" (click)=\"onDuplicateNode(tn, $event)\">\n <i class=\"ph-thin ph-copy\"></i>\n </button>\n <button class=\"action-btn action-btn--delete\" title=\"Delete\" (click)=\"onDeleteNode(tn, $event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n </span>\n </div>\n </div>\n\n <!-- ── Global elements tree ─────────────────── -->\n <div *ngIf=\"activeSection === 'global'\" class=\"tree-body\">\n <div *ngIf=\"!flatGlobalTree.length\" class=\"tree-empty\">\n <i class=\"ph-thin ph-globe\"></i>\n <span>No global elements</span>\n </div>\n\n <div *ngFor=\"let tn of flatGlobalTree\"\n class=\"tree-row tree-row--global\"\n [class.is-selected]=\"tn.node.id === selectedNodeId\"\n [class.is-hovered]=\"tn.node.id === hoveredNodeId\"\n [style.padding-inline-start.px]=\"12 + tn.depth * 16\"\n (click)=\"onNodeClick(tn)\"\n (mouseenter)=\"onNodeMouseEnter(tn)\"\n (mouseleave)=\"onNodeMouseLeave()\">\n\n <button *ngIf=\"tn.hasChildren\" class=\"expand-btn\" (click)=\"toggleExpand(tn, $event)\">\n <i class=\"ph-thin\" [ngClass]=\"tn.expanded ? 'ph-caret-down' : 'ph-caret-right'\"></i>\n </button>\n <span *ngIf=\"!tn.hasChildren\" class=\"expand-spacer\"></span>\n\n <i [class]=\"tn.icon\" class=\"node-icon\"></i>\n <span class=\"node-label\">{{ tn.label }}</span>\n <span class=\"node-position-badge\">{{ tn.node.globalPosition }}</span>\n\n <span class=\"node-actions\">\n <button class=\"action-btn action-btn--delete\" title=\"Delete\" (click)=\"onDeleteNode(tn, $event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n </span>\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\n/** One rendered crumb — precomputed so the template binds fields, never method calls. */\nexport interface Crumb {\n node: ComponentNode;\n label: string;\n /** True for the last crumb (the selected node itself). */\n isCurrent: boolean;\n}\n\n/** A state badge shown on the right of the bar for the selected node. */\nexport interface SelectionBadge {\n icon: string;\n label: string;\n title: string;\n}\n\n/**\n * The element path bar — the full ancestor chain of the selected node, clickable,\n * plus a badge for each piece of node state that otherwise only surfaces by opening\n * a different panel (bound / symbol / preset / interactions / global).\n *\n * Presentational: it holds no tree and does no lookups. The builder computes the path\n * (see `utils/node-path.util.ts`) and passes it in.\n *\n * See iox-ai-guidance `architecture/builder/builder-usability-plan.md` (B1).\n */\n@Component({\n selector: 'app-breadcrumb-bar',\n templateUrl: './breadcrumb-bar.component.html',\n styleUrls: ['./breadcrumb-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class BreadcrumbBarComponent {\n /** Root → selected node. Empty when nothing is selected. */\n @Input() set path(value: ComponentNode[] | null | undefined) {\n const nodes = value ?? [];\n const last = nodes.length - 1;\n this.crumbs = nodes.map((node, i) => ({\n node,\n label: node.label || node.type,\n isCurrent: i === last,\n }));\n this.badges = this.buildBadges(nodes[last]);\n }\n\n /** Emitted when a crumb is clicked — the builder selects that node. */\n @Output() nodeSelect = new EventEmitter<ComponentNode>();\n /** Emitted on crumb hover (and `null` on leave) — the builder outlines it on canvas. */\n @Output() nodePeek = new EventEmitter<ComponentNode | null>();\n\n crumbs: Crumb[] = [];\n badges: SelectionBadge[] = [];\n\n trackCrumb(_index: number, crumb: Crumb): ComponentNode {\n return crumb.node;\n }\n\n trackBadge(_index: number, badge: SelectionBadge): string {\n return badge.icon;\n }\n\n onSelect(crumb: Crumb): void {\n this.nodeSelect.emit(crumb.node);\n }\n\n onPeek(crumb: Crumb): void {\n this.nodePeek.emit(crumb.node);\n }\n\n onPeekEnd(): void {\n this.nodePeek.emit(null);\n }\n\n /**\n * Node state that today is only discoverable by visiting another panel. Built as a\n * data table rather than a chain of ifs so a new badge is one row.\n */\n private buildBadges(node: ComponentNode | undefined): SelectionBadge[] {\n if (!node) return [];\n const interactions = node.interactions?.length ?? 0;\n const bindings = node.bindings?.length ?? 0;\n const rows: Array<[boolean, string, string, string]> = [\n [bindings > 0, 'ph-thin ph-plugs-connected', String(bindings),\n `${bindings} data binding${bindings === 1 ? '' : 's'}`],\n [interactions > 0, 'ph-thin ph-lightning', String(interactions),\n `${interactions} interaction${interactions === 1 ? '' : 's'}`],\n [!!node.symbolId, 'ph-thin ph-diamond', 'Symbol',\n 'Linked symbol instance — edits propagate to every instance'],\n [!node.symbolId && !!node.detachedSymbolId, 'ph-thin ph-link-break', 'Detached',\n 'Detached from its symbol — edits no longer propagate'],\n [!!node.stylePresetId, 'ph-thin ph-palette', 'Preset',\n 'Styled by a shared style preset'],\n [!!node.isGlobal, 'ph-thin ph-globe-hemisphere-west', 'Global',\n 'Global element — rendered on every page'],\n ];\n return rows\n .filter(([on]) => on)\n .map(([, icon, label, title]) => ({ icon, label, title }));\n }\n}\n","<nav class=\"breadcrumb-bar\" aria-label=\"Selected element path\">\n @if (crumbs.length) {\n <ol class=\"crumbs\" #crumbList>\n @for (crumb of crumbs; track trackCrumb($index, crumb)) {\n <li class=\"crumb-item\">\n @if (!$first) {\n <i class=\"crumb-sep ph-thin ph-caret-right\" aria-hidden=\"true\"></i>\n }\n <button type=\"button\"\n class=\"crumb\"\n [class.crumb--current]=\"crumb.isCurrent\"\n [attr.aria-current]=\"crumb.isCurrent ? 'true' : null\"\n [title]=\"crumb.label\"\n (mouseenter)=\"onPeek(crumb)\"\n (mouseleave)=\"onPeekEnd()\"\n (focus)=\"onPeek(crumb)\"\n (blur)=\"onPeekEnd()\"\n (click)=\"onSelect(crumb)\">{{ crumb.label }}</button>\n </li>\n }\n </ol>\n\n <div class=\"badges\">\n @for (badge of badges; track trackBadge($index, badge)) {\n <span class=\"badge\" [title]=\"badge.title\">\n <i [class]=\"badge.icon\" aria-hidden=\"true\"></i>\n <span class=\"badge-label\">{{ badge.label }}</span>\n </span>\n }\n </div>\n } @else {\n <span class=\"crumb-empty\">Nothing selected — click an element on the canvas</span>\n }\n</nav>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { AuditFinding, AuditSeverity } from '../utils/responsive-audit.util';\n\n/**\n * The responsive audit list (A5) — what is broken at the width being edited, worst first.\n * Presentational: the builder runs the audit (it owns the tree and the canvas measurements) and\n * applies the fixes; this only renders and emits.\n */\n@Component({\n selector: 'app-audit-panel',\n templateUrl: './audit-panel.component.html',\n styleUrls: ['./audit-panel.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class AuditPanelComponent {\n @Input() findings: AuditFinding[] = [];\n /** Name of the breakpoint being audited, for the header. */\n @Input() breakpointLabel = '';\n @Input() running = false;\n\n @Output() select = new EventEmitter<AuditFinding>();\n @Output() fix = new EventEmitter<AuditFinding>();\n @Output() fixAll = new EventEmitter<void>();\n @Output() rerun = new EventEmitter<void>();\n @Output() closePanel = new EventEmitter<void>();\n\n readonly severities = AuditSeverity;\n\n trackFinding(_index: number, finding: AuditFinding): string {\n return `${finding.nodeId}:${finding.code}`;\n }\n\n /** Findings that carry a safe auto-fix — what \"Fix all\" would apply. */\n get fixableCount(): number {\n return this.findings.filter(f => !!f.fix).length;\n }\n\n iconFor(severity: AuditSeverity): string {\n return severity === AuditSeverity.Info ? 'ph-thin ph-info' : 'ph-thin ph-warning';\n }\n}\n","<div class=\"audit-panel\" role=\"dialog\" aria-label=\"Responsive audit\">\n <header class=\"audit-head\">\n <span class=\"audit-title\">Responsive audit</span>\n <span class=\"audit-scope\">{{ breakpointLabel }}</span>\n <span class=\"audit-spacer\"></span>\n <button type=\"button\" class=\"audit-link\" [disabled]=\"running\" (click)=\"rerun.emit()\">Re-run</button>\n <button type=\"button\" class=\"audit-close\" aria-label=\"Close audit\" (click)=\"closePanel.emit()\">\n <i class=\"ph-thin ph-x\" aria-hidden=\"true\"></i>\n </button>\n </header>\n\n @if (running) {\n <p class=\"audit-empty\">Measuring…</p>\n } @else if (!findings.length) {\n <p class=\"audit-empty audit-empty--clean\">\n <i class=\"ph-thin ph-check-circle\" aria-hidden=\"true\"></i>\n Nothing to fix at this width.\n </p>\n } @else {\n <div class=\"audit-actions\">\n <span>{{ findings.length }} to look at</span>\n @if (fixableCount) {\n <button type=\"button\" class=\"audit-link\" (click)=\"fixAll.emit()\">Fix {{ fixableCount }} automatically</button>\n }\n </div>\n <ul class=\"audit-list\">\n @for (finding of findings; track trackFinding($index, finding)) {\n <li class=\"audit-item\" [class.is-error]=\"finding.severity === severities.Error\">\n <i class=\"audit-icon\" [class]=\"iconFor(finding.severity)\" aria-hidden=\"true\"></i>\n <div class=\"audit-body\">\n <span class=\"audit-node\">{{ finding.nodeName }}</span>\n <span class=\"audit-message\">{{ finding.message }}</span>\n </div>\n <div class=\"audit-buttons\">\n @if (finding.fix) {\n <button type=\"button\" class=\"audit-btn audit-btn--fix\" (click)=\"fix.emit(finding)\">Fix</button>\n }\n <button type=\"button\" class=\"audit-btn\" (click)=\"select.emit(finding)\">Select</button>\n </div>\n </li>\n }\n </ul>\n }\n</div>\n","\n\nimport { AfterViewInit, ApplicationRef, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, effect, inject } from '@angular/core';\nimport Lenis from 'lenis';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode, IoxDataSource, IoxInteraction, StyleCategory } from './models/component.model';\nimport { regenerateNodeIds } from './utils/clone-ids.util';\nimport { wrapNode } from './models/wrap-node';\nimport { OverlayEntry, OverlayService } from './overlay/overlay.service';\nimport { PanelEvent, PanelEventService, PanelEventTypes } from './panels/panel-event.service';\nimport { BuilderMode, NodeAction, PageRouteAnimationSettings, PageSettings, PanelTypes, ToolbarAction } from './panels/panel.model';\nimport { ComponentRegistryService } from './services/component-registry.service';\nimport { DragEngineService, IoxDropEvent } from './services/drag-engine.service';\nimport { MoveableCanvasService } from './services/moveable-canvas.service';\nimport { SelectoCanvasService } from './services/selecto-canvas.service';\nimport { DataSourceRegistryService } from './services/data-source-registry.service';\nimport { InteractionEngineService } from './services/interaction-engine.service';\nimport { ViewportService } from './services/viewport.service';\nimport { StyleRegistryService } from './services/style-registry.service';\nimport { composeVirtualTraits } from './style-compose';\nimport { findParentOf, nodeAncestorPath, nodeAncestorPathInEither } from './utils/node-path.util';\nimport { BreakpointCounts, nodeBreakpointCounts, treeBreakpointCounts } from './utils/breakpoint-counts.util';\nimport { resolveInsertTarget } from './utils/insert-target.util';\nimport { nearestFormNode } from './utils/form-selection.util';\nimport { AuditFinding, AuditNode, auditNodes } from './utils/responsive-audit.util';\nimport { buildLayoutPreset, LAYOUT_PRESETS, LayoutPresetDef } from './models/layout-presets';\nimport { BuilderClipboardService } from './services/builder-clipboard.service';\nimport { InteractionPresetRegistryService } from './services/interaction-preset-registry.service';\nimport { SymbolRegistryService } from './services/symbol-registry.service';\nimport { Breakpoint, breakpointDef, ContextStore, FormRenderState, applyBindingPipes, resolveInputs, resolveStyleProps, setInputOverride, setOverride, collectContextSlotKeys, nodeUsesContext, resolvePath, safeSetInput, withContextSlots } from '@vectoriox/iox-ui';\n\n@Component({\n selector: 'app-builder',\n templateUrl: './builder.component.html',\n styleUrls: ['./builder.component.scss'],\n standalone: false,\n})\nexport class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\n private contextStore = inject(ContextStore);\n\n /**\n * Re-apply context-bound inputs on the CANVAS when a slot changes — the builder twin of the\n * engine's effect. The canvas is a live runtime, so hovering a repeater row while editing must\n * swap the bound element just as it does on the published site.\n *\n * Only nodes that read a slot are touched; nothing else re-renders (trap T2).\n */\n private readonly contextEffect = effect(() => {\n const slotValues = this.contextStore.values();\n if (!Object.keys(slotValues).length) return;\n const slotKeys = collectContextSlotKeys(this.layout);\n if (!slotKeys.size) return;\n this.applyContextBindings(this.layout, withContextSlots({}, slotValues), slotKeys);\n });\n\n @Input() layout: ComponentNode[] = [];\n @Input() dataSources: IoxDataSource[] = [];\n @Input() orgId = 'default';\n @Input() routeParams: any[] = [];\n @Input() pageName = '';\n @Input() isSaving = false;\n @Input() pageStatus: string = 'draft';\n @Input() pageSettings: PageSettings | null = null;\n @Input() globalElements: ComponentNode[] = [];\n @Input() canUndo = false;\n @Input() canRedo = false;\n /** Feature flag: drive drag/select/resize via Moveable + Selecto instead of interact.js.\n * Default OFF — the proven interact.js path is unchanged until cutover. See\n * iox-ai-guidance/architecture/builder/moveable-migration.md. */\n @Input() moveableMode = false;\n @Output() save = new EventEmitter<void>();\n @Output() undo = new EventEmitter<void>();\n @Output() redo = new EventEmitter<void>();\n @Output() back = new EventEmitter<void>();\n @Output() preview = new EventEmitter<void>();\n @Output() publishToggle = new EventEmitter<void>();\n @Output() pageSettingsChange = new EventEmitter<PageSettings>();\n @Output() applyAnimationToAll = new EventEmitter<PageRouteAnimationSettings>();\n @Output() saveBlock = new EventEmitter<{ name: string; node: ComponentNode }>();\n @Output() globalElementsChange = new EventEmitter<ComponentNode[]>();\n @ViewChild('previewCanvas') previewCanvas?: ElementRef<HTMLElement>;\n @ViewChild('previewScroll') previewScrollRef?: ElementRef<HTMLElement>;\n @ViewChild('lenisContent') lenisContentRef?: ElementRef<HTMLElement>;\n @ViewChild('globalOverlay') globalOverlayRef?: ElementRef<HTMLElement>;\n\n public components: any[] = [];\n public activePanel: string = PanelTypes.STYLES;\n public isPanelOpen = false;\n public panelTypes = PanelTypes;\n public activeMode: BuilderMode = BuilderMode.Select;\n public builderModes = BuilderMode;\n /** The breakpoint being edited — derived from the canvas width by ViewportService. */\n public activeBreakpoint: Breakpoint = Breakpoint.Base;\n /** Overrides per breakpoint for the selection (or the whole page when nothing is selected) —\n * the breakpoint bar's dots. A field recomputed on change, never a getter (OnPush input). */\n public breakpointCounts: BreakpointCounts = {};\n /** Deadline for swallowing the canvas click that completes an overlay action. */\n private _ignoreCanvasClickUntil = 0;\n\n // ── Empty canvas (B4) ──────────────────────────────────────────────────────\n /** The starting points offered on a blank page — the responsive layout presets. */\n public readonly starterLayouts: readonly LayoutPresetDef[] = LAYOUT_PRESETS;\n\n /** A page with nothing on it yet: offer a structure instead of a blank canvas. */\n get isPageEmpty(): boolean {\n return !this.layout.length;\n }\n\n /** Insert a starter layout at the end of the page and select it. */\n startWithLayout(def: LayoutPresetDef): void {\n const node = buildLayoutPreset(def, type => this.registry.createConfig(type) as unknown as ComponentNode);\n if (!node) return;\n this.dragEngine.insertPayload(this.layout, this.layout.length, node);\n this.cdr.detectChanges();\n }\n\n /** Open the components panel from the empty state. */\n browseComponents(): void {\n this.activeSidebar = 'components';\n }\n\n // ── Responsive audit (A5) ──────────────────────────────────────────────────\n /** Findings for the width being edited; the panel is open while `auditOpen`. */\n public auditFindings: AuditFinding[] = [];\n public auditOpen = false;\n public auditRunning = false;\n\n get auditBreakpointLabel(): string {\n return breakpointDef(this.activeBreakpoint)?.label ?? '';\n }\n\n toggleAudit(): void {\n this.auditOpen = !this.auditOpen;\n if (this.auditOpen) this.runAudit();\n }\n\n /**\n * Audit every rendered node at the width being edited: resolve its styles for this breakpoint\n * and measure it ONCE (on demand — never on the animation path). Measurements are divided by the\n * canvas scale, so findings are in CSS px whatever the zoom. The rules are pure — see\n * `utils/responsive-audit.util.ts`.\n */\n runAudit(): void {\n this.auditRunning = true;\n const scale = this.viewportService.getScale() || 1;\n const width = this.viewportService.getState().width;\n // Positions are reported relative to the canvas FRAME, not the editor window, so an\n // \"off-screen\" finding means off the simulated viewport rather than off the user's monitor.\n const frame = this.previewCanvas?.nativeElement?.getBoundingClientRect() ?? { left: 0, top: 0 };\n const nodes: AuditNode[] = [];\n const visit = (list: ComponentNode[]) => {\n for (const node of list) {\n const element = this.overlayService.getNodeRef(node)?.element;\n if (element && node.id) {\n const rect = element.getBoundingClientRect();\n nodes.push({\n id: node.id,\n type: node.type,\n label: node.label,\n styleProps: resolveStyleProps(this.baseStyleMapOf(node), node.responsive, this.activeBreakpoint),\n // Traits resolved at this width too — some failures (a 4-up slider on a\n // phone) are invisible to a style-only audit. See P3-G1/G4.\n inputs: resolveInputs(this.baseInputMapOf(node), node.responsive, this.activeBreakpoint),\n width: rect.width / scale,\n height: rect.height / scale,\n left: (rect.left - frame.left) / scale,\n top: (rect.top - frame.top) / scale,\n });\n }\n if (node.children?.length) visit(node.children);\n }\n };\n visit(this.layout);\n visit(this.globalElements);\n this.auditFindings = auditNodes(nodes, width);\n this.auditRunning = false;\n this.cdr.detectChanges();\n }\n\n /** The node's OWN trait values — the Base layer the responsive `inputs` cascade sits on top of. */\n private baseInputMapOf(node: ComponentNode): Record<string, any> {\n const out: Record<string, any> = {};\n for (const trait of (node.traits ?? []) as any[]) {\n if (trait?.name !== undefined && trait.default !== undefined) out[trait.name] = trait.default;\n }\n return out;\n }\n\n /** Apply one finding's fix into the current breakpoint's layer (or the base styles at Base). */\n applyAuditFix(finding: AuditFinding): void {\n const node = this.findNodeById(finding.nodeId, this.layout) ?? this.findNodeById(finding.nodeId, this.globalElements);\n if (!node) return;\n\n // A TRAIT fix (slide count) is not CSS — it lands in the breakpoint's `inputs` layer, or on\n // the node itself at Base, mirroring exactly how a style fix is applied below.\n if (finding.inputFix) {\n for (const [name, value] of Object.entries(finding.inputFix)) {\n if (this.activeBreakpoint === Breakpoint.Base) {\n const trait = (node.traits ?? []).find((t: any) => t.name === name);\n if (trait) trait.default = value;\n } else {\n node.responsive = setInputOverride(node.responsive, this.activeBreakpoint, name, value);\n }\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.runAudit();\n return;\n }\n if (!finding.fix) return;\n if (this.activeBreakpoint === Breakpoint.Base) {\n for (const [name, value] of Object.entries(finding.fix)) {\n for (const group of node.styleTraits ?? []) {\n const trait = group.traits.find(t => t.name === name);\n if (trait) trait.default = value;\n }\n }\n } else {\n let responsive = node.responsive;\n for (const [name, value] of Object.entries(finding.fix)) {\n responsive = setOverride(responsive, this.activeBreakpoint, name, value);\n }\n node.responsive = responsive;\n }\n const cssId = node.styleId ?? node.id;\n if (cssId) {\n const base = this.baseStyleMapOf(node);\n this.styleRegistry.upsert(cssId, composeVirtualTraits(base));\n this.styleRegistry.upsertResponsive(cssId, base, node.stateStyles as any, node.responsive);\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.runAudit();\n }\n\n /** Apply every fixable finding, then re-measure. */\n applyAllAuditFixes(): void {\n for (const finding of this.auditFindings.filter(f => !!f.fix || !!f.inputFix)) this.applyAuditFix(finding);\n }\n\n /** Select the node a finding is about. */\n selectAuditNode(finding: AuditFinding): void {\n const node = this.findNodeById(finding.nodeId, this.layout) ?? this.findNodeById(finding.nodeId, this.globalElements);\n const ref = node && this.overlayService.getNodeRef(node);\n if (!node || !ref) return;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this._emitElementSelect(node, ref.componentRef);\n }\n\n /** A node's full base style map, flattened from its styleTraits. */\n private baseStyleMapOf(node: ComponentNode): Record<string, any> {\n const styles: Record<string, any> = {};\n for (const group of node.styleTraits ?? []) {\n for (const trait of group.traits) {\n if (trait.name !== undefined && trait.default !== undefined) styles[trait.name] = trait.default;\n }\n }\n return styles;\n }\n\n private findNodeById(id: string, list: ComponentNode[]): ComponentNode | null {\n for (const node of list) {\n if (node.id === id) return node;\n const deeper = node.children?.length ? this.findNodeById(id, node.children) : null;\n if (deeper) return deeper;\n }\n return null;\n }\n public activeZoom: number = 100;\n public activeScreenWidth: number = 1440;\n public selectedItem: ComponentNode | null = null;\n /** Root → selected node. Drives the breadcrumb bar. Recomputed on every selection\n * change (never a getter — see `_emitElementSelect`). */\n public selectedPath: ComponentNode[] = [];\n public isDragging = false;\n public scrollThumbTop = 0; // px from top of track\n public scrollThumbHeight = 0; // px height of thumb\n public isScrollbarVisible = false;\n public scrollbarTranslate = 0; // counteracts Lenis wrapper scrollTop shifting position:absolute children\n public activeSidebar: 'components' | 'tree' | 'tokens' | 'pages' = 'components';\n public showSaveBlockDialog = false;\n public saveBlockName = '';\n private pendingBlockNode: ComponentNode | null = null;\n public isPanning = false;\n public panX = 0;\n public panY = 0;\n /** Canvas frame height in canvas-space pixels (= previewScroll.clientHeight / scale).\n * Used as iox-page-component's height so position:fixed top:0;bottom:0 fills the\n * same area as height:100vh (both resolve to this value). */\n public canvasFrameHeight = 0;\n private panStartX = 0;\n private panStartY = 0;\n private panOriginX = 0;\n private panOriginY = 0;\n private hoverHideRaf = 0;\n private viewportSub?: Subscription;\n private lenis?: Lenis;\n private lenisRafId?: number;\n private canvasRo?: ResizeObserver;\n private previewFrameRo?: ResizeObserver;\n private canvasContentHeight = 0;\n\n // Type-safe event forwarding for toolbar outputs\n handleToolbarModeChange(mode: BuilderMode): void {\n this.onModeChange(mode);\n }\n handleToolbarBreakpointChange(bp: Breakpoint): void {\n this.onBreakpointChange(bp);\n }\n\n // ── Form state switcher ──────────────────────────────────────────────────────────────────\n // The Success and Error blocks are hidden by their own state CSS, so without this an author\n // could never reach them. Switching here writes `renderState` onto the live form component,\n // which is the SAME input the runtime drives at submit time — one mechanism, two drivers, so\n // what gets designed is exactly what a visitor sees. See forms-and-inputs-plan.md (D7).\n\n /** The form the selection sits inside, or null. Drives the toolbar's contextual switcher. */\n activeFormState: FormRenderState = FormRenderState.Idle;\n\n get formStateTarget(): string | null {\n return this.selectedFormNode()?.id ?? null;\n }\n\n handleToolbarFormStateChange(state: FormRenderState): void {\n this.activeFormState = state;\n const form = this.selectedFormNode();\n if (!form) return;\n // Straight onto the live instance: this is a VIEW state, not page data — it must never be\n // persisted, or a page would ship showing its own success message.\n const instance = this.overlayService.getNodeRef(form)?.componentRef?.instance;\n if (instance) {\n safeSetInput(this.overlayService.getNodeRef(form)!.componentRef, 'renderState', state);\n }\n this.cdr.detectChanges();\n }\n\n /** The nearest Form ancestor of the selection (or the selection itself). */\n private selectedFormNode(): ComponentNode | null {\n return nearestFormNode(this.selectedPath);\n }\n handleToolbarZoomChange(value: number | 'fit'): void {\n this.onZoomChange(value);\n }\n\n handleToolbarScreenWidthChange(width: number): void {\n this.viewportService.setWidth(width);\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n }\n\n get globalElementsBefore(): ComponentNode[] {\n return this.globalElements.filter(n => n.globalPosition === 'before');\n }\n\n get globalElementsAfter(): ComponentNode[] {\n return this.globalElements.filter(n => n.globalPosition === 'after');\n }\n\n /** Canvas width in CSS pixels (driven by ViewportService). */\n get viewportWidth(): number {\n return this.viewportService.getState().width;\n }\n\n /** Canvas viewport height in CSS pixels (driven by ViewportService). */\n get viewportHeight(): number {\n return this.viewportService.getState().height;\n }\n\n /** Visual (scaled) canvas width — used to size the scroll container so the\n * scrollbar aligns with the right edge of the canvas, not the CMS shell. */\n get viewportScaledWidth(): number {\n const s = this.viewportService.getState().scale;\n return Math.round(this.viewportWidth * s);\n }\n\n /** CSS transform for the visual canvas.\n * Includes translateX(-50%) for centering because iox-page-component is\n * position:absolute; left:50% inside .preview-lenis-content. */\n get viewportTransform(): string {\n const s = this.viewportService.getState().scale;\n const parts: string[] = ['translateX(-50%)'];\n if (this.panX !== 0 || this.panY !== 0) parts.push(`translate(${this.panX}px, ${this.panY}px)`);\n if (s !== 1) parts.push(`scale(${s})`);\n return parts.join(' ');\n }\n\n /**\n * Height of the Lenis content proxy div (realContentHeight × scale).\n * Lenis scrolls against this value so scroll range is always in visual px,\n * not unscaled CSS px — correct at any zoom level.\n */\n get scaledContentHeight(): number {\n const s = this.viewportService.getState().scale;\n return Math.round(this.canvasContentHeight * s);\n }\n\n /** The canvas starts at the simulated viewport height, just like a real empty browser page. */\n get canvasMinHeight(): number {\n return this.viewportService.getState().height;\n }\n\n private sub?: Subscription;\n private registrySub?: Subscription;\n\n constructor(\n private registry: ComponentRegistryService,\n private overlayService: OverlayService,\n private panelEventService: PanelEventService,\n private dragEngine: DragEngineService,\n private dsRegistry: DataSourceRegistryService,\n private viewportService: ViewportService,\n private interactionEngine: InteractionEngineService,\n private interactionPresetRegistry: InteractionPresetRegistryService,\n private clipboard: BuilderClipboardService,\n private symbolRegistry: SymbolRegistryService,\n private cdr: ChangeDetectorRef,\n private appRef: ApplicationRef,\n private moveableCanvas: MoveableCanvasService,\n private selectoCanvas: SelectoCanvasService,\n private styleRegistry: StyleRegistryService,\n ) {}\n\n ngOnInit(): void {\n this.components = this.registry.getAll();\n this.dsRegistry.setDataSources(this.dataSources);\n this.dragEngine.setScale(this.viewportService.getScale());\n this.sub = this.panelEventService.subscribe((panelEvent: PanelEvent) => this.handlePanelEvents(panelEvent));\n this.sub.add(this.dragEngine.isDragging$.subscribe((v: boolean) => {\n this.isDragging = v;\n this.cdr.markForCheck();\n }));\n this.sub.add(this.dragEngine.dropComplete$.subscribe((node: ComponentNode) => {\n this._selectAfterDrop(node);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }));\n this.panelEventService.emit(PanelEventTypes.PANEL_OPEN, PanelTypes.STYLES);\n this.viewportSub = this.viewportService.state$.subscribe(state => {\n this.activeBreakpoint = state.breakpoint;\n this.activeZoom = Math.round(state.scale * 100);\n this.activeScreenWidth = state.width;\n this.dragEngine.setScale(state.scale);\n this.updatePreviewVh();\n // scaledContentHeight changes with scale — flush DOM first so\n // .preview-lenis-content has its new height before Lenis reads it.\n this.cdr.detectChanges();\n this.lenis?.resize();\n // iox-page-component has transition:0.25s — overlay positions are stale\n // until the transform animation completes. Re-fire after the transition.\n setTimeout(() => { this.overlayService.refreshSelect(); this.moveableCanvas.refresh(); }, 270);\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['pageSettings']) {\n // Reinit Lenis with updated scroll options (lerp, wheelMultiplier, etc.)\n // so the builder preview reflects the live-page scroll feel in real time.\n this.initLenis();\n }\n if (changes['globalElements']) {\n // The *ngIf on the global overlay renders after this hook — defer so\n // globalOverlayRef is in the DOM before we try to set CSS vars on it.\n setTimeout(() => this.updatePreviewVh());\n }\n // A newly loaded page: the bar's dots must reflect its overrides before anything is selected.\n if (changes['layout'] || changes['globalElements']) this.refreshBreakpointCounts();\n }\n\n ngAfterViewInit(): void {\n this.updatePreviewVh();\n // Re-compute --preview-vh whenever the canvas frame resizes (panel open/close,\n // window resize, etc.) so 100vh always fills the visible area.\n if (this.previewScrollRef?.nativeElement) {\n this.previewFrameRo = new ResizeObserver(() => this.updatePreviewVh());\n this.previewFrameRo.observe(this.previewScrollRef.nativeElement);\n }\n this.overlayService.setContainer(this.previewCanvas?.nativeElement || null);\n // Builder dispatches synthetic 'scroll' events on .preview-lenis-content from\n // the Lenis callback — point the overlay scroll listener at that element.\n // (Not previewScrollRef which is the Lenis eventsTarget — dispatching there\n // would cause Lenis to re-fire its scroll handler → infinite loop.)\n this.overlayService.setScrollContainer(this.lenisContentRef?.nativeElement || null);\n // .preview-scroll is the Lenis clipping container (overflow:hidden, scrollTop changes).\n // Used as IntersectionObserver root so viewportEnter triggers fire correctly on canvas scroll.\n this.overlayService.setIntersectionRoot(this.previewScrollRef?.nativeElement || null);\n\n // Register the root canvas as a dropzone.\n const canvasEl = document.getElementById('canvas-preview')!;\n if (canvasEl) {\n this.dragEngine.registerDropzone(\n 'canvas-preview',\n canvasEl,\n this.layout,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n // Track canvas content height so scaledContentHeight (= height × scale)\n // keeps the Lenis content proxy correctly sized at any zoom level.\n this.canvasRo = new ResizeObserver(entries => {\n const h = entries[0]?.contentRect.height ?? 0;\n if (h !== this.canvasContentHeight) {\n this.canvasContentHeight = h;\n this.cdr.detectChanges();\n this.lenis?.resize();\n }\n });\n this.canvasRo.observe(canvasEl);\n }\n\n // The canvas is an EDITING surface: clicking a Link / LinkedContainer / Button (anything\n // rendering an <a href>) must select it, never navigate — a redirect unloads the builder and\n // loses unsaved work. Bound to `.preview` (NOT #canvas-preview) so it also covers the\n // GLOBAL-elements overlay, which is a SIBLING layer outside the page canvas — a linked\n // container in a global header used to slip past the old canvas-only guard and navigate.\n // Capture phase so it runs before the node's own click handler; it covers EVERY anchor,\n // including repeater/slider preview clones (RenderDirective skips their per-node listeners)\n // and any future link component. preventDefault only cancels default navigation — the click\n // still propagates, so selection/overlay behaviour is unchanged. `auxclick` covers\n // middle-click, which opens a tab without firing `click`.\n const previewEl = this.previewCanvas?.nativeElement;\n if (previewEl) {\n previewEl.addEventListener('click', this.blockCanvasNavigation, true);\n previewEl.addEventListener('auxclick', this.blockCanvasNavigation, true);\n }\n\n this.initLenis();\n\n // Moveable path (flag-gated — interact.js is untouched when off). Drive drag for the selected\n // element via Moveable, reusing DragEngineService.handleDrop for the reorder. See\n // iox-ai-guidance/architecture/builder/moveable-migration.md.\n if (this.moveableMode && this.previewCanvas?.nativeElement) {\n this.moveableCanvas.init(\n this.previewCanvas.nativeElement,\n () => this.viewportService.getScale(),\n () => ({ width: this.viewportWidth, height: this.viewportHeight }),\n );\n // Resize commits geometry to styleProps → emit LAYOUT_CHANGED so undo/save pick it up.\n this.moveableCanvas.onLayoutChanged = () => this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.sub?.add(this.overlayService.select$.subscribe(entry => {\n this.moveableCanvas.select(entry?.element ?? null, entry?.node ?? null);\n }));\n\n // Selecto rubber-band MULTI-select (Phase 1). Only starts from empty canvas space\n // (selectFromInside:false), so single-element drag/click are untouched. 2+ → Moveable\n // group; exactly 1 → the existing single-select (via a click); 0 → clear.\n const canvasEl = document.getElementById('canvas-preview');\n const previewEl = this.previewCanvas.nativeElement;\n if (canvasEl) {\n this.selectoCanvas.init(previewEl, previewEl, canvasEl);\n this.selectoCanvas.onSelect = (elements) => {\n if (this.moveableCanvas.selectGroup(elements)) return; // 2+ → group box\n if (elements.length === 1) {\n elements[0].dispatchEvent(new MouseEvent('click', { bubbles: true }));\n } else {\n this.overlayService.clearSelect();\n this.moveableCanvas.select(null, null);\n }\n };\n }\n }\n\n setTimeout(() => this.appRef.tick());\n }\n\n /**\n * Walk the tree and push freshly-resolved values into the live component instances of every node\n * that reads a context slot. Uses the overlay's node→ComponentRef registry, and the shared\n * `safeSetInput` so an undeclared input can never trigger NG0303.\n */\n private applyContextBindings(nodes: ComponentNode[], data: Record<string, any>, slotKeys: ReadonlySet<string>): void {\n for (const node of nodes ?? []) {\n if (nodeUsesContext(node, slotKeys)) {\n const ref = this.overlayService.getNodeRef(node)?.componentRef;\n if (ref) {\n for (const binding of node.bindings ?? []) {\n if (!slotKeys.has(binding.source)) continue;\n const sourceData = data[binding.source];\n if (sourceData == null) continue;\n const raw = binding.path ? resolvePath(sourceData, binding.path) : sourceData;\n const value = applyBindingPipes(raw, (binding as any).pipes);\n if (value !== undefined && value !== null) safeSetInput(ref, binding.prop, value);\n }\n }\n }\n if (node.children?.length) this.applyContextBindings(node.children, data, slotKeys);\n }\n }\n\n ngOnDestroy(): void {\n this.sub?.unsubscribe();\n this.registrySub?.unsubscribe();\n this.viewportSub?.unsubscribe();\n this.moveableCanvas.destroy();\n this.selectoCanvas.destroy();\n this.destroyLenis();\n this.canvasRo?.disconnect();\n this.previewFrameRo?.disconnect();\n this.overlayService.setContainer(null);\n this.overlayService.setScrollContainer(null);\n this.overlayService.setIntersectionRoot(null);\n const canvasEl = document.getElementById('canvas-preview');\n if (canvasEl) {\n this.dragEngine.unregisterDropzone('canvas-preview', canvasEl);\n }\n const previewEl = this.previewCanvas?.nativeElement;\n if (previewEl) {\n previewEl.removeEventListener('click', this.blockCanvasNavigation, true);\n previewEl.removeEventListener('auxclick', this.blockCanvasNavigation, true);\n }\n }\n\n /**\n * Cancel the browser's default navigation for any link clicked on the editing canvas.\n *\n * Bound property (not a method) so add/removeEventListener share one reference. Matches the\n * clicked target's nearest `a[href]`, so it covers a Link/Button host as well as a click on\n * anything nested inside a LinkedContainer. Only the DEFAULT action is cancelled — propagation\n * is untouched, so node selection, the overlay and the context menu all behave normally.\n */\n private readonly blockCanvasNavigation = (event: MouseEvent): void => {\n const target = event.target as HTMLElement | null;\n if (target?.closest?.('a[href]')) event.preventDefault();\n };\n\n /**\n * Set --preview-vh / --preview-vw on .preview-scroll so that viewport-relative\n * units (vh, vw) inside the canvas resolve to the simulated canvas dimensions\n * rather than the real browser viewport.\n *\n * --preview-vh = canvas frame height (unscaled) / 100\n * --preview-vw = canvas width from viewport state / 100\n *\n * Both fall back to their native unit in production (no variables defined).\n */\n private updatePreviewVh(): void {\n const el = this.previewScrollRef?.nativeElement;\n if (!el) return;\n const state = this.viewportService.getState();\n const frameH = el.clientHeight / state.scale;\n const vhVal = `${frameH / 100}px`;\n const vwVal = `${state.width / 100}px`;\n el.style.setProperty('--preview-vh', vhVal);\n el.style.setProperty('--preview-vw', vwVal);\n // Mirror on global overlay so vh/vw units resolve identically there\n this.globalOverlayRef?.nativeElement?.style.setProperty('--preview-vh', vhVal);\n this.globalOverlayRef?.nativeElement?.style.setProperty('--preview-vw', vwVal);\n this.canvasFrameHeight = Math.round(frameH);\n }\n\n private initLenis(): void {\n this.destroyLenis();\n if (!this.previewScrollRef?.nativeElement || !this.lenisContentRef?.nativeElement) return;\n\n const s = this.pageSettings?.scroll;\n this.lenis = new Lenis({\n wrapper: this.previewScrollRef.nativeElement,\n content: this.lenisContentRef.nativeElement,\n eventsTarget: this.previewScrollRef.nativeElement,\n lerp: s?.lerp ?? 0.1,\n wheelMultiplier: s?.wheelMultiplier ?? 1,\n touchMultiplier: s?.touchMultiplier ?? 1,\n orientation: s?.direction ?? 'vertical',\n infinite: s?.infinite ?? false,\n autoResize: false, // we drive resize() manually via canvasRo + viewportSub\n });\n\n this.lenis.on('scroll', (instance: Lenis) => {\n const clientH = this.previewScrollRef!.nativeElement.clientHeight;\n this.onPageScroll({\n scrollTop: instance.scroll,\n scrollHeight: instance.limit + clientH,\n clientHeight: clientH,\n scrollPercentage: instance.progress * 100,\n });\n // Notify overlay to reposition boxes on each scroll tick.\n // Dispatch on lenisContent (not previewScrollRef/eventsTarget) to avoid\n // Lenis re-consuming the event and causing infinite recursion.\n this.lenisContentRef!.nativeElement.dispatchEvent(new Event('scroll'));\n // Keep the fixed-position drop-target overlay aligned when canvas scrolls\n // during an active drag (pointer doesn't move, so _onDragMove never fires).\n this.dragEngine.refreshDragOverlays();\n // Reposition the Moveable control box (resize handles) on each scroll tick — otherwise\n // the handles drift away from the element as the canvas scrolls (the overlay outline\n // already repositions via the synthetic 'scroll' above).\n this.moveableCanvas.refresh();\n });\n\n const raf = (time: number) => {\n this.lenis?.raf(time);\n this.lenisRafId = requestAnimationFrame(raf);\n };\n this.lenisRafId = requestAnimationFrame(raf);\n }\n\n private destroyLenis(): void {\n if (this.lenisRafId != null) cancelAnimationFrame(this.lenisRafId);\n this.lenis?.destroy();\n this.lenis = undefined;\n this.lenisRafId = undefined;\n }\n\n addComponent(name: string): void {\n const config = this.registry.createConfig(name);\n if (!config) {\n return;\n }\n this.layout.push(config);\n }\n\n onDrop(event: IoxDropEvent): void {\n const { payload, insertIndex } = event;\n\n if (payload.type === 'external') {\n if (typeof payload.data === 'string') {\n const config = this.registry.createConfig(payload.data);\n if (!config) return;\n this.layout.splice(insertIndex, 0, config);\n this.cdr.markForCheck();\n this._selectAfterDrop(config);\n } else {\n const clone = this.deepCloneWithNewIds(payload.data as ComponentNode);\n this.layout.splice(insertIndex, 0, clone);\n this.cdr.markForCheck();\n this._selectAfterDrop(clone);\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n const item = payload.data as ComponentNode;\n\n if (payload.sourceId === 'blocks-panel') {\n // Reusable block from the palette — may be a bare ComponentNode or a\n // block wrapper { name, node, syncInstances, symbolId }. Extract the node.\n // Prefer symbol.node (always up-to-date) over block.node (original snapshot).\n const data = item as any;\n const symbolNode = data.symbolId ? this.symbolRegistry.getSymbol(data.symbolId)?.node : null;\n const nodeData: ComponentNode = (symbolNode ?? data.node ?? data) as ComponentNode;\n const clone = this.deepCloneWithNewIds(nodeData);\n if (data.syncInstances && data.symbolId) {\n clone.symbolId = data.symbolId;\n }\n this.layout.splice(insertIndex, 0, clone);\n this.cdr.markForCheck();\n this._selectAfterDrop(clone);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n if (payload.sourceId && payload.sourceId !== 'canvas-preview') {\n // Cross-list move from a nested container into canvas root.\n const sourceData = this.dragEngine.getData(payload.sourceId);\n if (sourceData) {\n const srcIdx = sourceData.indexOf(item);\n if (srcIdx !== -1) {\n sourceData.splice(srcIdx, 1);\n this.dragEngine.getCdr(payload.sourceId)?.detectChanges();\n }\n }\n this.layout.splice(insertIndex, 0, item);\n this.cdr.markForCheck();\n this._selectAfterDrop(item);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n // Same-container reorder (canvas root).\n const currentIdx = this.layout.indexOf(item);\n if (currentIdx !== -1) {\n const adjustedIdx = insertIndex > currentIdx ? insertIndex - 1 : insertIndex;\n this.layout.splice(currentIdx, 1);\n this.layout.splice(adjustedIdx, 0, item);\n this.cdr.markForCheck();\n this._selectAfterDrop(item);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n }\n\n onModeChange(mode: BuilderMode): void {\n this.activeMode = mode;\n if (mode === BuilderMode.Pan) {\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.overlayService.clearHover();\n } else {\n // Returning to Select/Style — reset pan offset so canvas re-centers\n this.panX = 0;\n this.panY = 0;\n }\n }\n\n onBreakpointChange(bp: Breakpoint): void {\n this.viewportService.setBreakpoint(bp);\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n }\n\n onZoomChange(value: number | 'fit'): void {\n if (value === 'fit') {\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n } else {\n this.viewportService.setScale(value / 100);\n }\n }\n\n // ── Board pan ────────────────────────────────────────────\n\n onBoardMouseDown(event: MouseEvent): void {\n if (this.activeMode !== BuilderMode.Pan) return;\n if (event.button !== 0) return;\n this.isPanning = true;\n this.panStartX = event.clientX;\n this.panStartY = event.clientY;\n this.panOriginX = this.panX;\n this.panOriginY = this.panY;\n event.preventDefault();\n }\n\n onBoardMouseMove(event: MouseEvent): void {\n if (!this.isPanning) return;\n this.panX = this.panOriginX + (event.clientX - this.panStartX);\n this.panY = this.panOriginY + (event.clientY - this.panStartY);\n }\n\n onBoardMouseUp(): void {\n this.isPanning = false;\n }\n\n private autoFitViewport(): void {\n const container = this.previewCanvas?.nativeElement;\n if (!container) return;\n // Available width = container width minus horizontal padding (10px × 2)\n this.viewportService.fitToWidth(container.clientWidth, 20);\n }\n\n selectPanel(panel: string): void {\n this.activePanel = panel;\n this.panelEventService.emit(this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN, panel);\n }\n\n handleClick(event: any): void {\n if (this.activeMode === BuilderMode.Pan) return;\n this.selectedItem = event.node;\n this.overlayService.setSelect(event.element, event.node.type, this.activeMode, event.node, event.componentRef);\n this.selectPanel(PanelTypes.STYLES);\n this._emitElementSelect(event.node, event.componentRef);\n }\n\n private _selectAfterDrop(node: ComponentNode): void {\n // Wait one tick for Angular to render the new component and register it\n // in the overlay before attempting to select it.\n setTimeout(() => {\n const ref = this.overlayService.getNodeRef(node);\n if (!ref) return;\n this.selectedItem = node;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this.selectPanel(PanelTypes.STYLES);\n this._emitElementSelect(node, ref.componentRef);\n });\n }\n\n handleMouseEnter(event: any): void {\n if (this.isDragging || this.activeMode === BuilderMode.Pan) return;\n cancelAnimationFrame(this.hoverHideRaf);\n this.overlayService.setHover(event.element, event.node.type, this.activeMode);\n }\n\n handleMouseLeave(): void {\n if (this.isDragging || this.activeMode === BuilderMode.Pan) return;\n cancelAnimationFrame(this.hoverHideRaf);\n this.hoverHideRaf = requestAnimationFrame(() => this.overlayService.clearHover());\n }\n\n handleCanvasClick(): void {\n // An overlay action (Select parent, Duplicate, …) changes the selection, which RE-RENDERS the\n // overlay — so the button that got `mousedown` is gone by `mouseup`, and the browser\n // dispatches the click on the nearest common ancestor: `.preview` itself. It therefore never\n // passes through <app-overlay>, and stopping propagation there cannot help. Without this\n // guard that click reads as \"clicked empty canvas\" and wipes the selection the action just\n // made (empty breadcrumb; click-to-insert targeting the page).\n if (Date.now() < this._ignoreCanvasClickUntil) {\n this._ignoreCanvasClickUntil = 0;\n return;\n }\n // Only fires when clicking empty canvas space (renderers call stopPropagation)\n this.selectedItem = null;\n this.selectedPath = [];\n this.overlayService.clearSelect();\n this.refreshBreakpointCounts();\n }\n\n /** Breadcrumb crumb clicked — select that ancestor. Mirrors a layer-tree click. */\n onCrumbSelect(node: ComponentNode): void {\n const ref = this.overlayService.getNodeRef(node);\n if (!ref) return;\n this.selectedItem = node;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this._emitElementSelect(node, ref.componentRef);\n }\n\n /** Breadcrumb crumb hovered (or `null` on leave) — outline it on the canvas so the chain\n * is readable without clicking through it. */\n onCrumbPeek(node: ComponentNode | null): void {\n if (!node) {\n this.overlayService.clearHover();\n return;\n }\n const ref = this.overlayService.getNodeRef(node);\n if (ref) this.overlayService.setHover(ref.element, node.label || node.type, this.activeMode);\n }\n\n onTreeNodeSelect(node: ComponentNode): void {\n this.selectedItem = node;\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n this._emitElementSelect(node, ref.componentRef);\n }\n this.selectPanel(PanelTypes.STYLES);\n }\n\n onTreeNodeAction(event: { action: NodeAction; node: ComponentNode }): void {\n const { action, node } = event;\n\n // Check global elements first\n const globalIdx = this.globalElements.findIndex(n => n === node);\n if (globalIdx !== -1) {\n if (action === NodeAction.Delete) {\n this.globalElements.splice(globalIdx, 1);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n return;\n }\n\n const result = this.findNodeInTree(node, this.layout);\n if (!result) return;\n\n if (action === NodeAction.Delete) {\n result.parent.splice(result.index, 1);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n } else if (action === NodeAction.Duplicate) {\n const clone = this.deepCloneWithNewIds(node);\n result.parent.splice(result.index + 1, 0, clone);\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n }\n\n onTreeNodeMove(): void {\n // Tree drag moved a node — canvas will re-render via change detection.\n // Clear selection since the moved node's DOM element may be recreated.\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n\n // ── Toolbar actions ──────────────────────────────────────\n onToolbarAction(event: { action: ToolbarAction; entry: OverlayEntry; position?: 'before' | 'after'; interaction?: IoxInteraction; wrapType?: string }): void {\n // The click completing this action lands on `.preview` (see handleCanvasClick) — ignore it.\n this._ignoreCanvasClickUntil = Date.now() + 500;\n const { action, entry } = event;\n const node = entry.node;\n if (!node) return;\n\n switch (action) {\n case ToolbarAction.AddElement: {\n // Quick-add: open the components panel. The insert target is the selection itself\n // (inside a container, after a leaf) — see insertFromPanel.\n this.activeSidebar = 'components';\n break;\n }\n case ToolbarAction.Delete: {\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n result.parent.splice(result.index, 1);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.Duplicate: {\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n const clone = this.deepCloneWithNewIds(node);\n result.parent.splice(result.index + 1, 0, clone);\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.Wrap: {\n const wrapType = event.wrapType;\n if (!wrapType) break;\n const wrapper = this.registry.createConfig(wrapType) as ComponentNode | null;\n if (!wrapper) break;\n // Wrap in place within whichever tree the node lives in — page\n // layout first, then global elements. Context is never crossed.\n let wrapped = wrapNode(this.layout, node, wrapper);\n let inGlobal = false;\n if (!wrapped) {\n wrapped = wrapNode(this.globalElements, node, wrapper);\n inGlobal = !!wrapped;\n }\n if (wrapped) {\n if (inGlobal) this.globalElementsChange.emit([...this.globalElements]);\n this.cdr.detectChanges();\n // If the wrapped node lives in a Repeater template, rebuild its repeated rows so\n // every clone picks up the new wrapper (and re-resolves the now-nested bindings).\n this._refreshRepeaterFor(node);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this._selectAfterDrop(wrapped);\n }\n break;\n }\n case ToolbarAction.Play: {\n this.interactionEngine.replay(node);\n break;\n }\n case ToolbarAction.SaveAsBlock: {\n const blockClone: ComponentNode = JSON.parse(JSON.stringify(node));\n this._stripGlobalFlags(blockClone);\n this.pendingBlockNode = blockClone;\n this.saveBlockName = '';\n this.showSaveBlockDialog = true;\n break;\n }\n case ToolbarAction.SelectParent: {\n const parentNode = this.findParentNode(node, this.layout) ?? this.findParentNode(node, this.globalElements);\n if (parentNode) {\n const ref = this.overlayService.getNodeRef(parentNode);\n if (ref) {\n this.selectedItem = parentNode;\n this.overlayService.setSelect(ref.element, parentNode.type, this.activeMode, parentNode, ref.componentRef);\n this._emitElementSelect(parentNode, ref.componentRef);\n }\n } else {\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n break;\n }\n case ToolbarAction.MakeGlobal: {\n const result = this.findNodeInTree(node, this.layout);\n if (result) {\n result.parent.splice(result.index, 1);\n node.isGlobal = true;\n node.globalPosition = event.position ?? 'before';\n this.globalElements.push(node);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.markForCheck();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.RemoveGlobal: {\n const idx = this.globalElements.findIndex(n => n.id === node.id);\n if (idx !== -1) {\n this.globalElements.splice(idx, 1);\n node.isGlobal = false;\n node.globalPosition = undefined;\n this.layout.push(node);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.markForCheck();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.EditPreset: {\n this.panelEventService.emit(PanelEventTypes.PRESET_EDIT, node.stylePresetId);\n this.panelEventService.emit(\n this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN,\n PanelTypes.STYLES,\n );\n break;\n }\n case ToolbarAction.EditInteractionPreset: {\n // Preset-linked node → open preset-edit mode. Plain interaction → just open the panel.\n if (node.interactionPresetId) {\n this.panelEventService.emit(PanelEventTypes.INTERACTION_PRESET_EDIT, node.interactionPresetId);\n }\n this.panelEventService.emit(\n this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN,\n PanelTypes.INTERACTIONS,\n );\n // Expand the specific interaction the badge represents so the panel opens \"on the right\n // interaction active\". Emitted AFTER PANEL_OPEN so the panel is showing this node.\n if (event.interaction?.id) {\n this.panelEventService.emit(PanelEventTypes.INTERACTION_EDIT, event.interaction.id);\n }\n break;\n }\n case ToolbarAction.PastePreset: {\n const presetId = this.clipboard.getPresetId();\n if (presetId) {\n node.stylePresetId = presetId;\n node.styleOverrides = {};\n this.panelEventService.emit(PanelEventTypes.ELEMENT_SELECT, { node, componentRef: null });\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.PasteInteractionPreset: {\n const interactionPresetId = this.clipboard.getInteractionPresetId();\n if (interactionPresetId) {\n node.interactionPresetId = interactionPresetId;\n const preset = this.interactionPresetRegistry.getPreset(interactionPresetId);\n if (preset) node.interactions = JSON.parse(JSON.stringify(preset.interactions));\n this.interactionEngine.refresh(node);\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.DetachSymbol: {\n node.detachedSymbolId = node.symbolId;\n node.symbolId = undefined;\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.ResyncSymbol: {\n node.symbolId = node.detachedSymbolId;\n node.detachedSymbolId = undefined;\n const symbol = this.symbolRegistry.getSymbol(node.symbolId!);\n if (symbol) {\n this.panelEventService.emit(PanelEventTypes.SYMBOLS_CHANGED, symbol);\n }\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.Copy: {\n this.clipboard.copyNode(node);\n break;\n }\n case ToolbarAction.Paste: {\n const pastedNode = this.clipboard.getNode();\n if (!pastedNode) break;\n const clone = this.deepCloneWithNewIds(pastedNode);\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n result.parent.splice(result.index + 1, 0, clone);\n } else {\n this.layout.push(clone);\n }\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.AddSlide: {\n if (!Array.isArray(node.children)) break;\n const slide = this.registry.createConfig('SliderSlide');\n if (!slide) break;\n node.children = [...node.children, slide];\n const ref = this.overlayService.getNodeRef(node);\n if (ref?.componentRef) {\n ref.componentRef.setInput('children', node.children);\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n }\n }\n\n confirmSaveBlock(): void {\n if (!this.saveBlockName.trim() || !this.pendingBlockNode) return;\n this.saveBlock.emit({ name: this.saveBlockName.trim(), node: this.pendingBlockNode });\n this.showSaveBlockDialog = false;\n this.pendingBlockNode = null;\n }\n\n cancelSaveBlock(): void {\n this.showSaveBlockDialog = false;\n this.pendingBlockNode = null;\n }\n\n private deepCloneWithNewIds(node: ComponentNode): ComponentNode {\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n // Fresh ids + remap intra-subtree references (stateTriggers, interaction targets) so a\n // duplicated/pasted structure stays self-consistent (trigger-hover keeps its own trigger).\n regenerateNodeIds(clone, { styleId: 'regenerate' });\n return clone;\n }\n\n private _stripGlobalFlags(node: ComponentNode): void {\n node.isGlobal = false;\n node.globalPosition = undefined;\n node.children?.forEach(c => this._stripGlobalFlags(c));\n }\n\n private _scrollbarTimer: ReturnType<typeof setTimeout> | null = null;\n\n onPageScroll(event: { scrollTop: number; scrollHeight: number; clientHeight: number; scrollPercentage?: number }): void {\n const contentH = event.scrollHeight;\n const wrapperH = event.clientHeight;\n if (contentH <= wrapperH) {\n this.isScrollbarVisible = false;\n return;\n }\n // .canvas-scrollbar has top:20px; bottom:20px — visible track is 40px shorter.\n const trackH = wrapperH - 40;\n const thumbH = Math.max((trackH / contentH) * trackH, 32);\n // Use Lenis progress (0–1) when available — more accurate than recomputing from scroll/limit.\n const progress = event.scrollPercentage != null ? event.scrollPercentage / 100\n : event.scrollTop / (contentH - wrapperH);\n const thumbTop = progress * (trackH - thumbH);\n this.scrollThumbHeight = thumbH;\n this.scrollThumbTop = thumbTop;\n this.isScrollbarVisible = true;\n // .canvas-scrollbar is position:absolute inside the Lenis wrapper.\n // When Lenis calls wrapper.scrollTo(), scrollTop shifts all absolute children.\n // Counteract with translateY(scrollTop) so the track stays visually anchored.\n this.scrollbarTranslate = event.scrollTop;\n this.cdr.markForCheck();\n\n if (this._scrollbarTimer) clearTimeout(this._scrollbarTimer);\n this._scrollbarTimer = setTimeout(() => {\n this.isScrollbarVisible = false;\n this.cdr.markForCheck();\n }, 1200);\n }\n\n private findNodeInTree(target: ComponentNode, children: ComponentNode[]): { parent: ComponentNode[]; index: number } | null {\n for (let i = 0; i < children.length; i++) {\n if (children[i] === target) {\n return { parent: children, index: i };\n }\n if (children[i].children) {\n const found = this.findNodeInTree(target, children[i].children!);\n if (found) return found;\n }\n }\n return null;\n }\n\n /** Immediate parent of `target` within `children`, or null at a root. Derives from the\n * shared `nodeAncestorPath` walk in `utils/node-path.util.ts` — one tree recursion to\n * keep correct, not one per caller. */\n private findParentNode(target: ComponentNode, children: ComponentNode[]): ComponentNode | null {\n return findParentOf(children, target);\n }\n\n /** Returns the closest ancestor (or self) of `target` that has a `symbolId`. */\n private findSymbolAncestorOf(target: ComponentNode, nodes: ComponentNode[]): ComponentNode | null {\n for (const node of nodes) {\n if (node === target) return node.symbolId ? node : null;\n if (node.children?.length && this.findNodeInTree(target, node.children)) {\n if (node.symbolId) return node;\n return this.findSymbolAncestorOf(target, node.children);\n }\n }\n return null;\n }\n\n /** Nearest Repeater ancestor of `target` (or null). A node inside a repeater renders in ITEM\n * scope, so the bindings panel needs the repeater to sample its current item (e.g. bind an\n * Image to a `gallery` string item). Prefers the innermost repeater when nested. */\n private findRepeaterAncestorOf(target: ComponentNode, nodes: ComponentNode[]): ComponentNode | null {\n for (const node of nodes) {\n if (node === target) return null;\n if (node.children?.length && this.findNodeInTree(target, node.children)) {\n return this.findRepeaterAncestorOf(target, node.children)\n ?? (node.type === 'Repeater' ? node : null);\n }\n }\n return null;\n }\n\n /** If `node` lives inside a Repeater template, tell that repeater to rebuild its preview rows so\n * a structural change (e.g. wrapping a template child) propagates to every repeated row. No-op\n * when the node is not inside a repeater. */\n private _refreshRepeaterFor(node: ComponentNode): void {\n const repeater = this.findRepeaterAncestorOf(node, this.layout)\n ?? this.findRepeaterAncestorOf(node, this.globalElements);\n if (!repeater) return;\n const ref = this.overlayService.getNodeRef(repeater);\n (ref?.componentRef?.instance as { refreshTemplate?: () => void })?.refreshTemplate?.();\n }\n\n /**\n * Emit ELEMENT_SELECT with the ancestors the panels need (symbol + repeater item scope).\n * THE place the builder's own selection is set too — every path that announces a selection goes\n * through here, so `selectedItem` (breadcrumb, click-to-insert target) can't drift from what the\n * panels show. \"Select parent\" used to announce the parent while leaving selectedItem behind.\n */\n private _emitElementSelect(node: ComponentNode, componentRef: any): void {\n this.selectedItem = node;\n const symbolAncestor = this.findSymbolAncestorOf(node, this.layout)\n ?? this.findSymbolAncestorOf(node, this.globalElements);\n const repeaterAncestor = this.findRepeaterAncestorOf(node, this.layout)\n ?? this.findRepeaterAncestorOf(node, this.globalElements);\n // Parent's live `display` — drives the Child Layout group's parent-scoped visibility so\n // flex-child vs grid-child controls only surface when the parent actually lays them out.\n const parent = this.findParentNode(node, this.layout) ?? this.findParentNode(node, this.globalElements);\n const parentDisplay = parent ? this.readNodeDisplay(parent) : null;\n // Breadcrumb path. Assigned as a FIELD (never a getter) — a getter returning a fresh\n // array would make the OnPush input look changed on every change-detection pass.\n this.selectedPath = nodeAncestorPathInEither(this.layout, this.globalElements, node) ?? [node];\n this.panelEventService.emit(PanelEventTypes.ELEMENT_SELECT, { node, componentRef, symbolAncestor, repeaterAncestor, parentDisplay });\n this.refreshBreakpointCounts();\n }\n\n /**\n * Insert a components-panel payload at the position the SELECTION implies (B2):\n * nothing selected → end of the page; a container → inside it; a leaf → right after it.\n * `dropComplete$` then selects the new node and records the undo step, exactly as a drop does.\n */\n insertFromPanel(data: unknown): void {\n const inGlobals = !!nodeAncestorPath(this.globalElements, this.selectedItem);\n const roots = inGlobals ? this.globalElements : this.layout;\n let target = resolveInsertTarget(roots, this.selectedItem, n => this.dragEngine.isDropContainer(n.children));\n // A selected TOP-LEVEL global element would make the new node its sibling — i.e. a second\n // global element, which is not what \"add an element\" means. Put it on the page instead.\n if (inGlobals && !target.parent) {\n target = resolveInsertTarget(this.layout, null, n => this.dragEngine.isDropContainer(n.children));\n }\n if (!this.dragEngine.insertPayload(target.children, target.index, data)) return;\n this.cdr.detectChanges();\n }\n\n private refreshBreakpointCounts(): void {\n this.breakpointCounts = this.selectedItem\n ? nodeBreakpointCounts(this.selectedItem)\n : treeBreakpointCounts(this.layout, this.globalElements);\n }\n\n /** Read a node's current `display` value. The style panel mutates `styleTraits` in place at edit\n * time, so that is the live source of truth; fall back to a preset's `styleOverrides` map, then\n * the CSS initial value. */\n private readNodeDisplay(node: ComponentNode): string {\n const layoutGroup = node.styleTraits?.find(g => g.category === StyleCategory.Layout);\n const displayTrait = layoutGroup?.traits.find(t => t.name === 'display');\n if (displayTrait?.default != null) return displayTrait.default;\n return node.styleOverrides?.['display'] ?? 'block';\n }\n\n private handlePanelEvents(panelEvent: PanelEvent): void {\n // Click-to-insert from the components panel (B2) — no drag, same node and same undo step.\n if (panelEvent.type === PanelEventTypes.INSERT_COMPONENT) {\n this.insertFromPanel(panelEvent.data);\n return;\n }\n // Every style or structural edit — including a breakpoint override — emits LAYOUT_CHANGED.\n if (panelEvent.type === PanelEventTypes.LAYOUT_CHANGED) {\n this.refreshBreakpointCounts();\n return;\n }\n if (panelEvent.type === PanelEventTypes.PANEL_CLOSE) {\n this.isPanelOpen = false;\n return;\n }\n\n if (panelEvent.type === PanelEventTypes.PANEL_OPEN) {\n this.isPanelOpen = true;\n }\n }\n}","<div class=\"builder\">\n <header class=\"builder-header\">\n <div class=\"sidebar-switcher\">\n <button (click)=\"activeSidebar = 'pages'\" [class.active]=\"activeSidebar === 'pages'\" title=\"Pages\" aria-label=\"Pages\">\n <i class=\"ph-thin ph-browsers\"></i>\n </button>\n <button (click)=\"activeSidebar = 'components'\" [class.active]=\"activeSidebar === 'components'\" title=\"Components\" aria-label=\"Components\">\n <i class=\"ph-thin ph-cube\"></i>\n </button>\n <button (click)=\"activeSidebar = 'tree'\" [class.active]=\"activeSidebar === 'tree'\" title=\"Layers\" aria-label=\"Layers\">\n <i class=\"ph-thin ph-tree-structure\"></i>\n </button>\n <button (click)=\"activeSidebar = 'tokens'\" [class.active]=\"activeSidebar === 'tokens'\" title=\"Design Tokens\" aria-label=\"Design Tokens\">\n <i class=\"ph-thin ph-circles-three\"></i>\n </button>\n </div>\n\n <app-toolbar\n [activeMode]=\"activeMode\"\n [activeBreakpoint]=\"activeBreakpoint\"\n [breakpointCounts]=\"breakpointCounts\"\n [auditCount]=\"auditFindings.length\"\n [auditOpen]=\"auditOpen\"\n [activeZoom]=\"activeZoom\"\n [activeScreenWidth]=\"activeScreenWidth\"\n [isSaving]=\"isSaving\"\n [pageStatus]=\"pageStatus\"\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (modeChange)=\"handleToolbarModeChange($event)\"\n (breakpointChange)=\"handleToolbarBreakpointChange($event)\"\n [formStateTarget]=\"formStateTarget\"\n [activeFormState]=\"activeFormState\"\n (formStateChange)=\"handleToolbarFormStateChange($event)\"\n (auditToggle)=\"toggleAudit()\"\n (zoomChange)=\"handleToolbarZoomChange($event)\"\n (screenWidthChange)=\"handleToolbarScreenWidthChange($event)\"\n (save)=\"save.emit()\"\n (preview)=\"preview.emit()\"\n (publishToggle)=\"publishToggle.emit()\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\">\n </app-toolbar>\n\n <div class=\"panel-switcher\">\n <button (click)=\"selectPanel(panelTypes.BINDINGS)\" [class.active]=\"activePanel === panelTypes.BINDINGS\" title=\"Bindings\">\n <i class=\"ph-thin ph-plugs-connected\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.STYLES)\" [class.active]=\"activePanel === panelTypes.STYLES\" title=\"Styles\">\n <i class=\"ph-thin ph-paint-brush\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.PAGE)\" [class.active]=\"activePanel === panelTypes.PAGE\" title=\"Page settings\" aria-label=\"Page settings\">\n <i class=\"ph-thin ph-gear-six\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.INTERACTIONS)\" [class.active]=\"activePanel === panelTypes.INTERACTIONS\" title=\"Interactions\">\n <i class=\"ph-thin ph-lightning\"></i>\n </button>\n </div> \n </header>\n\n <app-breadcrumb-bar\n [path]=\"selectedPath\"\n (nodeSelect)=\"onCrumbSelect($event)\"\n (nodePeek)=\"onCrumbPeek($event)\">\n </app-breadcrumb-bar>\n\n <div class=\"builder-main\" [class.panel-open]=\"isPanelOpen\">\n <aside class=\"sidebar\">\n <div *ngIf=\"activeSidebar === 'pages'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderPages]\"></ng-content>\n </div>\n <div *ngIf=\"activeSidebar === 'components'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderComponents]\"></ng-content>\n </div>\n <div *ngIf=\"activeSidebar === 'tokens'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderTokens]\"></ng-content>\n </div>\n <app-layer-tree *ngIf=\"activeSidebar === 'tree'\"\n [layout]=\"layout\"\n [globalElements]=\"globalElements\"\n (nodeSelect)=\"onTreeNodeSelect($event)\"\n (nodeAction)=\"onTreeNodeAction($event)\"\n (nodeMove)=\"onTreeNodeMove()\"></app-layer-tree>\n </aside>\n\n <main #previewCanvas class=\"preview\"\n [class.grab-mode]=\"activeMode === builderModes.Pan\"\n [class.grabbing]=\"isPanning\"\n (click)=\"handleCanvasClick()\"\n (mousedown)=\"onBoardMouseDown($event)\"\n (mousemove)=\"onBoardMouseMove($event)\"\n (mouseup)=\"onBoardMouseUp()\"\n (mouseleave)=\"onBoardMouseUp()\">\n <app-overlay (toolbarAction)=\"onToolbarAction($event)\"></app-overlay>\n\n <!-- Responsive audit (A5) — floats over the canvas, right gutter. -->\n @if (auditOpen) {\n <div class=\"audit-dock\" (click)=\"$event.stopPropagation()\">\n <app-audit-panel\n [findings]=\"auditFindings\"\n [breakpointLabel]=\"auditBreakpointLabel\"\n [running]=\"auditRunning\"\n (select)=\"selectAuditNode($event)\"\n (fix)=\"applyAuditFix($event)\"\n (fixAll)=\"applyAllAuditFixes()\"\n (rerun)=\"runAudit()\"\n (closePanel)=\"toggleAudit()\"></app-audit-panel>\n </div>\n }\n\n <!-- Custom Lenis scrollbar — lives in .preview (not .preview-scroll) so it\n stays in the right gutter and never overlaps the canvas at large widths.\n No translateY counteract needed since it isn't inside the Lenis wrapper. -->\n <div class=\"canvas-scrollbar\"\n [class.visible]=\"isScrollbarVisible\">\n <div class=\"canvas-scrollbar-thumb\"\n [style.height.px]=\"scrollThumbHeight\"\n [style.top.px]=\"scrollThumbTop\">\n </div>\n </div>\n\n <!-- Global elements overlay — outside Lenis so position:fixed children\n stay pinned to the canvas viewport rather than scrolling with content.\n Shares viewportTransform so elements scale correctly at any zoom level.\n Height matches viewportHeight so position:fixed + inset:0 fills the\n simulated viewport correctly (CSS calc(100%) would give the wrong\n containing-block height and break full-screen fixed overlays). -->\n <div *ngIf=\"globalElements.length\"\n #globalOverlay\n class=\"global-elements-overlay\"\n [style.width.px]=\"viewportWidth\"\n [style.height.px]=\"canvasFrameHeight || viewportHeight\"\n [style.transform]=\"viewportTransform\">\n <ng-container *ngFor=\"let item of globalElementsBefore\">\n <ng-container [ioxRender]=\"item\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let item of globalElementsAfter\">\n <ng-container [ioxRender]=\"item\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"preview-scroll\"\n #previewScroll\n [style.width.px]=\"viewportScaledWidth\"\n [class.pan-mode]=\"activeMode === builderModes.Pan\">\n\n <!-- Lenis content proxy: height = realContentHeight × scale.\n Lenis scrolls against this value so scroll range is always in\n visual px — correct at any zoom level. -->\n <div class=\"preview-lenis-content\" #lenisContent\n [style.height.px]=\"scaledContentHeight\">\n\n <iox-page-component\n [style.width.px]=\"viewportWidth\"\n [style.height.px]=\"canvasFrameHeight || viewportHeight\"\n [style.transform]=\"viewportTransform\">\n\n <div class=\"canvas-viewport\"\n id=\"canvas-preview\"\n [style.min-height.px]=\"canvasMinHeight\">\n\n <!-- Empty page (B4): a starting point beats a blank canvas. Each starter is\n a responsive layout preset — ordinary nodes, editable afterwards. -->\n @if (isPageEmpty) {\n <div class=\"empty-canvas\" (click)=\"$event.stopPropagation()\">\n <h2 class=\"empty-title\">Start with a layout</h2>\n <p class=\"empty-sub\">Each one already adapts to tablet and phone. You can edit or take it apart afterwards.</p>\n <div class=\"empty-grid\">\n @for (starter of starterLayouts; track starter.id) {\n <button type=\"button\" class=\"empty-card\" (click)=\"startWithLayout(starter)\">\n <i [class]=\"starter.icon\" aria-hidden=\"true\"></i>\n <span class=\"empty-card-name\">{{ starter.name }}</span>\n <span class=\"empty-card-desc\">{{ starter.description }}</span>\n </button>\n }\n </div>\n <button type=\"button\" class=\"empty-link\" (click)=\"browseComponents()\">Or start from a single element</button>\n </div>\n }\n\n <!-- WRAPPER COLLAPSE (task 9c): top-level nodes render DIRECTLY into the\n canvas viewport — no .preview-node wrapper; iox-outer + drag move to the\n host (RenderDirective, via ioxDragSourceId). -->\n <ng-container *ngFor=\"let item of layout\"\n [ioxRender]=\"item\"\n [ioxDragSourceId]=\"'canvas-preview'\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </div>\n </iox-page-component>\n </div>\n </div>\n </main>\n\n <ng-content select=\"[builderPanel]\"></ng-content>\n </div>\n\n <!-- Save as Reusable Block dialog -->\n @if (showSaveBlockDialog) {\n <div class=\"save-block-backdrop\" (click)=\"cancelSaveBlock()\"></div>\n <div class=\"save-block-dialog\" (click)=\"$event.stopPropagation()\">\n <h4 class=\"save-block-title\">Save as Reusable Block</h4>\n <input class=\"save-block-input\"\n type=\"text\"\n placeholder=\"Block name...\"\n [(ngModel)]=\"saveBlockName\"\n (keydown.enter)=\"confirmSaveBlock()\"\n (keydown.escape)=\"cancelSaveBlock()\"\n autofocus>\n <div class=\"save-block-actions\">\n <p-button size=\"small\" severity=\"secondary\" label=\"Cancel\" (click)=\"cancelSaveBlock()\"></p-button>\n <p-button size=\"small\" label=\"Save\" [disabled]=\"!saveBlockName.trim()\" (click)=\"confirmSaveBlock()\"></p-button>\n </div>\n </div>\n }\n</div>","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host Section (Phase 2 of the Moveable migration = task 9c). The `<section>` IS the host\n * (no `<app-section>` wrapper, no separate `.section-root`) — matching the SSR engine's\n * `section[iox-section]`. The dropzone is registered on the host element itself (was the ioxDropzone\n * directive on `.section-root`); the `.section-child` draggable wrappers are UNCHANGED, so interact.js\n * (flag-off) keeps working exactly as before. See moveable-migration.md.\n */\n@Component({\n selector: 'section[iox-section]',\n template: `\n <div *ngIf=\"!children.length\" class=\"section-placeholder\">\n <i class=\"ph-thin ph-rows\"></i>\n <span>Drop components here</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly; iox-outer + drag move to the host. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'section-root iox-node-' + nodeId + (listOrientation === 'horizontal' ? ' is-horizontal' : '')\",\n },\n styles: [`\n :host {\n position: relative;\n box-sizing: border-box;\n }\n .section-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n z-index: 0;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host(:hover) .section-placeholder,\n :host(.iox-drag-over) .section-placeholder {\n opacity: 1;\n }\n .section-placeholder i { font-size: 22px; }\n /* Flex/grid-child sizing on the collapsed direct-child hosts (was .section-child). ::ng-deep\n because the hosts are inserted dynamically by RenderDirective. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class SectionComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on `.section-root`).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host Container (Phase 2 of the Moveable migration = task 9c). The real tag (div/section/\n * ul/ol/li/…, chosen from the `htmlTag` trait by RenderDirective via `hostElement`) IS the host — no\n * `<app-builder-container>` wrapper, no separate `.container-root` — matching the SSR engine. The\n * dropzone is registered on the host itself; the `.container-child` draggable wrappers are UNCHANGED,\n * so interact.js (flag-off) keeps working. Also backs the List (`ul`/`ol`) and ListItem (`li`) types.\n * See moveable-migration.md.\n */\n@Component({\n selector: 'div[iox-container],section[iox-container],article[iox-container],header[iox-container],footer[iox-container],main[iox-container],nav[iox-container],ul[iox-container],ol[iox-container],li[iox-container],form[iox-container]',\n template: `\n <!-- Empty-container slot (B2). pointer-events:none, so a click falls through and SELECTS\n this container — and the components panel then inserts INSIDE it. -->\n <div *ngIf=\"!children.length\" class=\"container-placeholder\">\n <i class=\"ph-thin ph-plus\"></i>\n <span>Click to select, then add an element</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render each child DIRECTLY — no .container-child wrapper. The\n RenderDirective puts iox-outer + iox-node on the child's HOST (the flex item) and registers\n drag there (via ioxDragSourceId), so the builder DOM matches the SSR engine's single\n element per node. Flex-child sizing (min-width:0) moves to \\`.container-root > *\\` below. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'container-root iox-node-' + nodeId + (listOrientation === 'horizontal' ? ' is-horizontal' : '') + (formClass ? ' ' + formClass : '')\",\n // Form nodes on the canvas carry the same class + state attribute the engine's twin does, so\n // the SHARED `iox-forms.css` decides visibility identically in both renderers.\n '[attr.data-iox-state]': 'formClass === \"iox-form\" ? formState : null',\n '[attr.start]': \"htmlTag === 'ol' && start !== 1 ? start : null\",\n '[attr.reversed]': \"htmlTag === 'ol' && reversed ? '' : null\",\n },\n styles: [`\n :host {\n position: relative;\n box-sizing: border-box;\n }\n .container-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n z-index: 0;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host(:hover) .container-placeholder,\n :host(.iox-drag-over) .container-placeholder {\n opacity: 1;\n }\n .container-placeholder i { font-size: 18px; }\n /* Flex/grid-child sizing on the DIRECT children (the collapsed node hosts) — was on the\n removed .container-child wrapper. min-width:0 lets flex items shrink below content so the\n equal-split works. ::ng-deep because the hosts are inserted dynamically (RenderDirective),\n so they don't carry this component's encapsulation attribute. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderContainerComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n @Input() htmlTag: string = 'div';\n @Input() start: number = 1;\n @Input() reversed: boolean = false;\n /**\n * Form-family marker: `iox-form`, `iox-form-success`, `iox-form-error` or `iox-field-group`.\n * The builder reuses THIS component for those types (as it already does for List/ListItem), so\n * they get the canvas drop zone and child rendering; the class is what lets the shared form\n * stylesheet treat them exactly as it treats the engine's own twins.\n */\n @Input() formClass = '';\n /** Which state the canvas is showing. Only meaningful on a form host. */\n @Input() formState = 'idle';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on `.container-root`).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../services/drag-engine.service';\n\n@Directive({\n selector: '[ioxDropzone]',\n standalone: false,\n})\nexport class IoxDropzoneDirective implements OnInit, OnDestroy {\n @Input() ioxDropzoneId = '';\n @Input() ioxDropzoneData: ComponentNode[] = [];\n /** Optional callback invoked after a drop lands in this zone (e.g. repeater preview refresh). */\n @Input() ioxDropzonePostDrop?: () => void;\n @Output() ioxDrop = new EventEmitter<IoxDropEvent>();\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.dragEngine.registerDropzone(\n this.ioxDropzoneId,\n this.el.nativeElement,\n this.ioxDropzoneData,\n this.cdr,\n (evt) => this.ioxDrop.emit(evt),\n this.ioxDropzonePostDrop,\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.ioxDropzoneId, this.el.nativeElement);\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n@Component({\n selector: 'app-builder-linked-container',\n template: `\n <a [href]=\"resolvedHref\"\n [target]=\"target\"\n [ngStyle]=\"style\"\n [ngClass]=\"['iox-node-' + nodeId, listOrientation === 'horizontal' ? 'is-horizontal' : '']\"\n class=\"linked-container-root\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <div *ngIf=\"!children.length\" class=\"linked-container-placeholder\">\n <i class=\"ph-thin ph-link\"></i>\n <span>Drop components here</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly into the <a>; iox-outer + drag\n move to the host. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </a>\n `,\n styles: [`\n .linked-container-root {\n display: block;\n position: relative;\n box-sizing: border-box;\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n }\n .linked-container-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transition: opacity 0.15s;\n }\n .linked-container-root:hover .linked-container-placeholder,\n .linked-container-root.iox-drag-over .linked-container-placeholder {\n opacity: 1;\n }\n .linked-container-placeholder i { font-size: 18px; }\n /* Flex/grid-child sizing on the collapsed direct-child hosts (was .linked-container-child).\n ::ng-deep because the hosts are inserted dynamically by RenderDirective. */\n :host ::ng-deep .linked-container-root > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderLinkedContainerComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n private capturePreventDefault = (e: MouseEvent) => e.preventDefault();\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\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 get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { resolvePath } from '@vectoriox/iox-ui';\n\nimport { ComponentNode, IoxBinding } from '../models/component.model';\n\n/**\n * `resolvePath` now lives in @vectoriox/iox-ui so the builder canvas and BOTH engine renderers\n * share one implementation — it had already drifted while forked. Re-exported here as a passthrough\n * so existing import sites keep working. See render-parity.md.\n */\nexport { resolvePath };\n\n/**\n * Deep-clones a ComponentNode tree and overrides trait defaults\n * according to each node's bindings resolved against `item`.\n *\n * Each clone gets a new `id` (for Angular tracking / overlay registration)\n * but shares the original node's CSS class by setting `styleId = originalId`.\n * This means all repeated preview rows point to the same CSS rule block as the\n * template node — the style engine only needs one rule per logical slot.\n */\nexport function cloneNodesForItem(nodes: ComponentNode[], item: any): ComponentNode[] {\n return nodes.map(node => {\n // Capture the CSS-owning id before clone\n const cssId = node.styleId ?? node.id;\n\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n clone.id = Math.random().toString(36).substr(2, 9);\n // Point this clone and all its descendants at the original CSS rule.\n clone.styleId = cssId;\n // Mark as a preview clone: display-only, not selectable/editable on the canvas.\n // (Distinct from styleId, which duplication/paste also uses.) The render directive\n // skips overlay registration for nodes carrying this flag.\n (clone as any).__previewClone = true;\n\n if (clone.bindings?.length && item) {\n for (const binding of clone.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n for (const trait of clone.traits || []) {\n if (trait.name === binding.prop) {\n trait.default = value;\n }\n }\n }\n }\n }\n\n if (clone.children?.length) {\n clone.children = cloneNodesForItem(clone.children, item);\n }\n\n return clone;\n });\n}\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { forkJoin, Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport {\n computeRelative,\n DataSourceEndpoints,\n dataSourcePlanToRequest,\n getByPath,\n normalizeCollectionResult,\n planDataSource,\n resolveRepeaterItems,\n} from '@vectoriox/iox-ui';\n\nimport { IoxDataSource } from '../models/component.model';\n\n/**\n * Public content bases the builder canvas resolves data against — the SAME `@Public()` controllers\n * the live storefront (SSR engine) hits, so the canvas preview shows what the published page shows.\n * Provide from the host app, e.g. `{ cmsBase: config.host + 'api/', shopBase: config.host + 'api/shop/' }`.\n */\nexport const IOX_DATA_SOURCE_ENDPOINTS = new InjectionToken<DataSourceEndpoints>('IOX_DATA_SOURCE_ENDPOINTS');\n\n/**\n * THE data fetch for every canvas component that renders a data source (Repeater, SliderContainer)\n * and for the bindings preview.\n *\n * Before this existed, each of those fetched by itself through an injected admin content service\n * (`getContent(contentType, orgId)` → `api/org/:orgId/resources/:type`), which takes NO filters:\n * the data source's `filterByQueryParams` / `filterByRouteParam` were silently ignored, so the\n * canvas always showed the whole unfiltered collection, and the live SSR site — which does apply\n * them — rendered something different. Every caller now runs the SHARED `planDataSource` from\n * `@vectoriox/iox-ui` against the public controllers, exactly like the SSR engine.\n */\n@Injectable()\nexport class BuilderDataSourceService {\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(IOX_DATA_SOURCE_ENDPOINTS) private endpoints: DataSourceEndpoints | null,\n ) {}\n\n /** True when the host app wired the public endpoints — without them nothing can be fetched. */\n get isConfigured(): boolean { return !!this.endpoints; }\n\n /**\n * Resolve a data source to the value its MODE describes: the item for a `single` source, the\n * array for a `list`. The builder is design time — there are no live route or query params — so\n * a route filter falls back to `defaultId` and a query filter to its `defaultValue`, which is\n * exactly what `planDataSource` does with empty params.\n *\n * Callers pass the source itself (resolved from their own page-scoped\n * `DataSourceRegistryService`) rather than an alias: this service is module-scoped and must not\n * capture a registry from the wrong injector. Emits `null` when the source resolves to no\n * request or the fetch fails — the canvas degrades to an empty preview, it never throws.\n */\n fetch(ds: IoxDataSource | undefined): Observable<any> {\n if (!ds) return of(null);\n\n const plan = planDataSource(ds as any);\n if (plan.kind === 'static') return of(plan.data);\n if (plan.kind === 'none' || !this.endpoints) return of(null);\n\n const request = dataSourcePlanToRequest(plan, this.endpoints);\n if (!request) return of(null);\n\n const { kind, mode } = plan;\n return this.http.get(request.url, { params: request.params }).pipe(\n // A by-id response is already the item; anything else goes through the shared\n // unwrap-and-pick so `single` yields one item and `list` the whole array.\n map((data: any) => kind === 'by-id'\n ? (Array.isArray(data) ? (data[0] ?? null) : data)\n : normalizeCollectionResult(mode, data)),\n catchError(() => of(null)),\n );\n }\n\n /** Same fetch, always as an array — for the canvas components that repeat over the source. */\n fetchItems(ds: IoxDataSource | undefined): Observable<any[]> {\n return this.fetchRepeaterItems(ds);\n }\n\n /**\n * Items a Repeater/Slider iterates over. With `sourcePath` it repeats over an array PROPERTY of a\n * SINGLE-resource source (e.g. `product.gallery`); without it the source itself is the list.\n * Uses the SHARED `resolveRepeaterItems` so the canvas preview matches the SSR engine.\n */\n fetchRepeaterItems(ds: IoxDataSource | undefined, sourcePath?: string): Observable<any[]> {\n return this.fetch(ds).pipe(map(value => resolveRepeaterItems(value, sourcePath)));\n }\n\n /**\n * Resolve a data source BY ALIAS, following `derived` aliases (a VIEW into another variable:\n * resolve the parent, then getByPath) and `relative` aliases (route-context — `$current`/\n * `$siblings`/`$related`). `findByAlias` is injected so this module stays registry-free (the caller\n * passes its own page-scoped registry). Recurses for chained aliases.\n *\n * The builder is design time: `relative` sources resolve their dependency aliases (subject +\n * collection) — a single source falls back to its `defaultId`, a list to the whole collection —\n * then run the SHARED `computeRelative`, so the canvas shows the SAME neighbours the SSR engine\n * bakes into the live page. `$route` has no live params at design time → `{}`.\n */\n fetchByAlias(alias: string, findByAlias: (a: string) => IoxDataSource | undefined): Observable<any> {\n const ds = findByAlias(alias);\n if (!ds) return of(null);\n if (ds.type === 'derived') {\n const d = ds.request?.derived;\n if (!d?.from) return of(null);\n return this.fetchByAlias(d.from, findByAlias).pipe(map(parent => getByPath(parent, d.path ?? '')));\n }\n if (ds.type === 'relative') {\n const spec = ds.request?.relative;\n if (!spec) return of(null);\n if (spec.kind === 'route') return of({});\n const subjectAlias = spec.kind === 'current' ? spec.from : (spec.subjectFrom ?? spec.from);\n const needsCollection = spec.kind === 'siblings' || spec.kind === 'related';\n return forkJoin({\n subject: subjectAlias ? this.fetchByAlias(subjectAlias, findByAlias) : of(undefined),\n collection: needsCollection && spec.from ? this.fetchByAlias(spec.from, findByAlias) : of(undefined),\n }).pipe(map(({ subject, collection }) => computeRelative(spec, { subject, collection, routeParams: {} })));\n }\n return this.fetch(ds);\n }\n\n /** Repeater items for an alias (follows derived aliases + applies an optional sourcePath). */\n fetchRepeaterItemsByAlias(\n alias: string,\n findByAlias: (a: string) => IoxDataSource | undefined,\n sourcePath?: string,\n ): Observable<any[]> {\n return this.fetchByAlias(alias, findByAlias).pipe(map(value => resolveRepeaterItems(value, sourcePath)));\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode, IoxBinding } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderDataSourceService } from '../../services/builder-data-source.service';\nimport { DataSourceRegistryService } from '../../services/data-source-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../../panels/panel-event.service';\nimport { cloneNodesForItem, resolvePath } from '../../utils/binding-path.util';\nimport { InteractionEngineService } from '../../services/interaction-engine.service';\n\n@Component({\n selector: 'app-builder-repeater',\n template: `\n <ng-template #badgeContent>\n <i class=\"ph-thin ph-repeat\"></i>\n <span *ngIf=\"source\">{{ source }}</span>\n <span *ngIf=\"!source\" class=\"repeater-badge-empty\">No source</span>\n <span *ngIf=\"items.length\" class=\"repeater-badge-count\">× {{ items.length }}</span>\n <span *ngIf=\"isLoading\" class=\"repeater-badge-loading\"><i class=\"ph-thin ph-circle-notch\"></i></span>\n </ng-template>\n\n <!--\n .repeater-wrapper is the layout root.\n In has-children state, .repeater-badge lives here as a direct child\n (position:absolute, hover-only) so it is NOT a child of .repeater-root\n and does NOT shift the :nth-child index of the item wrappers.\n\n In empty state, .repeater-badge lives inside .repeater-root (no items\n to count, so :nth-child is irrelevant there).\n -->\n <div class=\"repeater-wrapper\" [class.has-children]=\"children.length > 0\">\n\n <!-- HAS-CHILDREN: badge outside root, absolute over wrapper -->\n <div *ngIf=\"children.length > 0\" class=\"repeater-badge\">\n <ng-container *ngTemplateOutlet=\"badgeContent\"></ng-container>\n </div>\n\n <div class=\"repeater-root\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n [ioxDropzonePostDrop]=\"refreshPreviewsBound\"\n (ioxDrop)=\"onDrop($event)\">\n\n <!-- EMPTY STATE: badge + placeholder inside root -->\n <ng-container *ngIf=\"!children.length\">\n <div class=\"repeater-badge\">\n <ng-container *ngTemplateOutlet=\"badgeContent\"></ng-container>\n </div>\n <div class=\"repeater-placeholder\">\n <i class=\"ph-thin ph-rows\"></i>\n <span>Drop a component here as the item template</span>\n </div>\n </ng-container>\n\n <!-- Template items — DIRECT children of repeater-root.\n :first-child / :nth-child(odd) etc. now correctly target these\n as siblings of the preview items below. -->\n <div *ngFor=\"let child of children\"\n [ngClass]=\"['repeater-item-template', 'iox-outer-' + (child.styleId ?? child.id)]\"\n [attr.data-iox-row-src]=\"source || null\"\n [attr.data-iox-row-idx]=\"source ? 0 : null\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n\n <!-- Preview items — also DIRECT children of repeater-root. -->\n <ng-container *ngFor=\"let row of previewRows; let ri = index\">\n <div *ngFor=\"let child of row\"\n [ngClass]=\"['repeater-preview-child', 'iox-outer-' + (child.styleId ?? child.id)]\"\n [attr.data-iox-row-src]=\"source || null\"\n [attr.data-iox-row-idx]=\"ri + 1\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"$event\"\n (onMouseEnter)=\"$event\"\n (onMouseLeave)=\"undefined\">\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n `,\n styles: [`\n /* ── Outer wrapper: anchors the absolute badge in has-children state ── */\n .repeater-wrapper {\n position: relative;\n box-sizing: border-box;\n }\n\n /* ── Badge base (used in both empty and has-children contexts) ── */\n .repeater-badge {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 4px 8px;\n font-size: 11px;\n color: #cb9090;\n background: rgba(203, 144, 144, 0.08);\n border: 1px dashed rgba(203, 144, 144, 0.4);\n border-bottom: none;\n border-radius: 4px 4px 0 0;\n user-select: none;\n }\n\n /* ── Has-children: badge is absolute over the wrapper, hover-only ── */\n .repeater-wrapper.has-children > .repeater-badge {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n border-radius: 0 0 4px 0;\n border: 1px solid rgba(203, 144, 144, 0.5);\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.15s;\n }\n .repeater-wrapper.has-children:hover > .repeater-badge {\n opacity: 1;\n }\n\n .repeater-badge i { font-size: 13px; }\n .repeater-badge-empty { opacity: 0.55; }\n .repeater-badge-count { margin-left: auto; font-weight: 600; }\n .repeater-badge-loading i { animation: spin 1s linear infinite; }\n @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }\n\n /* ── Root ── */\n .repeater-root {\n box-sizing: border-box;\n }\n\n /* ── Empty state: dashed border on root (connected with badge above) ── */\n .repeater-wrapper:not(.has-children) .repeater-root {\n border: 1px dashed rgba(203, 144, 144, 0.4);\n border-top: none;\n border-radius: 0 0 4px 4px;\n min-height: 40px;\n }\n\n .repeater-placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 1.5rem 1rem;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n .repeater-placeholder i { font-size: 20px; }\n\n /* ── Template item: direct child, draggable, full opacity ── */\n .repeater-item-template {\n min-width: 0;\n }\n\n /* ── Preview items: direct children, dimmed, non-interactive ── */\n .repeater-preview-child {\n opacity: 0.55;\n pointer-events: none;\n min-width: 0;\n }\n `],\n standalone: false,\n})\nexport class BuilderRepeaterComponent implements OnInit, OnDestroy {\n private _children: ComponentNode[] = [];\n get children(): ComponentNode[] { return this._children; }\n /** RenderDirective sets `source` (→ fetchData) BEFORE `children`. With an async source the response\n * lands after children are set, so previews build fine; but a SYNC source (static, or a fast\n * cache) resolves before children exist, leaving previewRows empty. Rebuild when children arrive\n * (or change) so both orderings — and loaded pages with sync sources — render their rows. */\n @Input() set children(value: ComponentNode[]) {\n this._children = value ?? [];\n // Defer to the next tick: RenderDirective sets `children` before the template child's\n // component is instantiated/registered, so applyFirstItemToTemplate needs the ref to exist\n // first (otherwise the FIRST row shows its default instead of item[0]'s value).\n if (this.items.length) setTimeout(() => this.refreshPreviews());\n }\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n public items: any[] = [];\n public previewRows: ComponentNode[][] = [];\n public isLoading = false;\n\n /** Bound reference passed to [ioxDropzonePostDrop] so the directive can call it. */\n readonly refreshPreviewsBound = () => { setTimeout(() => this.refreshPreviews()); };\n\n private _source = '';\n private _sourcePath = '';\n private _limit = 10;\n private bindingSub?: Subscription;\n\n get source(): string { return this._source; }\n @Input() set source(value: string) {\n if (value === this._source) return;\n this._source = value;\n if (value) { this.fetchData(); }\n else { this.items = []; this.previewRows = []; }\n }\n\n /** Optional array PROPERTY inside a single-resource source to repeat over (e.g. `gallery`). */\n get sourcePath(): string { return this._sourcePath; }\n @Input() set sourcePath(value: string) {\n const next = value ?? '';\n if (next === this._sourcePath) return;\n this._sourcePath = next;\n if (this._source) { this.fetchData(); }\n }\n\n get limit(): number { return this._limit; }\n @Input() set limit(value: number) {\n if (value === this._limit) return;\n this._limit = value;\n if (this._source) { this.fetchData(); }\n }\n\n constructor(\n private dragEngine: DragEngineService,\n private overlayService: OverlayService,\n private dataSourceService: BuilderDataSourceService,\n private dsRegistry: DataSourceRegistryService,\n private panelEventService: PanelEventService,\n private cdr: ChangeDetectorRef,\n private interactionEngine: InteractionEngineService,\n ) {}\n\n ngOnInit(): void {\n this.bindingSub = this.panelEventService.subscribe(event => {\n // A binding OR an interaction change on a template node must re-clone the preview rows.\n // Interactions matter because clones are attached by ELEMENT at render time, so a newly\n // added interaction never reaches an existing clone — it would appear to work only after\n // a save + reload. See element-context-state-plan.md.\n if (event.type !== PanelEventTypes.BINDING_CHANGED\n && event.type !== PanelEventTypes.INTERACTION_CHANGED) return;\n const changedNode: ComponentNode = event.data?.node;\n if (!changedNode || !this.items.length) return;\n if (this.isInTemplate(changedNode)) {\n this.refreshPreviews();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.bindingSub?.unsubscribe();\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr,\n () => { if (this.items.length > 0) setTimeout(() => this.refreshPreviews()); });\n }\n\n /** Monotonic fetch token — editing a binding sets `source` and `sourcePath` as two separate inputs,\n * each firing a fetch; the transient mismatched one (old source + new path, or vice-versa) must not\n * clobber the correct result if it resolves last. Only the newest fetch's response is applied. */\n private _fetchSeq = 0;\n\n /** Data comes from the SHARED resolver (public controllers + the source's own filters) — the\n * same decision the SSR engine runs, so the canvas preview matches the published page. */\n private fetchData(): void {\n if (!this._source) return;\n\n const seq = ++this._fetchSeq;\n this.isLoading = true;\n this.cdr.markForCheck();\n // Resolve BY ALIAS so `derived` sources (e.g. galleryImages = product.gallery) follow their\n // parent. `sourcePath` (legacy/back-compat) still repeats over an array property inline.\n this.dataSourceService.fetchRepeaterItemsByAlias(\n this._source, (a) => this.dsRegistry.findByAlias(a), this._sourcePath,\n ).subscribe(items => {\n if (seq !== this._fetchSeq) return; // a newer fetch superseded this one — ignore stale items\n this.items = items.slice(0, this._limit);\n // Row markers store a REFERENCE (source + index); the engine needs the array to resolve\n // it back to an item, exactly as the SSR runtime uses resolvedData.\n this.interactionEngine.setContextData({ [this._source]: this.items });\n this.refreshPreviews();\n this.isLoading = false;\n this.cdr.markForCheck();\n });\n }\n\n private isInTemplate(target: ComponentNode): boolean {\n const search = (nodes: ComponentNode[]): boolean =>\n nodes.some(c =>\n c === target || c.id === target.id ||\n (c.children?.length ? search(c.children) : false)\n );\n return search(this.children);\n }\n\n private refreshPreviews(): void {\n if (!this.items.length || !this.children.length) {\n this.previewRows = [];\n this.cdr.markForCheck();\n return;\n }\n this.applyFirstItemToTemplate();\n this.previewRows = this.items.slice(1).map(item =>\n cloneNodesForItem(this.children, item)\n );\n this.cdr.markForCheck();\n }\n\n private applyFirstItemToTemplate(): void {\n const item = this.items[0];\n if (!item || !this.children.length) return;\n this.applyBindingsToNodes(this.children, item);\n }\n\n /** Apply item[0]'s bound values to the live template row, walking the WHOLE subtree — not just\n * direct children. A bound node can sit any level deep once a template child is wrapped in a\n * container (or otherwise nested), so recursion is required or the first row shows defaults. */\n private applyBindingsToNodes(nodes: ComponentNode[], item: any): void {\n for (const child of nodes) {\n if (child.bindings?.length) {\n const ref = this.overlayService.getNodeRef(child);\n if (ref?.componentRef) {\n for (const binding of child.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n ref.componentRef.instance[binding.prop] = value;\n }\n }\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n }\n if (child.children?.length) {\n this.applyBindingsToNodes(child.children, item);\n }\n }\n }\n\n /** Rebuild preview rows after the template STRUCTURE changed (e.g. a child was wrapped, deleted,\n * or moved). Deferred so the new DOM + overlay refs exist before bindings are re-applied. */\n refreshTemplate(): void {\n if (this.items.length) setTimeout(() => this.refreshPreviews());\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host ButtonBlock (wrapper collapse, task 9c). The real `<button>`/`<a>` IS the host —\n * chosen by RenderDirective via `hostElement` from the `tag` trait (`variableTag`), NOT an internal\n * `<button>` in the template. This matches the SSR engine's `button[iox-button-block]` component and\n * every other collapsed builder component (Container/Section/List/…): ONE element per node carrying\n * BOTH `iox-outer-{id}` (margin/width) + `iox-node-{id}` (visual props). Previously this component\n * kept the OLD pattern — a custom-element selector plus a template that rendered its own\n * `<button class=\"button-block-root\">` — so RenderDirective's host `<button>` (iox-outer) wrapped a\n * second `<button>` (iox-node): button-in-button, and width (outer) + aspect-ratio (inner) split\n * across two elements so aspect-ratio never resolved. Collapsing to the single host fixes both.\n *\n * The `button`/`a` UA resets (border, background, text-decoration) live in the builder app's global\n * styles.scss, kept OFF `:host` so styleProps (`.iox-node-{id}`) can override them.\n */\n@Component({\n selector: 'button[iox-button-block],a[iox-button-block]',\n template: `\n <span *ngIf=\"!children.length\" class=\"button-block-placeholder\">Button</span>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly into the host; iox-outer + drag land\n on each child's host (via ioxDragSourceId), matching the SSR engine. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'button-block-root 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: [`\n :host { box-sizing: border-box; }\n .button-block-placeholder {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(100, 116, 139, 0.4);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n /* Flex/grid-child sizing on the collapsed direct-child hosts; ::ng-deep for dynamic hosts. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderButtonBlockComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\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 @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on the inner button).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n inject,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { ComponentNode, IoxBinding } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { InteractionEngineService } from '../../services/interaction-engine.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderDataSourceService } from '../../services/builder-data-source.service';\nimport { DataSourceRegistryService } from '../../services/data-source-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../../panels/panel-event.service';\nimport { cloneNodesForItem, resolvePath } from '../../utils/binding-path.util';\n\n@Component({\n selector: 'app-slider-container',\n template: `\n <!-- EDIT MODE: shell wraps swiper + nav buttons so arrows position relative to slide area -->\n <div *ngIf=\"!isPreview\"\n class=\"slider-edit-shell\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"editShellStyle\"\n ioxDropzone\n [ioxDropzoneId]=\"source ? '' : dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <!-- Repeat badge: hover-only, anchored top-left of shell -->\n <div *ngIf=\"source\" class=\"slider-repeat-badge\">\n <i class=\"ph-thin ph-repeat\"></i>\n <span>{{ source }}</span>\n <span *ngIf=\"items.length\" class=\"slider-repeat-badge-count\">× {{ items.length }}</span>\n <i *ngIf=\"isLoading\" class=\"ph-thin ph-circle-notch slider-badge-spin\"></i>\n </div>\n\n <div #editSwiperEl class=\"swiper swiper-edit\" [attr.dir]=\"dir\" [style.direction]=\"dir\">\n <div class=\"swiper-wrapper\">\n\n <!-- NORMAL MODE: all children as draggable slides -->\n <ng-container *ngIf=\"!source\">\n <div *ngFor=\"let child of children\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </ng-container>\n\n <!-- REPEAT MODE: template slide (item 0) + dimmed preview slides (items 1..N) -->\n <ng-container *ngIf=\"source\">\n <!-- Template slide — draggable/editable, receives item[0] data -->\n <div *ngIf=\"children.length\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (children[0].styleId ?? children[0].id)]\"\n ioxDraggable\n [ioxDragData]=\"children[0]\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"children[0]\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n <!-- Preview slides — dimmed, non-interactive, data resolved from items 1..N -->\n <div *ngFor=\"let slide of previewSlides; trackBy: trackByNodeId\"\n class=\"swiper-slide slider-preview-slide\"\n [ngClass]=\"['iox-outer-' + (slide.styleId ?? slide.id)]\">\n <ng-container\n [ioxRender]=\"slide\"\n (onClick)=\"$event\"\n (onMouseEnter)=\"$event\"\n (onMouseLeave)=\"undefined\">\n </ng-container>\n </div>\n </ng-container>\n\n </div>\n\n <div *ngIf=\"!source && !children.length\" class=\"slider-edit-placeholder\">\n <i class=\"ph-thin ph-sliders-horizontal\"></i>\n <span>Click + in toolbar to add a slide</span>\n </div>\n\n <div *ngIf=\"enablePagination\" class=\"swiper-pagination\"></div>\n <div *ngIf=\"enableScrollbar\" class=\"swiper-scrollbar\"></div>\n </div>\n\n <!-- Nav buttons live on the shell, not inside .swiper, so overflow:hidden never clips them\n and top:50%+transform always centers on the real slide height -->\n <button *ngIf=\"enableNavigation\" class=\"slider-edit-nav slider-edit-nav--prev\"\n (click)=\"_swiper?.slidePrev()\" type=\"button\" title=\"Previous slide\">\n <i class=\"ph-thin ph-caret-left\"></i>\n </button>\n <button *ngIf=\"enableNavigation\" class=\"slider-edit-nav slider-edit-nav--next\"\n (click)=\"_swiper?.slideNext()\" type=\"button\" title=\"Next slide\">\n <i class=\"ph-thin ph-caret-right\"></i>\n </button>\n </div>\n\n <!-- PREVIEW MODE: real Swiper with all interactions enabled -->\n <div *ngIf=\"isPreview\"\n #swiperEl\n class=\"swiper\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"previewStyle\"\n [attr.dir]=\"dir\"\n [style.direction]=\"dir\"\n [style.--swiper-navigation-color]=\"navigationColor || null\"\n [style.--swiper-navigation-size.px]=\"navigationSize || null\"\n [style.--swiper-pagination-color]=\"paginationColor || null\">\n <div class=\"swiper-wrapper\">\n <!-- Swiper requires .swiper-slide as a DIRECT child of .swiper-wrapper.\n Wrap each rendered slide in one (same structure as edit mode) so the\n app-slider-slide host sits INSIDE the slide, not between it and the wrapper. -->\n <ng-container *ngIf=\"!source\">\n <div *ngFor=\"let child of children\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </ng-container>\n <!-- REPEAT: template slide + preview slides -->\n <ng-container *ngIf=\"source\">\n <div *ngIf=\"children.length\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (children[0].styleId ?? children[0].id)]\">\n <ng-container\n [ioxRender]=\"children[0]\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n <div *ngFor=\"let slide of previewSlides; trackBy: trackByNodeId\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (slide.styleId ?? slide.id)]\">\n <ng-container\n [ioxRender]=\"slide\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </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: [`\n :host {\n display: block;\n }\n /* swiper.css sets .swiper-wrapper { height: 100% } which inflates the container\n to parent height. Override to auto so the slider sizes to slide content. */\n .swiper-wrapper {\n height: auto;\n }\n /* ── Edit-mode shell ─────────────────────────────────────────────────────\n Shell is the IOX-styled container ([ngStyle]=\"style\" lives here).\n position:relative anchors the absolutely-positioned nav buttons + badge.\n The .swiper inside fills the shell width and auto-heights to slides. */\n .slider-edit-shell {\n position: relative;\n display: block;\n }\n .swiper-edit {\n width: 100%;\n }\n /* Edit-mode slides need position:relative for the overlay hit-test */\n .swiper-edit .swiper-slide {\n position: relative;\n }\n /* Nav buttons: siblings to .swiper, positioned on the shell.\n top:50% + transform are purely CSS → auto-recenter on any height change. */\n .slider-edit-nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: 1px solid rgba(255,255,255,0.5);\n background: rgba(0,0,0,0.22);\n color: white;\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 10;\n transition: background 0.15s;\n }\n .slider-edit-nav:hover { background: rgba(0,0,0,0.45); }\n .slider-edit-nav--prev { left: 8px; }\n .slider-edit-nav--next { right: 8px; }\n .slider-edit-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n .slider-edit-placeholder i { font-size: 22px; }\n /* ── Repeat badge ───────────────────────────────────────────────────────\n Hover-only, anchored top-left of shell. Same visual language as Repeater badge. */\n .slider-repeat-badge {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 4px 8px;\n font-size: 11px;\n color: #cb9090;\n background: rgba(203, 144, 144, 0.08);\n border: 1px solid rgba(203, 144, 144, 0.5);\n border-radius: 0 0 4px 0;\n opacity: 0;\n transition: opacity 0.15s;\n user-select: none;\n pointer-events: none;\n }\n .slider-edit-shell:hover .slider-repeat-badge {\n opacity: 1;\n }\n .slider-repeat-badge-count { font-weight: 600; }\n .slider-badge-spin { animation: slider-badge-spin 1s linear infinite; }\n @keyframes slider-badge-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n /* ── Preview slides (repeat mode): dimmed, non-interactive ─────────── */\n .slider-preview-slide {\n opacity: 0.55;\n pointer-events: none;\n }\n `],\n standalone: false,\n})\nexport class SliderContainerComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\n @Input() children: ComponentNode[] = [];\n\n private _style: Record<string, any> = {};\n private _previewStyle: Record<string, any> = {};\n private _editShellStyle: Record<string, any> = { position: 'relative' };\n @Input() set style(v: Record<string, any>) {\n if (v === this._style) return;\n this._style = v;\n // `direction` is driven by the `dir` (Language direction) trait via [style.direction].\n // Strip it from the ngStyle map: NgStyle writes the inline style last and would otherwise\n // override the dir-driven direction with the generic Layout default → RTL wouldn't apply.\n // Rebuild cached objects so ngStyle only re-applies on real input changes (avoids MO spam).\n const { direction: _dropDirection, ...rest } = v || {};\n this._previewStyle = rest;\n this._editShellStyle = { ...rest, position: 'relative' };\n }\n get style(): Record<string, any> { return this._style; }\n\n get previewStyle(): Record<string, any> { return this._previewStyle; }\n get editShellStyle(): Record<string, any> { return this._editShellStyle; }\n\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n // ── Parameters ─────────────────────────────────────────────────────────────\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n @Input() slidesPerView: number | 'auto' = 'auto';\n @Input() slidesPerGroup: number = 1;\n /** 'off' | 'loop' | 'rewind' */\n @Input() loop: string = 'off';\n @Input() centeredSlides: boolean = false;\n @Input() spaceBetween: number = 0;\n @Input() initialSlide: number = 0;\n @Input() autoHeight: boolean = false;\n @Input() grabCursor: boolean = true;\n @Input() slideToClickedSlide: boolean = false;\n\n // ── Effects ────────────────────────────────────────────────────────────────\n @Input() effect: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'cards' | 'creative' = 'slide';\n @Input() speed: number = 300;\n\n // ── Navigation ─────────────────────────────────────────────────────────────\n @Input() enableNavigation: boolean = false;\n @Input() navigationColor: string = '';\n @Input() navigationSize: number = 44;\n\n // ── Pagination ─────────────────────────────────────────────────────────────\n @Input() enablePagination: boolean = false;\n @Input() paginationColor: string = '';\n @Input() paginationType: 'bullets' | 'fraction' | 'progressbar' = 'bullets';\n @Input() paginationClickable: boolean = true;\n @Input() paginationDynamicBullets: boolean = false;\n\n // ── Autoplay ───────────────────────────────────────────────────────────────\n @Input() enableAutoplay: boolean = false;\n @Input() autoplayDelay: number = 3000;\n @Input() autoplayPauseOnMouseEnter: boolean = true;\n @Input() autoplayDisableOnInteraction: boolean = false;\n\n // ── Modules ────────────────────────────────────────────────────────────────\n @Input() enableScrollbar: boolean = false;\n @Input() freeMode: boolean = false;\n @Input() enableKeyboard: boolean = false;\n @Input() enableMousewheel: boolean = false;\n @Input() enableZoom: boolean = false;\n @Input() enableParallax: boolean = false;\n\n // ── Grid ───────────────────────────────────────────────────────────────────\n @Input() enableGrid: boolean = false;\n @Input() gridRows: number = 2;\n\n // ── Responsive ─────────────────────────────────────────────────────────────\n @Input() breakpoints: string = '';\n\n // ── Data binding ───────────────────────────────────────────────────────────\n private _source = '';\n private _limit = 10;\n\n get source(): string { return this._source; }\n @Input() set source(value: string) {\n if (value === this._source) return;\n this._source = value;\n if (value) {\n this.fetchData();\n } else {\n this.items = [];\n this.previewSlides = [];\n this._scheduleReinit();\n }\n }\n\n get limit(): number { return this._limit; }\n @Input() set limit(value: number) {\n if (value === this._limit) return;\n this._limit = value;\n if (this._source) { this.fetchData(); }\n }\n\n public items: any[] = [];\n public previewSlides: ComponentNode[] = [];\n public isLoading = false;\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n @ViewChild('swiperEl', { static: false }) swiperEl?: ElementRef<HTMLElement>;\n @ViewChild('editSwiperEl', { static: false }) editSwiperEl?: ElementRef<HTMLElement>;\n\n _swiper: any = null;\n private _initRafId = 0;\n private _bindingSub?: Subscription;\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n private interactionEngine = inject(InteractionEngineService);\n private ngZone = inject(NgZone);\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean,\n @Optional() private overlayService: OverlayService,\n @Optional() private dataSourceService: BuilderDataSourceService | null,\n @Optional() private dsRegistry: DataSourceRegistryService,\n @Optional() private panelEventService: PanelEventService,\n ) {\n this.isPreview = !!isPreview;\n }\n\n ngOnInit(): void {\n if (this.panelEventService) {\n this._bindingSub = this.panelEventService.subscribe(event => {\n if (event.type !== PanelEventTypes.BINDING_CHANGED) return;\n const changedNode: ComponentNode = event.data?.node;\n if (!changedNode || !this.items.length || !this._source) return;\n if (this._isInTemplate(changedNode)) {\n this.refreshPreviews();\n }\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Run outside Angular's zone so Swiper's internal ResizeObserver, MutationObserver,\n // and RAF-based animation loops don't trigger unnecessary CD ticks.\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._swiper) return;\n\n // dir-only change: use changeLanguageDirection() — avoids full reinit\n // which races against Angular re-rendering slides in the DOM.\n if (changes['dir'] && Object.keys(changes).length === 1) {\n this._swiper.changeLanguageDirection(this.dir);\n return;\n }\n\n const previewKeys = new Set([\n 'direction', 'loop', 'slidesPerView', 'slidesPerGroup', 'spaceBetween', 'speed',\n 'effect', 'grabCursor', 'centeredSlides', 'initialSlide', 'autoHeight',\n 'slideToClickedSlide', 'freeMode', 'breakpoints',\n 'enableNavigation', 'navigationColor', 'navigationSize',\n 'enablePagination', 'paginationColor', 'paginationType', 'paginationClickable', 'paginationDynamicBullets',\n 'enableScrollbar', 'enableAutoplay',\n 'enableKeyboard', 'enableMousewheel', 'enableZoom', 'enableGrid', 'enableParallax',\n 'autoplayDelay', 'autoplayPauseOnMouseEnter', 'autoplayDisableOnInteraction',\n 'gridRows',\n ]);\n\n // Edit mode also reinits when children change (new slide added or removed)\n const editKeys = new Set([...previewKeys, 'children']);\n const relevantKeys = this.isPreview ? previewKeys : editKeys;\n\n const hasConfigChange = Object.keys(changes).some(k => relevantKeys.has(k));\n if (hasConfigChange) {\n this._destroySwiper();\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n }\n\n ngOnDestroy(): void {\n cancelAnimationFrame(this._initRafId);\n this._destroySwiper();\n this._bindingSub?.unsubscribe();\n }\n\n trackByNodeId(_index: number, node: ComponentNode): string {\n return node.id ?? String(_index);\n }\n\n onDrop(event: IoxDropEvent): void {\n if (this._source) return; // repeat mode: drops disabled, slides come from data source\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n if (this._swiper) {\n this.ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this._swiper?.update());\n });\n }\n }\n\n // ── Data fetching ───────────────────────────────────────────────────────────\n\n /** Slides come from the SHARED resolver (public controllers + the source's own filters) — the\n * same decision the SSR engine runs, so the canvas preview matches the published page. */\n private fetchData(): void {\n if (!this._source || !this.dataSourceService || !this.dsRegistry) return;\n\n this.isLoading = true;\n this.cdr.markForCheck();\n this.dataSourceService.fetchItems(this.dsRegistry.findByAlias(this._source)).subscribe(items => {\n this.items = items.slice(0, this._limit);\n this.refreshPreviews();\n this.isLoading = false;\n this.cdr.markForCheck();\n });\n }\n\n private refreshPreviews(): void {\n if (!this.items.length || !this.children.length) {\n this.previewSlides = [];\n this.cdr.markForCheck();\n this._scheduleReinit();\n return;\n }\n this.applyFirstItemToTemplate();\n // Each preview slide = one cloned SliderSlide node with item data resolved\n this.previewSlides = this.items.slice(1).map(item =>\n cloneNodesForItem([this.children[0]], item)[0]\n );\n this.cdr.markForCheck();\n this._scheduleReinit();\n }\n\n private applyFirstItemToTemplate(): void {\n const item = this.items[0];\n if (!item || !this.children.length || !this.overlayService) return;\n // Bindings live on leaf nodes inside the template slide, so recurse into the tree\n this.applyItemToNodes([this.children[0]], item);\n }\n\n private applyItemToNodes(nodes: ComponentNode[], item: any): void {\n for (const node of nodes) {\n if (node.bindings?.length) {\n const ref = this.overlayService.getNodeRef(node);\n if (ref?.componentRef) {\n for (const binding of node.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n ref.componentRef.instance[binding.prop] = value;\n }\n }\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n }\n if (node.children?.length) {\n this.applyItemToNodes(node.children, item);\n }\n }\n }\n\n private _isInTemplate(target: ComponentNode): boolean {\n const search = (nodes: ComponentNode[]): boolean =>\n nodes.some(c =>\n c === target || c.id === target.id ||\n (c.children?.length ? search(c.children) : false)\n );\n return this.children.length > 0 && search([this.children[0]]);\n }\n\n private _scheduleReinit(): void {\n this._destroySwiper();\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n\n // ── Swiper lifecycle ────────────────────────────────────────────────────────\n\n private async _initSwiper(): Promise<void> {\n const el = this.isPreview ? this.swiperEl?.nativeElement : this.editSwiperEl?.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, FreeMode,\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\n const config: Record<string, any> = {\n modules,\n direction: this.direction,\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup > 1 ? this.slidesPerGroup : 1,\n spaceBetween: this.spaceBetween,\n speed: this.isPreview ? this.speed : 300,\n // Always slide effect in edit mode — fade/cube etc. hide all but active slide\n effect: this.isPreview ? this.effect : 'slide',\n centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide,\n autoHeight: this.autoHeight,\n };\n\n if (this.isPreview) {\n // Full interactive config for preview\n config['grabCursor'] = this.grabCursor;\n config['slideToClickedSlide'] = this.slideToClickedSlide;\n config['loop'] = this.loop === 'loop';\n config['rewind'] = this.loop === 'rewind';\n\n if (this.freeMode) { modules.push(FreeMode); config['freeMode'] = true; }\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 if (this.enableNavigation) {\n config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n }\n if (this.enablePagination) {\n config['pagination'] = {\n el: '.swiper-pagination',\n type: this.paginationType,\n clickable: this.paginationClickable,\n dynamicBullets: this.paginationDynamicBullets,\n };\n }\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: true };\n if (this.enableAutoplay) {\n config['autoplay'] = {\n delay: this.autoplayDelay,\n pauseOnMouseEnter: this.autoplayPauseOnMouseEnter,\n disableOnInteraction: this.autoplayDisableOnInteraction,\n };\n }\n if (this.enableGrid && this.gridRows > 1) config['grid'] = { rows: this.gridRows };\n if (this.breakpoints) {\n try { config['breakpoints'] = JSON.parse(this.breakpoints); } catch { /* ignore */ }\n }\n\n config['on'] = {\n slideChange: (swiper: any) => this._onSwiperEvent('swiperSlideChange', swiper),\n reachBeginning: (swiper: any) => this._onSwiperEvent('swiperReachBeginning', swiper),\n reachEnd: (swiper: any) => this._onSwiperEvent('swiperReachEnd', swiper),\n autoplayStart: (swiper: any) => this._onSwiperEvent('swiperAutoplayStart', swiper),\n autoplayStop: (swiper: any) => this._onSwiperEvent('swiperAutoplayStop', swiper),\n };\n } else {\n // Edit mode: disable touch/swipe so builder click handlers work normally\n config['allowTouchMove'] = false;\n config['simulateTouch'] = false;\n\n if (this.enableNavigation) {\n config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n }\n if (this.enablePagination) {\n config['pagination'] = {\n el: '.swiper-pagination',\n type: this.paginationType,\n clickable: this.paginationClickable,\n dynamicBullets: this.paginationDynamicBullets,\n };\n }\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: false };\n }\n\n this._swiper = new Swiper(el, config);\n this.instanceRegistry.register(this.nodeId, this._swiper);\n }\n\n private _destroySwiper(): 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 _onSwiperEvent(eventName: string, swiper: any): void {\n this.interactionEngine.replayTrigger(this.nodeId, eventName as any);\n\n if (eventName === 'swiperSlideChange') {\n const prevIdx: number = swiper.previousIndex;\n const activeIdx: number = swiper.activeIndex;\n const allSlides = this._source ? [this.children[0], ...this.previewSlides] : this.children;\n if (prevIdx !== undefined && allSlides[prevIdx]) {\n this.interactionEngine.replayTrigger(allSlides[prevIdx].id!, 'swiperSlideInactive');\n }\n if (allSlides[activeIdx]) {\n this.interactionEngine.replayTrigger(allSlides[activeIdx].id!, 'swiperSlideActive');\n }\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\n\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n@Component({\n selector: 'app-slider-slide',\n template: `\n <!-- The .swiper-slide wrapper (with the iox-outer-* class) is provided by SliderContainer —\n Swiper needs it as a direct child of .swiper-wrapper — and the SLIDE'S size lands there\n via StyleRegistryService. This is only the styled INNER block, so width/min-width/\n max-width MUST be stripped (slideEditStyle): the slide is already sized on the outer\n wrapper, and re-applying width here would size the content to 71% OF the 71% slide (the\n engine's iox-slider-slide is a single host, so it never had this trap). Preview and edit\n behave identically — the earlier preview branch used the un-stripped style input and\n shrank the content inside its own slide. -->\n <div class=\"slide-edit-block\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"slideEditStyle\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <div *ngIf=\"!children.length\" class=\"slide-placeholder\">\n <i class=\"ph-thin ph-image\"></i>\n <span>Drop components here</span>\n </div>\n\n <div *ngFor=\"let child of children\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </div>\n `,\n styles: [`\n .slide-edit-block {\n position: relative;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n /* default card bg — overridden by inline [ngStyle] when user sets a background */\n background-color: var(--p-surface-300);\n }\n .slide-edit-block {\n width: 100%;\n }\n .slide-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host:hover .slide-placeholder,\n :host.iox-drag-over .slide-placeholder {\n opacity: 1;\n }\n .slide-placeholder i { font-size: 22px; }\n `],\n standalone: false,\n})\nexport class SliderSlideComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n\n private _style: Record<string, any> = {};\n private _slideEditStyle: Record<string, any> = {};\n @Input() set style(v: Record<string, any>) {\n if (v === this._style) return;\n this._style = v;\n // Strip width constraints; rebuild cached object so ngStyle only updates DOM\n // when the input actually changed — prevents spurious MutationObserver triggers.\n const { width, minWidth, maxWidth, ...rest } = v || {};\n this._slideEditStyle = rest;\n }\n get style(): Record<string, any> { return this._style; }\n\n get slideEditStyle(): Record<string, any> { return this._slideEditStyle; }\n\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean,\n ) {\n this.isPreview = !!isPreview;\n }\n\n ngOnInit(): void {}\n ngOnDestroy(): void {}\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { Component, Input, TemplateRef, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'panel-child',\n template: '<ng-template #tpl><ng-content></ng-content></ng-template>',\n standalone: false,\n})\nexport class PanelChildComponent {\n @Input() name!: string;\n @ViewChild('tpl', { static: true }) template!: TemplateRef<any>;\n}","import { AfterContentInit, Component, ContentChildren, OnDestroy, QueryList } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { PanelEvent, PanelEventService, PanelEventTypes } from '../panel-event.service';\nimport { PanelChildComponent } from './panel-child.component';\n\n@Component({\n selector: 'app-panel',\n templateUrl: './panel.component.html',\n styleUrls: ['./panel.component.scss'],\n standalone: false,\n})\nexport class PanelComponent implements AfterContentInit, OnDestroy {\n public isPanelOpen = false;\n public activePanel: string | null = null;\n\n @ContentChildren(PanelChildComponent) panelChildren!: QueryList<PanelChildComponent>;\n\n private sub?: Subscription;\n\n constructor(private panelEventService: PanelEventService) {\n this.sub = this.panelEventService.subscribe((panelEvent: PanelEvent) => {\n if (panelEvent.type === PanelEventTypes.PANEL_CLOSE) {\n this.isPanelOpen = false;\n this.activePanel = null;\n return;\n }\n\n if (panelEvent.type === PanelEventTypes.PANEL_SELECTED || panelEvent.type === PanelEventTypes.PANEL_OPEN) {\n this.isPanelOpen = true;\n this.activePanel = panelEvent.data;\n }\n });\n }\n\n ngAfterContentInit(): void {}\n\n ngOnDestroy(): void {\n this.sub?.unsubscribe();\n }\n}","<div class=\"panel\">\n <ng-container *ngFor=\"let child of panelChildren\">\n <div class=\"panel-body\" [ngClass]=\"{ active: activePanel === child.name }\">\n <ng-container *ngTemplateOutlet=\"child.template\"></ng-container>\n </div>\n </ng-container>\n</div>","import { Injectable } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\nexport interface HistoryEntry {\n layout: ComponentNode[];\n timestamp: number;\n}\n\nconst MAX_HISTORY = 50;\n\n/**\n * BuilderHistoryService — snapshot-based undo/redo for the page builder.\n *\n * Snapshots are JSON deep-clones of the full layout array.\n * Session-only — not persisted to the backend.\n * Scoped to PageUiComponent.providers[] — one history stack per builder instance.\n */\n@Injectable()\nexport class BuilderHistoryService {\n private _past: HistoryEntry[] = [];\n private _future: HistoryEntry[] = [];\n\n get canUndo(): boolean { return this._past.length > 1; }\n get canRedo(): boolean { return this._future.length > 0; }\n\n push(layout: ComponentNode[]): void {\n this._past.push({ layout: JSON.parse(JSON.stringify(layout)), timestamp: Date.now() });\n if (this._past.length > MAX_HISTORY) {\n this._past.shift();\n }\n this._future = [];\n }\n\n undo(): ComponentNode[] | null {\n if (!this.canUndo) return null;\n const current = this._past.pop()!;\n this._future.unshift(current);\n return JSON.parse(JSON.stringify(this._past[this._past.length - 1].layout));\n }\n\n redo(): ComponentNode[] | null {\n if (!this.canRedo) return null;\n const next = this._future.shift()!;\n this._past.push(next);\n return JSON.parse(JSON.stringify(next.layout));\n }\n\n clear(): void {\n this._past = [];\n this._future = [];\n }\n}\n","import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { AccordionModule } from 'primeng/accordion';\nimport { ButtonModule } from 'primeng/button';\nimport { PopoverModule } from 'primeng/popover';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { SelectModule } from 'primeng/select';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DialogModule } from 'primeng/dialog';\n\nimport { IoxPageModule } from '@vectoriox/iox-ui';\n\nimport { BuilderComponent } from './builder.component';\nimport { SectionComponent } from './components/section/section.component';\nimport { BuilderContainerComponent } from './components/container/container.component';\nimport { BuilderLinkedContainerComponent } from './components/linked-container/linked-container.component';\nimport { BuilderRepeaterComponent } from './components/repeater/repeater.component';\nimport { BuilderButtonBlockComponent } from './components/button-block/button-block.component';\nimport { SliderContainerComponent } from './components/slider-container/slider-container.component';\nimport { SliderSlideComponent } from './components/slider-slide/slider-slide.component';\nimport { OverlayComponent } from './overlay/overlay.component';\nimport { ToolbarComponent } from './toolbar/toolbar.component';\nimport { RenderDirective } from './render/render.directive';\nimport { IoxDraggableDirective } from './directives/iox-draggable.directive';\nimport { IoxDropzoneDirective } from './directives/iox-dropzone.directive';\nimport { PanelComponent } from './panels/panel/panel.component';\nimport { PanelChildComponent } from './panels/panel/panel-child.component';\nimport { LayerTreeComponent } from './panels/layer-tree/layer-tree.component';\nimport { BreadcrumbBarComponent } from './breadcrumb/breadcrumb-bar.component';\nimport { AuditPanelComponent } from './audit/audit-panel.component';\n\nimport { DragEngineService } from './services/drag-engine.service';\nimport { OverlayService } from './overlay/overlay.service';\nimport { ComponentRegistryService } from './services/component-registry.service';\nimport { DataSourceRegistryService } from './services/data-source-registry.service';\nimport { InteractionEngineService } from './services/interaction-engine.service';\nimport { ViewportService } from './services/viewport.service';\nimport { StyleRegistryService } from './services/style-registry.service';\nimport { PanelEventService } from './panels/panel-event.service';\nimport { PresetRegistryService } from './services/preset-registry.service';\nimport { SymbolRegistryService } from './services/symbol-registry.service';\nimport { InteractionPresetRegistryService } from './services/interaction-preset-registry.service';\nimport { BuilderHistoryService } from './services/builder-history.service';\nimport { BuilderClipboardService } from './services/builder-clipboard.service';\nimport { BuilderDataSourceService } from './services/builder-data-source.service';\n\n// The Style / Page / Bindings / Interactions panels are NOT part of this library: the builder\n// projects them in through <ng-content select=\"[builderPanel]\"> and the consuming app declares\n// them (they need <dynamic-input> from its InputsModule). Stale copies of the Style and Page\n// panels used to sit under lib/panels/ — undeclared and unexported, so editing them changed\n// nothing on screen. Deleted; do not reintroduce them here.\nconst DECLARATIONS = [\n BuilderComponent,\n RenderDirective,\n IoxDraggableDirective,\n IoxDropzoneDirective,\n OverlayComponent,\n ToolbarComponent,\n SectionComponent,\n BuilderContainerComponent,\n BuilderLinkedContainerComponent,\n BuilderRepeaterComponent,\n BuilderButtonBlockComponent,\n SliderContainerComponent,\n SliderSlideComponent,\n PanelComponent,\n PanelChildComponent,\n LayerTreeComponent,\n BreadcrumbBarComponent,\n AuditPanelComponent,\n];\n\n@NgModule({\n declarations: DECLARATIONS,\n imports: [\n CommonModule,\n FormsModule,\n DragDropModule,\n AccordionModule,\n ButtonModule,\n PopoverModule,\n InputTextModule,\n SelectModule,\n TooltipModule,\n DialogModule,\n IoxPageModule,\n ],\n providers: [\n DragEngineService,\n OverlayService,\n ComponentRegistryService,\n DataSourceRegistryService,\n InteractionEngineService,\n ViewportService,\n StyleRegistryService,\n PanelEventService,\n PresetRegistryService,\n SymbolRegistryService,\n InteractionPresetRegistryService,\n BuilderHistoryService,\n BuilderClipboardService,\n BuilderDataSourceService,\n ],\n exports: [\n // Angular/PrimeNG modules re-exported so consumers can use them\n CommonModule,\n FormsModule,\n DragDropModule,\n AccordionModule,\n ButtonModule,\n PopoverModule,\n InputTextModule,\n SelectModule,\n TooltipModule,\n DialogModule,\n IoxPageModule,\n // Builder declarations\n BuilderComponent,\n RenderDirective,\n IoxDraggableDirective,\n IoxDropzoneDirective,\n OverlayComponent,\n ToolbarComponent,\n SectionComponent,\n BuilderContainerComponent,\n BuilderLinkedContainerComponent,\n BuilderRepeaterComponent,\n BuilderButtonBlockComponent,\n SliderContainerComponent,\n SliderSlideComponent,\n PanelComponent,\n PanelChildComponent,\n LayerTreeComponent,\n BreadcrumbBarComponent,\n AuditPanelComponent,\n ],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class IoxBuilderModule {}\n","/**\n * ESSENTIALS (B3) — the handful of style controls that matter first for each component type.\n *\n * The style panel carries 94 controls across ten groups, ranked by nothing: the control you want for\n * a heading sits at the same visual weight as `backdrop-filter`. The panel shows this short list in\n * a band at the top; everything else stays exactly where it is, one click away, and reachable by\n * search. Nothing is removed and nothing changes group.\n *\n * A data table, not per-component code: adding a type is one row. Types with no row fall back to\n * `DEFAULT_ESSENTIAL_TRAITS`, so a new component is never worse off than today.\n */\nexport const ESSENTIAL_TRAITS_BY_TYPE: Readonly<Record<string, readonly string[]>> = Object.freeze({\n Heading: ['fontFamily', 'fontSize', 'fontWeight', 'color', 'textAlign', 'margin'],\n Text: ['fontFamily', 'fontSize', 'color', 'lineHeight', 'textAlign', 'margin'],\n Button: ['backgroundColor', 'color', 'padding', 'borderRadius', 'fontSize'],\n ButtonBlock: ['backgroundColor', 'padding', 'borderRadius', 'width', 'justifyContent'],\n Link: ['color', 'fontSize', 'textDecoration', 'fontWeight'],\n Image: ['width', 'height', 'objectFit', 'aspectRatio', 'borderRadius'],\n Icon: ['fontSize', 'color'],\n Container: ['display', 'flexDirection', 'gap', 'padding', 'width', 'backgroundColor'],\n LinkedContainer: ['display', 'flexDirection', 'gap', 'padding', 'width', 'backgroundColor'],\n Section: ['padding', 'backgroundColor', 'minHeight', 'display', 'justifyContent'],\n Card: ['width', 'padding', 'backgroundColor', 'borderRadius', 'boxShadow'],\n List: ['display', 'gap', 'padding', 'markerColor'],\n ListItem: ['padding', 'fontSize', 'color'],\n Repeater: ['display', 'flexDirection', 'gap', 'gridTemplateColumns'],\n Divider: ['borderWidth', 'borderColor', 'width', 'margin'],\n Spacer: ['height'],\n SliderContainer: ['width', 'height', 'gap'],\n SliderSlide: ['width', 'padding', 'backgroundColor'],\n Gallery: ['width', 'aspectRatio', 'gap', 'borderRadius'],\n});\n\n/** For any type without its own row — size, spacing and background suit almost anything. */\nexport const DEFAULT_ESSENTIAL_TRAITS: readonly string[] =\n Object.freeze(['width', 'height', 'padding', 'margin', 'backgroundColor']);\n\n/** The essential trait NAMES for a component type, in the order they should be shown. */\nexport function essentialTraitsFor(type: string | null | undefined): readonly string[] {\n return (type && ESSENTIAL_TRAITS_BY_TYPE[type]) || DEFAULT_ESSENTIAL_TRAITS;\n}\n\n/**\n * Does `label` or `name` match a control search? Case-insensitive substring on either, so \"shadow\"\n * finds `boxShadow` (\"Box shadow\") and \"radius\" finds `borderRadius`.\n */\nexport function matchesControlSearch(name: string, label: string, term: string): boolean {\n const needle = term.trim().toLowerCase();\n if (!needle) return true;\n return name.toLowerCase().includes(needle) || (label ?? '').toLowerCase().includes(needle);\n}\n","import { ComponentNode } from './component.model';\n\n/**\n * FORM PRESETS — a complete, working form as one insert.\n *\n * This is the piece that makes the whole feature feel simple. Dropping a preset gives a form that\n * already validates, already stores, and already has designed Success and Error blocks — so the\n * author's first action is editing copy, not wiring plumbing. Nothing here is a new component type:\n * what lands on the canvas is ordinary nodes, editable and take-apart-able afterwards.\n *\n * Mirrors `layout-presets.ts` deliberately: same shape, same build-from-configs approach, so there\n * is one way to express \"a preset\" in this codebase rather than two.\n */\n\nexport interface FormPresetField {\n label: string;\n control: string;\n required?: boolean;\n help?: string;\n placeholder?: string;\n /** Choices for select/radio, `value|Label` per line — the Field's `optionsText` trait. */\n optionsText?: string;\n rows?: number;\n}\n\nexport interface FormPresetDef {\n id: string;\n name: string;\n icon: string;\n /** One line in the panel: what it collects and where it goes. */\n description: string;\n /** The form's author-facing name, which the submissions inbox groups by. */\n formName: string;\n fields: FormPresetField[];\n submitLabel: string;\n successText: string;\n errorText: string;\n}\n\nexport const FORM_PRESETS: readonly FormPresetDef[] = Object.freeze([\n {\n id: 'contact', name: 'Contact', icon: 'ph-thin ph-envelope-simple',\n description: 'Name, email and a message. Stored, and emailed to you.',\n formName: 'Contact form',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Message', control: 'textarea', required: true, rows: 5 },\n ],\n submitLabel: 'Send message',\n successText: 'Thanks — we’ll be in touch shortly.',\n errorText: 'We couldn’t send your message. Please try again — your answers are still here.',\n },\n {\n id: 'newsletter', name: 'Newsletter', icon: 'ph-thin ph-paper-plane-tilt',\n description: 'One email field plus consent. Stored.',\n formName: 'Newsletter signup',\n fields: [\n { label: 'Email', control: 'email', required: true, placeholder: 'you@company.com' },\n // Consent is a checkbox that must be TICKED — `required` on a checkbox becomes the\n // `accepted` rule, with its own message, rather than a generic \"this is required\".\n { label: 'Email me occasional updates', control: 'checkbox', required: true },\n ],\n submitLabel: 'Subscribe',\n successText: 'You’re on the list.',\n errorText: 'We couldn’t sign you up. Please try again.',\n },\n {\n id: 'application', name: 'Application', icon: 'ph-thin ph-read-cv-logo',\n description: 'Details plus a CV upload. Stored, with an auto-reply.',\n formName: 'Application',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Phone', control: 'tel' },\n { label: 'Role', control: 'select', required: true, optionsText: 'Design\\nEngineering\\nOther' },\n { label: 'CV', control: 'file', required: true, help: 'PDF or Word, up to 5MB' },\n { label: 'Anything else', control: 'textarea', rows: 4 },\n ],\n submitLabel: 'Apply',\n successText: 'Application received — we’ll read it properly and reply.',\n errorText: 'We couldn’t submit your application. Please try again.',\n },\n {\n id: 'booking', name: 'Booking request', icon: 'ph-thin ph-calendar-check',\n description: 'Date and party size. Stored, and it notifies you.',\n formName: 'Booking request',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Date', control: 'date', required: true },\n { label: 'People', control: 'number', required: true },\n { label: 'Notes', control: 'textarea', rows: 3, help: 'Allergies, access needs, anything useful' },\n ],\n submitLabel: 'Request a booking',\n successText: 'Request received — we’ll confirm by email.',\n errorText: 'We couldn’t send your request. Please try again.',\n },\n]);\n\n/** How a config is produced. The caller owns the registry, so this file stays pure. */\nexport type CreateConfig = (type: string) => ComponentNode | null | undefined;\n\n/**\n * Build a preset's node tree.\n *\n * The Form config already auto-creates its children (two fields, a submit, and the two state\n * blocks), so this REPLACES them wholesale rather than appending — otherwise every preset would\n * carry the default Name/Email pair as well as its own fields.\n *\n * Returns null when a type is missing from the registry, so a half-built tree never reaches a page.\n */\nexport function buildFormPreset(def: FormPresetDef, createConfig: CreateConfig): ComponentNode | null {\n const form = createConfig('Form');\n if (!form) return null;\n\n setTrait(form, 'name', def.formName);\n // A fresh id per insert: two forms on one page must never share a submissions stream.\n setTrait(form, 'formId', `${def.id}-${Math.random().toString(36).slice(2, 8)}`);\n\n const children: ComponentNode[] = [];\n\n for (const spec of def.fields) {\n const field = createConfig('Field');\n if (!field) return null;\n setTrait(field, 'label', spec.label);\n setTrait(field, 'control', spec.control);\n if (spec.required) setTrait(field, 'required', true);\n if (spec.help) setTrait(field, 'help', spec.help);\n if (spec.placeholder) setTrait(field, 'placeholder', spec.placeholder);\n if (spec.optionsText) setTrait(field, 'optionsText', spec.optionsText);\n if (spec.rows) setTrait(field, 'rows', spec.rows);\n children.push(field);\n }\n\n const submit = createConfig('SubmitButton');\n if (!submit) return null;\n setTrait(submit, 'label', def.submitLabel);\n children.push(submit);\n\n // Both state blocks, every time. They are not optional: a form without them is the silent-form\n // failure this design exists to prevent (decision D7).\n const success = createConfig('FormSuccess');\n const error = createConfig('FormError');\n if (!success || !error) return null;\n success.children = [textNode(def.successText, createConfig)].filter(Boolean) as ComponentNode[];\n error.children = [textNode(def.errorText, createConfig)].filter(Boolean) as ComponentNode[];\n children.push(success, error);\n\n form.children = children;\n return form;\n}\n\nfunction textNode(content: string, createConfig: CreateConfig): ComponentNode | null {\n const text = createConfig('Text');\n if (!text) return null;\n setTrait(text, 'content', content);\n return text;\n}\n\nfunction setTrait(node: ComponentNode, name: string, value: any): void {\n const trait = (node.traits as any[] | undefined)?.find(t => t?.name === name);\n if (trait) trait.default = value;\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderButtonComponentConfig extends ComponentConfig {\n constructor() {\n super('Button', 'app-builder-button', 'ph-thin ph-cursor-click', 'Basic');\n this.inputs = {\n label: 'text',\n link: 'text',\n variant: 'select'\n };\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Click me'),\n new TraitConfig('link', 'Link', TraitInputType.Text, undefined, '#'),\n new TraitConfig('variant', 'Variant', TraitInputType.Select, ['primary', 'outlined', 'text'], 'primary'),\n ];\n this.styleTraits = buildFullStyleTraits();\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class ButtonBlockComponentConfig extends ComponentConfig {\n constructor() {\n super('ButtonBlock', 'app-builder-button-block', 'ph-thin ph-cursor-click', 'Basic');\n this.children = [];\n this.inputs = {\n tag: 'select',\n href: 'text',\n target: 'select',\n type: 'select',\n };\n this.traits = [\n new TraitConfig('tag', 'Tag', TraitInputType.Select, ['button', 'a'], 'button'),\n new TraitConfig('href', 'URL', TraitInputType.Text, undefined, '', false, { trait: 'tag', values: 'a' }),\n new TraitConfig('target', 'Target', TraitInputType.Select, ['_self', '_blank'], '_self', false, { trait: 'tag', values: 'a' }),\n new TraitConfig('type', 'Type', TraitInputType.Select, ['button', 'submit', 'reset'], 'button', false, { trait: 'tag', values: 'button' }),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n width: 'auto',\n height: 'auto',\n padding: '10px 20px',\n borderRadius: '6px',\n cursor: 'pointer',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class CardComponentConfig extends ComponentConfig {\n constructor() {\n super('Card', 'app-card', 'ph-thin ph-cards', 'Content');\n this.inputs = {\n title: 'text',\n image: 'image',\n description: 'text'\n };\n this.traits = [\n new TraitConfig('title', 'Title', TraitInputType.Text, undefined, 'Default Title'),\n new TraitConfig('image', 'Image URL', TraitInputType.Media, { mode: 'compact' }, 'https://via.placeholder.com/150'),\n new TraitConfig('description', 'Description', TraitInputType.Text, undefined, 'This is a default card description.')\n ];\n this.styleTraits = buildFullStyleTraits();\n\n // DEPRECATED — removed from the Components panel (2026-09-22). A Card is a Container with a\n // border, a radius and a background: every one of those is a style group on Container, so the\n // component earned no place in the palette. It stays REGISTERED and renderable because saved\n // pages may contain Card nodes — dropping the type would render those pages blank. Remove the\n // type entirely only behind a migration that rewrites Card nodes to Container.\n this.hidden = true;\n\n this.applyStyleDefaults({\n // Fluid up to the design width: a fixed 200px card overflows a narrow column and is\n // the single most common `fixed-width` audit finding. Capping keeps the desktop look\n // identical (parent wider than 200px → still 200px) while shrinking on a phone.\n width: '100%',\n maxWidth: '200px',\n height: 'auto',\n padding: '16px 16px 16px 16px',\n borderWidth: '1px 1px 1px 1px',\n borderStyle: 'solid',\n borderColor: '#cccccc',\n borderRadius: '8px',\n backgroundColor: '#ffffff',\n });\n }\n}","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderContainerComponentConfig extends ComponentConfig {\n constructor() {\n super('Container', 'app-builder-container', 'ph-thin ph-square', 'Layout');\n this.children = [];\n this.traits = [\n new TraitConfig('htmlTag', 'HTML Tag', TraitInputType.Select,\n ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'],\n 'div'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: 'auto',\n minHeight: '200px',\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderDividerComponentConfig extends ComponentConfig {\n constructor() {\n super('Divider', 'app-builder-divider', 'ph-thin ph-minus', 'Layout');\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: '1px',\n backgroundColor: '#cccccc',\n margin: '8px 0px 8px 0px',\n });\n }\n}\n","import {\n ComponentConfig,\n TraitConfig,\n TraitInputType,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n} from '../../models/component.model';\n\n/**\n * Gallery — crossfade image gallery (working name; \"fade\" is the first effect, not the component).\n *\n * The RENDER component is the shared engine twin `ClientGalleryComponent` (`iox-gallery`) from\n * `@vectoriox/iox-ui` — reused directly in the builder (like Image reuses BuilderImageComponent), so\n * there is ONE implementation of the crossfade for both canvas and live site. This config only\n * declares the editable traits + the minimal style groups (size + spacing, per product decision).\n *\n * Population (v1): the `images` MediaList trait (URL / one-by-one / filebox / paste). Data-source\n * binding (`source`/`sourcePath`) is a later phase. See gallery-component-plan.md.\n */\nexport class GalleryConfig extends ComponentConfig {\n constructor() {\n super('Gallery', 'iox-gallery', 'ph-thin ph-images', 'Media');\n\n this.traits = [\n // ── Images ────────────────────────────────────────────────────────\n new TraitConfig('__imagesLabel', 'Images', TraitInputType.SectionLabel),\n new TraitConfig('images', 'Images', TraitInputType.MediaList, undefined, []),\n\n // ── Playback ──────────────────────────────────────────────────────\n new TraitConfig('__playbackLabel', 'Playback', TraitInputType.SectionLabel),\n // Effect is a Select scaffolded for future effects; v1 lists only Fade.\n new TraitConfig('effect', 'Effect', TraitInputType.Select,\n [{ label: 'Fade', value: 'fade' }], 'fade'),\n // Durations are milliseconds — use a plain Number field (Scrub renders a px unit label).\n new TraitConfig('showDuration', 'Show duration (ms)', TraitInputType.Number, undefined, 4000),\n new TraitConfig('fadeDuration', 'Fade duration (ms)', TraitInputType.Number, undefined, 1000),\n new TraitConfig('autoStart', 'Auto start', TraitInputType.Checkbox, undefined, true),\n ];\n\n // Styling: size + spacing + border + background (letterbox). No typography (not text-bearing).\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n ];\n\n // Size traits stay at their group default (auto) so a gallery starts unconstrained. The one\n // exception is `minHeight: 200px` — the image layers are absolutely positioned (no intrinsic\n // height), so without a floor a freshly-dropped, unsized gallery would collapse to 0px and be\n // invisible. min-height is a style-engine default on `.iox-node` (not scoped component CSS),\n // so the user can freely override it.\n this.applyStyleDefaults({\n minHeight: '200px',\n backgroundColor: '#000000',\n });\n }\n}\n","import {\n BackgroundGroupStyleConfig,\n BorderGroupStyleConfig,\n ComponentConfig,\n ComponentNode,\n EffectsGroupStyleConfig,\n LayoutGroupStyleConfig,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n TraitConfig,\n TraitInputType,\n TypographyGroupStyleConfig,\n buildFullStyleTraits,\n} from '../../models/component.model';\n\n/** Every style group — the state blocks and field group are ordinary containers to style. */\nconst fullStyles = () => buildFullStyleTraits();\n\n/** Layout-ish groups for a form shell: it arranges fields, it is not text. */\nconst shellStyles = () => [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n];\n\n/**\n * Form — the container that scopes its fields by ANCESTRY (decision D1).\n *\n * The destination config (\"After submit\") is an ordered action list edited in the Bindings panel as\n * a property group, not here as flat traits — see forms-and-inputs-plan.md §4b. What lives here is\n * the handful of settings that ARE single values.\n *\n * Auto-creates a working contact form: two fields, a submit button, and the two non-deletable state\n * blocks. Dropping a Form therefore gives a form that already validates and already stores.\n */\nexport class FormComponentConfig extends ComponentConfig {\n constructor() {\n // The BUILDER renders these through BuilderContainerComponent (same as List/ListItem), so\n // they are drop zones and their children render on the canvas; the ENGINE uses the real\n // twins. `formClass` is what keeps the shared form stylesheet applying to both.\n super('Form', 'app-builder-container', 'ph-thin ph-textbox', 'Forms');\n\n this.traits = [\n // Hidden plumbing: marks this container as a form host for the shared stylesheet.\n new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form'),\n new TraitConfig('__formLabel', 'Form', TraitInputType.SectionLabel),\n new TraitConfig('name', 'Form name', TraitInputType.Text, undefined, 'Contact form'),\n // Stable identity the submit endpoint resolves the saved spec by. Generated on create;\n // shown read-only-ish so an author can copy it into a webhook consumer.\n new TraitConfig('formId', 'Form ID', TraitInputType.Text, undefined, ''),\n new TraitConfig('feedback', 'Validation feedback', TraitInputType.Select, [\n { label: 'Smart — on submit, then live once touched', value: 'smart' },\n { label: 'On submit only', value: 'submit' },\n { label: 'As you type', value: 'live' },\n ], 'smart'),\n new TraitConfig('resetAfterSubmit', 'Clear the form after submit', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('__spamLabel', 'Spam protection', TraitInputType.SectionLabel),\n // On by default and invisible to the visitor (decision D12).\n new TraitConfig('honeypot', 'Honeypot field', TraitInputType.Checkbox, undefined, true),\n new TraitConfig('minFillMs', 'Minimum fill time (ms)', TraitInputType.Number, undefined, 1200),\n\n new TraitConfig('__dataLabel', 'Data', TraitInputType.SectionLabel),\n // Absent means keep forever — the confirmed default. A number opts into purging.\n new TraitConfig('retentionDays', 'Delete submissions after (days)', TraitInputType.Number, undefined, ''),\n ];\n\n this.styleTraits = shellStyles();\n this.children = [\n makeField({ label: 'Name', control: 'text', required: true }),\n makeField({ label: 'Email', control: 'email', required: true }),\n new SubmitButtonComponentConfig() as unknown as ComponentNode,\n new FormSuccessComponentConfig() as unknown as ComponentNode,\n new FormErrorComponentConfig() as unknown as ComponentNode,\n ];\n\n this.applyStyleDefaults({\n display: 'flex',\n flexDirection: 'column',\n gap: '16px',\n width: '100%',\n });\n }\n}\n\n/**\n * Field — ONE component for every control type (decision D4).\n *\n * `Required` is its own switch because it is the rule every form needs; the rest are added from a\n * menu, so an unused rule is invisible rather than an empty control (the Effects-group pattern).\n */\nexport class FieldComponentConfig extends ComponentConfig {\n constructor() {\n super('Field', 'iox-field', 'ph-thin ph-text-box', 'Forms');\n\n this.traits = [\n new TraitConfig('__contentLabel', 'Content', TraitInputType.SectionLabel),\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Label'),\n // Choosing the control also chooses the validation — an Email field validates email\n // with nothing configured.\n new TraitConfig('control', 'Type', TraitInputType.Select, [\n { label: 'Text', value: 'text' },\n { label: 'Email', value: 'email' },\n { label: 'Phone', value: 'tel' },\n { label: 'Website', value: 'url' },\n { label: 'Number', value: 'number' },\n { label: 'Password', value: 'password' },\n { label: 'Long text', value: 'textarea' },\n { label: 'Dropdown', value: 'select' },\n { label: 'Checkbox', value: 'checkbox' },\n { label: 'Radio group', value: 'radio' },\n { label: 'Date', value: 'date' },\n { label: 'Time', value: 'time' },\n { label: 'File upload', value: 'file' },\n { label: 'Hidden', value: 'hidden' },\n ], 'text'),\n new TraitConfig('placeholder', 'Placeholder', TraitInputType.Text, undefined, '',\n false, { trait: 'control', values: ['text', 'email', 'tel', 'url', 'number', 'password', 'textarea', 'select'] }),\n new TraitConfig('help', 'Help text', TraitInputType.Text, undefined, ''),\n new TraitConfig('rows', 'Rows', TraitInputType.Number, undefined, 4,\n false, { trait: 'control', values: 'textarea' }),\n new TraitConfig('accept', 'Accepted file types', TraitInputType.Text, undefined, '',\n false, { trait: 'control', values: 'file' }),\n new TraitConfig('labelHidden', 'Hide label (screen readers still read it)',\n TraitInputType.Checkbox, undefined, false),\n // The submitted key. Derived from the label; editable for external integrations.\n new TraitConfig('name', 'Submitted key', TraitInputType.Text, undefined, ''),\n new TraitConfig('defaultValue', 'Default value', TraitInputType.Text, undefined, ''),\n\n new TraitConfig('__optionsLabel', 'Options', TraitInputType.SectionLabel),\n // One per line, `value|Label` or just the label. A richer editor arrives with bound\n // options in Phase 2; this keeps v1 to one control instead of a new trait type.\n new TraitConfig('optionsText', 'Choices (one per line)', TraitInputType.Textarea, undefined, '',\n false, { trait: 'control', values: ['select', 'radio'] }),\n\n new TraitConfig('__validationLabel', 'Validation', TraitInputType.SectionLabel),\n new TraitConfig('required', 'Required', TraitInputType.Checkbox, undefined, false),\n // `rules` is the additive list (minLength, pattern, matches, …). Its editor is a panel\n // concern; the node just carries the array.\n new TraitConfig('rules', 'Rules', TraitInputType.Textarea, undefined, ''),\n ];\n\n this.styleTraits = fullStyles();\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n });\n }\n}\n\n/** A plain layout row so two fields can sit side by side. Config-only, like List/ListItem. */\nexport class FieldGroupComponentConfig extends ComponentConfig {\n constructor() {\n super('FieldGroup', 'app-builder-container', 'ph-thin ph-columns', 'Forms');\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-field-group')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'flex',\n flexDirection: 'row',\n gap: '16px',\n width: '100%',\n });\n }\n}\n\n/** The submit button. Carries no destination — that lives on the Form (decision D9). */\nexport class SubmitButtonComponentConfig extends ComponentConfig {\n constructor() {\n super('SubmitButton', 'iox-submit', 'ph-thin ph-paper-plane-tilt', 'Forms');\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Send'),\n new TraitConfig('loadingLabel', 'While sending', TraitInputType.Text, undefined, 'Sending…'),\n new TraitConfig('disableWhileSubmitting', 'Disable while sending', TraitInputType.Checkbox, undefined, true),\n ];\n this.styleTraits = fullStyles();\n this.applyStyleDefaults({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'auto',\n // Meets the 44px tap-target minimum the responsive audit checks for.\n minHeight: '44px',\n padding: '12px 24px',\n borderRadius: '6px',\n backgroundColor: '#a05c5c',\n color: '#ffffff',\n cursor: 'pointer',\n });\n }\n}\n\n/**\n * The Success block. `hidden` keeps it out of the Components panel: it is auto-created by the Form\n * and reached through the canvas state switcher, never dropped on its own.\n */\nexport class FormSuccessComponentConfig extends ComponentConfig {\n constructor() {\n super('FormSuccess', 'app-builder-container', 'ph-thin ph-check-circle', 'Forms');\n this.hidden = true;\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form-success')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n padding: '16px',\n borderRadius: '6px',\n backgroundColor: '#e4efe8',\n color: '#3f7355',\n });\n }\n}\n\n/** The Error block. One design, five reasons — the renderer writes the resolved reason in. */\nexport class FormErrorComponentConfig extends ComponentConfig {\n constructor() {\n super('FormError', 'app-builder-container', 'ph-thin ph-warning-circle', 'Forms');\n this.hidden = true;\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form-error')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n padding: '16px',\n borderRadius: '6px',\n backgroundColor: '#f6e3e1',\n color: '#a8413a',\n });\n }\n}\n\n/** A Field pre-filled for the default contact form. */\nfunction makeField(props: { label: string; control: string; required?: boolean }): ComponentNode {\n const config = new FieldComponentConfig();\n for (const trait of config.traits) {\n if (trait.name === 'label') trait.default = props.label;\n if (trait.name === 'control') trait.default = props.control;\n if (trait.name === 'required') trait.default = !!props.required;\n }\n return config as unknown as ComponentNode;\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderHeadingComponentConfig extends ComponentConfig {\n constructor() {\n super('Heading', 'app-builder-heading', 'ph-thin ph-text-h', 'Basic');\n this.traits = [\n new TraitConfig('content', 'Content', TraitInputType.Text, undefined, 'Heading'),\n new TraitConfig('level', 'Level', TraitInputType.Select,\n ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], 'h2'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n fontSize: '32px',\n fontWeight: '700',\n width: 'auto',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderIconComponentConfig extends ComponentConfig {\n constructor() {\n super('Icon', 'app-builder-icon', 'ph-thin ph-star', 'Basic');\n this.traits = [\n new TraitConfig('iconClass', 'Icon', TraitInputType.Icon, undefined, 'ph-thin ph-star'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n fontSize: '24px',\n color: '#374151',\n // An icon is a glyph, not a paragraph — the Typography group's default line-height of\n // 1.5 adds phantom vertical space and misaligns it. Default to 0 so the line box is fully\n // collapsed and the icon contributes no extra vertical space (spacing comes from\n // padding/margin instead). Serialized into styleProps (self-describing node).\n lineHeight: '0',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderImageComponentConfig extends ComponentConfig {\n constructor() {\n super('Image', 'app-builder-image', 'ph-thin ph-image', 'Basic');\n this.inputs = {\n src: 'text',\n alt: 'text',\n };\n this.traits = [\n new TraitConfig('src', 'Image URL', TraitInputType.Media, { mode: 'compact' }, 'https://placehold.co/600x400?text=Image'),\n new TraitConfig('alt', 'Alt Text', TraitInputType.Text, undefined, 'Image'),\n // objectFit moved to the Size style group (flows through the CSS engine as a style trait).\n ];\n this.styleTraits = buildFullStyleTraits();\n\n this.applyStyleDefaults({\n // Same reasoning as Card: 300px alone overflows a 320px viewport once the page has any\n // side padding. Capped-fluid renders identically wherever there is room.\n width: '100%',\n maxWidth: '300px',\n aspectRatio: '1/1',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderLinkComponentConfig extends ComponentConfig {\n constructor() {\n super('Link', 'app-builder-link', 'ph-thin ph-link', 'Basic');\n this.inputs = {\n label: 'text',\n linkType: 'select',\n url: 'text',\n pageRoute: 'text',\n target: 'select',\n };\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Click here'),\n new TraitConfig(\n 'linkType', 'Link Type', TraitInputType.Select,\n [{ label: 'External URL', value: 'external' }, { label: 'Website Page', value: 'page' }],\n 'external'\n ),\n new TraitConfig('url', 'URL', TraitInputType.Text, undefined, 'https://', false,\n { trait: 'linkType', values: 'external' }),\n new TraitConfig('pageRoute', 'Page Route', TraitInputType.Text, undefined, '', false,\n { trait: 'linkType', values: 'page' }),\n new TraitConfig(\n 'target', 'Target', TraitInputType.Select,\n [\n { label: 'Same tab', value: '_self' },\n { label: 'New tab', value: '_blank' },\n { label: 'Parent frame', value: '_parent' },\n { label: 'Full window', value: '_top' },\n ],\n '_self'\n ),\n ];\n this.styleTraits = buildFullStyleTraits();\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderLinkedContainerConfig extends ComponentConfig {\n constructor() {\n super('LinkedContainer', 'app-builder-linked-container', 'ph-thin ph-link-simple', 'Layout');\n this.children = [];\n this.inputs = {\n linkType: 'select',\n url: 'text',\n pageRoute: 'text',\n target: 'select',\n };\n this.traits = [\n new TraitConfig(\n 'linkType', 'Link Type', TraitInputType.Select,\n [{ label: 'External URL', value: 'external' }, { label: 'Website Page', value: 'page' }],\n 'external'\n ),\n new TraitConfig('url', 'URL', TraitInputType.Text, undefined, 'https://', false,\n { trait: 'linkType', values: 'external' }),\n new TraitConfig('pageRoute', 'Page Route', TraitInputType.Text, undefined, '', false,\n { trait: 'linkType', values: 'page' }),\n new TraitConfig(\n 'target', 'Target', TraitInputType.Select,\n [\n { label: 'Same tab', value: '_self' },\n { label: 'New tab', value: '_blank' },\n { label: 'Parent frame', value: '_parent' },\n { label: 'Full window', value: '_top' },\n ],\n '_self'\n ),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n width: 'auto',\n height: 'auto',\n minHeight: '80px',\n display: 'block',\n });\n }\n}\n","import {\n ComponentConfig,\n TraitConfig,\n TraitInputType,\n buildFullStyleTraits,\n} from '../../models/component.model';\n\nexport class BuilderListItemComponentConfig extends ComponentConfig {\n constructor() {\n super('ListItem', 'app-builder-container', 'ph-thin ph-list-dashes', 'Layout');\n this.traits = [\n new TraitConfig('htmlTag', 'Tag', TraitInputType.Select, ['li'], 'li'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class TextBlockComponentConfig extends ComponentConfig {\n constructor() {\n super('Text', 'app-text-block', 'ph-thin ph-text-aa', 'Basic');\n this.inputs = {\n content: 'text',\n tag: 'select',\n };\n this.traits = [\n new TraitConfig('content', 'Content', TraitInputType.Text, undefined, 'Enter text here'),\n new TraitConfig('tag', 'Tag', TraitInputType.Select, ['p', 'span'], 'p'),\n ];\n this.styleTraits = buildFullStyleTraits();\n\n this.applyStyleDefaults({\n display: 'block',\n height: 'auto',\n minHeight: '20px',\n padding: '10px',\n });\n }\n}\n","import {\n BackgroundGroupStyleConfig,\n BorderGroupStyleConfig,\n ComponentConfig,\n ComponentNode,\n EffectsGroupStyleConfig,\n LayoutGroupStyleConfig,\n ListGroupStyleConfig,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n TraitConfig,\n TraitInputType,\n TypographyGroupStyleConfig,\n} from '../../models/component.model';\nimport { BuilderListItemComponentConfig } from '../list-item/list-item.config';\nimport { TextBlockComponentConfig } from '../text/text.config';\n\nexport class BuilderListComponentConfig extends ComponentConfig {\n constructor() {\n super('List', 'app-builder-container', 'ph-thin ph-list', 'Layout');\n this.traits = [\n new TraitConfig('htmlTag', 'Tag', TraitInputType.Select, ['ul', 'ol'], 'ul'),\n new TraitConfig('start', 'Start At', TraitInputType.Number, undefined, 1, false,\n { trait: 'htmlTag', values: 'ol' }),\n new TraitConfig('reversed', 'Reversed', TraitInputType.Checkbox, undefined, false, false,\n { trait: 'htmlTag', values: 'ol' }),\n ];\n this.styleTraits = [\n new ListGroupStyleConfig(),\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n this.children = [\n this.makeListItem(),\n this.makeListItem(),\n this.makeListItem(),\n ];\n this.applyStyleDefaults({\n display: 'block',\n backgroundColor: 'transparent',\n padding: '0px 0px 0px 24px',\n });\n }\n\n private makeListItem(): ComponentNode {\n const item = new BuilderListItemComponentConfig();\n const textCfg = new TextBlockComponentConfig();\n const contentTrait = textCfg.traits.find(t => t.name === 'content');\n if (contentTrait) contentTrait.default = 'List item';\n item.children = [textCfg];\n return item;\n }\n}\n","import { ComponentConfig, ComponentTrait, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class RepeaterComponentConfig extends ComponentConfig {\n constructor() {\n super('Repeater', 'app-builder-repeater', 'ph-thin ph-repeat', 'Data');\n this.children = [];\n this.traits = [\n {\n name: 'source',\n label: 'Source',\n type: TraitInputType.Select,\n options: [], // populated at runtime from DataSourceRegistryService aliases\n default: '',\n } as ComponentTrait,\n {\n name: 'limit',\n label: 'Limit',\n type: TraitInputType.Number,\n default: 10,\n // NOT marked `responsive` yet, deliberately. Row COUNT cannot be varied per width the\n // way the slider's can: Swiper reads its own breakpoints map at runtime, but a\n // repeater's count is decided when the markup is produced — and SSR has no viewport,\n // so rendering N on the server and M in the browser is a hydration mismatch. The fix\n // is to keep rendering every item and HIDE the surplus per width with a generated\n // `:nth-child(n+X) { display: none }` rule (CSS-expressible, hydration-safe), which is\n // a separate change. Marking it responsive now would ship a control that silently\n // does nothing on the live site — exactly the `slidesPerGroup` bug this pass fixed.\n } as ComponentTrait,\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: 'auto',\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class SectionComponentConfig extends ComponentConfig {\n constructor() {\n super('Section', 'app-section', 'ph-thin ph-rows', 'Layout');\n this.children = [];\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n width: 'auto',\n height: 'auto',\n minHeight: '200px',\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import {\n ComponentConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n PositionGroupStyleConfig,\n LayoutGroupStyleConfig,\n TypographyGroupStyleConfig,\n} from '../../models/component.model';\n\nexport class SliderSlideConfig extends ComponentConfig {\n constructor() {\n super('SliderSlide', 'app-slider-slide', 'ph-thin ph-rectangle', 'Media');\n\n this.children = [];\n // Hidden: SliderSlide is created only via the \"Add Slide\" toolbar button,\n // not by dragging from the Components panel.\n this.hidden = true;\n\n this.componentEvents = [\n { value: 'swiperSlideActive', label: 'This Slide Becomes Active', icon: 'ph-thin ph-eye' },\n { value: 'swiperSlideInactive', label: 'This Slide Becomes Inactive', icon: 'ph-thin ph-eye-slash' },\n ];\n\n this.traits = [];\n\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n ];\n\n this.applyStyleDefaults({\n width: '33%',\n aspectRatio: '1 / 1',\n });\n }\n}\n","import {\n ComponentConfig,\n ComponentTrait,\n TraitConfig,\n TraitInputType,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n LayoutGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n EffectsGroupStyleConfig,\n} from '../../models/component.model';\nimport { SliderSlideConfig } from '../slider-slide/slider-slide.config';\n\nexport class SliderContainerConfig extends ComponentConfig {\n constructor() {\n super('SliderContainer', 'app-slider-container', 'ph-thin ph-slideshow', 'Media');\n\n this.children = [\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n ];\n\n this.componentEvents = [\n { value: 'swiperSlideChange', label: 'Slide Changes', icon: 'ph-thin ph-arrows-left-right' },\n { value: 'swiperReachBeginning', label: 'Reaches First Slide', icon: 'ph-thin ph-skip-back' },\n { value: 'swiperReachEnd', label: 'Reaches Last Slide', icon: 'ph-thin ph-skip-forward' },\n { value: 'swiperAutoplayStart', label: 'Autoplay Starts', icon: 'ph-thin ph-play' },\n { value: 'swiperAutoplayStop', label: 'Autoplay Stops', icon: 'ph-thin ph-stop' },\n ];\n\n this.componentMethods = [\n { value: 'swiperNext', label: 'Next Slide' },\n { value: 'swiperPrev', label: 'Previous Slide' },\n { value: 'swiperGoToSlide', label: 'Go to Slide', params: [{ name: 'index', type: 'number', label: 'Slide Index (0-based)' }] },\n { value: 'swiperAutoplayStart', label: 'Start Autoplay' },\n { value: 'swiperAutoplayStop', label: 'Stop Autoplay' },\n { value: 'swiperAutoplayPause', label: 'Pause Autoplay' },\n ];\n\n this.traits = [\n // ── Data binding ──────────────────────────────────────────────────\n new TraitConfig('__dataLabel', 'Data', TraitInputType.SectionLabel),\n\n {\n name: 'source',\n label: 'Source',\n type: TraitInputType.Select,\n options: [], // populated at runtime from DataSourceRegistryService aliases\n default: '',\n } as ComponentTrait,\n\n new TraitConfig('limit', 'Limit', TraitInputType.Number, undefined, 10),\n\n // ── Parameters ────────────────────────────────────────────────────\n new TraitConfig('__paramsLabel', 'Parameters', TraitInputType.SectionLabel),\n\n new TraitConfig('dir', 'Language direction', TraitInputType.SelectButton,\n [{ label: 'LTR', value: 'ltr' }, { label: 'RTL', value: 'rtl' }],\n 'ltr'),\n\n new TraitConfig('direction', 'Slide direction', TraitInputType.Select,\n [{ label: 'Horizontal', value: 'horizontal' }, { label: 'Vertical', value: 'vertical' }],\n 'horizontal'),\n\n new TraitConfig('slidesPerView', 'Slides per view', TraitInputType.Select,\n [\n { label: 'Auto (slide width)', value: 'auto' },\n { label: '1', value: 1 },\n { label: '2', value: 2 },\n { label: '3', value: 3 },\n { label: '4', value: 4 },\n { label: '5', value: 5 },\n { label: '6', value: 6 },\n ],\n 'auto', undefined, undefined, /* responsive */ true),\n\n new TraitConfig('slidesPerGroup', 'Slides per group', TraitInputType.Scrub, undefined, 1,\n undefined, undefined, /* responsive */ true),\n\n new TraitConfig('loop', 'Loop', TraitInputType.SelectButton,\n [\n { label: 'Off', value: 'off' },\n { label: 'Loop', value: 'loop' },\n { label: 'Rewind', value: 'rewind' },\n ],\n 'off'),\n\n new TraitConfig('centeredSlides', 'Centered slides', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('spaceBetween', 'Space between (px)', TraitInputType.Scrub, undefined, 0,\n undefined, undefined, /* responsive */ true),\n\n new TraitConfig('initialSlide', 'Initial slide', TraitInputType.Scrub, undefined, 0),\n\n new TraitConfig('autoHeight', 'Auto height', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('grabCursor', 'Grab cursor', TraitInputType.Checkbox, undefined, true),\n\n new TraitConfig('slideToClickedSlide', 'Slide to clicked slide', TraitInputType.Checkbox, undefined, false),\n\n // ── Effects ───────────────────────────────────────────────────────\n new TraitConfig('__effectsLabel', 'Effects', TraitInputType.SectionLabel),\n\n new TraitConfig('effect', 'Effect', TraitInputType.Select,\n [\n { label: 'Slide', value: 'slide' },\n { label: 'Fade', value: 'fade' },\n { label: 'Cube', value: 'cube' },\n { label: 'Coverflow', value: 'coverflow' },\n { label: 'Flip', value: 'flip' },\n { label: 'Cards', value: 'cards' },\n { label: 'Creative', value: 'creative' },\n ],\n 'slide'),\n\n new TraitConfig('speed', 'Transition duration (ms)', TraitInputType.Scrub, undefined, 300),\n\n // ── Navigation ────────────────────────────────────────────────────\n new TraitConfig('__navLabel', 'Navigation', TraitInputType.SectionLabel),\n\n new TraitConfig('enableNavigation', 'Navigation arrows', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('navigationColor', 'Color', TraitInputType.Color, undefined, '#ffffff',\n undefined, { trait: 'enableNavigation', values: 'true' }),\n\n new TraitConfig('navigationSize', 'Size (px)', TraitInputType.Scrub, undefined, 44,\n undefined, { trait: 'enableNavigation', values: 'true' }),\n\n // ── Pagination ────────────────────────────────────────────────────\n new TraitConfig('__paginationLabel', 'Pagination', TraitInputType.SectionLabel),\n\n new TraitConfig('enablePagination', 'Pagination', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('paginationColor', 'Color', TraitInputType.Color, undefined, '#ffffff',\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationType', 'Type', TraitInputType.SelectButton,\n [\n { label: '•••', value: 'bullets' },\n { label: '—', value: 'progressbar' },\n { label: '1/5', value: 'fraction' },\n ],\n 'bullets', undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationClickable', 'Clickable', TraitInputType.Checkbox, undefined, true,\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationDynamicBullets', 'Dynamic bullets', TraitInputType.Checkbox, undefined, false,\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n // ── Autoplay ──────────────────────────────────────────────────────\n new TraitConfig('__autoplayLabel', 'Autoplay', TraitInputType.SectionLabel),\n\n new TraitConfig('enableAutoplay', 'Autoplay', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('autoplayDelay', 'Delay (ms)', TraitInputType.Scrub, undefined, 3000,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n new TraitConfig('autoplayPauseOnMouseEnter', 'Pause on hover', TraitInputType.Checkbox, undefined, true,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n new TraitConfig('autoplayDisableOnInteraction', 'Disable on interact', TraitInputType.Checkbox, undefined, false,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n // ── Modules ───────────────────────────────────────────────────────\n new TraitConfig('__modulesLabel', 'Modules', TraitInputType.SectionLabel),\n\n new TraitConfig('enableScrollbar', 'Scrollbar', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('freeMode', 'Free mode', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableKeyboard', 'Keyboard control', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableMousewheel','Mousewheel', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableZoom', 'Zoom', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableParallax', 'Parallax', TraitInputType.Checkbox, undefined, false),\n\n // ── Grid ──────────────────────────────────────────────────────────\n new TraitConfig('__gridLabel', 'Grid', TraitInputType.SectionLabel),\n\n new TraitConfig('enableGrid', 'Grid (multi-row)', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('gridRows', 'Rows', TraitInputType.Scrub, undefined, 2,\n undefined, { trait: 'enableGrid', values: 'true' }),\n\n // ── Responsive ────────────────────────────────────────────────────\n new TraitConfig('__responsiveLabel', 'Responsive', TraitInputType.SectionLabel),\n\n new TraitConfig('breakpoints', 'Breakpoints (JSON)', TraitInputType.Textarea, undefined, ''),\n ];\n\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n\n this.applyStyleDefaults({\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderSpacerComponentConfig extends ComponentConfig {\n constructor() {\n super('Spacer', 'app-builder-spacer', 'ph-thin ph-arrows-vertical', 'Layout');\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: '40px',\n });\n }\n}\n","/*\n * Public API Surface of @vectoriox/iox-builder\n */\n\nexport * from './lib/iox-builder.module';\nexport * from './lib/builder.component';\nexport * from './lib/render/render.directive';\nexport { StyleCategory, IoxBinding, IoxContextSlot, SetContextParams, DsFilterByRouteParam, DsFilterByQueryParam, DataSourceType, IoxDataSource, InteractionTrigger, InteractionActionType, InteractionAction, IoxInteraction, TRIGGER_OPTIONS, ACTION_TYPE_OPTIONS, INVERSE_ACTION, EASING_OPTIONS, ElementState, SUPPORTED_STATES, INTERACTION_STATES, STRUCTURAL_STATES, RELATIONAL_STATES, RELATIONAL_STATE_BASE, TARGETED_STATES, TARGETED_STATE_BASE, ComponentNode, TraitInputType, TraitOptionMap, TraitSelectOption, QuadSizeSegment, TraitShowCondition, ComponentTrait, StyleTrait, StyleTraitGroup, generateNodeId, ComponentConfig, TraitConfig, StyleTraitConfig, GroupStyleConfig, UNITS_ALL, UNITS_NO_VW, UNITS_FIXED, UNITS_DEG, resolveTraitControllerType, resolveTraitOptions, StylePreset, buildPresetStyleTraits, buildFullStyleTraits, ListGroupStyleConfig, IoxSymbol, InteractionPreset, ComponentEventDef, ComponentMethodDef, flattenSchemaFields, arraySchemaFields, arrayItemSchemaFields, PositionGroupStyleConfig, LayoutGroupStyleConfig, ChildLayoutGroupStyleConfig, SizeGroupStyleConfig, DimensionsGroupStyleConfig, BackgroundGroupStyleConfig, SpacingGroupStyleConfig, BorderGroupStyleConfig, TypographyGroupStyleConfig, EffectsGroupStyleConfig } from './lib/models/component.model';\nexport { wrapNode, findNodeLocation } from './lib/models/wrap-node';\nexport * from './lib/services/component-instance-registry.service';\nexport * from './lib/services/symbol-registry.service';\nexport * from './lib/services/interaction-preset-registry.service';\nexport * from './lib/services/builder-history.service';\nexport * from './lib/services/builder-clipboard.service';\nexport * from './lib/services/builder-data-source.service';\nexport * from './lib/services/builder-data-source.service';\nexport * from './lib/panels/panel.model';\nexport * from './lib/panels/panel-event.service';\nexport * from './lib/tokens/builder.tokens';\nexport * from './lib/services/component-registry.service';\nexport * from './lib/services/data-source-registry.service';\nexport * from './lib/services/drag-engine.service';\nexport * from './lib/services/style-registry.service';\nexport * from './lib/services/viewport.service';\nexport * from './lib/services/preset-registry.service';\nexport * from './lib/overlay/overlay.service';\nexport * from './lib/overlay/overlay.component';\nexport * from './lib/toolbar/toolbar.component';\nexport * from './lib/directives/iox-draggable.directive';\nexport * from './lib/directives/iox-dropzone.directive';\nexport * from './lib/panels/panel/panel.component';\nexport * from './lib/panels/panel/panel-child.component';\nexport * from './lib/panels/layer-tree/layer-tree.component';\nexport * from './lib/breadcrumb/breadcrumb-bar.component';\nexport * from './lib/audit/audit-panel.component';\nexport * from './lib/utils/node-path.util';\nexport * from './lib/utils/insert-target.util';\nexport * from './lib/utils/structure-ops.util';\nexport * from './lib/models/essential-traits';\nexport * from './lib/models/layout-presets';\nexport * from './lib/models/form-presets';\nexport * from './lib/utils/form-selection.util';\nexport * from './lib/utils/responsive-audit.util';\nexport * from './lib/utils/drop-label.util';\nexport * from './lib/services/interaction-engine.service';\nexport { composeVirtualTraits, VIRTUAL_TRAIT_KEYS } from './lib/style-compose';\n\n// Component classes (builder variants with drag/drop)\nexport * from './lib/components/section/section.component';\nexport * from './lib/components/container/container.component';\nexport * from './lib/components/linked-container/linked-container.component';\nexport * from './lib/components/repeater/repeater.component';\nexport * from './lib/components/button-block/button-block.component';\nexport * from './lib/components/slider-container/slider-container.component';\nexport * from './lib/components/slider-slide/slider-slide.component';\n\n// Component configs\nexport * from './lib/components/button/button.config';\nexport * from './lib/components/button-block/button-block.config';\nexport * from './lib/components/card/card.config';\nexport * from './lib/components/container/container.config';\nexport * from './lib/components/divider/divider.config';\nexport * from './lib/components/gallery/gallery.config';\nexport * from './lib/components/form/form.config';\nexport * from './lib/components/heading/heading.config';\nexport * from './lib/components/icon/icon.config';\nexport * from './lib/components/image/image.config';\nexport * from './lib/components/link/link.config';\nexport * from './lib/components/linked-container/linked-container.config';\nexport * from './lib/components/list/list.config';\nexport * from './lib/components/list-item/list-item.config';\nexport * from './lib/components/repeater/repeater.config';\nexport * from './lib/components/section/section.config';\nexport * from './lib/components/slider-container/slider-container.config';\nexport * from './lib/components/slider-slide/slider-slide.config';\nexport * from './lib/components/spacer/spacer.config';\nexport * from './lib/components/text/text.config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EASING_OPTIONS","i1.ComponentRegistryService","i2.SymbolRegistryService","i3.OverlayService","i1.OverlayService","i1.DragEngineService","i2.StyleRegistryService","i2.OverlayService","i3.StyleRegistryService","i4.InteractionEngineService","i5.PanelEventService","i6.DragEngineService","i2.ViewportService","i3.PresetRegistryService","i4.SymbolRegistryService","i5.InteractionPresetRegistryService","i6.InteractionEngineService","i7.BuilderClipboardService","i8.StyleRegistryService","i9.PanelEventService","i10.DragEngineService","i11","i12.IoxDraggableDirective","i1","i2","i3","i3.PanelEventService","i4.DragEngineService","i5.DataSourceRegistryService","i6.ViewportService","i7.InteractionEngineService","i8.InteractionPresetRegistryService","i9.BuilderClipboardService","i10.SymbolRegistryService","i11.MoveableCanvasService","i12.SelectoCanvasService","i13.StyleRegistryService","i14","i18.RenderDirective","i19.OverlayComponent","i20.ToolbarComponent","i21.LayerTreeComponent","i22.BreadcrumbBarComponent","i23.AuditPanelComponent","i3.RenderDirective","i4.IoxDropzoneDirective","i3.BuilderDataSourceService","i4.DataSourceRegistryService","i7","i8.RenderDirective","i9.IoxDraggableDirective","i10.IoxDropzoneDirective","i6","i7.RenderDirective","i8.IoxDraggableDirective","i9.IoxDropzoneDirective","i4.IoxDraggableDirective","i5.IoxDropzoneDirective","i1.PanelEventService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEY;AAAZ,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB;AAC2F;AAC3F,IAAA,aAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC5B,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,aAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,aAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB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AAI,uBAAuB,EAAE;AAC7B,YAAA,IAAI,sBAAsB,EAAE;AAC5B,YAAA,IAAI,0BAA0B,EAAE;AAChC,YAAA,IAAI,uBAAuB,EAAE;SAChC;AAED,QAAA,IAAI,CAAC,kBAAkB,CAAC,EACvB,CAAC;IACN;AACH;;AC3MK,MAAO,4BAA6B,SAAQ,eAAe,CAAA;AAC7D,IAAA,WAAA,GAAA;QACI,KAAK,CAAC,QAAQ,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,QAAQ,CAAC;AAC7E,QAAA,IAAI,CAAC,MAAM,GAAG,EAAE;AAChB,QAAA,IAAI,CAAC,WAAW,GAAG,oBAAoB,EAAE;QACzC,IAAI,CAAC,kBAAkB,CAAC;AACpB,YAAA,MAAM,EAAE,MAAM;AACjB,SAAA,CAAC;IACN;AACH;;ACXD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"vectoriox-iox-builder.mjs","sources":["../../../projects/iox-builder/src/lib/models/component.model.ts","../../../projects/iox-builder/src/lib/utils/clone-ids.util.ts","../../../projects/iox-builder/src/lib/models/wrap-node.ts","../../../projects/iox-builder/src/lib/panels/panel-event.service.ts","../../../projects/iox-builder/src/lib/panels/panel.model.ts","../../../projects/iox-builder/src/lib/style-compose.ts","../../../projects/iox-builder/src/lib/utils/node-path.util.ts","../../../projects/iox-builder/src/lib/utils/breakpoint-counts.util.ts","../../../projects/iox-builder/src/lib/utils/insert-target.util.ts","../../../projects/iox-builder/src/lib/utils/form-selection.util.ts","../../../projects/iox-builder/src/lib/utils/structure-ops.util.ts","../../../projects/iox-builder/src/lib/utils/responsive-audit.util.ts","../../../projects/iox-builder/src/lib/models/layout-presets.ts","../../../projects/iox-builder/src/lib/services/component-registry.service.ts","../../../projects/iox-builder/src/lib/overlay/overlay.service.ts","../../../projects/iox-builder/src/lib/utils/drop-label.util.ts","../../../projects/iox-builder/src/lib/utils/spring-motion.util.ts","../../../projects/iox-builder/src/lib/utils/drag-redirect.util.ts","../../../projects/iox-builder/src/lib/services/symbol-registry.service.ts","../../../projects/iox-builder/src/lib/services/drag-engine.service.ts","../../../projects/iox-builder/src/lib/services/data-source-registry.service.ts","../../../projects/iox-builder/src/lib/services/viewport.service.ts","../../../projects/iox-builder/src/lib/services/component-instance-registry.service.ts","../../../projects/iox-builder/src/lib/services/interaction-engine.service.ts","../../../projects/iox-builder/src/lib/services/interaction-preset-registry.service.ts","../../../projects/iox-builder/src/lib/services/builder-clipboard.service.ts","../../../projects/iox-builder/src/lib/services/style-registry.service.ts","../../../projects/iox-builder/src/lib/services/moveable-canvas.service.ts","../../../projects/iox-builder/src/lib/services/selecto-canvas.service.ts","../../../projects/iox-builder/src/lib/render/render.directive.ts","../../../projects/iox-builder/src/lib/services/preset-registry.service.ts","../../../projects/iox-builder/src/lib/directives/iox-draggable.directive.ts","../../../projects/iox-builder/src/lib/overlay/overlay.component.ts","../../../projects/iox-builder/src/lib/overlay/overlay.component.html","../../../projects/iox-builder/src/lib/tokens/builder.tokens.ts","../../../projects/iox-builder/src/lib/toolbar/toolbar.component.ts","../../../projects/iox-builder/src/lib/toolbar/toolbar.component.html","../../../projects/iox-builder/src/lib/panels/layer-tree/layer-tree.component.ts","../../../projects/iox-builder/src/lib/panels/layer-tree/layer-tree.component.html","../../../projects/iox-builder/src/lib/breadcrumb/breadcrumb-bar.component.ts","../../../projects/iox-builder/src/lib/breadcrumb/breadcrumb-bar.component.html","../../../projects/iox-builder/src/lib/audit/audit-panel.component.ts","../../../projects/iox-builder/src/lib/audit/audit-panel.component.html","../../../projects/iox-builder/src/lib/builder.component.ts","../../../projects/iox-builder/src/lib/builder.component.html","../../../projects/iox-builder/src/lib/components/section/section.component.ts","../../../projects/iox-builder/src/lib/components/container/container.component.ts","../../../projects/iox-builder/src/lib/directives/iox-dropzone.directive.ts","../../../projects/iox-builder/src/lib/components/linked-container/linked-container.component.ts","../../../projects/iox-builder/src/lib/utils/binding-path.util.ts","../../../projects/iox-builder/src/lib/services/builder-data-source.service.ts","../../../projects/iox-builder/src/lib/components/repeater/repeater.component.ts","../../../projects/iox-builder/src/lib/components/button-block/button-block.component.ts","../../../projects/iox-builder/src/lib/components/slider-container/slider-container.component.ts","../../../projects/iox-builder/src/lib/components/slider-slide/slider-slide.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel-child.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel.component.ts","../../../projects/iox-builder/src/lib/panels/panel/panel.component.html","../../../projects/iox-builder/src/lib/services/builder-history.service.ts","../../../projects/iox-builder/src/lib/iox-builder.module.ts","../../../projects/iox-builder/src/lib/models/essential-traits.ts","../../../projects/iox-builder/src/lib/models/form-presets.ts","../../../projects/iox-builder/src/lib/components/button/button.config.ts","../../../projects/iox-builder/src/lib/components/button-block/button-block.config.ts","../../../projects/iox-builder/src/lib/components/card/card.config.ts","../../../projects/iox-builder/src/lib/components/container/container.config.ts","../../../projects/iox-builder/src/lib/components/divider/divider.config.ts","../../../projects/iox-builder/src/lib/components/gallery/gallery.config.ts","../../../projects/iox-builder/src/lib/components/form/form.config.ts","../../../projects/iox-builder/src/lib/components/heading/heading.config.ts","../../../projects/iox-builder/src/lib/components/icon/icon.config.ts","../../../projects/iox-builder/src/lib/components/image/image.config.ts","../../../projects/iox-builder/src/lib/components/link/link.config.ts","../../../projects/iox-builder/src/lib/components/linked-container/linked-container.config.ts","../../../projects/iox-builder/src/lib/components/list-item/list-item.config.ts","../../../projects/iox-builder/src/lib/components/text/text.config.ts","../../../projects/iox-builder/src/lib/components/list/list.config.ts","../../../projects/iox-builder/src/lib/components/repeater/repeater.config.ts","../../../projects/iox-builder/src/lib/components/section/section.config.ts","../../../projects/iox-builder/src/lib/components/slider-slide/slider-slide.config.ts","../../../projects/iox-builder/src/lib/components/slider-container/slider-container.config.ts","../../../projects/iox-builder/src/lib/components/spacer/spacer.config.ts","../../../projects/iox-builder/src/public-api.ts","../../../projects/iox-builder/src/vectoriox-iox-builder.ts"],"sourcesContent":["import { DEFAULT_WIDTH_BY_TYPE, IoxContextSlot, RelativeSourceSpec, ResponsiveOverrides, SetContextParams } from '@vectoriox/iox-ui';\n\nexport enum StyleCategory {\n Layout = 'Layout',\n /** How THIS node participates in its parent's flex/grid flow (align-self, flex-grow, grid-column…).\n * Distinct from Layout, which configures the node as a container for its OWN children. */\n ChildLayout = 'Child Layout',\n Size = 'Size',\n Typography = 'Typography',\n Spacing = 'Spacing',\n Border = 'Border',\n Position = 'Position',\n Background = 'Background',\n Effects = 'Effects',\n List = 'List',\n // Legacy — kept for backward compat; prefer Size\n Dimensions = 'Dimensions',\n}\n\nexport interface IoxBinding {\n prop: string;\n source: string;\n path: string;\n fallback?: any;\n /** Render-time transform chain (UI: \"Filters\"), applied LEFT→RIGHT after resolvePath by the shared\n * `applyBindingPipes` from `@vectoriox/iox-ui` — same on the builder canvas and the SSR engine.\n * Shape mirrors iox-ui's `IoxPipe` (kept inline so this model needs no cross-package import). */\n pipes?: { name: string; args?: any[] }[];\n}\n\n/**\n * When mode=single: looks up a single CMS item by matching a schema field\n * against a URL path param (e.g. /project/:projectId → field _id).\n * `defaultId` is used as a fallback value in the builder preview when no\n * live route is active.\n */\nexport interface DsFilterByRouteParam {\n field: string;\n routeParam: string;\n defaultId?: string;\n}\n\n/**\n * When mode=query: each entry filters a schema field, either from a URL query string key\n * (e.g. ?status=active → field \"status\") or by a constant.\n * `queryParam` OMITTED → constant filter: `defaultValue` is always the value.\n * `queryParam` present → the URL value wins and `defaultValue` is the fallback (which is what the\n * builder preview always uses — design time has no live query params).\n */\nexport interface DsFilterByQueryParam {\n field: string;\n queryParam?: string;\n defaultValue?: string;\n}\n\nexport enum DataSourceType {\n Cms = 'cms',\n Shop = 'shop',\n ExternalApi = 'external-api',\n InternalApi = 'internal-api',\n Static = 'static',\n /** A VIEW into another variable: `{ from: <alias>, path }` (e.g. galleryImages = product.gallery).\n * Resolves to the value one (or more) level(s) into a parent variable — page-scoped. */\n Derived = 'derived',\n /** A ROUTE-CONTEXT value derived from the current route item — `$route`/`$current`/`$siblings`/\n * `$related`. Not fetched: computed by the shared `computeRelative` from other resolved sources.\n * See relative-data-sources-plan.md. */\n Relative = 'relative',\n /** A page-local VARIABLE: a named resource whose value is WRITTEN at runtime by an interaction\n * (`setContext`), never fetched. Starts empty; elements bind to it like any other alias.\n * `request.variable.itemsFrom` names the source whose items it holds, for field suggestions.\n * See element-context-state-plan.md. */\n Variable = 'variable',\n}\n\nexport interface IoxDataSource {\n id: string;\n type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived' | 'relative' | 'variable';\n mode: 'single' | 'query';\n alias: string;\n request: {\n method?: 'GET' | 'POST';\n endpoint?: string;\n /** `derived` alias: resolve `from` (another alias) then getByPath(value, path). */\n derived?: { from: string; path: string };\n /** `relative` alias: a route-context computation (kind + from/subjectFrom/sortBy/matchFields…),\n * resolved by the shared `computeRelative`. */\n relative?: RelativeSourceSpec;\n /** `variable` alias: written at runtime by an interaction. `itemsFrom` names the source whose\n * items it holds — optional, and used only to suggest fields in the bind picker. */\n variable?: { itemsFrom?: string };\n cms?: {\n contentType: string;\n filter?: any;\n limit?: number;\n sort?: any;\n /** Single-result lookup: match field against a route path param */\n filterByRouteParam?: DsFilterByRouteParam;\n /** Array-result filtering: match fields against URL query params */\n filterByQueryParams?: DsFilterByQueryParam[];\n };\n shop?: {\n contentType: 'products' | 'categories' | 'subCategories';\n filterByRouteParam?: DsFilterByRouteParam;\n filterByQueryParams?: DsFilterByQueryParam[];\n };\n params?: Record<string, any>;\n };\n}\n\n// ── Interactions / Animations ────────────────────────────────\n\n/**\n * Element context state — the shared types live in @vectoriox/iox-ui (the engine cannot import\n * iox-builder), and are re-exported here so builder code has one import site. See\n * element-context-state-plan.md.\n */\nexport type { IoxContextSlot, SetContextParams };\n\nexport type InteractionTrigger =\n | 'pageLoad' | 'click' | 'hover' | 'viewportEnter' | 'scrollProgress'\n // Page-transition choreography (see page-transitions.md). pageLeave plays on navigate-AWAY and\n // the route swap waits for all of them; pageEnter plays after the page transition completes.\n | 'pageLeave' | 'pageEnter'\n // Swiper container-level events (used as triggers on a SliderContainer node)\n | 'swiperSlideChange' | 'swiperReachBeginning' | 'swiperReachEnd'\n | 'swiperAutoplayStart' | 'swiperAutoplayStop'\n // Swiper slide-level events (used as triggers on a SliderSlide node)\n | 'swiperSlideActive' | 'swiperSlideInactive';\n\nexport type InteractionActionType =\n | 'fadeIn' | 'fadeOut'\n | 'moveUp' | 'moveDown' | 'moveLeft' | 'moveRight'\n | 'scaleIn' | 'scaleOut'\n | 'rotate'\n | 'show' | 'hide' | 'toggleVisibility'\n // Element context state — write/clear a named runtime slot other elements bind to. Not an\n // animation: these carry `SetContextParams` in `params`. See element-context-state-plan.md.\n | 'setContext' | 'clearContext'\n // Swiper imperative method actions (target must be a labeled SliderContainer node)\n | 'swiperNext' | 'swiperPrev' | 'swiperGoToSlide'\n | 'swiperAutoplayStart' | 'swiperAutoplayStop' | 'swiperAutoplayPause';\n\nexport interface InteractionAction {\n type: InteractionActionType;\n /** 'self' targets the node that owns the interaction; otherwise a node ID. */\n target: 'self' | string;\n /** Duration in milliseconds. */\n duration: number;\n /** Delay in milliseconds before the action starts. */\n delay: number;\n easing: 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';\n /**\n * Extra parameters — `{ distance: 20 }` for move actions. For `setContext`/`clearContext` this\n * holds a `SetContextParams` (`{ slot, value, noReverse? }`), read structurally by the shared\n * `contextActionEffect` in @vectoriox/iox-ui. Kept as an index signature because animation\n * actions access it by key (`params?.['degrees']`).\n */\n params?: Record<string, any>;\n /** If true, the action only plays once (relevant for viewport/scroll triggers). */\n once?: boolean;\n /**\n * Switched OFF by the author without deleting it — useful while tuning a multi-action sequence.\n * Absent means enabled. Honoured by BOTH runtimes via the shared `isActionEnabled`: a disabled\n * action does not animate, does not write context, and receives no pre-state.\n */\n disabled?: boolean;\n}\n\nexport interface IoxInteraction {\n id: string;\n trigger: InteractionTrigger;\n actions: InteractionAction[];\n /**\n * Optional second set of actions for click-toggle behaviour.\n * When set, the first click runs `actions` and the second click runs\n * `reverseActions`, alternating on every subsequent click.\n * Only meaningful for trigger === 'click'.\n */\n reverseActions?: InteractionAction[];\n}\n\n/**\n * Maps each action type to its logical inverse for auto-populating toggle\n * reverse actions. Types without a natural inverse are omitted.\n */\nexport const INVERSE_ACTION: Partial<Record<InteractionActionType, InteractionActionType>> = {\n fadeIn: 'fadeOut',\n fadeOut: 'fadeIn',\n show: 'hide',\n hide: 'show',\n scaleIn: 'scaleOut',\n scaleOut: 'scaleIn',\n moveUp: 'moveDown',\n moveDown: 'moveUp',\n moveLeft: 'moveRight',\n moveRight: 'moveLeft',\n // Click-toggle only: click sets the slot, click again clears it. This map does NOT drive\n // hover-leave — that runs the same actions on a reverse pass, whose context semantics live in\n // `contextActionEffect` (@vectoriox/iox-ui).\n setContext: 'clearContext',\n clearContext: 'setContext',\n};\n\n// ── Component capability declarations ─────────────────────────────────────────\n\n/** An event that a component can emit, usable as an interaction trigger. */\nexport interface ComponentEventDef {\n /** Value stored on IoxInteraction.trigger (e.g. 'swiperSlideChange'). */\n value: string;\n label: string;\n icon?: string;\n}\n\n/** An imperative method a component exposes, usable as an interaction action. */\nexport interface ComponentMethodDef {\n /** Value stored on InteractionAction.type (e.g. 'swiperNext'). */\n value: string;\n label: string;\n /** Optional parameters the user can configure when this action is selected. */\n params?: { name: string; type: 'number' | 'string' | 'boolean'; label: string }[];\n}\n\nexport const TRIGGER_OPTIONS: { value: InteractionTrigger; label: string; icon: string }[] = [\n { value: 'pageLoad', label: 'Page load', icon: 'ph-thin ph-play' },\n { value: 'pageEnter', label: 'Page enter', icon: 'ph-thin ph-sign-in' },\n { value: 'pageLeave', label: 'Page leave', icon: 'ph-thin ph-sign-out' },\n { value: 'viewportEnter', label: 'Enter viewport', icon: 'ph-thin ph-eye' },\n { value: 'click', label: 'Click', icon: 'ph-thin ph-cursor-click' },\n { value: 'hover', label: 'Hover', icon: 'ph-thin ph-hand-pointing' },\n { value: 'scrollProgress', label: 'Scroll progress', icon: 'ph-thin ph-arrow-fat-lines-down' },\n];\n\nexport const ACTION_TYPE_OPTIONS: { value: InteractionActionType; label: string }[] = [\n { value: 'fadeIn', label: 'Fade in' },\n { value: 'fadeOut', label: 'Fade out' },\n { value: 'moveUp', label: 'Move up' },\n { value: 'moveDown', label: 'Move down' },\n { value: 'moveLeft', label: 'Move left' },\n { value: 'moveRight', label: 'Move right' },\n { value: 'scaleIn', label: 'Scale in' },\n { value: 'scaleOut', label: 'Scale out' },\n { value: 'rotate', label: 'Rotate' },\n { value: 'show', label: 'Show' },\n { value: 'hide', label: 'Hide' },\n { value: 'toggleVisibility', label: 'Toggle visibility' },\n { value: 'setContext', label: 'Set context' },\n { value: 'clearContext', label: 'Clear context' },\n];\n\nexport const EASING_OPTIONS = ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out'];\n\n// ── Style Presets ─────────────────────────────────────────────────────────────\n\n/**\n * A named, reusable collection of CSS style properties stored at the org level.\n * Elements reference a preset by `stylePresetId`. At render time the engine\n * merges `preset.styleProps → element.styleOverrides` so local overrides win.\n */\nexport interface StylePreset {\n id: string;\n name: string;\n /** Flat CSS property map — same shape as IoxLayoutNode.styleProps. */\n styleProps: Record<string, any>;\n /** Per-state style overrides stored alongside the preset (e.g. hover, active, focus). */\n stateStyles?: Partial<Record<ElementState, Record<string, any>>>;\n}\n\n/** A reusable element definition whose instances all stay in sync.\n * Stored in the `symbols` backend collection; referenced by ComponentNode.symbolId. */\nexport interface IoxSymbol {\n id: string;\n name: string;\n /** Full serialised node tree — same shape as a page layout node. */\n node: Record<string, any>;\n}\n\n/**\n * A named, reusable collection of IoxInteraction[] stored at the org level.\n * Elements reference a preset by `interactionPresetId`. Editing the preset\n * propagates updated interactions to all linked elements immediately.\n */\nexport interface InteractionPreset {\n id: string;\n name: string;\n interactions: IoxInteraction[];\n}\n\nexport type ElementState =\n | 'hover' | 'active' | 'focus'\n | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)'\n | 'parent-hover'\n | 'trigger-hover';\n\n/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */\nexport const INTERACTION_STATES: ElementState[] = ['hover', 'active', 'focus'];\n\n/** Structural pseudo-classes — compiled to .iox-outer-{id}:state */\nexport const STRUCTURAL_STATES: ElementState[] = ['first-child', 'last-child', 'nth-child(odd)', 'nth-child(even)'];\n\n/**\n * Relational pseudo-classes — the styled element is a descendant, the pseudo-class\n * lives on an ANCESTOR. Compiled to `.iox-node-{parentId}:{base} .iox-node-{id} { … }`,\n * so they require the ancestor's css id (`relativeToId`) at compile time.\n * `RELATIONAL_STATE_BASE` maps each relational state to the ancestor pseudo-class.\n */\nexport const RELATIONAL_STATES: ElementState[] = ['parent-hover'];\n\nexport const RELATIONAL_STATE_BASE: Partial<Record<ElementState, string>> = {\n 'parent-hover': 'hover',\n};\n\n/**\n * Targeted relational pseudo-classes — the styled element restyles when an ARBITRARY\n * chosen element (the `trigger`, not the DOM parent) matches a pseudo-class. Compiled to\n * `.iox-node-{scopeId}:has(.iox-node-{triggerId}:{base}) .iox-node-{id} { … }`, where\n * `scopeId` is the NEAREST COMMON ANCESTOR of the styled node and the trigger. Scoping the\n * `:has()` to that ancestor keeps the rule repetition-safe (each cloned subtree matches\n * independently) with a single shared CSS rule.\n *\n * The trigger node id per state is stored on `ComponentNode.stateTriggers`.\n * `TARGETED_STATE_BASE` maps each targeted state to the trigger's pseudo-class.\n */\nexport const TARGETED_STATES: ElementState[] = ['trigger-hover'];\n\nexport const TARGETED_STATE_BASE: Partial<Record<ElementState, string>> = {\n 'trigger-hover': 'hover',\n};\n\nexport const SUPPORTED_STATES: ElementState[] = [...INTERACTION_STATES, ...STRUCTURAL_STATES, ...RELATIONAL_STATES, ...TARGETED_STATES];\n\nexport interface ComponentNode {\n id?: string;\n /**\n * The CSS class key (`iox-node-{styleId}`) used by the style engine.\n * Set on clone nodes to point back to the original template node's id,\n * so all repeated rows share a single CSS rule.\n * Absent on original (non-clone) nodes — they use `id` directly.\n */\n styleId?: string;\n type: string;\n inputs?: Record<string, any>;\n traits?: ComponentTrait[];\n styleTraits?: StyleTraitGroup[];\n bindings?: IoxBinding[];\n interactions?: IoxInteraction[];\n children?: ComponentNode[];\n isGlobal?: boolean;\n globalPosition?: 'before' | 'after';\n /** ID of the org-level StylePreset applied to this node. */\n stylePresetId?: string;\n /**\n * CSS properties explicitly overridden by the user after a preset was applied.\n * Serialized to `styleProps` in the page layout JSON when a preset is active.\n * Absent when no preset is applied (full styles stored in styleTraits instead).\n */\n styleOverrides?: Record<string, any>;\n /**\n * Per-state style overrides. Only stores properties that differ from the base\n * style — same sparse pattern as styleOverrides. Each key maps to a flat CSS\n * property map that is compiled to `.iox-node-{id}:hover { … }` etc.\n */\n stateStyles?: Partial<Record<ElementState, Record<string, any>>>;\n /**\n * For TARGETED_STATES (e.g. `trigger-hover`): the node id whose pseudo-class drives\n * that state. Keyed by state so future targeted states (trigger-active/focus) slot in.\n * The styled node restyles when this trigger node is hovered; the compiler scopes the\n * `:has()` selector to the nearest common ancestor of the two. Only nodes with a `label`\n * appear in the trigger picker.\n */\n stateTriggers?: Partial<Record<ElementState, string>>;\n /**\n * Per-breakpoint overrides — SPARSE, shaped like `stateStyles`:\n * `{ mobile: { styleProps: {…}, stateStyles: { hover: {…} } } }`. Base styles stay in\n * `styleTraits`; absent means the node looks the same at every width. Read and written only\n * through the shared helpers in `@vectoriox/iox-ui` (`resolveStyleProps`, `setOverride`,\n * `clearOverride`, `planResponsiveRules`) so builder and SSR engine agree.\n * See iox-ai-guidance `architecture/builder/responsive-breakpoints-plan.md`.\n */\n responsive?: ResponsiveOverrides;\n /** User-defined display name for this node. Used in the layer tree and as an\n * interaction target identifier. Only nodes with a label appear in the\n * interaction target picker. */\n label?: string;\n /** ID of the org-level IoxSymbol this node is linked to.\n * Absent on stamps (independent copies). When present, any style change\n * on this node propagates to all other instances of the same symbol. */\n symbolId?: string;\n /** Set when the user detaches an instance from its symbol. Remembers the\n * origin symbol ID so the instance can be re-linked (resynced) later. */\n detachedSymbolId?: string;\n /** ID of the org-level InteractionPreset applied to this node.\n * When set, node.interactions reflects the preset's interactions. */\n interactionPresetId?: string;\n}\n\n/**\n * Build a full StyleTraitGroup[] schema populated with values from a flat\n * styleProps map. Used when editing a preset in the Style panel — the panel\n * receives the same `StyleTraitGroup[]` shape regardless of context.\n */\nexport function buildPresetStyleTraits(styleProps: Record<string, any>): StyleTraitGroup[] {\n const allGroups: GroupStyleConfig[] = [\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n new PositionGroupStyleConfig(),\n ];\n return allGroups.map(group => ({\n ...group,\n traits: group.traits.map(trait => ({\n ...trait,\n default: styleProps[trait.name] !== undefined ? styleProps[trait.name] : trait.default,\n })),\n }));\n}\n\nexport enum TraitInputType {\n Text = 'text',\n Number = 'number',\n Select = 'select',\n Checkbox = 'checkbox',\n Color = 'colorPicker',\n DirectionalSize = 'directionalSize',\n SelectButton = 'selectButton',\n Scrub = 'scrub',\n Range = 'range',\n Icon = 'icon',\n Media = 'media',\n /** Ordered list of images (URL / one-by-one / filebox; per-item binding in a later phase).\n * Controller registered in the consumer (iox-cms-client) as `mediaList`. Value: GalleryImage[]. */\n MediaList = 'mediaList',\n FontFamily = 'fontFamily',\n GridTemplate = 'gridTemplate',\n SectionLabel = 'sectionLabel',\n Textarea = 'textarea',\n}\n\nexport interface TraitOptionMap {\n [key: string]: any;\n}\n\n/** Named label/value pair for select options where the display label differs from the CSS value. */\nexport interface TraitSelectOption {\n label: string;\n value: string;\n}\n\nexport interface QuadSizeSegment {\n key: string;\n icon: string;\n ariaLabel?: string;\n}\n\n/** Conditional visibility: this trait only shows when a controlling trait matches one of the given values.\n * `scope` selects whose trait is inspected:\n * - `'self'` (default): a sibling trait on the SAME node/group (e.g. grid tracks show when this node's display=grid).\n * - `'parent'`: the same-named trait on the node's PARENT (e.g. flex-child props show when the PARENT's display=flex).\n * Parent-scoped conditions are resolved by the style panel, which threads the parent's live value in. */\nexport interface TraitShowCondition {\n /** name of the controlling trait (a sibling when scope='self'; read off the parent when scope='parent') */\n trait: string;\n /** one value or an array of values that make this trait visible */\n values: string | string[];\n /** whose trait to inspect — defaults to 'self' (a sibling in the same group). */\n scope?: 'self' | 'parent';\n}\n\nexport interface ComponentTrait {\n name: string;\n label: string;\n type: TraitInputType;\n options?: string[] | TraitSelectOption[] | TraitOptionMap;\n default?: any;\n inline?: boolean;\n /** When set, this trait is hidden unless the named sibling trait has one of the specified values. */\n showWhen?: TraitShowCondition;\n /** OPT-IN: may hold a different value per breakpoint (`responsive[bp].inputs`). See TraitConfig. */\n responsive?: boolean;\n}\n\n// StyleTrait is the same shape as ComponentTrait — unified type\nexport type StyleTrait = ComponentTrait;\n\nexport interface StyleTraitGroup {\n category: string;\n traits: ComponentTrait[];\n}\n\nexport function generateNodeId(): string {\n return Math.random().toString(36).substr(2, 9);\n}\n\nexport class ComponentConfig {\n public id: string;\n public type: string;\n public selector: string;\n public icon: string;\n public category: string;\n public inputs: Record<string, any>;\n public traits: ComponentTrait[];\n public styleTraits: StyleTraitGroup[];\n /** Layout components (e.g. Section) set this to []. Leaf components leave it undefined.\n * RenderDirective uses `node.children !== undefined` to detect layout components. */\n public children?: ComponentNode[];\n /** When true, the component is excluded from the Components panel drag list.\n * Use for internal-only types (e.g. SliderSlide) that are created programmatically. */\n public hidden?: boolean;\n /** Events this component emits that can be used as interaction triggers.\n * The Interactions panel appends these to the trigger dropdown for nodes of this type. */\n public componentEvents?: ComponentEventDef[];\n /** Imperative methods this component exposes that can be used as interaction actions.\n * The Interactions panel appends these to the action dropdown when targeting this component. */\n public componentMethods?: ComponentMethodDef[];\n\n constructor(type: string, selector: string, icon = 'ph-thin ph-cube', category = 'General') {\n this.id = generateNodeId();\n this.type = type;\n this.selector = selector;\n this.icon = icon;\n this.category = category;\n this.inputs = {};\n this.traits = [];\n this.styleTraits = [];\n }\n\n /** Override specific trait defaults after styleTraits are set.\n * Call this at the end of each subclass constructor. */\n protected applyStyleDefaults(defaults: Record<string, any>): void {\n // Single source of truth for container-type width defaults: when a subclass does\n // not set width explicitly, fill it from the shared DEFAULT_WIDTH_BY_TYPE map — the\n // same map the SSR engine resolves from. See render-parity.md.\n if (defaults['width'] === undefined && DEFAULT_WIDTH_BY_TYPE[this.type] !== undefined) {\n defaults = { ...defaults, width: DEFAULT_WIDTH_BY_TYPE[this.type] };\n }\n for (const group of this.styleTraits) {\n for (const trait of group.traits) {\n if (defaults[trait.name] !== undefined) {\n trait.default = defaults[trait.name];\n }\n }\n }\n }\n}\n\nexport class TraitConfig {\n public name: string;\n public label: string;\n public type: TraitInputType;\n public options?: string[] | TraitSelectOption[] | TraitOptionMap;\n public default?: any;\n public inline?: boolean;\n public showWhen?: TraitShowCondition;\n /**\n * OPT-IN: this trait can hold a different value per breakpoint, stored in\n * `ComponentNode.responsive[bp].inputs` and resolved by the shared `resolveInputs`.\n *\n * Opt-in rather than universal because most traits are not layout decisions — a slider's\n * `loop` or a link's `target` has one answer at every width, and offering a breakpoint control\n * on all 30 slider traits would bury the three that matter. Set it only where the value is\n * genuinely a per-width layout choice (slidesPerView, limit, …).\n */\n public responsive?: boolean;\n\n constructor(\n name: string,\n label: string,\n type: TraitInputType,\n options?: string[] | TraitSelectOption[] | TraitOptionMap,\n defaultValue?: any,\n inline?: boolean,\n showWhen?: TraitShowCondition,\n responsive?: boolean,\n ) {\n this.name = name;\n this.label = label;\n this.type = type;\n this.options = options;\n this.default = defaultValue;\n this.inline = inline;\n this.showWhen = showWhen;\n this.responsive = responsive;\n }\n}\n\n// StyleTraitConfig is unified with TraitConfig — single class for both traits and style traits\nexport { TraitConfig as StyleTraitConfig };\n\nexport class GroupStyleConfig {\n public category: string;\n public traits: TraitConfig[];\n\n constructor(category: string, traits: TraitConfig[]) {\n this.category = category;\n this.traits = traits;\n }\n}\n\n// ─── Unit constants ───────────────────────────────────────────────────────────\n\nexport const UNITS_ALL: string[] = ['px', '%', 'rem', 'em', 'vw', 'vh'];\nexport const UNITS_NO_VW: string[] = ['px', '%', 'rem', 'em', 'vh'];\nexport const UNITS_FIXED: string[] = ['px', '%', 'rem', 'em'];\nexport const UNITS_DEG: string[] = ['deg'];\n\n// ─── Shared panel utilities ──────────────────────────────────────────────────\n\nexport function resolveTraitControllerType(type: TraitInputType): string {\n switch (type) {\n case TraitInputType.Number: return 'number';\n case TraitInputType.Select: return 'select';\n case TraitInputType.Checkbox: return 'switch';\n case TraitInputType.Color: return 'colorPicker';\n case TraitInputType.DirectionalSize: return 'directionalSize';\n case TraitInputType.SelectButton: return 'selectButton';\n case TraitInputType.Scrub: return 'scrub';\n case TraitInputType.Range: return 'range';\n case TraitInputType.SectionLabel: return 'sectionLabel';\n case TraitInputType.Icon: return 'icon';\n case TraitInputType.Media: return 'media';\n case TraitInputType.MediaList: return 'mediaList';\n case TraitInputType.FontFamily: return 'select';\n case TraitInputType.GridTemplate: return 'gridTemplate';\n case TraitInputType.Textarea: return 'textarea';\n default: return 'text';\n }\n}\n\nexport function resolveTraitOptions(trait: ComponentTrait): any {\n if (\n trait.type === TraitInputType.Color ||\n trait.type === TraitInputType.DirectionalSize ||\n trait.type === TraitInputType.SelectButton ||\n trait.type === TraitInputType.Scrub ||\n trait.type === TraitInputType.Range ||\n trait.type === TraitInputType.Media\n ) {\n return trait.options;\n }\n if (trait.type === TraitInputType.FontFamily) {\n // FontFamily options are injected dynamically by the style panel via FontManagerService.\n // Return empty array here; the panel overrides this in resolveOptions().\n return [];\n }\n if (trait.type !== TraitInputType.Select) {\n return undefined;\n }\n const opts = (trait.options as any[]) ?? [];\n // Already formatted as {label, value}[]\n if (opts.length > 0 && typeof opts[0] === 'object' && 'label' in opts[0]) {\n return opts;\n }\n return opts.map((option: string) => ({ label: option, value: option }));\n}\n\n// ─── Style Groups ─────────────────────────────────────────────────────────────\n\nconst NON_STATIC_POSITIONS = ['relative', 'absolute', 'fixed', 'sticky'];\n\nexport class PositionGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Position, [\n new TraitConfig('position', 'Position', TraitInputType.Select,\n ['static', 'relative', 'absolute', 'fixed', 'sticky'], 'static'),\n new TraitConfig('top', 'T', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('right', 'R', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('bottom', 'B', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('left', 'L', TraitInputType.Scrub, { min: -9999, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n new TraitConfig('zIndex', 'Z', TraitInputType.Scrub, { min: -99, max: 9999, step: 1, units: [''] }, '0', false,\n { trait: 'position', values: NON_STATIC_POSITIONS }),\n ]);\n }\n}\n\n// ─── Layout ───────────────────────────────────────────────────────────────────\n\nexport class LayoutGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Layout, [\n new TraitConfig('display', 'Display', TraitInputType.Select,\n ['block', 'inline', 'inline-block', 'flex', 'grid'], 'block'),\n\n // ── Flex-only ─────────────────────────────────────────────────────\n new TraitConfig('flexDirection', 'Direction', TraitInputType.SelectButton, [\n { value: 'row', label: 'Horizontal', icon: 'ph-thin ph-arrow-right' },\n { value: 'row-reverse', label: 'Horizontal Reversed', icon: 'ph-thin ph-arrow-left' },\n { value: 'column', label: 'Vertical', icon: 'ph-thin ph-arrow-down' },\n { value: 'column-reverse', label: 'Vertical Reversed', icon: 'ph-thin ph-arrow-up' },\n ], 'row', false, { trait: 'display', values: 'flex' }),\n new TraitConfig('flexWrap', 'Flex Wrap', TraitInputType.SelectButton, [\n { value: 'nowrap', label: 'No Wrap', icon: 'ph-thin ph-minus' },\n { value: 'wrap', label: 'Wrap', icon: 'ph-thin ph-arrow-elbow-down-right' },\n { value: 'wrap-reverse', label: 'Wrap Reversed', icon: 'ph-thin ph-arrow-elbow-up-right' },\n ], 'nowrap', false, { trait: 'display', values: 'flex' }),\n\n // ── Shared flex + grid ────────────────────────────────────────────\n new TraitConfig('justifyContent', 'Justify', TraitInputType.SelectButton, [\n { value: 'flex-start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'flex-end', label: 'End', icon: 'ph-thin ph-align-right' },\n { value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-arrows-out-line-horizontal' },\n { value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },\n { value: 'space-evenly', label: 'Space Evenly', icon: 'ph-thin ph-dots-six' },\n ], 'flex-start', false, { trait: 'display', values: ['flex', 'grid'] }),\n new TraitConfig('alignItems', 'Align Items', TraitInputType.SelectButton, [\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n ], 'stretch', false, { trait: 'display', values: ['flex', 'grid'] }),\n new TraitConfig('gap', 'Gap', TraitInputType.Scrub,\n { min: 0, max: 200, step: 1, units: UNITS_FIXED }, '0px', false,\n { trait: 'display', values: ['flex', 'grid'] }),\n\n // ── Grid-only ─────────────────────────────────────────────────────\n new TraitConfig('gridTemplateColumns', 'Columns', TraitInputType.GridTemplate,\n undefined, '1fr', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('gridTemplateRows', 'Rows', TraitInputType.GridTemplate,\n undefined, 'auto', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('justifyItems', 'Justify Items', TraitInputType.SelectButton, [\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-horizontal' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-right' },\n ], 'stretch', false, { trait: 'display', values: 'grid' }),\n new TraitConfig('alignContent', 'Align Content', TraitInputType.SelectButton, [\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n { value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-arrows-out-line-vertical' },\n { value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n ], 'stretch', false, { trait: 'display', values: 'grid' }),\n\n // ── Direction (always visible) ────────────────────────────────────\n new TraitConfig('direction', 'Text Direction', TraitInputType.SelectButton, [\n { value: 'ltr', label: 'LTR' },\n { value: 'rtl', label: 'RTL' },\n ], 'ltr'),\n ]);\n }\n}\n\n// ─── Child Layout ───────────────────────────────────────────────────────────\n//\n// How THIS node sits inside its PARENT's flex/grid container. Every trait here is a\n// child-flow property that the style engine routes to the OUTER host element (see\n// StyleRegistryService.OUTER_PROPS) so it acts on the flex/grid item, not the inner div.\n//\n// Visibility is PARENT-scoped (`scope: 'parent'`): the trait shows based on the PARENT's\n// `display`, not this node's own. When the parent is neither flex nor grid, every trait\n// is hidden and the style panel drops the whole (now-empty) group. `align-self`/`order`\n// apply to both flex and grid items; `justify-self`/`grid-column`/`grid-row` are grid-only;\n// `flex-grow`/`flex-shrink`/`flex-basis` are flex-only.\nconst PARENT_FLEX_OR_GRID: TraitShowCondition = { trait: 'display', values: ['flex', 'grid'], scope: 'parent' };\nconst PARENT_FLEX: TraitShowCondition = { trait: 'display', values: 'flex', scope: 'parent' };\nconst PARENT_GRID: TraitShowCondition = { trait: 'display', values: 'grid', scope: 'parent' };\n\nexport class ChildLayoutGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.ChildLayout, [\n // ── Shared flex + grid child ──────────────────────────────────────\n new TraitConfig('alignSelf', 'Align Self', TraitInputType.SelectButton, [\n { value: 'auto', label: 'Auto', icon: 'ph-thin ph-minus' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },\n ], 'auto', false, PARENT_FLEX_OR_GRID),\n new TraitConfig('order', 'Order', TraitInputType.Scrub,\n { min: -99, max: 99, step: 1, units: [''] }, '0', false, PARENT_FLEX_OR_GRID),\n\n // ── Flex-only child ───────────────────────────────────────────────\n new TraitConfig('flexGrow', 'Grow', TraitInputType.Scrub,\n { min: 0, max: 10, step: 1, units: [''] }, '0', false, PARENT_FLEX),\n new TraitConfig('flexShrink', 'Shrink', TraitInputType.Scrub,\n { min: 0, max: 10, step: 1, units: [''] }, '1', false, PARENT_FLEX),\n new TraitConfig('flexBasis', 'Basis', TraitInputType.Scrub,\n { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', false, PARENT_FLEX),\n\n // ── Grid-only child ───────────────────────────────────────────────\n // Free-text so users can express `auto`, `span 2`, or explicit lines `1 / 3`.\n new TraitConfig('justifySelf', 'Justify Self', TraitInputType.SelectButton, [\n { value: 'auto', label: 'Auto', icon: 'ph-thin ph-minus' },\n { value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-horizontal' },\n { value: 'start', label: 'Start', icon: 'ph-thin ph-align-left' },\n { value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },\n { value: 'end', label: 'End', icon: 'ph-thin ph-align-right' },\n ], 'auto', false, PARENT_GRID),\n new TraitConfig('gridColumn', 'Column', TraitInputType.Text, undefined, 'auto', false, PARENT_GRID),\n new TraitConfig('gridRow', 'Row', TraitInputType.Text, undefined, 'auto', false, PARENT_GRID),\n ]);\n }\n}\n\n// ─── Size (replaces Dimensions) ───────────────────────────────────────────────\n\nexport class SizeGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Size, [\n new TraitConfig('width', 'W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('height', 'H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('minWidth', 'Min W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('minHeight', 'Min H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('maxWidth', 'Max W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n new TraitConfig('maxHeight', 'Max H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),\n // aspect-ratio is a preset ratio (or 'auto') — a Select popup of standard ratios, no units.\n new TraitConfig('aspectRatio', 'Aspect Ratio', TraitInputType.Select,\n ['auto', '1/1', '4/3', '3/2', '16/9', '9/16', '3/4', '2/3', '21/9'], 'auto'),\n // object-fit is a style trait (applies to replaced elements, e.g. images). Lives here so\n // it flows through the CSS engine (styleProps) instead of a per-component inline binding.\n new TraitConfig('objectFit', 'Object Fit', TraitInputType.Select,\n ['cover', 'contain', 'fill', 'none', 'scale-down'], 'cover'),\n // overflow — how content that exceeds the box is handled. `visible` is the CSS initial\n // (dropped as a no-op by the compiler); other values emit. Applies to the node's own box\n // (inner element), so it is NOT an OUTER_PROP.\n new TraitConfig('overflow', 'Overflow', TraitInputType.Select, [\n { label: 'Visible', value: 'visible' },\n { label: 'Hidden', value: 'hidden' },\n { label: 'Scroll', value: 'scroll' },\n { label: 'Auto', value: 'auto' },\n { label: 'Clip', value: 'clip' },\n ], 'visible'),\n ]);\n }\n}\n\n/** @deprecated Use SizeGroupStyleConfig instead. */\nexport class DimensionsGroupStyleConfig extends SizeGroupStyleConfig {}\n\n// ─── Background ───────────────────────────────────────────────────────────────\n\nexport class BackgroundGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Background, [\n new TraitConfig('backgroundColor', 'Background', TraitInputType.Color,\n { allowGradient: true, allowTransparent: true, formats: ['hex', 'rgb', 'hsl', 'transparent'] }, 'transparent'),\n ]);\n }\n}\n\nexport class SpacingGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Spacing, [\n new TraitConfig('margin', 'Margin', TraitInputType.DirectionalSize, {\n allowNegative: true,\n allowLinkedSlider: true,\n slider: { min: 0, max: 200, step: 1 }\n }, '0px 0px 0px 0px'),\n new TraitConfig('padding', 'Padding', TraitInputType.DirectionalSize, {\n allowNegative: false,\n allowLinkedSlider: true,\n slider: { min: 0, max: 200, step: 1 }\n }, '0px 0px 0px 0px')\n ]);\n }\n}\n\nexport class BorderGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Border, [\n new TraitConfig('borderWidth', 'Border Width', TraitInputType.DirectionalSize, {\n units: UNITS_FIXED,\n allowNegative: false,\n allowLinkedSlider: true,\n slider: { min: 0, max: 32, step: 1 }\n }, '0px'),\n new TraitConfig('borderStyle', 'Border Style', TraitInputType.SelectButton, [\n { value: 'solid', icon: 'ph-thin ph-line-segment' },\n { value: 'dashed', icon: 'ph-thin ph-dots-three' },\n { value: 'dotted', icon: 'ph-thin ph-dots-six' },\n ], 'solid'),\n new TraitConfig('borderColor', 'Border Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: false, formats: ['hex', 'rgb', 'hsl'] }, '#CCCCCC'),\n new TraitConfig('borderRadius', 'Border Radius', TraitInputType.DirectionalSize, {\n units: UNITS_FIXED,\n allowNegative: false,\n allowLinkedSlider: true,\n linkByDefault: true,\n slider: { min: 0, max: 120, step: 1 },\n segments: [\n { key: 'top-left', icon: 'ph-arrow-bend-up-left', ariaLabel: 'top left radius' },\n { key: 'top-right', icon: 'ph-arrow-bend-up-right', ariaLabel: 'top right radius' },\n { key: 'bottom-right', icon: 'ph-arrow-bend-down-right', ariaLabel: 'bottom right radius' },\n { key: 'bottom-left', icon: 'ph-arrow-bend-down-left', ariaLabel: 'bottom left radius' }\n ]\n }, '0px')\n ]);\n }\n}\n\nexport class TypographyGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Typography, [\n new TraitConfig('fontFamily', 'Font Family', TraitInputType.FontFamily, [],\n 'Poppins, sans-serif'),\n new TraitConfig('fontSize', 'Font Size', TraitInputType.Scrub,\n { min: 8, max: 200, step: 1, units: UNITS_ALL }, '16px'),\n new TraitConfig('fontWeight', 'Weight', TraitInputType.Scrub,\n { min: 100, max: 900, step: 100, units: [''] }, '400'),\n new TraitConfig('color', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: false, formats: ['hex', 'rgb', 'hsl'] }, '#000000'),\n // Unitless on purpose (`units: ['']`): a unitless line-height inherits as a RATIO — each\n // descendant multiplies it by its OWN font-size — whereas `1.5em`/`24px` inherits a fixed\n // computed length that ignores the child's font-size. min:0 so a line box can be collapsed\n // completely (icons/glyph-only elements), which `0.5` used to block.\n new TraitConfig('lineHeight', 'Line Height', TraitInputType.Scrub,\n { min: 0, max: 5, step: 0.05, units: [''] }, '1.5'),\n new TraitConfig('letterSpacing', 'Spacing', TraitInputType.Scrub,\n { min: -5, max: 50, step: 0.5, units: UNITS_FIXED }, '0px'),\n new TraitConfig('textAlign', '', TraitInputType.SelectButton, [\n { value: 'left', icon: 'ph-thin ph-text-align-left' },\n { value: 'center', icon: 'ph-thin ph-text-align-center' },\n { value: 'right', icon: 'ph-thin ph-text-align-right' },\n { value: 'justify', icon: 'ph-thin ph-text-align-justify' },\n ], 'left'),\n new TraitConfig('fontStyle', '', TraitInputType.SelectButton,\n { items: [{ value: 'italic', icon: 'ph-thin ph-text-italic', label: 'Italic' }], allowEmpty: true, noneValue: 'normal' },\n 'normal', true),\n new TraitConfig('textDecoration', '', TraitInputType.SelectButton,\n { items: [{ value: 'underline', icon: 'ph-thin ph-text-underline', label: 'Underline' }], allowEmpty: true, noneValue: 'none' },\n 'none', true),\n new TraitConfig('_sep_stroke', 'Stroke', TraitInputType.SectionLabel),\n new TraitConfig('WebkitTextStrokeWidth', 'Width', TraitInputType.Scrub,\n { min: 0, max: 10, step: 0.5, units: ['px'] }, '0px', true),\n new TraitConfig('WebkitTextStrokeColor', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: true, formats: ['hex', 'rgb', 'hsl'] }, 'transparent', true),\n ]);\n }\n}\n\nexport class EffectsGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.Effects, [\n // ── Visibility ────────────────────────────────────────\n new TraitConfig('opacity', 'Opacity', TraitInputType.Scrub,\n { min: 0, max: 1, step: 0.01, units: [''] }, '1'),\n new TraitConfig('mixBlendMode', 'Blend Mode', TraitInputType.Select, [\n 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'color-dodge', 'color-burn', 'hard-light', 'soft-light',\n 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity',\n ], 'normal'),\n new TraitConfig('cursor', 'Cursor', TraitInputType.Select, [\n 'auto', 'default', 'pointer', 'text', 'move', 'not-allowed',\n 'grab', 'grabbing', 'crosshair', 'zoom-in', 'zoom-out', 'none',\n ], 'auto'),\n\n // ── Shadow ────────────────────────────────────────────\n new TraitConfig('_sep_shadow', 'Shadow', TraitInputType.SectionLabel),\n new TraitConfig('boxShadow', 'Box Shadow', TraitInputType.Text, undefined, ''),\n new TraitConfig('textShadow', 'Text Shadow', TraitInputType.Text, undefined, ''),\n\n // ── Transform (virtual — composed to CSS transform: …) ─\n new TraitConfig('_sep_transform', 'Transform', TraitInputType.SectionLabel),\n new TraitConfig('translateX', 'TX', TraitInputType.Scrub,\n { min: -2000, max: 2000, step: 1, units: UNITS_ALL }, '0px', true),\n new TraitConfig('translateY', 'TY', TraitInputType.Scrub,\n { min: -2000, max: 2000, step: 1, units: UNITS_ALL }, '0px', true),\n new TraitConfig('scaleX', 'Scale X', TraitInputType.Range,\n { min: 0, max: 3, step: 0.01, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('scaleY', 'Scale Y', TraitInputType.Range,\n { min: 0, max: 3, step: 0.01, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('rotate', 'Rotate', TraitInputType.Scrub,\n { min: -360, max: 360, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('skewX', 'Skew X', TraitInputType.Scrub,\n { min: -180, max: 180, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('skewY', 'Skew Y', TraitInputType.Scrub,\n { min: -180, max: 180, step: 1, units: UNITS_DEG }, '0deg', true),\n\n // ── Filter (virtual — composed to CSS filter: …) ──────\n new TraitConfig('_sep_filter', 'Filter', TraitInputType.SectionLabel),\n new TraitConfig('filterBlur', 'Blur', TraitInputType.Scrub,\n { min: 0, max: 50, step: 1, units: ['px'] }, '0px', true),\n new TraitConfig('filterHueRotate', 'Hue Rotate', TraitInputType.Scrub,\n { min: 0, max: 360, step: 1, units: UNITS_DEG }, '0deg', true),\n new TraitConfig('filterBrightness', 'Brightness', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterContrast', 'Contrast', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterSaturate', 'Saturate', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1'),\n new TraitConfig('filterGrayscale', 'Grayscale', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n new TraitConfig('filterSepia', 'Sepia', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n new TraitConfig('filterInvert', 'Invert', TraitInputType.Range,\n { min: 0, max: 1, step: 0.05, showExtremes: false, showValue: true, compact: true }, '0'),\n\n // ── Backdrop filter (virtual — composed to CSS backdrop-filter: …)\n new TraitConfig('_sep_backdrop', 'Backdrop', TraitInputType.SectionLabel),\n new TraitConfig('backdropBlur', 'Blur', TraitInputType.Scrub,\n { min: 0, max: 50, step: 1, units: ['px'] }, '0px', true),\n new TraitConfig('backdropBrightness', 'Brightness', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n new TraitConfig('backdropContrast', 'Contrast', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n new TraitConfig('backdropSaturate', 'Saturate', TraitInputType.Range,\n { min: 0, max: 3, step: 0.05, showExtremes: false, showValue: true, compact: true }, '1', true),\n\n // ── Clip (clip-path — mask the node to a shape) ───────────\n new TraitConfig('_sep_clip', 'Clip', TraitInputType.SectionLabel),\n new TraitConfig('clipPath', 'Shape', TraitInputType.Select, [\n { label: 'None', value: 'none' },\n { label: 'Circle', value: 'circle(50%)' },\n { label: 'Ellipse', value: 'ellipse(50% 40%)' },\n { label: 'Inset', value: 'inset(10%)' },\n { label: 'Rounded inset', value: 'inset(10% round 16px)' },\n { label: 'Triangle', value: 'polygon(50% 0%, 0% 100%, 100% 100%)' },\n { label: 'Diamond', value: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)' },\n { label: 'Hexagon', value: 'polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)' },\n { label: 'Chevron', value: 'polygon(0 0, 75% 0, 100% 50%, 75% 100%, 0 100%, 25% 50%)' },\n ], 'none'),\n\n // ── Transition (virtual — composed to CSS transition: all …) ──\n new TraitConfig('_sep_transition', 'Transition', TraitInputType.SectionLabel),\n new TraitConfig('transitionDuration', 'Duration', TraitInputType.Scrub,\n { min: 0, max: 3000, step: 50, units: ['ms'] }, '0ms', true),\n new TraitConfig('transitionDelay', 'Delay', TraitInputType.Scrub,\n { min: 0, max: 2000, step: 50, units: ['ms'] }, '0ms', true),\n new TraitConfig('transitionTimingFunction', 'Easing', TraitInputType.Select, [\n 'ease', 'linear', 'ease-in', 'ease-out', 'ease-in-out',\n ], 'ease'),\n ]);\n }\n}\n\nexport class ListGroupStyleConfig extends GroupStyleConfig {\n constructor() {\n super(StyleCategory.List, [\n new TraitConfig('listStyleType', 'Marker Style', TraitInputType.Select, [\n { label: 'None', value: 'none' },\n { label: 'Disc', value: 'disc' },\n { label: 'Circle', value: 'circle' },\n { label: 'Square', value: 'square' },\n { label: 'Decimal', value: 'decimal' },\n { label: 'Lower Alpha', value: 'lower-alpha' },\n { label: 'Upper Alpha', value: 'upper-alpha' },\n { label: 'Lower Roman', value: 'lower-roman' },\n { label: 'Upper Roman', value: 'upper-roman' },\n ], 'disc'),\n new TraitConfig('listStylePosition', 'Marker Position', TraitInputType.SelectButton, [\n { value: 'outside', label: 'Outside' },\n { value: 'inside', label: 'Inside' },\n ], 'outside'),\n new TraitConfig('columnCount', 'Columns', TraitInputType.Scrub,\n { min: 1, max: 6, step: 1, units: [''] }, '1'),\n new TraitConfig('columnGap', 'Column Gap', TraitInputType.Scrub,\n { min: 0, max: 200, step: 1, units: UNITS_FIXED }, '0px'),\n new TraitConfig('_sep_marker', 'Marker', TraitInputType.SectionLabel),\n new TraitConfig('markerColor', 'Color', TraitInputType.Color,\n { allowGradient: false, allowTransparent: true, formats: ['hex', 'rgb', 'hsl', 'transparent'] }, ''),\n new TraitConfig('markerFontSize', 'Size', TraitInputType.Scrub,\n { min: 4, max: 100, step: 1, units: UNITS_FIXED }, ''),\n ]);\n }\n}\n\n/**\n * Returns a fresh set of all 8 style-group configs in canonical display order.\n * Every call produces new TraitConfig instances so different component nodes\n * never share mutable state.\n */\nexport function buildFullStyleTraits(): GroupStyleConfig[] {\n return [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new ChildLayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n}\n\nexport function flattenSchemaFields(\n properties: Record<string, any>,\n prefix = ''\n): { label: string; value: string }[] {\n const result: { label: string; value: string }[] = [];\n\n for (const [key, field] of Object.entries(properties)) {\n const fullPath = prefix ? `${prefix}.${key}` : key;\n\n if (field.type === 'object' && field.properties) {\n result.push(...flattenSchemaFields(field.properties, fullPath));\n } else {\n result.push({ label: fullPath, value: fullPath });\n }\n }\n\n return result;\n}\n\n/**\n * The ARRAY (repeatable) properties of a schema — used by the Bindings panel to auto-suggest which\n * property of a SINGLE resource a Repeater can iterate over (e.g. `product.gallery`). A field is\n * repeatable when its schema `type` is `embedded`/`array` (an embedded list) or it is a MANY\n * relation (`rel.type` contains \"many\", case-insensitive). Top-level only — the repeat target is a\n * property of the resource, not a deep leaf.\n */\nexport function arraySchemaFields(properties: Record<string, any>): { label: string; value: string }[] {\n const out: { label: string; value: string }[] = [];\n for (const [key, field] of Object.entries(properties ?? {})) {\n const type = (field?.type ?? '').toString().toLowerCase();\n const relType = (field?.rel?.type ?? '').toString().toLowerCase();\n if (type === 'embedded' || type === 'array' || (type === 'rel' && relType.includes('many'))) {\n out.push({ label: key, value: key });\n }\n }\n return out;\n}\n\n/**\n * Describe the ITEM shape of an array PROPERTY, straight from the schema — the authoritative source\n * (a resolved sample may be missing, or ambiguous). Given a resource's schema `properties` and the\n * dot-path to an array field (e.g. `gallery` or `info.items`):\n * - **object item** → its primitive leaf fields (flattened): `[{label:'url',value:'url'}, …]`.\n * - **primitive item** (`string[]`/`number[]`) → `isPrimitive:true` (caller offers \"(the item value)\").\n * - **can't tell** (many-relation whose items are related docs, or path not found) → both empty, so\n * the caller falls back to a resolved sample.\n * JSON-schema arrays store the item schema under `.items`; embedded objects under `.properties`.\n */\nexport function arrayItemSchemaFields(\n properties: Record<string, any>,\n arrayPath: string,\n): { fields: { label: string; value: string }[]; isPrimitive: boolean } {\n const parts = (arrayPath ?? '').split('.').filter(Boolean);\n let field: any = undefined;\n let cursor: any = properties ?? {};\n for (const part of parts) {\n field = cursor?.[part];\n if (!field) return { fields: [], isPrimitive: false };\n cursor = field.properties ?? field.items?.properties ?? {};\n }\n if (!field) return { fields: [], isPrimitive: false };\n\n const itemProps = field.items?.properties ?? (field.type === 'embedded' ? field.properties : undefined);\n if (itemProps && Object.keys(itemProps).length) {\n return { fields: flattenSchemaFields(itemProps), isPrimitive: false };\n }\n // Many-relation: items are related documents — needs the related schema, so let the caller sample.\n const relType = (field.rel?.type ?? '').toString().toLowerCase();\n if (field.type === 'rel' || relType.includes('many')) return { fields: [], isPrimitive: false };\n // Otherwise a primitive-item array (string[]/number[]/…): the item is bound as its own value.\n return { fields: [], isPrimitive: true };\n}","import { ComponentNode } from '../models/component.model';\n\nconst freshId = () => Math.random().toString(36).substr(2, 9);\n\n/**\n * Assign fresh ids to a cloned ComponentNode subtree AND remap intra-subtree references to the\n * new ids. Used by every author-time clone path (duplicate, paste, block/external drop) so a copied\n * structure stays self-consistent.\n *\n * Absolute node-id references that break under duplication if left unmapped:\n * - `stateTriggers[state]` — the trigger-hover target (see style-engine.md → Targeted states)\n * - interaction `action.target` / `reverseActions.target`\n * A reference pointing OUTSIDE the cloned subtree (id not in the map) is left untouched — the copy\n * intentionally still points at the external node.\n *\n * `styleId` strategy:\n * - `'clear'` (default) — drop styleId so the clone OWNS its own CSS rule (independent copy).\n * - `'regenerate'` — keep a styleId but give it a fresh value (legacy builder.component path).\n */\nexport function regenerateNodeIds(root: ComponentNode, opts: { styleId?: 'clear' | 'regenerate' } = {}): void {\n const idMap = new Map<string, string>();\n const assign = (node: ComponentNode): void => {\n const oldId = node.id;\n node.id = freshId();\n if (opts.styleId === 'regenerate') {\n if (node.styleId) node.styleId = freshId();\n } else {\n node.styleId = undefined;\n }\n if (oldId) idMap.set(oldId, node.id);\n (node.children || []).forEach(assign);\n };\n assign(root);\n remapNodeReferences(root, idMap);\n}\n\n/** Remap absolute node-id references inside a subtree to their new ids (per `idMap`). Ids not in\n * the map (references to nodes outside the cloned subtree) are preserved. */\nexport function remapNodeReferences(node: ComponentNode, idMap: Map<string, string>): void {\n const triggers = node.stateTriggers as Record<string, string> | undefined;\n if (triggers) {\n for (const state of Object.keys(triggers)) {\n const mapped = idMap.get(triggers[state]);\n if (mapped) triggers[state] = mapped;\n }\n }\n for (const interaction of node.interactions || []) {\n const actions = [...(interaction.actions || []), ...((interaction as any).reverseActions || [])];\n for (const action of actions) {\n if (action?.target && action.target !== 'self') {\n const mapped = idMap.get(action.target);\n if (mapped) action.target = mapped;\n }\n }\n }\n (node.children || []).forEach(child => remapNodeReferences(child, idMap));\n}\n","import { ComponentNode } from './component.model';\n\n/**\n * Locate a node within a forest (array of root nodes + their descendants) by\n * reference identity. Returns the parent array holding the node and its index,\n * or `null` if the node is not present.\n *\n * Reference-based to match the rest of the builder tree operations, which pass\n * the live `ComponentNode` object around (see `findNodeInTree`).\n */\nexport function findNodeLocation(\n roots: ComponentNode[],\n target: ComponentNode,\n): { parent: ComponentNode[]; index: number } | null {\n for (let i = 0; i < roots.length; i++) {\n if (roots[i] === target) {\n return { parent: roots, index: i };\n }\n const kids = roots[i].children;\n if (kids) {\n const found = findNodeLocation(kids, target);\n if (found) return found;\n }\n }\n return null;\n}\n\n/**\n * Wrap `target` inside `wrapper`, in place, within the forest it already lives in.\n *\n * The wrapper replaces the target at its original position and takes the target\n * as its only child. **Context is preserved** — the operation never moves the\n * node between the page and global trees; the caller passes the forest the node\n * lives in (page layout OR global elements), and the surgery stays inside it.\n *\n * Global flags (`isGlobal`/`globalPosition`) are carried ONLY by the top-level\n * node of the global forest. When wrapping such a node, those flags transfer to\n * the wrapper — which becomes the new top-level global node — and are cleared on\n * the now-inner node, so the element keeps rendering in its global slot. Wrapping\n * anything else (a page node, or a child nested inside a global element) leaves\n * all global flags untouched.\n *\n * @returns the wrapper on success, or `null` if the target was not found (in\n * which case nothing is mutated).\n */\nexport function wrapNode(\n roots: ComponentNode[],\n target: ComponentNode,\n wrapper: ComponentNode,\n): ComponentNode | null {\n const loc = findNodeLocation(roots, target);\n if (!loc) return null;\n\n if (target.isGlobal) {\n wrapper.isGlobal = true;\n wrapper.globalPosition = target.globalPosition;\n target.isGlobal = false;\n target.globalPosition = undefined;\n }\n\n wrapper.children = [target];\n loc.parent.splice(loc.index, 1, wrapper);\n return wrapper;\n}\n","import { Injectable } from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\n\nexport enum PanelEventTypes {\n ELEMENT_SELECT = 'elementselect',\n ELEMENT_DESELECT = 'elementdeselect',\n PANEL_SELECTED = 'panelselect',\n PANEL_OPEN = 'panelopen',\n PANEL_CLOSE = 'panelclose',\n BINDING_CHANGED = 'bindingchanged',\n NODE_RENDERED = 'noderendered',\n /** Open the Style panel in preset-edit mode for the given preset ID. */\n PRESET_EDIT = 'presetedit',\n /** Fired after a preset is created, updated, or deleted so panels refresh their list. */\n PRESETS_CHANGED = 'presetschanged',\n /** Fired when a linked symbol instance's styles change — propagates to all instances. */\n SYMBOLS_CHANGED = 'symbolschanged',\n /** Fired on every structural or style mutation — used by BuilderHistoryService to snapshot. */\n LAYOUT_CHANGED = 'layoutchanged',\n /** Open the Interactions panel in preset-edit mode for the given preset ID. */\n INTERACTION_PRESET_EDIT = 'interactionpresetedit',\n /** Fired after an interaction preset is created, updated, or deleted so panels refresh. */\n INTERACTION_PRESETS_CHANGED = 'interactionpresetschanged',\n /** Open the Interactions panel and EXPAND a specific interaction for editing (data = interaction\n * id). Emitted when the overlay interaction badge is clicked so that badge → \"edit THIS\n * interaction\", without firing the element's (live) animation. */\n INTERACTION_EDIT = 'interactionedit',\n /** A node's `interactions` were added/removed/edited. Carries `{ node }`.\n * Repeater/Slider listen so their PREVIEW CLONES are re-cloned with the new interactions —\n * clones are attached by ELEMENT at render time, so without this a new interaction only starts\n * working after a save + reload. */\n INTERACTION_CHANGED = 'interactionchanged',\n /** CLICK-TO-INSERT (B2): a components-panel entry was clicked. Carries the same payload a drag\n * would (`string` component type, or a block / symbol object). The builder resolves WHERE from\n * the current selection — see `resolveInsertTarget`. */\n INSERT_COMPONENT = 'insertcomponent',\n}\n\nexport interface PanelEvent {\n type: PanelEventTypes;\n data: any;\n}\n\n@Injectable()\nexport class PanelEventService {\n private panelEventSubject = new Subject<PanelEvent>();\n\n subscribe(next: (panelEvent: PanelEvent) => void): Subscription {\n return this.panelEventSubject.asObservable().subscribe(next);\n }\n\n emit(type: PanelEventTypes, data?: any): void {\n this.panelEventSubject.next({ type, data });\n }\n}","import { Breakpoint } from '@vectoriox/iox-ui';\n\nexport enum PanelTypes {\n BINDINGS = 'Bindings',\n STYLES = 'Styles',\n TRAITS = 'Traits',\n PAGE = 'Page',\n INTERACTIONS = 'Interactions',\n}\n\n// ── Route animation presets ──────────────────────────────\nexport type RouteAnimationPreset =\n | 'none'\n | 'fade'\n | 'slideUp'\n | 'slideDown'\n | 'zoomIn'\n | 'zoomOut'\n | 'blurIn'\n | 'flip';\n\nexport const ROUTE_ANIMATION_OPTIONS: { label: string; value: RouteAnimationPreset; description: string }[] = [\n { value: 'none', label: 'None', description: 'No animation' },\n { value: 'fade', label: 'Fade', description: 'Opacity cross-dissolve' },\n { value: 'slideUp', label: 'Slide Up', description: 'Rise from below + fade' },\n { value: 'slideDown', label: 'Slide Down', description: 'Drop from above + fade' },\n { value: 'zoomIn', label: 'Zoom In', description: 'Scale up from 96% + fade' },\n { value: 'zoomOut', label: 'Zoom Out', description: 'Scale down from 104% + fade' },\n { value: 'blurIn', label: 'Blur', description: 'Unblur + fade' },\n { value: 'flip', label: 'Flip', description: 'Perspective tilt + fade' },\n];\n\nexport const EASING_OPTIONS: { label: string; value: string }[] = [\n // Strong symmetric in-out — the default. Slow to leave, quick through the middle, gentle to\n // settle; this is what makes a long page transition read as smooth rather than sluggish.\n { label: 'Smooth (default)', value: 'cubic-bezier(0.76, 0, 0.24, 1)' },\n { label: 'Expo Out', value: 'cubic-bezier(0.16, 1, 0.3, 1)' },\n { label: 'Ease', value: 'ease' },\n { label: 'Ease In', value: 'ease-in' },\n { label: 'Ease Out', value: 'ease-out' },\n { label: 'Ease In Out', value: 'ease-in-out' },\n { label: 'Linear', value: 'linear' },\n { label: 'Spring', value: 'cubic-bezier(0.34, 1.56, 0.64, 1)' },\n];\n\n// ── Page-level settings ──────────────────────────────────\nexport interface PageStyleSettings {\n backgroundColor: string;\n backgroundType: 'solid' | 'gradient' | 'image';\n backgroundGradient: string;\n backgroundImage: string;\n fontFamily: string;\n textColor: string;\n maxWidth: string;\n}\n\nexport interface PageScrollSettings {\n enabled: boolean;\n lerp: number;\n wheelMultiplier: number;\n touchMultiplier: number;\n direction: 'vertical' | 'horizontal';\n infinite: boolean;\n}\n\nexport interface PageRouteAnimationSettings {\n /** @deprecated legacy single-page enter preset — kept for back-compat migration to `transition`. */\n enter: RouteAnimationPreset;\n /** @deprecated legacy single-page leave preset — kept for back-compat migration to `transition`. */\n leave: RouteAnimationPreset;\n duration: number;\n easing: string;\n /**\n * Cinematic paired out/in transition preset id (see PAGE_TRANSITION_PRESETS in @vectoriox/iox-ui).\n * When set it supersedes the legacy `enter`/`leave` fields.\n */\n transition?: string;\n /** Container perspective (px) for 3D transitions. Falls back to the preset / global default. */\n perspective?: number;\n /** Panel colour for the curtain-* (overlay) presets. Defaults to the page's own background. */\n curtainColor?: string;\n}\n\n// Legacy → cinematic transition migration lives in @vectoriox/iox-ui alongside the preset catalog:\n// import { legacyEnterToTransition, effectiveTransitionId } from '@vectoriox/iox-ui';\n\nexport interface PageSettings {\n style: PageStyleSettings;\n scroll: PageScrollSettings;\n routeAnimation: PageRouteAnimationSettings;\n}\n\nexport function defaultPageSettings(): PageSettings {\n return {\n style: {\n backgroundColor: '#ffffff',\n backgroundType: 'solid',\n backgroundGradient: 'linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%)',\n backgroundImage: '',\n fontFamily: 'Poppins, sans-serif',\n textColor: '#000000',\n maxWidth: '1440px',\n },\n scroll: {\n enabled: true,\n lerp: 0.1,\n wheelMultiplier: 1,\n touchMultiplier: 1,\n direction: 'vertical',\n infinite: false,\n },\n routeAnimation: {\n enter: 'fade',\n leave: 'fade',\n // Defaults mirror DEFAULT_PAGE_TRANSITION* in @vectoriox/iox-ui: the parallax look at a\n // long duration with the smooth in-out curve.\n transition: 'parallax-up',\n duration: 1500,\n easing: 'cubic-bezier(0.76, 0, 0.24, 1)',\n },\n };\n}\n\nexport enum ToolbarAction {\n SelectParent = 'select-parent',\n Duplicate = 'duplicate',\n Delete = 'delete',\n Play = 'play',\n SaveAsBlock = 'save-as-block',\n MakeGlobal = 'make-global',\n RemoveGlobal = 'remove-global',\n EditPreset = 'edit-preset',\n DetachSymbol = 'detach-symbol',\n ResyncSymbol = 'resync-symbol',\n EditInteractionPreset = 'edit-interaction-preset',\n CopyPreset = 'copy-preset',\n PastePreset = 'paste-preset',\n CopyInteractionPreset = 'copy-interaction-preset',\n PasteInteractionPreset = 'paste-interaction-preset',\n Copy = 'copy',\n Paste = 'paste',\n AddSlide = 'add-slide',\n Wrap = 'wrap',\n /** Open the components panel to insert into / after the selection (B2 quick-add). */\n AddElement = 'add-element',\n}\n\nexport enum NodeAction {\n Delete = 'delete',\n Duplicate = 'duplicate',\n}\n\nexport enum BuilderMode {\n Select = 'select',\n Style = 'style',\n Pan = 'pan'\n}\n\n/**\n * Builder-only presentation of the shared breakpoints. The breakpoint SET — ids, max widths, labels,\n * preview widths — lives once in `@vectoriox/iox-ui` `BREAKPOINTS`; this adds only what the toolbar\n * and canvas need and the SSR engine never will: an icon and a simulated viewport height.\n * (Replaces the old DeviceMode / DEVICE_OPTIONS, which only resized the canvas and stored nothing.)\n */\nexport interface BreakpointPresentation {\n icon: string;\n /** Simulated browser viewport height in CSS px — a landscape phone is short. */\n previewHeight: number;\n /** Show the icon rotated 90°: Phosphor has no landscape-phone glyph. */\n landscape?: boolean;\n}\n\nexport const BREAKPOINT_PRESENTATION: Readonly<Record<Breakpoint, BreakpointPresentation>> = Object.freeze({\n [Breakpoint.Base]: { icon: 'ph-thin ph-desktop', previewHeight: 900 },\n [Breakpoint.Laptop]: { icon: 'ph-thin ph-laptop', previewHeight: 800 },\n [Breakpoint.Tablet]: { icon: 'ph-thin ph-device-tablet', previewHeight: 1024 },\n [Breakpoint.Mobile]: { icon: 'ph-thin ph-device-mobile', previewHeight: 320, landscape: true },\n [Breakpoint.Small]: { icon: 'ph-thin ph-device-mobile', previewHeight: 844 },\n});\n\nexport interface ZoomOption {\n label: string;\n value: number | 'fit';\n}\n\nexport const ZOOM_OPTIONS: ZoomOption[] = [\n { label: '25%', value: 25 },\n { label: '50%', value: 50 },\n { label: '75%', value: 75 },\n { label: '100%', value: 100 },\n { label: 'Fit', value: 'fit' },\n];\n\nexport interface ScreenWidthOption {\n label: string;\n width: number;\n}\n\nexport const SCREEN_WIDTH_OPTIONS: ScreenWidthOption[] = [\n { label: '1280', width: 1280 },\n { label: '1440', width: 1440 },\n { label: '1920', width: 1920 },\n { label: '2560', width: 2560 },\n];","// Virtual trait composition now lives in @vectoriox/iox-ui so the SSR engine (which does NOT depend\n// on iox-builder) can use the SAME logic — otherwise the engine emitted raw virtual keys\n// (translate-x, filter-blur…) as invalid CSS. This is a re-export passthrough to keep existing\n// iox-builder imports (`../style-compose`) working with no duplicated implementation.\nexport { composeVirtualTraits, VIRTUAL_TRAIT_KEYS } from '@vectoriox/iox-ui';\n","/**\n * node-path — pure ancestor-chain helpers for the builder's node tree.\n *\n * The builder needs a node's ancestor chain in several places: the breadcrumb bar,\n * \"select parent\", and the parent-scoped style traits (Child Layout). Each of those\n * used to re-walk the tree with its own private recursion. `nodeAncestorPath` is the\n * single walk they all derive from.\n *\n * Builder-only on purpose: the SSR engine never needs a breadcrumb, so this stays in\n * `iox-builder` rather than `@vectoriox/iox-ui` (which is the home for logic BOTH\n * renderers consume). Structural helpers the two renderers share live in\n * `@vectoriox/iox-ui` `style-compiler/tree-relations.ts`.\n */\n\n/** Minimal shape these helpers need — any node with optional children. */\nexport interface TreePathNode {\n children?: TreePathNode[] | null;\n}\n\n/**\n * The chain of nodes from a root down to (and including) `target`, matched by\n * REFERENCE identity. Returns `null` when `target` is not in the tree.\n *\n * Depth-first, pre-order; first match wins. Reference identity (not `id`) is the right\n * matcher here because the builder mutates nodes in place and repeater/slider clones\n * deliberately share a template's `styleId` — matching by id would return the template's\n * path for a clone.\n */\nexport function nodeAncestorPath<T extends TreePathNode>(\n roots: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T[] | null {\n if (!roots?.length || !target) return null;\n for (const node of roots) {\n if (node === target) return [node];\n const childPath = nodeAncestorPath(node.children as readonly T[] | undefined, target);\n if (childPath) return [node, ...childPath];\n }\n return null;\n}\n\n/**\n * The immediate parent of `target`, or `null` when it is a root node or not in the tree.\n * Derived from `nodeAncestorPath` so there is exactly one tree walk to keep correct.\n */\nexport function findParentOf<T extends TreePathNode>(\n roots: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T | null {\n const path = nodeAncestorPath(roots, target);\n return path && path.length >= 2 ? path[path.length - 2] : null;\n}\n\n/**\n * The ancestor chain across BOTH builder trees — the page layout and the global\n * elements overlay, which are separate roots. Returns the first tree that contains\n * the node, or `null` when neither does.\n */\nexport function nodeAncestorPathInEither<T extends TreePathNode>(\n layout: readonly T[] | null | undefined,\n globalElements: readonly T[] | null | undefined,\n target: T | null | undefined,\n): T[] | null {\n return nodeAncestorPath(layout, target) ?? nodeAncestorPath(globalElements, target);\n}\n","import { Breakpoint, BREAKPOINTS, countOverrides, ResponsiveOverrides } from '@vectoriox/iox-ui';\n\n/** Override counts per breakpoint — what the breakpoint bar's dots show. Base is never present. */\nexport type BreakpointCounts = Partial<Record<Breakpoint, number>>;\n\ninterface CountableNode {\n responsive?: ResponsiveOverrides;\n children?: CountableNode[] | null;\n}\n\n/** Counts for ONE node (the selection). Breakpoints with nothing overridden are omitted. */\nexport function nodeBreakpointCounts(node: CountableNode | null | undefined): BreakpointCounts {\n const counts: BreakpointCounts = {};\n if (!node?.responsive) return counts;\n for (const { id } of BREAKPOINTS) {\n if (id === Breakpoint.Base) continue;\n const n = countOverrides(node.responsive, id);\n if (n) counts[id] = n;\n }\n return counts;\n}\n\n/** Counts summed over whole trees (the page, when nothing is selected). */\nexport function treeBreakpointCounts(...roots: Array<readonly CountableNode[] | null | undefined>): BreakpointCounts {\n const counts: BreakpointCounts = {};\n const visit = (nodes: readonly CountableNode[] | null | undefined) => {\n for (const node of nodes ?? []) {\n for (const [bp, n] of Object.entries(nodeBreakpointCounts(node)) as [Breakpoint, number][]) {\n counts[bp] = (counts[bp] ?? 0) + n;\n }\n visit(node.children);\n }\n };\n roots.forEach(visit);\n return counts;\n}\n","import { nodeAncestorPath, TreePathNode } from './node-path.util';\n\n/** Where a click-inserted element lands: the array it goes into and the index within it. */\nexport interface InsertTarget<T> {\n /** The live children array to splice into (a container's `children`, or the page root). */\n children: T[];\n index: number;\n /** The node that owns `children`, or `null` for the page root. */\n parent: T | null;\n}\n\n/**\n * Resolve where \"click to insert\" puts a new element, from the current selection — the rule the\n * components panel and the canvas \"+\" share (builder-usability-plan.md, B2):\n *\n * nothing selected → appended to the page root\n * a CONTAINER selected → appended INSIDE it (its last child)\n * a LEAF selected → inserted AFTER it, as its next sibling\n *\n * `isContainer` decides what can hold children — the builder passes \"has a registered drop zone\",\n * the same test a drag uses, so a click can never insert somewhere a drop couldn't.\n * A selection not found in `roots` (stale) falls back to appending to the root.\n */\nexport function resolveInsertTarget<T extends TreePathNode & { children?: T[] | null }>(\n roots: T[],\n selected: T | null | undefined,\n isContainer: (node: T) => boolean,\n): InsertTarget<T> {\n const append = (children: T[], parent: T | null): InsertTarget<T> => ({ children, index: children.length, parent });\n if (!selected) return append(roots, null);\n\n const path = nodeAncestorPath(roots, selected);\n if (!path) return append(roots, null);\n\n if (isContainer(selected)) {\n if (!selected.children) selected.children = [];\n return append(selected.children, selected);\n }\n\n const parent = path.length >= 2 ? path[path.length - 2] : null;\n const siblings = parent ? (parent.children ?? (parent.children = [])) : roots;\n return { children: siblings, index: siblings.indexOf(selected) + 1, parent };\n}\n","import { ComponentNode } from '../models/component.model';\n\n/** The node type that scopes a form. Kept here so the rule has one name, not a scattered literal. */\nexport const FORM_TYPE = 'Form';\n\n/**\n * The form the current selection belongs to — the NEAREST Form ancestor, or the selection itself\n * when a Form is selected.\n *\n * This is the selection-side expression of decision D1: a field belongs to its nearest ancestor\n * form. Searching the path from the deepest node outward is what makes \"nearest\" true, and it is\n * why a nested form (were one ever allowed) could not capture an outer form's toolbar.\n *\n * @param path Ancestor chain from the root down to the selected node, as `selectedPath` holds it.\n */\nexport function nearestFormNode(path: readonly ComponentNode[] | null | undefined): ComponentNode | null {\n if (!path?.length) return null;\n for (let i = path.length - 1; i >= 0; i--) {\n if (path[i]?.type === FORM_TYPE) return path[i];\n }\n return null;\n}\n","/**\n * STRUCTURE OPS (A4) — the one-click layout changes people actually make at a narrow width, as pure\n * \"what to write\" functions. Each returns a flat style map the caller stores in the node's\n * `responsive[bp]` layer (or in the base styles at Base) through the shared `setOverride`.\n *\n * All of it is ordinary CSS the SSR engine already renders — there is no second tree and no\n * per-width HTML. See responsive-breakpoints-plan.md (D5).\n */\n\nexport type StyleMap = Record<string, any>;\n\n/** CSS lengths that are a FIXED pixel size — the ones that stop a layout fitting a phone. */\nconst PX_LENGTH = /^-?\\d+(\\.\\d+)?px$/i;\n\n/**\n * Hide / show at a width. Hiding is `display: none` INSIDE that breakpoint's rules — the node stays\n * in the DOM and in the SSR output (one HTML document serves every width), so hidden content still\n * ships bytes and is still indexed. Showing again clears the override rather than guessing a value.\n *\n * @returns the props to write, or `null` meaning \"clear the display override at this breakpoint\".\n */\nexport function visibilityProps(hidden: boolean): StyleMap | null {\n return hidden ? { display: 'none' } : null;\n}\n\n/** True when this node is hidden by the resolved styles at some width. */\nexport function isHiddenAt(resolvedStyleProps: StyleMap | null | undefined): boolean {\n return String(resolvedStyleProps?.['display'] ?? '') === 'none';\n}\n\n/**\n * Stack a container's children in one column — the most common mobile edit, and four separate\n * controls today (display, direction, wrap, columns). A grid becomes a single-column grid; anything\n * else becomes a column flex box.\n */\nexport function stackChildrenProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap {\n const display = String(resolvedStyleProps?.['display'] ?? '');\n if (display === 'grid' || display === 'inline-grid') {\n return { gridTemplateColumns: 'repeat(1, minmax(0, 1fr))' };\n }\n return { display: 'flex', flexDirection: 'column', flexWrap: 'nowrap' };\n}\n\n/**\n * Collapse a grid to `count` columns (a flex row is stacked instead — it has no column track).\n * `count` is clamped to at least 1.\n */\nexport function collapseColumnsProps(resolvedStyleProps: StyleMap | null | undefined, count: number): StyleMap {\n const columns = Math.max(1, Math.floor(count));\n const display = String(resolvedStyleProps?.['display'] ?? '');\n if (display === 'grid' || display === 'inline-grid') {\n return { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` };\n }\n return columns === 1 ? stackChildrenProps(resolvedStyleProps) : { flexWrap: 'wrap' };\n}\n\n/** How many equal columns a `repeat(N, …)` track list describes, or null when it isn't one. */\nexport function columnCountOf(resolvedStyleProps: StyleMap | null | undefined): number | null {\n const match = /^repeat\\(\\s*(\\d+)\\s*,/.exec(String(resolvedStyleProps?.['gridTemplateColumns'] ?? ''));\n return match ? Number(match[1]) : null;\n}\n\n/**\n * Make fixed pixel sizes fluid: `width: 520px` → `width: 100%` with the original kept as\n * `max-width`, so the element still never exceeds its designed size on a wide screen. `minWidth` in\n * px is dropped to 0 — it is what actually forces horizontal scrolling on a phone.\n *\n * @returns the props to write; EMPTY when there is nothing fixed to fluidise.\n */\nexport function fluidiseProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap {\n const out: StyleMap = {};\n const width = String(resolvedStyleProps?.['width'] ?? '');\n const minWidth = String(resolvedStyleProps?.['minWidth'] ?? '');\n if (PX_LENGTH.test(width)) {\n out['width'] = '100%';\n const maxWidth = String(resolvedStyleProps?.['maxWidth'] ?? '');\n if (!maxWidth || maxWidth === 'none') out['maxWidth'] = width;\n }\n if (PX_LENGTH.test(minWidth) && parseFloat(minWidth) > 0) out['minWidth'] = '0px';\n return out;\n}\n\n/** True when `fluidiseProps` would change anything — drives the button's disabled state. */\nexport function canFluidise(resolvedStyleProps: StyleMap | null | undefined): boolean {\n return Object.keys(fluidiseProps(resolvedStyleProps)).length > 0;\n}\n\n/**\n * Reorder children AT ONE WIDTH using CSS `order`, leaving the tree — and so the DOM and\n * screen-reader order — untouched. Returns one value per child BY CHILD INDEX: the `order` it must\n * take, or `null` for \"no override needed\".\n *\n * Either every child gets an explicit `order` or none does: CSS defaults `order` to 0, so a partial\n * set would mix overridden children with unordered ones and read as an arbitrary interleave.\n *\n * @param count How many children there are.\n * @param from Index of the child being moved.\n * @param to Index it should occupy.\n */\nexport function reorderProps(count: number, from: number, to: number): Array<number | null> {\n const none = Array.from({ length: Math.max(0, count) }, () => null);\n if (from < 0 || from >= count || to < 0 || to >= count || from === to) return none;\n\n // Visual order after the move, as a list of CHILD indices.\n const sequence = Array.from({ length: count }, (_, i) => i);\n sequence.splice(to, 0, ...sequence.splice(from, 1));\n\n const orderByChild: Array<number | null> = none.slice();\n sequence.forEach((childIndex, position) => { orderByChild[childIndex] = position; });\n return orderByChild;\n}\n","import { canFluidise, fluidiseProps, StyleMap } from './structure-ops.util';\n\n/**\n * RESPONSIVE AUDIT (A5) — find what is broken at a width, from the node tree plus ONE measurement\n * pass. A builder that lets you author five widths must also tell you which of them are broken.\n *\n * Pure: the caller measures (one `getBoundingClientRect` per node, off the animation path) and\n * passes the numbers in. Every finding that can be repaired carries the exact props to write, so a\n * fix is one `setOverride` per key — one undo step, and it shows as an ordinary override.\n */\n\nexport enum AuditCode {\n Overflow = 'overflow',\n FixedWidth = 'fixed-width',\n TapTarget = 'tap-target',\n TinyText = 'tiny-text',\n UnboundedImage = 'unbounded-image',\n /** A slider showing more slides than the width can carry — each one unreadably narrow. */\n SlidesOverflow = 'slides-overflow',\n /** An out-of-flow node whose box lands outside the frame, so it is unreachable at this width. */\n OffscreenAbsolute = 'offscreen-absolute',\n}\n\nexport enum AuditSeverity {\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n}\n\n/** One node, resolved at the width being audited. */\nexport interface AuditNode {\n id: string;\n type: string;\n label?: string;\n /** Styles RESOLVED at this breakpoint (base + every wider layer + this one). */\n styleProps: StyleMap;\n /** Component TRAITS resolved at this breakpoint — the per-width values a media query cannot\n * express (a slider's `slidesPerView`). Absent for nodes with no traits worth auditing. */\n inputs?: Record<string, any>;\n /** Laid-out size in CSS px at this width. */\n width: number;\n height: number;\n /** Laid-out position in CSS px, relative to the canvas frame. Absent when not measured. */\n left?: number;\n top?: number;\n}\n\nexport interface AuditFinding {\n nodeId: string;\n nodeName: string;\n code: AuditCode;\n severity: AuditSeverity;\n /** Human summary — the builder library is English-only, like the rest of its chrome. */\n message: string;\n /** Props to write into this breakpoint's layer to repair it; absent when no safe auto-fix. */\n fix?: StyleMap;\n /** TRAIT values to write into this breakpoint's layer — some failures are not fixable with CSS.\n * Applied through `setInputOverride`, the trait twin of `setOverride`. */\n inputFix?: Record<string, any>;\n}\n\n/** WCAG 2.5.8 minimum target size. */\nconst MIN_TAP_PX = 44;\n/** Below this, iOS Safari zooms the page when an adjacent input is focused. */\nconst MIN_TEXT_PX = 12;\n/** Types a visitor taps. */\nconst TAPPABLE = new Set(['Button', 'ButtonBlock', 'Link', 'LinkedContainer']);\n/** Narrower than this, a slide shows too little of its content to be worth showing at all. */\nconst MIN_SLIDE_PX = 200;\n/** Out-of-flow positioning that can put a node outside the frame. */\nconst OUT_OF_FLOW = new Set(['absolute', 'fixed']);\n\nconst nameOf = (node: AuditNode) => node.label || node.type;\nconst pxOf = (value: unknown): number | null => {\n const match = /^(-?\\d+(?:\\.\\d+)?)px$/i.exec(String(value ?? ''));\n return match ? Number(match[1]) : null;\n};\n\n/**\n * Audit nodes laid out at `viewportWidth`. Returns findings ordered by severity (errors first),\n * then by the order the nodes were given — so the worst thing is at the top of the list.\n */\nexport function auditNodes(nodes: readonly AuditNode[], viewportWidth: number): AuditFinding[] {\n const findings: AuditFinding[] = [];\n\n for (const node of nodes) {\n const name = nameOf(node);\n const styles = node.styleProps ?? {};\n if (String(styles['display'] ?? '') === 'none') continue; // hidden here — nothing to report\n\n // 1. Wider than the viewport: the page scrolls sideways.\n if (node.width > viewportWidth + 0.5) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.Overflow, severity: AuditSeverity.Error,\n message: `${name} is ${Math.round(node.width)}px wide in a ${viewportWidth}px viewport — the page scrolls sideways.`,\n fix: canFluidise(styles) ? fluidiseProps(styles) : { maxWidth: '100%' },\n });\n } else if (canFluidise(styles)) {\n // 2. A fixed px size that still fits, but will not on a narrower phone.\n const width = pxOf(styles['width']);\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.FixedWidth, severity: AuditSeverity.Warning,\n message: width !== null\n ? `${name} has a fixed width of ${width}px — it cannot shrink on a narrower screen.`\n : `${name} has a fixed minimum width — it forces sideways scrolling below that size.`,\n fix: fluidiseProps(styles),\n });\n }\n\n // 3. Tap targets below the WCAG minimum.\n if (TAPPABLE.has(node.type) && node.width > 0 && node.height > 0\n && (node.width < MIN_TAP_PX || node.height < MIN_TAP_PX)) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.TapTarget, severity: AuditSeverity.Warning,\n message: `${name} is ${Math.round(node.width)}×${Math.round(node.height)}px — below the ${MIN_TAP_PX}px minimum tap target.`,\n fix: { minHeight: `${MIN_TAP_PX}px`, minWidth: `${MIN_TAP_PX}px` },\n });\n }\n\n // 4. Text too small to read (and small enough to trigger iOS zoom).\n const fontSize = pxOf(styles['fontSize']);\n if (fontSize !== null && fontSize < MIN_TEXT_PX) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.TinyText, severity: AuditSeverity.Warning,\n message: `${name} renders at ${fontSize}px — under the ${MIN_TEXT_PX}px readable minimum.`,\n fix: { fontSize: `${MIN_TEXT_PX}px` },\n });\n }\n\n // 5. An image with a fixed height and no ratio crops unpredictably as the width changes.\n if (node.type === 'Image' && pxOf(styles['height']) !== null\n && !String(styles['aspectRatio'] ?? '').trim().replace(/^auto$/, '')) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.UnboundedImage, severity: AuditSeverity.Info,\n message: `${name} has a fixed height and no aspect ratio — it crops unpredictably as the width changes.`,\n fix: { height: 'auto', aspectRatio: '16 / 9' },\n });\n }\n\n // 6. A slider showing more slides than this width can carry. NOT a CSS problem: slide count\n // is a component trait, so the fix is a per-breakpoint TRAIT override (P3-G1), not a style.\n if (node.type === 'SliderContainer' && node.width > 0) {\n const perView = Number(node.inputs?.['slidesPerView']);\n if (Number.isFinite(perView) && perView > 1) {\n const slideWidth = node.width / perView;\n if (slideWidth < MIN_SLIDE_PX) {\n const fits = Math.max(1, Math.floor(node.width / MIN_SLIDE_PX));\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.SlidesOverflow, severity: AuditSeverity.Warning,\n message: `${name} shows ${perView} slides across ${Math.round(node.width)}px — ${Math.round(slideWidth)}px each. Show ${fits} at this width.`,\n inputFix: { slidesPerView: fits },\n });\n }\n }\n }\n\n // 7. An out-of-flow node that has left the frame. Measured, not inferred: a negative offset\n // is legitimate design until it actually puts the content beyond the edge.\n if (OUT_OF_FLOW.has(String(styles['position'] ?? '')) && node.left !== undefined && node.width > 0) {\n const right = node.left + node.width;\n const offLeft = right <= 0.5;\n const offRight = node.left >= viewportWidth - 0.5;\n if (offLeft || offRight) {\n findings.push({\n nodeId: node.id, nodeName: name, code: AuditCode.OffscreenAbsolute, severity: AuditSeverity.Error,\n message: `${name} is positioned ${offLeft ? 'left of' : 'beyond'} the ${viewportWidth}px viewport — it cannot be seen or tapped at this width.`,\n // No blind auto-fix: the author's intent (a decorative overflow vs a mistake)\n // is not knowable from geometry. Selecting the node is the useful action.\n });\n }\n }\n }\n\n const rank = { [AuditSeverity.Error]: 0, [AuditSeverity.Warning]: 1, [AuditSeverity.Info]: 2 };\n return findings\n .map((finding, index) => ({ finding, index }))\n .sort((a, b) => rank[a.finding.severity] - rank[b.finding.severity] || a.index - b.index)\n .map(entry => entry.finding);\n}\n\n/** Counts per severity — the per-breakpoint summary strip. */\nexport function summarise(findings: readonly AuditFinding[]): Record<AuditSeverity, number> {\n const out = { [AuditSeverity.Error]: 0, [AuditSeverity.Warning]: 0, [AuditSeverity.Info]: 0 };\n for (const finding of findings) out[finding.severity]++;\n return out;\n}\n","import { ComponentNode } from './component.model';\nimport { Breakpoint, ResponsiveOverrides, setOverride } from '@vectoriox/iox-ui';\n\n/**\n * LAYOUT PRESETS (B4) — the structures people build over and over, as one insert that is ALREADY\n * responsive. A preset is a container plus children (Webflow's Quick Stack idea), not a new\n * component type: what it inserts is ordinary nodes you can edit or take apart afterwards.\n *\n * The point is the `responsive` layers: a beginner gets a working phone layout without knowing what\n * a breakpoint is, and an expert gets the boring part typed for them.\n */\n\nexport interface LayoutPresetChildStyles {\n [prop: string]: string;\n}\n\nexport interface LayoutPresetDef {\n id: string;\n name: string;\n icon: string;\n /** One line in the panel — what it is and what it does when it gets narrow. */\n description: string;\n /** Styles for the container itself, at base. */\n container: LayoutPresetChildStyles;\n /** Per-breakpoint container overrides — this is what makes the preset responsive. */\n containerResponsive?: Partial<Record<Breakpoint, LayoutPresetChildStyles>>;\n /** How many child containers to create. */\n childCount: number;\n /** Styles applied to every child at base. */\n child?: LayoutPresetChildStyles;\n /** Per-child, per-breakpoint overrides, by child index (e.g. reordering a split hero). */\n childResponsive?: Array<Partial<Record<Breakpoint, LayoutPresetChildStyles>>>;\n}\n\nconst GRID = (columns: string) => ({ display: 'grid', gridTemplateColumns: columns, gap: '24px', width: '100%' });\nconst ONE_COLUMN = { gridTemplateColumns: 'repeat(1, minmax(0, 1fr))' };\n\nexport const LAYOUT_PRESETS: readonly LayoutPresetDef[] = Object.freeze([\n {\n id: 'stack', name: 'Stack', icon: 'ph-thin ph-rows',\n description: 'Vertical flow with even spacing.',\n container: { display: 'flex', flexDirection: 'column', gap: '24px', width: '100%' },\n childCount: 2,\n },\n {\n id: 'two-columns', name: 'Two columns', icon: 'ph-thin ph-columns',\n description: 'Side by side; stacks on a phone.',\n container: GRID('repeat(2, minmax(0, 1fr))'),\n containerResponsive: { [Breakpoint.Small]: ONE_COLUMN },\n childCount: 2,\n },\n {\n id: 'three-columns', name: 'Three columns', icon: 'ph-thin ph-columns',\n description: 'Three across; two on a tablet, one on a phone.',\n container: GRID('repeat(3, minmax(0, 1fr))'),\n containerResponsive: {\n [Breakpoint.Tablet]: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' },\n [Breakpoint.Small]: ONE_COLUMN,\n },\n childCount: 3,\n },\n {\n id: 'sidebar-main', name: 'Sidebar + main', icon: 'ph-thin ph-layout',\n description: 'Fixed sidebar beside flexible content; the sidebar drops under it on a tablet.',\n container: GRID('280px minmax(0, 1fr)'),\n containerResponsive: { [Breakpoint.Tablet]: ONE_COLUMN },\n childCount: 2,\n },\n {\n id: 'card-grid', name: 'Card grid', icon: 'ph-thin ph-squares-four',\n description: 'A grid of cards: three, then two, then one.',\n container: GRID('repeat(3, minmax(0, 1fr))'),\n containerResponsive: {\n [Breakpoint.Tablet]: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' },\n [Breakpoint.Small]: ONE_COLUMN,\n },\n childCount: 6,\n child: { minHeight: '160px' },\n },\n {\n id: 'split-hero', name: 'Split hero', icon: 'ph-thin ph-square-split-horizontal',\n description: 'Text beside media; on a phone the media moves above the text.',\n container: GRID('minmax(0, 1.2fr) minmax(0, 1fr)'),\n containerResponsive: { [Breakpoint.Small]: ONE_COLUMN },\n childCount: 2,\n // On a phone the MEDIA (child 2) leads — CSS order only, the DOM order never changes.\n childResponsive: [{ [Breakpoint.Small]: { order: '1' } }, { [Breakpoint.Small]: { order: '0' } }],\n },\n]);\n\n/** Set a style trait's value on a node built from a component config. */\nexport function setStyleTrait(node: ComponentNode, name: string, value: any): void {\n for (const group of node.styleTraits ?? []) {\n const trait = group.traits.find(t => t.name === name);\n if (trait) { trait.default = value; return; }\n }\n}\n\nfunction applyResponsive(node: ComponentNode, layers: Partial<Record<Breakpoint, LayoutPresetChildStyles>> | undefined): void {\n if (!layers) return;\n let responsive: ResponsiveOverrides | undefined = node.responsive;\n for (const [bp, styles] of Object.entries(layers)) {\n for (const [prop, value] of Object.entries(styles ?? {})) {\n responsive = setOverride(responsive, bp as Breakpoint, prop, value);\n }\n }\n node.responsive = responsive;\n}\n\n/**\n * Build a preset's node tree. `createNode` makes an empty node of a type (the component registry in\n * the builder) — passed in so this stays pure and testable.\n *\n * @returns the container node, or `null` when the container type can't be created.\n */\nexport function buildLayoutPreset(\n def: LayoutPresetDef,\n createNode: (type: string) => ComponentNode | null,\n): ComponentNode | null {\n const container = createNode('Container');\n if (!container) return null;\n for (const [prop, value] of Object.entries(def.container)) setStyleTrait(container, prop, value);\n applyResponsive(container, def.containerResponsive);\n\n const children: ComponentNode[] = [];\n for (let i = 0; i < def.childCount; i++) {\n const child = createNode('Container');\n if (!child) continue;\n for (const [prop, value] of Object.entries(def.child ?? {})) setStyleTrait(child, prop, value);\n applyResponsive(child, def.childResponsive?.[i]);\n children.push(child);\n }\n container.children = children;\n return container;\n}\n","import { Injectable, Type } from '@angular/core';\n\n@Injectable()\nexport class ComponentRegistryService {\n private components: Record<string, { type: string; component: Type<any>; config: any }> = {};\n\n getComponent(type: string): Type<any> | null {\n return this.components[type]?.component ?? null;\n }\n\n hasComponent(type: string): boolean {\n return !!this.components[type];\n }\n\n createConfig(type: string): any | null {\n const configType = this.components[type]?.config;\n return configType ? new configType() : null;\n }\n\n register(type: string, component: Type<any>, config: any): void {\n this.components[type] = { type, component, config };\n }\n\n getAll() {\n return Object.values(this.components);\n }\n}","import { ComponentRef, Injectable } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { ComponentNode } from '../models/component.model';\nimport { BuilderMode, ToolbarAction } from '../panels/panel.model';\n\nexport interface OverlayBoxSpacing {\n top: number; right: number; bottom: number; left: number;\n}\n\nexport interface OverlayBoxModel {\n margin: OverlayBoxSpacing;\n padding: OverlayBoxSpacing;\n border: OverlayBoxSpacing;\n}\n\nexport interface OverlayEntry {\n element: HTMLElement;\n componentName: string;\n boxModel?: OverlayBoxModel; // populated for hover only\n mode: BuilderMode;\n node?: ComponentNode;\n componentRef?: ComponentRef<any>;\n}\n\nexport { ToolbarAction } from '../panels/panel.model';\n\nexport interface NodeRef {\n element: HTMLElement;\n componentRef: ComponentRef<any>;\n}\n\n@Injectable()\nexport class OverlayService {\n private hoverSubject = new BehaviorSubject<OverlayEntry | null>(null);\n private selectSubject = new BehaviorSubject<OverlayEntry | null>(null);\n private nodeMap = new Map<ComponentNode, NodeRef>();\n\n public hover$ = this.hoverSubject.asObservable();\n public select$ = this.selectSubject.asObservable();\n\n private containerElement: HTMLElement | null = null;\n private scrollContainerElement: HTMLElement | null = null;\n private intersectionRootElement: HTMLElement | null = null;\n\n /** Emits the scroll container element whenever it is registered. */\n public scrollContainer$ = new Subject<HTMLElement>();\n\n /** Emits cursor coords when a canvas element is right-clicked. */\n public contextMenu$ = new Subject<{ x: number; y: number }>();\n\n triggerContextMenu(x: number, y: number): void {\n this.contextMenu$.next({ x, y });\n }\n\n setContainer(container: HTMLElement | null): void {\n this.containerElement = container;\n }\n\n getContainer(): HTMLElement | null {\n return this.containerElement;\n }\n\n setScrollContainer(el: HTMLElement | null): void {\n this.scrollContainerElement = el;\n if (el) { this.scrollContainer$.next(el); }\n }\n\n getScrollContainer(): HTMLElement | null {\n return this.scrollContainerElement;\n }\n\n /** The clipping container used as IntersectionObserver root in builder mode (.preview-scroll). */\n setIntersectionRoot(el: HTMLElement | null): void {\n this.intersectionRootElement = el;\n }\n\n getIntersectionRoot(): HTMLElement | null {\n return this.intersectionRootElement;\n }\n\n /**\n * Resolve the styled element (the one carrying `.iox-node-{id}` — where padding/margin/size live).\n * Directive-host components (Image/Heading/Container/Section/…) put `iox-node-{id}` on the HOST\n * itself, so the host IS the styled element. Legacy wrapper components (Card/Repeater/Slider) put\n * it on the first child. Prefer the host when it's the styled element; fall back to the first\n * child otherwise. (Before this, directive-host containers outlined their first child — e.g. a\n * container's outline landed on the image inside it, desyncing from Moveable's resize handles.)\n */\n getStyledElement(host: HTMLElement): HTMLElement {\n for (let i = 0; i < host.classList.length; i++) {\n if (host.classList[i].startsWith('iox-node-')) return host;\n }\n return (host.firstElementChild as HTMLElement) || host;\n }\n\n // ── Node → Element registry ──────────────────────────────\n registerNode(node: ComponentNode, element: HTMLElement, componentRef: ComponentRef<any>): void {\n this.nodeMap.set(node, { element, componentRef });\n }\n\n unregisterNode(node: ComponentNode): void {\n this.nodeMap.delete(node);\n }\n\n getNodeRef(node: ComponentNode): NodeRef | undefined {\n return this.nodeMap.get(node);\n }\n\n /** Return all registered node → ref entries. */\n getAllNodeEntries(): IterableIterator<[ComponentNode, NodeRef]> {\n return this.nodeMap.entries();\n }\n\n /** Find a registered node whose host element matches the given DOM element. */\n findNodeByElement(element: HTMLElement): { node: ComponentNode; ref: NodeRef } | undefined {\n for (const [node, ref] of this.nodeMap) {\n if (ref.element === element) {\n return { node, ref };\n }\n }\n return undefined;\n }\n\n /**\n * Walk up the DOM from a node's registered host element to the nearest ANCESTOR\n * element that is itself a registered node. Used to resolve the immediate parent\n * for relational style states (e.g. parent-hover). Returns undefined for root nodes.\n */\n getParentEntry(node: ComponentNode): { node: ComponentNode; ref: NodeRef } | undefined {\n const ref = this.nodeMap.get(node);\n if (!ref) return undefined;\n let el = ref.element.parentElement;\n while (el) {\n const match = this.findNodeByElement(el);\n if (match) return match;\n el = el.parentElement;\n }\n return undefined;\n }\n\n setHover(element: HTMLElement, componentName: string, mode: BuilderMode): void {\n if (this.selectSubject.getValue()?.element === element) return;\n this.hoverSubject.next({ element, componentName, boxModel: this.buildBoxModel(element), mode });\n }\n\n clearHover(): void {\n this.hoverSubject.next(null);\n }\n\n /** Current selection snapshot (null if nothing is selected). */\n getCurrentSelection(): OverlayEntry | null {\n return this.selectSubject.getValue();\n }\n\n setSelect(element: HTMLElement, componentName: string, mode: BuilderMode, node?: ComponentNode, componentRef?: ComponentRef<any>): void {\n this.hoverSubject.next(null);\n this.selectSubject.next({ element, componentName, mode, node, componentRef });\n }\n\n clearSelect(): void {\n this.selectSubject.next(null);\n }\n\n refreshSelect(): void {\n const current = this.selectSubject.getValue();\n if (!current) return;\n this.selectSubject.next({ ...current });\n }\n\n /** Lightweight swap for drag-preview tracking. */\n updateSelectElement(element: HTMLElement): void {\n const current = this.selectSubject.getValue();\n if (!current) return;\n this.selectSubject.next({ ...current, element });\n }\n\n buildBoxModel(host: HTMLElement): OverlayBoxModel {\n const inner = this.getStyledElement(host);\n // Margin lives on the wrapper div (host.parentElement) — iox-outer-{id} is\n // applied there so it participates in the parent flex layout.\n const wrapper = (host.parentElement as HTMLElement) || host;\n const si = window.getComputedStyle(inner);\n const sw = window.getComputedStyle(wrapper);\n const px = (v: string) => { const n = Number.parseFloat(v); return Number.isFinite(n) ? n : 0; };\n return {\n margin: { top: px(sw.marginTop), right: px(sw.marginRight), bottom: px(sw.marginBottom), left: px(sw.marginLeft) },\n padding: { top: px(si.paddingTop), right: px(si.paddingRight), bottom: px(si.paddingBottom), left: px(si.paddingLeft) },\n border: { top: px(si.borderTopWidth), right: px(si.borderRightWidth), bottom: px(si.borderBottomWidth), left: px(si.borderLeftWidth) },\n };\n }\n\n}","/**\n * The text on the drop indicator's chip — \"into Card grid · position 2 of 3\" (B2).\n *\n * The most common drag failure is landing a node one level off and not noticing; naming the PARENT\n * and the slot makes the target unambiguous before the pointer is released.\n *\n * @param containerName The target container's label or type; blank / unknown → \"the page\".\n * @param index Insert index within the container (0-based).\n * @param childCount How many children it has now — the node being dropped makes `childCount + 1`.\n */\nexport function dropTargetLabel(containerName: string | null | undefined, index: number, childCount: number): string {\n const name = (containerName ?? '').trim() || 'the page';\n const total = Math.max(0, childCount) + 1;\n const position = Math.min(Math.max(index, 0), total - 1) + 1;\n return `into ${name} · position ${position} of ${total}`;\n}\n","/**\n * Per-frame exponential smoothing step — moves `current` a fraction of the way\n * toward `target`. Used to ease the drag ghost toward the pointer instead of\n * snapping to it 1:1 on every dragmove (see DragEngineService._ghostFollowStep).\n */\nexport function easeToward(current: number, target: number, smoothing: number): number {\n return current + (target - current) * smoothing;\n}\n","/**\n * Decides which element a drag gesture should actually operate on.\n *\n * A drag must never silently descend into a nested child just because the pointer happened to\n * be over it while its ANCESTOR is the currently selected node, and the overlay's drag-handle\n * (which carries no node of its own — it lives outside the canvas DOM entirely) must always\n * redirect to whatever is currently selected. In both cases the redirect target is the\n * currently-selected element; otherwise the gesture proceeds on its natural origin unchanged.\n */\nexport function resolveDragTarget(\n el: HTMLElement,\n selectedElement: HTMLElement | null,\n isDragHandle: boolean,\n): HTMLElement {\n if (!selectedElement || el === selectedElement) return el;\n const isDescendantOfSelected = selectedElement.contains(el);\n return (isDragHandle || isDescendantOfSelected) ? selectedElement : el;\n}\n","import { Injectable } from '@angular/core';\n\nimport { IoxSymbol } from '../models/component.model';\n\n/**\n * SymbolRegistryService — in-memory store for org-level symbols.\n *\n * Loaded once per page by PageUiComponent alongside the page layout.\n * Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.\n */\n@Injectable()\nexport class SymbolRegistryService {\n private symbols = new Map<string, IoxSymbol>();\n /** symbolIds that have a live reusable block in the DB — used to guard isDetachedSymbol. */\n private blockSymbolIds = new Set<string>();\n\n setSymbols(symbols: IoxSymbol[]): void {\n this.symbols.clear();\n for (const s of symbols) {\n this.symbols.set(s.id, s);\n }\n }\n\n getSymbol(id: string): IoxSymbol | undefined {\n return this.symbols.get(id);\n }\n\n getAll(): IoxSymbol[] {\n return Array.from(this.symbols.values());\n }\n\n upsert(symbol: IoxSymbol): void {\n this.symbols.set(symbol.id, symbol);\n }\n\n remove(id: string): void {\n this.symbols.delete(id);\n }\n\n /** Set the symbolIds that have a live reusable block. Called on page load. */\n setBlockSymbolIds(ids: Set<string>): void {\n this.blockSymbolIds = new Set(ids);\n }\n\n /** Returns true only when the symbol has a live backing reusable block. */\n isBlockSymbol(id: string): boolean {\n return this.blockSymbolIds.has(id);\n }\n\n /** Remove a symbolId from the block-backed set (called when a block is deleted). */\n removeBlockSymbolId(id: string): void {\n this.blockSymbolIds.delete(id);\n }\n}\n","import { ChangeDetectorRef, Injectable } from '@angular/core';\nimport interact from 'interactjs';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { ComponentNode } from '../models/component.model';\nimport { regenerateNodeIds } from '../utils/clone-ids.util';\nimport { dropTargetLabel } from '../utils/drop-label.util';\nimport { easeToward } from '../utils/spring-motion.util';\nimport { resolveDragTarget } from '../utils/drag-redirect.util';\nimport { ComponentRegistryService } from './component-registry.service';\nimport { SymbolRegistryService } from './symbol-registry.service';\nimport { OverlayService } from '../overlay/overlay.service';\n\n/** Marks the overlay's dedicated drag-handle chrome (see overlay.component.html) — it carries no\n * node of its own, so a drag started on it always redirects to whatever is currently selected. */\nexport const DRAG_HANDLE_ATTR = 'data-iox-drag-handle';\n\nexport interface DragPayload {\n type: 'internal' | 'external';\n data: ComponentNode | string;\n sourceId: string | null;\n sourceIndex: number;\n}\n\nexport interface IoxDropEvent {\n payload: DragPayload;\n targetId: string;\n insertIndex: number;\n}\n\n// Ease-out-quint — fast start, precise stop, no overshoot. Used for FLIP sibling\n// reflow and the insertion indicator open/close. Deliberately NOT a spring/back\n// curve (e.g. cubic-bezier(0.34,1.56,0.64,1)): multiple siblings animating with\n// overshoot at once reads as jitter, not polish — reserve overshoot for single-\n// element motion (ghost drop-settle, a later phase).\nconst MOTION_EASE = 'cubic-bezier(0.22, 1, 0.36, 1)';\n\n// Per-frame exponential smoothing factor for the drag ghost's cursor-follow.\n// Was: ghost position set 1:1 to the pointer every dragmove (rigid/teleporty).\n// Lower = more lag/weight, higher = snappier. 0.35 catches up to the pointer\n// within ~5-6 frames (~80-100ms) — reads as \"responsive but weighted\".\nconst GHOST_FOLLOW_SMOOTHING = 0.35;\n\nfunction deepCloneNode(node: ComponentNode): ComponentNode {\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n // Fresh ids + remap intra-subtree references (stateTriggers, interaction targets) so a cloned\n // structure stays self-consistent — e.g. trigger-hover keeps pointing at the clone's own trigger.\n regenerateNodeIds(clone);\n return clone;\n}\n\n@Injectable()\nexport class DragEngineService {\n\n constructor(\n private registry: ComponentRegistryService,\n private symbolRegistry: SymbolRegistryService,\n private overlayService: OverlayService,\n ) {}\n\n // ── Shared drop handler — used by all layout components ───────────────────\n\n handleDrop(\n children: ComponentNode[],\n event: IoxDropEvent,\n dropListId: string,\n cdr: ChangeDetectorRef,\n afterDrop?: () => void,\n ): void {\n const { payload, insertIndex } = event;\n\n if (payload.type === 'external') {\n const node = this.materialize(payload.data);\n if (node) {\n children.splice(insertIndex, 0, node);\n cdr.detectChanges();\n this.dropComplete$.next(node);\n }\n afterDrop?.();\n return;\n }\n\n const item = payload.data as ComponentNode;\n\n if (payload.sourceId !== dropListId) {\n const sourceData = payload.sourceId ? this.getData(payload.sourceId) : null;\n if (sourceData) {\n const srcIdx = sourceData.indexOf(item);\n if (srcIdx !== -1) {\n sourceData.splice(srcIdx, 1);\n this.getCdr(payload.sourceId!)?.detectChanges();\n }\n children.splice(insertIndex, 0, item);\n cdr.detectChanges();\n this.dropComplete$.next(item);\n } else {\n // Source not in the drop-zone registry → came from an external panel\n // (e.g. the built-in blocks panel stores one pre-built node object and\n // reuses it across drags), so materialise it like any external payload.\n const cloned = this.materialize(item);\n if (cloned) {\n children.splice(insertIndex, 0, cloned);\n cdr.detectChanges();\n this.dropComplete$.next(cloned);\n }\n }\n afterDrop?.();\n return;\n }\n\n const currentIdx = children.indexOf(item);\n if (currentIdx !== -1) {\n const adjustedIdx = insertIndex > currentIdx ? insertIndex - 1 : insertIndex;\n children.splice(currentIdx, 1);\n children.splice(adjustedIdx, 0, item);\n cdr.detectChanges();\n this.dropComplete$.next(item);\n }\n afterDrop?.();\n }\n\n /**\n * Turn a components-panel payload into a fresh ComponentNode: a built-in type string via the\n * registry, or a block / symbol / bare node deep-cloned with fresh ids (so each copy owns its\n * CSS rules and its intra-subtree references stay self-consistent). Prefers `symbol.node`\n * (always current) over a block's original snapshot.\n *\n * The ONE place a panel payload becomes a node — drag-drop and click-to-insert both use it, so\n * a clicked element is identical to a dragged one.\n */\n materialize(data: unknown): ComponentNode | null {\n if (typeof data === 'string') return this.registry.createConfig(data) ?? null;\n if (!data || typeof data !== 'object') return null;\n const blk = data as any;\n const symbolNode = blk.symbolId ? this.symbolRegistry.getSymbol(blk.symbolId)?.node : null;\n const cloned = deepCloneNode((symbolNode ?? blk.node ?? blk) as ComponentNode);\n if (blk.syncInstances && blk.symbolId) (cloned as any).symbolId = blk.symbolId;\n return cloned;\n }\n\n /**\n * CLICK-TO-INSERT (B2): place a panel payload at a resolved target without a drag. Emits\n * `dropComplete$` exactly like a drop, so the builder selects the new node and records one undo\n * step through the same path. Returns the inserted node, or null if the payload was unusable.\n */\n insertPayload(children: ComponentNode[], index: number, data: unknown): ComponentNode | null {\n const node = this.materialize(data);\n if (!node) return null;\n children.splice(Math.max(0, Math.min(index, children.length)), 0, node);\n this.cdrForData(children)?.detectChanges();\n this.dropComplete$.next(node);\n return node;\n }\n\n /** True when `children` is a registered drop zone's array — i.e. a real container that can hold\n * children. Click-to-insert uses the same test a drag does, so it can't insert where a drop\n * couldn't. */\n isDropContainer(children: unknown): boolean {\n for (const data of this.dataMap.values()) if (data === children) return true;\n return false;\n }\n\n private cdrForData(children: unknown): ChangeDetectorRef | undefined {\n for (const [id, data] of this.dataMap.entries()) if (data === children) return this.cdrMap.get(id);\n return undefined;\n }\n\n // ── Drop-zone registry ────────────────────────────────────\n\n private ids: string[] = [];\n private elMap = new Map<string, HTMLElement>();\n private dataMap = new Map<string, any[]>();\n private cdrMap = new Map<string, ChangeDetectorRef>();\n private dropCbMap = new Map<string, (e: IoxDropEvent) => void>();\n private postDropMap = new Map<string, () => void>();\n\n public readonly ids$ = new BehaviorSubject<string[]>([]);\n public readonly isDragging$ = new BehaviorSubject<boolean>(false);\n public readonly deepTarget$ = new BehaviorSubject<string | null>(null);\n /** Emits the dropped/inserted ComponentNode after every successful drop. */\n public readonly dropComplete$ = new Subject<ComponentNode>();\n\n // ── Active drag state ─────────────────────────────────────\n\n private _isDragging = false;\n private _payload: DragPayload | null = null;\n private _sourceEl: HTMLElement | null = null;\n\n /**\n * For internal drags: a DOM clone of the dragged element appended to <body>.\n * Lives outside any CSS transform, so position:fixed works in viewport coords.\n * For external drags: the label chip overlay.\n */\n private _overlay: HTMLElement | null = null;\n /** Where on the element the user grabbed it (for accurate ghost positioning). */\n private _grabOffsetX = 0;\n private _grabOffsetY = 0;\n\n // ── Ghost cursor-follow (eased, not 1:1) ───────────────────\n private _ghostX = 0;\n private _ghostY = 0;\n private _ghostTargetX = 0;\n private _ghostTargetY = 0;\n private _ghostRaf = 0;\n\n // ── Pointer tracking ──────────────────────────────────────\n\n private _lastPointerX = 0;\n private _lastPointerY = 0;\n\n // ── Deep-target tracking ──────────────────────────────────\n\n private _deepTargetId: string | null = null;\n\n /** Injected overlay div marking the active drop target. */\n private _targetOverlay: HTMLElement | null = null;\n private _targetChip: HTMLElement | null = null;\n\n // ── Insertion indicator ───────────────────────────────────\n\n private _indicator: HTMLElement | null = null;\n private _indicatorContainerId: string | null = null;\n private _indicatorIndex = -1;\n private _indicatorRaf = 0;\n\n /** Elements that have temporary FLIP inline styles — cleared on drag end. */\n private _flipEls = new Set<HTMLElement>();\n\n // ── Viewport scale ────────────────────────────────────────\n\n private _scale = 1;\n\n /** Called by BuilderComponent whenever the viewport scale changes. */\n setScale(scale: number): void { this._scale = scale; }\n\n // ── Dropzone rect cache — snapshotted at drag start and on scroll ─────────\n\n private _dropzoneRectCache = new Map<string, DOMRect>();\n\n private _snapshotRects(): void {\n this._dropzoneRectCache.clear();\n for (const id of this.ids) {\n const el = this._getEl(id);\n if (el) this._dropzoneRectCache.set(id, el.getBoundingClientRect());\n }\n }\n\n // ── Root-escape ───────────────────────────────────────────\n\n private readonly ROOT_ESCAPE_PX = 14;\n private _rootEscapeActiveFor: string | null = null;\n\n // ─────────────────────────────────────────────────────────\n // Element lookup — elMap first, DOM id fallback\n // ─────────────────────────────────────────────────────────\n\n private _getEl(id: string): HTMLElement | null {\n return this.elMap.get(id) ?? document.getElementById(id);\n }\n\n // ─────────────────────────────────────────────────────────\n // Drop-zone registration\n // ─────────────────────────────────────────────────────────\n\n registerDropzone(\n id: string,\n el: HTMLElement,\n data: any[],\n cdr: ChangeDetectorRef,\n dropCb: (e: IoxDropEvent) => void,\n postDrop?: () => void,\n ): void {\n if (!id) return;\n\n // Stamp id on element so DOM-walk helpers (_isRootContainer) find it.\n el.id = id;\n\n if (!this.ids.includes(id)) {\n this.ids = [...this.ids, id];\n this.ids$.next(this.ids);\n }\n this.elMap.set(id, el);\n this.dataMap.set(id, data);\n this.cdrMap.set(id, cdr);\n this.dropCbMap.set(id, dropCb);\n if (postDrop) this.postDropMap.set(id, postDrop);\n\n interact(el).dropzone({\n accept: '[data-iox-draggable]',\n overlap: 'pointer',\n });\n }\n\n unregisterDropzone(id: string, el: HTMLElement): void {\n this.ids = this.ids.filter(i => i !== id);\n this.elMap.delete(id);\n this.dataMap.delete(id);\n this.cdrMap.delete(id);\n this.dropCbMap.delete(id);\n this.postDropMap.delete(id);\n this.ids$.next(this.ids);\n try { interact(el).unset(); } catch { /* already unset */ }\n }\n\n // ─────────────────────────────────────────────────────────\n // Draggable registration\n // ─────────────────────────────────────────────────────────\n\n /** Payload getter per registered draggable element — looked up in _onDragStart when a drag\n * redirects onto the currently-selected element instead of its natural origin. */\n private _payloadMap = new Map<HTMLElement, () => DragPayload>();\n\n registerDraggable(el: HTMLElement, getPayload: () => DragPayload): void {\n el.setAttribute('data-iox-draggable', '');\n this._payloadMap.set(el, getPayload);\n\n interact(el).draggable({\n // Don't start a drag when the pointer goes down inside a contenteditable\n // element (e.g. a text block in inline-edit mode).\n ignoreFrom: '[contenteditable=\"true\"]',\n listeners: {\n start: (event) => this._onDragStart(event, el, getPayload),\n move: (event) => this._onDragMove(event),\n end: (event) => this._onDragEnd(event),\n },\n modifiers: [],\n });\n }\n\n unregisterDraggable(el: HTMLElement): void {\n el.removeAttribute('data-iox-draggable');\n this._payloadMap.delete(el);\n try { interact(el).unset(); } catch { /* already unset */ }\n }\n\n getData(id: string): any[] | undefined { return this.dataMap.get(id); }\n getCdr(id: string): ChangeDetectorRef | undefined { return this.cdrMap.get(id); }\n invokePostDrop(id: string): void { this.postDropMap.get(id)?.(); }\n\n /** Which registered dropzone's data array currently contains this node — used by the\n * overlay's drag-handle to resolve `ioxDragSourceId` for the selected node dynamically\n * (the handle isn't rendered inside any container, so it has no source id of its own). */\n findSourceIdForNode(node: ComponentNode): string | null {\n for (const [id, data] of this.dataMap) {\n if (data.includes(node)) return id;\n }\n return null;\n }\n\n consumeDeepTarget(): string | null {\n const v = this._deepTargetId;\n this._deepTargetId = null;\n return v;\n }\n\n // ─────────────────────────────────────────────────────────\n // Drag lifecycle\n // ─────────────────────────────────────────────────────────\n\n private _onDragStart(event: any, el: HTMLElement, getPayload: () => DragPayload): void {\n if (el.hasAttribute('data-editing')) {\n event.interaction.stop();\n return;\n }\n\n // A drag must operate on the CURRENTLY SELECTED node — never silently descend into a\n // nested child just because the pointer happened to be over it (e.g. clicking into a\n // selected Container's body actually grabbed a nested child's own registered draggable),\n // and never change the selection as a side effect of starting a drag. The overlay's\n // drag-handle (DRAG_HANDLE_ATTR) carries no node of its own — a drag started there always\n // redirects to whatever is selected. See utils/drag-redirect.util.ts for the decision.\n const selected = this.overlayService.getCurrentSelection();\n if (selected?.element) {\n const isHandle = el.hasAttribute(DRAG_HANDLE_ATTR);\n const target = resolveDragTarget(el, selected.element, isHandle);\n if (target !== el) {\n const redirectedPayload = this._payloadMap.get(target);\n if (redirectedPayload) {\n el = target;\n getPayload = redirectedPayload;\n } else if (isHandle) {\n // Nothing sensible to drag via the handle (selected node isn't draggable).\n event.interaction.stop();\n return;\n }\n }\n }\n\n this._payload = getPayload();\n this._sourceEl = el;\n this._isDragging = true;\n this._rootEscapeActiveFor = null;\n // Suppress native text selection for the duration of the drag — without this,\n // dragging the pointer across any text (canvas or sidebar) selects/highlights it.\n document.body.classList.add('iox-dragging');\n this._lastPointerX = event.client.x;\n this._lastPointerY = event.client.y;\n this.isDragging$.next(true);\n\n if (this._payload.type === 'internal') {\n // ── Clone the element and append to <body> ────────────────────────────\n //\n // DOM structure for a canvas item — two possible shapes:\n // (legacy wrapper, still used by slider slides / repeater items)\n // div[ioxDraggable] (el — the drag wrapper, may be wider than content)\n // └─ <app-card> / <app-section> … (Angular component host — the styled element)\n // (collapsed / directive-host, the common case post wrapper-collapse — task 9c)\n // el IS the styled element itself (carries its own `iox-node-{id}` class)\n //\n // el.getBoundingClientRect() gives the WRAPPER's rect in the legacy shape, which can\n // be wider than the visual element when the wrapper is in a flex container that\n // stretches it — wrong ghost dimensions, wrong grab offset. In the collapsed shape,\n // descending into el.firstElementChild would be actively wrong: for a container WITH\n // children, that grabs the first CHILD's rect/content instead of the container's own.\n //\n // OverlayService.getStyledElement() already carries this exact disambiguation (used\n // for the selection outline / box model) — reuse it instead of forking the logic:\n // el itself if it carries `iox-node-*`, else its first child.\n const hostEl = this.overlayService.getStyledElement(el);\n const rect = hostEl.getBoundingClientRect();\n this._grabOffsetX = event.client.x - rect.left;\n this._grabOffsetY = event.client.y - rect.top;\n\n // Scale factor: getBoundingClientRect() returns scaled viewport px,\n // but the clone renders at natural CSS px (no transform parent on body).\n // Apply the same scale transform so the clone matches the visual size\n // exactly — no explicit width/height, no overflow clipping.\n const scale = this._scale;\n\n // Cancel fill:forwards animations before cloning so the ghost shows\n // the element at its natural (un-animated) state, and so the original\n // element is clean after a same-position drop (where Angular won't\n // destroy/recreate the DOM node and InteractionEngine.detach() won't fire).\n hostEl.getAnimations().forEach(a => a.cancel());\n\n const clone = hostEl.cloneNode(true) as HTMLElement;\n // getBoundingClientRect() returns scaled viewport px. Divide by scale\n // to get the natural CSS px — this constrains the clone to match the\n // original's width when it's reparented to <body> (no canvas parent).\n // overflow:hidden suppresses scrollbars that can appear when the clone's\n // children lose their layout context (e.g. percentage-width children).\n const cssWidth = Math.round(rect.width / scale);\n const cssHeight = Math.round(rect.height / scale);\n clone.style.cssText = [\n 'position:fixed',\n `left:${rect.left}px`,\n `top:${rect.top}px`,\n `width:${cssWidth}px`,\n `height:${cssHeight}px`,\n `transform:scale(${scale})`,\n 'transform-origin:top left',\n 'pointer-events:none',\n 'overflow:hidden',\n 'z-index:9999',\n 'margin:0',\n ].join(';');\n clone.classList.add('iox-drag-moving');\n document.body.appendChild(clone);\n this._overlay = clone;\n this._startGhostFollow(rect.left, rect.top);\n\n // Hide original wrapper in-place (keeps layout space so container size is stable).\n el.classList.add('iox-drag-active-source');\n } else {\n // ── Sidebar external drag — show a label chip ─────────────────────────\n this._createExternalChip(this._payload, event.client.x, event.client.y);\n el.classList.add('iox-drag-source');\n }\n\n this._snapshotRects();\n }\n\n private _onDragMove(event: any): void {\n this._lastPointerX = event.client.x;\n this._lastPointerY = event.client.y;\n\n // Update the ghost's follow target; the rAF loop (_ghostFollowStep) eases\n // the clone/chip toward it rather than snapping to it every dragmove.\n if (this._overlay) {\n this._ghostTargetX = event.client.x - this._grabOffsetX;\n this._ghostTargetY = event.client.y - this._grabOffsetY;\n }\n\n this._updateDeepTarget();\n this._updateIndicator();\n }\n\n private _onDragEnd(event: any): void {\n document.body.classList.remove('iox-dragging');\n\n // Restore original element visibility BEFORE Angular re-renders on drop.\n if (this._sourceEl) {\n this._sourceEl.classList.remove('iox-drag-active-source');\n this._sourceEl.classList.remove('iox-drag-source');\n }\n document.querySelectorAll('.iox-drag-active-source')\n .forEach(el => el.classList.remove('iox-drag-active-source'));\n\n // Remove clone/chip overlay.\n this._removeOverlay();\n\n // Remove indicator BEFORE committing so calcInsertIndex sees a clean DOM.\n this._removeIndicator();\n document.body.classList.remove('iox-drag-has-indicator');\n\n // Clean up any FLIP transform/transition inline styles left on container children.\n for (const el of this._flipEls) {\n el.style.transform = '';\n el.style.transition = '';\n }\n this._flipEls.clear();\n\n this._commitDrop();\n\n this._removeTargetOverlay();\n document.querySelectorAll('.iox-drag-over').forEach(el => el.classList.remove('iox-drag-over'));\n this._rootEscapeActiveFor = null;\n this._isDragging = false;\n this._payload = null;\n this._sourceEl = null;\n this.isDragging$.next(false);\n this.deepTarget$.next(null);\n setTimeout(() => { this._deepTargetId = null; });\n }\n\n // ─────────────────────────────────────────────────────────\n // Drop commit\n // ─────────────────────────────────────────────────────────\n\n private _commitDrop(): void {\n if (!this._payload) return;\n\n const targetId = this._deepTargetId ?? 'canvas-preview';\n const insertIndex = this.calcInsertIndex(targetId);\n\n const dropCb = this.dropCbMap.get(targetId);\n if (!dropCb) return;\n\n dropCb({ payload: this._payload, targetId, insertIndex });\n }\n\n // ─────────────────────────────────────────────────────────\n // External-drag chip (sidebar items only)\n // ─────────────────────────────────────────────────────────\n\n private _createExternalChip(payload: DragPayload, pointerX: number, pointerY: number): void {\n this._removeOverlay();\n const label = typeof payload.data === 'string' ? payload.data : 'Component';\n const chip = document.createElement('div');\n chip.className = 'iox-drag-overlay iox-drag-overlay-chip';\n chip.textContent = label;\n // Chip follows 14px below-right of cursor.\n this._grabOffsetX = -14;\n this._grabOffsetY = -14;\n chip.style.left = (pointerX + 14) + 'px';\n chip.style.top = (pointerY + 14) + 'px';\n document.body.appendChild(chip);\n this._overlay = chip;\n this._startGhostFollow(pointerX + 14, pointerY + 14);\n }\n\n private _removeOverlay(): void {\n this._stopGhostFollow();\n this._overlay?.remove();\n this._overlay = null;\n this._grabOffsetX = 0;\n this._grabOffsetY = 0;\n }\n\n // ─────────────────────────────────────────────────────────\n // Ghost cursor-follow — eased toward the pointer via rAF instead of\n // snapped to it every dragmove event.\n // ─────────────────────────────────────────────────────────\n\n private _startGhostFollow(initialLeft: number, initialTop: number): void {\n this._ghostX = this._ghostTargetX = initialLeft;\n this._ghostY = this._ghostTargetY = initialTop;\n cancelAnimationFrame(this._ghostRaf);\n this._ghostRaf = requestAnimationFrame(this._ghostFollowStep);\n }\n\n private _ghostFollowStep = (): void => {\n if (!this._overlay) { this._ghostRaf = 0; return; }\n this._ghostX = easeToward(this._ghostX, this._ghostTargetX, GHOST_FOLLOW_SMOOTHING);\n this._ghostY = easeToward(this._ghostY, this._ghostTargetY, GHOST_FOLLOW_SMOOTHING);\n this._overlay.style.left = this._ghostX + 'px';\n this._overlay.style.top = this._ghostY + 'px';\n this._ghostRaf = requestAnimationFrame(this._ghostFollowStep);\n };\n\n private _stopGhostFollow(): void {\n cancelAnimationFrame(this._ghostRaf);\n this._ghostRaf = 0;\n }\n\n // ─────────────────────────────────────────────────────────\n // Deep-target detection (smallest bounding-rect area)\n // ─────────────────────────────────────────────────────────\n\n private _updateDeepTarget(): void {\n const px = this._lastPointerX;\n const py = this._lastPointerY;\n\n let bestId: string | null = null;\n let bestArea = Infinity;\n\n for (const id of this.ids) {\n const el = this._getEl(id);\n if (!el) continue;\n // Never drop an element into its own subtree: skip any dropzone\n // whose DOM element lives inside the dragged source wrapper.\n if (this._sourceEl?.contains(el)) continue;\n // Skip elements hidden by interaction pre-state, and any of their children.\n if (el.closest('[data-iox-hidden]')) continue;\n const rect = this._dropzoneRectCache.get(id) ?? el.getBoundingClientRect();\n if (px >= rect.left && px <= rect.right && py >= rect.top && py <= rect.bottom) {\n const area = rect.width * rect.height;\n if (area < bestArea) { bestArea = area; bestId = id; }\n }\n }\n\n // Root-escape with hysteresis.\n // Purpose: when the cursor is near the top/bottom edge of a root-level\n // section, treat the target as canvas-preview so the user can insert\n // between root sections.\n //\n // IMPORTANT: only activate if the cursor was ALREADY inside this section\n // (i.e. deepTarget is the section itself or a nested child of it).\n // Without this guard, crossing from Section A into the top 14px of\n // Section C immediately locks the target to canvas-preview and prevents\n // the user from ever reaching Section C's nested containers.\n if (this._rootEscapeActiveFor) {\n const escEl = this._getEl(this._rootEscapeActiveFor);\n if (escEl) {\n const r = this._dropzoneRectCache.get(this._rootEscapeActiveFor) ?? escEl.getBoundingClientRect();\n const inside = px >= r.left && px <= r.right && py >= r.top && py <= r.bottom;\n if (inside) { bestId = 'canvas-preview'; }\n else { this._rootEscapeActiveFor = null; }\n } else {\n this._rootEscapeActiveFor = null;\n }\n }\n\n if (!this._rootEscapeActiveFor &&\n bestId && bestId !== 'canvas-preview' && this._isRootContainer(bestId)) {\n const el = this._getEl(bestId);\n if (el) {\n const rect = this._dropzoneRectCache.get(bestId) ?? el.getBoundingClientRect();\n const nearEdge =\n py <= rect.top + this.ROOT_ESCAPE_PX ||\n py >= rect.bottom - this.ROOT_ESCAPE_PX;\n // Only escape if we were already targeting this section or\n // something nested inside it — not when crossing into it fresh.\n const wasInsideThisSection =\n this._deepTargetId === bestId ||\n this._isDescendantDropzone(this._deepTargetId, bestId);\n if (nearEdge && wasInsideThisSection) {\n this._rootEscapeActiveFor = bestId;\n bestId = 'canvas-preview';\n }\n }\n }\n\n if (bestId !== this._deepTargetId) {\n if (this._deepTargetId) {\n const old = this._getEl(this._deepTargetId);\n old?.classList.remove('iox-drag-over');\n }\n this._deepTargetId = bestId;\n if (bestId) {\n this._getEl(bestId)?.classList.add('iox-drag-over');\n }\n // Move injected overlay to the new target container.\n this._moveTargetOverlay(bestId);\n this.deepTarget$.next(bestId);\n\n // Reset indicator position state when container changes.\n this._indicatorIndex = -1;\n this._indicatorContainerId = null;\n }\n }\n\n // ─────────────────────────────────────────────────────────\n // Target overlay — fixed to <body>, sized from getBoundingClientRect\n // so it is always above all canvas content regardless of stacking\n // contexts or background colors inside the target container.\n // ─────────────────────────────────────────────────────────\n\n /** Call on every canvas scroll tick to keep the fixed-position drop-target\n * overlay aligned with the container element that moved in the viewport. */\n refreshDragOverlays(): void {\n if (!this._isDragging) return;\n this._snapshotRects();\n this._moveTargetOverlay(this._deepTargetId);\n }\n\n private _moveTargetOverlay(targetId: string | null): void {\n if (!targetId || targetId === 'canvas-preview') {\n this._removeTargetOverlay();\n return;\n }\n\n const el = this._getEl(targetId);\n if (!el) { this._removeTargetOverlay(); return; }\n\n if (!this._targetOverlay) {\n this._targetOverlay = document.createElement('div');\n this._targetOverlay.className = 'iox-drop-target-overlay';\n // Chip naming the target + slot — the most common drag failure is landing one level off\n // and not noticing (B2). Inline-styled like the indicator: no global CSS dependency.\n this._targetChip = document.createElement('div');\n this._targetChip.className = 'iox-drop-target-chip';\n this._targetChip.style.cssText = [\n 'position:absolute', 'left:0', 'top:-18px', 'max-width:100%', 'overflow:hidden',\n 'white-space:nowrap', 'text-overflow:ellipsis', 'padding:1px 6px',\n 'border-radius:4px 4px 0 0', 'background:#6366f1', 'color:#fff',\n 'font:500 10px/1.5 system-ui,sans-serif', 'pointer-events:none',\n ].join(';');\n this._targetOverlay.appendChild(this._targetChip);\n document.body.appendChild(this._targetOverlay);\n }\n this._updateTargetChip(targetId, el);\n\n const rect = el.getBoundingClientRect();\n this._targetOverlay.style.cssText = [\n 'position:fixed',\n `left:${rect.left}px`,\n `top:${rect.top}px`,\n `width:${rect.width}px`,\n `height:${rect.height}px`,\n 'pointer-events:none',\n 'z-index:9998',\n 'box-sizing:border-box',\n ].join(';');\n }\n\n private _removeTargetOverlay(): void {\n this._targetOverlay?.remove();\n this._targetOverlay = null;\n this._targetChip = null;\n }\n\n /** Name the drop target and the slot: \"into Card grid · position 2 of 4\". */\n private _updateTargetChip(targetId: string, el: HTMLElement): void {\n if (!this._targetChip) return;\n const name = this.overlayService.findNodeByElement(el)?.node;\n const childCount = this.getData(targetId)?.length ?? 0;\n const index = this._indicatorContainerId === targetId && this._indicatorIndex >= 0\n ? this._indicatorIndex : childCount;\n this._targetChip.textContent = dropTargetLabel(name?.label || name?.type, index, childCount);\n }\n\n private _isRootContainer(id: string): boolean {\n const el = this._getEl(id);\n if (!el) return false;\n let parent = el.parentElement;\n while (parent) {\n if (parent.id === 'canvas-preview') return true;\n if (parent.id && this.ids.includes(parent.id)) return false;\n parent = parent.parentElement;\n }\n return false;\n }\n\n /**\n * Returns true if the dropzone with `childId` is a DOM descendant of the\n * dropzone with `parentId`. Used to decide whether the cursor was already\n * \"inside\" a root section before triggering root-escape.\n */\n private _isDescendantDropzone(childId: string | null, parentId: string): boolean {\n if (!childId) return false;\n const childEl = this._getEl(childId);\n const parentEl = this._getEl(parentId);\n if (!childEl || !parentEl) return false;\n return parentEl.contains(childEl);\n }\n\n // ─────────────────────────────────────────────────────────\n // Insertion indicator (animates open so siblings shift smoothly)\n // ─────────────────────────────────────────────────────────\n\n private _updateIndicator(): void {\n const targetId = this._deepTargetId ?? 'canvas-preview';\n document.body.classList.add('iox-drag-has-indicator');\n const idx = this.calcInsertIndex(targetId);\n if (idx !== this._indicatorIndex || targetId !== this._indicatorContainerId) {\n this._indicatorIndex = idx;\n this._positionIndicator(targetId, idx);\n const el = this._getEl(targetId);\n if (el) this._updateTargetChip(targetId, el);\n }\n }\n\n private _positionIndicator(containerId: string, index: number): void {\n const container = this._getEl(containerId);\n if (!container) return;\n\n const cs = window.getComputedStyle(container);\n const isRow =\n (cs.display === 'flex' || cs.display === 'inline-flex') &&\n (!cs.flexDirection || cs.flexDirection === 'row' || cs.flexDirection === 'row-reverse');\n\n const containerChanged = this._indicatorContainerId !== containerId;\n\n if (containerChanged) {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicator?.remove();\n this._indicator = null;\n }\n\n const needsCreate = !this._indicator;\n if (needsCreate) {\n this._indicator = document.createElement('div');\n this._indicator.className = 'iox-insert-indicator';\n\n if (isRow) {\n // Start at width:0 with align-self:stretch so it spans the full\n // container height once visible. overflow:hidden keeps it invisible\n // at width:0 — no painted pixels, no phantom height like min-height\n // would cause. Animates width 0→3px on first appearance.\n this._indicator.style.cssText =\n 'flex-shrink:0;width:0;align-self:stretch;' +\n 'background:#6366f1;border-radius:2px;pointer-events:none;margin:0;' +\n `transition:width 140ms ${MOTION_EASE},margin 140ms ${MOTION_EASE};overflow:hidden;`;\n } else {\n this._indicator.style.cssText =\n 'height:0;width:100%;background:#6366f1;border-radius:2px;' +\n 'pointer-events:none;margin:0;display:block;' +\n `transition:height 140ms ${MOTION_EASE},margin 140ms ${MOTION_EASE};overflow:hidden;`;\n }\n }\n\n this._indicatorContainerId = containerId;\n\n const skipClasses = [\n 'section-placeholder', 'container-placeholder', 'repeater-placeholder',\n 'repeater-badge', 'repeater-preview-row', 'iox-insert-indicator',\n 'iox-drag-active-source',\n ];\n const children = Array.from(container.children).filter(\n el => !skipClasses.some(cls => el.classList.contains(cls))\n );\n\n // ── FLIP: snapshot sibling rects BEFORE DOM change (reposition case only) ──\n let beforeRects: Map<Element, DOMRect> | null = null;\n if (!needsCreate) {\n beforeRects = new Map<Element, DOMRect>();\n Array.from(container.children).forEach(child => {\n if (child !== this._indicator) {\n beforeRects!.set(child, child.getBoundingClientRect());\n }\n });\n }\n\n // Reposition indicator in DOM.\n if (!this._indicator) return;\n if (index >= children.length) {\n container.appendChild(this._indicator);\n } else {\n container.insertBefore(this._indicator, children[index]);\n }\n\n // ── FLIP: animate siblings from their old positions to their new positions ──\n if (beforeRects) {\n Array.from(container.children).forEach(child => {\n const before = beforeRects!.get(child);\n if (!before) return;\n const after = child.getBoundingClientRect();\n const dx = before.left - after.left;\n const dy = before.top - after.top;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n\n const el = child as HTMLElement;\n this._flipEls.add(el);\n // Invert: snap element back to where it was, then animate to new pos.\n el.style.transition = 'none';\n el.style.transform = `translate(${dx}px,${dy}px)`;\n requestAnimationFrame(() => {\n el.style.transition = `transform 140ms ${MOTION_EASE}`;\n el.style.transform = '';\n });\n });\n }\n\n // Animate indicator open (first appearance in this container only).\n if (needsCreate) {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicatorRaf = requestAnimationFrame(() => {\n if (!this._indicator) return;\n if (isRow) {\n this._indicator.style.width = '3px';\n this._indicator.style.margin = '0 3px';\n } else {\n this._indicator.style.height = '4px';\n this._indicator.style.margin = '3px 0';\n }\n });\n }\n }\n\n private _removeIndicator(): void {\n cancelAnimationFrame(this._indicatorRaf);\n this._indicator?.remove();\n this._indicator = null;\n this._indicatorContainerId = null;\n this._indicatorIndex = -1;\n }\n\n // ─────────────────────────────────────────────────────────\n // calcInsertIndex\n // ─────────────────────────────────────────────────────────\n\n calcInsertIndex(containerId: string): number {\n const container = this._getEl(containerId);\n if (!container) return 0;\n\n const skipClasses = [\n 'section-placeholder', 'container-placeholder', 'repeater-placeholder',\n 'repeater-badge', 'repeater-preview-row', 'iox-insert-indicator',\n 'iox-drag-active-source',\n ];\n const children = Array.from(container.children).filter(\n el => !skipClasses.some(cls => el.classList.contains(cls))\n );\n if (!children.length) return 0;\n\n const cs = window.getComputedStyle(container);\n const isHorizontal =\n (cs.display === 'flex' || cs.display === 'inline-flex') &&\n (!cs.flexDirection || cs.flexDirection === 'row' || cs.flexDirection === 'row-reverse');\n\n for (let i = 0; i < children.length; i++) {\n const rect = children[i].getBoundingClientRect();\n if (isHorizontal) {\n if (this._lastPointerX < rect.left + rect.width / 2) return i;\n } else {\n if (this._lastPointerY < rect.top + rect.height / 2) return i;\n }\n }\n return children.length;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { IoxDataSource } from '../models/component.model';\n\n/**\n * Page-scoped registry that holds the current page's data sources.\n * Scoped to PageUiComponent.providers[] so every builder service\n * (BindingsComponent, BuilderRepeaterComponent) shares the same instance.\n *\n * Seeded by PageUiComponent.loadPage() from saved page data, then kept\n * up to date by BindingsComponent whenever the user adds/removes a source.\n */\n@Injectable()\nexport class DataSourceRegistryService {\n private _ds$ = new BehaviorSubject<IoxDataSource[]>([]);\n\n readonly dataSources$ = this._ds$.asObservable();\n\n setDataSources(ds: IoxDataSource[]): void {\n this._ds$.next(ds);\n }\n\n getDataSources(): IoxDataSource[] {\n return this._ds$.value;\n }\n\n findByAlias(alias: string): IoxDataSource | undefined {\n return this._ds$.value.find(ds => ds.alias === alias);\n }\n\n getAliasOptions(): { label: string; value: string }[] {\n return this._ds$.value.map(ds => ({ label: ds.alias, value: ds.alias }));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Breakpoint, breakpointDef, breakpointForWidth } from '@vectoriox/iox-ui';\n\nimport { BREAKPOINT_PRESENTATION } from '../panels/panel.model';\n\nexport interface ViewportState {\n /**\n * The breakpoint being edited — ALWAYS the one the canvas width falls in (derived, never set\n * independently), so the editing scope can't disagree with what the canvas is showing.\n */\n breakpoint: Breakpoint;\n /** Real canvas width in CSS pixels (e.g., 1440 for desktop). */\n width: number;\n /** Real canvas height in CSS pixels (e.g., 900 for desktop). Simulates the browser viewport. */\n height: number;\n /** Visual scale factor (0–1+). Canvas is rendered at `width × height` then scaled. */\n scale: number;\n}\n\nconst STORAGE_KEY = 'iox_builder_viewport';\nconst DEFAULT_WIDTH = breakpointDef(Breakpoint.Base)!.previewWidth;\n\n@Injectable()\nexport class ViewportService {\n private state: ViewportState = this.loadFromStorage();\n\n private stateSubject = new BehaviorSubject<ViewportState>(this.state);\n public state$ = this.stateSubject.asObservable();\n\n getState(): ViewportState {\n return this.state;\n }\n\n getScale(): number {\n return this.state.scale;\n }\n\n /** Show (and edit) `bp`: the canvas takes that breakpoint's preview width and height. */\n setBreakpoint(bp: Breakpoint): void {\n const def = breakpointDef(bp);\n if (!def) return;\n this.update({ width: def.previewWidth, height: BREAKPOINT_PRESENTATION[bp].previewHeight });\n }\n\n setScale(scale: number): void {\n this.update({ scale: Math.max(0.1, Math.min(2, scale)) });\n }\n\n /** Any canvas width — the breakpoint follows from it. */\n setWidth(width: number): void {\n this.update({ width });\n }\n\n /**\n * Calculate the scale that makes the canvas fit inside the available editor width.\n * @param availableWidth The pixel width of the editor area that holds the canvas.\n * @param padding Optional horizontal padding to subtract (default 40px total).\n */\n fitToWidth(availableWidth: number, padding = 40): void {\n const usable = availableWidth - padding;\n if (usable <= 0) return;\n const scale = Math.min(1, usable / this.state.width);\n this.setScale(scale);\n }\n\n /**\n * Calculate the scale that makes the canvas fit both the available width AND height.\n * Uses the smaller of the two scale factors so the entire viewport frame is visible.\n * @param containerWidth Available container width in screen pixels.\n * @param containerHeight Available container height in screen pixels.\n * @param padding Total padding to subtract from both dimensions (default 40px).\n */\n fitToSize(containerWidth: number, containerHeight: number, padding = 40): void {\n const usableW = containerWidth - padding;\n const usableH = containerHeight - padding;\n if (usableW <= 0 || usableH <= 0) return;\n const scaleX = usableW / this.state.width;\n const scaleY = usableH / this.state.height;\n this.setScale(Math.min(1, scaleX, scaleY));\n }\n\n /**\n * Convert a screen-space coordinate to canvas-space (unscaled).\n * Call this when translating pointer events into canvas-relative positions.\n */\n screenToCanvas(screenX: number, screenY: number, canvasRect: DOMRect): { x: number; y: number } {\n return {\n x: (screenX - canvasRect.left) / this.state.scale,\n y: (screenY - canvasRect.top) / this.state.scale,\n };\n }\n\n private update(partial: Partial<Omit<ViewportState, 'breakpoint'>>): void {\n const next = { ...this.state, ...partial };\n this.state = { ...next, breakpoint: breakpointForWidth(next.width) };\n this.stateSubject.next(this.state);\n this.saveToStorage();\n }\n\n private saveToStorage(): void {\n try {\n const { width, height, scale } = this.state;\n localStorage.setItem(STORAGE_KEY, JSON.stringify({ width, height, scale }));\n } catch {}\n }\n\n /**\n * Restores width / height / scale. Older builds also saved a `device` ('desktop' | 'tablet' |\n * 'mobile'); it is ignored — the saved width (1440 / 768 / 375) already resolves to the\n * matching breakpoint (Base / Tablet / Small), so old preferences carry over unchanged.\n */\n private loadFromStorage(): ViewportState {\n const defaults: ViewportState = {\n breakpoint: breakpointForWidth(DEFAULT_WIDTH),\n width: DEFAULT_WIDTH,\n height: BREAKPOINT_PRESENTATION[Breakpoint.Base].previewHeight,\n scale: 0.75,\n };\n try {\n const raw = localStorage.getItem(STORAGE_KEY);\n if (!raw) return defaults;\n const saved = JSON.parse(raw);\n const width = typeof saved.width === 'number' && saved.width > 0 ? saved.width : defaults.width;\n const breakpoint = breakpointForWidth(width);\n return {\n breakpoint,\n width,\n height: typeof saved.height === 'number' && saved.height > 0\n ? saved.height : BREAKPOINT_PRESENTATION[breakpoint].previewHeight,\n scale: typeof saved.scale === 'number' ? Math.max(0.1, Math.min(2, saved.scale)) : defaults.scale,\n };\n } catch {\n return defaults;\n }\n }\n}\n","// Re-exported from the shared iox-ui package so iox-builder consumers\n// don't need to import from two different packages.\nexport { ComponentInstanceRegistryService } from '@vectoriox/iox-ui';\n","import { Injectable, NgZone, inject } from '@angular/core';\n\nimport {\n ComponentNode,\n InteractionAction,\n InteractionTrigger,\n IoxInteraction,\n} from '../models/component.model';\nimport { OverlayService } from '../overlay/overlay.service';\nimport { ComponentInstanceRegistryService } from './component-instance-registry.service';\nimport { ContextStore, contextActionEffect, isActionEnabled, isContextAction, resolveContextValue } from '@vectoriox/iox-ui';\n\ninterface AttachedInteraction {\n node: ComponentNode;\n interaction: IoxInteraction;\n cleanup: () => void;\n}\n\n/**\n * Wires ComponentNode interactions to live DOM elements via the\n * OverlayService node-element registry.\n *\n * Call `attach(node)` after the node is rendered and registered.\n * Call `detach(node)` on destroy to tear down listeners/observers.\n */\n@Injectable()\nexport class InteractionEngineService {\n private attached = new Map<ComponentNode, AttachedInteraction[]>();\n\n /** Shared with the SSR engine — one store type, one set of semantics. */\n private contextStore = inject(ContextStore);\n /** Resolved data for the canvas, so a row marker (source + index) resolves back to its item. */\n private contextData: Record<string, any> = {};\n\n /** Elements that have had pre-state applied (hidden by attach). */\n private preStatedElements = new Set<HTMLElement>();\n\n /**\n * Toggle state for click interactions with reverseActions.\n * false = next click runs actions (primary); true = next click runs reverseActions.\n */\n private toggleStates = new Map<string, boolean>();\n\n /**\n * Pre-states queued for elements that weren't registered yet when the owner\n * node's attach() ran. Keyed by target node ID. Consumed when the target\n * element's own attach() fires.\n */\n private pendingPreStates = new Map<string, InteractionAction[]>();\n\n /** Action types that animate an element from hidden → visible. */\n private readonly ENTRANCE_TYPES = new Set([\n 'fadeIn', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'scaleIn', 'show',\n ]);\n\n /** Action types that animate an element from visible → hidden. */\n private readonly EXIT_TYPES = new Set(['fadeOut', 'scaleOut', 'hide']);\n\n private readonly SWIPER_ACTIONS = new Set([\n 'swiperNext', 'swiperPrev', 'swiperGoToSlide',\n 'swiperAutoplayStart', 'swiperAutoplayStop', 'swiperAutoplayPause',\n ]);\n\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n private ngZone = inject(NgZone);\n\n constructor(private overlayService: OverlayService) {}\n\n /**\n * Run all DOM-manipulation operations (pre-state, observers, animations)\n * outside the Angular zone so Zone.js does not schedule unnecessary CD ticks\n * for each RAF/IntersectionObserver/animation callback.\n * The caller is responsible for calling markForCheck() / refreshSelect() inside\n * the zone after this returns.\n */\n private runOutside<T>(fn: () => T): T {\n return this.ngZone.runOutsideAngular(fn);\n }\n\n /** Wire all interactions for a node to its rendered DOM element. */\n attach(node: ComponentNode): void { this.runOutside(() => this._attach(node)); }\n /** Attach interactions to a node whose element is NOT overlay-registered — e.g. repeater/slider\n * PREVIEW CLONES, which are non-selectable but must still animate (parity with the SSR runtime,\n * which animates every repeated row). See RenderDirective. */\n attachTo(node: ComponentNode, element: HTMLElement): void { this.runOutside(() => this._attach(node, element)); }\n private _attach(node: ComponentNode, elementOverride?: HTMLElement): void {\n const element = elementOverride ?? this.overlayService.getNodeRef(node)?.element;\n if (!element) return;\n\n const inBuilder = this.isBuilderMode();\n\n // Apply any pre-states queued for THIS element by earlier-registered nodes.\n // Pending entries are only added when appropriate (see loop below), so always consume.\n if (node.id) {\n const pending = this.pendingPreStates.get(node.id);\n if (pending) {\n for (const action of pending) {\n this.applyPreState(element, action);\n }\n this.pendingPreStates.delete(node.id);\n }\n }\n\n if (!node.interactions?.length) return;\n\n const cleanups: AttachedInteraction[] = [];\n\n for (const ix of node.interactions) {\n // Pre-state: hide target elements before their entrance animation fires so\n // the user sees a real hidden→visible animation on the canvas. Every trigger\n // now runs live in the builder (see attachInteraction), so pre-state is applied\n // for all of them EXCEPT scrollProgress — that trigger is unimplemented (no-op),\n // so pre-stating it would leave the element stuck at opacity:0 forever.\n const skipPreState = inBuilder && ix.trigger === 'scrollProgress';\n if (!skipPreState) {\n for (const action of ix.actions) {\n // A disabled action must not pre-state: it would hide the element with nothing\n // left to reveal it.\n if (!isActionEnabled(action)) continue;\n if (this.ENTRANCE_TYPES.has(action.type)) {\n const target = this.resolveTarget(node, action, element);\n if (target) {\n this.applyPreState(target, action);\n } else if (action.target && action.target !== 'self') {\n const list = this.pendingPreStates.get(action.target) ?? [];\n list.push(action);\n this.pendingPreStates.set(action.target, list);\n }\n }\n }\n }\n\n const cleanup = this.attachInteraction(node, ix, element);\n cleanups.push({ node, interaction: ix, cleanup });\n }\n\n this.attached.set(node, cleanups);\n }\n\n /** Tear down all interaction listeners for a node and reset its animated state. */\n detach(node: ComponentNode): void { this.runOutside(() => this._detach(node)); }\n private _detach(node: ComponentNode): void {\n const entries = this.attached.get(node);\n if (!entries) return;\n for (const entry of entries) {\n entry.cleanup();\n }\n this.attached.delete(node);\n\n // Reset toggle state so re-attach starts from the primary actions.\n for (const entry of entries) {\n if (entry.interaction.reverseActions?.length) {\n this.toggleStates.delete(entry.interaction.id);\n }\n }\n\n // Cancel Web Animations and strip any inline pre-state styles that\n // were applied by applyPreState() so the element returns to its natural CSS state.\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n ref.element.getAnimations().forEach(a => a.cancel());\n this.clearInlineAnimationStyles(ref.element);\n }\n\n // Also clean up pre-state on any target elements this node was animating.\n if (node.interactions) {\n for (const ix of node.interactions) {\n for (const action of ix.actions) {\n // Remove any pending pre-states for unregistered targets.\n if (action.target && action.target !== 'self') {\n const pending = this.pendingPreStates.get(action.target);\n if (pending) {\n const filtered = pending.filter(a => a !== action);\n if (filtered.length) {\n this.pendingPreStates.set(action.target, filtered);\n } else {\n this.pendingPreStates.delete(action.target);\n }\n }\n }\n // Clean up inline styles on already-registered target elements.\n const target = this.resolveTarget(node, action);\n if (target && this.preStatedElements.has(target)) {\n target.getAnimations().forEach(a => a.cancel());\n this.clearInlineAnimationStyles(target);\n this.preStatedElements.delete(target);\n }\n }\n }\n }\n }\n\n /** Re-attach interactions after they have been edited in the panel. */\n refresh(node: ComponentNode): void {\n this.runOutside(() => { this._detach(node); this._attach(node); });\n }\n\n /**\n * Replay all interactions on a node immediately, regardless of their trigger.\n * Used by the builder overlay play button for in-editor animation preview.\n * Uses fill:'none' so the element returns to its natural state after the preview.\n */\n replay(node: ComponentNode): void { this.runOutside(() => this._replay(node)); }\n private _replay(node: ComponentNode): void {\n if (!node.interactions?.length) return;\n\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n ref.element.getAnimations().forEach(a => a.cancel());\n // Clear any leftover inline styles so the pre-state applies cleanly.\n this.clearInlineAnimationStyles(ref.element);\n }\n\n // In builder mode pre-state is never applied on attach, so apply it now\n // to give an accurate hidden→visible preview. It is cleaned up via\n // executeAction's anim.finished handler once the animation completes.\n for (const ix of node.interactions) {\n for (const action of ix.actions) {\n if (this.ENTRANCE_TYPES.has(action.type)) {\n const target = this.resolveTarget(node, action);\n if (target) this.applyPreState(target, action);\n }\n }\n }\n\n for (const ix of node.interactions) {\n this.runActions(node, ix.actions);\n }\n }\n\n /**\n * Fire all interactions on the given node that match the specified trigger.\n * Used by Swiper (and future components) to dispatch their events into the\n * interaction engine without coupling to the engine's attach/detach lifecycle.\n */\n replayTrigger(nodeId: string, trigger: InteractionTrigger): void { this.runOutside(() => this._replayTrigger(nodeId, trigger)); }\n private _replayTrigger(nodeId: string, trigger: InteractionTrigger): void {\n for (const [node] of this.attached) {\n if (node.id !== nodeId) continue;\n for (const ix of (node.interactions ?? [])) {\n if (ix.trigger === trigger) {\n this.runActions(node, ix.actions);\n }\n }\n return;\n }\n }\n\n // ── Private ──────────────────────────────────────────────\n\n private attachInteraction(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n // All triggers run live in the builder canvas so the user sees the real\n // animation (pageLoad on attach, viewportEnter on scroll-into-view, click/hover).\n // The former NG0103 crash was caused by (a) Swiper's ResizeObserver created inside\n // the Angular zone — fixed in SliderContainerComponent via runOutsideAngular — and\n // (b) the overlay's Resize/MutationObservers synchronously re-dirtying the view\n // during synchronize() — fixed by coalescing overlay updates through a RAF.\n // scrollProgress is still unimplemented and returns a no-op below.\n switch (ix.trigger) {\n case 'pageLoad':\n return this.attachPageLoad(node, ix, element);\n case 'pageEnter':\n // In the builder canvas there is no navigation, so preview a page-enter the same\n // way as page-load (pre-stated hidden → animate in). In production the SSR engine\n // fires it only after the page transition completes (ClientInteractionService).\n return this.attachPageLoad(node, ix, element);\n case 'pageLeave':\n // Exit choreography that plays on navigate-away. There is no navigation in the\n // builder, so it does not auto-fire (element stays visible) — the overlay play\n // button previews it via replay(). In production the orchestrator awaits it.\n return () => {};\n case 'viewportEnter':\n return this.attachViewportEnter(node, ix, element);\n case 'click':\n return this.attachClick(node, ix, element);\n case 'hover':\n return this.attachHover(node, ix, element);\n case 'scrollProgress':\n // Scroll-progress is complex — deferred.\n return () => {};\n default:\n return () => {};\n }\n }\n\n // ── Triggers ─────────────────────────────────────────────\n\n private attachPageLoad(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const timer = setTimeout(() => {\n if (this.hasPreStatedAncestor(element)) {\n this.deferUntilVisible(element, () => this.runActions(node, ix.actions, element));\n } else {\n this.runActions(node, ix.actions, element);\n }\n }, 50);\n return () => clearTimeout(timer);\n }\n\n private attachViewportEnter(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const firedSet = new Set<string>();\n\n const fire = () => {\n const key = ix.id;\n if (ix.actions.some(a => a.once) && firedSet.has(key)) return;\n if (this.hasPreStatedAncestor(element)) {\n this.deferUntilVisible(element, () => {\n if (ix.actions.some(a => a.once) && firedSet.has(key)) return;\n firedSet.add(key);\n this.runActions(node, ix.actions, element);\n });\n return;\n }\n firedSet.add(key);\n this.runActions(node, ix.actions, element);\n };\n\n // IntersectionObserver with no root uses the browser viewport.\n // It respects overflow:hidden clipping from .preview-scroll so it fires\n // correctly as Lenis scrolls (Lenis changes scrollTop on .preview-scroll).\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) { cleanup(); fire(); }\n }\n }, { threshold: 0.1 });\n observer.observe(element);\n\n // Builder: also listen to Lenis scroll events on .preview-lenis-content\n // as a fallback in case IntersectionObserver misses elements behind a\n // CSS transform (scale) on iox-page-component.\n const lenisEl = this.overlayService.getScrollContainer();\n let scrollFired = false;\n const onScroll = () => {\n if (scrollFired) return;\n const rootEl = this.overlayService.getIntersectionRoot();\n if (!rootEl) return;\n const rootRect = rootEl.getBoundingClientRect();\n const elRect = element.getBoundingClientRect();\n const overlapH = Math.min(elRect.bottom, rootRect.bottom) - Math.max(elRect.top, rootRect.top);\n const elH = elRect.bottom - elRect.top;\n if (elH > 0 && overlapH / elH >= 0.1) { scrollFired = true; cleanup(); fire(); }\n };\n if (lenisEl) lenisEl.addEventListener('scroll', onScroll, { passive: true });\n\n const cleanup = () => {\n observer.disconnect();\n scrollFired = true;\n if (lenisEl) lenisEl.removeEventListener('scroll', onScroll);\n };\n return cleanup;\n }\n\n private isBuilderMode(): boolean {\n return document.body.classList.contains('builder-active');\n }\n\n /** Returns true if any DOM ancestor of element is currently faded out via pre-state. */\n private hasPreStatedAncestor(element: HTMLElement): boolean {\n let el = element.parentElement;\n while (el && el !== document.body) {\n if (this.preStatedElements.has(el)) return true;\n el = el.parentElement;\n }\n return false;\n }\n\n /** Polls via RAF until no ancestor is in pre-state, then fires callback. */\n private deferUntilVisible(element: HTMLElement, callback: () => void): void {\n const poll = () => {\n if (!this.hasPreStatedAncestor(element)) {\n callback();\n } else {\n requestAnimationFrame(poll);\n }\n };\n requestAnimationFrame(poll);\n }\n\n private attachClick(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const handler = () => {\n if (ix.reverseActions?.length) {\n // Toggle: alternate between primary and reverse actions on each click.\n const isToggled = this.toggleStates.get(ix.id) ?? false;\n this.runActions(node, isToggled ? ix.reverseActions : ix.actions, element);\n this.toggleStates.set(ix.id, !isToggled);\n } else {\n this.runActions(node, ix.actions, element);\n }\n };\n element.addEventListener('click', handler);\n return () => element.removeEventListener('click', handler);\n }\n\n private attachHover(node: ComponentNode, ix: IoxInteraction, element: HTMLElement): () => void {\n const enterHandler = () => this.runActions(node, ix.actions, element);\n const leaveHandler = () => {\n // Reverse animations on leave for hover triggers\n for (const action of ix.actions) {\n if (!isActionEnabled(action)) continue;\n // Context actions have no \"backwards\" — the shared table decides what leave does\n // (clear, unless the action sets noReverse). Same call the SSR engine makes.\n if (isContextAction(action)) {\n this.applyContextAction(action, element, 'reverse');\n continue;\n }\n const target = this.resolveTarget(node, action, element);\n if (!target) continue;\n this.reverseAction(target, action);\n }\n };\n element.addEventListener('mouseenter', enterHandler);\n element.addEventListener('mouseleave', leaveHandler);\n return () => {\n element.removeEventListener('mouseenter', enterHandler);\n element.removeEventListener('mouseleave', leaveHandler);\n };\n }\n\n // ── Actions ──────────────────────────────────────────────\n\n private runActions(node: ComponentNode, actions: InteractionAction[], selfEl?: HTMLElement | null): void {\n for (const action of actions) {\n if (!isActionEnabled(action)) continue; // switched off by the author\n if (this.SWIPER_ACTIONS.has(action.type)) {\n this.executeSwiperAction(action);\n continue;\n }\n // Context actions write STATE, not animation. `selfEl` is deliberate: $item is read by\n // walking up from the element actually hovered/clicked, which for a repeater PREVIEW ROW\n // is the clone — so each row publishes its own item, exactly as on the live site.\n if (isContextAction(action)) {\n this.applyContextAction(action, selfEl ?? null, 'forward');\n continue;\n }\n // selfEl lets 'self'-targeted actions resolve for preview CLONES, which aren't\n // overlay-registered (getNodeRef would return undefined) — see attachTo. (issue #2)\n const target = this.resolveTarget(node, action, selfEl);\n if (!target) continue;\n this.executeAction(target, action);\n }\n }\n\n /**\n * Execute a context action against the shared store. The forward/reverse semantics come from\n * `contextActionEffect` in @vectoriox/iox-ui — the same function the SSR engine calls, so the\n * builder canvas and the live site behave identically.\n */\n private applyContextAction(action: InteractionAction, el: HTMLElement | null, pass: 'forward' | 'reverse'): void {\n const effect = contextActionEffect(action as any, pass);\n if (!effect) return;\n if (effect.op === 'clear') {\n this.contextStore.clear(effect.slot);\n return;\n }\n const value = resolveContextValue(effect.value, {\n item: this.rowItemFor(el),\n resolvedData: this.contextData,\n });\n this.contextStore.set(effect.slot, value);\n }\n\n /** The repeater item this element belongs to — the nearest marked row ancestor. */\n private rowItemFor(el: HTMLElement | null): unknown {\n const row = el?.closest?.('[data-iox-row-idx]') as HTMLElement | null;\n if (!row) return undefined;\n const source = row.getAttribute('data-iox-row-src') ?? '';\n const index = Number(row.getAttribute('data-iox-row-idx'));\n const items = this.contextData?.[source];\n return Array.isArray(items) && Number.isInteger(index) ? items[index] : undefined;\n }\n\n /** Resolved data for the canvas, kept current by the repeater as it fetches. */\n setContextData(data: Record<string, any>): void {\n // MERGE, not replace — a page can hold several repeaters, each publishing its own source.\n this.contextData = { ...this.contextData, ...(data ?? {}) };\n }\n\n private executeSwiperAction(action: InteractionAction): void {\n // Target is the nodeId of the SliderContainer to control.\n const swiper = this.instanceRegistry.get(action.target) as any;\n if (!swiper) return;\n switch (action.type) {\n case 'swiperNext': swiper.slideNext(); break;\n case 'swiperPrev': swiper.slidePrev(); break;\n case 'swiperGoToSlide': swiper.slideTo(action.params?.['index'] ?? 0); break;\n case 'swiperAutoplayStart': swiper.autoplay?.start(); break;\n case 'swiperAutoplayStop': swiper.autoplay?.stop(); break;\n case 'swiperAutoplayPause': swiper.autoplay?.pause(); break;\n }\n }\n\n private resolveTarget(ownerNode: ComponentNode, action: InteractionAction, selfEl?: HTMLElement | null): HTMLElement | null {\n if (action.target === 'self' || !action.target) {\n return selfEl ?? this.overlayService.getNodeRef(ownerNode)?.element ?? null;\n }\n // Find by node ID\n for (const [n, ref] of this.overlayService.getAllNodeEntries()) {\n if (n.id === action.target) return ref.element;\n }\n return null;\n }\n\n private executeAction(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n\n // 'both' = backwards (holds first keyframe during delay) + forwards (holds last keyframe after end).\n const anim = element.animate(keyframes, {\n duration: action.duration,\n delay: action.delay,\n easing: action.easing,\n fill: 'both',\n });\n\n if (this.ENTRANCE_TYPES.has(action.type)) {\n anim.finished.then(() => {\n element.style.removeProperty('pointer-events');\n element.removeAttribute('data-iox-hidden');\n this.preStatedElements.delete(element);\n // Builder: clear inline pre-state so cancelling animations later\n // doesn't leave the element invisible after a play preview.\n if (this.isBuilderMode()) this.clearInlineAnimationStyles(element);\n }).catch(() => {});\n } else if (this.EXIT_TYPES.has(action.type)) {\n // Once the exit animation finishes the element is invisible —\n // disable pointer events so it doesn't silently block clicks underneath it.\n anim.finished.then(() => {\n element.style.setProperty('pointer-events', 'none');\n }).catch(() => {});\n }\n }\n\n /**\n * Freeze an element at the animation's starting frame immediately, before any\n * trigger fires. Called for ALL entrance-type actions regardless of trigger so\n * that a click-triggered fadeIn on a menu overlay also starts it hidden.\n *\n * In builder mode only opacity:0 is applied — transforms on canvas elements\n * inside iox-page-component's scale() transform break Lenis scroll. The transform\n * jump at animation t=0 is invisible because the element is already opacity:0.\n * In production the full keyframe is applied + pointer-events:none.\n */\n private applyPreState(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n const first = keyframes[0] as Record<string, string>;\n if (this.isBuilderMode()) {\n // No transforms — inline transforms on children inside iox-page-component's\n // scale() break Lenis scroll. pointer-events:none lets wheel events and\n // hover fall through to visible elements underneath.\n element.style.setProperty('opacity', '0');\n element.style.setProperty('pointer-events', 'none');\n } else {\n for (const [prop, val] of Object.entries(first)) {\n (element.style as any)[prop] = String(val);\n }\n element.style.setProperty('pointer-events', 'none');\n }\n element.setAttribute('data-iox-hidden', '');\n this.preStatedElements.add(element);\n }\n\n private clearInlineAnimationStyles(element: HTMLElement): void {\n element.style.removeProperty('opacity');\n element.style.removeProperty('transform');\n element.style.removeProperty('visibility');\n element.style.removeProperty('pointer-events');\n element.removeAttribute('data-iox-hidden');\n }\n\n private reverseAction(element: HTMLElement, action: InteractionAction): void {\n const { keyframes } = this.buildAnimation(action);\n if (!keyframes.length) return;\n\n // Reverse: play the keyframes backwards\n element.animate([...keyframes].reverse(), {\n duration: action.duration,\n easing: action.easing,\n fill: 'forwards',\n });\n }\n\n private buildAnimation(action: InteractionAction): { keyframes: Keyframe[]; options: KeyframeAnimationOptions } {\n const dist = action.params?.['distance'] ?? 20;\n let keyframes: Keyframe[] = [];\n\n switch (action.type) {\n case 'fadeIn':\n keyframes = [{ opacity: 0 }, { opacity: 1 }];\n break;\n case 'fadeOut':\n keyframes = [{ opacity: 1 }, { opacity: 0 }];\n break;\n case 'moveUp':\n keyframes = [{ transform: `translateY(${dist}px)`, opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }];\n break;\n case 'moveDown':\n keyframes = [{ transform: `translateY(-${dist}px)`, opacity: 0 }, { transform: 'translateY(0)', opacity: 1 }];\n break;\n case 'moveLeft':\n keyframes = [{ transform: `translateX(${dist}px)`, opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }];\n break;\n case 'moveRight':\n keyframes = [{ transform: `translateX(-${dist}px)`, opacity: 0 }, { transform: 'translateX(0)', opacity: 1 }];\n break;\n case 'scaleIn':\n keyframes = [{ transform: 'scale(0.8)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }];\n break;\n case 'scaleOut':\n keyframes = [{ transform: 'scale(1)', opacity: 1 }, { transform: 'scale(0.8)', opacity: 0 }];\n break;\n case 'rotate':\n const deg = action.params?.['degrees'] ?? 360;\n keyframes = [{ transform: `rotate(0deg)` }, { transform: `rotate(${deg}deg)` }];\n break;\n case 'show':\n keyframes = [{ opacity: 0, visibility: 'hidden' }, { opacity: 1, visibility: 'visible' }];\n break;\n case 'hide':\n keyframes = [{ opacity: 1, visibility: 'visible' }, { opacity: 0, visibility: 'hidden' }];\n break;\n case 'toggleVisibility':\n // Toggle is stateful — handled separately via element style\n keyframes = [{ opacity: 0 }, { opacity: 1 }];\n break;\n }\n\n return {\n keyframes,\n options: {\n duration: action.duration,\n delay: action.delay,\n easing: action.easing,\n fill: 'forwards',\n },\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { InteractionPreset } from '../models/component.model';\n\n/**\n * InteractionPresetRegistryService — in-memory store for org-level interaction presets.\n *\n * Loaded once per page by PageUiComponent alongside the page layout.\n * Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.\n */\n@Injectable()\nexport class InteractionPresetRegistryService {\n private presets = new Map<string, InteractionPreset>();\n\n setPresets(presets: InteractionPreset[]): void {\n this.presets.clear();\n for (const p of presets) {\n this.presets.set(p.id, p);\n }\n }\n\n getPreset(id: string): InteractionPreset | undefined {\n return this.presets.get(id);\n }\n\n getAll(): InteractionPreset[] {\n return Array.from(this.presets.values());\n }\n\n upsert(preset: InteractionPreset): void {\n this.presets.set(preset.id, preset);\n }\n\n remove(id: string): void {\n this.presets.delete(id);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\nexport interface BuilderClipboard {\n node?: ComponentNode;\n presetId?: string;\n interactionPresetId?: string;\n}\n\n/**\n * BuilderClipboardService — in-memory typed clipboard for the page builder.\n *\n * Stores element copies, style preset references, and interaction preset references.\n * Lives in memory only — no navigator.clipboard usage.\n * Scoped to PageUiComponent.providers[] — one clipboard per builder instance.\n */\n@Injectable()\nexport class BuilderClipboardService {\n private _clip: BuilderClipboard = {};\n\n copyNode(node: ComponentNode): void {\n this._clip = { node: JSON.parse(JSON.stringify(node)) };\n }\n\n copyPreset(presetId: string): void {\n this._clip = { ...this._clip, presetId };\n }\n\n copyInteractionPreset(interactionPresetId: string): void {\n this._clip = { ...this._clip, interactionPresetId };\n }\n\n getNode(): ComponentNode | undefined { return this._clip.node; }\n getPresetId(): string | undefined { return this._clip.presetId; }\n getInteractionPresetId(): string | undefined { return this._clip.interactionPresetId; }\n\n clear(): void { this._clip = {}; }\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ElementState, STRUCTURAL_STATES, RELATIONAL_STATES, RELATIONAL_STATE_BASE, TARGETED_STATES, TARGETED_STATE_BASE } from '../models/component.model';\nimport {\n BREAKPOINTS, BreakpointQueryKind, buildTargetedStateSelector, compileDeclarations, DeclarationContext,\n OverrideBreakpoint, planResponsiveRules, resolveStyleProps, ResponsiveOverrides, wrapInBreakpointQuery,\n} from '@vectoriox/iox-ui';\n\n/**\n * CSS container name of the builder canvas frame (and of the global-elements overlay). Breakpoint\n * rules are emitted as `@container iox-canvas (max-width: …)`: the frame's layout width IS the\n * simulated viewport and is unaffected by the zoom `transform: scale`, whereas a `@media` query\n * would read the editor window. Set on the frame in builder.component.scss.\n */\nexport const BUILDER_CANVAS_CONTAINER = 'iox-canvas';\n\n/** The parent / trigger scope a relational or targeted state rule was last emitted with. */\ninterface StateScope {\n relativeToId?: string;\n triggerId?: string;\n}\n\n/** What a node's breakpoint rules are derived from — kept so they can be re-emitted when a\n * state scope arrives later (relational scopes resolve only after the parent renders). */\ninterface ResponsiveInput {\n styleProps: Record<string, any>;\n stateStyles: Record<string, Record<string, any>> | undefined;\n responsive: ResponsiveOverrides;\n}\n\n/**\n * StyleRegistryService — manages a single <style> tag for the builder canvas.\n *\n * Each builder component gets two CSS classes:\n * .iox-node-{id} — applied to the inner element; handles layout/visual props\n * (display, flex, background, border, padding, etc.)\n * .iox-outer-{id} — applied to the host element by RenderDirective; handles\n * properties that participate in the PARENT flow (margin,\n * align-self, flex-grow/shrink/basis, order).\n *\n * This split is necessary because margin on an inner wrapper only adds internal\n * space — it does not push sibling elements. Applying margin to the host element\n * (which IS the flex/block child in the parent container) makes it work correctly.\n *\n * State styles (hover/active/focus) are stored under key `${nodeId}:${state}`\n * and compiled to `.iox-node-{id}:hover { … }` selectors.\n *\n * Design token variables are stored under the reserved key `__tokens__` and\n * compiled to a `:root { … }` block prepended to all other rules.\n *\n * Scoped to PageUiComponent.providers[] — one stylesheet per builder instance.\n */\n@Injectable()\nexport class StyleRegistryService {\n readonly changes$ = new Subject<void>();\n\n private rules = new Map<string, string>();\n /** Breakpoint rules, kept apart so they flush AFTER every base rule — equal specificity, so\n * source order decides (plan trap 1). Keyed per breakpoint like `rules` (`id`, `id:state`). */\n private responsiveRules = new Map<OverrideBreakpoint, Map<string, string>>();\n private responsiveInputs = new Map<string, ResponsiveInput>();\n /** Which breakpoint rule keys each node owns — so re-emitting one node's rules is O(its rules),\n * not a scan of every breakpoint rule on the page (this runs on every node render). */\n private responsiveKeys = new Map<string, Array<[OverrideBreakpoint, string]>>();\n private stateScopes = new Map<string, StateScope>();\n private styleEl: HTMLStyleElement | null = null;\n\n /**\n * Properties that must live on the OUTER wrapper (.iox-outer-{id}) because they\n * affect how the element participates in its PARENT layout (flex/block flow).\n * Everything else goes to the INNER element (.iox-node-{id}).\n *\n * Exception — out-of-flow positioning (position:fixed/absolute):\n * When position is fixed or absolute, width is redirected to the inner element\n * (the positioned one) and a default width:100% is added if none is set, so the\n * element stays visible. top/right/bottom/left/zIndex are always inner because\n * they are co-ordinates of the positioned element, not the flow wrapper.\n * position itself goes to inner with `!important` to beat component-scoped CSS.\n */\n private static readonly OUTER_PROPS = new Set([\n 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft',\n 'alignSelf', 'flexGrow', 'flexShrink', 'flexBasis', 'order',\n // Grid-child placement — like the flex-child props above, these position the node\n // within the PARENT's grid, so they must land on the outer host, not the inner div.\n 'gridColumn', 'gridRow', 'justifySelf',\n 'width',\n ]);\n\n /** Properties that need !important on the inner element to beat Angular's scoped-CSS specificity boost. */\n private static readonly IMPORTANT_PROPS = new Set(['position']);\n\n init(): void {\n this.styleEl = document.createElement('style');\n this.styleEl.id = 'iox-runtime-styles';\n document.head.appendChild(this.styleEl);\n }\n\n /**\n * Write or update the base styles for a node, or a pseudo-class state override.\n *\n * @param nodeId The node's CSS id (used in `.iox-node-{nodeId}`)\n * @param styles Flat CSS property map (camelCase keys)\n * @param state Optional pseudo-class state ('hover' | 'active' | 'focus' | …).\n * When provided, compiles to `.iox-node-{id}:{state} { … }`.\n * State rules are NOT partitioned into inner/outer.\n * @param relativeToId For RELATIONAL states (e.g. 'parent-hover') this is the ancestor\n * css id; compiles to `.iox-node-{relativeToId}:{base} .iox-node-{nodeId} { … }`.\n * For TARGETED states (e.g. 'trigger-hover') this is the SCOPE css id\n * (nearest common ancestor of the styled node + trigger).\n * @param triggerId For TARGETED states only: the css id of the trigger node whose\n * pseudo-class drives the state. Compiles a `:has()`-scoped selector.\n */\n upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string, triggerId?: string): void {\n if (!nodeId) return;\n\n if (state) {\n const key = `${nodeId}:${state}`;\n // Remember the scope a relational / targeted rule was given, so the same state at a\n // breakpoint is scoped identically without re-resolving it (see upsertResponsive).\n if (relativeToId || triggerId) this.stateScopes.set(key, { relativeToId, triggerId });\n const selector = this.stateSelector(nodeId, state, relativeToId, triggerId);\n const css = selector ? this.compile(selector, styles) : '';\n if (css) this.rules.set(key, css);\n else this.rules.delete(key);\n if (this.responsiveInputs.has(nodeId)) this.emitResponsive(nodeId);\n this.flush();\n return;\n }\n\n const { main, marker } = this.nodeRuleCss(nodeId, styles, this.isOutOfFlow(styles), DeclarationContext.Base);\n if (marker) this.rules.set(`${nodeId}::marker`, marker);\n else this.rules.delete(`${nodeId}::marker`);\n if (main) this.rules.set(nodeId, main);\n else this.rules.delete(nodeId);\n this.flush();\n }\n\n /**\n * Emit (or clear) a node's breakpoint rules. `planResponsiveRules` — shared with the SSR engine —\n * decides what each breakpoint emits; this only turns it into selectors, through the SAME\n * inner/outer split and state selectors as the base rules, compiled in the Override context\n * (a CSS initial value undoes the wider rule there, so it must not be dropped).\n *\n * @param styleProps The node's full BASE style map (raw — virtual traits not yet composed).\n */\n upsertResponsive(\n nodeId: string,\n styleProps: Record<string, any>,\n stateStyles: Record<string, Record<string, any>> | undefined,\n responsive: ResponsiveOverrides | undefined,\n ): void {\n if (!nodeId) return;\n const hasOverrides = !!responsive && Object.keys(responsive).length > 0;\n // The common case — a node with no overrides that never had any — costs nothing.\n if (!hasOverrides && !this.responsiveInputs.has(nodeId)) return;\n if (hasOverrides) this.responsiveInputs.set(nodeId, { styleProps, stateStyles, responsive: responsive! });\n else this.responsiveInputs.delete(nodeId);\n this.emitResponsive(nodeId);\n this.flush();\n }\n\n private emitResponsive(nodeId: string): void {\n this.clearResponsive(nodeId);\n const input = this.responsiveInputs.get(nodeId);\n if (!input) return;\n for (const layer of planResponsiveRules(input.styleProps, input.stateStyles, input.responsive)) {\n const bp = layer.breakpoint;\n // Where `width` lands depends on the position in force AT this breakpoint.\n const outOfFlow = this.isOutOfFlow(resolveStyleProps(input.styleProps, input.responsive, bp));\n const { main, marker } = this.nodeRuleCss(nodeId, layer.styleProps, outOfFlow, DeclarationContext.Override);\n if (main) this.setResponsiveRule(nodeId, bp, nodeId, main);\n if (marker) this.setResponsiveRule(nodeId, bp, `${nodeId}::marker`, marker);\n for (const [state, map] of Object.entries(layer.stateStyles)) {\n const scope = this.stateScopes.get(`${nodeId}:${state}`);\n const selector = this.stateSelector(nodeId, state as ElementState, scope?.relativeToId, scope?.triggerId);\n // A relational/targeted state whose scope isn't known yet is skipped; it is re-emitted\n // when the base state rule arrives with its scope (see upsert).\n const css = selector ? this.compile(selector, map, DeclarationContext.Override) : '';\n if (css) this.setResponsiveRule(nodeId, bp, `${nodeId}:${state}`, css);\n }\n }\n }\n\n private setResponsiveRule(nodeId: string, bp: OverrideBreakpoint, key: string, css: string): void {\n let bucket = this.responsiveRules.get(bp);\n if (!bucket) this.responsiveRules.set(bp, (bucket = new Map()));\n bucket.set(key, css);\n let owned = this.responsiveKeys.get(nodeId);\n if (!owned) this.responsiveKeys.set(nodeId, (owned = []));\n owned.push([bp, key]);\n }\n\n private clearResponsive(nodeId: string): void {\n for (const [bp, key] of this.responsiveKeys.get(nodeId) ?? []) this.responsiveRules.get(bp)?.delete(key);\n this.responsiveKeys.delete(nodeId);\n }\n\n private isOutOfFlow(styles: Record<string, any>): boolean {\n const pos = String(styles['position'] ?? '');\n return pos === 'fixed' || pos === 'absolute';\n }\n\n /**\n * The selector BODY (no leading dot) for a state rule, or null when a relational / targeted\n * state has no scope yet (emitting it unscoped would be wrong — a page-global `:has()`).\n */\n private stateSelector(nodeId: string, state: ElementState, relativeToId?: string, triggerId?: string): string | null {\n // Targeted states (trigger-hover): the styled node restyles when an ARBITRARY chosen\n // element is hovered. The selector is `:has()`-scoped to `relativeToId` (the nearest\n // common ancestor of styled + trigger) so it stays repetition-safe with one shared rule.\n if ((TARGETED_STATES as string[]).includes(state)) {\n const base = TARGETED_STATE_BASE[state];\n return relativeToId && triggerId && base\n ? buildTargetedStateSelector(relativeToId, triggerId, nodeId, base) : null;\n }\n // Relational states (parent-hover): the pseudo-class lives on an ANCESTOR\n // and cascades to this element. Requires the ancestor's css id.\n if ((RELATIONAL_STATES as string[]).includes(state)) {\n const base = RELATIONAL_STATE_BASE[state];\n return relativeToId && base ? `iox-node-${relativeToId}:${base} .iox-node-${nodeId}` : null;\n }\n // Structural pseudo-classes (first-child, last-child, nth-child) target the\n // outer wrapper element so they participate correctly in grid/flex layout.\n const prefix = (STRUCTURAL_STATES as string[]).includes(state) ? 'iox-outer' : 'iox-node';\n return `${prefix}-${nodeId}:${state}`;\n }\n\n /**\n * The inner + outer rule (joined) and the `::marker` rule for one composed style map.\n * `isOutOfFlow` is passed in rather than read from `styles` because a breakpoint layer is\n * sparse — the position in force may come from a wider layer.\n */\n private nodeRuleCss(nodeId: string, styles: Record<string, any>, isOutOfFlow: boolean, context: DeclarationContext): { main: string; marker: string } {\n // ::marker pseudo-element — emitted as a separate rule, not part of inner/outer split.\n const markerStyles = styles['__markerStyles'] as Record<string, any> | undefined;\n const marker = markerStyles && Object.keys(markerStyles).length\n ? this.compile(`iox-node-${nodeId}::marker`, markerStyles, context) : '';\n\n const inner: Record<string, any> = {};\n const outer: Record<string, any> = {};\n for (const [k, v] of Object.entries(styles)) {\n if (k === '__markerStyles') continue;\n const wantsOuter = StyleRegistryService.OUTER_PROPS.has(k);\n // width goes to inner for fixed/absolute (the positioned element owns its own width)\n if (wantsOuter && !(isOutOfFlow && k === 'width')) {\n outer[k] = v;\n } else {\n inner[k] = v;\n }\n }\n // Ensure fixed/absolute elements stay visible when no explicit width is set. A base-rule\n // render default only — a sparse breakpoint layer must not invent a width.\n if (context === DeclarationContext.Base && isOutOfFlow && inner['width'] === undefined) {\n inner['width'] = '100%';\n }\n const innerCss = this.compile(`iox-node-${nodeId}`, inner, context);\n const outerCss = this.compile(`iox-outer-${nodeId}`, outer, context);\n return { main: [innerCss, outerCss].filter(Boolean).join('\\n'), marker };\n }\n\n /**\n * Write the org-level design token variables as a `:root { … }` block.\n * Token names should be CSS custom property names without the `--` prefix\n * (e.g., `{ 'iox-primary-color': '#cb9090' }`).\n * Pass an empty object to clear all tokens.\n */\n upsertTokens(tokens: Record<string, string>): void {\n const entries = Object.entries(tokens)\n .filter(([, v]) => v !== undefined && v !== null && v !== '')\n .map(([k, v]) => ` --${k}: ${v};`);\n if (entries.length) {\n this.rules.set('__tokens__', `:root {\\n${entries.join('\\n')}\\n}`);\n } else {\n this.rules.delete('__tokens__');\n }\n this.flush();\n }\n\n remove(nodeId: string): void {\n if (!nodeId) return;\n // Remove base rule and all state rules for this node\n this.rules.delete(nodeId);\n for (const key of this.rules.keys()) {\n if (key.startsWith(`${nodeId}:`)) {\n this.rules.delete(key);\n }\n }\n for (const key of this.stateScopes.keys()) {\n if (key.startsWith(`${nodeId}:`)) this.stateScopes.delete(key);\n }\n this.responsiveInputs.delete(nodeId);\n this.clearResponsive(nodeId);\n this.flush();\n }\n\n destroy(): void {\n this.rules.clear();\n this.responsiveRules.clear();\n this.responsiveInputs.clear();\n this.responsiveKeys.clear();\n this.stateScopes.clear();\n if (this.styleEl) {\n this.styleEl.remove();\n this.styleEl = null;\n }\n }\n\n private compile(className: string, styles: Record<string, any>, context: DeclarationContext = DeclarationContext.Base): string {\n // Declaration compilation (kebab-case, viewport-unit rewrite, !important) lives in\n // the shared style-compiler so the SSR engine produces byte-identical output.\n // The inner/outer partition + selector emission stay here (builder-only concern).\n const decls = compileDeclarations(styles, StyleRegistryService.IMPORTANT_PROPS, context);\n if (!decls.length) return '';\n const body = decls.map(d => ` ${d};`).join('\\n');\n return `.${className} {\\n${body}\\n}`;\n }\n\n private _flushPending = false;\n\n private flush(): void {\n if (!this.styleEl || this._flushPending) return;\n this._flushPending = true;\n requestAnimationFrame(() => {\n this._flushPending = false;\n if (!this.styleEl) return;\n // __tokens__ always first so variables are available to all subsequent rules\n const tokenBlock = this.rules.get('__tokens__');\n const rest = Array.from(this.rules.entries())\n .filter(([k]) => k !== '__tokens__')\n .map(([, v]) => v);\n // Breakpoint rules LAST, widest → narrowest, each as a canvas container query.\n const breakpoints = BREAKPOINTS\n .map(({ id }) => this.responsiveRules.get(id as OverrideBreakpoint))\n .map((bucket, i) => bucket?.size\n ? wrapInBreakpointQuery(BREAKPOINTS[i].id, Array.from(bucket.values()).join('\\n'),\n BreakpointQueryKind.Container, BUILDER_CANVAS_CONTAINER)\n : '');\n this.styleEl.textContent = [tokenBlock, ...rest, ...breakpoints].filter(Boolean).join('\\n');\n this.changes$.next();\n });\n }\n}\n","import { ChangeDetectorRef, Injectable } from '@angular/core';\nimport Moveable from 'moveable';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService, DragPayload } from './drag-engine.service';\nimport { StyleRegistryService } from './style-registry.service';\n\n/**\n * MoveableCanvasService — Phase 1 of the Moveable + Selecto migration\n * (see iox-ai-guidance/architecture/builder/moveable-migration.md).\n *\n * Drives DRAG for the SELECTED element via Moveable instead of interact.js, while REUSING the\n * proven reorder machinery (`DragEngineService.handleDrop`). It is a pure INPUT device: during a\n * drag it applies a TRANSIENT transform, and on drop it RESETS the transform to nothing and instead\n * reorders the layout tree (constraint C1 — a persisted transform on an in-flow canvas element\n * breaks Lenis scroll). Everything here runs ONLY when `moveableMode` is on; interact.js is\n * untouched, so the flag-off path is byte-identical to today.\n *\n * Scale: Moveable reads `getBoundingClientRect()` (already post-scale) and works in viewport\n * client coordinates, so drop hit-testing via `elementsFromPoint` / rects is scale-correct without\n * extra math. The control box is rendered into the same overlay container the selection overlay uses.\n */\n@Injectable({ providedIn: 'root' })\nexport class MoveableCanvasService {\n private moveable: Moveable | null = null;\n private container: HTMLElement | null = null;\n private scaleGetter: () => number = () => 1;\n\n private target: HTMLElement | null = null;\n private node: ComponentNode | null = null;\n private sourceId: string | null = null;\n /** A rubber-band multi-select group is active; `groupAt` guards the immediate follow-up click. */\n private groupActive = false;\n private groupAt = 0;\n\n /** Called after a successful reorder so the host can emit LAYOUT_CHANGED / refresh selection. */\n onReorder: (() => void) | null = null;\n /** Called after a geometry commit (resize) so the host can emit LAYOUT_CHANGED (undo/save). */\n onLayoutChanged: (() => void) | null = null;\n\n constructor(\n private dragEngine: DragEngineService,\n private styleRegistry: StyleRegistryService,\n ) {}\n\n /** Preview device viewport size (CSS px) — reference for vw/vh unit conversion on resize. */\n private viewportGetter: () => { width: number; height: number } = () => ({ width: 0, height: 0 });\n\n /** Wire the Moveable control box into `container`; `scaleGetter` returns the live canvas zoom;\n * `viewportGetter` returns the previewed device viewport size (for vw/vh resize conversion). */\n init(container: HTMLElement, scaleGetter: () => number, viewportGetter?: () => { width: number; height: number }): void {\n this.container = container;\n this.scaleGetter = scaleGetter;\n if (viewportGetter) this.viewportGetter = viewportGetter;\n }\n\n /** Point Moveable at the selected element (skips inline-edit + preview-clone targets). */\n select(element: HTMLElement | null, node: ComponentNode | null): void {\n // Swallow the deselect+click that fire on the SAME mouseup that just ended a rubber-band\n // group selection — otherwise the trailing clearSelect (→ destroyMoveable) or click would\n // instantly collapse the fresh group. Must run BEFORE the null-check below. A later,\n // deliberate click is well outside the ~250ms window and clears the group normally.\n if (this.groupActive && Date.now() - this.groupAt < 250) return;\n this.groupActive = false;\n\n this.target = null;\n this.node = null;\n this.sourceId = null;\n if (!element || !node || !this.container) { this.destroyMoveable(); return; }\n // Preview clones (repeater/slider rows) and hidden nodes are not editable.\n if (element.closest('[data-iox-hidden]') || (node as any).__previewClone) { this.destroyMoveable(); return; }\n\n this.target = element;\n this.node = node;\n this.sourceId = this.resolveDropzoneId(element);\n this.ensureMoveable();\n // Single selection: the OverlayService draws the outline, so Moveable stays line-less (a\n // group selection re-enables the lines in selectGroup).\n (this.moveable as any).hideDefaultLines = true;\n this.moveable!.target = element;\n // Snap against sibling/cousin nodes (not self, ancestors, or own descendants).\n (this.moveable as any).elementGuidelines = this.guidelines(element);\n // Drag is initiated by grabbing the ELEMENT itself (like interact.js) — not a Moveable\n // overlay area — so a plain click still passes through to selection/child-selection and only\n // a movement past the threshold starts a drag. Keeps Moveable visually silent (no hit-area box).\n (this.moveable as any).dragTarget = element;\n this.moveable!.updateRect();\n }\n\n /**\n * Multi-select group (Selecto rubber-band → group move). With 2+ targets Moveable shows its\n * bounding box + handles for the whole group; with ≤1 it defers to the normal single-select\n * path (select()), which keeps the OverlayService as the sole owner of single-selection visuals.\n * Returns true when a group is active so the host can skip the single-select wiring.\n */\n selectGroup(elements: HTMLElement[]): boolean {\n const visible = (elements || []).filter(el => {\n if (el.closest('[data-iox-hidden]')) return false;\n // Out-of-flow (fixed/absolute) nodes are positioned independently — grouping them with\n // in-flow siblings for a reflow-move is meaningless, and a fixed node's control-box\n // measurement is unreliable in the transformed canvas (see moveable-migration.md gap).\n const pos = getComputedStyle(el).position;\n return pos !== 'fixed' && pos !== 'absolute' && pos !== 'sticky';\n });\n // Keep only the TOP-MOST selected nodes — Moveable can't group an element with its own\n // descendant, and moving a parent already moves its children (the rubber band grabs both).\n const targets = visible.filter(el => !visible.some(other => other !== el && other.contains(el)));\n if (targets.length <= 1) { return false; }\n this.target = null;\n this.node = null;\n this.groupActive = true;\n this.groupAt = Date.now();\n this.ensureMoveable();\n // A GROUP box is a legitimate visual (nothing single-select in the overlay to duplicate).\n (this.moveable as any).hideDefaultLines = false;\n this.moveable!.target = targets as any;\n this.moveable!.updateRect();\n return true;\n }\n\n /** Recompute the control-box position (call on scroll/zoom/layout changes). */\n refresh(): void { this.moveable?.updateRect(); }\n\n /** Snap guideline elements for `target`: every node host except itself, its ancestors, and its\n * own descendants — i.e. siblings/cousins to align edges/centers against. */\n private guidelines(target: HTMLElement): HTMLElement[] {\n if (!this.container) return [];\n const all = Array.from(this.container.querySelectorAll<HTMLElement>('[class*=\"iox-node-\"]'));\n return all.filter(el => el !== target && !target.contains(el) && !el.contains(target));\n }\n\n destroy(): void { this.destroyMoveable(); this.container = null; }\n\n // ── internals ────────────────────────────────────────────────────────────\n\n private ensureMoveable(): void {\n if (this.moveable) return;\n this.moveable = new Moveable(this.container!, {\n target: undefined,\n draggable: true,\n resizable: true, // Phase 3 — corner handles → styleProps width/height (C2)\n rotatable: false, // (out-of-flow only — C1)\n origin: false,\n zoom: 1,\n // The OverlayService owns ALL selection visuals (pink outline, hover margin/padding rings,\n // toolbar, badges) — Moveable draws NO box/lines. It shows ONLY the 4 corner RESIZE handles\n // (renderDirections) and provides the drag hit-area. `iox-moveable-silent` + SCSS in\n // builder.component.scss hide the lines and style the handles to match, below the overlay.\n hideDefaultLines: true,\n renderDirections: ['nw', 'ne', 'sw', 'se'],\n className: 'iox-moveable-silent',\n // Snap-to-guides: align edges/centers to sibling elements while dragging/resizing, with\n // the distance readout. elementGuidelines are refreshed per selection (see select()).\n snappable: true,\n snapThreshold: 6,\n snapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },\n elementSnapDirections: { top: true, left: true, bottom: true, right: true, center: true, middle: true },\n snapGap: true,\n isDisplaySnapDigit: true,\n } as any);\n\n this.moveable.on('dragStart', (e) => {\n // Never start a drag from inside inline text editing.\n if ((e.inputEvent?.target as HTMLElement)?.closest?.('[contenteditable=\"true\"]')) {\n e.stop?.();\n }\n });\n // Transient transform only — visual feedback during the drag (C1: reset on drop).\n this.moveable.on('drag', (e) => { e.target.style.transform = e.transform; });\n this.moveable.on('dragEnd', (e) => this.commitDrag(e));\n\n // Resize: live inline width/height for feedback, then commit to styleProps on end (C2 — never\n // a transform:scale, so no Lenis-scroll break; the panel + save + SSR all see the real size).\n this.moveable.on('resize', (e) => {\n e.target.style.width = `${Math.round(e.width)}px`;\n e.target.style.height = `${Math.round(e.height)}px`;\n e.target.style.transform = e.drag.transform; // keeps the box anchored while resizing\n });\n this.moveable.on('resizeEnd', (e) => this.commitResize(e));\n }\n\n private destroyMoveable(): void {\n if (this.moveable) { this.moveable.destroy(); this.moveable = null; }\n }\n\n private commitDrag(e: any): void {\n const el = e.target as HTMLElement;\n // C1: never persist the transform — reset it; the result is a tree reorder, not a position.\n el.style.transform = '';\n if (!this.node) return;\n\n const pointer = this.lastPointer(e);\n if (!pointer) { this.onReorder?.(); return; }\n\n const targetId = this.dropzoneUnderPoint(pointer.x, pointer.y, el);\n if (!targetId) { this.onReorder?.(); return; }\n\n const children = this.dragEngine.getData(targetId) as ComponentNode[] | undefined;\n const cdr = this.dragEngine.getCdr(targetId) as ChangeDetectorRef | undefined;\n if (!children || !cdr) { this.onReorder?.(); return; }\n\n const insertIndex = this.calcInsertIndex(targetId, pointer.y);\n const srcChildren = this.sourceId ? (this.dragEngine.getData(this.sourceId) as ComponentNode[] | undefined) : undefined;\n const sourceIndex = srcChildren ? srcChildren.indexOf(this.node) : -1;\n const payload: DragPayload = { type: 'internal', data: this.node, sourceId: this.sourceId ?? null, sourceIndex };\n this.dragEngine.handleDrop(children, { payload, targetId, insertIndex }, targetId, cdr, () => {\n this.onReorder?.();\n // Re-point the control box at the moved element's (possibly new) host.\n setTimeout(() => this.moveable?.updateRect(), 0);\n });\n }\n\n private commitResize(e: any): void {\n const el = e.target as HTMLElement;\n el.style.transform = ''; // C1: never persist a transform on an in-flow canvas element\n if (!this.node) { return; }\n const last = e.lastEvent ?? e;\n const wPx = last.width ?? el.getBoundingClientRect().width;\n const hPx = last.height ?? el.getBoundingClientRect().height;\n // C2: geometry goes to styleProps (width/height) — never a transform:scale. Keep the unit the\n // user CONFIGURED (%, vw, em, …) instead of always forcing px.\n this.applyStyle(this.node, {\n width: this.toConfiguredUnit(wPx, this.currentStyleValue('width'), el, 'width'),\n height: this.toConfiguredUnit(hPx, this.currentStyleValue('height'), el, 'height'),\n });\n // Clear the transient inline size so the styleProps `.iox-node` rule drives it (single source).\n el.style.width = '';\n el.style.height = '';\n this.onLayoutChanged?.();\n setTimeout(() => this.moveable?.updateRect(), 0);\n }\n\n /** The node's currently-configured value for a style trait (e.g. '100%', '120px'). */\n private currentStyleValue(name: string): string | undefined {\n for (const group of ((this.node as any)?.styleTraits ?? [])) {\n for (const trait of (group.traits ?? [])) {\n if (trait.name === name) return trait.default;\n }\n }\n return undefined;\n }\n\n /** Convert a pixel measurement into the unit the user configured, so resizing from the canvas\n * preserves %, vw/vh, em/rem etc. instead of always writing px. */\n private toConfiguredUnit(px: number, current: string | undefined, el: HTMLElement, axis: 'width' | 'height'): string {\n const round = (n: number) => Math.round(n * 100) / 100;\n const m = String(current ?? '').trim().match(/(px|%|vw|vh|vmin|vmax|rem|em)\\s*$/);\n const unit = m ? m[1] : 'px';\n switch (unit) {\n case '%': {\n const ref = axis === 'width' ? (el.parentElement?.clientWidth ?? 0) : (el.parentElement?.clientHeight ?? 0);\n return ref > 0 ? `${round(px / ref * 100)}%` : `${Math.round(px)}px`;\n }\n case 'vw': { const vw = this.viewportGetter().width; return vw > 0 ? `${round(px / vw * 100)}vw` : `${Math.round(px)}px`; }\n case 'vh': { const vh = this.viewportGetter().height; return vh > 0 ? `${round(px / vh * 100)}vh` : `${Math.round(px)}px`; }\n case 'vmin': { const { width, height } = this.viewportGetter(); const base = Math.min(width, height); return base > 0 ? `${round(px / base * 100)}vmin` : `${Math.round(px)}px`; }\n case 'vmax': { const { width, height } = this.viewportGetter(); const base = Math.max(width, height); return base > 0 ? `${round(px / base * 100)}vmax` : `${Math.round(px)}px`; }\n case 'rem': { const fs = parseFloat(getComputedStyle(el.ownerDocument.documentElement).fontSize) || 16; return `${round(px / fs)}rem`; }\n case 'em': { const fs = parseFloat(getComputedStyle(el).fontSize) || 16; return `${round(px / fs)}em`; }\n default: return `${Math.round(px)}px`;\n }\n }\n\n /** Write geometry changes into the node's styleTraits (the serialized source of truth) and the\n * central stylesheet, so the style panel, save (self-describing), and SSR engine all agree. */\n private applyStyle(node: ComponentNode, changes: Record<string, string>): void {\n const styles: Record<string, any> = {};\n for (const group of ((node as any).styleTraits ?? [])) {\n for (const trait of (group.traits ?? [])) {\n if (trait.name in changes) trait.default = changes[trait.name];\n if (trait.name !== undefined && trait.default !== undefined) styles[trait.name] = trait.default;\n }\n }\n const cssId = (node as any).styleId ?? node.id;\n if (cssId) this.styleRegistry.upsert(cssId, styles);\n }\n\n /** Final pointer position from the Moveable end event (client/viewport px). */\n private lastPointer(e: any): { x: number; y: number } | null {\n const ie = e.inputEvent as MouseEvent | undefined;\n if (ie && typeof ie.clientX === 'number') return { x: ie.clientX, y: ie.clientY };\n if (Array.isArray(e.clientX)) return { x: e.clientX[0], y: e.clientY[0] };\n if (typeof e.clientX === 'number') return { x: e.clientX, y: e.clientY };\n return null;\n }\n\n /** Walk up from an element to the nearest registered dropzone id (el.id is stamped by DragEngine). */\n private resolveDropzoneId(el: HTMLElement | null): string | null {\n let e: HTMLElement | null = el;\n while (e) {\n if (e.id && this.dragEngine.getData(e.id) !== undefined) return e.id;\n e = e.parentElement;\n }\n return null;\n }\n\n /** Topmost registered dropzone under the pointer that is NOT inside the dragged element's subtree. */\n private dropzoneUnderPoint(x: number, y: number, draggedEl: HTMLElement): string | null {\n const stack = document.elementsFromPoint(x, y) as HTMLElement[];\n for (const el of stack) {\n const id = this.resolveDropzoneId(el);\n if (!id) continue;\n const zoneEl = document.getElementById(id);\n if (zoneEl && draggedEl.contains(zoneEl)) continue; // don't drop into own subtree\n return id;\n }\n return null;\n }\n\n /** Insertion index within a dropzone by comparing pointer Y to each child's vertical midpoint. */\n private calcInsertIndex(targetId: string, y: number): number {\n const zoneEl = document.getElementById(targetId);\n if (!zoneEl) return 0;\n const childWraps = Array.from(zoneEl.children).filter(\n (c) => (c as HTMLElement).matches('.container-child, .section-child, [data-iox-draggable]'),\n ) as HTMLElement[];\n let idx = 0;\n for (const w of childWraps) {\n const r = w.getBoundingClientRect();\n if (y > r.top + r.height / 2) idx++;\n }\n return idx;\n }\n}\n","import { Injectable } from '@angular/core';\nimport Selecto from 'selecto';\n\n/**\n * SelectoCanvasService — Phase 1 of the Moveable + Selecto migration\n * (see iox-ai-guidance/architecture/builder/moveable-migration.md).\n *\n * Rubber-band MULTI-select on the canvas. Runs ONLY when `moveableMode` is on; interact.js is\n * untouched, so the flag-off path is byte-identical to today.\n *\n * - `selectFromInside: false` — a drag that STARTS on a node moves it (Moveable); the rubber band\n * only starts from empty canvas space, so single-element drag/select is unaffected.\n * - `selectByClick: false` — a plain click still flows through the existing single-select path\n * (OverlayService), so nothing about clicking changes.\n * - `rootContainer` is the UNtransformed `.preview` (Selecto explicitly wants a non-transformed\n * root): the rubber band and the targets' client rects are then in the same viewport space, so\n * hit-testing is correct even though the canvas content is `transform: scale()`d.\n *\n * On a rubber-band release it emits the selected node host elements; the host maps them to nodes and\n * drives Moveable with the group (see MoveableCanvasService.selectGroup).\n */\n@Injectable({ providedIn: 'root' })\nexport class SelectoCanvasService {\n private selecto: Selecto | null = null;\n\n /** Called on rubber-band release with the selected `.iox-node-*` host elements (may be empty). */\n onSelect: ((elements: HTMLElement[]) => void) | null = null;\n\n /** Count from the last rubber-band release (state/telemetry). */\n lastSelectedCount = 0;\n\n /**\n * Wire Selecto onto the canvas.\n * @param container untransformed element the rubber band renders into (`.preview`).\n * @param dragContainer element the drag is listened on (the same `.preview`).\n * @param selectableRoot the node container whose `.iox-node-*` descendants are selectable.\n */\n init(container: HTMLElement, dragContainer: HTMLElement, selectableRoot: HTMLElement): void {\n this.destroy();\n this.selecto = new Selecto({\n container,\n rootContainer: container,\n dragContainer,\n // Only real node hosts inside the canvas — never overlay/toolbar chrome.\n selectableTargets: [`#${selectableRoot.id || 'canvas-preview'} [class*=\"iox-node-\"]`],\n selectByClick: false,\n selectFromInside: false,\n hitRate: 0, // any intersection selects — forgiving rubber band\n });\n this.selecto.on('selectEnd', (e: any) => {\n this.lastSelectedCount = (e.selected as HTMLElement[]).length;\n this.onSelect?.((e.selected as HTMLElement[]).filter(el => !!el));\n });\n }\n\n /** Keep Selecto's selectable set fresh after layout changes (nodes added/removed/reordered). */\n refresh(): void { /* selectableTargets is a live function — nothing to recompute */ }\n\n destroy(): void {\n this.selecto?.destroy();\n this.selecto = null;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentRef,\n Directive,\n EnvironmentInjector,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewContainerRef,\n createComponent,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { safeSetInput, stateNamesIn } from '@vectoriox/iox-ui';\n\nimport { ComponentNode, ElementState, RELATIONAL_STATES, TARGETED_STATES } from '../models/component.model';\nimport { ComponentRegistryService } from '../services/component-registry.service';\nimport { DragEngineService } from '../services/drag-engine.service';\nimport { OverlayService } from '../overlay/overlay.service';\nimport { StyleRegistryService } from '../services/style-registry.service';\nimport { InteractionEngineService } from '../services/interaction-engine.service';\nimport { PanelEventService, PanelEventTypes } from '../panels/panel-event.service';\nimport { composeVirtualTraits } from '../style-compose';\n\n// Module-level counter — unique drop-list ID per Section instance across the whole app session.\nlet dropListCounter = 0;\n\n/**\n * Node types whose iox-ui component is a DIRECTIVE-HOST (element+attribute selector on the real\n * tag, e.g. `img[iox-img]`, `h1[iox-heading]`). The host IS the element, so we must NOT force an\n * inline `display:block` (it out-ranks both `:host` and the styleProps `.iox-node` rule — the same\n * bug the SSR engine hit). Mirrors the engine's DIRECTIVE_HOST_TYPES for the leaf/variable-tag set.\n * NOTE: Container/Section/List/ListItem render via iox-BUILDER wrapper components here (not\n * directive-hosts), so they are intentionally excluded.\n */\nconst DIRECTIVE_HOST_TYPES = new Set<string>([\n 'Image', 'Icon', 'Divider', 'Spacer', 'Button', 'Link', 'Heading', 'Text', 'ButtonBlock',\n // Phase 2 (9c): layout components converted to directive-hosts (host IS the real tag).\n 'Section', 'Container', 'List', 'ListItem',\n]);\n\nconst CONTAINER_TAGS = ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'];\n\n/**\n * RenderDirective — applied to <ng-container> to dynamically instantiate a\n * builder component with zero wrapper elements in the DOM.\n *\n * A directive's ViewContainerRef inserts the created component's host element as\n * a sibling of the ng-container comment node — directly inside the parent element\n * — so the resulting DOM has no extra <app-renderer> wrapper.\n *\n * Usage:\n * <ng-container [ioxRender]=\"node\"\n * (onClick)=\"handleClick($event)\"\n * (onMouseEnter)=\"handleMouseEnter($event)\"\n * (onMouseLeave)=\"handleMouseLeave()\">\n * </ng-container>\n */\n@Directive({\n selector: '[ioxRender]',\n standalone: false,\n})\nexport class RenderDirective implements OnInit, OnDestroy {\n @Input() ioxRender: ComponentNode | null = null;\n /**\n * WRAPPER-COLLAPSE opt-in (task 9c). When a parent renders a child DIRECTLY (no `iox-outer`\n * wrapper div), it passes the parent dropzone id here. The RenderDirective then puts the\n * `iox-outer-{id}` class on the node HOST (so the host is the single flex/grid item carrying both\n * `iox-outer` + `iox-node`, like the SSR engine) and registers drag on the host. When unset\n * (`null`), the legacy path is byte-identical — the parent's wrapper owns `iox-outer` + drag.\n */\n @Input() ioxDragSourceId: string | null = null;\n @Output() onClick = new EventEmitter<any>();\n @Output() onMouseEnter = new EventEmitter<any>();\n @Output() onMouseLeave = new EventEmitter<any>();\n\n private childSubs: Subscription[] = [];\n /** Host element drag was registered on (collapsed path) — unregistered on destroy. */\n private hostDragEl: HTMLElement | null = null;\n\n constructor(\n private vcr: ViewContainerRef,\n private injector: Injector,\n private envInjector: EnvironmentInjector,\n @Inject(DOCUMENT) private doc: Document,\n private registryService: ComponentRegistryService,\n private overlayService: OverlayService,\n private styleRegistry: StyleRegistryService,\n private interactionEngine: InteractionEngineService,\n private cdr: ChangeDetectorRef,\n private panelEventService: PanelEventService,\n private dragEngine: DragEngineService,\n ) {}\n\n /**\n * Tag for a variable-tag directive-host (whose selector lists several tags, so\n * `vcr.createComponent` would always pick the first). Reads the value from the node's traits.\n * Returns null for fixed-tag hosts and non-directive-host components.\n */\n private variableTag(node: ComponentNode): string | null {\n const traitVal = (name: string): any =>\n (Object.values(node.traits || {}) as any[]).find(t => t?.name === name)?.default;\n switch (node.type) {\n case 'Heading': {\n const l = traitVal('level');\n return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(l) ? l : 'h2';\n }\n case 'Text':\n return traitVal('tag') === 'span' ? 'span' : 'p';\n case 'ButtonBlock':\n return traitVal('tag') === 'a' ? 'a' : 'button';\n case 'Container':\n case 'List':\n case 'ListItem': {\n const t = traitVal('htmlTag');\n if (CONTAINER_TAGS.includes(t)) return t;\n return node.type === 'List' ? 'ul' : node.type === 'ListItem' ? 'li' : 'div';\n }\n default:\n return null;\n }\n }\n\n ngOnInit(): void {\n this.render(this.ioxRender);\n }\n\n ngOnDestroy(): void {\n this.childSubs.forEach(s => s.unsubscribe());\n if (this.hostDragEl) { this.dragEngine.unregisterDraggable(this.hostDragEl); this.hostDragEl = null; }\n if (this.ioxRender) {\n this.interactionEngine.detach(this.ioxRender);\n this.overlayService.unregisterNode(this.ioxRender);\n // Only remove the CSS rule if this node OWNS it (i.e. it is not a clone).\n // Clones set styleId to point at the template node's id — removing would\n // destroy the shared rule and break all other rows.\n const isClone = !!this.ioxRender.styleId;\n if (!isClone && this.ioxRender.id) {\n this.styleRegistry.remove(this.ioxRender.id);\n }\n }\n }\n\n /**\n * Walk up from `target` to find a registered parent component element.\n * Returns { element, node } if found, or null if the target is outside\n * all known builder components (e.g. the canvas background).\n */\n /**\n * The nearest ancestor node's cssId, read from the DOM `iox-node-{id}` classes (NOT the overlay\n * registry — at state-restore time the parent isn't registered yet, since it registers only\n * AFTER rendering its children). Used to key relational (parent-hover) rules. (issue #1)\n */\n private resolveParentNodeId(childEl: HTMLElement | null): string | undefined {\n let el = childEl?.parentElement ?? null;\n while (el) {\n for (let i = 0; i < el.classList.length; i++) {\n const c = el.classList[i];\n if (c.startsWith('iox-node-')) return c.slice('iox-node-'.length);\n }\n el = el.parentElement;\n }\n return undefined;\n }\n\n /** Nearest ANCESTOR of the styled element that is a registered iox-node AND contains the trigger\n * element — i.e. the DOM equivalent of `nearestCommonAncestorId`, resolved per rendered instance.\n * Used to re-emit a `trigger-hover` rule after a move/duplicate. Returns undefined if the trigger\n * isn't in the DOM yet (caller then skips rather than clobbering the existing rule). */\n private resolveTargetedScopeId(styledEl: HTMLElement | null, triggerCssId: string): string | undefined {\n let el = styledEl?.parentElement ?? null;\n while (el) {\n let cssId: string | undefined;\n for (let i = 0; i < el.classList.length; i++) {\n const c = el.classList[i];\n if (c.startsWith('iox-node-')) { cssId = c.slice('iox-node-'.length); break; }\n }\n if (cssId && el.querySelector(`.iox-node-${triggerCssId}`)) return cssId;\n el = el.parentElement;\n }\n return undefined;\n }\n\n private findParentNodeElement(target: HTMLElement): { element: HTMLElement; node: ComponentNode } | null {\n let el: HTMLElement | null = target;\n while (el) {\n const match = this.overlayService.findNodeByElement(el);\n if (match) {\n return { element: el, node: match.node };\n }\n el = el.parentElement;\n }\n return null;\n }\n\n private render(node: ComponentNode | null): void {\n if (!node) return;\n\n const componentClass = this.registryService.getComponent(node.type);\n if (!componentClass) return;\n\n // vcr.createComponent inserts the new component's host element after the ng-container\n // comment anchor — directly inside the parent element. No wrapper div is created.\n // Variable-tag directive-hosts (Heading/Text/ButtonBlock) list every allowed tag in their\n // selector, so vcr.createComponent would always pick the FIRST — create them on an explicit\n // hostElement of the right tag and insert that view instead (mirrors the SSR engine).\n const tag = this.variableTag(node);\n let componentRef: ComponentRef<any>;\n if (tag) {\n const hostElement = this.doc.createElement(tag);\n componentRef = createComponent(componentClass, {\n environmentInjector: this.envInjector,\n elementInjector: this.injector,\n hostElement,\n });\n this.vcr.insert(componentRef.hostView);\n } else {\n componentRef = this.vcr.createComponent(componentClass, { injector: this.injector });\n }\n\n // Apply regular trait defaults (title, image, description, etc.). safeSetInput() uses\n // setInput() for declared inputs (marks the view dirty, integrates with CD + signal inputs)\n // and falls back to direct assignment for anything the component doesn't declare — so a\n // trait that has no matching @Input (e.g. `sourcePath` on a SliderContainer) never emits the\n // NG0303 console error that a bare setInput() would. Skip SectionLabel traits — they are\n // UI-only panel headers with no matching input.\n Object.values(node.traits || {}).forEach((trait: any) => {\n if (trait.type === 'sectionLabel') return;\n safeSetInput(componentRef, trait.name, trait.default);\n });\n\n // Per-breakpoint TRAIT overrides — the same hand-off the SSR engine makes. A component that\n // declares a `responsive` input (SliderContainer) converts it to its own width config, so the\n // canvas and the live site agree without the canvas needing a resize listener. Dropped by\n // safeSetInput for every component that does not declare it.\n if ((node as any).responsive) safeSetInput(componentRef, 'responsive', (node as any).responsive);\n\n // Build initial style map from styleTraits defaults.\n const initialStyle: Record<string, any> = {};\n if (node.styleTraits?.length) {\n for (const group of node.styleTraits) {\n for (const trait of group.traits) {\n if (trait.default !== undefined) {\n initialStyle[trait.name] = trait.default;\n }\n }\n }\n }\n\n // Use styleId when present (clone nodes share the template node's CSS rule).\n const cssId = node.styleId ?? node.id;\n\n // Register CSS rules in the central stylesheet (inner + outer split).\n if (cssId) {\n const composedBase = composeVirtualTraits(initialStyle);\n this.styleRegistry.upsert(cssId, composedBase);\n // Restore per-state overrides saved from a previous session.\n // Every state set at base OR at any breakpoint — so a breakpoint-only state (a Mobile-only\n // parent-hover) still has its scope resolved and recorded for its breakpoint rule.\n const stateNames = stateNamesIn(node.stateStyles as any, node.responsive) as ElementState[];\n if (stateNames.length) {\n const childEl = componentRef.location?.nativeElement as HTMLElement | null;\n for (const state of stateNames) {\n const baseMap = (node.stateStyles as Record<string, any> | undefined)?.[state] ?? {};\n // A state set only at a breakpoint has no base rule: upsert an EMPTY map (records the\n // scope, emits nothing) rather than composing an empty override against the base,\n // which would re-declare the base's transform/filter as a pointless hover rule.\n const stateMap = Object.keys(baseMap).length ? baseMap : null;\n if ((RELATIONAL_STATES as string[]).includes(state)) {\n // Relational states (parent-hover) compile to\n // `.iox-node-{parentId}:hover .iox-node-{childId}` — they need the CURRENT parent id.\n // Resolve it from the DOM so the rule re-resolves after a cross-container MOVE (which\n // re-renders the child). If it can't be resolved yet (initial load: the parent registers\n // its class only after rendering its children), SKIP — do NOT clobber the correct rule\n // that page-ui's applyStateEnhancements already produced from the node tree. (issue #1)\n const relativeToId = this.resolveParentNodeId(childEl);\n if (!relativeToId) continue;\n this.styleRegistry.upsert(cssId, stateMap ? composeVirtualTraits(stateMap, initialStyle) : {}, state, relativeToId);\n } else if ((TARGETED_STATES as string[]).includes(state)) {\n // Targeted states (trigger-hover) compile to a `:has()` scoped to the nearest\n // common ancestor of the styled node + the chosen trigger. On a re-render (move,\n // duplicate, drop) we must RE-EMIT with a freshly-resolved scope — otherwise the\n // rule is clobbered and the hover stops working. Resolve the scope from the live\n // DOM (works per-instance); SKIP if the trigger isn't rendered yet, so we don't\n // clobber the correct rule page-ui's applyStateEnhancements already produced.\n const triggerCssId = node.stateTriggers?.[state];\n if (!triggerCssId) continue;\n const scopeId = this.resolveTargetedScopeId(childEl, triggerCssId);\n if (!scopeId) continue;\n this.styleRegistry.upsert(cssId, stateMap ? composeVirtualTraits(stateMap, initialStyle) : {}, state, scopeId, triggerCssId);\n } else if (stateMap) {\n this.styleRegistry.upsert(cssId, composeVirtualTraits(stateMap, initialStyle), state);\n }\n }\n }\n // Breakpoint layers — AFTER the state loop, so every scope resolved above is recorded.\n this.styleRegistry.upsertResponsive(cssId, initialStyle, node.stateStyles as any, node.responsive);\n }\n\n // Set nodeId — declared as @Input() on every builder component.\n if (cssId) {\n componentRef.setInput('nodeId', cssId);\n }\n\n // Pass the node reference. 'node' is NOT declared as @Input on leaf\n // components (Card, Text, etc.) — always use direct assignment to avoid\n // Angular NG0303 warnings that setInput() would trigger.\n (componentRef.instance as any)['node'] = node;\n\n // Layout components (Section/Container) read this.style internally for\n // CDK drop list orientation. 'style' is not declared as @Input so use\n // direct assignment; children and dropListId ARE @Input on all layouts.\n // Guard with Array.isArray so leaf nodes whose serialized data happens\n // to have a stale/empty children key don't trigger NG0303.\n const instance = componentRef.instance as any;\n if (Array.isArray(node.children) && 'dropListId' in instance) {\n instance['style'] = { ...initialStyle };\n componentRef.setInput('children', node.children);\n componentRef.setInput('dropListId', `section-${++dropListCounter}`);\n }\n\n // Forward child events from layout components (Section → builder)\n const childClick: EventEmitter<any> = instance['childClick'];\n const childMouseEnter: EventEmitter<any> = instance['childMouseEnter'];\n const childMouseLeave: EventEmitter<any> = instance['childMouseLeave'];\n if (childClick) this.childSubs.push(childClick.subscribe((e: any) => this.onClick.emit(e)));\n if (childMouseEnter) this.childSubs.push(childMouseEnter.subscribe((e: any) => this.onMouseEnter.emit(e)));\n if (childMouseLeave) this.childSubs.push(childMouseLeave.subscribe(() => this.onMouseLeave.emit()));\n\n componentRef.changeDetectorRef.detectChanges();\n\n // Attach overlay-driven DOM event listeners directly on the component host element.\n // For layout components the host element is <app-section>; for leaf components\n // it is e.g. <app-card>. Either way this is the correct inspectable element.\n const nativeEl: HTMLElement | null = componentRef.location?.nativeElement ?? null;\n\n // Custom element host defaults to display:inline. Set it to block so it participates\n // properly in layout and CDK can capture its bounding rect. SKIP for directive-hosts: the\n // host is a real element with its own display, and an inline style here out-ranks both\n // `:host` and the styleProps `.iox-node` rule (it would e.g. force Link's <a> to block).\n if (nativeEl && !DIRECTIVE_HOST_TYPES.has(node.type)) {\n nativeEl.style.display = 'block';\n }\n // Preview clones (repeater/slider-generated rows) are display-only — only the\n // template node is selectable/editable. Skip overlay registration + interaction\n // wiring for them so they can't be hovered, selected, or edited on the canvas.\n const isPreviewClone = !!(node as any).__previewClone;\n if (nativeEl && !isPreviewClone) {\n // WRAPPER-COLLAPSE (opt-in via ioxDragSourceId): the HOST is the flex/grid item, so it\n // carries `iox-outer-{id}` (margin/width) IN ADDITION to `iox-node-{id}` (visual) — one\n // element, like the engine — and drag is registered on it (the wrapper is gone). The\n // StyleRegistry's split still works: both classes are on this one host.\n if (this.ioxDragSourceId != null && cssId) {\n nativeEl.classList.add(`iox-outer-${cssId}`);\n const sourceId = this.ioxDragSourceId;\n this.dragEngine.registerDraggable(nativeEl, () => ({\n type: 'internal' as const,\n data: node,\n sourceId,\n sourceIndex: this.dragEngine.getData(sourceId)?.indexOf(node) ?? -1,\n }));\n this.hostDragEl = nativeEl;\n }\n // Register node → element mapping for parent lookups\n this.overlayService.registerNode(node, nativeEl, componentRef);\n // Notify BindingsComponent so it re-applies bindings on the new\n // ComponentRef — needed after cross-container drag where Angular\n // creates a fresh instance that hasn't had bindings pushed to it yet.\n this.panelEventService.emit(PanelEventTypes.NODE_RENDERED, { node });\n\n nativeEl.addEventListener('mouseenter', (event: MouseEvent) => {\n if ((event as any)._fromClick) return;\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onMouseEnter.emit({ element: nativeEl, node });\n });\n nativeEl.addEventListener('mouseleave', (event: MouseEvent) => {\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n // When leaving a child component, check if the mouse moved to a\n // parent component (e.g. card → section). If so, emit mouseenter\n // for that parent instead of clearing hover entirely.\n const related = event.relatedTarget as HTMLElement | null;\n if (related) {\n const parentEntry = this.findParentNodeElement(related);\n if (parentEntry) {\n this.onMouseEnter.emit(parentEntry);\n return;\n }\n }\n this.onMouseLeave.emit();\n });\n nativeEl.addEventListener('click', (event: MouseEvent) => {\n event.stopPropagation();\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onClick.emit({ element: nativeEl, node, componentRef });\n });\n nativeEl.addEventListener('contextmenu', (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (nativeEl.hasAttribute('data-iox-hidden')) return;\n this.onClick.emit({ element: nativeEl, node, componentRef });\n this.overlayService.triggerContextMenu(event.clientX, event.clientY);\n });\n }\n\n // Wire up interactions (animations) after the element is in the DOM. Preview clones are\n // non-selectable (not overlay-registered) but MUST still animate — parity with the SSR\n // runtime, which animates every repeated row — so attach by element (issue #2).\n if (!isPreviewClone) {\n this.interactionEngine.attach(node);\n } else if (nativeEl) {\n this.interactionEngine.attachTo(node, nativeEl);\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { StylePreset } from '../models/component.model';\n\n/**\n * PresetRegistryService — in-memory store for org-level style presets.\n *\n * Loaded once per page by PageUiComponent (alongside the page layout) and\n * injected into the overlay (for badge labels) and style panel (for apply /\n * create / edit / detach flows).\n *\n * Scoped to PageUiComponent.providers[] — one registry per builder instance.\n */\n@Injectable()\nexport class PresetRegistryService {\n private presets = new Map<string, StylePreset>();\n\n setPresets(presets: StylePreset[]): void {\n this.presets.clear();\n for (const p of presets) {\n this.presets.set(p.id, p);\n }\n }\n\n getPreset(id: string): StylePreset | undefined {\n return this.presets.get(id);\n }\n\n getAll(): StylePreset[] {\n return Array.from(this.presets.values());\n }\n\n upsert(preset: StylePreset): void {\n this.presets.set(preset.id, preset);\n }\n\n remove(id: string): void {\n this.presets.delete(id);\n }\n\n /**\n * Resolve the effective style map for a node that references a preset.\n * Merges preset base styles with the node's local overrides so that\n * element-level values always win.\n *\n * @param presetId ID of the applied preset.\n * @param overrides The node's `styleOverrides` record (may be empty).\n */\n resolveStyles(presetId: string, overrides: Record<string, any>): Record<string, any> {\n const preset = this.presets.get(presetId);\n if (!preset) return { ...overrides };\n return { ...preset.styleProps, ...overrides };\n }\n}\n","import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService } from '../services/drag-engine.service';\n\n@Directive({\n selector: '[ioxDraggable]',\n standalone: false,\n})\nexport class IoxDraggableDirective implements OnInit, OnDestroy {\n /** The node (for canvas items) or component type string (for sidebar items). */\n @Input() ioxDragData: ComponentNode | string = '';\n /** Drop-zone id the item lives in. Null for sidebar items. */\n @Input() ioxDragSourceId: string | null = null;\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n ) {}\n\n ngOnInit(): void {\n this.dragEngine.registerDraggable(this.el.nativeElement, () => {\n const data = this.ioxDragData;\n const type: 'internal' | 'external' = typeof data === 'string' ? 'external' : 'internal';\n const sourceIndex = type === 'internal' && this.ioxDragSourceId\n ? (this.dragEngine.getData(this.ioxDragSourceId)?.indexOf(data as ComponentNode) ?? -1)\n : -1;\n return { type, data, sourceId: this.ioxDragSourceId, sourceIndex };\n });\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDraggable(this.el.nativeElement);\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { OverlayEntry, OverlayService, ToolbarAction } from './overlay.service';\nimport { IoxInteraction } from '../models/component.model';\nimport { ViewportService } from '../services/viewport.service';\nimport { PresetRegistryService } from '../services/preset-registry.service';\nimport { SymbolRegistryService } from '../services/symbol-registry.service';\nimport { InteractionPresetRegistryService } from '../services/interaction-preset-registry.service';\nimport { InteractionEngineService } from '../services/interaction-engine.service';\nimport { BuilderClipboardService } from '../services/builder-clipboard.service';\nimport { StyleRegistryService } from '../services/style-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../panels/panel-event.service';\nimport { DragEngineService } from '../services/drag-engine.service';\n\n@Component({\n selector: 'app-overlay',\n templateUrl: './overlay.component.html',\n styleUrls: ['./overlay.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OverlayComponent implements OnInit, OnDestroy {\n @Output() toolbarAction = new EventEmitter<{ action: ToolbarAction; entry: OverlayEntry; position?: 'before' | 'after'; interaction?: IoxInteraction; wrapType?: string }>();\n\n /** Element types the selected node can be wrapped in (Wrap-in submenu). Phase 1: layout containers. */\n readonly wrapTargets: { type: string; label: string; icon: string }[] = [\n { type: 'Container', label: 'Container', icon: 'ph-thin ph-square' },\n { type: 'LinkedContainer', label: 'Linked Container', icon: 'ph-thin ph-link-simple' },\n ];\n\n /** Whether the Wrap-in flyout submenu is open (hover-driven). */\n public wrapSubmenuOpen = false;\n\n public hoverEntry: OverlayEntry | null = null;\n public selectEntry: OverlayEntry | null = null;\n\n // Hover: Chrome DevTools-style ring layers (clip-path punches out content area)\n public hiOutlineStyle: Record<string, string> = {};\n public hiMarginStyle: Record<string, string> = {};\n public hiPaddingStyle: Record<string, string> = {};\n\n // Select: simple IOX pink outline\n public selectOutlineStyle: Record<string, string> = {};\n\n // More dropdown — opened from the ⋯ button or from a right-click.\n // Position is set to fixed viewport coords so it appears at the cursor.\n public moreMenuVisible = false;\n public moreMenuStyle: Record<string, string> = {};\n\n // Badge context menu — opened by right-clicking a preset badge.\n public badgeMenuVisible = false;\n public badgeMenuType: 'style' | 'interaction' | null = null;\n public badgeMenuPos = { x: 0, y: 0 };\n // The specific IoxInteraction being right-clicked (interaction badges only).\n public badgeInteraction: IoxInteraction | null = null;\n\n // Tracks which badge was last clicked — used by Cmd+C in page-ui.\n public activeBadgeType: 'style' | 'interaction' | null = null;\n\n private subs: Subscription[] = [];\n private resizeObserver?: ResizeObserver;\n private containerResizeObserver?: ResizeObserver;\n private mutationObserver?: MutationObserver;\n // All overlay repositioning is funnelled through a single coalesced RAF.\n // Observer callbacks (Resize/Mutation) MUST NOT call updateAll()/markForCheck()\n // synchronously — during a live interaction animation they can fire while\n // Angular is inside ApplicationRef.synchronize(), re-dirtying the view within\n // the same loop and blowing past MAX_SYNC_RUNS → NG0103. scheduleUpdate() defers\n // the markForCheck to the next frame, outside the current synchronize() pass,\n // and collapses a burst of notifications into one update per frame.\n private _updateRaf = 0;\n private scheduleUpdate = (): void => {\n cancelAnimationFrame(this._updateRaf);\n this._updateRaf = requestAnimationFrame(() => this.updateAll());\n };\n private boundUpdate = () => this.scheduleUpdate();\n private boundScrollUpdate = () => this.scheduleUpdate();\n private activeScrollContainer: HTMLElement | null = null;\n\n constructor(\n private overlayService: OverlayService,\n private viewportService: ViewportService,\n private presetRegistry: PresetRegistryService,\n private symbolRegistry: SymbolRegistryService,\n private interactionPresetRegistry: InteractionPresetRegistryService,\n private interactionEngine: InteractionEngineService,\n private clipboard: BuilderClipboardService,\n private styleRegistry: StyleRegistryService,\n private panelEventService: PanelEventService,\n private cdr: ChangeDetectorRef,\n private dragEngine: DragEngineService,\n ) {}\n\n /** Resolves the selected node's OWNING dropzone id dynamically — the drag-handle isn't\n * rendered inside any container (it's overlay chrome), so it has no source id of its own. */\n get dragHandleSourceId(): string | null {\n const node = this.selectEntry?.node;\n return node ? this.dragEngine.findSourceIdForNode(node) : null;\n }\n\n ngOnInit(): void {\n this.subs.push(\n this.overlayService.hover$.subscribe(entry => {\n this.hoverEntry = entry;\n this.updateHover();\n this.cdr.markForCheck();\n }),\n this.overlayService.select$.subscribe(entry => {\n this.selectEntry = entry;\n if (!entry) this.activeBadgeType = null;\n this.observeSelectElement();\n this.updateSelect();\n this.cdr.markForCheck();\n })\n );\n\n window.addEventListener('resize', this.boundUpdate, { passive: true });\n\n // Re-calculate overlay positions whenever zoom / device changes.\n this.subs.push(\n this.viewportService.state$.subscribe(() => {\n // Delay one frame so the DOM has applied the new transform/width.\n this.scheduleUpdate();\n })\n );\n\n // Re-calculate when CSS rules change (margin/width applied via stylesheet).\n this.subs.push(\n this.styleRegistry.changes$.subscribe(() => this.scheduleUpdate())\n );\n\n // Watch the canvas container for size changes (e.g. right panel open/close\n // transition changes canvas width, shifting element positions).\n const container = this.overlayService.getContainer();\n if (container) {\n if (typeof ResizeObserver !== 'undefined') {\n this.containerResizeObserver = new ResizeObserver(this.scheduleUpdate);\n this.containerResizeObserver.observe(container);\n }\n }\n\n // iox-page-component's Lenis dispatches a synthetic 'scroll' event on\n // its wrapper element after each raf tick — listen to that to reposition\n // overlay boxes as the canvas scrolls.\n this.subs.push(\n this.overlayService.scrollContainer$.subscribe(el => {\n this.activeScrollContainer?.removeEventListener('scroll', this.boundScrollUpdate);\n this.activeScrollContainer = el;\n el.addEventListener('scroll', this.boundScrollUpdate, { passive: true });\n })\n );\n\n // Open the more menu when a canvas element is right-clicked.\n this.subs.push(\n this.overlayService.contextMenu$.subscribe(({ x, y }) => {\n this.moreMenuStyle = { top: `${y}px`, left: `${x}px` };\n this.moreMenuVisible = true;\n this.cdr.markForCheck();\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subs.forEach(s => s.unsubscribe());\n this.resizeObserver?.disconnect();\n this.containerResizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n cancelAnimationFrame(this._updateRaf);\n window.removeEventListener('resize', this.boundUpdate);\n this.activeScrollContainer?.removeEventListener('scroll', this.boundScrollUpdate);\n this.activeScrollContainer = null;\n }\n\n // ── Toolbar actions ──────────────────────────────────────\n onSelectParent(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.SelectParent, entry: this.selectEntry });\n }\n\n /** Quick-add (B2): open the components panel. The new element lands inside this node when it is\n * a container, otherwise right after it. */\n onAddElement(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.AddElement, entry: this.selectEntry });\n }\n\n onDuplicate(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Duplicate, entry: this.selectEntry });\n }\n\n onDelete(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Delete, entry: this.selectEntry });\n }\n\n onWrap(event: MouseEvent, wrapType: string): void {\n event.stopPropagation();\n this.wrapSubmenuOpen = false;\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Wrap, entry: this.selectEntry, wrapType });\n }\n\n /** Slider slides must stay direct children of the slider container — never wrap them. */\n get canWrap(): boolean {\n const type = this.selectEntry?.node?.type;\n return !!type && type !== 'SliderSlide';\n }\n\n onPlay(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Play, entry: this.selectEntry });\n }\n\n onSaveAsBlock(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.SaveAsBlock, entry: this.selectEntry });\n }\n\n onToggleMore(event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n if (this.moreMenuVisible) {\n this.moreMenuVisible = false;\n } else {\n this.moreMenuStyle = { top: `${event.clientY}px`, left: `${event.clientX}px` };\n this.moreMenuVisible = true;\n }\n this.cdr.markForCheck();\n }\n\n closeMoreMenu(): void {\n this.moreMenuVisible = false;\n this.wrapSubmenuOpen = false;\n this.cdr.markForCheck();\n }\n\n onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.moreMenuStyle = { top: `${event.clientY}px`, left: `${event.clientX}px` };\n this.moreMenuVisible = true;\n this.cdr.markForCheck();\n }\n\n onMakeGlobal(event: MouseEvent, position: 'before' | 'after'): void {\n event.stopPropagation();\n this.closeMoreMenu();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.MakeGlobal, entry: this.selectEntry, position });\n }\n\n onRemoveGlobal(event: MouseEvent): void {\n event.stopPropagation();\n this.closeMoreMenu();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.RemoveGlobal, entry: this.selectEntry });\n }\n\n get hasInteractions(): boolean {\n return !!this.selectEntry?.node?.interactions?.length;\n }\n\n get selectedNodeIsGlobal(): boolean {\n return !!this.selectEntry?.node?.isGlobal;\n }\n\n get selectedPresetName(): string | null {\n const id = this.selectEntry?.node?.stylePresetId;\n if (!id) return null;\n return this.presetRegistry.getPreset(id)?.name ?? null;\n }\n\n get isLinkedSymbol(): boolean {\n return !!this.selectEntry?.node?.symbolId;\n }\n\n get isDetachedSymbol(): boolean {\n const node = this.selectEntry?.node;\n if (!node || node.symbolId || !node.detachedSymbolId) return false;\n // Only show the re-link button when the backing block still exists.\n return this.symbolRegistry.isBlockSymbol(node.detachedSymbolId);\n }\n\n get linkedSymbolName(): string | null {\n const id = this.selectEntry?.node?.symbolId;\n if (!id) return null;\n return this.symbolRegistry.getSymbol(id)?.name ?? null;\n }\n\n get interactions(): IoxInteraction[] {\n return this.selectEntry?.node?.interactions ?? [];\n }\n\n triggerLabel(trigger: string): string {\n const labels: Record<string, string> = {\n pageLoad: 'Load', viewportEnter: 'Scroll', click: 'Click',\n hover: 'Hover', scrollProgress: 'Progress',\n };\n return labels[trigger] ?? trigger;\n }\n\n triggerIcon(trigger: string): string {\n const icons: Record<string, string> = {\n pageLoad: 'ph-thin ph-rocket-launch', viewportEnter: 'ph-thin ph-eye',\n click: 'ph-thin ph-cursor-click', hover: 'ph-thin ph-hand-pointing',\n scrollProgress: 'ph-thin ph-arrows-down-up',\n };\n return icons[trigger] ?? 'ph-thin ph-lightning';\n }\n\n actionLabel(ix: IoxInteraction): string {\n const first = ix.actions[0];\n if (!first) return '';\n const labels: Record<string, string> = {\n fadeIn: 'Fade In', fadeOut: 'Fade Out',\n moveUp: 'Move Up', moveDown: 'Move Down',\n moveLeft: 'Move Left', moveRight: 'Move Right',\n scaleIn: 'Scale In', scaleOut: 'Scale Out',\n rotate: 'Rotate', show: 'Show', hide: 'Hide',\n toggleVisibility: 'Toggle',\n };\n const label = labels[first.type] ?? first.type;\n return ix.actions.length > 1 ? `${label} +${ix.actions.length - 1}` : label;\n }\n\n get hasPresetInClipboard(): boolean { return !!this.clipboard.getPresetId(); }\n get hasInteractionPresetInClipboard(): boolean { return !!this.clipboard.getInteractionPresetId(); }\n\n onEditPreset(event: MouseEvent): void {\n event.stopPropagation();\n this.activeBadgeType = 'style';\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.EditPreset, entry: this.selectEntry });\n }\n\n /**\n * Interaction badge clicked. It must ONLY open the Interactions panel with THIS interaction\n * active — it must NOT fire the element's (live) animation. `preventDefault` + `stopPropagation`\n * fully swallow the pointer event so it can never reach the node's live `click` interaction\n * listener. The specific `ix` is forwarded so the builder can expand it in the panel.\n */\n onEditInteractionPreset(event: MouseEvent, ix?: IoxInteraction): void {\n event.preventDefault();\n event.stopPropagation();\n this.activeBadgeType = 'interaction';\n if (this.selectEntry) {\n this.toolbarAction.emit({ action: ToolbarAction.EditInteractionPreset, entry: this.selectEntry, interaction: ix });\n }\n }\n\n /** Swallow the follow-up click on the badge so it can't reach the canvas / a live interaction. */\n onBadgeClickSwallow(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // ── Badge context menu ───────────────────────────────────\n\n onBadgeContextMenu(event: MouseEvent, type: 'style' | 'interaction', ix?: IoxInteraction): void {\n event.preventDefault();\n event.stopPropagation();\n this.badgeMenuType = type;\n this.badgeInteraction = ix ?? null;\n this.badgeMenuPos = { x: event.clientX, y: event.clientY };\n this.badgeMenuVisible = true;\n this.moreMenuVisible = false;\n this.cdr.markForCheck();\n }\n\n onBadgeCopy(): void {\n if (this.badgeMenuType === 'style') {\n const id = this.selectEntry?.node?.stylePresetId;\n if (id) this.clipboard.copyPreset(id);\n }\n this.closeBadgeMenu();\n }\n\n onBadgeEdit(): void {\n const type = this.badgeMenuType;\n this.closeBadgeMenu();\n if (type === 'style' && this.selectEntry) {\n this.activeBadgeType = 'style';\n this.toolbarAction.emit({ action: ToolbarAction.EditPreset, entry: this.selectEntry });\n } else if (type === 'interaction' && this.selectEntry) {\n this.activeBadgeType = 'interaction';\n this.toolbarAction.emit({ action: ToolbarAction.EditInteractionPreset, entry: this.selectEntry });\n }\n }\n\n onBadgeRemoveInteraction(): void {\n const node = this.selectEntry?.node;\n if (!node || !this.badgeInteraction) return;\n node.interactions = (node.interactions ?? []).filter(i => i.id !== this.badgeInteraction!.id);\n if (!node.interactions.length) node.interactionPresetId = undefined;\n this.interactionEngine.refresh(node);\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, node);\n this.closeBadgeMenu();\n }\n\n closeBadgeMenu(): void {\n this.badgeMenuVisible = false;\n this.cdr.markForCheck();\n }\n\n get hasCopiedNode(): boolean { return !!this.clipboard.getNode(); }\n\n onCopyNode(event: MouseEvent): void {\n event.stopPropagation();\n const node = this.selectEntry?.node;\n if (node) this.clipboard.copyNode(node);\n this.closeMoreMenu();\n }\n\n onPasteNode(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.Paste, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n onCopyPreset(event: MouseEvent): void {\n event.stopPropagation();\n const id = this.selectEntry?.node?.stylePresetId;\n if (id) this.clipboard.copyPreset(id);\n this.closeMoreMenu();\n }\n\n onPastePreset(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.PastePreset, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n onCopyInteractionPreset(event: MouseEvent): void {\n event.stopPropagation();\n const id = this.selectEntry?.node?.interactionPresetId;\n if (id) this.clipboard.copyInteractionPreset(id);\n this.closeMoreMenu();\n }\n\n onPasteInteractionPreset(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.PasteInteractionPreset, entry: this.selectEntry });\n this.closeMoreMenu();\n }\n\n get isSliderContainer(): boolean {\n return this.selectEntry?.node?.type === 'SliderContainer';\n }\n\n onAddSlide(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.AddSlide, entry: this.selectEntry });\n }\n\n onDetachSymbol(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.DetachSymbol, entry: this.selectEntry });\n }\n\n onResyncSymbol(event: MouseEvent): void {\n event.stopPropagation();\n if (this.selectEntry) this.toolbarAction.emit({ action: ToolbarAction.ResyncSymbol, entry: this.selectEntry });\n }\n\n private observeSelectElement(): void {\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n // Scroll listener is on the container permanently (attached in ngOnInit).\n // No need to re-attach it here.\n\n if (!this.selectEntry?.element) return;\n\n // Observe the inner styled element — that's where [ngStyle] applies CSS.\n const styledEl = this.overlayService.getStyledElement(this.selectEntry.element);\n\n // ResizeObserver — catches size changes.\n // Skip the first callback: it fires synchronously on observe() in the same\n // microtask as the select$ subscription which already calls updateAll().\n // Painting twice in one frame causes a visible flicker.\n if (typeof ResizeObserver !== 'undefined') {\n let skipFirst = true;\n this.resizeObserver = new ResizeObserver(() => {\n if (skipFirst) { skipFirst = false; return; }\n this.scheduleUpdate();\n });\n this.resizeObserver.observe(styledEl);\n }\n\n // MutationObserver — catches style attribute changes (margin, padding etc.)\n this.mutationObserver = new MutationObserver(this.scheduleUpdate);\n this.mutationObserver.observe(styledEl, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n\n private updateAll(): void {\n this.updateHover();\n this.updateSelect();\n this.cdr.markForCheck();\n }\n\n private updateHover(): void {\n if (!this.hoverEntry) {\n this.hiOutlineStyle = {};\n this.hiMarginStyle = {};\n this.hiPaddingStyle = {};\n return;\n }\n\n const styledEl = this.overlayService.getStyledElement(this.hoverEntry.element);\n const rect = styledEl.getBoundingClientRect();\n // Recalculate fresh — stored boxModel can be stale if CSS rules changed.\n const { margin, border, padding } = this.overlayService.buildBoxModel(this.hoverEntry.element);\n\n // All overlay boxes use position:fixed with raw viewport coords from\n // getBoundingClientRect() — no container offset subtraction.\n // This matches the approach used by the drop-target overlay and the drag\n // clone, both of which position correctly at any zoom level.\n // Using cRect subtraction + position:absolute inside .preview (which has\n // contain:layout paint) caused sub-pixel accumulation errors at zoom != 100%.\n const scale = this.viewportService.getScale();\n\n // Scale the spacing values: getComputedStyle returns unscaled CSS px,\n // getBoundingClientRect returns scaled viewport px. Both must match.\n const m = {\n top: margin.top * scale,\n right: margin.right * scale,\n bottom: margin.bottom * scale,\n left: margin.left * scale,\n };\n const mW = rect.width + m.left + m.right;\n const mH = rect.height + m.top + m.bottom;\n\n this.hiOutlineStyle = this.createBoxStyle(rect.top, rect.left, rect.width, rect.height);\n\n // Orange ring: margin-box with border-box punched out\n this.hiMarginStyle = {\n ...this.createBoxStyle(rect.top - m.top, rect.left - m.left, mW, mH),\n 'clip-path': this.createRingClipPath(mW, mH, m.top, m.right, m.bottom, m.left),\n };\n\n // Green ring: border-box with content-box punched out\n const bpTop = (border.top + padding.top) * scale;\n const bpRight = (border.right + padding.right) * scale;\n const bpBottom = (border.bottom + padding.bottom) * scale;\n const bpLeft = (border.left + padding.left) * scale;\n this.hiPaddingStyle = {\n ...this.createBoxStyle(rect.top, rect.left, rect.width, rect.height),\n 'clip-path': this.createRingClipPath(rect.width, rect.height, bpTop, bpRight, bpBottom, bpLeft),\n };\n }\n\n private updateSelect(): void {\n if (!this.selectEntry) {\n this.selectOutlineStyle = {};\n return;\n }\n\n const styledEl = this.overlayService.getStyledElement(this.selectEntry.element);\n const rect = styledEl.getBoundingClientRect();\n // position:fixed with raw viewport coords — same reasoning as updateHover.\n this.selectOutlineStyle = this.createBoxStyle(rect.top, rect.left, rect.width, rect.height);\n }\n\n /** Build position/size styles for a position:fixed overlay box. */\n private createBoxStyle(top: number, left: number, width: number, height: number): Record<string, string> {\n return {\n top: `${top}px`,\n left: `${left}px`,\n width: `${Math.max(width, 0)}px`,\n height: `${Math.max(height, 0)}px`,\n };\n }\n\n private createRingClipPath(w: number, h: number, inTop: number, inRight: number, inBottom: number, inLeft: number): string {\n const x1 = Math.max(inLeft, 0);\n const y1 = Math.max(inTop, 0);\n const x2 = Math.max(w - inRight, x1);\n const y2 = Math.max(h - inBottom, y1);\n // Each sub-rect must be explicitly closed so the bridge between them\n // is a zero-area line — prevents diagonal edge triangle artifacts.\n return `polygon(evenodd, 0px 0px, ${w}px 0px, ${w}px ${h}px, 0px ${h}px, 0px 0px, ${x1}px ${y1}px, ${x2}px ${y1}px, ${x2}px ${y2}px, ${x1}px ${y2}px, ${x1}px ${y1}px)`;\n }\n\n}\n","<div class=\"overlay-root\">\n\n <!-- HOVER — Chrome DevTools-style rings (content area stays transparent) -->\n <ng-container *ngIf=\"hoverEntry\">\n <div class=\"hi-outline\" [ngStyle]=\"hiOutlineStyle\"></div>\n <div class=\"hi-margin\" [ngStyle]=\"hiMarginStyle\"></div>\n <div class=\"hi-padding\" [ngStyle]=\"hiPaddingStyle\"></div>\n </ng-container>\n\n <!-- SELECT — IOX pink outline + toolbar -->\n <div class=\"select-outline\" *ngIf=\"selectEntry\" [ngStyle]=\"selectOutlineStyle\">\n\n <!-- Preset badges container — below the outline, start-aligned -->\n <div class=\"preset-badge\" *ngIf=\"selectedPresetName || interactions.length\">\n <div *ngIf=\"selectedPresetName\"\n class=\"preset-badge__item\"\n [class.preset-badge__item--active]=\"activeBadgeType === 'style'\"\n title=\"Style preset: {{ selectedPresetName }} — click to edit, right-click to copy\"\n (mousedown)=\"onEditPreset($event)\"\n (contextmenu)=\"onBadgeContextMenu($event, 'style')\">\n <i class=\"ph-fill ph-paint-bucket\"></i>\n <span>{{ selectedPresetName }}</span>\n </div>\n <div *ngFor=\"let ix of interactions\"\n class=\"preset-badge__item preset-badge__item--interaction\"\n [class.preset-badge__item--active]=\"activeBadgeType === 'interaction'\"\n [title]=\"triggerLabel(ix.trigger) + ': ' + actionLabel(ix) + ' — click to edit, right-click to remove'\"\n (mousedown)=\"onEditInteractionPreset($event, ix)\"\n (click)=\"onBadgeClickSwallow($event)\"\n (contextmenu)=\"onBadgeContextMenu($event, 'interaction', ix)\">\n <i [class]=\"triggerIcon(ix.trigger)\"></i>\n <span>{{ triggerLabel(ix.trigger) }}: {{ actionLabel(ix) }}</span>\n </div>\n </div>\n\n <div class=\"select-toolbar\" (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n\n <!-- Drag handle — grab here to move the selected element. A click-and-hold ANYWHERE\n on the element body would otherwise grab whatever nested child the pointer lands\n on; DragEngineService redirects any drag starting here to the selected node. -->\n <button *ngIf=\"selectEntry?.node\" class=\"toolbar-btn toolbar-btn--drag-handle\"\n ioxDraggable data-iox-drag-handle\n [ioxDragData]=\"selectEntry?.node\"\n [ioxDragSourceId]=\"dragHandleSourceId\"\n title=\"Drag to move\">\n <i class=\"ph-thin ph-dots-six-vertical\"></i>\n </button>\n <span class=\"toolbar-sep\"></span>\n\n <!-- Component name -->\n <span class=\"toolbar-name\">{{ selectEntry?.componentName }}</span>\n <span class=\"toolbar-sep\"></span>\n\n <!-- Quick actions -->\n <button *ngIf=\"isSliderContainer\" class=\"toolbar-btn toolbar-btn--add-slide\" title=\"Add slide\" (mousedown)=\"onAddSlide($event)\">\n <i class=\"ph-thin ph-plus\"></i>\n <span class=\"toolbar-btn__label\">Add slide</span>\n </button>\n <button class=\"toolbar-btn\" title=\"Add an element here\" aria-label=\"Add an element here\" (mousedown)=\"onAddElement($event)\">\n <i class=\"ph-thin ph-plus\"></i>\n </button>\n <button class=\"toolbar-btn\" title=\"Duplicate\" (mousedown)=\"onDuplicate($event)\">\n <i class=\"ph-thin ph-copy\"></i>\n </button>\n <button *ngIf=\"hasInteractions\" class=\"toolbar-btn toolbar-btn--play\" title=\"Play animations\" (mousedown)=\"onPlay($event)\">\n <i class=\"ph-thin ph-play\"></i>\n </button>\n <button *ngIf=\"isLinkedSymbol\" class=\"toolbar-btn toolbar-btn--symbol\"\n [title]=\"(linkedSymbolName ? linkedSymbolName : 'Symbol') + ' — click to detach'\"\n (mousedown)=\"onDetachSymbol($event)\">\n <i class=\"ph-thin ph-link\"></i>\n <span class=\"toolbar-btn__label\">{{ linkedSymbolName || 'Symbol' }}</span>\n </button>\n <button *ngIf=\"isDetachedSymbol\" class=\"toolbar-btn toolbar-btn--resync\"\n title=\"Detached — click to re-link\"\n (mousedown)=\"onResyncSymbol($event)\">\n <i class=\"ph-thin ph-link-break\"></i>\n <span class=\"toolbar-btn__label\">Detached</span>\n </button>\n <button class=\"toolbar-btn toolbar-btn--danger\" title=\"Delete\" (mousedown)=\"onDelete($event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n <span class=\"toolbar-sep\"></span>\n <button class=\"toolbar-btn\" title=\"Select parent\" (mousedown)=\"onSelectParent($event)\">\n <i class=\"ph-thin ph-arrow-up\"></i>\n </button>\n\n <!-- More menu trigger — opens a fixed-position dropdown at the cursor -->\n <button class=\"toolbar-btn toolbar-btn--more\" title=\"More actions\" (mousedown)=\"onToggleMore($event)\">\n <i class=\"ph-thin ph-dots-three\"></i>\n </button>\n </div>\n </div>\n\n <!-- Shared more/context menu — fixed-position, opened by ⋯ button or right-click -->\n <div *ngIf=\"moreMenuVisible\" class=\"toolbar-more-dropdown\" [ngStyle]=\"moreMenuStyle\"\n (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n <button class=\"more-item\" (mousedown)=\"onSelectParent($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-arrow-up\"></i>\n Select parent\n </button>\n <button class=\"more-item\" (mousedown)=\"onDuplicate($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-copy\"></i>\n Duplicate\n </button>\n <div *ngIf=\"canWrap\" class=\"more-item-submenu\"\n (mouseenter)=\"wrapSubmenuOpen = true\" (mouseleave)=\"wrapSubmenuOpen = false\">\n <button class=\"more-item\" (mousedown)=\"$event.stopPropagation()\">\n <i class=\"ph-thin ph-selection-plus\"></i>\n Wrap in\n <i class=\"ph-thin ph-caret-right more-item__chevron\"></i>\n </button>\n <div *ngIf=\"wrapSubmenuOpen\" class=\"more-submenu-flyout\">\n <button *ngFor=\"let target of wrapTargets\" class=\"more-item\"\n (mousedown)=\"onWrap($event, target.type); closeMoreMenu()\">\n <i [class]=\"target.icon\"></i>\n {{ target.label }}\n </button>\n </div>\n </div>\n <button class=\"more-item more-item--danger\" (mousedown)=\"onDelete($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-trash\"></i>\n Delete\n </button>\n <div class=\"more-divider\"></div>\n <button class=\"more-item\" (mousedown)=\"onCopyNode($event)\">\n <i class=\"ph-thin ph-scissors\"></i>\n Copy element\n </button>\n <button *ngIf=\"hasCopiedNode\" class=\"more-item\" (mousedown)=\"onPasteNode($event)\">\n <i class=\"ph-thin ph-clipboard\"></i>\n Paste element\n </button>\n <div class=\"more-divider\"></div>\n <button *ngIf=\"selectEntry?.node?.stylePresetId\" class=\"more-item\" (mousedown)=\"onCopyPreset($event)\">\n <i class=\"ph-thin ph-paint-bucket\"></i>\n Copy style preset\n </button>\n <button *ngIf=\"hasPresetInClipboard\" class=\"more-item\" (mousedown)=\"onPastePreset($event)\">\n <i class=\"ph-thin ph-paint-bucket\"></i>\n Paste style preset\n </button>\n <button *ngIf=\"selectEntry?.node?.interactionPresetId\" class=\"more-item\" (mousedown)=\"onCopyInteractionPreset($event)\">\n <i class=\"ph-thin ph-lightning\"></i>\n Copy interaction preset\n </button>\n <button *ngIf=\"hasInteractionPresetInClipboard\" class=\"more-item\" (mousedown)=\"onPasteInteractionPreset($event)\">\n <i class=\"ph-thin ph-lightning\"></i>\n Paste interaction preset\n </button>\n <div class=\"more-divider\"></div>\n <button *ngIf=\"isLinkedSymbol\" class=\"more-item\" (mousedown)=\"onDetachSymbol($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-link-break\"></i>\n Detach from symbol<ng-container *ngIf=\"linkedSymbolName\"> ({{ linkedSymbolName }})</ng-container>\n </button>\n <button *ngIf=\"isDetachedSymbol\" class=\"more-item more-item--resync\" (mousedown)=\"onResyncSymbol($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-link\"></i>\n Re-link to symbol\n </button>\n <button class=\"more-item\" (mousedown)=\"onSaveAsBlock($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-bookmark\"></i>\n Save as reusable block\n </button>\n <button *ngIf=\"hasInteractions\" class=\"more-item more-item--play\" (mousedown)=\"onPlay($event); closeMoreMenu()\">\n <i class=\"ph-thin ph-play\"></i>\n Play animations\n </button>\n <div class=\"more-divider\"></div>\n <ng-container *ngIf=\"!selectedNodeIsGlobal; else removeGlobalItem\">\n <button class=\"more-item\" (mousedown)=\"onMakeGlobal($event, 'before')\">\n <i class=\"ph-thin ph-globe\"></i>\n Make Global (Before Content)\n </button>\n <button class=\"more-item\" (mousedown)=\"onMakeGlobal($event, 'after')\">\n <i class=\"ph-thin ph-globe\"></i>\n Make Global (After Content)\n </button>\n </ng-container>\n <ng-template #removeGlobalItem>\n <button class=\"more-item\" (mousedown)=\"onRemoveGlobal($event)\">\n <i class=\"ph-thin ph-globe\"></i>\n Remove from Global\n </button>\n </ng-template>\n </div>\n\n <!-- Backdrop to close the more menu -->\n <div *ngIf=\"moreMenuVisible\" class=\"overlay-context-backdrop\"\n (mousedown)=\"closeMoreMenu()\">\n </div>\n\n <!-- Badge context menu — options differ by badge type -->\n <div *ngIf=\"badgeMenuVisible\" class=\"badge-context-menu\"\n [ngStyle]=\"{ top: badgeMenuPos.y + 'px', left: badgeMenuPos.x + 'px' }\"\n (click)=\"$event.stopPropagation()\" (mousedown)=\"$event.stopPropagation()\">\n <ng-container *ngIf=\"badgeMenuType === 'style'\">\n <button class=\"more-item\" (mousedown)=\"onBadgeCopy()\">\n <i class=\"ph-thin ph-copy\"></i>\n Copy preset\n </button>\n <button class=\"more-item\" (mousedown)=\"onBadgeEdit()\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n Edit preset\n </button>\n </ng-container>\n <ng-container *ngIf=\"badgeMenuType === 'interaction'\">\n <button class=\"more-item\" (mousedown)=\"onBadgeEdit()\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n Edit in panel\n </button>\n <button class=\"more-item more-item--danger\" (mousedown)=\"onBadgeRemoveInteraction()\">\n <i class=\"ph-thin ph-trash\"></i>\n Remove interaction\n </button>\n </ng-container>\n </div>\n <div *ngIf=\"badgeMenuVisible\" class=\"overlay-context-backdrop\"\n (mousedown)=\"closeBadgeMenu()\">\n </div>\n\n</div>\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Canvas data preview used to come from host-provided content services (IOX_CONTENT_SERVICE /\n * IOX_SHOP_SERVICE), whose `getContent(contentType, orgId)` hit the ADMIN resources endpoint and\n * accepted no filters — so the Repeater/Slider ignored every data-source filter. Data now flows\n * through BuilderDataSourceService + the shared planDataSource, configured with\n * IOX_DATA_SOURCE_ENDPOINTS. Those tokens are gone; do not reintroduce a fetch that bypasses it.\n */\n\n/** Optional font manager. Provide from the host app to populate the fontFamily dropdown. */\nexport const IOX_FONT_MANAGER = new InjectionToken<IoxFontManager>('IOX_FONT_MANAGER');\n\nexport interface IoxFontManager {\n loadFonts(orgId: string): void;\n uploadedFonts$: import('rxjs').Observable<any>;\n getAllFontOptions(): { label: string; value: string }[];\n}\n\n/**\n * Translates the builder library's OWN chrome.\n *\n * The library cannot depend on ngx-translate — that is the host app's choice — but its toolbar was\n * hardcoded English, which shows through as untranslated controls in a Hebrew/RTL admin. This token\n * lets the host route those strings through its own i18n while the library keeps working standalone:\n * unprovided, `defaultBuilderLabels` returns the English text, so nothing ever renders a raw key.\n *\n * Keys are namespaced `builder.chrome.*` and listed in `BUILDER_CHROME_EN` below — that object is\n * the contract. A host providing this token should add those keys to its own bundles.\n */\nexport const IOX_BUILDER_LABELS = new InjectionToken<BuilderLabelResolver>('IOX_BUILDER_LABELS', {\n providedIn: 'root',\n factory: () => defaultBuilderLabels,\n});\n\nexport type BuilderLabelResolver = (key: string, fallback: string) => string;\n\n/** Standalone behaviour: the English text the library ships with. */\nexport const defaultBuilderLabels: BuilderLabelResolver = (_key, fallback) => fallback;\n\n/**\n * Every user-visible string in the builder's own chrome, so a host can copy this into its bundles\n * in one go rather than discovering keys one missing label at a time.\n */\nexport const BUILDER_CHROME_EN: Readonly<Record<string, string>> = Object.freeze({\n 'builder.chrome.select': 'Select',\n 'builder.chrome.pan': 'Pan',\n 'builder.chrome.style': 'Style',\n 'builder.chrome.publish': 'Publish',\n 'builder.chrome.unpublish': 'Unpublish',\n 'builder.chrome.breakpoint': 'Breakpoint',\n 'builder.chrome.formState': 'Form state',\n 'builder.chrome.formStateIdle': 'Idle',\n 'builder.chrome.formStateSubmitting': 'Sending',\n 'builder.chrome.formStateSuccess': 'Success',\n 'builder.chrome.formStateError': 'Error',\n 'builder.chrome.formStateHint': 'Show the form’s {state} state',\n 'builder.chrome.screenWidth': 'Screen width',\n 'builder.chrome.zoom': 'Zoom',\n 'builder.chrome.audit': 'Responsive audit',\n 'builder.chrome.auditHint': 'Responsive audit — what is broken at this width',\n 'builder.chrome.undo': 'Undo',\n 'builder.chrome.redo': 'Redo',\n 'builder.chrome.save': 'Save',\n 'builder.chrome.preview': 'Preview',\n});\n","import { Component, EventEmitter, Inject, Input, Output, ViewChild } from '@angular/core';\nimport { Popover } from 'primeng/popover';\n\nimport { Breakpoint, BREAKPOINTS, FormRenderState } from '@vectoriox/iox-ui';\nimport { BreakpointCounts } from '../utils/breakpoint-counts.util';\nimport { BUILDER_CHROME_EN, BuilderLabelResolver, IOX_BUILDER_LABELS } from '../tokens/builder.tokens';\nimport {\n BREAKPOINT_PRESENTATION,\n BuilderMode,\n ZOOM_OPTIONS,\n ScreenWidthOption,\n SCREEN_WIDTH_OPTIONS,\n} from '../panels/panel.model';\n\n@Component({\n selector: 'app-toolbar',\n templateUrl: './toolbar.component.html',\n styleUrls: ['./toolbar.component.scss'],\n standalone: false,\n})\nexport class ToolbarComponent {\n @Input() activeMode: BuilderMode = BuilderMode.Select;\n @Input() activeBreakpoint: Breakpoint = Breakpoint.Base;\n /** Overrides per breakpoint — for the selection, or the page when nothing is selected. */\n @Input() breakpointCounts: BreakpointCounts = {};\n /** Findings at the current width — shown as a count on the audit button. */\n @Input() auditCount = 0;\n @Input() auditOpen = false;\n @Input() activeZoom: number = 100;\n @Input() activeScreenWidth: number = 1440;\n @Input() canUndo = false;\n @Input() canRedo = false;\n @Input() isSaving = false;\n @Input() pageStatus: string = 'draft';\n /**\n * The form the selection sits inside, or null. CONTEXTUAL: the state switcher only appears when\n * there is a form to switch, because a permanently-present control for a rarely-present element\n * is exactly the toolbar clutter `builder-usability-plan.md` warns about.\n */\n @Input() formStateTarget: string | null = null;\n @Input() activeFormState: FormRenderState = FormRenderState.Idle;\n\n @Output() modeChange = new EventEmitter<BuilderMode>();\n @Output() breakpointChange = new EventEmitter<Breakpoint>();\n @Output() formStateChange = new EventEmitter<FormRenderState>();\n @Output() auditToggle = new EventEmitter<void>();\n @Output() zoomChange = new EventEmitter<number | 'fit'>();\n @Output() screenWidthChange = new EventEmitter<number>();\n @Output() undo = new EventEmitter<void>();\n @Output() redo = new EventEmitter<void>();\n @Output() save = new EventEmitter<void>();\n @Output() preview = new EventEmitter<void>();\n @Output() publishToggle = new EventEmitter<void>();\n\n get isPublished(): boolean {\n return this.pageStatus === 'published';\n }\n\n @ViewChild('modePopover') modePopover!: Popover;\n @ViewChild('zoomPopover') zoomPopover!: Popover;\n @ViewChild('widthPopover') widthPopover!: Popover;\n\n public modes = BuilderMode;\n public readonly breakpointIds = Breakpoint;\n /** Built once — the breakpoint set is fixed. Template binds fields, never method calls. */\n public readonly breakpointOptions = BREAKPOINTS.map(def => ({\n id: def.id,\n label: def.label,\n range: def.maxWidth === null ? 'default' : `≤ ${def.maxWidth}px`,\n ...BREAKPOINT_PRESENTATION[def.id],\n }));\n public zoomOptions = ZOOM_OPTIONS;\n public screenWidthOptions: ScreenWidthOption[] = SCREEN_WIDTH_OPTIONS;\n\n get activeModeIcon(): string {\n switch (this.activeMode) {\n case BuilderMode.Select: return 'ph-thin ph-cursor';\n case BuilderMode.Style: return 'ph-thin ph-paint-brush-broad';\n case BuilderMode.Pan: return 'ph-thin ph-hand';\n default: return 'ph-thin ph-cursor';\n }\n }\n\n get activeModeLabel(): string {\n switch (this.activeMode) {\n case BuilderMode.Style: return this.t('builder.chrome.style');\n case BuilderMode.Pan: return this.t('builder.chrome.pan');\n default: return this.t('builder.chrome.select');\n }\n }\n\n\n\n get zoomLabel(): string {\n return `${this.activeZoom}%`;\n }\n\n get sliderZoom(): number {\n return Math.min(100, Math.max(20, this.activeZoom));\n }\n\n // ── Mode ────────────────────────────────────────────────\n toggleModePopover(event: Event): void {\n this.modePopover.toggle(event);\n }\n\n selectMode(mode: BuilderMode): void {\n if (this.activeMode !== mode) {\n this.modeChange.emit(mode);\n }\n this.modePopover.hide();\n }\n\n constructor(@Inject(IOX_BUILDER_LABELS) private readonly labels: BuilderLabelResolver) {}\n\n // ── Breakpoint ──────────────────────────────────────────\n selectBreakpoint(bp: Breakpoint): void {\n if (this.activeBreakpoint !== bp) this.breakpointChange.emit(bp);\n }\n\n /** The four states, in the order a submission moves through them. */\n readonly formStates: { id: FormRenderState; labelKey: string; icon: string }[] = [\n { id: FormRenderState.Idle, labelKey: 'builder.chrome.formStateIdle', icon: 'ph-thin ph-textbox' },\n { id: FormRenderState.Submitting, labelKey: 'builder.chrome.formStateSubmitting', icon: 'ph-thin ph-circle-notch' },\n { id: FormRenderState.Success, labelKey: 'builder.chrome.formStateSuccess', icon: 'ph-thin ph-check-circle' },\n { id: FormRenderState.Error, labelKey: 'builder.chrome.formStateError', icon: 'ph-thin ph-warning-circle' },\n ];\n\n /**\n * Translate one of the builder's own chrome strings. Unprovided, the resolver returns the\n * English fallback from `BUILDER_CHROME_EN`, so the library still reads correctly standalone\n * and never renders a raw key.\n */\n t(key: string): string {\n return this.labels(key, BUILDER_CHROME_EN[key] ?? key);\n }\n\n /** \"Show the form's Success state\" — one key with a slot, not four sentences to translate. */\n formStateHint(state: { labelKey: string }): string {\n return this.t('builder.chrome.formStateHint').replace('{state}', this.t(state.labelKey));\n }\n\n get publishLabel(): string {\n return this.t(this.isPublished ? 'builder.chrome.unpublish' : 'builder.chrome.publish');\n }\n\n selectFormState(state: FormRenderState): void {\n if (this.activeFormState !== state) this.formStateChange.emit(state);\n }\n\n // ── Zoom slider ──────────────────────────────────────────\n onSliderChange(event: Event): void {\n const value = +(event.target as HTMLInputElement).value;\n this.zoomChange.emit(value);\n }\n\n // ── Screen width ─────────────────────────────────────────\n toggleWidthPopover(event: Event): void {\n this.widthPopover.toggle(event);\n }\n\n selectScreenWidth(width: number): void {\n if (this.activeScreenWidth !== width) {\n this.screenWidthChange.emit(width);\n }\n this.widthPopover.hide();\n }\n\n // ── Zoom ────────────────────────────────────────────────\n toggleZoomPopover(event: Event): void {\n this.zoomPopover.toggle(event);\n }\n\n selectZoom(value: number | 'fit'): void {\n this.zoomChange.emit(value);\n this.zoomPopover.hide();\n }\n}\n","<div class=\"builder-toolbar\">\n <!-- ── Mode switcher (stateful) ─────────────────────── -->\n <button class=\"tool-btn stateful\"\n (click)=\"toggleModePopover($event)\"\n [title]=\"activeModeLabel\">\n <i [class]=\"activeModeIcon\"></i>\n </button>\n\n <p-popover #modePopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Select\"\n (click)=\"selectMode(modes.Select)\">\n <i class=\"ph-thin ph-cursor\"></i>\n <span>{{ t('builder.chrome.select') }}</span>\n </button>\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Pan\"\n (click)=\"selectMode(modes.Pan)\">\n <i class=\"ph-thin ph-hand\"></i>\n <span>{{ t('builder.chrome.pan') }}</span>\n </button>\n <button class=\"popover-option\"\n [class.is-active]=\"activeMode === modes.Style\"\n (click)=\"selectMode(modes.Style)\">\n <i class=\"ph-thin ph-paint-brush-broad\"></i>\n <span>{{ t('builder.chrome.style') }}</span>\n </button>\n </div>\n </p-popover>\n\n <span class=\"divider\"></span>\n\n <!-- ── Undo / Redo (action) ─────────────────────────── -->\n <button class=\"tool-btn\" [title]=\"t('builder.chrome.undo')\" [disabled]=\"!canUndo\" (click)=\"undo.emit()\">\n <i class=\"ph-thin ph-arrow-counter-clockwise\"></i>\n </button>\n <button class=\"tool-btn\" [title]=\"t('builder.chrome.redo')\" [disabled]=\"!canRedo\" (click)=\"redo.emit()\">\n <i class=\"ph-thin ph-arrow-clockwise\"></i>\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Breakpoint bar — the EDITING SCOPE, not just a preview size ── -->\n <div class=\"breakpoint-bar\" role=\"group\" [attr.aria-label]=\"t('builder.chrome.breakpoint')\">\n @for (bp of breakpointOptions; track bp.id) {\n <button type=\"button\"\n class=\"bp-btn\"\n [class.is-active]=\"activeBreakpoint === bp.id\"\n [attr.aria-pressed]=\"activeBreakpoint === bp.id\"\n [title]=\"bp.label + ' · ' + bp.range\"\n [attr.aria-label]=\"bp.label\"\n (click)=\"selectBreakpoint(bp.id)\">\n <i [class]=\"bp.icon\" [class.bp-icon--landscape]=\"bp.landscape\" aria-hidden=\"true\"></i>\n @if (breakpointCounts[bp.id]) {\n <span class=\"bp-dot\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n\n <!-- ── Form state — CONTEXTUAL: only while the selection sits inside a form.\n This is what lets an author DESIGN the Success and Error blocks: switching here swaps what\n the canvas renders, exactly as the breakpoint bar above swaps the width. Without it those\n blocks are hidden by their own state CSS and cannot be reached. ── -->\n @if (formStateTarget) {\n <span class=\"divider\"></span>\n <div class=\"form-state-bar\" role=\"group\" [attr.aria-label]=\"t('builder.chrome.formState')\">\n @for (state of formStates; track state.id) {\n <button type=\"button\"\n class=\"bp-btn\"\n [class.is-active]=\"activeFormState === state.id\"\n [attr.aria-pressed]=\"activeFormState === state.id\"\n [title]=\"formStateHint(state)\"\n [attr.aria-label]=\"t(state.labelKey)\"\n (click)=\"selectFormState(state.id)\">\n <i [class]=\"state.icon\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- ── Screen width — Base only (any width above Laptop) ── -->\n @if (activeBreakpoint === breakpointIds.Base) {\n <button class=\"tool-btn stateful width-btn\"\n (click)=\"toggleWidthPopover($event)\"\n [title]=\"t('builder.chrome.screenWidth')\">\n <span class=\"width-label\">{{ activeScreenWidth }}</span>\n </button>\n }\n\n <p-popover #widthPopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n *ngFor=\"let w of screenWidthOptions\"\n [class.is-active]=\"activeScreenWidth === w.width\"\n (click)=\"selectScreenWidth(w.width)\">\n <span>{{ w.label }}</span>\n </button>\n </div>\n </p-popover>\n\n <!-- ── Zoom (stateful) ──────────────────────────────── -->\n <button class=\"tool-btn stateful zoom-btn\"\n (click)=\"toggleZoomPopover($event)\"\n [title]=\"t('builder.chrome.zoom')\">\n <span class=\"zoom-label\">{{ zoomLabel }}</span>\n </button>\n\n <p-popover #zoomPopover [appendTo]=\"'body'\" styleClass=\"toolbar-popover\">\n <div class=\"zoom-popover\">\n <div class=\"zoom-slider-row\">\n <input class=\"zoom-slider\"\n type=\"range\"\n min=\"20\" max=\"100\" step=\"1\"\n [value]=\"sliderZoom\"\n (input)=\"onSliderChange($event)\">\n <span class=\"zoom-slider-value\">{{ zoomLabel }}</span>\n </div>\n <div class=\"popover-strip\">\n <button class=\"popover-option\"\n *ngFor=\"let z of zoomOptions\"\n [class.is-active]=\"z.value === activeZoom\"\n (click)=\"selectZoom(z.value)\">\n <span>{{ z.label }}</span>\n </button>\n </div>\n </div>\n </p-popover>\n\n <!-- ── Responsive audit (A5) ─────────────────────────────── -->\n <button class=\"tool-btn audit-toggle\"\n [class.is-open]=\"auditOpen\"\n [class.has-findings]=\"auditCount > 0\"\n type=\"button\"\n [title]=\"t('builder.chrome.auditHint')\"\n [attr.aria-label]=\"t('builder.chrome.audit')\"\n [attr.aria-pressed]=\"auditOpen\"\n (click)=\"auditToggle.emit()\">\n <i class=\"ph-thin ph-stethoscope\" aria-hidden=\"true\"></i>\n @if (auditCount) {\n <span class=\"audit-count\">{{ auditCount }}</span>\n }\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Save ────────────────────────────────────────────── -->\n <button class=\"tool-btn save-btn\"\n [class.is-saving]=\"isSaving\"\n [disabled]=\"isSaving\"\n [title]=\"t('builder.chrome.save')\"\n (click)=\"save.emit()\">\n <i class=\"ph-thin ph-floppy-disk\"></i>\n </button>\n\n <!-- ── Preview ──────────────────────────────────────────── -->\n <button class=\"tool-btn preview-btn\"\n [title]=\"t('builder.chrome.preview')\"\n (click)=\"preview.emit()\">\n <i class=\"ph-thin ph-eye\"></i>\n </button>\n\n <span class=\"divider\"></span>\n\n <!-- ── Publish / Unpublish ──────────────────────────────── -->\n <button class=\"tool-btn publish-btn\"\n [class.is-published]=\"isPublished\"\n [title]=\"publishLabel\"\n (click)=\"publishToggle.emit()\">\n <i [class]=\"isPublished ? 'ph-thin ph-cloud-slash' : 'ph-thin ph-cloud-arrow-up'\"></i>\n <span class=\"publish-label\">{{ publishLabel }}</span>\n </button>\n</div>\n","import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { ComponentRegistryService } from '../../services/component-registry.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderMode, NodeAction } from '../panel.model';\n\ninterface TreeNode {\n node: ComponentNode;\n icon: string;\n label: string;\n depth: number;\n expanded: boolean;\n hasChildren: boolean;\n /** Reference to the parent's children array that contains this node. */\n parentArray: ComponentNode[];\n /** Index of this node inside parentArray. */\n indexInParent: number;\n}\n\n@Component({\n selector: 'app-layer-tree',\n templateUrl: './layer-tree.component.html',\n styleUrls: ['./layer-tree.component.scss'],\n standalone: false,\n})\nexport class LayerTreeComponent implements OnInit, OnDestroy {\n @Input() layout: ComponentNode[] = [];\n @Input() globalElements: ComponentNode[] = [];\n @Output() nodeSelect = new EventEmitter<ComponentNode>();\n @Output() nodeAction = new EventEmitter<{ action: NodeAction; node: ComponentNode }>();\n @Output() nodeMove = new EventEmitter<void>();\n\n public flatTree: TreeNode[] = [];\n public flatGlobalTree: TreeNode[] = [];\n public selectedNodeId: string | null = null;\n public hoveredNodeId: string | null = null;\n\n public editingNodeId: string | null = null;\n public editingValue = '';\n\n public activeSection: 'page' | 'global' = 'page';\n\n /** Cache: component type → icon class */\n private iconMap = new Map<string, string>();\n private selectSub?: Subscription;\n /** Last-seen structural signature — used by ngDoCheck to skip no-op rebuilds. */\n private _layoutSig = '';\n private _globalSig = '';\n\n constructor(\n private registry: ComponentRegistryService,\n private overlayService: OverlayService,\n ) {}\n\n ngOnInit(): void {\n this.buildIconMap();\n this.rebuild();\n this.selectSub = this.overlayService.select$.subscribe(entry => {\n this.selectedNodeId = entry?.node?.id ?? null;\n });\n }\n\n ngOnDestroy(): void {\n this.selectSub?.unsubscribe();\n }\n\n // Runs on every CD cycle — exit immediately if structure hasn't changed.\n ngDoCheck(): void {\n const sig = this.sig(this.layout);\n const globalSig = this.sig(this.globalElements);\n if (sig !== this._layoutSig || globalSig !== this._globalSig) {\n this._layoutSig = sig;\n this._globalSig = globalSig;\n this.rebuild();\n }\n }\n\n /** Cheap structural signature: node IDs + nesting depth only. */\n private sig(nodes: ComponentNode[]): string {\n return nodes.map(n =>\n (n.id ?? n.type) + (n.children?.length ? '{' + this.sig(n.children) + '}' : '')\n ).join(',');\n }\n\n onNodeClick(treeNode: TreeNode): void {\n const node = treeNode.node;\n this.selectedNodeId = node.id ?? null;\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n this.overlayService.setSelect(\n ref.element,\n node.type,\n BuilderMode.Select,\n node,\n ref.componentRef,\n );\n // Scroll the element into view on the canvas\n ref.element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n this.nodeSelect.emit(node);\n }\n\n onNodeMouseEnter(treeNode: TreeNode): void {\n this.hoveredNodeId = treeNode.node.id ?? null;\n const ref = this.overlayService.getNodeRef(treeNode.node);\n if (ref) {\n this.overlayService.setHover(ref.element, treeNode.node.type, BuilderMode.Select);\n }\n }\n\n onNodeMouseLeave(): void {\n this.hoveredNodeId = null;\n this.overlayService.clearHover();\n }\n\n toggleExpand(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n treeNode.expanded = !treeNode.expanded;\n this.rebuild();\n }\n\n onDeleteNode(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.nodeAction.emit({ action: NodeAction.Delete, node: treeNode.node });\n }\n\n onDuplicateNode(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.nodeAction.emit({ action: NodeAction.Duplicate, node: treeNode.node });\n }\n\n startRename(treeNode: TreeNode, event: MouseEvent): void {\n event.stopPropagation();\n this.editingNodeId = treeNode.node.id ?? null;\n this.editingValue = treeNode.node.label ?? '';\n }\n\n saveRename(treeNode: TreeNode): void {\n const val = this.editingValue.trim();\n treeNode.node.label = val || undefined;\n treeNode.label = treeNode.node.label ?? treeNode.node.type;\n this.editingNodeId = null;\n this.editingValue = '';\n }\n\n cancelRename(): void {\n this.editingNodeId = null;\n this.editingValue = '';\n }\n\n /**\n * CDK drop handler for tree reorder.\n * Works on the flat tree indices — maps back to parent arrays to do the move.\n */\n onTreeDrop(event: CdkDragDrop<TreeNode[]>): void {\n if (event.previousIndex === event.currentIndex) return;\n\n const draggedTreeNode = this.flatTree[event.previousIndex];\n if (!draggedTreeNode) return;\n\n const targetTreeNode = this.flatTree[event.currentIndex];\n if (!targetTreeNode) return;\n\n // Remove from source parent\n const srcArray = draggedTreeNode.parentArray;\n const srcIdx = draggedTreeNode.indexInParent;\n srcArray.splice(srcIdx, 1);\n\n // Determine destination: insert at the same position as the target node in its parent.\n // If dropping after the target, adjust index.\n const destArray = targetTreeNode.parentArray;\n let destIdx = targetTreeNode.indexInParent;\n\n // If dragging downward (previousIndex < currentIndex), the target index\n // may have shifted because we already removed the item from source.\n // If source and destination are the same array and srcIdx < destIdx, adjust.\n if (srcArray === destArray && srcIdx < destIdx) {\n destIdx--;\n }\n\n destArray.splice(destIdx, 0, draggedTreeNode.node);\n\n // Rebuild tree and notify builder\n this.rebuild();\n this.nodeMove.emit();\n }\n\n // ── Internals ────────────────────────────────────────────\n\n /** Build a type→icon lookup from the registry so we don't instantiate configs per node. */\n private buildIconMap(): void {\n for (const entry of this.registry.getAll()) {\n const instance = new entry.config();\n this.iconMap.set(entry.type, instance.icon || 'ph-thin ph-cube');\n }\n }\n\n private expandedState = new Map<string, boolean>();\n\n private rebuild(): void {\n // Save expanded state\n for (const tn of [...this.flatTree, ...this.flatGlobalTree]) {\n if (tn.node.id) {\n this.expandedState.set(tn.node.id, tn.expanded);\n }\n }\n const next: TreeNode[] = [];\n this.flattenTree(this.layout, 0, next);\n this.flatTree = next;\n\n const nextGlobal: TreeNode[] = [];\n this.flattenTree(this.globalElements, 0, nextGlobal);\n this.flatGlobalTree = nextGlobal;\n }\n\n private flattenTree(nodes: ComponentNode[], depth: number, out: TreeNode[], parentArr?: ComponentNode[]): void {\n const arr = parentArr ?? nodes;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const hasChildren = !!(node.children && node.children.length);\n const expanded = node.id ? (this.expandedState.get(node.id) ?? true) : true;\n const treeNode: TreeNode = {\n node,\n icon: this.iconMap.get(node.type) || 'ph-thin ph-cube',\n label: node.label ?? node.type,\n depth,\n expanded,\n hasChildren,\n parentArray: arr,\n indexInParent: i,\n };\n out.push(treeNode);\n if (node.children && expanded) {\n this.flattenTree(node.children, depth + 1, out, node.children);\n }\n }\n }\n}\n","<div class=\"layer-tree\">\n <div class=\"tree-header\">\n <button class=\"section-tab\" [class.section-tab--active]=\"activeSection === 'page'\" (click)=\"activeSection = 'page'\">\n <i class=\"ph-thin ph-stack\"></i> Page\n </button>\n <button class=\"section-tab\" [class.section-tab--active]=\"activeSection === 'global'\" (click)=\"activeSection = 'global'\">\n <i class=\"ph-thin ph-globe\"></i> Global\n <span *ngIf=\"flatGlobalTree.length\" class=\"section-tab-badge\">{{ flatGlobalTree.length }}</span>\n </button>\n </div>\n\n <!-- ── Page elements tree ───────────────────── -->\n <div *ngIf=\"activeSection === 'page'\"\n class=\"tree-body\"\n cdkDropList\n [cdkDropListData]=\"flatTree\"\n (cdkDropListDropped)=\"onTreeDrop($event)\">\n <div *ngIf=\"!flatTree.length\" class=\"tree-empty\">\n <i class=\"ph-thin ph-tree-structure\"></i>\n <span>No layers yet</span>\n </div>\n\n <div *ngFor=\"let tn of flatTree\"\n class=\"tree-row\"\n cdkDrag\n [cdkDragData]=\"tn\"\n [class.is-selected]=\"tn.node.id === selectedNodeId\"\n [class.is-hovered]=\"tn.node.id === hoveredNodeId\"\n [style.padding-inline-start.px]=\"12 + tn.depth * 16\"\n (click)=\"onNodeClick(tn)\"\n (mouseenter)=\"onNodeMouseEnter(tn)\"\n (mouseleave)=\"onNodeMouseLeave()\">\n\n <i class=\"ph-thin ph-dots-six-vertical drag-handle\" cdkDragHandle></i>\n\n <button *ngIf=\"tn.hasChildren\" class=\"expand-btn\" (click)=\"toggleExpand(tn, $event)\">\n <i class=\"ph-thin\" [ngClass]=\"tn.expanded ? 'ph-caret-down' : 'ph-caret-right'\"></i>\n </button>\n <span *ngIf=\"!tn.hasChildren\" class=\"expand-spacer\"></span>\n\n <i [class]=\"tn.icon\" class=\"node-icon\"></i>\n <ng-container *ngIf=\"editingNodeId === tn.node.id; else staticLabel\">\n <input class=\"node-rename-input\"\n [value]=\"editingValue\"\n (input)=\"editingValue = $any($event.target).value\"\n (keydown.enter)=\"saveRename(tn)\"\n (keydown.escape)=\"cancelRename()\"\n (blur)=\"saveRename(tn)\"\n (click)=\"$event.stopPropagation()\"\n autofocus>\n </ng-container>\n <ng-template #staticLabel>\n <span class=\"node-label\" [class.node-label--named]=\"tn.node.label\">{{ tn.label }}</span>\n </ng-template>\n\n <span class=\"node-actions\">\n <button class=\"action-btn\" title=\"Rename\" (click)=\"startRename(tn, $event)\">\n <i class=\"ph-thin ph-pencil-simple\"></i>\n </button>\n <button class=\"action-btn\" title=\"Duplicate\" (click)=\"onDuplicateNode(tn, $event)\">\n <i class=\"ph-thin ph-copy\"></i>\n </button>\n <button class=\"action-btn action-btn--delete\" title=\"Delete\" (click)=\"onDeleteNode(tn, $event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n </span>\n </div>\n </div>\n\n <!-- ── Global elements tree ─────────────────── -->\n <div *ngIf=\"activeSection === 'global'\" class=\"tree-body\">\n <div *ngIf=\"!flatGlobalTree.length\" class=\"tree-empty\">\n <i class=\"ph-thin ph-globe\"></i>\n <span>No global elements</span>\n </div>\n\n <div *ngFor=\"let tn of flatGlobalTree\"\n class=\"tree-row tree-row--global\"\n [class.is-selected]=\"tn.node.id === selectedNodeId\"\n [class.is-hovered]=\"tn.node.id === hoveredNodeId\"\n [style.padding-inline-start.px]=\"12 + tn.depth * 16\"\n (click)=\"onNodeClick(tn)\"\n (mouseenter)=\"onNodeMouseEnter(tn)\"\n (mouseleave)=\"onNodeMouseLeave()\">\n\n <button *ngIf=\"tn.hasChildren\" class=\"expand-btn\" (click)=\"toggleExpand(tn, $event)\">\n <i class=\"ph-thin\" [ngClass]=\"tn.expanded ? 'ph-caret-down' : 'ph-caret-right'\"></i>\n </button>\n <span *ngIf=\"!tn.hasChildren\" class=\"expand-spacer\"></span>\n\n <i [class]=\"tn.icon\" class=\"node-icon\"></i>\n <span class=\"node-label\">{{ tn.label }}</span>\n <span class=\"node-position-badge\">{{ tn.node.globalPosition }}</span>\n\n <span class=\"node-actions\">\n <button class=\"action-btn action-btn--delete\" title=\"Delete\" (click)=\"onDeleteNode(tn, $event)\">\n <i class=\"ph-thin ph-trash\"></i>\n </button>\n </span>\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\n/** One rendered crumb — precomputed so the template binds fields, never method calls. */\nexport interface Crumb {\n node: ComponentNode;\n label: string;\n /** True for the last crumb (the selected node itself). */\n isCurrent: boolean;\n}\n\n/** A state badge shown on the right of the bar for the selected node. */\nexport interface SelectionBadge {\n icon: string;\n label: string;\n title: string;\n}\n\n/**\n * The element path bar — the full ancestor chain of the selected node, clickable,\n * plus a badge for each piece of node state that otherwise only surfaces by opening\n * a different panel (bound / symbol / preset / interactions / global).\n *\n * Presentational: it holds no tree and does no lookups. The builder computes the path\n * (see `utils/node-path.util.ts`) and passes it in.\n *\n * See iox-ai-guidance `architecture/builder/builder-usability-plan.md` (B1).\n */\n@Component({\n selector: 'app-breadcrumb-bar',\n templateUrl: './breadcrumb-bar.component.html',\n styleUrls: ['./breadcrumb-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class BreadcrumbBarComponent {\n /** Root → selected node. Empty when nothing is selected. */\n @Input() set path(value: ComponentNode[] | null | undefined) {\n const nodes = value ?? [];\n const last = nodes.length - 1;\n this.crumbs = nodes.map((node, i) => ({\n node,\n label: node.label || node.type,\n isCurrent: i === last,\n }));\n this.badges = this.buildBadges(nodes[last]);\n }\n\n /** Emitted when a crumb is clicked — the builder selects that node. */\n @Output() nodeSelect = new EventEmitter<ComponentNode>();\n /** Emitted on crumb hover (and `null` on leave) — the builder outlines it on canvas. */\n @Output() nodePeek = new EventEmitter<ComponentNode | null>();\n\n crumbs: Crumb[] = [];\n badges: SelectionBadge[] = [];\n\n trackCrumb(_index: number, crumb: Crumb): ComponentNode {\n return crumb.node;\n }\n\n trackBadge(_index: number, badge: SelectionBadge): string {\n return badge.icon;\n }\n\n onSelect(crumb: Crumb): void {\n this.nodeSelect.emit(crumb.node);\n }\n\n onPeek(crumb: Crumb): void {\n this.nodePeek.emit(crumb.node);\n }\n\n onPeekEnd(): void {\n this.nodePeek.emit(null);\n }\n\n /**\n * Node state that today is only discoverable by visiting another panel. Built as a\n * data table rather than a chain of ifs so a new badge is one row.\n */\n private buildBadges(node: ComponentNode | undefined): SelectionBadge[] {\n if (!node) return [];\n const interactions = node.interactions?.length ?? 0;\n const bindings = node.bindings?.length ?? 0;\n const rows: Array<[boolean, string, string, string]> = [\n [bindings > 0, 'ph-thin ph-plugs-connected', String(bindings),\n `${bindings} data binding${bindings === 1 ? '' : 's'}`],\n [interactions > 0, 'ph-thin ph-lightning', String(interactions),\n `${interactions} interaction${interactions === 1 ? '' : 's'}`],\n [!!node.symbolId, 'ph-thin ph-diamond', 'Symbol',\n 'Linked symbol instance — edits propagate to every instance'],\n [!node.symbolId && !!node.detachedSymbolId, 'ph-thin ph-link-break', 'Detached',\n 'Detached from its symbol — edits no longer propagate'],\n [!!node.stylePresetId, 'ph-thin ph-palette', 'Preset',\n 'Styled by a shared style preset'],\n [!!node.isGlobal, 'ph-thin ph-globe-hemisphere-west', 'Global',\n 'Global element — rendered on every page'],\n ];\n return rows\n .filter(([on]) => on)\n .map(([, icon, label, title]) => ({ icon, label, title }));\n }\n}\n","<nav class=\"breadcrumb-bar\" aria-label=\"Selected element path\">\n @if (crumbs.length) {\n <ol class=\"crumbs\" #crumbList>\n @for (crumb of crumbs; track trackCrumb($index, crumb)) {\n <li class=\"crumb-item\">\n @if (!$first) {\n <i class=\"crumb-sep ph-thin ph-caret-right\" aria-hidden=\"true\"></i>\n }\n <button type=\"button\"\n class=\"crumb\"\n [class.crumb--current]=\"crumb.isCurrent\"\n [attr.aria-current]=\"crumb.isCurrent ? 'true' : null\"\n [title]=\"crumb.label\"\n (mouseenter)=\"onPeek(crumb)\"\n (mouseleave)=\"onPeekEnd()\"\n (focus)=\"onPeek(crumb)\"\n (blur)=\"onPeekEnd()\"\n (click)=\"onSelect(crumb)\">{{ crumb.label }}</button>\n </li>\n }\n </ol>\n\n <div class=\"badges\">\n @for (badge of badges; track trackBadge($index, badge)) {\n <span class=\"badge\" [title]=\"badge.title\">\n <i [class]=\"badge.icon\" aria-hidden=\"true\"></i>\n <span class=\"badge-label\">{{ badge.label }}</span>\n </span>\n }\n </div>\n } @else {\n <span class=\"crumb-empty\">Nothing selected — click an element on the canvas</span>\n }\n</nav>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { AuditFinding, AuditSeverity } from '../utils/responsive-audit.util';\n\n/**\n * The responsive audit list (A5) — what is broken at the width being edited, worst first.\n * Presentational: the builder runs the audit (it owns the tree and the canvas measurements) and\n * applies the fixes; this only renders and emits.\n */\n@Component({\n selector: 'app-audit-panel',\n templateUrl: './audit-panel.component.html',\n styleUrls: ['./audit-panel.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class AuditPanelComponent {\n @Input() findings: AuditFinding[] = [];\n /** Name of the breakpoint being audited, for the header. */\n @Input() breakpointLabel = '';\n @Input() running = false;\n\n @Output() select = new EventEmitter<AuditFinding>();\n @Output() fix = new EventEmitter<AuditFinding>();\n @Output() fixAll = new EventEmitter<void>();\n @Output() rerun = new EventEmitter<void>();\n @Output() closePanel = new EventEmitter<void>();\n\n readonly severities = AuditSeverity;\n\n trackFinding(_index: number, finding: AuditFinding): string {\n return `${finding.nodeId}:${finding.code}`;\n }\n\n /** Findings that carry a safe auto-fix — what \"Fix all\" would apply. */\n get fixableCount(): number {\n return this.findings.filter(f => !!f.fix).length;\n }\n\n iconFor(severity: AuditSeverity): string {\n return severity === AuditSeverity.Info ? 'ph-thin ph-info' : 'ph-thin ph-warning';\n }\n}\n","<div class=\"audit-panel\" role=\"dialog\" aria-label=\"Responsive audit\">\n <header class=\"audit-head\">\n <span class=\"audit-title\">Responsive audit</span>\n <span class=\"audit-scope\">{{ breakpointLabel }}</span>\n <span class=\"audit-spacer\"></span>\n <button type=\"button\" class=\"audit-link\" [disabled]=\"running\" (click)=\"rerun.emit()\">Re-run</button>\n <button type=\"button\" class=\"audit-close\" aria-label=\"Close audit\" (click)=\"closePanel.emit()\">\n <i class=\"ph-thin ph-x\" aria-hidden=\"true\"></i>\n </button>\n </header>\n\n @if (running) {\n <p class=\"audit-empty\">Measuring…</p>\n } @else if (!findings.length) {\n <p class=\"audit-empty audit-empty--clean\">\n <i class=\"ph-thin ph-check-circle\" aria-hidden=\"true\"></i>\n Nothing to fix at this width.\n </p>\n } @else {\n <div class=\"audit-actions\">\n <span>{{ findings.length }} to look at</span>\n @if (fixableCount) {\n <button type=\"button\" class=\"audit-link\" (click)=\"fixAll.emit()\">Fix {{ fixableCount }} automatically</button>\n }\n </div>\n <ul class=\"audit-list\">\n @for (finding of findings; track trackFinding($index, finding)) {\n <li class=\"audit-item\" [class.is-error]=\"finding.severity === severities.Error\">\n <i class=\"audit-icon\" [class]=\"iconFor(finding.severity)\" aria-hidden=\"true\"></i>\n <div class=\"audit-body\">\n <span class=\"audit-node\">{{ finding.nodeName }}</span>\n <span class=\"audit-message\">{{ finding.message }}</span>\n </div>\n <div class=\"audit-buttons\">\n @if (finding.fix) {\n <button type=\"button\" class=\"audit-btn audit-btn--fix\" (click)=\"fix.emit(finding)\">Fix</button>\n }\n <button type=\"button\" class=\"audit-btn\" (click)=\"select.emit(finding)\">Select</button>\n </div>\n </li>\n }\n </ul>\n }\n</div>\n","\n\nimport { AfterViewInit, ApplicationRef, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, effect, inject } from '@angular/core';\nimport Lenis from 'lenis';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode, IoxDataSource, IoxInteraction, StyleCategory } from './models/component.model';\nimport { regenerateNodeIds } from './utils/clone-ids.util';\nimport { wrapNode } from './models/wrap-node';\nimport { OverlayEntry, OverlayService } from './overlay/overlay.service';\nimport { PanelEvent, PanelEventService, PanelEventTypes } from './panels/panel-event.service';\nimport { BuilderMode, NodeAction, PageRouteAnimationSettings, PageSettings, PanelTypes, ToolbarAction } from './panels/panel.model';\nimport { ComponentRegistryService } from './services/component-registry.service';\nimport { DragEngineService, IoxDropEvent } from './services/drag-engine.service';\nimport { MoveableCanvasService } from './services/moveable-canvas.service';\nimport { SelectoCanvasService } from './services/selecto-canvas.service';\nimport { DataSourceRegistryService } from './services/data-source-registry.service';\nimport { InteractionEngineService } from './services/interaction-engine.service';\nimport { ViewportService } from './services/viewport.service';\nimport { StyleRegistryService } from './services/style-registry.service';\nimport { composeVirtualTraits } from './style-compose';\nimport { findParentOf, nodeAncestorPath, nodeAncestorPathInEither } from './utils/node-path.util';\nimport { BreakpointCounts, nodeBreakpointCounts, treeBreakpointCounts } from './utils/breakpoint-counts.util';\nimport { resolveInsertTarget } from './utils/insert-target.util';\nimport { nearestFormNode } from './utils/form-selection.util';\nimport { AuditFinding, AuditNode, auditNodes } from './utils/responsive-audit.util';\nimport { buildLayoutPreset, LAYOUT_PRESETS, LayoutPresetDef } from './models/layout-presets';\nimport { BuilderClipboardService } from './services/builder-clipboard.service';\nimport { InteractionPresetRegistryService } from './services/interaction-preset-registry.service';\nimport { SymbolRegistryService } from './services/symbol-registry.service';\nimport { Breakpoint, breakpointDef, ContextStore, FormRenderState, applyBindingPipes, resolveInputs, resolveStyleProps, setInputOverride, setOverride, collectContextSlotKeys, nodeUsesContext, resolvePath, safeSetInput, withContextSlots } from '@vectoriox/iox-ui';\n\n@Component({\n selector: 'app-builder',\n templateUrl: './builder.component.html',\n styleUrls: ['./builder.component.scss'],\n standalone: false,\n})\nexport class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\n private contextStore = inject(ContextStore);\n\n /**\n * Re-apply context-bound inputs on the CANVAS when a slot changes — the builder twin of the\n * engine's effect. The canvas is a live runtime, so hovering a repeater row while editing must\n * swap the bound element just as it does on the published site.\n *\n * Only nodes that read a slot are touched; nothing else re-renders (trap T2).\n */\n private readonly contextEffect = effect(() => {\n const slotValues = this.contextStore.values();\n if (!Object.keys(slotValues).length) return;\n const slotKeys = collectContextSlotKeys(this.layout);\n if (!slotKeys.size) return;\n this.applyContextBindings(this.layout, withContextSlots({}, slotValues), slotKeys);\n });\n\n @Input() layout: ComponentNode[] = [];\n @Input() dataSources: IoxDataSource[] = [];\n @Input() orgId = 'default';\n @Input() routeParams: any[] = [];\n @Input() pageName = '';\n @Input() isSaving = false;\n @Input() pageStatus: string = 'draft';\n @Input() pageSettings: PageSettings | null = null;\n @Input() globalElements: ComponentNode[] = [];\n @Input() canUndo = false;\n @Input() canRedo = false;\n /** Feature flag: drive drag/select/resize via Moveable + Selecto instead of interact.js.\n * Default OFF — the proven interact.js path is unchanged until cutover. See\n * iox-ai-guidance/architecture/builder/moveable-migration.md. */\n @Input() moveableMode = false;\n @Output() save = new EventEmitter<void>();\n @Output() undo = new EventEmitter<void>();\n @Output() redo = new EventEmitter<void>();\n @Output() back = new EventEmitter<void>();\n @Output() preview = new EventEmitter<void>();\n @Output() publishToggle = new EventEmitter<void>();\n @Output() pageSettingsChange = new EventEmitter<PageSettings>();\n @Output() applyAnimationToAll = new EventEmitter<PageRouteAnimationSettings>();\n @Output() saveBlock = new EventEmitter<{ name: string; node: ComponentNode }>();\n @Output() globalElementsChange = new EventEmitter<ComponentNode[]>();\n @ViewChild('previewCanvas') previewCanvas?: ElementRef<HTMLElement>;\n @ViewChild('previewScroll') previewScrollRef?: ElementRef<HTMLElement>;\n @ViewChild('lenisContent') lenisContentRef?: ElementRef<HTMLElement>;\n @ViewChild('globalOverlay') globalOverlayRef?: ElementRef<HTMLElement>;\n\n public components: any[] = [];\n public activePanel: string = PanelTypes.STYLES;\n public isPanelOpen = false;\n public panelTypes = PanelTypes;\n public activeMode: BuilderMode = BuilderMode.Select;\n public builderModes = BuilderMode;\n /** The breakpoint being edited — derived from the canvas width by ViewportService. */\n public activeBreakpoint: Breakpoint = Breakpoint.Base;\n /** Overrides per breakpoint for the selection (or the whole page when nothing is selected) —\n * the breakpoint bar's dots. A field recomputed on change, never a getter (OnPush input). */\n public breakpointCounts: BreakpointCounts = {};\n /** Deadline for swallowing the canvas click that completes an overlay action. */\n private _ignoreCanvasClickUntil = 0;\n\n // ── Empty canvas (B4) ──────────────────────────────────────────────────────\n /** The starting points offered on a blank page — the responsive layout presets. */\n public readonly starterLayouts: readonly LayoutPresetDef[] = LAYOUT_PRESETS;\n\n /** A page with nothing on it yet: offer a structure instead of a blank canvas. */\n get isPageEmpty(): boolean {\n return !this.layout.length;\n }\n\n /** Insert a starter layout at the end of the page and select it. */\n startWithLayout(def: LayoutPresetDef): void {\n const node = buildLayoutPreset(def, type => this.registry.createConfig(type) as unknown as ComponentNode);\n if (!node) return;\n this.dragEngine.insertPayload(this.layout, this.layout.length, node);\n this.cdr.detectChanges();\n }\n\n /** Open the components panel from the empty state. */\n browseComponents(): void {\n this.activeSidebar = 'components';\n }\n\n // ── Responsive audit (A5) ──────────────────────────────────────────────────\n /** Findings for the width being edited; the panel is open while `auditOpen`. */\n public auditFindings: AuditFinding[] = [];\n public auditOpen = false;\n public auditRunning = false;\n\n get auditBreakpointLabel(): string {\n return breakpointDef(this.activeBreakpoint)?.label ?? '';\n }\n\n toggleAudit(): void {\n this.auditOpen = !this.auditOpen;\n if (this.auditOpen) this.runAudit();\n }\n\n /**\n * Audit every rendered node at the width being edited: resolve its styles for this breakpoint\n * and measure it ONCE (on demand — never on the animation path). Measurements are divided by the\n * canvas scale, so findings are in CSS px whatever the zoom. The rules are pure — see\n * `utils/responsive-audit.util.ts`.\n */\n runAudit(): void {\n this.auditRunning = true;\n const scale = this.viewportService.getScale() || 1;\n const width = this.viewportService.getState().width;\n // Positions are reported relative to the canvas FRAME, not the editor window, so an\n // \"off-screen\" finding means off the simulated viewport rather than off the user's monitor.\n const frame = this.previewCanvas?.nativeElement?.getBoundingClientRect() ?? { left: 0, top: 0 };\n const nodes: AuditNode[] = [];\n const visit = (list: ComponentNode[]) => {\n for (const node of list) {\n const element = this.overlayService.getNodeRef(node)?.element;\n if (element && node.id) {\n const rect = element.getBoundingClientRect();\n nodes.push({\n id: node.id,\n type: node.type,\n label: node.label,\n styleProps: resolveStyleProps(this.baseStyleMapOf(node), node.responsive, this.activeBreakpoint),\n // Traits resolved at this width too — some failures (a 4-up slider on a\n // phone) are invisible to a style-only audit. See P3-G1/G4.\n inputs: resolveInputs(this.baseInputMapOf(node), node.responsive, this.activeBreakpoint),\n width: rect.width / scale,\n height: rect.height / scale,\n left: (rect.left - frame.left) / scale,\n top: (rect.top - frame.top) / scale,\n });\n }\n if (node.children?.length) visit(node.children);\n }\n };\n visit(this.layout);\n visit(this.globalElements);\n this.auditFindings = auditNodes(nodes, width);\n this.auditRunning = false;\n this.cdr.detectChanges();\n }\n\n /** The node's OWN trait values — the Base layer the responsive `inputs` cascade sits on top of. */\n private baseInputMapOf(node: ComponentNode): Record<string, any> {\n const out: Record<string, any> = {};\n for (const trait of (node.traits ?? []) as any[]) {\n if (trait?.name !== undefined && trait.default !== undefined) out[trait.name] = trait.default;\n }\n return out;\n }\n\n /** Apply one finding's fix into the current breakpoint's layer (or the base styles at Base). */\n applyAuditFix(finding: AuditFinding): void {\n const node = this.findNodeById(finding.nodeId, this.layout) ?? this.findNodeById(finding.nodeId, this.globalElements);\n if (!node) return;\n\n // A TRAIT fix (slide count) is not CSS — it lands in the breakpoint's `inputs` layer, or on\n // the node itself at Base, mirroring exactly how a style fix is applied below.\n if (finding.inputFix) {\n for (const [name, value] of Object.entries(finding.inputFix)) {\n if (this.activeBreakpoint === Breakpoint.Base) {\n const trait = (node.traits ?? []).find((t: any) => t.name === name);\n if (trait) trait.default = value;\n } else {\n node.responsive = setInputOverride(node.responsive, this.activeBreakpoint, name, value);\n }\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.runAudit();\n return;\n }\n if (!finding.fix) return;\n if (this.activeBreakpoint === Breakpoint.Base) {\n for (const [name, value] of Object.entries(finding.fix)) {\n for (const group of node.styleTraits ?? []) {\n const trait = group.traits.find(t => t.name === name);\n if (trait) trait.default = value;\n }\n }\n } else {\n let responsive = node.responsive;\n for (const [name, value] of Object.entries(finding.fix)) {\n responsive = setOverride(responsive, this.activeBreakpoint, name, value);\n }\n node.responsive = responsive;\n }\n const cssId = node.styleId ?? node.id;\n if (cssId) {\n const base = this.baseStyleMapOf(node);\n this.styleRegistry.upsert(cssId, composeVirtualTraits(base));\n this.styleRegistry.upsertResponsive(cssId, base, node.stateStyles as any, node.responsive);\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.runAudit();\n }\n\n /** Apply every fixable finding, then re-measure. */\n applyAllAuditFixes(): void {\n for (const finding of this.auditFindings.filter(f => !!f.fix || !!f.inputFix)) this.applyAuditFix(finding);\n }\n\n /** Select the node a finding is about. */\n selectAuditNode(finding: AuditFinding): void {\n const node = this.findNodeById(finding.nodeId, this.layout) ?? this.findNodeById(finding.nodeId, this.globalElements);\n const ref = node && this.overlayService.getNodeRef(node);\n if (!node || !ref) return;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this._emitElementSelect(node, ref.componentRef);\n }\n\n /** A node's full base style map, flattened from its styleTraits. */\n private baseStyleMapOf(node: ComponentNode): Record<string, any> {\n const styles: Record<string, any> = {};\n for (const group of node.styleTraits ?? []) {\n for (const trait of group.traits) {\n if (trait.name !== undefined && trait.default !== undefined) styles[trait.name] = trait.default;\n }\n }\n return styles;\n }\n\n private findNodeById(id: string, list: ComponentNode[]): ComponentNode | null {\n for (const node of list) {\n if (node.id === id) return node;\n const deeper = node.children?.length ? this.findNodeById(id, node.children) : null;\n if (deeper) return deeper;\n }\n return null;\n }\n public activeZoom: number = 100;\n public activeScreenWidth: number = 1440;\n public selectedItem: ComponentNode | null = null;\n /** Root → selected node. Drives the breadcrumb bar. Recomputed on every selection\n * change (never a getter — see `_emitElementSelect`). */\n public selectedPath: ComponentNode[] = [];\n public isDragging = false;\n public scrollThumbTop = 0; // px from top of track\n public scrollThumbHeight = 0; // px height of thumb\n public isScrollbarVisible = false;\n public scrollbarTranslate = 0; // counteracts Lenis wrapper scrollTop shifting position:absolute children\n public activeSidebar: 'components' | 'tree' | 'tokens' | 'pages' = 'components';\n public showSaveBlockDialog = false;\n public saveBlockName = '';\n private pendingBlockNode: ComponentNode | null = null;\n public isPanning = false;\n public panX = 0;\n public panY = 0;\n /** Canvas frame height in canvas-space pixels (= previewScroll.clientHeight / scale).\n * Used as iox-page-component's height so position:fixed top:0;bottom:0 fills the\n * same area as height:100vh (both resolve to this value). */\n public canvasFrameHeight = 0;\n private panStartX = 0;\n private panStartY = 0;\n private panOriginX = 0;\n private panOriginY = 0;\n private hoverHideRaf = 0;\n private viewportSub?: Subscription;\n private lenis?: Lenis;\n private lenisRafId?: number;\n private canvasRo?: ResizeObserver;\n private previewFrameRo?: ResizeObserver;\n private canvasContentHeight = 0;\n\n // Type-safe event forwarding for toolbar outputs\n handleToolbarModeChange(mode: BuilderMode): void {\n this.onModeChange(mode);\n }\n handleToolbarBreakpointChange(bp: Breakpoint): void {\n this.onBreakpointChange(bp);\n }\n\n // ── Form state switcher ──────────────────────────────────────────────────────────────────\n // The Success and Error blocks are hidden by their own state CSS, so without this an author\n // could never reach them. Switching here writes `renderState` onto the live form component,\n // which is the SAME input the runtime drives at submit time — one mechanism, two drivers, so\n // what gets designed is exactly what a visitor sees. See forms-and-inputs-plan.md (D7).\n\n /** The form the selection sits inside, or null. Drives the toolbar's contextual switcher. */\n activeFormState: FormRenderState = FormRenderState.Idle;\n\n get formStateTarget(): string | null {\n return this.selectedFormNode()?.id ?? null;\n }\n\n handleToolbarFormStateChange(state: FormRenderState): void {\n this.activeFormState = state;\n const form = this.selectedFormNode();\n if (!form) return;\n // Straight onto the live instance: this is a VIEW state, not page data — it must never be\n // persisted, or a page would ship showing its own success message.\n //\n // Two input names on purpose: the CANVAS renders the container twin (`formState`) while the\n // ENGINE renders IoxFormComponent (`renderState`). safeSetInput drops whichever the rendered\n // component does not declare, so this works on either path without branching on type.\n const ref = this.overlayService.getNodeRef(form)?.componentRef;\n if (ref) {\n safeSetInput(ref, 'formState', state);\n safeSetInput(ref, 'renderState', state);\n }\n this.cdr.detectChanges();\n }\n\n /** The nearest Form ancestor of the selection (or the selection itself). */\n private selectedFormNode(): ComponentNode | null {\n return nearestFormNode(this.selectedPath);\n }\n handleToolbarZoomChange(value: number | 'fit'): void {\n this.onZoomChange(value);\n }\n\n handleToolbarScreenWidthChange(width: number): void {\n this.viewportService.setWidth(width);\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n }\n\n get globalElementsBefore(): ComponentNode[] {\n return this.globalElements.filter(n => n.globalPosition === 'before');\n }\n\n get globalElementsAfter(): ComponentNode[] {\n return this.globalElements.filter(n => n.globalPosition === 'after');\n }\n\n /** Canvas width in CSS pixels (driven by ViewportService). */\n get viewportWidth(): number {\n return this.viewportService.getState().width;\n }\n\n /** Canvas viewport height in CSS pixels (driven by ViewportService). */\n get viewportHeight(): number {\n return this.viewportService.getState().height;\n }\n\n /** Visual (scaled) canvas width — used to size the scroll container so the\n * scrollbar aligns with the right edge of the canvas, not the CMS shell. */\n get viewportScaledWidth(): number {\n const s = this.viewportService.getState().scale;\n return Math.round(this.viewportWidth * s);\n }\n\n /** CSS transform for the visual canvas.\n * Includes translateX(-50%) for centering because iox-page-component is\n * position:absolute; left:50% inside .preview-lenis-content. */\n get viewportTransform(): string {\n const s = this.viewportService.getState().scale;\n const parts: string[] = ['translateX(-50%)'];\n if (this.panX !== 0 || this.panY !== 0) parts.push(`translate(${this.panX}px, ${this.panY}px)`);\n if (s !== 1) parts.push(`scale(${s})`);\n return parts.join(' ');\n }\n\n /**\n * Height of the Lenis content proxy div (realContentHeight × scale).\n * Lenis scrolls against this value so scroll range is always in visual px,\n * not unscaled CSS px — correct at any zoom level.\n */\n get scaledContentHeight(): number {\n const s = this.viewportService.getState().scale;\n return Math.round(this.canvasContentHeight * s);\n }\n\n /** The canvas starts at the simulated viewport height, just like a real empty browser page. */\n get canvasMinHeight(): number {\n return this.viewportService.getState().height;\n }\n\n private sub?: Subscription;\n private registrySub?: Subscription;\n\n constructor(\n private registry: ComponentRegistryService,\n private overlayService: OverlayService,\n private panelEventService: PanelEventService,\n private dragEngine: DragEngineService,\n private dsRegistry: DataSourceRegistryService,\n private viewportService: ViewportService,\n private interactionEngine: InteractionEngineService,\n private interactionPresetRegistry: InteractionPresetRegistryService,\n private clipboard: BuilderClipboardService,\n private symbolRegistry: SymbolRegistryService,\n private cdr: ChangeDetectorRef,\n private appRef: ApplicationRef,\n private moveableCanvas: MoveableCanvasService,\n private selectoCanvas: SelectoCanvasService,\n private styleRegistry: StyleRegistryService,\n ) {}\n\n ngOnInit(): void {\n this.components = this.registry.getAll();\n this.dsRegistry.setDataSources(this.dataSources);\n this.dragEngine.setScale(this.viewportService.getScale());\n this.sub = this.panelEventService.subscribe((panelEvent: PanelEvent) => this.handlePanelEvents(panelEvent));\n this.sub.add(this.dragEngine.isDragging$.subscribe((v: boolean) => {\n this.isDragging = v;\n this.cdr.markForCheck();\n }));\n this.sub.add(this.dragEngine.dropComplete$.subscribe((node: ComponentNode) => {\n this._selectAfterDrop(node);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }));\n this.panelEventService.emit(PanelEventTypes.PANEL_OPEN, PanelTypes.STYLES);\n this.viewportSub = this.viewportService.state$.subscribe(state => {\n this.activeBreakpoint = state.breakpoint;\n this.activeZoom = Math.round(state.scale * 100);\n this.activeScreenWidth = state.width;\n this.dragEngine.setScale(state.scale);\n this.updatePreviewVh();\n // scaledContentHeight changes with scale — flush DOM first so\n // .preview-lenis-content has its new height before Lenis reads it.\n this.cdr.detectChanges();\n this.lenis?.resize();\n // iox-page-component has transition:0.25s — overlay positions are stale\n // until the transform animation completes. Re-fire after the transition.\n setTimeout(() => { this.overlayService.refreshSelect(); this.moveableCanvas.refresh(); }, 270);\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['pageSettings']) {\n // Reinit Lenis with updated scroll options (lerp, wheelMultiplier, etc.)\n // so the builder preview reflects the live-page scroll feel in real time.\n this.initLenis();\n }\n if (changes['globalElements']) {\n // The *ngIf on the global overlay renders after this hook — defer so\n // globalOverlayRef is in the DOM before we try to set CSS vars on it.\n setTimeout(() => this.updatePreviewVh());\n }\n // A newly loaded page: the bar's dots must reflect its overrides before anything is selected.\n if (changes['layout'] || changes['globalElements']) this.refreshBreakpointCounts();\n }\n\n ngAfterViewInit(): void {\n this.updatePreviewVh();\n // Re-compute --preview-vh whenever the canvas frame resizes (panel open/close,\n // window resize, etc.) so 100vh always fills the visible area.\n if (this.previewScrollRef?.nativeElement) {\n this.previewFrameRo = new ResizeObserver(() => this.updatePreviewVh());\n this.previewFrameRo.observe(this.previewScrollRef.nativeElement);\n }\n this.overlayService.setContainer(this.previewCanvas?.nativeElement || null);\n // Builder dispatches synthetic 'scroll' events on .preview-lenis-content from\n // the Lenis callback — point the overlay scroll listener at that element.\n // (Not previewScrollRef which is the Lenis eventsTarget — dispatching there\n // would cause Lenis to re-fire its scroll handler → infinite loop.)\n this.overlayService.setScrollContainer(this.lenisContentRef?.nativeElement || null);\n // .preview-scroll is the Lenis clipping container (overflow:hidden, scrollTop changes).\n // Used as IntersectionObserver root so viewportEnter triggers fire correctly on canvas scroll.\n this.overlayService.setIntersectionRoot(this.previewScrollRef?.nativeElement || null);\n\n // Register the root canvas as a dropzone.\n const canvasEl = document.getElementById('canvas-preview')!;\n if (canvasEl) {\n this.dragEngine.registerDropzone(\n 'canvas-preview',\n canvasEl,\n this.layout,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n // Track canvas content height so scaledContentHeight (= height × scale)\n // keeps the Lenis content proxy correctly sized at any zoom level.\n this.canvasRo = new ResizeObserver(entries => {\n const h = entries[0]?.contentRect.height ?? 0;\n if (h !== this.canvasContentHeight) {\n this.canvasContentHeight = h;\n this.cdr.detectChanges();\n this.lenis?.resize();\n }\n });\n this.canvasRo.observe(canvasEl);\n }\n\n // The canvas is an EDITING surface: clicking a Link / LinkedContainer / Button (anything\n // rendering an <a href>) must select it, never navigate — a redirect unloads the builder and\n // loses unsaved work. Bound to `.preview` (NOT #canvas-preview) so it also covers the\n // GLOBAL-elements overlay, which is a SIBLING layer outside the page canvas — a linked\n // container in a global header used to slip past the old canvas-only guard and navigate.\n // Capture phase so it runs before the node's own click handler; it covers EVERY anchor,\n // including repeater/slider preview clones (RenderDirective skips their per-node listeners)\n // and any future link component. preventDefault only cancels default navigation — the click\n // still propagates, so selection/overlay behaviour is unchanged. `auxclick` covers\n // middle-click, which opens a tab without firing `click`.\n const previewEl = this.previewCanvas?.nativeElement;\n if (previewEl) {\n previewEl.addEventListener('click', this.blockCanvasNavigation, true);\n previewEl.addEventListener('auxclick', this.blockCanvasNavigation, true);\n }\n\n this.initLenis();\n\n // Moveable path (flag-gated — interact.js is untouched when off). Drive drag for the selected\n // element via Moveable, reusing DragEngineService.handleDrop for the reorder. See\n // iox-ai-guidance/architecture/builder/moveable-migration.md.\n if (this.moveableMode && this.previewCanvas?.nativeElement) {\n this.moveableCanvas.init(\n this.previewCanvas.nativeElement,\n () => this.viewportService.getScale(),\n () => ({ width: this.viewportWidth, height: this.viewportHeight }),\n );\n // Resize commits geometry to styleProps → emit LAYOUT_CHANGED so undo/save pick it up.\n this.moveableCanvas.onLayoutChanged = () => this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this.sub?.add(this.overlayService.select$.subscribe(entry => {\n this.moveableCanvas.select(entry?.element ?? null, entry?.node ?? null);\n }));\n\n // Selecto rubber-band MULTI-select (Phase 1). Only starts from empty canvas space\n // (selectFromInside:false), so single-element drag/click are untouched. 2+ → Moveable\n // group; exactly 1 → the existing single-select (via a click); 0 → clear.\n const canvasEl = document.getElementById('canvas-preview');\n const previewEl = this.previewCanvas.nativeElement;\n if (canvasEl) {\n this.selectoCanvas.init(previewEl, previewEl, canvasEl);\n this.selectoCanvas.onSelect = (elements) => {\n if (this.moveableCanvas.selectGroup(elements)) return; // 2+ → group box\n if (elements.length === 1) {\n elements[0].dispatchEvent(new MouseEvent('click', { bubbles: true }));\n } else {\n this.overlayService.clearSelect();\n this.moveableCanvas.select(null, null);\n }\n };\n }\n }\n\n setTimeout(() => this.appRef.tick());\n }\n\n /**\n * Walk the tree and push freshly-resolved values into the live component instances of every node\n * that reads a context slot. Uses the overlay's node→ComponentRef registry, and the shared\n * `safeSetInput` so an undeclared input can never trigger NG0303.\n */\n private applyContextBindings(nodes: ComponentNode[], data: Record<string, any>, slotKeys: ReadonlySet<string>): void {\n for (const node of nodes ?? []) {\n if (nodeUsesContext(node, slotKeys)) {\n const ref = this.overlayService.getNodeRef(node)?.componentRef;\n if (ref) {\n for (const binding of node.bindings ?? []) {\n if (!slotKeys.has(binding.source)) continue;\n const sourceData = data[binding.source];\n if (sourceData == null) continue;\n const raw = binding.path ? resolvePath(sourceData, binding.path) : sourceData;\n const value = applyBindingPipes(raw, (binding as any).pipes);\n if (value !== undefined && value !== null) safeSetInput(ref, binding.prop, value);\n }\n }\n }\n if (node.children?.length) this.applyContextBindings(node.children, data, slotKeys);\n }\n }\n\n ngOnDestroy(): void {\n this.sub?.unsubscribe();\n this.registrySub?.unsubscribe();\n this.viewportSub?.unsubscribe();\n this.moveableCanvas.destroy();\n this.selectoCanvas.destroy();\n this.destroyLenis();\n this.canvasRo?.disconnect();\n this.previewFrameRo?.disconnect();\n this.overlayService.setContainer(null);\n this.overlayService.setScrollContainer(null);\n this.overlayService.setIntersectionRoot(null);\n const canvasEl = document.getElementById('canvas-preview');\n if (canvasEl) {\n this.dragEngine.unregisterDropzone('canvas-preview', canvasEl);\n }\n const previewEl = this.previewCanvas?.nativeElement;\n if (previewEl) {\n previewEl.removeEventListener('click', this.blockCanvasNavigation, true);\n previewEl.removeEventListener('auxclick', this.blockCanvasNavigation, true);\n }\n }\n\n /**\n * Cancel the browser's default navigation for any link clicked on the editing canvas.\n *\n * Bound property (not a method) so add/removeEventListener share one reference. Matches the\n * clicked target's nearest `a[href]`, so it covers a Link/Button host as well as a click on\n * anything nested inside a LinkedContainer. Only the DEFAULT action is cancelled — propagation\n * is untouched, so node selection, the overlay and the context menu all behave normally.\n */\n private readonly blockCanvasNavigation = (event: MouseEvent): void => {\n const target = event.target as HTMLElement | null;\n if (target?.closest?.('a[href]')) event.preventDefault();\n };\n\n /**\n * Set --preview-vh / --preview-vw on .preview-scroll so that viewport-relative\n * units (vh, vw) inside the canvas resolve to the simulated canvas dimensions\n * rather than the real browser viewport.\n *\n * --preview-vh = canvas frame height (unscaled) / 100\n * --preview-vw = canvas width from viewport state / 100\n *\n * Both fall back to their native unit in production (no variables defined).\n */\n private updatePreviewVh(): void {\n const el = this.previewScrollRef?.nativeElement;\n if (!el) return;\n const state = this.viewportService.getState();\n const frameH = el.clientHeight / state.scale;\n const vhVal = `${frameH / 100}px`;\n const vwVal = `${state.width / 100}px`;\n el.style.setProperty('--preview-vh', vhVal);\n el.style.setProperty('--preview-vw', vwVal);\n // Mirror on global overlay so vh/vw units resolve identically there\n this.globalOverlayRef?.nativeElement?.style.setProperty('--preview-vh', vhVal);\n this.globalOverlayRef?.nativeElement?.style.setProperty('--preview-vw', vwVal);\n this.canvasFrameHeight = Math.round(frameH);\n }\n\n private initLenis(): void {\n this.destroyLenis();\n if (!this.previewScrollRef?.nativeElement || !this.lenisContentRef?.nativeElement) return;\n\n const s = this.pageSettings?.scroll;\n this.lenis = new Lenis({\n wrapper: this.previewScrollRef.nativeElement,\n content: this.lenisContentRef.nativeElement,\n eventsTarget: this.previewScrollRef.nativeElement,\n lerp: s?.lerp ?? 0.1,\n wheelMultiplier: s?.wheelMultiplier ?? 1,\n touchMultiplier: s?.touchMultiplier ?? 1,\n orientation: s?.direction ?? 'vertical',\n infinite: s?.infinite ?? false,\n autoResize: false, // we drive resize() manually via canvasRo + viewportSub\n });\n\n this.lenis.on('scroll', (instance: Lenis) => {\n const clientH = this.previewScrollRef!.nativeElement.clientHeight;\n this.onPageScroll({\n scrollTop: instance.scroll,\n scrollHeight: instance.limit + clientH,\n clientHeight: clientH,\n scrollPercentage: instance.progress * 100,\n });\n // Notify overlay to reposition boxes on each scroll tick.\n // Dispatch on lenisContent (not previewScrollRef/eventsTarget) to avoid\n // Lenis re-consuming the event and causing infinite recursion.\n this.lenisContentRef!.nativeElement.dispatchEvent(new Event('scroll'));\n // Keep the fixed-position drop-target overlay aligned when canvas scrolls\n // during an active drag (pointer doesn't move, so _onDragMove never fires).\n this.dragEngine.refreshDragOverlays();\n // Reposition the Moveable control box (resize handles) on each scroll tick — otherwise\n // the handles drift away from the element as the canvas scrolls (the overlay outline\n // already repositions via the synthetic 'scroll' above).\n this.moveableCanvas.refresh();\n });\n\n const raf = (time: number) => {\n this.lenis?.raf(time);\n this.lenisRafId = requestAnimationFrame(raf);\n };\n this.lenisRafId = requestAnimationFrame(raf);\n }\n\n private destroyLenis(): void {\n if (this.lenisRafId != null) cancelAnimationFrame(this.lenisRafId);\n this.lenis?.destroy();\n this.lenis = undefined;\n this.lenisRafId = undefined;\n }\n\n addComponent(name: string): void {\n const config = this.registry.createConfig(name);\n if (!config) {\n return;\n }\n this.layout.push(config);\n }\n\n onDrop(event: IoxDropEvent): void {\n const { payload, insertIndex } = event;\n\n if (payload.type === 'external') {\n if (typeof payload.data === 'string') {\n const config = this.registry.createConfig(payload.data);\n if (!config) return;\n this.layout.splice(insertIndex, 0, config);\n this.cdr.markForCheck();\n this._selectAfterDrop(config);\n } else {\n const clone = this.deepCloneWithNewIds(payload.data as ComponentNode);\n this.layout.splice(insertIndex, 0, clone);\n this.cdr.markForCheck();\n this._selectAfterDrop(clone);\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n const item = payload.data as ComponentNode;\n\n if (payload.sourceId === 'blocks-panel') {\n // Reusable block from the palette — may be a bare ComponentNode or a\n // block wrapper { name, node, syncInstances, symbolId }. Extract the node.\n // Prefer symbol.node (always up-to-date) over block.node (original snapshot).\n const data = item as any;\n const symbolNode = data.symbolId ? this.symbolRegistry.getSymbol(data.symbolId)?.node : null;\n const nodeData: ComponentNode = (symbolNode ?? data.node ?? data) as ComponentNode;\n const clone = this.deepCloneWithNewIds(nodeData);\n if (data.syncInstances && data.symbolId) {\n clone.symbolId = data.symbolId;\n }\n this.layout.splice(insertIndex, 0, clone);\n this.cdr.markForCheck();\n this._selectAfterDrop(clone);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n if (payload.sourceId && payload.sourceId !== 'canvas-preview') {\n // Cross-list move from a nested container into canvas root.\n const sourceData = this.dragEngine.getData(payload.sourceId);\n if (sourceData) {\n const srcIdx = sourceData.indexOf(item);\n if (srcIdx !== -1) {\n sourceData.splice(srcIdx, 1);\n this.dragEngine.getCdr(payload.sourceId)?.detectChanges();\n }\n }\n this.layout.splice(insertIndex, 0, item);\n this.cdr.markForCheck();\n this._selectAfterDrop(item);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n return;\n }\n\n // Same-container reorder (canvas root).\n const currentIdx = this.layout.indexOf(item);\n if (currentIdx !== -1) {\n const adjustedIdx = insertIndex > currentIdx ? insertIndex - 1 : insertIndex;\n this.layout.splice(currentIdx, 1);\n this.layout.splice(adjustedIdx, 0, item);\n this.cdr.markForCheck();\n this._selectAfterDrop(item);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n }\n\n onModeChange(mode: BuilderMode): void {\n this.activeMode = mode;\n if (mode === BuilderMode.Pan) {\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.overlayService.clearHover();\n } else {\n // Returning to Select/Style — reset pan offset so canvas re-centers\n this.panX = 0;\n this.panY = 0;\n }\n }\n\n onBreakpointChange(bp: Breakpoint): void {\n this.viewportService.setBreakpoint(bp);\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n }\n\n onZoomChange(value: number | 'fit'): void {\n if (value === 'fit') {\n this.panX = 0;\n this.panY = 0;\n this.autoFitViewport();\n } else {\n this.viewportService.setScale(value / 100);\n }\n }\n\n // ── Board pan ────────────────────────────────────────────\n\n onBoardMouseDown(event: MouseEvent): void {\n if (this.activeMode !== BuilderMode.Pan) return;\n if (event.button !== 0) return;\n this.isPanning = true;\n this.panStartX = event.clientX;\n this.panStartY = event.clientY;\n this.panOriginX = this.panX;\n this.panOriginY = this.panY;\n event.preventDefault();\n }\n\n onBoardMouseMove(event: MouseEvent): void {\n if (!this.isPanning) return;\n this.panX = this.panOriginX + (event.clientX - this.panStartX);\n this.panY = this.panOriginY + (event.clientY - this.panStartY);\n }\n\n onBoardMouseUp(): void {\n this.isPanning = false;\n }\n\n private autoFitViewport(): void {\n const container = this.previewCanvas?.nativeElement;\n if (!container) return;\n // Available width = container width minus horizontal padding (10px × 2)\n this.viewportService.fitToWidth(container.clientWidth, 20);\n }\n\n selectPanel(panel: string): void {\n this.activePanel = panel;\n this.panelEventService.emit(this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN, panel);\n }\n\n handleClick(event: any): void {\n if (this.activeMode === BuilderMode.Pan) return;\n this.selectedItem = event.node;\n this.overlayService.setSelect(event.element, event.node.type, this.activeMode, event.node, event.componentRef);\n this.selectPanel(PanelTypes.STYLES);\n this._emitElementSelect(event.node, event.componentRef);\n }\n\n private _selectAfterDrop(node: ComponentNode): void {\n // Wait one tick for Angular to render the new component and register it\n // in the overlay before attempting to select it.\n setTimeout(() => {\n const ref = this.overlayService.getNodeRef(node);\n if (!ref) return;\n this.selectedItem = node;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this.selectPanel(PanelTypes.STYLES);\n this._emitElementSelect(node, ref.componentRef);\n });\n }\n\n handleMouseEnter(event: any): void {\n if (this.isDragging || this.activeMode === BuilderMode.Pan) return;\n cancelAnimationFrame(this.hoverHideRaf);\n this.overlayService.setHover(event.element, event.node.type, this.activeMode);\n }\n\n handleMouseLeave(): void {\n if (this.isDragging || this.activeMode === BuilderMode.Pan) return;\n cancelAnimationFrame(this.hoverHideRaf);\n this.hoverHideRaf = requestAnimationFrame(() => this.overlayService.clearHover());\n }\n\n handleCanvasClick(): void {\n // An overlay action (Select parent, Duplicate, …) changes the selection, which RE-RENDERS the\n // overlay — so the button that got `mousedown` is gone by `mouseup`, and the browser\n // dispatches the click on the nearest common ancestor: `.preview` itself. It therefore never\n // passes through <app-overlay>, and stopping propagation there cannot help. Without this\n // guard that click reads as \"clicked empty canvas\" and wipes the selection the action just\n // made (empty breadcrumb; click-to-insert targeting the page).\n if (Date.now() < this._ignoreCanvasClickUntil) {\n this._ignoreCanvasClickUntil = 0;\n return;\n }\n // Only fires when clicking empty canvas space (renderers call stopPropagation)\n this.selectedItem = null;\n this.selectedPath = [];\n this.overlayService.clearSelect();\n this.refreshBreakpointCounts();\n }\n\n /** Breadcrumb crumb clicked — select that ancestor. Mirrors a layer-tree click. */\n onCrumbSelect(node: ComponentNode): void {\n const ref = this.overlayService.getNodeRef(node);\n if (!ref) return;\n this.selectedItem = node;\n this.overlayService.setSelect(ref.element, node.type, this.activeMode, node, ref.componentRef);\n this._emitElementSelect(node, ref.componentRef);\n }\n\n /** Breadcrumb crumb hovered (or `null` on leave) — outline it on the canvas so the chain\n * is readable without clicking through it. */\n onCrumbPeek(node: ComponentNode | null): void {\n if (!node) {\n this.overlayService.clearHover();\n return;\n }\n const ref = this.overlayService.getNodeRef(node);\n if (ref) this.overlayService.setHover(ref.element, node.label || node.type, this.activeMode);\n }\n\n onTreeNodeSelect(node: ComponentNode): void {\n this.selectedItem = node;\n const ref = this.overlayService.getNodeRef(node);\n if (ref) {\n this._emitElementSelect(node, ref.componentRef);\n }\n this.selectPanel(PanelTypes.STYLES);\n }\n\n onTreeNodeAction(event: { action: NodeAction; node: ComponentNode }): void {\n const { action, node } = event;\n\n // Check global elements first\n const globalIdx = this.globalElements.findIndex(n => n === node);\n if (globalIdx !== -1) {\n if (action === NodeAction.Delete) {\n this.globalElements.splice(globalIdx, 1);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n return;\n }\n\n const result = this.findNodeInTree(node, this.layout);\n if (!result) return;\n\n if (action === NodeAction.Delete) {\n result.parent.splice(result.index, 1);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n } else if (action === NodeAction.Duplicate) {\n const clone = this.deepCloneWithNewIds(node);\n result.parent.splice(result.index + 1, 0, clone);\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n }\n\n onTreeNodeMove(): void {\n // Tree drag moved a node — canvas will re-render via change detection.\n // Clear selection since the moved node's DOM element may be recreated.\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n\n // ── Toolbar actions ──────────────────────────────────────\n onToolbarAction(event: { action: ToolbarAction; entry: OverlayEntry; position?: 'before' | 'after'; interaction?: IoxInteraction; wrapType?: string }): void {\n // The click completing this action lands on `.preview` (see handleCanvasClick) — ignore it.\n this._ignoreCanvasClickUntil = Date.now() + 500;\n const { action, entry } = event;\n const node = entry.node;\n if (!node) return;\n\n switch (action) {\n case ToolbarAction.AddElement: {\n // Quick-add: open the components panel. The insert target is the selection itself\n // (inside a container, after a leaf) — see insertFromPanel.\n this.activeSidebar = 'components';\n break;\n }\n case ToolbarAction.Delete: {\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n result.parent.splice(result.index, 1);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.Duplicate: {\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n const clone = this.deepCloneWithNewIds(node);\n result.parent.splice(result.index + 1, 0, clone);\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.Wrap: {\n const wrapType = event.wrapType;\n if (!wrapType) break;\n const wrapper = this.registry.createConfig(wrapType) as ComponentNode | null;\n if (!wrapper) break;\n // Wrap in place within whichever tree the node lives in — page\n // layout first, then global elements. Context is never crossed.\n let wrapped = wrapNode(this.layout, node, wrapper);\n let inGlobal = false;\n if (!wrapped) {\n wrapped = wrapNode(this.globalElements, node, wrapper);\n inGlobal = !!wrapped;\n }\n if (wrapped) {\n if (inGlobal) this.globalElementsChange.emit([...this.globalElements]);\n this.cdr.detectChanges();\n // If the wrapped node lives in a Repeater template, rebuild its repeated rows so\n // every clone picks up the new wrapper (and re-resolves the now-nested bindings).\n this._refreshRepeaterFor(node);\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n this._selectAfterDrop(wrapped);\n }\n break;\n }\n case ToolbarAction.Play: {\n this.interactionEngine.replay(node);\n break;\n }\n case ToolbarAction.SaveAsBlock: {\n const blockClone: ComponentNode = JSON.parse(JSON.stringify(node));\n this._stripGlobalFlags(blockClone);\n this.pendingBlockNode = blockClone;\n this.saveBlockName = '';\n this.showSaveBlockDialog = true;\n break;\n }\n case ToolbarAction.SelectParent: {\n const parentNode = this.findParentNode(node, this.layout) ?? this.findParentNode(node, this.globalElements);\n if (parentNode) {\n const ref = this.overlayService.getNodeRef(parentNode);\n if (ref) {\n this.selectedItem = parentNode;\n this.overlayService.setSelect(ref.element, parentNode.type, this.activeMode, parentNode, ref.componentRef);\n this._emitElementSelect(parentNode, ref.componentRef);\n }\n } else {\n this.selectedItem = null;\n this.overlayService.clearSelect();\n }\n break;\n }\n case ToolbarAction.MakeGlobal: {\n const result = this.findNodeInTree(node, this.layout);\n if (result) {\n result.parent.splice(result.index, 1);\n node.isGlobal = true;\n node.globalPosition = event.position ?? 'before';\n this.globalElements.push(node);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.markForCheck();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.RemoveGlobal: {\n const idx = this.globalElements.findIndex(n => n.id === node.id);\n if (idx !== -1) {\n this.globalElements.splice(idx, 1);\n node.isGlobal = false;\n node.globalPosition = undefined;\n this.layout.push(node);\n this.globalElementsChange.emit([...this.globalElements]);\n this.selectedItem = null;\n this.overlayService.clearSelect();\n this.cdr.markForCheck();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.EditPreset: {\n this.panelEventService.emit(PanelEventTypes.PRESET_EDIT, node.stylePresetId);\n this.panelEventService.emit(\n this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN,\n PanelTypes.STYLES,\n );\n break;\n }\n case ToolbarAction.EditInteractionPreset: {\n // Preset-linked node → open preset-edit mode. Plain interaction → just open the panel.\n if (node.interactionPresetId) {\n this.panelEventService.emit(PanelEventTypes.INTERACTION_PRESET_EDIT, node.interactionPresetId);\n }\n this.panelEventService.emit(\n this.isPanelOpen ? PanelEventTypes.PANEL_SELECTED : PanelEventTypes.PANEL_OPEN,\n PanelTypes.INTERACTIONS,\n );\n // Expand the specific interaction the badge represents so the panel opens \"on the right\n // interaction active\". Emitted AFTER PANEL_OPEN so the panel is showing this node.\n if (event.interaction?.id) {\n this.panelEventService.emit(PanelEventTypes.INTERACTION_EDIT, event.interaction.id);\n }\n break;\n }\n case ToolbarAction.PastePreset: {\n const presetId = this.clipboard.getPresetId();\n if (presetId) {\n node.stylePresetId = presetId;\n node.styleOverrides = {};\n this.panelEventService.emit(PanelEventTypes.ELEMENT_SELECT, { node, componentRef: null });\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.PasteInteractionPreset: {\n const interactionPresetId = this.clipboard.getInteractionPresetId();\n if (interactionPresetId) {\n node.interactionPresetId = interactionPresetId;\n const preset = this.interactionPresetRegistry.getPreset(interactionPresetId);\n if (preset) node.interactions = JSON.parse(JSON.stringify(preset.interactions));\n this.interactionEngine.refresh(node);\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n }\n break;\n }\n case ToolbarAction.DetachSymbol: {\n node.detachedSymbolId = node.symbolId;\n node.symbolId = undefined;\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.ResyncSymbol: {\n node.symbolId = node.detachedSymbolId;\n node.detachedSymbolId = undefined;\n const symbol = this.symbolRegistry.getSymbol(node.symbolId!);\n if (symbol) {\n this.panelEventService.emit(PanelEventTypes.SYMBOLS_CHANGED, symbol);\n }\n this.overlayService.refreshSelect();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.Copy: {\n this.clipboard.copyNode(node);\n break;\n }\n case ToolbarAction.Paste: {\n const pastedNode = this.clipboard.getNode();\n if (!pastedNode) break;\n const clone = this.deepCloneWithNewIds(pastedNode);\n const result = this.findNodeInTree(node, this.layout) ?? this.findNodeInTree(node, this.globalElements);\n if (result) {\n result.parent.splice(result.index + 1, 0, clone);\n } else {\n this.layout.push(clone);\n }\n this.cdr.detectChanges();\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n case ToolbarAction.AddSlide: {\n if (!Array.isArray(node.children)) break;\n const slide = this.registry.createConfig('SliderSlide');\n if (!slide) break;\n node.children = [...node.children, slide];\n const ref = this.overlayService.getNodeRef(node);\n if (ref?.componentRef) {\n ref.componentRef.setInput('children', node.children);\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);\n break;\n }\n }\n }\n\n confirmSaveBlock(): void {\n if (!this.saveBlockName.trim() || !this.pendingBlockNode) return;\n this.saveBlock.emit({ name: this.saveBlockName.trim(), node: this.pendingBlockNode });\n this.showSaveBlockDialog = false;\n this.pendingBlockNode = null;\n }\n\n cancelSaveBlock(): void {\n this.showSaveBlockDialog = false;\n this.pendingBlockNode = null;\n }\n\n private deepCloneWithNewIds(node: ComponentNode): ComponentNode {\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n // Fresh ids + remap intra-subtree references (stateTriggers, interaction targets) so a\n // duplicated/pasted structure stays self-consistent (trigger-hover keeps its own trigger).\n regenerateNodeIds(clone, { styleId: 'regenerate' });\n return clone;\n }\n\n private _stripGlobalFlags(node: ComponentNode): void {\n node.isGlobal = false;\n node.globalPosition = undefined;\n node.children?.forEach(c => this._stripGlobalFlags(c));\n }\n\n private _scrollbarTimer: ReturnType<typeof setTimeout> | null = null;\n\n onPageScroll(event: { scrollTop: number; scrollHeight: number; clientHeight: number; scrollPercentage?: number }): void {\n const contentH = event.scrollHeight;\n const wrapperH = event.clientHeight;\n if (contentH <= wrapperH) {\n this.isScrollbarVisible = false;\n return;\n }\n // .canvas-scrollbar has top:20px; bottom:20px — visible track is 40px shorter.\n const trackH = wrapperH - 40;\n const thumbH = Math.max((trackH / contentH) * trackH, 32);\n // Use Lenis progress (0–1) when available — more accurate than recomputing from scroll/limit.\n const progress = event.scrollPercentage != null ? event.scrollPercentage / 100\n : event.scrollTop / (contentH - wrapperH);\n const thumbTop = progress * (trackH - thumbH);\n this.scrollThumbHeight = thumbH;\n this.scrollThumbTop = thumbTop;\n this.isScrollbarVisible = true;\n // .canvas-scrollbar is position:absolute inside the Lenis wrapper.\n // When Lenis calls wrapper.scrollTo(), scrollTop shifts all absolute children.\n // Counteract with translateY(scrollTop) so the track stays visually anchored.\n this.scrollbarTranslate = event.scrollTop;\n this.cdr.markForCheck();\n\n if (this._scrollbarTimer) clearTimeout(this._scrollbarTimer);\n this._scrollbarTimer = setTimeout(() => {\n this.isScrollbarVisible = false;\n this.cdr.markForCheck();\n }, 1200);\n }\n\n private findNodeInTree(target: ComponentNode, children: ComponentNode[]): { parent: ComponentNode[]; index: number } | null {\n for (let i = 0; i < children.length; i++) {\n if (children[i] === target) {\n return { parent: children, index: i };\n }\n if (children[i].children) {\n const found = this.findNodeInTree(target, children[i].children!);\n if (found) return found;\n }\n }\n return null;\n }\n\n /** Immediate parent of `target` within `children`, or null at a root. Derives from the\n * shared `nodeAncestorPath` walk in `utils/node-path.util.ts` — one tree recursion to\n * keep correct, not one per caller. */\n private findParentNode(target: ComponentNode, children: ComponentNode[]): ComponentNode | null {\n return findParentOf(children, target);\n }\n\n /** Returns the closest ancestor (or self) of `target` that has a `symbolId`. */\n private findSymbolAncestorOf(target: ComponentNode, nodes: ComponentNode[]): ComponentNode | null {\n for (const node of nodes) {\n if (node === target) return node.symbolId ? node : null;\n if (node.children?.length && this.findNodeInTree(target, node.children)) {\n if (node.symbolId) return node;\n return this.findSymbolAncestorOf(target, node.children);\n }\n }\n return null;\n }\n\n /** Nearest Repeater ancestor of `target` (or null). A node inside a repeater renders in ITEM\n * scope, so the bindings panel needs the repeater to sample its current item (e.g. bind an\n * Image to a `gallery` string item). Prefers the innermost repeater when nested. */\n private findRepeaterAncestorOf(target: ComponentNode, nodes: ComponentNode[]): ComponentNode | null {\n for (const node of nodes) {\n if (node === target) return null;\n if (node.children?.length && this.findNodeInTree(target, node.children)) {\n return this.findRepeaterAncestorOf(target, node.children)\n ?? (node.type === 'Repeater' ? node : null);\n }\n }\n return null;\n }\n\n /** If `node` lives inside a Repeater template, tell that repeater to rebuild its preview rows so\n * a structural change (e.g. wrapping a template child) propagates to every repeated row. No-op\n * when the node is not inside a repeater. */\n private _refreshRepeaterFor(node: ComponentNode): void {\n const repeater = this.findRepeaterAncestorOf(node, this.layout)\n ?? this.findRepeaterAncestorOf(node, this.globalElements);\n if (!repeater) return;\n const ref = this.overlayService.getNodeRef(repeater);\n (ref?.componentRef?.instance as { refreshTemplate?: () => void })?.refreshTemplate?.();\n }\n\n /**\n * Emit ELEMENT_SELECT with the ancestors the panels need (symbol + repeater item scope).\n * THE place the builder's own selection is set too — every path that announces a selection goes\n * through here, so `selectedItem` (breadcrumb, click-to-insert target) can't drift from what the\n * panels show. \"Select parent\" used to announce the parent while leaving selectedItem behind.\n */\n private _emitElementSelect(node: ComponentNode, componentRef: any): void {\n this.selectedItem = node;\n const symbolAncestor = this.findSymbolAncestorOf(node, this.layout)\n ?? this.findSymbolAncestorOf(node, this.globalElements);\n const repeaterAncestor = this.findRepeaterAncestorOf(node, this.layout)\n ?? this.findRepeaterAncestorOf(node, this.globalElements);\n // Parent's live `display` — drives the Child Layout group's parent-scoped visibility so\n // flex-child vs grid-child controls only surface when the parent actually lays them out.\n const parent = this.findParentNode(node, this.layout) ?? this.findParentNode(node, this.globalElements);\n const parentDisplay = parent ? this.readNodeDisplay(parent) : null;\n // Breadcrumb path. Assigned as a FIELD (never a getter) — a getter returning a fresh\n // array would make the OnPush input look changed on every change-detection pass.\n this.selectedPath = nodeAncestorPathInEither(this.layout, this.globalElements, node) ?? [node];\n this.panelEventService.emit(PanelEventTypes.ELEMENT_SELECT, { node, componentRef, symbolAncestor, repeaterAncestor, parentDisplay });\n this.refreshBreakpointCounts();\n }\n\n /**\n * Insert a components-panel payload at the position the SELECTION implies (B2):\n * nothing selected → end of the page; a container → inside it; a leaf → right after it.\n * `dropComplete$` then selects the new node and records the undo step, exactly as a drop does.\n */\n insertFromPanel(data: unknown): void {\n const inGlobals = !!nodeAncestorPath(this.globalElements, this.selectedItem);\n const roots = inGlobals ? this.globalElements : this.layout;\n let target = resolveInsertTarget(roots, this.selectedItem, n => this.dragEngine.isDropContainer(n.children));\n // A selected TOP-LEVEL global element would make the new node its sibling — i.e. a second\n // global element, which is not what \"add an element\" means. Put it on the page instead.\n if (inGlobals && !target.parent) {\n target = resolveInsertTarget(this.layout, null, n => this.dragEngine.isDropContainer(n.children));\n }\n if (!this.dragEngine.insertPayload(target.children, target.index, data)) return;\n this.cdr.detectChanges();\n }\n\n private refreshBreakpointCounts(): void {\n this.breakpointCounts = this.selectedItem\n ? nodeBreakpointCounts(this.selectedItem)\n : treeBreakpointCounts(this.layout, this.globalElements);\n }\n\n /** Read a node's current `display` value. The style panel mutates `styleTraits` in place at edit\n * time, so that is the live source of truth; fall back to a preset's `styleOverrides` map, then\n * the CSS initial value. */\n private readNodeDisplay(node: ComponentNode): string {\n const layoutGroup = node.styleTraits?.find(g => g.category === StyleCategory.Layout);\n const displayTrait = layoutGroup?.traits.find(t => t.name === 'display');\n if (displayTrait?.default != null) return displayTrait.default;\n return node.styleOverrides?.['display'] ?? 'block';\n }\n\n private handlePanelEvents(panelEvent: PanelEvent): void {\n // Click-to-insert from the components panel (B2) — no drag, same node and same undo step.\n if (panelEvent.type === PanelEventTypes.INSERT_COMPONENT) {\n this.insertFromPanel(panelEvent.data);\n return;\n }\n // Every style or structural edit — including a breakpoint override — emits LAYOUT_CHANGED.\n if (panelEvent.type === PanelEventTypes.LAYOUT_CHANGED) {\n this.refreshBreakpointCounts();\n return;\n }\n if (panelEvent.type === PanelEventTypes.PANEL_CLOSE) {\n this.isPanelOpen = false;\n return;\n }\n\n if (panelEvent.type === PanelEventTypes.PANEL_OPEN) {\n this.isPanelOpen = true;\n }\n }\n}","<div class=\"builder\">\n <header class=\"builder-header\">\n <div class=\"sidebar-switcher\">\n <button (click)=\"activeSidebar = 'pages'\" [class.active]=\"activeSidebar === 'pages'\" title=\"Pages\" aria-label=\"Pages\">\n <i class=\"ph-thin ph-browsers\"></i>\n </button>\n <button (click)=\"activeSidebar = 'components'\" [class.active]=\"activeSidebar === 'components'\" title=\"Components\" aria-label=\"Components\">\n <i class=\"ph-thin ph-cube\"></i>\n </button>\n <button (click)=\"activeSidebar = 'tree'\" [class.active]=\"activeSidebar === 'tree'\" title=\"Layers\" aria-label=\"Layers\">\n <i class=\"ph-thin ph-tree-structure\"></i>\n </button>\n <button (click)=\"activeSidebar = 'tokens'\" [class.active]=\"activeSidebar === 'tokens'\" title=\"Design Tokens\" aria-label=\"Design Tokens\">\n <i class=\"ph-thin ph-circles-three\"></i>\n </button>\n </div>\n\n <app-toolbar\n [activeMode]=\"activeMode\"\n [activeBreakpoint]=\"activeBreakpoint\"\n [breakpointCounts]=\"breakpointCounts\"\n [auditCount]=\"auditFindings.length\"\n [auditOpen]=\"auditOpen\"\n [activeZoom]=\"activeZoom\"\n [activeScreenWidth]=\"activeScreenWidth\"\n [isSaving]=\"isSaving\"\n [pageStatus]=\"pageStatus\"\n [canUndo]=\"canUndo\"\n [canRedo]=\"canRedo\"\n (modeChange)=\"handleToolbarModeChange($event)\"\n (breakpointChange)=\"handleToolbarBreakpointChange($event)\"\n [formStateTarget]=\"formStateTarget\"\n [activeFormState]=\"activeFormState\"\n (formStateChange)=\"handleToolbarFormStateChange($event)\"\n (auditToggle)=\"toggleAudit()\"\n (zoomChange)=\"handleToolbarZoomChange($event)\"\n (screenWidthChange)=\"handleToolbarScreenWidthChange($event)\"\n (save)=\"save.emit()\"\n (preview)=\"preview.emit()\"\n (publishToggle)=\"publishToggle.emit()\"\n (undo)=\"undo.emit()\"\n (redo)=\"redo.emit()\">\n </app-toolbar>\n\n <div class=\"panel-switcher\">\n <button (click)=\"selectPanel(panelTypes.BINDINGS)\" [class.active]=\"activePanel === panelTypes.BINDINGS\" title=\"Bindings\">\n <i class=\"ph-thin ph-plugs-connected\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.STYLES)\" [class.active]=\"activePanel === panelTypes.STYLES\" title=\"Styles\">\n <i class=\"ph-thin ph-paint-brush\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.PAGE)\" [class.active]=\"activePanel === panelTypes.PAGE\" title=\"Page settings\" aria-label=\"Page settings\">\n <i class=\"ph-thin ph-gear-six\"></i>\n </button>\n <button (click)=\"selectPanel(panelTypes.INTERACTIONS)\" [class.active]=\"activePanel === panelTypes.INTERACTIONS\" title=\"Interactions\">\n <i class=\"ph-thin ph-lightning\"></i>\n </button>\n </div> \n </header>\n\n <app-breadcrumb-bar\n [path]=\"selectedPath\"\n (nodeSelect)=\"onCrumbSelect($event)\"\n (nodePeek)=\"onCrumbPeek($event)\">\n </app-breadcrumb-bar>\n\n <div class=\"builder-main\" [class.panel-open]=\"isPanelOpen\">\n <aside class=\"sidebar\">\n <div *ngIf=\"activeSidebar === 'pages'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderPages]\"></ng-content>\n </div>\n <div *ngIf=\"activeSidebar === 'components'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderComponents]\"></ng-content>\n </div>\n <div *ngIf=\"activeSidebar === 'tokens'\" class=\"sidebar-slot\">\n <ng-content select=\"[builderTokens]\"></ng-content>\n </div>\n <app-layer-tree *ngIf=\"activeSidebar === 'tree'\"\n [layout]=\"layout\"\n [globalElements]=\"globalElements\"\n (nodeSelect)=\"onTreeNodeSelect($event)\"\n (nodeAction)=\"onTreeNodeAction($event)\"\n (nodeMove)=\"onTreeNodeMove()\"></app-layer-tree>\n </aside>\n\n <main #previewCanvas class=\"preview\"\n [class.grab-mode]=\"activeMode === builderModes.Pan\"\n [class.grabbing]=\"isPanning\"\n (click)=\"handleCanvasClick()\"\n (mousedown)=\"onBoardMouseDown($event)\"\n (mousemove)=\"onBoardMouseMove($event)\"\n (mouseup)=\"onBoardMouseUp()\"\n (mouseleave)=\"onBoardMouseUp()\">\n <app-overlay (toolbarAction)=\"onToolbarAction($event)\"></app-overlay>\n\n <!-- Responsive audit (A5) — floats over the canvas, right gutter. -->\n @if (auditOpen) {\n <div class=\"audit-dock\" (click)=\"$event.stopPropagation()\">\n <app-audit-panel\n [findings]=\"auditFindings\"\n [breakpointLabel]=\"auditBreakpointLabel\"\n [running]=\"auditRunning\"\n (select)=\"selectAuditNode($event)\"\n (fix)=\"applyAuditFix($event)\"\n (fixAll)=\"applyAllAuditFixes()\"\n (rerun)=\"runAudit()\"\n (closePanel)=\"toggleAudit()\"></app-audit-panel>\n </div>\n }\n\n <!-- Custom Lenis scrollbar — lives in .preview (not .preview-scroll) so it\n stays in the right gutter and never overlaps the canvas at large widths.\n No translateY counteract needed since it isn't inside the Lenis wrapper. -->\n <div class=\"canvas-scrollbar\"\n [class.visible]=\"isScrollbarVisible\">\n <div class=\"canvas-scrollbar-thumb\"\n [style.height.px]=\"scrollThumbHeight\"\n [style.top.px]=\"scrollThumbTop\">\n </div>\n </div>\n\n <!-- Global elements overlay — outside Lenis so position:fixed children\n stay pinned to the canvas viewport rather than scrolling with content.\n Shares viewportTransform so elements scale correctly at any zoom level.\n Height matches viewportHeight so position:fixed + inset:0 fills the\n simulated viewport correctly (CSS calc(100%) would give the wrong\n containing-block height and break full-screen fixed overlays). -->\n <div *ngIf=\"globalElements.length\"\n #globalOverlay\n class=\"global-elements-overlay\"\n [style.width.px]=\"viewportWidth\"\n [style.height.px]=\"canvasFrameHeight || viewportHeight\"\n [style.transform]=\"viewportTransform\">\n <ng-container *ngFor=\"let item of globalElementsBefore\">\n <ng-container [ioxRender]=\"item\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let item of globalElementsAfter\">\n <ng-container [ioxRender]=\"item\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"preview-scroll\"\n #previewScroll\n [style.width.px]=\"viewportScaledWidth\"\n [class.pan-mode]=\"activeMode === builderModes.Pan\">\n\n <!-- Lenis content proxy: height = realContentHeight × scale.\n Lenis scrolls against this value so scroll range is always in\n visual px — correct at any zoom level. -->\n <div class=\"preview-lenis-content\" #lenisContent\n [style.height.px]=\"scaledContentHeight\">\n\n <iox-page-component\n [style.width.px]=\"viewportWidth\"\n [style.height.px]=\"canvasFrameHeight || viewportHeight\"\n [style.transform]=\"viewportTransform\">\n\n <div class=\"canvas-viewport\"\n id=\"canvas-preview\"\n [style.min-height.px]=\"canvasMinHeight\">\n\n <!-- Empty page (B4): a starting point beats a blank canvas. Each starter is\n a responsive layout preset — ordinary nodes, editable afterwards. -->\n @if (isPageEmpty) {\n <div class=\"empty-canvas\" (click)=\"$event.stopPropagation()\">\n <h2 class=\"empty-title\">Start with a layout</h2>\n <p class=\"empty-sub\">Each one already adapts to tablet and phone. You can edit or take it apart afterwards.</p>\n <div class=\"empty-grid\">\n @for (starter of starterLayouts; track starter.id) {\n <button type=\"button\" class=\"empty-card\" (click)=\"startWithLayout(starter)\">\n <i [class]=\"starter.icon\" aria-hidden=\"true\"></i>\n <span class=\"empty-card-name\">{{ starter.name }}</span>\n <span class=\"empty-card-desc\">{{ starter.description }}</span>\n </button>\n }\n </div>\n <button type=\"button\" class=\"empty-link\" (click)=\"browseComponents()\">Or start from a single element</button>\n </div>\n }\n\n <!-- WRAPPER COLLAPSE (task 9c): top-level nodes render DIRECTLY into the\n canvas viewport — no .preview-node wrapper; iox-outer + drag move to the\n host (RenderDirective, via ioxDragSourceId). -->\n <ng-container *ngFor=\"let item of layout\"\n [ioxRender]=\"item\"\n [ioxDragSourceId]=\"'canvas-preview'\"\n (onClick)=\"handleClick($event)\"\n (onMouseEnter)=\"handleMouseEnter($event)\"\n (onMouseLeave)=\"handleMouseLeave()\">\n </ng-container>\n </div>\n </iox-page-component>\n </div>\n </div>\n </main>\n\n <ng-content select=\"[builderPanel]\"></ng-content>\n </div>\n\n <!-- Save as Reusable Block dialog -->\n @if (showSaveBlockDialog) {\n <div class=\"save-block-backdrop\" (click)=\"cancelSaveBlock()\"></div>\n <div class=\"save-block-dialog\" (click)=\"$event.stopPropagation()\">\n <h4 class=\"save-block-title\">Save as Reusable Block</h4>\n <input class=\"save-block-input\"\n type=\"text\"\n placeholder=\"Block name...\"\n [(ngModel)]=\"saveBlockName\"\n (keydown.enter)=\"confirmSaveBlock()\"\n (keydown.escape)=\"cancelSaveBlock()\"\n autofocus>\n <div class=\"save-block-actions\">\n <p-button size=\"small\" severity=\"secondary\" label=\"Cancel\" (click)=\"cancelSaveBlock()\"></p-button>\n <p-button size=\"small\" label=\"Save\" [disabled]=\"!saveBlockName.trim()\" (click)=\"confirmSaveBlock()\"></p-button>\n </div>\n </div>\n }\n</div>","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host Section (Phase 2 of the Moveable migration = task 9c). The `<section>` IS the host\n * (no `<app-section>` wrapper, no separate `.section-root`) — matching the SSR engine's\n * `section[iox-section]`. The dropzone is registered on the host element itself (was the ioxDropzone\n * directive on `.section-root`); the `.section-child` draggable wrappers are UNCHANGED, so interact.js\n * (flag-off) keeps working exactly as before. See moveable-migration.md.\n */\n@Component({\n selector: 'section[iox-section]',\n template: `\n <div *ngIf=\"!children.length\" class=\"section-placeholder\">\n <i class=\"ph-thin ph-rows\"></i>\n <span>Drop components here</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly; iox-outer + drag move to the host. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'section-root iox-node-' + nodeId + (listOrientation === 'horizontal' ? ' is-horizontal' : '')\",\n },\n styles: [`\n :host {\n position: relative;\n box-sizing: border-box;\n }\n .section-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n z-index: 0;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host(:hover) .section-placeholder,\n :host(.iox-drag-over) .section-placeholder {\n opacity: 1;\n }\n .section-placeholder i { font-size: 22px; }\n /* Flex/grid-child sizing on the collapsed direct-child hosts (was .section-child). ::ng-deep\n because the hosts are inserted dynamically by RenderDirective. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class SectionComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on `.section-root`).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host Container (Phase 2 of the Moveable migration = task 9c). The real tag (div/section/\n * ul/ol/li/…, chosen from the `htmlTag` trait by RenderDirective via `hostElement`) IS the host — no\n * `<app-builder-container>` wrapper, no separate `.container-root` — matching the SSR engine. The\n * dropzone is registered on the host itself; the `.container-child` draggable wrappers are UNCHANGED,\n * so interact.js (flag-off) keeps working. Also backs the List (`ul`/`ol`) and ListItem (`li`) types.\n * See moveable-migration.md.\n */\n@Component({\n selector: 'div[iox-container],section[iox-container],article[iox-container],header[iox-container],footer[iox-container],main[iox-container],nav[iox-container],ul[iox-container],ol[iox-container],li[iox-container],form[iox-container]',\n template: `\n <!-- Empty-container slot (B2). pointer-events:none, so a click falls through and SELECTS\n this container — and the components panel then inserts INSIDE it. -->\n <div *ngIf=\"!children.length\" class=\"container-placeholder\">\n <i class=\"ph-thin ph-plus\"></i>\n <span>Click to select, then add an element</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render each child DIRECTLY — no .container-child wrapper. The\n RenderDirective puts iox-outer + iox-node on the child's HOST (the flex item) and registers\n drag there (via ioxDragSourceId), so the builder DOM matches the SSR engine's single\n element per node. Flex-child sizing (min-width:0) moves to \\`.container-root > *\\` below. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'container-root iox-node-' + nodeId + (listOrientation === 'horizontal' ? ' is-horizontal' : '') + (formClass ? ' ' + formClass : '')\",\n // Form nodes on the canvas carry the same class + state attribute the engine's twin does, so\n // the SHARED `iox-forms.css` decides visibility identically in both renderers.\n '[attr.data-iox-state]': 'formClass === \"iox-form\" ? formState : null',\n '[attr.start]': \"htmlTag === 'ol' && start !== 1 ? start : null\",\n '[attr.reversed]': \"htmlTag === 'ol' && reversed ? '' : null\",\n },\n styles: [`\n :host {\n position: relative;\n box-sizing: border-box;\n }\n .container-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n z-index: 0;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host(:hover) .container-placeholder,\n :host(.iox-drag-over) .container-placeholder {\n opacity: 1;\n }\n .container-placeholder i { font-size: 18px; }\n /* Flex/grid-child sizing on the DIRECT children (the collapsed node hosts) — was on the\n removed .container-child wrapper. min-width:0 lets flex items shrink below content so the\n equal-split works. ::ng-deep because the hosts are inserted dynamically (RenderDirective),\n so they don't carry this component's encapsulation attribute. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderContainerComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n @Input() htmlTag: string = 'div';\n @Input() start: number = 1;\n @Input() reversed: boolean = false;\n /**\n * Form-family marker: `iox-form`, `iox-form-success`, `iox-form-error` or `iox-field-group`.\n * The builder reuses THIS component for those types (as it already does for List/ListItem), so\n * they get the canvas drop zone and child rendering; the class is what lets the shared form\n * stylesheet treat them exactly as it treats the engine's own twins.\n */\n @Input() formClass = '';\n /** Which state the canvas is showing. Only meaningful on a form host. */\n @Input() formState = 'idle';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on `.container-root`).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../services/drag-engine.service';\n\n@Directive({\n selector: '[ioxDropzone]',\n standalone: false,\n})\nexport class IoxDropzoneDirective implements OnInit, OnDestroy {\n @Input() ioxDropzoneId = '';\n @Input() ioxDropzoneData: ComponentNode[] = [];\n /** Optional callback invoked after a drop lands in this zone (e.g. repeater preview refresh). */\n @Input() ioxDropzonePostDrop?: () => void;\n @Output() ioxDrop = new EventEmitter<IoxDropEvent>();\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.dragEngine.registerDropzone(\n this.ioxDropzoneId,\n this.el.nativeElement,\n this.ioxDropzoneData,\n this.cdr,\n (evt) => this.ioxDrop.emit(evt),\n this.ioxDropzonePostDrop,\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.ioxDropzoneId, this.el.nativeElement);\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\n\nimport { ComponentNode } from '../../models/component.model';\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n@Component({\n selector: 'app-builder-linked-container',\n template: `\n <a [href]=\"resolvedHref\"\n [target]=\"target\"\n [ngStyle]=\"style\"\n [ngClass]=\"['iox-node-' + nodeId, listOrientation === 'horizontal' ? 'is-horizontal' : '']\"\n class=\"linked-container-root\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <div *ngIf=\"!children.length\" class=\"linked-container-placeholder\">\n <i class=\"ph-thin ph-link\"></i>\n <span>Drop components here</span>\n </div>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly into the <a>; iox-outer + drag\n move to the host. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </a>\n `,\n styles: [`\n .linked-container-root {\n display: block;\n position: relative;\n box-sizing: border-box;\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n }\n .linked-container-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transition: opacity 0.15s;\n }\n .linked-container-root:hover .linked-container-placeholder,\n .linked-container-root.iox-drag-over .linked-container-placeholder {\n opacity: 1;\n }\n .linked-container-placeholder i { font-size: 18px; }\n /* Flex/grid-child sizing on the collapsed direct-child hosts (was .linked-container-child).\n ::ng-deep because the hosts are inserted dynamically by RenderDirective. */\n :host ::ng-deep .linked-container-root > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderLinkedContainerComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Input() linkType: 'external' | 'page' = 'external';\n @Input() url = 'https://';\n @Input() pageRoute = '';\n @Input() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n private capturePreventDefault = (e: MouseEvent) => e.preventDefault();\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\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 get listOrientation(): 'horizontal' | 'vertical' {\n const d = this.style?.['display'];\n if (d === 'flex' || d === 'inline-flex') {\n const dir = this.style?.['flexDirection'];\n if (!dir || dir === 'row' || dir === 'row-reverse') return 'horizontal';\n }\n return 'vertical';\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { resolvePath } from '@vectoriox/iox-ui';\n\nimport { ComponentNode, IoxBinding } from '../models/component.model';\n\n/**\n * `resolvePath` now lives in @vectoriox/iox-ui so the builder canvas and BOTH engine renderers\n * share one implementation — it had already drifted while forked. Re-exported here as a passthrough\n * so existing import sites keep working. See render-parity.md.\n */\nexport { resolvePath };\n\n/**\n * Deep-clones a ComponentNode tree and overrides trait defaults\n * according to each node's bindings resolved against `item`.\n *\n * Each clone gets a new `id` (for Angular tracking / overlay registration)\n * but shares the original node's CSS class by setting `styleId = originalId`.\n * This means all repeated preview rows point to the same CSS rule block as the\n * template node — the style engine only needs one rule per logical slot.\n */\nexport function cloneNodesForItem(nodes: ComponentNode[], item: any): ComponentNode[] {\n return nodes.map(node => {\n // Capture the CSS-owning id before clone\n const cssId = node.styleId ?? node.id;\n\n const clone: ComponentNode = JSON.parse(JSON.stringify(node));\n clone.id = Math.random().toString(36).substr(2, 9);\n // Point this clone and all its descendants at the original CSS rule.\n clone.styleId = cssId;\n // Mark as a preview clone: display-only, not selectable/editable on the canvas.\n // (Distinct from styleId, which duplication/paste also uses.) The render directive\n // skips overlay registration for nodes carrying this flag.\n (clone as any).__previewClone = true;\n\n if (clone.bindings?.length && item) {\n for (const binding of clone.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n for (const trait of clone.traits || []) {\n if (trait.name === binding.prop) {\n trait.default = value;\n }\n }\n }\n }\n }\n\n if (clone.children?.length) {\n clone.children = cloneNodesForItem(clone.children, item);\n }\n\n return clone;\n });\n}\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { forkJoin, Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport {\n computeRelative,\n DataSourceEndpoints,\n dataSourcePlanToRequest,\n getByPath,\n normalizeCollectionResult,\n planDataSource,\n resolveRepeaterItems,\n} from '@vectoriox/iox-ui';\n\nimport { IoxDataSource } from '../models/component.model';\n\n/**\n * Public content bases the builder canvas resolves data against — the SAME `@Public()` controllers\n * the live storefront (SSR engine) hits, so the canvas preview shows what the published page shows.\n * Provide from the host app, e.g. `{ cmsBase: config.host + 'api/', shopBase: config.host + 'api/shop/' }`.\n */\nexport const IOX_DATA_SOURCE_ENDPOINTS = new InjectionToken<DataSourceEndpoints>('IOX_DATA_SOURCE_ENDPOINTS');\n\n/**\n * THE data fetch for every canvas component that renders a data source (Repeater, SliderContainer)\n * and for the bindings preview.\n *\n * Before this existed, each of those fetched by itself through an injected admin content service\n * (`getContent(contentType, orgId)` → `api/org/:orgId/resources/:type`), which takes NO filters:\n * the data source's `filterByQueryParams` / `filterByRouteParam` were silently ignored, so the\n * canvas always showed the whole unfiltered collection, and the live SSR site — which does apply\n * them — rendered something different. Every caller now runs the SHARED `planDataSource` from\n * `@vectoriox/iox-ui` against the public controllers, exactly like the SSR engine.\n */\n@Injectable()\nexport class BuilderDataSourceService {\n\n constructor(\n private http: HttpClient,\n @Optional() @Inject(IOX_DATA_SOURCE_ENDPOINTS) private endpoints: DataSourceEndpoints | null,\n ) {}\n\n /** True when the host app wired the public endpoints — without them nothing can be fetched. */\n get isConfigured(): boolean { return !!this.endpoints; }\n\n /**\n * Resolve a data source to the value its MODE describes: the item for a `single` source, the\n * array for a `list`. The builder is design time — there are no live route or query params — so\n * a route filter falls back to `defaultId` and a query filter to its `defaultValue`, which is\n * exactly what `planDataSource` does with empty params.\n *\n * Callers pass the source itself (resolved from their own page-scoped\n * `DataSourceRegistryService`) rather than an alias: this service is module-scoped and must not\n * capture a registry from the wrong injector. Emits `null` when the source resolves to no\n * request or the fetch fails — the canvas degrades to an empty preview, it never throws.\n */\n fetch(ds: IoxDataSource | undefined): Observable<any> {\n if (!ds) return of(null);\n\n const plan = planDataSource(ds as any);\n if (plan.kind === 'static') return of(plan.data);\n if (plan.kind === 'none' || !this.endpoints) return of(null);\n\n const request = dataSourcePlanToRequest(plan, this.endpoints);\n if (!request) return of(null);\n\n const { kind, mode } = plan;\n return this.http.get(request.url, { params: request.params }).pipe(\n // A by-id response is already the item; anything else goes through the shared\n // unwrap-and-pick so `single` yields one item and `list` the whole array.\n map((data: any) => kind === 'by-id'\n ? (Array.isArray(data) ? (data[0] ?? null) : data)\n : normalizeCollectionResult(mode, data)),\n catchError(() => of(null)),\n );\n }\n\n /** Same fetch, always as an array — for the canvas components that repeat over the source. */\n fetchItems(ds: IoxDataSource | undefined): Observable<any[]> {\n return this.fetchRepeaterItems(ds);\n }\n\n /**\n * Items a Repeater/Slider iterates over. With `sourcePath` it repeats over an array PROPERTY of a\n * SINGLE-resource source (e.g. `product.gallery`); without it the source itself is the list.\n * Uses the SHARED `resolveRepeaterItems` so the canvas preview matches the SSR engine.\n */\n fetchRepeaterItems(ds: IoxDataSource | undefined, sourcePath?: string): Observable<any[]> {\n return this.fetch(ds).pipe(map(value => resolveRepeaterItems(value, sourcePath)));\n }\n\n /**\n * Resolve a data source BY ALIAS, following `derived` aliases (a VIEW into another variable:\n * resolve the parent, then getByPath) and `relative` aliases (route-context — `$current`/\n * `$siblings`/`$related`). `findByAlias` is injected so this module stays registry-free (the caller\n * passes its own page-scoped registry). Recurses for chained aliases.\n *\n * The builder is design time: `relative` sources resolve their dependency aliases (subject +\n * collection) — a single source falls back to its `defaultId`, a list to the whole collection —\n * then run the SHARED `computeRelative`, so the canvas shows the SAME neighbours the SSR engine\n * bakes into the live page. `$route` has no live params at design time → `{}`.\n */\n fetchByAlias(alias: string, findByAlias: (a: string) => IoxDataSource | undefined): Observable<any> {\n const ds = findByAlias(alias);\n if (!ds) return of(null);\n if (ds.type === 'derived') {\n const d = ds.request?.derived;\n if (!d?.from) return of(null);\n return this.fetchByAlias(d.from, findByAlias).pipe(map(parent => getByPath(parent, d.path ?? '')));\n }\n if (ds.type === 'relative') {\n const spec = ds.request?.relative;\n if (!spec) return of(null);\n if (spec.kind === 'route') return of({});\n const subjectAlias = spec.kind === 'current' ? spec.from : (spec.subjectFrom ?? spec.from);\n const needsCollection = spec.kind === 'siblings' || spec.kind === 'related';\n return forkJoin({\n subject: subjectAlias ? this.fetchByAlias(subjectAlias, findByAlias) : of(undefined),\n collection: needsCollection && spec.from ? this.fetchByAlias(spec.from, findByAlias) : of(undefined),\n }).pipe(map(({ subject, collection }) => computeRelative(spec, { subject, collection, routeParams: {} })));\n }\n return this.fetch(ds);\n }\n\n /** Repeater items for an alias (follows derived aliases + applies an optional sourcePath). */\n fetchRepeaterItemsByAlias(\n alias: string,\n findByAlias: (a: string) => IoxDataSource | undefined,\n sourcePath?: string,\n ): Observable<any[]> {\n return this.fetchByAlias(alias, findByAlias).pipe(map(value => resolveRepeaterItems(value, sourcePath)));\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { ComponentNode, IoxBinding } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderDataSourceService } from '../../services/builder-data-source.service';\nimport { DataSourceRegistryService } from '../../services/data-source-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../../panels/panel-event.service';\nimport { cloneNodesForItem, resolvePath } from '../../utils/binding-path.util';\nimport { InteractionEngineService } from '../../services/interaction-engine.service';\n\n@Component({\n selector: 'app-builder-repeater',\n template: `\n <ng-template #badgeContent>\n <i class=\"ph-thin ph-repeat\"></i>\n <span *ngIf=\"source\">{{ source }}</span>\n <span *ngIf=\"!source\" class=\"repeater-badge-empty\">No source</span>\n <span *ngIf=\"items.length\" class=\"repeater-badge-count\">× {{ items.length }}</span>\n <span *ngIf=\"isLoading\" class=\"repeater-badge-loading\"><i class=\"ph-thin ph-circle-notch\"></i></span>\n </ng-template>\n\n <!--\n .repeater-wrapper is the layout root.\n In has-children state, .repeater-badge lives here as a direct child\n (position:absolute, hover-only) so it is NOT a child of .repeater-root\n and does NOT shift the :nth-child index of the item wrappers.\n\n In empty state, .repeater-badge lives inside .repeater-root (no items\n to count, so :nth-child is irrelevant there).\n -->\n <div class=\"repeater-wrapper\" [class.has-children]=\"children.length > 0\">\n\n <!-- HAS-CHILDREN: badge outside root, absolute over wrapper -->\n <div *ngIf=\"children.length > 0\" class=\"repeater-badge\">\n <ng-container *ngTemplateOutlet=\"badgeContent\"></ng-container>\n </div>\n\n <div class=\"repeater-root\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n [ioxDropzonePostDrop]=\"refreshPreviewsBound\"\n (ioxDrop)=\"onDrop($event)\">\n\n <!-- EMPTY STATE: badge + placeholder inside root -->\n <ng-container *ngIf=\"!children.length\">\n <div class=\"repeater-badge\">\n <ng-container *ngTemplateOutlet=\"badgeContent\"></ng-container>\n </div>\n <div class=\"repeater-placeholder\">\n <i class=\"ph-thin ph-rows\"></i>\n <span>Drop a component here as the item template</span>\n </div>\n </ng-container>\n\n <!-- Template items — DIRECT children of repeater-root.\n :first-child / :nth-child(odd) etc. now correctly target these\n as siblings of the preview items below. -->\n <div *ngFor=\"let child of children\"\n [ngClass]=\"['repeater-item-template', 'iox-outer-' + (child.styleId ?? child.id)]\"\n [attr.data-iox-row-src]=\"source || null\"\n [attr.data-iox-row-idx]=\"source ? 0 : null\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n\n <!-- Preview items — also DIRECT children of repeater-root. -->\n <ng-container *ngFor=\"let row of previewRows; let ri = index\">\n <div *ngFor=\"let child of row\"\n [ngClass]=\"['repeater-preview-child', 'iox-outer-' + (child.styleId ?? child.id)]\"\n [attr.data-iox-row-src]=\"source || null\"\n [attr.data-iox-row-idx]=\"ri + 1\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"$event\"\n (onMouseEnter)=\"$event\"\n (onMouseLeave)=\"undefined\">\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n `,\n styles: [`\n /* ── Outer wrapper: anchors the absolute badge in has-children state ── */\n .repeater-wrapper {\n position: relative;\n box-sizing: border-box;\n }\n\n /* ── Badge base (used in both empty and has-children contexts) ── */\n .repeater-badge {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 4px 8px;\n font-size: 11px;\n color: #cb9090;\n background: rgba(203, 144, 144, 0.08);\n border: 1px dashed rgba(203, 144, 144, 0.4);\n border-bottom: none;\n border-radius: 4px 4px 0 0;\n user-select: none;\n }\n\n /* ── Has-children: badge is absolute over the wrapper, hover-only ── */\n .repeater-wrapper.has-children > .repeater-badge {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n border-radius: 0 0 4px 0;\n border: 1px solid rgba(203, 144, 144, 0.5);\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.15s;\n }\n .repeater-wrapper.has-children:hover > .repeater-badge {\n opacity: 1;\n }\n\n .repeater-badge i { font-size: 13px; }\n .repeater-badge-empty { opacity: 0.55; }\n .repeater-badge-count { margin-left: auto; font-weight: 600; }\n .repeater-badge-loading i { animation: spin 1s linear infinite; }\n @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }\n\n /* ── Root ── */\n .repeater-root {\n box-sizing: border-box;\n }\n\n /* ── Empty state: dashed border on root (connected with badge above) ── */\n .repeater-wrapper:not(.has-children) .repeater-root {\n border: 1px dashed rgba(203, 144, 144, 0.4);\n border-top: none;\n border-radius: 0 0 4px 4px;\n min-height: 40px;\n }\n\n .repeater-placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 1.5rem 1rem;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n .repeater-placeholder i { font-size: 20px; }\n\n /* ── Template item: direct child, draggable, full opacity ── */\n .repeater-item-template {\n min-width: 0;\n }\n\n /* ── Preview items: direct children, dimmed, non-interactive ── */\n .repeater-preview-child {\n opacity: 0.55;\n pointer-events: none;\n min-width: 0;\n }\n `],\n standalone: false,\n})\nexport class BuilderRepeaterComponent implements OnInit, OnDestroy {\n private _children: ComponentNode[] = [];\n get children(): ComponentNode[] { return this._children; }\n /** RenderDirective sets `source` (→ fetchData) BEFORE `children`. With an async source the response\n * lands after children are set, so previews build fine; but a SYNC source (static, or a fast\n * cache) resolves before children exist, leaving previewRows empty. Rebuild when children arrive\n * (or change) so both orderings — and loaded pages with sync sources — render their rows. */\n @Input() set children(value: ComponentNode[]) {\n this._children = value ?? [];\n // Defer to the next tick: RenderDirective sets `children` before the template child's\n // component is instantiated/registered, so applyFirstItemToTemplate needs the ref to exist\n // first (otherwise the FIRST row shows its default instead of item[0]'s value).\n if (this.items.length) setTimeout(() => this.refreshPreviews());\n }\n @Input() style: { [key: string]: any } = {};\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n public items: any[] = [];\n public previewRows: ComponentNode[][] = [];\n public isLoading = false;\n\n /** Bound reference passed to [ioxDropzonePostDrop] so the directive can call it. */\n readonly refreshPreviewsBound = () => { setTimeout(() => this.refreshPreviews()); };\n\n private _source = '';\n private _sourcePath = '';\n private _limit = 10;\n private bindingSub?: Subscription;\n\n get source(): string { return this._source; }\n @Input() set source(value: string) {\n if (value === this._source) return;\n this._source = value;\n if (value) { this.fetchData(); }\n else { this.items = []; this.previewRows = []; }\n }\n\n /** Optional array PROPERTY inside a single-resource source to repeat over (e.g. `gallery`). */\n get sourcePath(): string { return this._sourcePath; }\n @Input() set sourcePath(value: string) {\n const next = value ?? '';\n if (next === this._sourcePath) return;\n this._sourcePath = next;\n if (this._source) { this.fetchData(); }\n }\n\n get limit(): number { return this._limit; }\n @Input() set limit(value: number) {\n if (value === this._limit) return;\n this._limit = value;\n if (this._source) { this.fetchData(); }\n }\n\n constructor(\n private dragEngine: DragEngineService,\n private overlayService: OverlayService,\n private dataSourceService: BuilderDataSourceService,\n private dsRegistry: DataSourceRegistryService,\n private panelEventService: PanelEventService,\n private cdr: ChangeDetectorRef,\n private interactionEngine: InteractionEngineService,\n ) {}\n\n ngOnInit(): void {\n this.bindingSub = this.panelEventService.subscribe(event => {\n // A binding OR an interaction change on a template node must re-clone the preview rows.\n // Interactions matter because clones are attached by ELEMENT at render time, so a newly\n // added interaction never reaches an existing clone — it would appear to work only after\n // a save + reload. See element-context-state-plan.md.\n if (event.type !== PanelEventTypes.BINDING_CHANGED\n && event.type !== PanelEventTypes.INTERACTION_CHANGED) return;\n const changedNode: ComponentNode = event.data?.node;\n if (!changedNode || !this.items.length) return;\n if (this.isInTemplate(changedNode)) {\n this.refreshPreviews();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.bindingSub?.unsubscribe();\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr,\n () => { if (this.items.length > 0) setTimeout(() => this.refreshPreviews()); });\n }\n\n /** Monotonic fetch token — editing a binding sets `source` and `sourcePath` as two separate inputs,\n * each firing a fetch; the transient mismatched one (old source + new path, or vice-versa) must not\n * clobber the correct result if it resolves last. Only the newest fetch's response is applied. */\n private _fetchSeq = 0;\n\n /** Data comes from the SHARED resolver (public controllers + the source's own filters) — the\n * same decision the SSR engine runs, so the canvas preview matches the published page. */\n private fetchData(): void {\n if (!this._source) return;\n\n const seq = ++this._fetchSeq;\n this.isLoading = true;\n this.cdr.markForCheck();\n // Resolve BY ALIAS so `derived` sources (e.g. galleryImages = product.gallery) follow their\n // parent. `sourcePath` (legacy/back-compat) still repeats over an array property inline.\n this.dataSourceService.fetchRepeaterItemsByAlias(\n this._source, (a) => this.dsRegistry.findByAlias(a), this._sourcePath,\n ).subscribe(items => {\n if (seq !== this._fetchSeq) return; // a newer fetch superseded this one — ignore stale items\n this.items = items.slice(0, this._limit);\n // Row markers store a REFERENCE (source + index); the engine needs the array to resolve\n // it back to an item, exactly as the SSR runtime uses resolvedData.\n this.interactionEngine.setContextData({ [this._source]: this.items });\n this.refreshPreviews();\n this.isLoading = false;\n this.cdr.markForCheck();\n });\n }\n\n private isInTemplate(target: ComponentNode): boolean {\n const search = (nodes: ComponentNode[]): boolean =>\n nodes.some(c =>\n c === target || c.id === target.id ||\n (c.children?.length ? search(c.children) : false)\n );\n return search(this.children);\n }\n\n private refreshPreviews(): void {\n if (!this.items.length || !this.children.length) {\n this.previewRows = [];\n this.cdr.markForCheck();\n return;\n }\n this.applyFirstItemToTemplate();\n this.previewRows = this.items.slice(1).map(item =>\n cloneNodesForItem(this.children, item)\n );\n this.cdr.markForCheck();\n }\n\n private applyFirstItemToTemplate(): void {\n const item = this.items[0];\n if (!item || !this.children.length) return;\n this.applyBindingsToNodes(this.children, item);\n }\n\n /** Apply item[0]'s bound values to the live template row, walking the WHOLE subtree — not just\n * direct children. A bound node can sit any level deep once a template child is wrapped in a\n * container (or otherwise nested), so recursion is required or the first row shows defaults. */\n private applyBindingsToNodes(nodes: ComponentNode[], item: any): void {\n for (const child of nodes) {\n if (child.bindings?.length) {\n const ref = this.overlayService.getNodeRef(child);\n if (ref?.componentRef) {\n for (const binding of child.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n ref.componentRef.instance[binding.prop] = value;\n }\n }\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n }\n if (child.children?.length) {\n this.applyBindingsToNodes(child.children, item);\n }\n }\n }\n\n /** Rebuild preview rows after the template STRUCTURE changed (e.g. a child was wrapped, deleted,\n * or moved). Deferred so the new DOM + overlay refs exist before bindings are re-applied. */\n refreshTemplate(): void {\n if (this.items.length) setTimeout(() => this.refreshPreviews());\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n/**\n * Directive-host ButtonBlock (wrapper collapse, task 9c). The real `<button>`/`<a>` IS the host —\n * chosen by RenderDirective via `hostElement` from the `tag` trait (`variableTag`), NOT an internal\n * `<button>` in the template. This matches the SSR engine's `button[iox-button-block]` component and\n * every other collapsed builder component (Container/Section/List/…): ONE element per node carrying\n * BOTH `iox-outer-{id}` (margin/width) + `iox-node-{id}` (visual props). Previously this component\n * kept the OLD pattern — a custom-element selector plus a template that rendered its own\n * `<button class=\"button-block-root\">` — so RenderDirective's host `<button>` (iox-outer) wrapped a\n * second `<button>` (iox-node): button-in-button, and width (outer) + aspect-ratio (inner) split\n * across two elements so aspect-ratio never resolved. Collapsing to the single host fixes both.\n *\n * The `button`/`a` UA resets (border, background, text-decoration) live in the builder app's global\n * styles.scss, kept OFF `:host` so styleProps (`.iox-node-{id}`) can override them.\n */\n@Component({\n selector: 'button[iox-button-block],a[iox-button-block]',\n template: `\n <span *ngIf=\"!children.length\" class=\"button-block-placeholder\">Button</span>\n\n <!-- WRAPPER COLLAPSE (task 9c): render children directly into the host; iox-outer + drag land\n on each child's host (via ioxDragSourceId), matching the SSR engine. -->\n <ng-container *ngFor=\"let child of children\"\n [ioxRender]=\"child\"\n [ioxDragSourceId]=\"dropListId\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n `,\n host: {\n '[class]': \"'button-block-root 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: [`\n :host { box-sizing: border-box; }\n .button-block-placeholder {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(100, 116, 139, 0.4);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n /* Flex/grid-child sizing on the collapsed direct-child hosts; ::ng-deep for dynamic hosts. */\n :host ::ng-deep > [class*=\"iox-outer-\"] { min-width: 0; }\n `],\n standalone: false,\n})\nexport class BuilderButtonBlockComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n @Input() style: { [key: string]: any } = {};\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 @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private elRef: ElementRef<HTMLElement>,\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // Register the HOST as the dropzone (was the ioxDropzone directive on the inner button).\n this.dragEngine.registerDropzone(\n this.dropListId,\n this.elRef.nativeElement,\n this.children,\n this.cdr,\n (evt) => this.onDrop(evt),\n );\n }\n\n ngOnDestroy(): void {\n this.dragEngine.unregisterDropzone(this.dropListId, this.elRef.nativeElement);\n }\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n inject,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { ComponentNode, IoxBinding } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\nimport { ComponentInstanceRegistryService } from '../../services/component-instance-registry.service';\nimport { InteractionEngineService } from '../../services/interaction-engine.service';\nimport { OverlayService } from '../../overlay/overlay.service';\nimport { BuilderDataSourceService } from '../../services/builder-data-source.service';\nimport { DataSourceRegistryService } from '../../services/data-source-registry.service';\nimport { PanelEventService, PanelEventTypes } from '../../panels/panel-event.service';\nimport { cloneNodesForItem, resolvePath } from '../../utils/binding-path.util';\n\n@Component({\n selector: 'app-slider-container',\n template: `\n <!-- EDIT MODE: shell wraps swiper + nav buttons so arrows position relative to slide area -->\n <div *ngIf=\"!isPreview\"\n class=\"slider-edit-shell\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"editShellStyle\"\n ioxDropzone\n [ioxDropzoneId]=\"source ? '' : dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <!-- Repeat badge: hover-only, anchored top-left of shell -->\n <div *ngIf=\"source\" class=\"slider-repeat-badge\">\n <i class=\"ph-thin ph-repeat\"></i>\n <span>{{ source }}</span>\n <span *ngIf=\"items.length\" class=\"slider-repeat-badge-count\">× {{ items.length }}</span>\n <i *ngIf=\"isLoading\" class=\"ph-thin ph-circle-notch slider-badge-spin\"></i>\n </div>\n\n <div #editSwiperEl class=\"swiper swiper-edit\" [attr.dir]=\"dir\" [style.direction]=\"dir\">\n <div class=\"swiper-wrapper\">\n\n <!-- NORMAL MODE: all children as draggable slides -->\n <ng-container *ngIf=\"!source\">\n <div *ngFor=\"let child of children\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </ng-container>\n\n <!-- REPEAT MODE: template slide (item 0) + dimmed preview slides (items 1..N) -->\n <ng-container *ngIf=\"source\">\n <!-- Template slide — draggable/editable, receives item[0] data -->\n <div *ngIf=\"children.length\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (children[0].styleId ?? children[0].id)]\"\n ioxDraggable\n [ioxDragData]=\"children[0]\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"children[0]\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n <!-- Preview slides — dimmed, non-interactive, data resolved from items 1..N -->\n <div *ngFor=\"let slide of previewSlides; trackBy: trackByNodeId\"\n class=\"swiper-slide slider-preview-slide\"\n [ngClass]=\"['iox-outer-' + (slide.styleId ?? slide.id)]\">\n <ng-container\n [ioxRender]=\"slide\"\n (onClick)=\"$event\"\n (onMouseEnter)=\"$event\"\n (onMouseLeave)=\"undefined\">\n </ng-container>\n </div>\n </ng-container>\n\n </div>\n\n <div *ngIf=\"!source && !children.length\" class=\"slider-edit-placeholder\">\n <i class=\"ph-thin ph-sliders-horizontal\"></i>\n <span>Click + in toolbar to add a slide</span>\n </div>\n\n <div *ngIf=\"enablePagination\" class=\"swiper-pagination\"></div>\n <div *ngIf=\"enableScrollbar\" class=\"swiper-scrollbar\"></div>\n </div>\n\n <!-- Nav buttons live on the shell, not inside .swiper, so overflow:hidden never clips them\n and top:50%+transform always centers on the real slide height -->\n <button *ngIf=\"enableNavigation\" class=\"slider-edit-nav slider-edit-nav--prev\"\n (click)=\"_swiper?.slidePrev()\" type=\"button\" title=\"Previous slide\">\n <i class=\"ph-thin ph-caret-left\"></i>\n </button>\n <button *ngIf=\"enableNavigation\" class=\"slider-edit-nav slider-edit-nav--next\"\n (click)=\"_swiper?.slideNext()\" type=\"button\" title=\"Next slide\">\n <i class=\"ph-thin ph-caret-right\"></i>\n </button>\n </div>\n\n <!-- PREVIEW MODE: real Swiper with all interactions enabled -->\n <div *ngIf=\"isPreview\"\n #swiperEl\n class=\"swiper\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"previewStyle\"\n [attr.dir]=\"dir\"\n [style.direction]=\"dir\"\n [style.--swiper-navigation-color]=\"navigationColor || null\"\n [style.--swiper-navigation-size.px]=\"navigationSize || null\"\n [style.--swiper-pagination-color]=\"paginationColor || null\">\n <div class=\"swiper-wrapper\">\n <!-- Swiper requires .swiper-slide as a DIRECT child of .swiper-wrapper.\n Wrap each rendered slide in one (same structure as edit mode) so the\n app-slider-slide host sits INSIDE the slide, not between it and the wrapper. -->\n <ng-container *ngIf=\"!source\">\n <div *ngFor=\"let child of children\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </ng-container>\n <!-- REPEAT: template slide + preview slides -->\n <ng-container *ngIf=\"source\">\n <div *ngIf=\"children.length\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (children[0].styleId ?? children[0].id)]\">\n <ng-container\n [ioxRender]=\"children[0]\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n <div *ngFor=\"let slide of previewSlides; trackBy: trackByNodeId\"\n class=\"swiper-slide\"\n [ngClass]=\"['iox-outer-' + (slide.styleId ?? slide.id)]\">\n <ng-container\n [ioxRender]=\"slide\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </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: [`\n :host {\n display: block;\n }\n /* swiper.css sets .swiper-wrapper { height: 100% } which inflates the container\n to parent height. Override to auto so the slider sizes to slide content. */\n .swiper-wrapper {\n height: auto;\n }\n /* ── Edit-mode shell ─────────────────────────────────────────────────────\n Shell is the IOX-styled container ([ngStyle]=\"style\" lives here).\n position:relative anchors the absolutely-positioned nav buttons + badge.\n The .swiper inside fills the shell width and auto-heights to slides. */\n .slider-edit-shell {\n position: relative;\n display: block;\n }\n .swiper-edit {\n width: 100%;\n }\n /* Edit-mode slides need position:relative for the overlay hit-test */\n .swiper-edit .swiper-slide {\n position: relative;\n }\n /* Nav buttons: siblings to .swiper, positioned on the shell.\n top:50% + transform are purely CSS → auto-recenter on any height change. */\n .slider-edit-nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: 1px solid rgba(255,255,255,0.5);\n background: rgba(0,0,0,0.22);\n color: white;\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 10;\n transition: background 0.15s;\n }\n .slider-edit-nav:hover { background: rgba(0,0,0,0.45); }\n .slider-edit-nav--prev { left: 8px; }\n .slider-edit-nav--next { right: 8px; }\n .slider-edit-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n }\n .slider-edit-placeholder i { font-size: 22px; }\n /* ── Repeat badge ───────────────────────────────────────────────────────\n Hover-only, anchored top-left of shell. Same visual language as Repeater badge. */\n .slider-repeat-badge {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 4px 8px;\n font-size: 11px;\n color: #cb9090;\n background: rgba(203, 144, 144, 0.08);\n border: 1px solid rgba(203, 144, 144, 0.5);\n border-radius: 0 0 4px 0;\n opacity: 0;\n transition: opacity 0.15s;\n user-select: none;\n pointer-events: none;\n }\n .slider-edit-shell:hover .slider-repeat-badge {\n opacity: 1;\n }\n .slider-repeat-badge-count { font-weight: 600; }\n .slider-badge-spin { animation: slider-badge-spin 1s linear infinite; }\n @keyframes slider-badge-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n /* ── Preview slides (repeat mode): dimmed, non-interactive ─────────── */\n .slider-preview-slide {\n opacity: 0.55;\n pointer-events: none;\n }\n `],\n standalone: false,\n})\nexport class SliderContainerComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\n @Input() children: ComponentNode[] = [];\n\n private _style: Record<string, any> = {};\n private _previewStyle: Record<string, any> = {};\n private _editShellStyle: Record<string, any> = { position: 'relative' };\n @Input() set style(v: Record<string, any>) {\n if (v === this._style) return;\n this._style = v;\n // `direction` is driven by the `dir` (Language direction) trait via [style.direction].\n // Strip it from the ngStyle map: NgStyle writes the inline style last and would otherwise\n // override the dir-driven direction with the generic Layout default → RTL wouldn't apply.\n // Rebuild cached objects so ngStyle only re-applies on real input changes (avoids MO spam).\n const { direction: _dropDirection, ...rest } = v || {};\n this._previewStyle = rest;\n this._editShellStyle = { ...rest, position: 'relative' };\n }\n get style(): Record<string, any> { return this._style; }\n\n get previewStyle(): Record<string, any> { return this._previewStyle; }\n get editShellStyle(): Record<string, any> { return this._editShellStyle; }\n\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n // ── Parameters ─────────────────────────────────────────────────────────────\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n @Input() slidesPerView: number | 'auto' = 'auto';\n @Input() slidesPerGroup: number = 1;\n /** 'off' | 'loop' | 'rewind' */\n @Input() loop: string = 'off';\n @Input() centeredSlides: boolean = false;\n @Input() spaceBetween: number = 0;\n @Input() initialSlide: number = 0;\n @Input() autoHeight: boolean = false;\n @Input() grabCursor: boolean = true;\n @Input() slideToClickedSlide: boolean = false;\n\n // ── Effects ────────────────────────────────────────────────────────────────\n @Input() effect: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'cards' | 'creative' = 'slide';\n @Input() speed: number = 300;\n\n // ── Navigation ─────────────────────────────────────────────────────────────\n @Input() enableNavigation: boolean = false;\n @Input() navigationColor: string = '';\n @Input() navigationSize: number = 44;\n\n // ── Pagination ─────────────────────────────────────────────────────────────\n @Input() enablePagination: boolean = false;\n @Input() paginationColor: string = '';\n @Input() paginationType: 'bullets' | 'fraction' | 'progressbar' = 'bullets';\n @Input() paginationClickable: boolean = true;\n @Input() paginationDynamicBullets: boolean = false;\n\n // ── Autoplay ───────────────────────────────────────────────────────────────\n @Input() enableAutoplay: boolean = false;\n @Input() autoplayDelay: number = 3000;\n @Input() autoplayPauseOnMouseEnter: boolean = true;\n @Input() autoplayDisableOnInteraction: boolean = false;\n\n // ── Modules ────────────────────────────────────────────────────────────────\n @Input() enableScrollbar: boolean = false;\n @Input() freeMode: boolean = false;\n @Input() enableKeyboard: boolean = false;\n @Input() enableMousewheel: boolean = false;\n @Input() enableZoom: boolean = false;\n @Input() enableParallax: boolean = false;\n\n // ── Grid ───────────────────────────────────────────────────────────────────\n @Input() enableGrid: boolean = false;\n @Input() gridRows: number = 2;\n\n // ── Responsive ─────────────────────────────────────────────────────────────\n @Input() breakpoints: string = '';\n\n // ── Data binding ───────────────────────────────────────────────────────────\n private _source = '';\n private _limit = 10;\n\n get source(): string { return this._source; }\n @Input() set source(value: string) {\n if (value === this._source) return;\n this._source = value;\n if (value) {\n this.fetchData();\n } else {\n this.items = [];\n this.previewSlides = [];\n this._scheduleReinit();\n }\n }\n\n get limit(): number { return this._limit; }\n @Input() set limit(value: number) {\n if (value === this._limit) return;\n this._limit = value;\n if (this._source) { this.fetchData(); }\n }\n\n public items: any[] = [];\n public previewSlides: ComponentNode[] = [];\n public isLoading = false;\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n @ViewChild('swiperEl', { static: false }) swiperEl?: ElementRef<HTMLElement>;\n @ViewChild('editSwiperEl', { static: false }) editSwiperEl?: ElementRef<HTMLElement>;\n\n _swiper: any = null;\n private _initRafId = 0;\n private _bindingSub?: Subscription;\n private instanceRegistry = inject(ComponentInstanceRegistryService);\n private interactionEngine = inject(InteractionEngineService);\n private ngZone = inject(NgZone);\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean,\n @Optional() private overlayService: OverlayService,\n @Optional() private dataSourceService: BuilderDataSourceService | null,\n @Optional() private dsRegistry: DataSourceRegistryService,\n @Optional() private panelEventService: PanelEventService,\n ) {\n this.isPreview = !!isPreview;\n }\n\n ngOnInit(): void {\n if (this.panelEventService) {\n this._bindingSub = this.panelEventService.subscribe(event => {\n if (event.type !== PanelEventTypes.BINDING_CHANGED) return;\n const changedNode: ComponentNode = event.data?.node;\n if (!changedNode || !this.items.length || !this._source) return;\n if (this._isInTemplate(changedNode)) {\n this.refreshPreviews();\n }\n });\n }\n }\n\n ngAfterViewInit(): void {\n // Run outside Angular's zone so Swiper's internal ResizeObserver, MutationObserver,\n // and RAF-based animation loops don't trigger unnecessary CD ticks.\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._swiper) return;\n\n // dir-only change: use changeLanguageDirection() — avoids full reinit\n // which races against Angular re-rendering slides in the DOM.\n if (changes['dir'] && Object.keys(changes).length === 1) {\n this._swiper.changeLanguageDirection(this.dir);\n return;\n }\n\n const previewKeys = new Set([\n 'direction', 'loop', 'slidesPerView', 'slidesPerGroup', 'spaceBetween', 'speed',\n 'effect', 'grabCursor', 'centeredSlides', 'initialSlide', 'autoHeight',\n 'slideToClickedSlide', 'freeMode', 'breakpoints',\n 'enableNavigation', 'navigationColor', 'navigationSize',\n 'enablePagination', 'paginationColor', 'paginationType', 'paginationClickable', 'paginationDynamicBullets',\n 'enableScrollbar', 'enableAutoplay',\n 'enableKeyboard', 'enableMousewheel', 'enableZoom', 'enableGrid', 'enableParallax',\n 'autoplayDelay', 'autoplayPauseOnMouseEnter', 'autoplayDisableOnInteraction',\n 'gridRows',\n ]);\n\n // Edit mode also reinits when children change (new slide added or removed)\n const editKeys = new Set([...previewKeys, 'children']);\n const relevantKeys = this.isPreview ? previewKeys : editKeys;\n\n const hasConfigChange = Object.keys(changes).some(k => relevantKeys.has(k));\n if (hasConfigChange) {\n this._destroySwiper();\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n }\n\n ngOnDestroy(): void {\n cancelAnimationFrame(this._initRafId);\n this._destroySwiper();\n this._bindingSub?.unsubscribe();\n }\n\n trackByNodeId(_index: number, node: ComponentNode): string {\n return node.id ?? String(_index);\n }\n\n onDrop(event: IoxDropEvent): void {\n if (this._source) return; // repeat mode: drops disabled, slides come from data source\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n if (this._swiper) {\n this.ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this._swiper?.update());\n });\n }\n }\n\n // ── Data fetching ───────────────────────────────────────────────────────────\n\n /** Slides come from the SHARED resolver (public controllers + the source's own filters) — the\n * same decision the SSR engine runs, so the canvas preview matches the published page. */\n private fetchData(): void {\n if (!this._source || !this.dataSourceService || !this.dsRegistry) return;\n\n this.isLoading = true;\n this.cdr.markForCheck();\n this.dataSourceService.fetchItems(this.dsRegistry.findByAlias(this._source)).subscribe(items => {\n this.items = items.slice(0, this._limit);\n this.refreshPreviews();\n this.isLoading = false;\n this.cdr.markForCheck();\n });\n }\n\n private refreshPreviews(): void {\n if (!this.items.length || !this.children.length) {\n this.previewSlides = [];\n this.cdr.markForCheck();\n this._scheduleReinit();\n return;\n }\n this.applyFirstItemToTemplate();\n // Each preview slide = one cloned SliderSlide node with item data resolved\n this.previewSlides = this.items.slice(1).map(item =>\n cloneNodesForItem([this.children[0]], item)[0]\n );\n this.cdr.markForCheck();\n this._scheduleReinit();\n }\n\n private applyFirstItemToTemplate(): void {\n const item = this.items[0];\n if (!item || !this.children.length || !this.overlayService) return;\n // Bindings live on leaf nodes inside the template slide, so recurse into the tree\n this.applyItemToNodes([this.children[0]], item);\n }\n\n private applyItemToNodes(nodes: ComponentNode[], item: any): void {\n for (const node of nodes) {\n if (node.bindings?.length) {\n const ref = this.overlayService.getNodeRef(node);\n if (ref?.componentRef) {\n for (const binding of node.bindings as IoxBinding[]) {\n const value = resolvePath(item, binding.path);\n if (value !== undefined) {\n ref.componentRef.instance[binding.prop] = value;\n }\n }\n ref.componentRef.changeDetectorRef.detectChanges();\n }\n }\n if (node.children?.length) {\n this.applyItemToNodes(node.children, item);\n }\n }\n }\n\n private _isInTemplate(target: ComponentNode): boolean {\n const search = (nodes: ComponentNode[]): boolean =>\n nodes.some(c =>\n c === target || c.id === target.id ||\n (c.children?.length ? search(c.children) : false)\n );\n return this.children.length > 0 && search([this.children[0]]);\n }\n\n private _scheduleReinit(): void {\n this._destroySwiper();\n this.ngZone.runOutsideAngular(() => {\n this._initRafId = requestAnimationFrame(() => this._initSwiper());\n });\n }\n\n // ── Swiper lifecycle ────────────────────────────────────────────────────────\n\n private async _initSwiper(): Promise<void> {\n const el = this.isPreview ? this.swiperEl?.nativeElement : this.editSwiperEl?.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, FreeMode,\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\n const config: Record<string, any> = {\n modules,\n direction: this.direction,\n slidesPerView: this.slidesPerView,\n slidesPerGroup: this.slidesPerGroup > 1 ? this.slidesPerGroup : 1,\n spaceBetween: this.spaceBetween,\n speed: this.isPreview ? this.speed : 300,\n // Always slide effect in edit mode — fade/cube etc. hide all but active slide\n effect: this.isPreview ? this.effect : 'slide',\n centeredSlides: this.centeredSlides,\n initialSlide: this.initialSlide,\n autoHeight: this.autoHeight,\n };\n\n if (this.isPreview) {\n // Full interactive config for preview\n config['grabCursor'] = this.grabCursor;\n config['slideToClickedSlide'] = this.slideToClickedSlide;\n config['loop'] = this.loop === 'loop';\n config['rewind'] = this.loop === 'rewind';\n\n if (this.freeMode) { modules.push(FreeMode); config['freeMode'] = true; }\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 if (this.enableNavigation) {\n config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n }\n if (this.enablePagination) {\n config['pagination'] = {\n el: '.swiper-pagination',\n type: this.paginationType,\n clickable: this.paginationClickable,\n dynamicBullets: this.paginationDynamicBullets,\n };\n }\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: true };\n if (this.enableAutoplay) {\n config['autoplay'] = {\n delay: this.autoplayDelay,\n pauseOnMouseEnter: this.autoplayPauseOnMouseEnter,\n disableOnInteraction: this.autoplayDisableOnInteraction,\n };\n }\n if (this.enableGrid && this.gridRows > 1) config['grid'] = { rows: this.gridRows };\n if (this.breakpoints) {\n try { config['breakpoints'] = JSON.parse(this.breakpoints); } catch { /* ignore */ }\n }\n\n config['on'] = {\n slideChange: (swiper: any) => this._onSwiperEvent('swiperSlideChange', swiper),\n reachBeginning: (swiper: any) => this._onSwiperEvent('swiperReachBeginning', swiper),\n reachEnd: (swiper: any) => this._onSwiperEvent('swiperReachEnd', swiper),\n autoplayStart: (swiper: any) => this._onSwiperEvent('swiperAutoplayStart', swiper),\n autoplayStop: (swiper: any) => this._onSwiperEvent('swiperAutoplayStop', swiper),\n };\n } else {\n // Edit mode: disable touch/swipe so builder click handlers work normally\n config['allowTouchMove'] = false;\n config['simulateTouch'] = false;\n\n if (this.enableNavigation) {\n config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };\n }\n if (this.enablePagination) {\n config['pagination'] = {\n el: '.swiper-pagination',\n type: this.paginationType,\n clickable: this.paginationClickable,\n dynamicBullets: this.paginationDynamicBullets,\n };\n }\n if (this.enableScrollbar) config['scrollbar'] = { el: '.swiper-scrollbar', draggable: false };\n }\n\n this._swiper = new Swiper(el, config);\n this.instanceRegistry.register(this.nodeId, this._swiper);\n }\n\n private _destroySwiper(): 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 _onSwiperEvent(eventName: string, swiper: any): void {\n this.interactionEngine.replayTrigger(this.nodeId, eventName as any);\n\n if (eventName === 'swiperSlideChange') {\n const prevIdx: number = swiper.previousIndex;\n const activeIdx: number = swiper.activeIndex;\n const allSlides = this._source ? [this.children[0], ...this.previewSlides] : this.children;\n if (prevIdx !== undefined && allSlides[prevIdx]) {\n this.interactionEngine.replayTrigger(allSlides[prevIdx].id!, 'swiperSlideInactive');\n }\n if (allSlides[activeIdx]) {\n this.interactionEngine.replayTrigger(allSlides[activeIdx].id!, 'swiperSlideActive');\n }\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\n\nimport { IS_PREVIEW } from '@vectoriox/iox-ui';\nimport { ComponentNode } from '../../models/component.model';\nimport { DragEngineService, IoxDropEvent } from '../../services/drag-engine.service';\n\n@Component({\n selector: 'app-slider-slide',\n template: `\n <!-- The .swiper-slide wrapper (with the iox-outer-* class) is provided by SliderContainer —\n Swiper needs it as a direct child of .swiper-wrapper — and the SLIDE'S size lands there\n via StyleRegistryService. This is only the styled INNER block, so width/min-width/\n max-width MUST be stripped (slideEditStyle): the slide is already sized on the outer\n wrapper, and re-applying width here would size the content to 71% OF the 71% slide (the\n engine's iox-slider-slide is a single host, so it never had this trap). Preview and edit\n behave identically — the earlier preview branch used the un-stripped style input and\n shrank the content inside its own slide. -->\n <div class=\"slide-edit-block\"\n [ngClass]=\"['iox-node-' + nodeId]\"\n [ngStyle]=\"slideEditStyle\"\n ioxDropzone\n [ioxDropzoneId]=\"dropListId\"\n [ioxDropzoneData]=\"children\"\n (ioxDrop)=\"onDrop($event)\">\n\n <div *ngIf=\"!children.length\" class=\"slide-placeholder\">\n <i class=\"ph-thin ph-image\"></i>\n <span>Drop components here</span>\n </div>\n\n <div *ngFor=\"let child of children\"\n [ngClass]=\"['iox-outer-' + (child.styleId ?? child.id)]\"\n ioxDraggable\n [ioxDragData]=\"child\"\n [ioxDragSourceId]=\"dropListId\">\n <ng-container\n [ioxRender]=\"child\"\n (onClick)=\"childClick.emit($event)\"\n (onMouseEnter)=\"childMouseEnter.emit($event)\"\n (onMouseLeave)=\"childMouseLeave.emit()\">\n </ng-container>\n </div>\n </div>\n `,\n styles: [`\n .slide-edit-block {\n position: relative;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n /* default card bg — overridden by inline [ngStyle] when user sets a background */\n background-color: var(--p-surface-300);\n }\n .slide-edit-block {\n width: 100%;\n }\n .slide-placeholder {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n border: 1.5px dashed rgba(100, 116, 139, 0.35);\n border-radius: 4px;\n color: rgba(100, 116, 139, 0.5);\n font-size: 12px;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transition: opacity 0.15s;\n }\n :host:hover .slide-placeholder,\n :host.iox-drag-over .slide-placeholder {\n opacity: 1;\n }\n .slide-placeholder i { font-size: 22px; }\n `],\n standalone: false,\n})\nexport class SliderSlideComponent implements OnInit, OnDestroy {\n @Input() children: ComponentNode[] = [];\n\n private _style: Record<string, any> = {};\n private _slideEditStyle: Record<string, any> = {};\n @Input() set style(v: Record<string, any>) {\n if (v === this._style) return;\n this._style = v;\n // Strip width constraints; rebuild cached object so ngStyle only updates DOM\n // when the input actually changed — prevents spurious MutationObserver triggers.\n const { width, minWidth, maxWidth, ...rest } = v || {};\n this._slideEditStyle = rest;\n }\n get style(): Record<string, any> { return this._style; }\n\n get slideEditStyle(): Record<string, any> { return this._slideEditStyle; }\n\n @Input() nodeId: string = '';\n @Input() dropListId = '';\n\n @Output() childClick = new EventEmitter<any>();\n @Output() childMouseEnter = new EventEmitter<any>();\n @Output() childMouseLeave = new EventEmitter<void>();\n\n constructor(\n private dragEngine: DragEngineService,\n private cdr: ChangeDetectorRef,\n @Optional() @Inject(IS_PREVIEW) public isPreview: boolean,\n ) {\n this.isPreview = !!isPreview;\n }\n\n ngOnInit(): void {}\n ngOnDestroy(): void {}\n\n onDrop(event: IoxDropEvent): void {\n this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);\n }\n}\n","import { Component, Input, TemplateRef, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'panel-child',\n template: '<ng-template #tpl><ng-content></ng-content></ng-template>',\n standalone: false,\n})\nexport class PanelChildComponent {\n @Input() name!: string;\n @ViewChild('tpl', { static: true }) template!: TemplateRef<any>;\n}","import { AfterContentInit, Component, ContentChildren, OnDestroy, QueryList } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { PanelEvent, PanelEventService, PanelEventTypes } from '../panel-event.service';\nimport { PanelChildComponent } from './panel-child.component';\n\n@Component({\n selector: 'app-panel',\n templateUrl: './panel.component.html',\n styleUrls: ['./panel.component.scss'],\n standalone: false,\n})\nexport class PanelComponent implements AfterContentInit, OnDestroy {\n public isPanelOpen = false;\n public activePanel: string | null = null;\n\n @ContentChildren(PanelChildComponent) panelChildren!: QueryList<PanelChildComponent>;\n\n private sub?: Subscription;\n\n constructor(private panelEventService: PanelEventService) {\n this.sub = this.panelEventService.subscribe((panelEvent: PanelEvent) => {\n if (panelEvent.type === PanelEventTypes.PANEL_CLOSE) {\n this.isPanelOpen = false;\n this.activePanel = null;\n return;\n }\n\n if (panelEvent.type === PanelEventTypes.PANEL_SELECTED || panelEvent.type === PanelEventTypes.PANEL_OPEN) {\n this.isPanelOpen = true;\n this.activePanel = panelEvent.data;\n }\n });\n }\n\n ngAfterContentInit(): void {}\n\n ngOnDestroy(): void {\n this.sub?.unsubscribe();\n }\n}","<div class=\"panel\">\n <ng-container *ngFor=\"let child of panelChildren\">\n <div class=\"panel-body\" [ngClass]=\"{ active: activePanel === child.name }\">\n <ng-container *ngTemplateOutlet=\"child.template\"></ng-container>\n </div>\n </ng-container>\n</div>","import { Injectable } from '@angular/core';\n\nimport { ComponentNode } from '../models/component.model';\n\nexport interface HistoryEntry {\n layout: ComponentNode[];\n timestamp: number;\n}\n\nconst MAX_HISTORY = 50;\n\n/**\n * BuilderHistoryService — snapshot-based undo/redo for the page builder.\n *\n * Snapshots are JSON deep-clones of the full layout array.\n * Session-only — not persisted to the backend.\n * Scoped to PageUiComponent.providers[] — one history stack per builder instance.\n */\n@Injectable()\nexport class BuilderHistoryService {\n private _past: HistoryEntry[] = [];\n private _future: HistoryEntry[] = [];\n\n get canUndo(): boolean { return this._past.length > 1; }\n get canRedo(): boolean { return this._future.length > 0; }\n\n push(layout: ComponentNode[]): void {\n this._past.push({ layout: JSON.parse(JSON.stringify(layout)), timestamp: Date.now() });\n if (this._past.length > MAX_HISTORY) {\n this._past.shift();\n }\n this._future = [];\n }\n\n undo(): ComponentNode[] | null {\n if (!this.canUndo) return null;\n const current = this._past.pop()!;\n this._future.unshift(current);\n return JSON.parse(JSON.stringify(this._past[this._past.length - 1].layout));\n }\n\n redo(): ComponentNode[] | null {\n if (!this.canRedo) return null;\n const next = this._future.shift()!;\n this._past.push(next);\n return JSON.parse(JSON.stringify(next.layout));\n }\n\n clear(): void {\n this._past = [];\n this._future = [];\n }\n}\n","import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { AccordionModule } from 'primeng/accordion';\nimport { ButtonModule } from 'primeng/button';\nimport { PopoverModule } from 'primeng/popover';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { SelectModule } from 'primeng/select';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DialogModule } from 'primeng/dialog';\n\nimport { IoxPageModule } from '@vectoriox/iox-ui';\n\nimport { BuilderComponent } from './builder.component';\nimport { SectionComponent } from './components/section/section.component';\nimport { BuilderContainerComponent } from './components/container/container.component';\nimport { BuilderLinkedContainerComponent } from './components/linked-container/linked-container.component';\nimport { BuilderRepeaterComponent } from './components/repeater/repeater.component';\nimport { BuilderButtonBlockComponent } from './components/button-block/button-block.component';\nimport { SliderContainerComponent } from './components/slider-container/slider-container.component';\nimport { SliderSlideComponent } from './components/slider-slide/slider-slide.component';\nimport { OverlayComponent } from './overlay/overlay.component';\nimport { ToolbarComponent } from './toolbar/toolbar.component';\nimport { RenderDirective } from './render/render.directive';\nimport { IoxDraggableDirective } from './directives/iox-draggable.directive';\nimport { IoxDropzoneDirective } from './directives/iox-dropzone.directive';\nimport { PanelComponent } from './panels/panel/panel.component';\nimport { PanelChildComponent } from './panels/panel/panel-child.component';\nimport { LayerTreeComponent } from './panels/layer-tree/layer-tree.component';\nimport { BreadcrumbBarComponent } from './breadcrumb/breadcrumb-bar.component';\nimport { AuditPanelComponent } from './audit/audit-panel.component';\n\nimport { DragEngineService } from './services/drag-engine.service';\nimport { OverlayService } from './overlay/overlay.service';\nimport { ComponentRegistryService } from './services/component-registry.service';\nimport { DataSourceRegistryService } from './services/data-source-registry.service';\nimport { InteractionEngineService } from './services/interaction-engine.service';\nimport { ViewportService } from './services/viewport.service';\nimport { StyleRegistryService } from './services/style-registry.service';\nimport { PanelEventService } from './panels/panel-event.service';\nimport { PresetRegistryService } from './services/preset-registry.service';\nimport { SymbolRegistryService } from './services/symbol-registry.service';\nimport { InteractionPresetRegistryService } from './services/interaction-preset-registry.service';\nimport { BuilderHistoryService } from './services/builder-history.service';\nimport { BuilderClipboardService } from './services/builder-clipboard.service';\nimport { BuilderDataSourceService } from './services/builder-data-source.service';\n\n// The Style / Page / Bindings / Interactions panels are NOT part of this library: the builder\n// projects them in through <ng-content select=\"[builderPanel]\"> and the consuming app declares\n// them (they need <dynamic-input> from its InputsModule). Stale copies of the Style and Page\n// panels used to sit under lib/panels/ — undeclared and unexported, so editing them changed\n// nothing on screen. Deleted; do not reintroduce them here.\nconst DECLARATIONS = [\n BuilderComponent,\n RenderDirective,\n IoxDraggableDirective,\n IoxDropzoneDirective,\n OverlayComponent,\n ToolbarComponent,\n SectionComponent,\n BuilderContainerComponent,\n BuilderLinkedContainerComponent,\n BuilderRepeaterComponent,\n BuilderButtonBlockComponent,\n SliderContainerComponent,\n SliderSlideComponent,\n PanelComponent,\n PanelChildComponent,\n LayerTreeComponent,\n BreadcrumbBarComponent,\n AuditPanelComponent,\n];\n\n@NgModule({\n declarations: DECLARATIONS,\n imports: [\n CommonModule,\n FormsModule,\n DragDropModule,\n AccordionModule,\n ButtonModule,\n PopoverModule,\n InputTextModule,\n SelectModule,\n TooltipModule,\n DialogModule,\n IoxPageModule,\n ],\n providers: [\n DragEngineService,\n OverlayService,\n ComponentRegistryService,\n DataSourceRegistryService,\n InteractionEngineService,\n ViewportService,\n StyleRegistryService,\n PanelEventService,\n PresetRegistryService,\n SymbolRegistryService,\n InteractionPresetRegistryService,\n BuilderHistoryService,\n BuilderClipboardService,\n BuilderDataSourceService,\n ],\n exports: [\n // Angular/PrimeNG modules re-exported so consumers can use them\n CommonModule,\n FormsModule,\n DragDropModule,\n AccordionModule,\n ButtonModule,\n PopoverModule,\n InputTextModule,\n SelectModule,\n TooltipModule,\n DialogModule,\n IoxPageModule,\n // Builder declarations\n BuilderComponent,\n RenderDirective,\n IoxDraggableDirective,\n IoxDropzoneDirective,\n OverlayComponent,\n ToolbarComponent,\n SectionComponent,\n BuilderContainerComponent,\n BuilderLinkedContainerComponent,\n BuilderRepeaterComponent,\n BuilderButtonBlockComponent,\n SliderContainerComponent,\n SliderSlideComponent,\n PanelComponent,\n PanelChildComponent,\n LayerTreeComponent,\n BreadcrumbBarComponent,\n AuditPanelComponent,\n ],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class IoxBuilderModule {}\n","/**\n * ESSENTIALS (B3) — the handful of style controls that matter first for each component type.\n *\n * The style panel carries 94 controls across ten groups, ranked by nothing: the control you want for\n * a heading sits at the same visual weight as `backdrop-filter`. The panel shows this short list in\n * a band at the top; everything else stays exactly where it is, one click away, and reachable by\n * search. Nothing is removed and nothing changes group.\n *\n * A data table, not per-component code: adding a type is one row. Types with no row fall back to\n * `DEFAULT_ESSENTIAL_TRAITS`, so a new component is never worse off than today.\n */\nexport const ESSENTIAL_TRAITS_BY_TYPE: Readonly<Record<string, readonly string[]>> = Object.freeze({\n Heading: ['fontFamily', 'fontSize', 'fontWeight', 'color', 'textAlign', 'margin'],\n Text: ['fontFamily', 'fontSize', 'color', 'lineHeight', 'textAlign', 'margin'],\n Button: ['backgroundColor', 'color', 'padding', 'borderRadius', 'fontSize'],\n ButtonBlock: ['backgroundColor', 'padding', 'borderRadius', 'width', 'justifyContent'],\n Link: ['color', 'fontSize', 'textDecoration', 'fontWeight'],\n Image: ['width', 'height', 'objectFit', 'aspectRatio', 'borderRadius'],\n Icon: ['fontSize', 'color'],\n Container: ['display', 'flexDirection', 'gap', 'padding', 'width', 'backgroundColor'],\n LinkedContainer: ['display', 'flexDirection', 'gap', 'padding', 'width', 'backgroundColor'],\n Section: ['padding', 'backgroundColor', 'minHeight', 'display', 'justifyContent'],\n Card: ['width', 'padding', 'backgroundColor', 'borderRadius', 'boxShadow'],\n List: ['display', 'gap', 'padding', 'markerColor'],\n ListItem: ['padding', 'fontSize', 'color'],\n Repeater: ['display', 'flexDirection', 'gap', 'gridTemplateColumns'],\n Divider: ['borderWidth', 'borderColor', 'width', 'margin'],\n Spacer: ['height'],\n SliderContainer: ['width', 'height', 'gap'],\n SliderSlide: ['width', 'padding', 'backgroundColor'],\n Gallery: ['width', 'aspectRatio', 'gap', 'borderRadius'],\n});\n\n/** For any type without its own row — size, spacing and background suit almost anything. */\nexport const DEFAULT_ESSENTIAL_TRAITS: readonly string[] =\n Object.freeze(['width', 'height', 'padding', 'margin', 'backgroundColor']);\n\n/** The essential trait NAMES for a component type, in the order they should be shown. */\nexport function essentialTraitsFor(type: string | null | undefined): readonly string[] {\n return (type && ESSENTIAL_TRAITS_BY_TYPE[type]) || DEFAULT_ESSENTIAL_TRAITS;\n}\n\n/**\n * Does `label` or `name` match a control search? Case-insensitive substring on either, so \"shadow\"\n * finds `boxShadow` (\"Box shadow\") and \"radius\" finds `borderRadius`.\n */\nexport function matchesControlSearch(name: string, label: string, term: string): boolean {\n const needle = term.trim().toLowerCase();\n if (!needle) return true;\n return name.toLowerCase().includes(needle) || (label ?? '').toLowerCase().includes(needle);\n}\n","import { ComponentNode } from './component.model';\n\n/**\n * FORM PRESETS — a complete, working form as one insert.\n *\n * This is the piece that makes the whole feature feel simple. Dropping a preset gives a form that\n * already validates, already stores, and already has designed Success and Error blocks — so the\n * author's first action is editing copy, not wiring plumbing. Nothing here is a new component type:\n * what lands on the canvas is ordinary nodes, editable and take-apart-able afterwards.\n *\n * Mirrors `layout-presets.ts` deliberately: same shape, same build-from-configs approach, so there\n * is one way to express \"a preset\" in this codebase rather than two.\n */\n\nexport interface FormPresetField {\n label: string;\n control: string;\n required?: boolean;\n help?: string;\n placeholder?: string;\n /** Choices for select/radio, `value|Label` per line — the Field's `optionsText` trait. */\n optionsText?: string;\n rows?: number;\n}\n\nexport interface FormPresetDef {\n id: string;\n name: string;\n icon: string;\n /** One line in the panel: what it collects and where it goes. */\n description: string;\n /** The form's author-facing name, which the submissions inbox groups by. */\n formName: string;\n fields: FormPresetField[];\n submitLabel: string;\n successText: string;\n errorText: string;\n}\n\nexport const FORM_PRESETS: readonly FormPresetDef[] = Object.freeze([\n {\n id: 'contact', name: 'Contact', icon: 'ph-thin ph-envelope-simple',\n description: 'Name, email and a message. Stored, and emailed to you.',\n formName: 'Contact form',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Message', control: 'textarea', required: true, rows: 5 },\n ],\n submitLabel: 'Send message',\n successText: 'Thanks — we’ll be in touch shortly.',\n errorText: 'We couldn’t send your message. Please try again — your answers are still here.',\n },\n {\n id: 'newsletter', name: 'Newsletter', icon: 'ph-thin ph-paper-plane-tilt',\n description: 'One email field plus consent. Stored.',\n formName: 'Newsletter signup',\n fields: [\n { label: 'Email', control: 'email', required: true, placeholder: 'you@company.com' },\n // Consent is a checkbox that must be TICKED — `required` on a checkbox becomes the\n // `accepted` rule, with its own message, rather than a generic \"this is required\".\n { label: 'Email me occasional updates', control: 'checkbox', required: true },\n ],\n submitLabel: 'Subscribe',\n successText: 'You’re on the list.',\n errorText: 'We couldn’t sign you up. Please try again.',\n },\n {\n id: 'application', name: 'Application', icon: 'ph-thin ph-read-cv-logo',\n description: 'Details plus a CV upload. Stored, with an auto-reply.',\n formName: 'Application',\n fields: [\n { label: 'Full name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Phone', control: 'tel' },\n { label: 'Role', control: 'select', required: true, optionsText: 'Design\\nEngineering\\nOther' },\n { label: 'CV', control: 'file', required: true, help: 'PDF or Word, up to 5MB' },\n { label: 'Anything else', control: 'textarea', rows: 4 },\n ],\n submitLabel: 'Apply',\n successText: 'Application received — we’ll read it properly and reply.',\n errorText: 'We couldn’t submit your application. Please try again.',\n },\n {\n id: 'booking', name: 'Booking request', icon: 'ph-thin ph-calendar-check',\n description: 'Date and party size. Stored, and it notifies you.',\n formName: 'Booking request',\n fields: [\n { label: 'Name', control: 'text', required: true },\n { label: 'Email', control: 'email', required: true },\n { label: 'Date', control: 'date', required: true },\n { label: 'People', control: 'number', required: true },\n { label: 'Notes', control: 'textarea', rows: 3, help: 'Allergies, access needs, anything useful' },\n ],\n submitLabel: 'Request a booking',\n successText: 'Request received — we’ll confirm by email.',\n errorText: 'We couldn’t send your request. Please try again.',\n },\n]);\n\n/** How a config is produced. The caller owns the registry, so this file stays pure. */\nexport type CreateConfig = (type: string) => ComponentNode | null | undefined;\n\n/**\n * Build a preset's node tree.\n *\n * The Form config already auto-creates its children (two fields, a submit, and the two state\n * blocks), so this REPLACES them wholesale rather than appending — otherwise every preset would\n * carry the default Name/Email pair as well as its own fields.\n *\n * Returns null when a type is missing from the registry, so a half-built tree never reaches a page.\n */\nexport function buildFormPreset(def: FormPresetDef, createConfig: CreateConfig): ComponentNode | null {\n const form = createConfig('Form');\n if (!form) return null;\n\n setTrait(form, 'name', def.formName);\n // A fresh id per insert: two forms on one page must never share a submissions stream.\n setTrait(form, 'formId', `${def.id}-${Math.random().toString(36).slice(2, 8)}`);\n\n const children: ComponentNode[] = [];\n\n for (const spec of def.fields) {\n const field = createConfig('Field');\n if (!field) return null;\n setTrait(field, 'label', spec.label);\n setTrait(field, 'control', spec.control);\n if (spec.required) setTrait(field, 'required', true);\n if (spec.help) setTrait(field, 'help', spec.help);\n if (spec.placeholder) setTrait(field, 'placeholder', spec.placeholder);\n if (spec.optionsText) setTrait(field, 'optionsText', spec.optionsText);\n if (spec.rows) setTrait(field, 'rows', spec.rows);\n children.push(field);\n }\n\n const submit = createConfig('SubmitButton');\n if (!submit) return null;\n setTrait(submit, 'label', def.submitLabel);\n children.push(submit);\n\n // Both state blocks, every time. They are not optional: a form without them is the silent-form\n // failure this design exists to prevent (decision D7).\n const success = createConfig('FormSuccess');\n const error = createConfig('FormError');\n if (!success || !error) return null;\n success.children = [textNode(def.successText, createConfig)].filter(Boolean) as ComponentNode[];\n error.children = [textNode(def.errorText, createConfig)].filter(Boolean) as ComponentNode[];\n children.push(success, error);\n\n form.children = children;\n return form;\n}\n\nfunction textNode(content: string, createConfig: CreateConfig): ComponentNode | null {\n const text = createConfig('Text');\n if (!text) return null;\n setTrait(text, 'content', content);\n return text;\n}\n\nfunction setTrait(node: ComponentNode, name: string, value: any): void {\n const trait = (node.traits as any[] | undefined)?.find(t => t?.name === name);\n if (trait) trait.default = value;\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderButtonComponentConfig extends ComponentConfig {\n constructor() {\n super('Button', 'app-builder-button', 'ph-thin ph-cursor-click', 'Basic');\n this.inputs = {\n label: 'text',\n link: 'text',\n variant: 'select'\n };\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Click me'),\n new TraitConfig('link', 'Link', TraitInputType.Text, undefined, '#'),\n new TraitConfig('variant', 'Variant', TraitInputType.Select, ['primary', 'outlined', 'text'], 'primary'),\n ];\n this.styleTraits = buildFullStyleTraits();\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class ButtonBlockComponentConfig extends ComponentConfig {\n constructor() {\n super('ButtonBlock', 'app-builder-button-block', 'ph-thin ph-cursor-click', 'Basic');\n this.children = [];\n this.inputs = {\n tag: 'select',\n href: 'text',\n target: 'select',\n type: 'select',\n };\n this.traits = [\n new TraitConfig('tag', 'Tag', TraitInputType.Select, ['button', 'a'], 'button'),\n new TraitConfig('href', 'URL', TraitInputType.Text, undefined, '', false, { trait: 'tag', values: 'a' }),\n new TraitConfig('target', 'Target', TraitInputType.Select, ['_self', '_blank'], '_self', false, { trait: 'tag', values: 'a' }),\n new TraitConfig('type', 'Type', TraitInputType.Select, ['button', 'submit', 'reset'], 'button', false, { trait: 'tag', values: 'button' }),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n width: 'auto',\n height: 'auto',\n padding: '10px 20px',\n borderRadius: '6px',\n cursor: 'pointer',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class CardComponentConfig extends ComponentConfig {\n constructor() {\n super('Card', 'app-card', 'ph-thin ph-cards', 'Content');\n this.inputs = {\n title: 'text',\n image: 'image',\n description: 'text'\n };\n this.traits = [\n new TraitConfig('title', 'Title', TraitInputType.Text, undefined, 'Default Title'),\n new TraitConfig('image', 'Image URL', TraitInputType.Media, { mode: 'compact' }, 'https://via.placeholder.com/150'),\n new TraitConfig('description', 'Description', TraitInputType.Text, undefined, 'This is a default card description.')\n ];\n this.styleTraits = buildFullStyleTraits();\n\n // DEPRECATED — removed from the Components panel (2026-09-22). A Card is a Container with a\n // border, a radius and a background: every one of those is a style group on Container, so the\n // component earned no place in the palette. It stays REGISTERED and renderable because saved\n // pages may contain Card nodes — dropping the type would render those pages blank. Remove the\n // type entirely only behind a migration that rewrites Card nodes to Container.\n this.hidden = true;\n\n this.applyStyleDefaults({\n // Fluid up to the design width: a fixed 200px card overflows a narrow column and is\n // the single most common `fixed-width` audit finding. Capping keeps the desktop look\n // identical (parent wider than 200px → still 200px) while shrinking on a phone.\n width: '100%',\n maxWidth: '200px',\n height: 'auto',\n padding: '16px 16px 16px 16px',\n borderWidth: '1px 1px 1px 1px',\n borderStyle: 'solid',\n borderColor: '#cccccc',\n borderRadius: '8px',\n backgroundColor: '#ffffff',\n });\n }\n}","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderContainerComponentConfig extends ComponentConfig {\n constructor() {\n super('Container', 'app-builder-container', 'ph-thin ph-square', 'Layout');\n this.children = [];\n this.traits = [\n new TraitConfig('htmlTag', 'HTML Tag', TraitInputType.Select,\n ['div', 'section', 'article', 'header', 'footer', 'main', 'nav', 'ul', 'ol', 'li'],\n 'div'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: 'auto',\n minHeight: '200px',\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderDividerComponentConfig extends ComponentConfig {\n constructor() {\n super('Divider', 'app-builder-divider', 'ph-thin ph-minus', 'Layout');\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: '1px',\n backgroundColor: '#cccccc',\n margin: '8px 0px 8px 0px',\n });\n }\n}\n","import {\n ComponentConfig,\n TraitConfig,\n TraitInputType,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n} from '../../models/component.model';\n\n/**\n * Gallery — crossfade image gallery (working name; \"fade\" is the first effect, not the component).\n *\n * The RENDER component is the shared engine twin `ClientGalleryComponent` (`iox-gallery`) from\n * `@vectoriox/iox-ui` — reused directly in the builder (like Image reuses BuilderImageComponent), so\n * there is ONE implementation of the crossfade for both canvas and live site. This config only\n * declares the editable traits + the minimal style groups (size + spacing, per product decision).\n *\n * Population (v1): the `images` MediaList trait (URL / one-by-one / filebox / paste). Data-source\n * binding (`source`/`sourcePath`) is a later phase. See gallery-component-plan.md.\n */\nexport class GalleryConfig extends ComponentConfig {\n constructor() {\n super('Gallery', 'iox-gallery', 'ph-thin ph-images', 'Media');\n\n this.traits = [\n // ── Images ────────────────────────────────────────────────────────\n new TraitConfig('__imagesLabel', 'Images', TraitInputType.SectionLabel),\n new TraitConfig('images', 'Images', TraitInputType.MediaList, undefined, []),\n\n // ── Playback ──────────────────────────────────────────────────────\n new TraitConfig('__playbackLabel', 'Playback', TraitInputType.SectionLabel),\n // Effect is a Select scaffolded for future effects; v1 lists only Fade.\n new TraitConfig('effect', 'Effect', TraitInputType.Select,\n [{ label: 'Fade', value: 'fade' }], 'fade'),\n // Durations are milliseconds — use a plain Number field (Scrub renders a px unit label).\n new TraitConfig('showDuration', 'Show duration (ms)', TraitInputType.Number, undefined, 4000),\n new TraitConfig('fadeDuration', 'Fade duration (ms)', TraitInputType.Number, undefined, 1000),\n new TraitConfig('autoStart', 'Auto start', TraitInputType.Checkbox, undefined, true),\n ];\n\n // Styling: size + spacing + border + background (letterbox). No typography (not text-bearing).\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n ];\n\n // Size traits stay at their group default (auto) so a gallery starts unconstrained. The one\n // exception is `minHeight: 200px` — the image layers are absolutely positioned (no intrinsic\n // height), so without a floor a freshly-dropped, unsized gallery would collapse to 0px and be\n // invisible. min-height is a style-engine default on `.iox-node` (not scoped component CSS),\n // so the user can freely override it.\n this.applyStyleDefaults({\n minHeight: '200px',\n backgroundColor: '#000000',\n });\n }\n}\n","import {\n BackgroundGroupStyleConfig,\n BorderGroupStyleConfig,\n ComponentConfig,\n ComponentNode,\n EffectsGroupStyleConfig,\n LayoutGroupStyleConfig,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n TraitConfig,\n TraitInputType,\n TypographyGroupStyleConfig,\n buildFullStyleTraits,\n} from '../../models/component.model';\n\n/** Every style group — the state blocks and field group are ordinary containers to style. */\nconst fullStyles = () => buildFullStyleTraits();\n\n/** Layout-ish groups for a form shell: it arranges fields, it is not text. */\nconst shellStyles = () => [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n];\n\n/**\n * Form — the container that scopes its fields by ANCESTRY (decision D1).\n *\n * The destination config (\"After submit\") is an ordered action list edited in the Bindings panel as\n * a property group, not here as flat traits — see forms-and-inputs-plan.md §4b. What lives here is\n * the handful of settings that ARE single values.\n *\n * Auto-creates a working contact form: two fields, a submit button, and the two non-deletable state\n * blocks. Dropping a Form therefore gives a form that already validates and already stores.\n */\nexport class FormComponentConfig extends ComponentConfig {\n constructor() {\n // The BUILDER renders these through BuilderContainerComponent (same as List/ListItem), so\n // they are drop zones and their children render on the canvas; the ENGINE uses the real\n // twins. `formClass` is what keeps the shared form stylesheet applying to both.\n super('Form', 'app-builder-container', 'ph-thin ph-textbox', 'Forms');\n\n this.traits = [\n // Hidden plumbing: marks this container as a form host for the shared stylesheet.\n new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form'),\n new TraitConfig('__formLabel', 'Form', TraitInputType.SectionLabel),\n new TraitConfig('name', 'Form name', TraitInputType.Text, undefined, 'Contact form'),\n // Stable identity the submit endpoint resolves the saved spec by. Generated on create;\n // shown read-only-ish so an author can copy it into a webhook consumer.\n new TraitConfig('formId', 'Form ID', TraitInputType.Text, undefined, ''),\n new TraitConfig('feedback', 'Validation feedback', TraitInputType.Select, [\n { label: 'Smart — on submit, then live once touched', value: 'smart' },\n { label: 'On submit only', value: 'submit' },\n { label: 'As you type', value: 'live' },\n ], 'smart'),\n new TraitConfig('resetAfterSubmit', 'Clear the form after submit', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('__spamLabel', 'Spam protection', TraitInputType.SectionLabel),\n // On by default and invisible to the visitor (decision D12).\n new TraitConfig('honeypot', 'Honeypot field', TraitInputType.Checkbox, undefined, true),\n new TraitConfig('minFillMs', 'Minimum fill time (ms)', TraitInputType.Number, undefined, 1200),\n\n new TraitConfig('__dataLabel', 'Data', TraitInputType.SectionLabel),\n // Absent means keep forever — the confirmed default. A number opts into purging.\n new TraitConfig('retentionDays', 'Delete submissions after (days)', TraitInputType.Number, undefined, ''),\n ];\n\n this.styleTraits = shellStyles();\n this.children = [\n makeField({ label: 'Name', control: 'text', required: true }),\n makeField({ label: 'Email', control: 'email', required: true }),\n new SubmitButtonComponentConfig() as unknown as ComponentNode,\n new FormSuccessComponentConfig() as unknown as ComponentNode,\n new FormErrorComponentConfig() as unknown as ComponentNode,\n ];\n\n this.applyStyleDefaults({\n display: 'flex',\n flexDirection: 'column',\n gap: '16px',\n width: '100%',\n });\n }\n}\n\n/**\n * Field — ONE component for every control type (decision D4).\n *\n * `Required` is its own switch because it is the rule every form needs; the rest are added from a\n * menu, so an unused rule is invisible rather than an empty control (the Effects-group pattern).\n */\nexport class FieldComponentConfig extends ComponentConfig {\n constructor() {\n super('Field', 'iox-field', 'ph-thin ph-text-box', 'Forms');\n\n this.traits = [\n new TraitConfig('__contentLabel', 'Content', TraitInputType.SectionLabel),\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Label'),\n // Choosing the control also chooses the validation — an Email field validates email\n // with nothing configured.\n new TraitConfig('control', 'Type', TraitInputType.Select, [\n { label: 'Text', value: 'text' },\n { label: 'Email', value: 'email' },\n { label: 'Phone', value: 'tel' },\n { label: 'Website', value: 'url' },\n { label: 'Number', value: 'number' },\n { label: 'Password', value: 'password' },\n { label: 'Long text', value: 'textarea' },\n { label: 'Dropdown', value: 'select' },\n { label: 'Checkbox', value: 'checkbox' },\n { label: 'Radio group', value: 'radio' },\n { label: 'Date', value: 'date' },\n { label: 'Time', value: 'time' },\n { label: 'File upload', value: 'file' },\n { label: 'Hidden', value: 'hidden' },\n ], 'text'),\n new TraitConfig('placeholder', 'Placeholder', TraitInputType.Text, undefined, '',\n false, { trait: 'control', values: ['text', 'email', 'tel', 'url', 'number', 'password', 'textarea', 'select'] }),\n new TraitConfig('help', 'Help text', TraitInputType.Text, undefined, ''),\n new TraitConfig('rows', 'Rows', TraitInputType.Number, undefined, 4,\n false, { trait: 'control', values: 'textarea' }),\n new TraitConfig('accept', 'Accepted file types', TraitInputType.Text, undefined, '',\n false, { trait: 'control', values: 'file' }),\n new TraitConfig('labelHidden', 'Hide label (screen readers still read it)',\n TraitInputType.Checkbox, undefined, false),\n // The submitted key. Derived from the label; editable for external integrations.\n new TraitConfig('name', 'Submitted key', TraitInputType.Text, undefined, ''),\n new TraitConfig('defaultValue', 'Default value', TraitInputType.Text, undefined, ''),\n\n new TraitConfig('__optionsLabel', 'Options', TraitInputType.SectionLabel),\n // One per line, `value|Label` or just the label. A richer editor arrives with bound\n // options in Phase 2; this keeps v1 to one control instead of a new trait type.\n new TraitConfig('optionsText', 'Choices (one per line)', TraitInputType.Textarea, undefined, '',\n false, { trait: 'control', values: ['select', 'radio'] }),\n\n new TraitConfig('__validationLabel', 'Validation', TraitInputType.SectionLabel),\n new TraitConfig('required', 'Required', TraitInputType.Checkbox, undefined, false),\n // `rules` is the additive list (minLength, pattern, matches, …). Its editor is a panel\n // concern; the node just carries the array.\n new TraitConfig('rules', 'Rules', TraitInputType.Textarea, undefined, ''),\n ];\n\n this.styleTraits = fullStyles();\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n });\n }\n}\n\n/** A plain layout row so two fields can sit side by side. Config-only, like List/ListItem. */\nexport class FieldGroupComponentConfig extends ComponentConfig {\n constructor() {\n super('FieldGroup', 'app-builder-container', 'ph-thin ph-columns', 'Forms');\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-field-group')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'flex',\n flexDirection: 'row',\n gap: '16px',\n width: '100%',\n });\n }\n}\n\n/** The submit button. Carries no destination — that lives on the Form (decision D9). */\nexport class SubmitButtonComponentConfig extends ComponentConfig {\n constructor() {\n super('SubmitButton', 'iox-submit', 'ph-thin ph-paper-plane-tilt', 'Forms');\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Send'),\n new TraitConfig('loadingLabel', 'While sending', TraitInputType.Text, undefined, 'Sending…'),\n new TraitConfig('disableWhileSubmitting', 'Disable while sending', TraitInputType.Checkbox, undefined, true),\n ];\n this.styleTraits = fullStyles();\n this.applyStyleDefaults({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'auto',\n // Meets the 44px tap-target minimum the responsive audit checks for.\n minHeight: '44px',\n padding: '12px 24px',\n borderRadius: '6px',\n backgroundColor: '#a05c5c',\n color: '#ffffff',\n cursor: 'pointer',\n });\n }\n}\n\n/**\n * The Success block. `hidden` keeps it out of the Components panel: it is auto-created by the Form\n * and reached through the canvas state switcher, never dropped on its own.\n */\nexport class FormSuccessComponentConfig extends ComponentConfig {\n constructor() {\n super('FormSuccess', 'app-builder-container', 'ph-thin ph-check-circle', 'Forms');\n this.hidden = true;\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form-success')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n padding: '16px',\n borderRadius: '6px',\n backgroundColor: '#e4efe8',\n color: '#3f7355',\n });\n }\n}\n\n/** The Error block. One design, five reasons — the renderer writes the resolved reason in. */\nexport class FormErrorComponentConfig extends ComponentConfig {\n constructor() {\n super('FormError', 'app-builder-container', 'ph-thin ph-warning-circle', 'Forms');\n this.hidden = true;\n this.traits = [new TraitConfig('formClass', '', TraitInputType.Text, undefined, 'iox-form-error')];\n this.styleTraits = fullStyles();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n width: '100%',\n padding: '16px',\n borderRadius: '6px',\n backgroundColor: '#f6e3e1',\n color: '#a8413a',\n });\n }\n}\n\n/** A Field pre-filled for the default contact form. */\nfunction makeField(props: { label: string; control: string; required?: boolean }): ComponentNode {\n const config = new FieldComponentConfig();\n for (const trait of config.traits) {\n if (trait.name === 'label') trait.default = props.label;\n if (trait.name === 'control') trait.default = props.control;\n if (trait.name === 'required') trait.default = !!props.required;\n }\n return config as unknown as ComponentNode;\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderHeadingComponentConfig extends ComponentConfig {\n constructor() {\n super('Heading', 'app-builder-heading', 'ph-thin ph-text-h', 'Basic');\n this.traits = [\n new TraitConfig('content', 'Content', TraitInputType.Text, undefined, 'Heading'),\n new TraitConfig('level', 'Level', TraitInputType.Select,\n ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], 'h2'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n fontSize: '32px',\n fontWeight: '700',\n width: 'auto',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderIconComponentConfig extends ComponentConfig {\n constructor() {\n super('Icon', 'app-builder-icon', 'ph-thin ph-star', 'Basic');\n this.traits = [\n new TraitConfig('iconClass', 'Icon', TraitInputType.Icon, undefined, 'ph-thin ph-star'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n fontSize: '24px',\n color: '#374151',\n // An icon is a glyph, not a paragraph — the Typography group's default line-height of\n // 1.5 adds phantom vertical space and misaligns it. Default to 0 so the line box is fully\n // collapsed and the icon contributes no extra vertical space (spacing comes from\n // padding/margin instead). Serialized into styleProps (self-describing node).\n lineHeight: '0',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderImageComponentConfig extends ComponentConfig {\n constructor() {\n super('Image', 'app-builder-image', 'ph-thin ph-image', 'Basic');\n this.inputs = {\n src: 'text',\n alt: 'text',\n };\n this.traits = [\n new TraitConfig('src', 'Image URL', TraitInputType.Media, { mode: 'compact' }, 'https://placehold.co/600x400?text=Image'),\n new TraitConfig('alt', 'Alt Text', TraitInputType.Text, undefined, 'Image'),\n // objectFit moved to the Size style group (flows through the CSS engine as a style trait).\n ];\n this.styleTraits = buildFullStyleTraits();\n\n this.applyStyleDefaults({\n // Same reasoning as Card: 300px alone overflows a 320px viewport once the page has any\n // side padding. Capped-fluid renders identically wherever there is room.\n width: '100%',\n maxWidth: '300px',\n aspectRatio: '1/1',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderLinkComponentConfig extends ComponentConfig {\n constructor() {\n super('Link', 'app-builder-link', 'ph-thin ph-link', 'Basic');\n this.inputs = {\n label: 'text',\n linkType: 'select',\n url: 'text',\n pageRoute: 'text',\n target: 'select',\n };\n this.traits = [\n new TraitConfig('label', 'Label', TraitInputType.Text, undefined, 'Click here'),\n new TraitConfig(\n 'linkType', 'Link Type', TraitInputType.Select,\n [{ label: 'External URL', value: 'external' }, { label: 'Website Page', value: 'page' }],\n 'external'\n ),\n new TraitConfig('url', 'URL', TraitInputType.Text, undefined, 'https://', false,\n { trait: 'linkType', values: 'external' }),\n new TraitConfig('pageRoute', 'Page Route', TraitInputType.Text, undefined, '', false,\n { trait: 'linkType', values: 'page' }),\n new TraitConfig(\n 'target', 'Target', TraitInputType.Select,\n [\n { label: 'Same tab', value: '_self' },\n { label: 'New tab', value: '_blank' },\n { label: 'Parent frame', value: '_parent' },\n { label: 'Full window', value: '_top' },\n ],\n '_self'\n ),\n ];\n this.styleTraits = buildFullStyleTraits();\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderLinkedContainerConfig extends ComponentConfig {\n constructor() {\n super('LinkedContainer', 'app-builder-linked-container', 'ph-thin ph-link-simple', 'Layout');\n this.children = [];\n this.inputs = {\n linkType: 'select',\n url: 'text',\n pageRoute: 'text',\n target: 'select',\n };\n this.traits = [\n new TraitConfig(\n 'linkType', 'Link Type', TraitInputType.Select,\n [{ label: 'External URL', value: 'external' }, { label: 'Website Page', value: 'page' }],\n 'external'\n ),\n new TraitConfig('url', 'URL', TraitInputType.Text, undefined, 'https://', false,\n { trait: 'linkType', values: 'external' }),\n new TraitConfig('pageRoute', 'Page Route', TraitInputType.Text, undefined, '', false,\n { trait: 'linkType', values: 'page' }),\n new TraitConfig(\n 'target', 'Target', TraitInputType.Select,\n [\n { label: 'Same tab', value: '_self' },\n { label: 'New tab', value: '_blank' },\n { label: 'Parent frame', value: '_parent' },\n { label: 'Full window', value: '_top' },\n ],\n '_self'\n ),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n width: 'auto',\n height: 'auto',\n minHeight: '80px',\n display: 'block',\n });\n }\n}\n","import {\n ComponentConfig,\n TraitConfig,\n TraitInputType,\n buildFullStyleTraits,\n} from '../../models/component.model';\n\nexport class BuilderListItemComponentConfig extends ComponentConfig {\n constructor() {\n super('ListItem', 'app-builder-container', 'ph-thin ph-list-dashes', 'Layout');\n this.traits = [\n new TraitConfig('htmlTag', 'Tag', TraitInputType.Select, ['li'], 'li'),\n ];\n this.styleTraits = buildFullStyleTraits();\n this.children = [];\n this.applyStyleDefaults({\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import { ComponentConfig, TraitConfig, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class TextBlockComponentConfig extends ComponentConfig {\n constructor() {\n super('Text', 'app-text-block', 'ph-thin ph-text-aa', 'Basic');\n this.inputs = {\n content: 'text',\n tag: 'select',\n };\n this.traits = [\n new TraitConfig('content', 'Content', TraitInputType.Text, undefined, 'Enter text here'),\n new TraitConfig('tag', 'Tag', TraitInputType.Select, ['p', 'span'], 'p'),\n ];\n this.styleTraits = buildFullStyleTraits();\n\n this.applyStyleDefaults({\n display: 'block',\n height: 'auto',\n minHeight: '20px',\n padding: '10px',\n });\n }\n}\n","import {\n BackgroundGroupStyleConfig,\n BorderGroupStyleConfig,\n ComponentConfig,\n ComponentNode,\n EffectsGroupStyleConfig,\n LayoutGroupStyleConfig,\n ListGroupStyleConfig,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n TraitConfig,\n TraitInputType,\n TypographyGroupStyleConfig,\n} from '../../models/component.model';\nimport { BuilderListItemComponentConfig } from '../list-item/list-item.config';\nimport { TextBlockComponentConfig } from '../text/text.config';\n\nexport class BuilderListComponentConfig extends ComponentConfig {\n constructor() {\n super('List', 'app-builder-container', 'ph-thin ph-list', 'Layout');\n this.traits = [\n new TraitConfig('htmlTag', 'Tag', TraitInputType.Select, ['ul', 'ol'], 'ul'),\n new TraitConfig('start', 'Start At', TraitInputType.Number, undefined, 1, false,\n { trait: 'htmlTag', values: 'ol' }),\n new TraitConfig('reversed', 'Reversed', TraitInputType.Checkbox, undefined, false, false,\n { trait: 'htmlTag', values: 'ol' }),\n ];\n this.styleTraits = [\n new ListGroupStyleConfig(),\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n this.children = [\n this.makeListItem(),\n this.makeListItem(),\n this.makeListItem(),\n ];\n this.applyStyleDefaults({\n display: 'block',\n backgroundColor: 'transparent',\n padding: '0px 0px 0px 24px',\n });\n }\n\n private makeListItem(): ComponentNode {\n const item = new BuilderListItemComponentConfig();\n const textCfg = new TextBlockComponentConfig();\n const contentTrait = textCfg.traits.find(t => t.name === 'content');\n if (contentTrait) contentTrait.default = 'List item';\n item.children = [textCfg];\n return item;\n }\n}\n","import { ComponentConfig, ComponentTrait, TraitInputType, buildFullStyleTraits } from '../../models/component.model';\n\nexport class RepeaterComponentConfig extends ComponentConfig {\n constructor() {\n super('Repeater', 'app-builder-repeater', 'ph-thin ph-repeat', 'Data');\n this.children = [];\n this.traits = [\n {\n name: 'source',\n label: 'Source',\n type: TraitInputType.Select,\n options: [], // populated at runtime from DataSourceRegistryService aliases\n default: '',\n } as ComponentTrait,\n {\n name: 'limit',\n label: 'Limit',\n type: TraitInputType.Number,\n default: 10,\n // NOT marked `responsive` yet, deliberately. Row COUNT cannot be varied per width the\n // way the slider's can: Swiper reads its own breakpoints map at runtime, but a\n // repeater's count is decided when the markup is produced — and SSR has no viewport,\n // so rendering N on the server and M in the browser is a hydration mismatch. The fix\n // is to keep rendering every item and HIDE the surplus per width with a generated\n // `:nth-child(n+X) { display: none }` rule (CSS-expressible, hydration-safe), which is\n // a separate change. Marking it responsive now would ship a control that silently\n // does nothing on the live site — exactly the `slidesPerGroup` bug this pass fixed.\n } as ComponentTrait,\n ];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: 'auto',\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class SectionComponentConfig extends ComponentConfig {\n constructor() {\n super('Section', 'app-section', 'ph-thin ph-rows', 'Layout');\n this.children = [];\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n width: 'auto',\n height: 'auto',\n minHeight: '200px',\n display: 'block',\n backgroundColor: 'transparent',\n });\n }\n}\n","import {\n ComponentConfig,\n SizeGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n PositionGroupStyleConfig,\n LayoutGroupStyleConfig,\n TypographyGroupStyleConfig,\n} from '../../models/component.model';\n\nexport class SliderSlideConfig extends ComponentConfig {\n constructor() {\n super('SliderSlide', 'app-slider-slide', 'ph-thin ph-rectangle', 'Media');\n\n this.children = [];\n // Hidden: SliderSlide is created only via the \"Add Slide\" toolbar button,\n // not by dragging from the Components panel.\n this.hidden = true;\n\n this.componentEvents = [\n { value: 'swiperSlideActive', label: 'This Slide Becomes Active', icon: 'ph-thin ph-eye' },\n { value: 'swiperSlideInactive', label: 'This Slide Becomes Inactive', icon: 'ph-thin ph-eye-slash' },\n ];\n\n this.traits = [];\n\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new TypographyGroupStyleConfig(),\n ];\n\n this.applyStyleDefaults({\n width: '33%',\n aspectRatio: '1 / 1',\n });\n }\n}\n","import {\n ComponentConfig,\n ComponentTrait,\n TraitConfig,\n TraitInputType,\n PositionGroupStyleConfig,\n SizeGroupStyleConfig,\n LayoutGroupStyleConfig,\n SpacingGroupStyleConfig,\n BorderGroupStyleConfig,\n BackgroundGroupStyleConfig,\n EffectsGroupStyleConfig,\n} from '../../models/component.model';\nimport { SliderSlideConfig } from '../slider-slide/slider-slide.config';\n\nexport class SliderContainerConfig extends ComponentConfig {\n constructor() {\n super('SliderContainer', 'app-slider-container', 'ph-thin ph-slideshow', 'Media');\n\n this.children = [\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n new SliderSlideConfig(),\n ];\n\n this.componentEvents = [\n { value: 'swiperSlideChange', label: 'Slide Changes', icon: 'ph-thin ph-arrows-left-right' },\n { value: 'swiperReachBeginning', label: 'Reaches First Slide', icon: 'ph-thin ph-skip-back' },\n { value: 'swiperReachEnd', label: 'Reaches Last Slide', icon: 'ph-thin ph-skip-forward' },\n { value: 'swiperAutoplayStart', label: 'Autoplay Starts', icon: 'ph-thin ph-play' },\n { value: 'swiperAutoplayStop', label: 'Autoplay Stops', icon: 'ph-thin ph-stop' },\n ];\n\n this.componentMethods = [\n { value: 'swiperNext', label: 'Next Slide' },\n { value: 'swiperPrev', label: 'Previous Slide' },\n { value: 'swiperGoToSlide', label: 'Go to Slide', params: [{ name: 'index', type: 'number', label: 'Slide Index (0-based)' }] },\n { value: 'swiperAutoplayStart', label: 'Start Autoplay' },\n { value: 'swiperAutoplayStop', label: 'Stop Autoplay' },\n { value: 'swiperAutoplayPause', label: 'Pause Autoplay' },\n ];\n\n this.traits = [\n // ── Data binding ──────────────────────────────────────────────────\n new TraitConfig('__dataLabel', 'Data', TraitInputType.SectionLabel),\n\n {\n name: 'source',\n label: 'Source',\n type: TraitInputType.Select,\n options: [], // populated at runtime from DataSourceRegistryService aliases\n default: '',\n } as ComponentTrait,\n\n new TraitConfig('limit', 'Limit', TraitInputType.Number, undefined, 10),\n\n // ── Parameters ────────────────────────────────────────────────────\n new TraitConfig('__paramsLabel', 'Parameters', TraitInputType.SectionLabel),\n\n new TraitConfig('dir', 'Language direction', TraitInputType.SelectButton,\n [{ label: 'LTR', value: 'ltr' }, { label: 'RTL', value: 'rtl' }],\n 'ltr'),\n\n new TraitConfig('direction', 'Slide direction', TraitInputType.Select,\n [{ label: 'Horizontal', value: 'horizontal' }, { label: 'Vertical', value: 'vertical' }],\n 'horizontal'),\n\n new TraitConfig('slidesPerView', 'Slides per view', TraitInputType.Select,\n [\n { label: 'Auto (slide width)', value: 'auto' },\n { label: '1', value: 1 },\n { label: '2', value: 2 },\n { label: '3', value: 3 },\n { label: '4', value: 4 },\n { label: '5', value: 5 },\n { label: '6', value: 6 },\n ],\n 'auto', undefined, undefined, /* responsive */ true),\n\n new TraitConfig('slidesPerGroup', 'Slides per group', TraitInputType.Scrub, undefined, 1,\n undefined, undefined, /* responsive */ true),\n\n new TraitConfig('loop', 'Loop', TraitInputType.SelectButton,\n [\n { label: 'Off', value: 'off' },\n { label: 'Loop', value: 'loop' },\n { label: 'Rewind', value: 'rewind' },\n ],\n 'off'),\n\n new TraitConfig('centeredSlides', 'Centered slides', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('spaceBetween', 'Space between (px)', TraitInputType.Scrub, undefined, 0,\n undefined, undefined, /* responsive */ true),\n\n new TraitConfig('initialSlide', 'Initial slide', TraitInputType.Scrub, undefined, 0),\n\n new TraitConfig('autoHeight', 'Auto height', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('grabCursor', 'Grab cursor', TraitInputType.Checkbox, undefined, true),\n\n new TraitConfig('slideToClickedSlide', 'Slide to clicked slide', TraitInputType.Checkbox, undefined, false),\n\n // ── Effects ───────────────────────────────────────────────────────\n new TraitConfig('__effectsLabel', 'Effects', TraitInputType.SectionLabel),\n\n new TraitConfig('effect', 'Effect', TraitInputType.Select,\n [\n { label: 'Slide', value: 'slide' },\n { label: 'Fade', value: 'fade' },\n { label: 'Cube', value: 'cube' },\n { label: 'Coverflow', value: 'coverflow' },\n { label: 'Flip', value: 'flip' },\n { label: 'Cards', value: 'cards' },\n { label: 'Creative', value: 'creative' },\n ],\n 'slide'),\n\n new TraitConfig('speed', 'Transition duration (ms)', TraitInputType.Scrub, undefined, 300),\n\n // ── Navigation ────────────────────────────────────────────────────\n new TraitConfig('__navLabel', 'Navigation', TraitInputType.SectionLabel),\n\n new TraitConfig('enableNavigation', 'Navigation arrows', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('navigationColor', 'Color', TraitInputType.Color, undefined, '#ffffff',\n undefined, { trait: 'enableNavigation', values: 'true' }),\n\n new TraitConfig('navigationSize', 'Size (px)', TraitInputType.Scrub, undefined, 44,\n undefined, { trait: 'enableNavigation', values: 'true' }),\n\n // ── Pagination ────────────────────────────────────────────────────\n new TraitConfig('__paginationLabel', 'Pagination', TraitInputType.SectionLabel),\n\n new TraitConfig('enablePagination', 'Pagination', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('paginationColor', 'Color', TraitInputType.Color, undefined, '#ffffff',\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationType', 'Type', TraitInputType.SelectButton,\n [\n { label: '•••', value: 'bullets' },\n { label: '—', value: 'progressbar' },\n { label: '1/5', value: 'fraction' },\n ],\n 'bullets', undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationClickable', 'Clickable', TraitInputType.Checkbox, undefined, true,\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n new TraitConfig('paginationDynamicBullets', 'Dynamic bullets', TraitInputType.Checkbox, undefined, false,\n undefined, { trait: 'enablePagination', values: 'true' }),\n\n // ── Autoplay ──────────────────────────────────────────────────────\n new TraitConfig('__autoplayLabel', 'Autoplay', TraitInputType.SectionLabel),\n\n new TraitConfig('enableAutoplay', 'Autoplay', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('autoplayDelay', 'Delay (ms)', TraitInputType.Scrub, undefined, 3000,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n new TraitConfig('autoplayPauseOnMouseEnter', 'Pause on hover', TraitInputType.Checkbox, undefined, true,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n new TraitConfig('autoplayDisableOnInteraction', 'Disable on interact', TraitInputType.Checkbox, undefined, false,\n undefined, { trait: 'enableAutoplay', values: 'true' }),\n\n // ── Modules ───────────────────────────────────────────────────────\n new TraitConfig('__modulesLabel', 'Modules', TraitInputType.SectionLabel),\n\n new TraitConfig('enableScrollbar', 'Scrollbar', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('freeMode', 'Free mode', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableKeyboard', 'Keyboard control', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableMousewheel','Mousewheel', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableZoom', 'Zoom', TraitInputType.Checkbox, undefined, false),\n new TraitConfig('enableParallax', 'Parallax', TraitInputType.Checkbox, undefined, false),\n\n // ── Grid ──────────────────────────────────────────────────────────\n new TraitConfig('__gridLabel', 'Grid', TraitInputType.SectionLabel),\n\n new TraitConfig('enableGrid', 'Grid (multi-row)', TraitInputType.Checkbox, undefined, false),\n\n new TraitConfig('gridRows', 'Rows', TraitInputType.Scrub, undefined, 2,\n undefined, { trait: 'enableGrid', values: 'true' }),\n\n // ── Responsive ────────────────────────────────────────────────────\n new TraitConfig('__responsiveLabel', 'Responsive', TraitInputType.SectionLabel),\n\n new TraitConfig('breakpoints', 'Breakpoints (JSON)', TraitInputType.Textarea, undefined, ''),\n ];\n\n this.styleTraits = [\n new PositionGroupStyleConfig(),\n new SizeGroupStyleConfig(),\n new LayoutGroupStyleConfig(),\n new SpacingGroupStyleConfig(),\n new BorderGroupStyleConfig(),\n new BackgroundGroupStyleConfig(),\n new EffectsGroupStyleConfig(),\n ];\n\n this.applyStyleDefaults({\n });\n }\n}\n","import { ComponentConfig, buildFullStyleTraits } from '../../models/component.model';\n\nexport class BuilderSpacerComponentConfig extends ComponentConfig {\n constructor() {\n super('Spacer', 'app-builder-spacer', 'ph-thin ph-arrows-vertical', 'Layout');\n this.traits = [];\n this.styleTraits = buildFullStyleTraits();\n this.applyStyleDefaults({\n height: '40px',\n });\n }\n}\n","/*\n * Public API Surface of @vectoriox/iox-builder\n */\n\nexport * from './lib/iox-builder.module';\nexport * from './lib/builder.component';\nexport * from './lib/render/render.directive';\nexport { StyleCategory, IoxBinding, IoxContextSlot, SetContextParams, DsFilterByRouteParam, DsFilterByQueryParam, DataSourceType, IoxDataSource, InteractionTrigger, InteractionActionType, InteractionAction, IoxInteraction, TRIGGER_OPTIONS, ACTION_TYPE_OPTIONS, INVERSE_ACTION, EASING_OPTIONS, ElementState, SUPPORTED_STATES, INTERACTION_STATES, STRUCTURAL_STATES, RELATIONAL_STATES, RELATIONAL_STATE_BASE, TARGETED_STATES, TARGETED_STATE_BASE, ComponentNode, TraitInputType, TraitOptionMap, TraitSelectOption, QuadSizeSegment, TraitShowCondition, ComponentTrait, StyleTrait, StyleTraitGroup, generateNodeId, ComponentConfig, TraitConfig, StyleTraitConfig, GroupStyleConfig, UNITS_ALL, UNITS_NO_VW, UNITS_FIXED, UNITS_DEG, resolveTraitControllerType, resolveTraitOptions, StylePreset, buildPresetStyleTraits, buildFullStyleTraits, ListGroupStyleConfig, IoxSymbol, InteractionPreset, ComponentEventDef, ComponentMethodDef, flattenSchemaFields, arraySchemaFields, arrayItemSchemaFields, PositionGroupStyleConfig, LayoutGroupStyleConfig, ChildLayoutGroupStyleConfig, SizeGroupStyleConfig, DimensionsGroupStyleConfig, BackgroundGroupStyleConfig, SpacingGroupStyleConfig, BorderGroupStyleConfig, TypographyGroupStyleConfig, EffectsGroupStyleConfig } from './lib/models/component.model';\nexport { wrapNode, findNodeLocation } from './lib/models/wrap-node';\nexport * from './lib/services/component-instance-registry.service';\nexport * from './lib/services/symbol-registry.service';\nexport * from './lib/services/interaction-preset-registry.service';\nexport * from './lib/services/builder-history.service';\nexport * from './lib/services/builder-clipboard.service';\nexport * from './lib/services/builder-data-source.service';\nexport * from './lib/services/builder-data-source.service';\nexport * from './lib/panels/panel.model';\nexport * from './lib/panels/panel-event.service';\nexport * from './lib/tokens/builder.tokens';\nexport * from './lib/services/component-registry.service';\nexport * from './lib/services/data-source-registry.service';\nexport * from './lib/services/drag-engine.service';\nexport * from './lib/services/style-registry.service';\nexport * from './lib/services/viewport.service';\nexport * from './lib/services/preset-registry.service';\nexport * from './lib/overlay/overlay.service';\nexport * from './lib/overlay/overlay.component';\nexport * from './lib/toolbar/toolbar.component';\nexport * from './lib/directives/iox-draggable.directive';\nexport * from './lib/directives/iox-dropzone.directive';\nexport * from './lib/panels/panel/panel.component';\nexport * from './lib/panels/panel/panel-child.component';\nexport * from './lib/panels/layer-tree/layer-tree.component';\nexport * from './lib/breadcrumb/breadcrumb-bar.component';\nexport * from './lib/audit/audit-panel.component';\nexport * from './lib/utils/node-path.util';\nexport * from './lib/utils/insert-target.util';\nexport * from './lib/utils/structure-ops.util';\nexport * from './lib/models/essential-traits';\nexport * from './lib/models/layout-presets';\nexport * from './lib/models/form-presets';\nexport * from './lib/utils/form-selection.util';\nexport * from './lib/utils/responsive-audit.util';\nexport * from './lib/utils/drop-label.util';\nexport * from './lib/services/interaction-engine.service';\nexport { composeVirtualTraits, VIRTUAL_TRAIT_KEYS } from './lib/style-compose';\n\n// Component classes (builder variants with drag/drop)\nexport * from './lib/components/section/section.component';\nexport * from './lib/components/container/container.component';\nexport * from './lib/components/linked-container/linked-container.component';\nexport * from './lib/components/repeater/repeater.component';\nexport * from './lib/components/button-block/button-block.component';\nexport * from './lib/components/slider-container/slider-container.component';\nexport * from './lib/components/slider-slide/slider-slide.component';\n\n// Component configs\nexport * from './lib/components/button/button.config';\nexport * from './lib/components/button-block/button-block.config';\nexport * from './lib/components/card/card.config';\nexport * from './lib/components/container/container.config';\nexport * from './lib/components/divider/divider.config';\nexport * from './lib/components/gallery/gallery.config';\nexport * from './lib/components/form/form.config';\nexport * from './lib/components/heading/heading.config';\nexport * from './lib/components/icon/icon.config';\nexport * from './lib/components/image/image.config';\nexport * from './lib/components/link/link.config';\nexport * from './lib/components/linked-container/linked-container.config';\nexport * from './lib/components/list/list.config';\nexport * from './lib/components/list-item/list-item.config';\nexport * from './lib/components/repeater/repeater.config';\nexport * from './lib/components/section/section.config';\nexport * from './lib/components/slider-container/slider-container.config';\nexport * from './lib/components/slider-slide/slider-slide.config';\nexport * from './lib/components/spacer/spacer.config';\nexport * from './lib/components/text/text.config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EASING_OPTIONS","i1.ComponentRegistryService","i2.SymbolRegistryService","i3.OverlayService","i1.OverlayService","i1.DragEngineService","i2.StyleRegistryService","i2.OverlayService","i3.StyleRegistryService","i4.InteractionEngineService","i5.PanelEventService","i6.DragEngineService","i2.ViewportService","i3.PresetRegistryService","i4.SymbolRegistryService","i5.InteractionPresetRegistryService","i6.InteractionEngineService","i7.BuilderClipboardService","i8.StyleRegistryService","i9.PanelEventService","i10.DragEngineService","i11","i12.IoxDraggableDirective","i1","i2","i3","i3.PanelEventService","i4.DragEngineService","i5.DataSourceRegistryService","i6.ViewportService","i7.InteractionEngineService","i8.InteractionPresetRegistryService","i9.BuilderClipboardService","i10.SymbolRegistryService","i11.MoveableCanvasService","i12.SelectoCanvasService","i13.StyleRegistryService","i14","i18.RenderDirective","i19.OverlayComponent","i20.ToolbarComponent","i21.LayerTreeComponent","i22.BreadcrumbBarComponent","i23.AuditPanelComponent","i3.RenderDirective","i4.IoxDropzoneDirective","i3.BuilderDataSourceService","i4.DataSourceRegistryService","i7","i8.RenderDirective","i9.IoxDraggableDirective","i10.IoxDropzoneDirective","i6","i7.RenderDirective","i8.IoxDraggableDirective","i9.IoxDropzoneDirective","i4.IoxDraggableDirective","i5.IoxDropzoneDirective","i1.PanelEventService"],"mappings":";;;;;;;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