@vectoriox/iox-ui 5.0.0 → 5.1.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.
|
@@ -4957,6 +4957,56 @@ function partClassName(type, partKey) {
|
|
|
4957
4957
|
return PART_CLASS_NAMES[type]?.[partKey];
|
|
4958
4958
|
}
|
|
4959
4959
|
|
|
4960
|
+
/**
|
|
4961
|
+
* Design-token → CSS compilation, shared by BOTH renderers (flavors plan F0).
|
|
4962
|
+
*
|
|
4963
|
+
* A token row is `{ name, value }` plus, since F0, an optional per-scheme override:
|
|
4964
|
+
* `values.dark`. The shape exists NOW — before any dark-mode UI — because retrofitting it
|
|
4965
|
+
* later means rewriting every org's `designtokens` collection (flavors plan §10 C3).
|
|
4966
|
+
*
|
|
4967
|
+
* ⚠️ The appended-last contract: the dark block REDEFINES custom properties under
|
|
4968
|
+
* `@media (prefers-color-scheme: dark)`. Per the responsive-breakpoints A3 lesson, every
|
|
4969
|
+
* consumer appends it AFTER all of its base rules — the engine pushes it after the page's
|
|
4970
|
+
* css blocks, the builder registry keeps it as its last token rule. Custom properties are
|
|
4971
|
+
* order-insensitive against node rules, but keeping one ordering rule for every @media
|
|
4972
|
+
* block in the product is cheaper than remembering which ones are exempt.
|
|
4973
|
+
*/
|
|
4974
|
+
const usable = (t) => !!t && typeof t.name === 'string' && t.name !== '' &&
|
|
4975
|
+
typeof t.value === 'string' && t.value !== '';
|
|
4976
|
+
/** `{ 'iox-brand': '#2f6f62', … }` — the builder registry's input shape for base values. */
|
|
4977
|
+
function tokensToVarMap(tokens) {
|
|
4978
|
+
const map = {};
|
|
4979
|
+
for (const t of tokens ?? []) {
|
|
4980
|
+
if (usable(t))
|
|
4981
|
+
map[`iox-${t.name}`] = t.value;
|
|
4982
|
+
}
|
|
4983
|
+
return map;
|
|
4984
|
+
}
|
|
4985
|
+
/** Only the tokens that carry a dark override, as `{ 'iox-name': darkValue }`. */
|
|
4986
|
+
function tokensToDarkVarMap(tokens) {
|
|
4987
|
+
const map = {};
|
|
4988
|
+
for (const t of tokens ?? []) {
|
|
4989
|
+
const dark = t?.values?.dark;
|
|
4990
|
+
if (usable(t) && typeof dark === 'string' && dark !== '')
|
|
4991
|
+
map[`iox-${t.name}`] = dark;
|
|
4992
|
+
}
|
|
4993
|
+
return map;
|
|
4994
|
+
}
|
|
4995
|
+
/**
|
|
4996
|
+
* The two CSS blocks a renderer emits. `base` goes FIRST (before node rules), `dark` goes
|
|
4997
|
+
* LAST (after every base rule); either may be '' when there is nothing to say.
|
|
4998
|
+
*/
|
|
4999
|
+
function compileTokenCss(tokens) {
|
|
5000
|
+
const baseVars = Object.entries(tokensToVarMap(tokens))
|
|
5001
|
+
.map(([k, v]) => ` --${k}: ${v};`).join('\n');
|
|
5002
|
+
const darkVars = Object.entries(tokensToDarkVarMap(tokens))
|
|
5003
|
+
.map(([k, v]) => ` --${k}: ${v};`).join('\n');
|
|
5004
|
+
return {
|
|
5005
|
+
base: baseVars ? `:root {\n${baseVars}\n}` : '',
|
|
5006
|
+
dark: darkVars ? `@media (prefers-color-scheme: dark) {\n :root {\n${darkVars}\n }\n}` : '',
|
|
5007
|
+
};
|
|
5008
|
+
}
|
|
5009
|
+
|
|
4960
5010
|
/**
|
|
4961
5011
|
* page-style — the ONE compiler that turns a page's style settings into CSS.
|
|
4962
5012
|
*
|
|
@@ -6794,5 +6844,5 @@ function effectiveTransitionId(anim) {
|
|
|
6794
6844
|
* Generated bundle index. Do not edit.
|
|
6795
6845
|
*/
|
|
6796
6846
|
|
|
6797
|
-
export { AOSService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, 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, DeclarationContext, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
6847
|
+
export { AOSService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, 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, DeclarationContext, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, compileTokenCss, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, stripSuppressedProps, styleKeyToKebab, tokensToDarkVarMap, tokensToVarMap, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
6798
6848
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|