@vectoriox/iox-builder 11.51.0 → 11.53.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, 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';
20
+ import { Breakpoint, setOverride, motionAllowed, 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, 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, headerAttributes, HeaderAttribute, openingMediaOf, localeDirection, pageColumn, 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';
@@ -511,6 +511,30 @@ function removalRefusal(node, siblings) {
511
511
  return null;
512
512
  }
513
513
 
514
+ /**
515
+ * A node selected from OUTSIDE the canvas — the Publish gate's "Show me the first one", a panel's own list (SELECT_NODE) —
516
+ * is brought into the canvas's view. Before, the selection landed and the canvas stayed where it was: bench #3's footer
517
+ * form (a global, at the bottom of a long Home) was selected while the canvas showed the hero, so the owner saw the
518
+ * selection box nowhere near what the gate asked them to fill (vectoriox/iox-cms#166).
519
+ */
520
+ /** Is any edge of `box` outside `view` (the scroller's visible box)? A box wholly in view is left alone — never a jump. */
521
+ function needsReveal(box, view) {
522
+ return box.top < view.top || box.bottom > view.bottom || box.left < view.left || box.right > view.right;
523
+ }
524
+ /**
525
+ * Scroll `element` to the middle of the canvas when it is not wholly in view of `scroller` (`.preview-scroll`; Lenis
526
+ * follows its scrollTop). Smooth only where motion is allowed — reduced motion jumps (Emil: gentler, not a glide).
527
+ * Returns whether it scrolled.
528
+ */
529
+ function revealOnCanvas(element, scroller, smooth = motionAllowed()) {
530
+ if (!scroller || !element.isConnected)
531
+ return false;
532
+ if (!needsReveal(element.getBoundingClientRect(), scroller.getBoundingClientRect()))
533
+ return false;
534
+ element.scrollIntoView({ block: 'center', inline: 'nearest', behavior: smooth ? 'smooth' : 'auto' });
535
+ return true;
536
+ }
537
+
514
538
  /**
515
539
  * Nodes styled "WHEN AN ITEM IS ON" from outside it (composite T20; CC4b's price "when Yearly is on") — what the builder
516
540
  * says about them: hidden at rest in the layer tree (the eye-slash, board 10), the reading-order audit finding (Q34) and
@@ -2451,6 +2475,21 @@ function buildHeaderBehaviourTraits() {
2451
2475
  { label: 'Over the picture', value: HeaderGround.Over },
2452
2476
  { label: 'Over the picture, then glass', value: HeaderGround.OverGlass },
2453
2477
  ]),
2478
+ // HI3 slice 2 (HI3-D16/D18/D21): its outline and how its name sits — written by the Header studio (Bar ▸ Shape, Name)
2479
+ // and the composer. AD-F station 2 (R-H36): traits here, so a composed pill / islands KEEPS its word through the
2480
+ // builder's load and save (with no trait the canvas never drew it and the first save dropped it), the studio's
2481
+ // Apply sticks, and the AI designer's `set` on a header is a Container input (`NODE_BASELINES`), never refused.
2482
+ // No default (R-H4): a header that never chose saves neither — a full bar whose name fits.
2483
+ new TraitConfig(HeaderTrait.Shape, 'Outline', TraitInputType.Select, [
2484
+ { label: 'A full bar', value: HeaderShape.Bar },
2485
+ { label: 'One pill', value: HeaderShape.Pill },
2486
+ { label: 'Islands', value: HeaderShape.Islands },
2487
+ ]),
2488
+ new TraitConfig(HeaderTrait.Brand, 'Name', TraitInputType.Select, [
2489
+ { label: 'Fits the bar', value: HeaderBrand.Fits },
2490
+ { label: 'Hangs below the bar', value: HeaderBrand.Hangs },
2491
+ { label: 'Arrives once the page moves', value: HeaderBrand.Later },
2492
+ ]),
2454
2493
  ];
2455
2494
  }
2456
2495
  /**
@@ -13120,6 +13159,9 @@ class BuilderComponent {
13120
13159
  this.selectedItem = node;
13121
13160
  this.overlayService.setSelect(ref.element, this.typeName(node.type), this.activeMode, node, ref.componentRef);
13122
13161
  this._emitElementSelect(node, ref.componentRef);
13162
+ // vectoriox/iox-cms#166: picked from outside the canvas (the Publish gate's "Show me the first one") —
13163
+ // the canvas brings it into view, so the selection is seen where it is.
13164
+ revealOnCanvas(this.overlayService.getStyledElement(ref.element), this.overlayService.getIntersectionRoot());
13123
13165
  });
13124
13166
  return;
13125
13167
  }