@vectoriox/iox-builder 1.7.13 → 1.8.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.
|
@@ -17,8 +17,8 @@ import { SelectModule } from 'primeng/select';
|
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
18
18
|
import { DialogModule } from 'primeng/dialog';
|
|
19
19
|
import * as i15 from '@vectoriox/iox-ui';
|
|
20
|
-
import { ComponentInstanceRegistryService, DEFAULT_WIDTH_BY_TYPE, compileDeclarations, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
21
|
-
export { ComponentInstanceRegistryService } from '@vectoriox/iox-ui';
|
|
20
|
+
import { ComponentInstanceRegistryService, DEFAULT_WIDTH_BY_TYPE, compileDeclarations, composeVirtualTraits, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
21
|
+
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
22
22
|
import Lenis from 'lenis';
|
|
23
23
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
24
24
|
import interact from 'interactjs';
|
|
@@ -1449,6 +1449,16 @@ class InteractionEngineService {
|
|
|
1449
1449
|
switch (ix.trigger) {
|
|
1450
1450
|
case 'pageLoad':
|
|
1451
1451
|
return this.attachPageLoad(node, ix, element);
|
|
1452
|
+
case 'pageEnter':
|
|
1453
|
+
// In the builder canvas there is no navigation, so preview a page-enter the same
|
|
1454
|
+
// way as page-load (pre-stated hidden → animate in). In production the SSR engine
|
|
1455
|
+
// fires it only after the page transition completes (ClientInteractionService).
|
|
1456
|
+
return this.attachPageLoad(node, ix, element);
|
|
1457
|
+
case 'pageLeave':
|
|
1458
|
+
// Exit choreography that plays on navigate-away. There is no navigation in the
|
|
1459
|
+
// builder, so it does not auto-fire (element stays visible) — the overlay play
|
|
1460
|
+
// button previews it via replay(). In production the orchestrator awaits it.
|
|
1461
|
+
return () => { };
|
|
1452
1462
|
case 'viewportEnter':
|
|
1453
1463
|
return this.attachViewportEnter(node, ix, element);
|
|
1454
1464
|
case 'click':
|
|
@@ -1890,6 +1900,8 @@ const INVERSE_ACTION = {
|
|
|
1890
1900
|
};
|
|
1891
1901
|
const TRIGGER_OPTIONS = [
|
|
1892
1902
|
{ value: 'pageLoad', label: 'Page load', icon: 'ph-thin ph-play' },
|
|
1903
|
+
{ value: 'pageEnter', label: 'Page enter', icon: 'ph-thin ph-sign-in' },
|
|
1904
|
+
{ value: 'pageLeave', label: 'Page leave', icon: 'ph-thin ph-sign-out' },
|
|
1893
1905
|
{ value: 'viewportEnter', label: 'Enter viewport', icon: 'ph-thin ph-eye' },
|
|
1894
1906
|
{ value: 'click', label: 'Click', icon: 'ph-thin ph-cursor-click' },
|
|
1895
1907
|
{ value: 'hover', label: 'Hover', icon: 'ph-thin ph-hand-pointing' },
|
|
@@ -2864,120 +2876,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2864
2876
|
args: [{ providedIn: 'root' }]
|
|
2865
2877
|
}], ctorParameters: () => [{ type: DragEngineService }, { type: StyleRegistryService }] });
|
|
2866
2878
|
|
|
2867
|
-
// Virtual trait
|
|
2868
|
-
//
|
|
2869
|
-
//
|
|
2870
|
-
//
|
|
2871
|
-
// these virtual keys from the style map and replaces them with the correctly
|
|
2872
|
-
// composed CSS properties (filter, backdrop-filter, transform, transition).
|
|
2873
|
-
//
|
|
2874
|
-
// The same function is used by the render directive (initial mount + state
|
|
2875
|
-
// restore) and by the style panel's onUpdate / setStateOverride paths, so
|
|
2876
|
-
// the CSS output is always consistent regardless of how styles are applied.
|
|
2877
|
-
// ─── Filter ──────────────────────────────────────────────────────────────────
|
|
2878
|
-
const FILTER_FUNS = [
|
|
2879
|
-
['filterBlur', 'blur', '0px'],
|
|
2880
|
-
['filterBrightness', 'brightness', '1'],
|
|
2881
|
-
['filterContrast', 'contrast', '1'],
|
|
2882
|
-
['filterGrayscale', 'grayscale', '0'],
|
|
2883
|
-
['filterSaturate', 'saturate', '1'],
|
|
2884
|
-
['filterHueRotate', 'hue-rotate', '0deg'],
|
|
2885
|
-
['filterSepia', 'sepia', '0'],
|
|
2886
|
-
['filterInvert', 'invert', '0'],
|
|
2887
|
-
];
|
|
2888
|
-
// ─── Backdrop-filter ─────────────────────────────────────────────────────────
|
|
2889
|
-
const BACKDROP_FUNS = [
|
|
2890
|
-
['backdropBlur', 'blur', '0px'],
|
|
2891
|
-
['backdropBrightness', 'brightness', '1'],
|
|
2892
|
-
['backdropContrast', 'contrast', '1'],
|
|
2893
|
-
['backdropSaturate', 'saturate', '1'],
|
|
2894
|
-
];
|
|
2895
|
-
// ─── Transform ───────────────────────────────────────────────────────────────
|
|
2896
|
-
const TRANSFORM_FUNS = [
|
|
2897
|
-
['translateX', 'translateX', '0px'],
|
|
2898
|
-
['translateY', 'translateY', '0px'],
|
|
2899
|
-
['scaleX', 'scaleX', '1'],
|
|
2900
|
-
['scaleY', 'scaleY', '1'],
|
|
2901
|
-
['rotate', 'rotate', '0deg'],
|
|
2902
|
-
['skewX', 'skewX', '0deg'],
|
|
2903
|
-
['skewY', 'skewY', '0deg'],
|
|
2904
|
-
];
|
|
2905
|
-
// ─── ::marker pseudo-element ─────────────────────────────────────────────────
|
|
2906
|
-
const MARKER_FUNS = [
|
|
2907
|
-
['markerColor', 'color'],
|
|
2908
|
-
['markerFontSize', 'fontSize'],
|
|
2909
|
-
];
|
|
2910
|
-
// ─── All virtual trait names ──────────────────────────────────────────────────
|
|
2911
|
-
const VIRTUAL_TRAIT_KEYS = new Set([
|
|
2912
|
-
...FILTER_FUNS.map(([t]) => t),
|
|
2913
|
-
...BACKDROP_FUNS.map(([t]) => t),
|
|
2914
|
-
...TRANSFORM_FUNS.map(([t]) => t),
|
|
2915
|
-
'transitionDuration', 'transitionTimingFunction', 'transitionDelay',
|
|
2916
|
-
...MARKER_FUNS.map(([t]) => t),
|
|
2917
|
-
]);
|
|
2918
|
-
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
2919
|
-
function buildFns(funs, src) {
|
|
2920
|
-
return funs
|
|
2921
|
-
.filter(([t, , d]) => src[t] != null && src[t] !== '' && src[t] !== d)
|
|
2922
|
-
.map(([t, fn]) => `${fn}(${src[t]})`)
|
|
2923
|
-
.join(' ');
|
|
2924
|
-
}
|
|
2925
|
-
// ─── Public API ───────────────────────────────────────────────────────────────
|
|
2926
|
-
/**
|
|
2927
|
-
* Strip virtual trait keys from `raw` and emit their composed CSS equivalents.
|
|
2928
|
-
*
|
|
2929
|
-
* When composing a partial state-override map (hover, active…), pass the full
|
|
2930
|
-
* base style map as `base` so non-overridden components (e.g. filterBrightness
|
|
2931
|
-
* when only filterBlur is overridden) are preserved in the composed output.
|
|
2932
|
-
* When operating on a complete style map, omit `base` — it defaults to `raw`.
|
|
2933
|
-
*/
|
|
2934
|
-
function composeVirtualTraits(raw, base = raw) {
|
|
2935
|
-
// Copy all non-virtual properties as-is
|
|
2936
|
-
const result = {};
|
|
2937
|
-
for (const [k, v] of Object.entries(raw)) {
|
|
2938
|
-
if (!VIRTUAL_TRAIT_KEYS.has(k))
|
|
2939
|
-
result[k] = v;
|
|
2940
|
-
}
|
|
2941
|
-
// Merge base values for any virtual key absent from the partial override map
|
|
2942
|
-
const merged = (funs) => {
|
|
2943
|
-
const m = {};
|
|
2944
|
-
for (const [t] of funs)
|
|
2945
|
-
m[t] = raw[t] ?? base[t];
|
|
2946
|
-
return m;
|
|
2947
|
-
};
|
|
2948
|
-
// filter
|
|
2949
|
-
const filterStr = buildFns(FILTER_FUNS, merged(FILTER_FUNS));
|
|
2950
|
-
if (filterStr)
|
|
2951
|
-
result['filter'] = filterStr;
|
|
2952
|
-
// backdrop-filter
|
|
2953
|
-
const backdropStr = buildFns(BACKDROP_FUNS, merged(BACKDROP_FUNS));
|
|
2954
|
-
if (backdropStr)
|
|
2955
|
-
result['backdropFilter'] = backdropStr;
|
|
2956
|
-
// transform
|
|
2957
|
-
const transformStr = buildFns(TRANSFORM_FUNS, merged(TRANSFORM_FUNS));
|
|
2958
|
-
if (transformStr)
|
|
2959
|
-
result['transform'] = transformStr;
|
|
2960
|
-
// transition — only emit when duration is non-zero
|
|
2961
|
-
const dur = raw['transitionDuration'] ?? base['transitionDuration'];
|
|
2962
|
-
const ease = raw['transitionTimingFunction'] ?? base['transitionTimingFunction'];
|
|
2963
|
-
const del = raw['transitionDelay'] ?? base['transitionDelay'];
|
|
2964
|
-
if (dur && ease && dur !== '0ms' && dur !== '0s') {
|
|
2965
|
-
const delPart = del && del !== '0ms' && del !== '0s' ? ` ${del}` : '';
|
|
2966
|
-
result['transition'] = `all ${dur} ${ease}${delPart}`;
|
|
2967
|
-
}
|
|
2968
|
-
// ::marker pseudo-element — collected into __markerStyles so StyleRegistryService
|
|
2969
|
-
// can emit a separate `.iox-node-{id}::marker { … }` rule.
|
|
2970
|
-
const markerStyles = {};
|
|
2971
|
-
for (const [trait, cssProp] of MARKER_FUNS) {
|
|
2972
|
-
const val = raw[trait] ?? base[trait];
|
|
2973
|
-
if (val != null && val !== '')
|
|
2974
|
-
markerStyles[cssProp] = val;
|
|
2975
|
-
}
|
|
2976
|
-
if (Object.keys(markerStyles).length) {
|
|
2977
|
-
result['__markerStyles'] = markerStyles;
|
|
2978
|
-
}
|
|
2979
|
-
return result;
|
|
2980
|
-
}
|
|
2879
|
+
// Virtual trait composition now lives in @vectoriox/iox-ui so the SSR engine (which does NOT depend
|
|
2880
|
+
// on iox-builder) can use the SAME logic — otherwise the engine emitted raw virtual keys
|
|
2881
|
+
// (translate-x, filter-blur…) as invalid CSS. This is a re-export passthrough to keep existing
|
|
2882
|
+
// iox-builder imports (`../style-compose`) working with no duplicated implementation.
|
|
2981
2883
|
|
|
2982
2884
|
// Module-level counter — unique drop-list ID per Section instance across the whole app session.
|
|
2983
2885
|
let dropListCounter = 0;
|
|
@@ -7956,5 +7858,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
|
|
|
7956
7858
|
* Generated bundle index. Do not edit.
|
|
7957
7859
|
*/
|
|
7958
7860
|
|
|
7959
|
-
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, IOX_SHOP_SERVICE, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW,
|
|
7861
|
+
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, IOX_SHOP_SERVICE, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
7960
7862
|
//# sourceMappingURL=vectoriox-iox-builder.mjs.map
|