@vectoriox/iox-builder 11.50.0 → 11.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,14 +17,14 @@ import { TooltipModule } from 'primeng/tooltip';
17
17
  import * as i20 from 'primeng/dialog';
18
18
  import { DialogModule } from 'primeng/dialog';
19
19
  import * as i2$1 from '@vectoriox/iox-ui';
20
- import { Breakpoint, setOverride, nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, applyBoundStyle, safeSetInput, STRUCTURAL_STATES as STRUCTURAL_STATES$1, VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, TEXT_DIRECTION_KEY, TEXT_ALIGN_KEY, TextAlign, COLOR_SCHEME_TRAIT, COLOR_SCHEMES, ColorScheme, LinkType, MAX_LINES_KEY, A11yTrait, BREAKPOINTS, isLastEmittedStateKey, orderStatesForEmit, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, compileStackedChildren, BreakpointQueryKind, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, PROGRESS_ATTRIBUTE, interactionMarkerAttributes, cascadeChain, attachScrollProgress, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, syncInteractionMarkers, entranceStartsHidden, isActionEnabled, restoreCountUp, SCROLL_PROGRESS_TRIGGER, armInteractionCounts, splitPressFeedback, isHoverPointer, isContextAction, contextActionEffect, resolveContextValue, motionAllowed, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, COUNT_UP_ACTION, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, stampSelectorAttributes, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, switchElementStyle, releaseElementStyle, countOverrides, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, groundHeadersIn, watchHeaderHeight, compilePageStyle, nodeUsesContext, attachTooltips, showToastDesign, TOOLTIP_ATTRIBUTE, hidingHeadersIn, HeaderRuntime, inkFollowingHeadersIn, HeaderInkRuntime, isScrolled, SCROLLED_ATTRIBUTE, syncSubmitButtons, buttonBlockHref, pageLanguageOf, layerFrame, rectInLayer, placeFloating, FloatingAlign, popoverSide, bootSlider, IoxPageModule, PALETTE_PRESETS, elementStyleById, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
20
+ import { Breakpoint, setOverride, nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, applyBoundStyle, safeSetInput, STRUCTURAL_STATES as STRUCTURAL_STATES$1, VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, TEXT_DIRECTION_KEY, TEXT_ALIGN_KEY, TextAlign, COLOR_SCHEME_TRAIT, COLOR_SCHEMES, ColorScheme, LinkType, MAX_LINES_KEY, A11yTrait, BREAKPOINTS, nodeTraitValue, isLastEmittedStateKey, orderStatesForEmit, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, compileStackedChildren, BreakpointQueryKind, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, PROGRESS_ATTRIBUTE, interactionMarkerAttributes, cascadeChain, attachScrollProgress, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, syncInteractionMarkers, entranceStartsHidden, isActionEnabled, restoreCountUp, SCROLL_PROGRESS_TRIGGER, armInteractionCounts, splitPressFeedback, isHoverPointer, isContextAction, contextActionEffect, resolveContextValue, motionAllowed, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, COUNT_UP_ACTION, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, syncNodeA11yAttributes, nodeA11yAttributes, stampSelectorAttributes, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, switchElementStyle, releaseElementStyle, countOverrides, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, groundHeadersIn, watchHeaderHeight, compilePageStyle, nodeUsesContext, attachTooltips, showToastDesign, TOOLTIP_ATTRIBUTE, hidingHeadersIn, HeaderRuntime, inkFollowingHeadersIn, HeaderInkRuntime, isScrolled, SCROLLED_ATTRIBUTE, syncSubmitButtons, buttonBlockHref, pageLanguageOf, layerFrame, rectInLayer, placeFloating, FloatingAlign, popoverSide, bootSlider, IoxPageModule, PALETTE_PRESETS, elementStyleById, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
21
21
  export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
22
22
  import { StructureEdit, isAccordionPart, isDisclosurePart, isSliderPart, isTabsPart, isSegmentedPart, structureRefusal, StructureRefusal, SegmentedRole, SEGMENTED_MAX_OPTIONS, AccordionRole, SEGMENTED_MIN_OPTIONS, isExclusiveItemPart, TabsRole, ITEM_OPEN_STATE, readStyle, isSegmentedRoot, segmentedDefaultOn, segmentedOptions, isTabsRoot, isTabsFromContent, tabsTriggers, isAccordionRoot, isAccordionFromContent, accordionItems, initialAccordionOpen, accordionBehaviour, exclusiveItemLabel, exclusiveRootOf, tabTriggerOf, tabLabel, removeTabPair, tabPanelOf, tabsListOf, tabsPanelsOf, nextTabKey, CompositeBehaviourTrait, ACCORDION_DEFAULT_ONS, TabsBehaviourTrait, TABS_ACTIVATE_ONS, TABS_ORIENTATIONS, MarqueeTrait, MarqueeSpeed, MarqueeDirection, PopupTrait, PopupKind, PopupForm, PopupArrive, PopupAgain, DIALOG_MODAL_TRAIT, DisclosureRole, isExclusiveTrigger, onCompositeItemState, isCompositeItemOn, runAccountAction, ShopActionType, runShopAction, runCompositeItemAction, shouldScrollToItem, rowIndexOf as rowIndexOf$1, slideIndexForRow, isWordMaskRoot, WordMaskRuntime, isMarqueeRoot, compositeScopeId, compositeRowKeys, isExclusiveRoot, ExclusiveRuntime, exclusiveDefaultOf, exclusiveLabelOf, exclusiveBehaviourOf, exclusiveKindOf, compositeKindOfRole, AccordionRuntime, isToggleKind, MarqueeRuntime, closestAccordionItem, isAnyCompositeRoot, SceneRole, isExclusiveList, buildCardRecipe, buildBadge, buildChip, buildAccordionRecipe, buildDisclosureRecipe, buildTabsRecipe, buildSegmentedRecipe, buildLightboxRecipe, buildMarqueeRecipe, buildCounterRecipe, buildReadingBarRecipe, buildWordMaskRecipe, SHOP_RECIPES, ShopRecipe, ACCOUNT_RECIPES, AccountRecipe, NO_ELEMENT_STYLE, CompositeKind, PopupRole, SliderRole, accordionItemLabel, segmentedOptionLabel, isExclusivePanels, isLockedPart, attachShop, ShopRole, attachAccount, AccountRole, accordionRootOf, accordionItemOf, addAccordionItem, addTabPair, segmentedAddRefusal, addSegmentedOption, isCompositeItem, accordionHeadingLevel, isCompositePanel, isCompositeTrigger, popupFormOf, splitSliderChildren, hasSliderParts, buildConsentRecipe, SLIDE_CAPTION_TRAIT, SLIDER_SCROLL_PLAYS_TRAIT, SLIDER_PLACEMENT_TRAIT, SliderPlacement, SliderFlag } from '@vectoriox/iox-ui/composite-core';
23
23
  import { formContentInHost, isInteractiveHost, findFormContentInHosts, formPresetById, presetFormActions, busyWord, fieldKindWords, channelWords, FORM_CHANNEL_ROLE, channelHref, channelOpensNewTab, FORM_ACTIONS_ROLE, SUBMIT_BUTTON_NODE_TYPE, FORM_NODE_TYPE, FIELD_NODE_TYPE, formWordIn, DEFAULT_BUSY_WORDS, FORM_AFTER_SEND_TRAIT, FormAfterSend, baselineFormWords } from '@vectoriox/iox-ui/forms-core';
24
24
  import { Subject, BehaviorSubject, of, forkJoin, combineLatest } from 'rxjs';
25
25
  import { isPlaceholderRow, variableAliases, listPlaceholderFields } from '@vectoriox/iox-ui/data-core';
26
26
  import interact from 'interactjs';
27
- import { HeaderTrait, HeaderBehaviour, HeaderEdge, HeaderInk, HeaderGround, SECTION_EDGE_TRAIT, SECTION_EDGES, SECTION_SHAPE_TRAIT, SectionShape, MenuTrait, MenuForm, MenuReveal, MenuHover, MenuPhoneForm, MenuShows, MenuButtonKind, openingMediaOf, localeDirection, pageColumn, HeaderAttribute, pageOpeningScheme, menuDialogAttributes, MenuAttribute, closeWord } from '@vectoriox/iox-ui/design-core';
27
+ import { HeaderTrait, HeaderBehaviour, HeaderEdge, HeaderInk, HeaderGround, HeaderShape, HeaderBrand, SECTION_EDGE_TRAIT, SECTION_EDGES, SECTION_SHAPE_TRAIT, SectionShape, MenuTrait, MenuForm, MenuReveal, MenuHover, MenuPhoneForm, MenuShows, MenuButtonKind, headerAttributes, HeaderAttribute, openingMediaOf, localeDirection, pageColumn, pageOpeningScheme, menuDialogAttributes, MenuAttribute, closeWord } from '@vectoriox/iox-ui/design-core';
28
28
  import { map, catchError, skip } from 'rxjs/operators';
29
29
  import * as i1 from '@angular/common/http';
30
30
  import { SAMPLE_PRODUCT, productInScope, simulatedCartTransport, storefrontCatalog, SAMPLE_STUDIO, SAMPLE_CART_LINE, SAMPLE_SWATCHES } from '@vectoriox/iox-ui/commerce-core';
@@ -2451,6 +2451,21 @@ function buildHeaderBehaviourTraits() {
2451
2451
  { label: 'Over the picture', value: HeaderGround.Over },
2452
2452
  { label: 'Over the picture, then glass', value: HeaderGround.OverGlass },
2453
2453
  ]),
2454
+ // HI3 slice 2 (HI3-D16/D18/D21): its outline and how its name sits — written by the Header studio (Bar ▸ Shape, Name)
2455
+ // and the composer. AD-F station 2 (R-H36): traits here, so a composed pill / islands KEEPS its word through the
2456
+ // builder's load and save (with no trait the canvas never drew it and the first save dropped it), the studio's
2457
+ // Apply sticks, and the AI designer's `set` on a header is a Container input (`NODE_BASELINES`), never refused.
2458
+ // No default (R-H4): a header that never chose saves neither — a full bar whose name fits.
2459
+ new TraitConfig(HeaderTrait.Shape, 'Outline', TraitInputType.Select, [
2460
+ { label: 'A full bar', value: HeaderShape.Bar },
2461
+ { label: 'One pill', value: HeaderShape.Pill },
2462
+ { label: 'Islands', value: HeaderShape.Islands },
2463
+ ]),
2464
+ new TraitConfig(HeaderTrait.Brand, 'Name', TraitInputType.Select, [
2465
+ { label: 'Fits the bar', value: HeaderBrand.Fits },
2466
+ { label: 'Hangs below the bar', value: HeaderBrand.Hangs },
2467
+ { label: 'Arrives once the page moves', value: HeaderBrand.Later },
2468
+ ]),
2454
2469
  ];
2455
2470
  }
2456
2471
  /**
@@ -2715,6 +2730,38 @@ function arrayItemSchemaFields(properties, arrayPath) {
2715
2730
  return { fields: [], isPrimitive: true };
2716
2731
  }
2717
2732
 
2733
+ /**
2734
+ * True when the node renders a header that draws LAYERS of its own: the HI3 ground (`::before`, the glass or the bar) and
2735
+ * its veil (`::after`), or the scroll edge (`::after`) of a header that stays at the top. The shared CSS (iox-design.css)
2736
+ * lays each of them `position: absolute` against the header itself, so the header must be their containing block.
2737
+ * Read from the attributes the renderers write (`headerAttributes`), never from a second rule.
2738
+ */
2739
+ function drawsHeaderLayers(node) {
2740
+ if (!node)
2741
+ return false;
2742
+ const attrs = headerAttributes(nodeTraitValue(node, HeaderTrait.Behaviour), nodeTraitValue(node, HeaderTrait.Edge), nodeTraitValue(node, HeaderTrait.Ink), nodeTraitValue(node, HeaderTrait.Ground), nodeTraitValue(node, HeaderTrait.Shape), nodeTraitValue(node, HeaderTrait.Brand));
2743
+ return HeaderAttribute.Ground in attrs || (HeaderAttribute.Behaviour in attrs && HeaderAttribute.Edge in attrs);
2744
+ }
2745
+ /** The position the canvas draws a layer-drawing header with in place of a stored `static`. */
2746
+ const HEADER_LAYERS_POSITION = 'relative';
2747
+ /**
2748
+ * The style map the canvas compiles for a node: unchanged, except that a header that draws its own layers (see
2749
+ * `drawsHeaderLayers`) and is stored `position: static` is drawn `relative`.
2750
+ *
2751
+ * Why only on the canvas: the canvas forces a node's stored `position` (`!important`, StyleRegistryService.IMPORTANT_PROPS)
2752
+ * and so beats the shared CSS that makes the header their containing block (`sticky` / `relative`). A header stored
2753
+ * `static` (the AI designer's pages: Villa Maren, Tavor & Co., 2026-12-03) let its `::before` / `::after` fill the WHOLE
2754
+ * globals layer — the frame — and the glass or the veil washed out the page under the bar. The live engine never forces
2755
+ * position (it drops `static` as a no-op), so the shared CSS wins there and it is right already. `relative` with no offsets
2756
+ * draws the bar exactly where `static` does; only the containing block changes. A stored relative / sticky / absolute /
2757
+ * fixed is already a containing block and is kept. Pure: the input is never touched.
2758
+ */
2759
+ function withHeaderLayersPosition(styles, drawsLayers) {
2760
+ if (!drawsLayers || String(styles['position'] ?? '').trim() !== 'static')
2761
+ return styles;
2762
+ return { ...styles, position: HEADER_LAYERS_POSITION };
2763
+ }
2764
+
2718
2765
  /**
2719
2766
  * CSS container name of the builder canvas frame (and of the global-elements overlay). Breakpoint
2720
2767
  * rules are emitted as `@container iox-canvas (max-width: …)`: the frame's layout width IS the
@@ -2803,6 +2850,9 @@ class StyleRegistryService {
2803
2850
  /** The section colour scheme each css id wears — a scheme'd node's `color: inherit` compiles to the
2804
2851
  * scheme's ink (`withSchemeInk`, iox-ui#15), exactly as both engine paths compile it. */
2805
2852
  this.nodeSchemes = new Map();
2853
+ /** The css ids of headers that draw layers of their own (`drawsHeaderLayers`): a stored `static` is drawn `relative`
2854
+ * on every rule of theirs, so the header is the containing block of its ground / veil / edge (`withHeaderLayersPosition`). */
2855
+ this.layerHeaders = new Set();
2806
2856
  this.tokenCss = { base: '', dark: '' };
2807
2857
  this.tokenRows = [];
2808
2858
  /** The site's content column word, read from the rows (design-core `siteColumnOf`, award §0c) — what a page with no
@@ -2846,8 +2896,9 @@ class StyleRegistryService {
2846
2896
  */
2847
2897
  /** Record a node's type and the colour scheme it wears (RenderDirective and every re-registration,
2848
2898
  * before the upsert) and recompile nothing — every later rule for the node is stripped of what the
2849
- * type's renderer owns, and a scheme'd node's inherited colour reads the scheme's ink. */
2850
- setNodeType(nodeId, type, colorScheme) {
2899
+ * type's renderer owns, a scheme'd node's inherited colour reads the scheme's ink, and a header that draws its own
2900
+ * layers (`drawsHeaderLayers`) stored `static` is drawn `relative`. */
2901
+ setNodeType(nodeId, type, colorScheme, drawsHeaderLayers = false) {
2851
2902
  if (!nodeId)
2852
2903
  return;
2853
2904
  if (type)
@@ -2856,10 +2907,15 @@ class StyleRegistryService {
2856
2907
  this.nodeSchemes.set(nodeId, colorScheme);
2857
2908
  else
2858
2909
  this.nodeSchemes.delete(nodeId);
2910
+ if (drawsHeaderLayers)
2911
+ this.layerHeaders.add(nodeId);
2912
+ else
2913
+ this.layerHeaders.delete(nodeId);
2859
2914
  }
2860
2915
  ownProps(nodeId, styles) {
2861
2916
  const type = this.nodeTypes.get(nodeId);
2862
- return withSchemeInk(type ? stripSuppressedProps(type, styles) : styles, this.nodeSchemes.get(nodeId));
2917
+ const own = withSchemeInk(type ? stripSuppressedProps(type, styles) : styles, this.nodeSchemes.get(nodeId));
2918
+ return withHeaderLayersPosition(own, this.layerHeaders.has(nodeId));
2863
2919
  }
2864
2920
  upsert(nodeId, styles, state, relativeToId, triggerId) {
2865
2921
  if (!nodeId)
@@ -3079,6 +3135,7 @@ class StyleRegistryService {
3079
3135
  this.clearResponsive(nodeId);
3080
3136
  this.nodeTypes.delete(nodeId);
3081
3137
  this.nodeSchemes.delete(nodeId);
3138
+ this.layerHeaders.delete(nodeId);
3082
3139
  this.flush();
3083
3140
  }
3084
3141
  destroy() {
@@ -3090,6 +3147,7 @@ class StyleRegistryService {
3090
3147
  this.stateScopes.clear();
3091
3148
  this.nodeTypes.clear();
3092
3149
  this.nodeSchemes.clear();
3150
+ this.layerHeaders.clear();
3093
3151
  this.tokenCss = { base: '', dark: '' };
3094
3152
  this.tokenRows = [];
3095
3153
  this._siteColumn = null;
@@ -6846,7 +6904,7 @@ class RenderDirective {
6846
6904
  // Register CSS rules in the central stylesheet (inner + outer split). The type first: the
6847
6905
  // registry strips the props a type's renderer owns (a Dialog's positioning) on every rule.
6848
6906
  if (cssId) {
6849
- this.styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node));
6907
+ this.styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node), drawsHeaderLayers(node));
6850
6908
  // The default hover transition (shared, marker-aware — the engine emits the same one):
6851
6909
  // without it a hovering node's base rule, re-upserted here on every render, dropped the
6852
6910
  // transition page-ui had added on load, and the canvas snapped where the site eased.
@@ -8344,7 +8402,7 @@ function upsertNodeStyles(styleRegistry, node) {
8344
8402
  if (!cssId)
8345
8403
  return;
8346
8404
  const base = nodeStyleMap(node);
8347
- styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node));
8405
+ styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node), drawsHeaderLayers(node));
8348
8406
  const timedBase = withStateTransitions(base, node.stateStyles, node.elementStyle, node.responsive, node.type);
8349
8407
  styleRegistry.upsert(cssId, composeVirtualTraits(timedBase));
8350
8408
  for (const [state, map] of Object.entries(node.stateStyles ?? {})) {