@vectoriox/iox-builder 5.0.0 → 5.0.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.
@@ -16,7 +16,7 @@ import { SelectModule } from 'primeng/select';
16
16
  import { TooltipModule } from 'primeng/tooltip';
17
17
  import { DialogModule } from 'primeng/dialog';
18
18
  import * as i1 from '@vectoriox/iox-ui';
19
- import { VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, Breakpoint, BREAKPOINTS, countOverrides, setOverride, defaultElementStyleFor, applyElementStyle, stripSuppressedProps, DeclarationContext, buildPartSelector, planResponsiveRules, resolveStyleProps, buildTargetedStateSelector, statePseudoClass, compileTokenCssBlocks, compileDeclarations, wrapInBreakpointQuery, BreakpointQueryKind, breakpointDef, breakpointForWidth, FormRenderState, safeSetInput, ContextStore, ComponentInstanceRegistryService, isActionEnabled, isContextAction, contextActionEffect, resolveContextValue, composeVirtualTraits, stateNamesIn, partClassName, syncElementStyleMarker, resolveInputs, setInputOverride, collectContextSlotKeys, withContextSlots, compilePageStyle, nodeUsesContext, resolveBoundValue, IS_PREVIEW, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule, PALETTE_PRESETS, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
19
+ import { VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, Breakpoint, BREAKPOINTS, countOverrides, setOverride, defaultElementStyleFor, applyElementStyle, stripSuppressedProps, DeclarationContext, buildPartSelector, planResponsiveRules, resolveStyleProps, buildTargetedStateSelector, statePseudoClass, compileTokenCssBlocks, compileDeclarations, wrapInBreakpointQuery, BreakpointQueryKind, breakpointDef, breakpointForWidth, FormRenderState, safeSetInput, ContextStore, ComponentInstanceRegistryService, isActionEnabled, isContextAction, contextActionEffect, resolveContextValue, composeVirtualTraits, withDefaultHoverTransition, stateNamesIn, partClassName, syncElementStyleMarker, resolveInputs, setInputOverride, collectContextSlotKeys, withContextSlots, compilePageStyle, nodeUsesContext, resolveBoundValue, IS_PREVIEW, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule, PALETTE_PRESETS, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
20
20
  export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
21
21
  import Lenis from 'lenis';
22
22
  import { Subject, BehaviorSubject, of, forkJoin } from 'rxjs';
@@ -1559,9 +1559,7 @@ class ComponentRegistryService {
1559
1559
  const config = this.createBaseConfig(type);
1560
1560
  if (!config)
1561
1561
  return null;
1562
- const id = defaultElementStyleFor(type, traitValues(config));
1563
- if (id)
1564
- applyElementStyle(config, id);
1562
+ wearDefaultStyles(config);
1565
1563
  return config;
1566
1564
  }
1567
1565
  /**
@@ -1594,6 +1592,16 @@ class ComponentRegistryService {
1594
1592
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: ComponentRegistryService, decorators: [{
1595
1593
  type: Injectable
1596
1594
  }] });
1595
+ /** A new node AND the default children its config builds (a palette Form's fields, submit and
1596
+ * notices) are all new elements: each wears its type's default style. */
1597
+ function wearDefaultStyles(node) {
1598
+ const id = defaultElementStyleFor(node.type, traitValues(node));
1599
+ if (id)
1600
+ applyElementStyle(node, id);
1601
+ for (const child of node.children ?? [])
1602
+ if (child?.type)
1603
+ wearDefaultStyles(child);
1604
+ }
1597
1605
  function traitValues(config) {
1598
1606
  const out = {};
1599
1607
  for (const trait of config.traits ?? [])
@@ -4714,7 +4722,10 @@ class RenderDirective {
4714
4722
  // registry strips the props a type's renderer owns (a Dialog's positioning) on every rule.
4715
4723
  if (cssId) {
4716
4724
  this.styleRegistry.setNodeType(cssId, node.type);
4717
- const composedBase = composeVirtualTraits(initialStyle);
4725
+ // The default hover transition (shared, marker-aware — the engine emits the same one):
4726
+ // without it a hovering node's base rule, re-upserted here on every render, dropped the
4727
+ // transition page-ui had added on load, and the canvas snapped where the site eased.
4728
+ const composedBase = composeVirtualTraits(withDefaultHoverTransition(initialStyle, node.stateStyles, node.elementStyle));
4718
4729
  this.styleRegistry.upsert(cssId, composedBase);
4719
4730
  // Restore per-state overrides saved from a previous session.
4720
4731
  // Every state set at base OR at any breakpoint — so a breakpoint-only state (a Mobile-only