@vectoriox/iox-ui 5.0.0 → 5.2.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.
@@ -7,6 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import * as i1 from '@angular/common';
8
8
  import { CommonModule, isPlatformBrowser } from '@angular/common';
9
9
  import Lenis from 'lenis';
10
+ import '@vectoriox/iox-ui/actions-core';
10
11
 
11
12
  class ViewPositionDirective {
12
13
  constructor(_elr) {
@@ -3475,19 +3476,6 @@ const PATTERN_PRESET_OPTIONS = Object.freeze([
3475
3476
  { value: PatternPreset.Letters, labelKey: 'forms.rules.preset.letters' },
3476
3477
  { value: PatternPreset.Slug, labelKey: 'forms.rules.preset.slug' },
3477
3478
  ]);
3478
- const ACTION_DESCRIPTORS = Object.freeze([
3479
- { type: 'store', labelKey: 'forms.actions.store', locked: true },
3480
- { type: 'email', labelKey: 'forms.actions.email' },
3481
- { type: 'redirect', labelKey: 'forms.actions.redirect' },
3482
- { type: 'createItem', labelKey: 'forms.actions.createItem', planned: true },
3483
- { type: 'webhook', labelKey: 'forms.actions.webhook', planned: true },
3484
- { type: 'autoReply', labelKey: 'forms.actions.autoReply', planned: true },
3485
- ]);
3486
- /** Destinations that can still be added — each at most once, and never a planned one. */
3487
- function addableActions(existing = []) {
3488
- const used = new Set(existing.map(action => action.type));
3489
- return ACTION_DESCRIPTORS.filter(action => !action.locked && !action.planned && !used.has(action.type));
3490
- }
3491
3479
 
3492
3480
  /**
3493
3481
  * The submit transport CONTRACT — what a host must provide to make a form actually send.
@@ -4957,6 +4945,56 @@ function partClassName(type, partKey) {
4957
4945
  return PART_CLASS_NAMES[type]?.[partKey];
4958
4946
  }
4959
4947
 
4948
+ /**
4949
+ * Design-token → CSS compilation, shared by BOTH renderers (flavors plan F0).
4950
+ *
4951
+ * A token row is `{ name, value }` plus, since F0, an optional per-scheme override:
4952
+ * `values.dark`. The shape exists NOW — before any dark-mode UI — because retrofitting it
4953
+ * later means rewriting every org's `designtokens` collection (flavors plan §10 C3).
4954
+ *
4955
+ * ⚠️ The appended-last contract: the dark block REDEFINES custom properties under
4956
+ * `@media (prefers-color-scheme: dark)`. Per the responsive-breakpoints A3 lesson, every
4957
+ * consumer appends it AFTER all of its base rules — the engine pushes it after the page's
4958
+ * css blocks, the builder registry keeps it as its last token rule. Custom properties are
4959
+ * order-insensitive against node rules, but keeping one ordering rule for every @media
4960
+ * block in the product is cheaper than remembering which ones are exempt.
4961
+ */
4962
+ const usable = (t) => !!t && typeof t.name === 'string' && t.name !== '' &&
4963
+ typeof t.value === 'string' && t.value !== '';
4964
+ /** `{ 'iox-brand': '#2f6f62', … }` — the builder registry's input shape for base values. */
4965
+ function tokensToVarMap(tokens) {
4966
+ const map = {};
4967
+ for (const t of tokens ?? []) {
4968
+ if (usable(t))
4969
+ map[`iox-${t.name}`] = t.value;
4970
+ }
4971
+ return map;
4972
+ }
4973
+ /** Only the tokens that carry a dark override, as `{ 'iox-name': darkValue }`. */
4974
+ function tokensToDarkVarMap(tokens) {
4975
+ const map = {};
4976
+ for (const t of tokens ?? []) {
4977
+ const dark = t?.values?.dark;
4978
+ if (usable(t) && typeof dark === 'string' && dark !== '')
4979
+ map[`iox-${t.name}`] = dark;
4980
+ }
4981
+ return map;
4982
+ }
4983
+ /**
4984
+ * The two CSS blocks a renderer emits. `base` goes FIRST (before node rules), `dark` goes
4985
+ * LAST (after every base rule); either may be '' when there is nothing to say.
4986
+ */
4987
+ function compileTokenCss(tokens) {
4988
+ const baseVars = Object.entries(tokensToVarMap(tokens))
4989
+ .map(([k, v]) => ` --${k}: ${v};`).join('\n');
4990
+ const darkVars = Object.entries(tokensToDarkVarMap(tokens))
4991
+ .map(([k, v]) => ` --${k}: ${v};`).join('\n');
4992
+ return {
4993
+ base: baseVars ? `:root {\n${baseVars}\n}` : '',
4994
+ dark: darkVars ? `@media (prefers-color-scheme: dark) {\n :root {\n${darkVars}\n }\n}` : '',
4995
+ };
4996
+ }
4997
+
4960
4998
  /**
4961
4999
  * page-style — the ONE compiler that turns a page's style settings into CSS.
4962
5000
  *
@@ -6794,5 +6832,5 @@ function effectiveTransitionId(anim) {
6794
6832
  * Generated bundle index. Do not edit.
6795
6833
  */
6796
6834
 
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 };
6835
+ 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
6836
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map