@vectoriox/iox-builder 11.50.0 → 11.51.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,
|
|
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,
|
|
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';
|
|
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';
|
|
@@ -2715,6 +2715,38 @@ function arrayItemSchemaFields(properties, arrayPath) {
|
|
|
2715
2715
|
return { fields: [], isPrimitive: true };
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
|
+
/**
|
|
2719
|
+
* True when the node renders a header that draws LAYERS of its own: the HI3 ground (`::before`, the glass or the bar) and
|
|
2720
|
+
* its veil (`::after`), or the scroll edge (`::after`) of a header that stays at the top. The shared CSS (iox-design.css)
|
|
2721
|
+
* lays each of them `position: absolute` against the header itself, so the header must be their containing block.
|
|
2722
|
+
* Read from the attributes the renderers write (`headerAttributes`), never from a second rule.
|
|
2723
|
+
*/
|
|
2724
|
+
function drawsHeaderLayers(node) {
|
|
2725
|
+
if (!node)
|
|
2726
|
+
return false;
|
|
2727
|
+
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));
|
|
2728
|
+
return HeaderAttribute.Ground in attrs || (HeaderAttribute.Behaviour in attrs && HeaderAttribute.Edge in attrs);
|
|
2729
|
+
}
|
|
2730
|
+
/** The position the canvas draws a layer-drawing header with in place of a stored `static`. */
|
|
2731
|
+
const HEADER_LAYERS_POSITION = 'relative';
|
|
2732
|
+
/**
|
|
2733
|
+
* The style map the canvas compiles for a node: unchanged, except that a header that draws its own layers (see
|
|
2734
|
+
* `drawsHeaderLayers`) and is stored `position: static` is drawn `relative`.
|
|
2735
|
+
*
|
|
2736
|
+
* Why only on the canvas: the canvas forces a node's stored `position` (`!important`, StyleRegistryService.IMPORTANT_PROPS)
|
|
2737
|
+
* and so beats the shared CSS that makes the header their containing block (`sticky` / `relative`). A header stored
|
|
2738
|
+
* `static` (the AI designer's pages: Villa Maren, Tavor & Co., 2026-12-03) let its `::before` / `::after` fill the WHOLE
|
|
2739
|
+
* globals layer — the frame — and the glass or the veil washed out the page under the bar. The live engine never forces
|
|
2740
|
+
* position (it drops `static` as a no-op), so the shared CSS wins there and it is right already. `relative` with no offsets
|
|
2741
|
+
* draws the bar exactly where `static` does; only the containing block changes. A stored relative / sticky / absolute /
|
|
2742
|
+
* fixed is already a containing block and is kept. Pure: the input is never touched.
|
|
2743
|
+
*/
|
|
2744
|
+
function withHeaderLayersPosition(styles, drawsLayers) {
|
|
2745
|
+
if (!drawsLayers || String(styles['position'] ?? '').trim() !== 'static')
|
|
2746
|
+
return styles;
|
|
2747
|
+
return { ...styles, position: HEADER_LAYERS_POSITION };
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2718
2750
|
/**
|
|
2719
2751
|
* CSS container name of the builder canvas frame (and of the global-elements overlay). Breakpoint
|
|
2720
2752
|
* rules are emitted as `@container iox-canvas (max-width: …)`: the frame's layout width IS the
|
|
@@ -2803,6 +2835,9 @@ class StyleRegistryService {
|
|
|
2803
2835
|
/** The section colour scheme each css id wears — a scheme'd node's `color: inherit` compiles to the
|
|
2804
2836
|
* scheme's ink (`withSchemeInk`, iox-ui#15), exactly as both engine paths compile it. */
|
|
2805
2837
|
this.nodeSchemes = new Map();
|
|
2838
|
+
/** The css ids of headers that draw layers of their own (`drawsHeaderLayers`): a stored `static` is drawn `relative`
|
|
2839
|
+
* on every rule of theirs, so the header is the containing block of its ground / veil / edge (`withHeaderLayersPosition`). */
|
|
2840
|
+
this.layerHeaders = new Set();
|
|
2806
2841
|
this.tokenCss = { base: '', dark: '' };
|
|
2807
2842
|
this.tokenRows = [];
|
|
2808
2843
|
/** The site's content column word, read from the rows (design-core `siteColumnOf`, award §0c) — what a page with no
|
|
@@ -2846,8 +2881,9 @@ class StyleRegistryService {
|
|
|
2846
2881
|
*/
|
|
2847
2882
|
/** Record a node's type and the colour scheme it wears (RenderDirective and every re-registration,
|
|
2848
2883
|
* before the upsert) and recompile nothing — every later rule for the node is stripped of what the
|
|
2849
|
-
* type's renderer owns,
|
|
2850
|
-
|
|
2884
|
+
* type's renderer owns, a scheme'd node's inherited colour reads the scheme's ink, and a header that draws its own
|
|
2885
|
+
* layers (`drawsHeaderLayers`) stored `static` is drawn `relative`. */
|
|
2886
|
+
setNodeType(nodeId, type, colorScheme, drawsHeaderLayers = false) {
|
|
2851
2887
|
if (!nodeId)
|
|
2852
2888
|
return;
|
|
2853
2889
|
if (type)
|
|
@@ -2856,10 +2892,15 @@ class StyleRegistryService {
|
|
|
2856
2892
|
this.nodeSchemes.set(nodeId, colorScheme);
|
|
2857
2893
|
else
|
|
2858
2894
|
this.nodeSchemes.delete(nodeId);
|
|
2895
|
+
if (drawsHeaderLayers)
|
|
2896
|
+
this.layerHeaders.add(nodeId);
|
|
2897
|
+
else
|
|
2898
|
+
this.layerHeaders.delete(nodeId);
|
|
2859
2899
|
}
|
|
2860
2900
|
ownProps(nodeId, styles) {
|
|
2861
2901
|
const type = this.nodeTypes.get(nodeId);
|
|
2862
|
-
|
|
2902
|
+
const own = withSchemeInk(type ? stripSuppressedProps(type, styles) : styles, this.nodeSchemes.get(nodeId));
|
|
2903
|
+
return withHeaderLayersPosition(own, this.layerHeaders.has(nodeId));
|
|
2863
2904
|
}
|
|
2864
2905
|
upsert(nodeId, styles, state, relativeToId, triggerId) {
|
|
2865
2906
|
if (!nodeId)
|
|
@@ -3079,6 +3120,7 @@ class StyleRegistryService {
|
|
|
3079
3120
|
this.clearResponsive(nodeId);
|
|
3080
3121
|
this.nodeTypes.delete(nodeId);
|
|
3081
3122
|
this.nodeSchemes.delete(nodeId);
|
|
3123
|
+
this.layerHeaders.delete(nodeId);
|
|
3082
3124
|
this.flush();
|
|
3083
3125
|
}
|
|
3084
3126
|
destroy() {
|
|
@@ -3090,6 +3132,7 @@ class StyleRegistryService {
|
|
|
3090
3132
|
this.stateScopes.clear();
|
|
3091
3133
|
this.nodeTypes.clear();
|
|
3092
3134
|
this.nodeSchemes.clear();
|
|
3135
|
+
this.layerHeaders.clear();
|
|
3093
3136
|
this.tokenCss = { base: '', dark: '' };
|
|
3094
3137
|
this.tokenRows = [];
|
|
3095
3138
|
this._siteColumn = null;
|
|
@@ -6846,7 +6889,7 @@ class RenderDirective {
|
|
|
6846
6889
|
// Register CSS rules in the central stylesheet (inner + outer split). The type first: the
|
|
6847
6890
|
// registry strips the props a type's renderer owns (a Dialog's positioning) on every rule.
|
|
6848
6891
|
if (cssId) {
|
|
6849
|
-
this.styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node));
|
|
6892
|
+
this.styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node), drawsHeaderLayers(node));
|
|
6850
6893
|
// The default hover transition (shared, marker-aware — the engine emits the same one):
|
|
6851
6894
|
// without it a hovering node's base rule, re-upserted here on every render, dropped the
|
|
6852
6895
|
// transition page-ui had added on load, and the canvas snapped where the site eased.
|
|
@@ -8344,7 +8387,7 @@ function upsertNodeStyles(styleRegistry, node) {
|
|
|
8344
8387
|
if (!cssId)
|
|
8345
8388
|
return;
|
|
8346
8389
|
const base = nodeStyleMap(node);
|
|
8347
|
-
styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node));
|
|
8390
|
+
styleRegistry.setNodeType(cssId, node.type, colorSchemeOf(node), drawsHeaderLayers(node));
|
|
8348
8391
|
const timedBase = withStateTransitions(base, node.stateStyles, node.elementStyle, node.responsive, node.type);
|
|
8349
8392
|
styleRegistry.upsert(cssId, composeVirtualTraits(timedBase));
|
|
8350
8393
|
for (const [state, map] of Object.entries(node.stateStyles ?? {})) {
|