@vectoriox/iox-ui 4.19.0 → 4.20.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.
@@ -3480,6 +3480,53 @@ function contextActionEffect(action, pass = 'forward') {
3480
3480
  return params.noReverse ? null : { op: 'clear', slot };
3481
3481
  }
3482
3482
 
3483
+ /**
3484
+ * Which slot keys are actually IN USE on a page — derived from the layout tree itself.
3485
+ *
3486
+ * A slot only matters at runtime if something writes it (a `setContext`/`clearContext` action) or
3487
+ * reads it (a binding whose `source` names it). Deriving the set from the tree means the runtime
3488
+ * works without waiting on the page model: a DECLARED `IoxContextSlot` adds typing for the bind
3489
+ * picker and a `default`, but is not required for the channel to function.
3490
+ *
3491
+ * Union of declared + in-use, so a declared-but-unused slot still seeds its default, and a slot used
3492
+ * by a symbol dropped onto a page that never declared it still works (it just has no default).
3493
+ */
3494
+ function collectContextSlotKeys(nodes, declared = []) {
3495
+ const written = new Set();
3496
+ const read = new Set();
3497
+ walk(nodes, written, read);
3498
+ // A binding only names a SLOT if something writes that key; otherwise it names a data source.
3499
+ const keys = new Set(written);
3500
+ for (const key of read)
3501
+ if (written.has(key))
3502
+ keys.add(key);
3503
+ for (const slot of declared)
3504
+ if (slot?.key)
3505
+ keys.add(slot.key);
3506
+ return keys;
3507
+ }
3508
+ function walk(nodes, written, read) {
3509
+ for (const raw of nodes ?? []) {
3510
+ const node = raw;
3511
+ if (!node)
3512
+ continue;
3513
+ for (const ix of node.interactions ?? []) {
3514
+ for (const action of [...(ix?.actions ?? []), ...(ix?.reverseActions ?? [])]) {
3515
+ const effect = contextActionEffect(action, 'forward')
3516
+ ?? contextActionEffect(action, 'reverse');
3517
+ if (effect)
3518
+ written.add(effect.slot);
3519
+ }
3520
+ }
3521
+ for (const binding of node.bindings ?? []) {
3522
+ if (binding?.source)
3523
+ read.add(binding.source);
3524
+ }
3525
+ if (Array.isArray(node.children))
3526
+ walk(node.children, written, read);
3527
+ }
3528
+ }
3529
+
3483
3530
  /**
3484
3531
  * Cinematic page-transition presets — the SINGLE SOURCE OF TRUTH shared by the page builder
3485
3532
  * (preview) and the SSR client engine (production). Pure, transport-agnostic: this module only
@@ -3914,5 +3961,5 @@ function effectiveTransitionId(anim) {
3914
3961
  * Generated bundle index. Do not edit.
3915
3962
  */
3916
3963
 
3917
- export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyBindingPipes, applyFeel, buildDataSourceFilter, buildRelatedFilter, buildTargetedStateSelector, buildTransitionTimeline, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isContextAction, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, parseUrlList, planDataSource, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, rewriteViewportUnits, safeSetInput, stripSuppressedProps, styleKeyToKebab, withContextSlots };
3964
+ export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyBindingPipes, applyFeel, buildDataSourceFilter, buildRelatedFilter, buildTargetedStateSelector, buildTransitionTimeline, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isContextAction, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, parseUrlList, planDataSource, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, rewriteViewportUnits, safeSetInput, stripSuppressedProps, styleKeyToKebab, withContextSlots };
3918
3965
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map