@vectoriox/iox-ui 5.32.0 → 5.33.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.
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +29 -51
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +42 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +16 -1
- package/package.json +1 -1
- package/src/generation-core/nav-shape.ts +2 -0
- package/src/generation-core/node-baselines.generated.ts +25 -51
|
@@ -1444,6 +1444,42 @@ function lineClamp(value) {
|
|
|
1444
1444
|
const n = Number(String(value ?? '').trim());
|
|
1445
1445
|
return Number.isInteger(n) && n > 0 ? n : null;
|
|
1446
1446
|
}
|
|
1447
|
+
// ─── Text direction ──────────────────────────────────────────────────────────────
|
|
1448
|
+
/** The Text Direction trait: `ltr` / `rtl` is the author's choice, unset (or empty) follows the
|
|
1449
|
+
* parent — `direction` is inherited, so a node with no direction of its own follows an RTL section
|
|
1450
|
+
* or `<html dir="rtl">` (vectoriox/iox-ui#14). */
|
|
1451
|
+
const TEXT_DIRECTION_KEY = 'textDirection';
|
|
1452
|
+
/** Where the trait used to live. Until iox-ui#14 its default `ltr` was serialised onto EVERY node,
|
|
1453
|
+
* so a stored `direction: ltr` in a node's own styleProps records no choice and compiles nothing;
|
|
1454
|
+
* a stored `rtl` was always chosen and still compiles. In a sparse layer (a state, a breakpoint)
|
|
1455
|
+
* only an edit is stored, so there `ltr` too is the author's. */
|
|
1456
|
+
const LEGACY_DIRECTION_KEY = 'direction';
|
|
1457
|
+
const LEGACY_DEFAULT_DIRECTION = 'ltr';
|
|
1458
|
+
const DIRECTION_OUTPUT = 'direction';
|
|
1459
|
+
const isSet = (v) => v !== undefined && v !== null;
|
|
1460
|
+
function composeDirection(raw, base) {
|
|
1461
|
+
if (isSet(raw[TEXT_DIRECTION_KEY]))
|
|
1462
|
+
return raw[TEXT_DIRECTION_KEY] || undefined;
|
|
1463
|
+
if (raw !== base && isSet(raw[LEGACY_DIRECTION_KEY]))
|
|
1464
|
+
return raw[LEGACY_DIRECTION_KEY] || undefined;
|
|
1465
|
+
if (isSet(base[TEXT_DIRECTION_KEY]))
|
|
1466
|
+
return base[TEXT_DIRECTION_KEY] || undefined;
|
|
1467
|
+
const legacy = base[LEGACY_DIRECTION_KEY];
|
|
1468
|
+
return legacy && legacy !== LEGACY_DEFAULT_DIRECTION ? legacy : undefined;
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* A saved node's own style map with its legacy `direction` moved onto the Text Direction trait —
|
|
1472
|
+
* `rtl` carried over, the serialised default `ltr` released — so the builder's panel shows what the
|
|
1473
|
+
* node renders. Pure; returns the map unchanged (same reference) when there is nothing to move.
|
|
1474
|
+
*/
|
|
1475
|
+
function migrateLegacyDirection(styleProps) {
|
|
1476
|
+
if (!styleProps || !(LEGACY_DIRECTION_KEY in styleProps))
|
|
1477
|
+
return styleProps;
|
|
1478
|
+
const { [LEGACY_DIRECTION_KEY]: legacy, ...rest } = styleProps;
|
|
1479
|
+
if (!isSet(rest[TEXT_DIRECTION_KEY]) && legacy && legacy !== LEGACY_DEFAULT_DIRECTION)
|
|
1480
|
+
rest[TEXT_DIRECTION_KEY] = legacy;
|
|
1481
|
+
return rest;
|
|
1482
|
+
}
|
|
1447
1483
|
// ─── Gradient backgrounds ──────────────────────────────────────────────────────
|
|
1448
1484
|
/** A Background value that is a gradient (the colour control offers one; the `media-scrim` element style
|
|
1449
1485
|
* writes one). `background-color` cannot hold an image, so it composes into `background-image`. */
|
|
@@ -1463,6 +1499,8 @@ const VIRTUAL_TRAIT_GROUPS = Object.freeze([
|
|
|
1463
1499
|
{ output: 'transition', keys: [...TRANSITION_KEYS], reset: 'none' },
|
|
1464
1500
|
{ output: '__markerStyles', keys: MARKER_FUNS.map(([t]) => t), reset: null },
|
|
1465
1501
|
{ output: LINE_CLAMP_OUTPUT, keys: [MAX_LINES_KEY], reset: 'none' },
|
|
1502
|
+
// A breakpoint that clears the direction follows the parent again.
|
|
1503
|
+
{ output: DIRECTION_OUTPUT, keys: [TEXT_DIRECTION_KEY, LEGACY_DIRECTION_KEY], reset: 'inherit' },
|
|
1466
1504
|
]);
|
|
1467
1505
|
// ─── All virtual trait names ──────────────────────────────────────────────────
|
|
1468
1506
|
/** Every virtual trait key — derived from the groups so there is one list to maintain. */
|
|
@@ -1567,6 +1605,9 @@ function composeVirtualTraits(raw, base = raw) {
|
|
|
1567
1605
|
result[LINE_CLAMP_OUTPUT] = String(clamp);
|
|
1568
1606
|
result['overflow'] = 'hidden';
|
|
1569
1607
|
}
|
|
1608
|
+
const direction = composeDirection(raw, base);
|
|
1609
|
+
if (direction)
|
|
1610
|
+
result[DIRECTION_OUTPUT] = direction;
|
|
1570
1611
|
// A gradient Background is an IMAGE. A solid one over a wider/base gradient (a hover, a breakpoint)
|
|
1571
1612
|
// must cancel that image, or the gradient keeps showing through.
|
|
1572
1613
|
const background = result['backgroundColor'];
|
|
@@ -7864,5 +7905,5 @@ function effectiveTransitionId(anim) {
|
|
|
7864
7905
|
* Generated bundle index. Do not edit.
|
|
7865
7906
|
*/
|
|
7866
7907
|
|
|
7867
|
-
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DeclarationContext, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, INTERACTION_HIDDEN_ATTRIBUTE, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, RESERVED_ALIAS_PREFIX, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SectionComponent, SwiperModuleName, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildInteractionKeyframes, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, excludeSelf, feelFor, finalKeyframe, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, motionAllowed, nearestCommonAncestorId, needsAccessibleName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, prefersReducedMotion, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, statePseudoClass, stateSelectorSuffix, stripSuppressedProps, swiperAutoplayAllowed, swiperModuleNames, syncNodeA11yAttributes, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7908
|
+
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DeclarationContext, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, INTERACTION_HIDDEN_ATTRIBUTE, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, RESERVED_ALIAS_PREFIX, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SectionComponent, SwiperModuleName, TEXT_DIRECTION_KEY, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildInteractionKeyframes, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, excludeSelf, feelFor, finalKeyframe, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, motionAllowed, nearestCommonAncestorId, needsAccessibleName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, prefersReducedMotion, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, statePseudoClass, stateSelectorSuffix, stripSuppressedProps, swiperAutoplayAllowed, swiperModuleNames, syncNodeA11yAttributes, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7868
7909
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|