@vectoriox/iox-builder 1.7.12 → 1.7.14
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';
|
|
@@ -2864,120 +2864,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2864
2864
|
args: [{ providedIn: 'root' }]
|
|
2865
2865
|
}], ctorParameters: () => [{ type: DragEngineService }, { type: StyleRegistryService }] });
|
|
2866
2866
|
|
|
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
|
-
}
|
|
2867
|
+
// Virtual trait composition now lives in @vectoriox/iox-ui so the SSR engine (which does NOT depend
|
|
2868
|
+
// on iox-builder) can use the SAME logic — otherwise the engine emitted raw virtual keys
|
|
2869
|
+
// (translate-x, filter-blur…) as invalid CSS. This is a re-export passthrough to keep existing
|
|
2870
|
+
// iox-builder imports (`../style-compose`) working with no duplicated implementation.
|
|
2981
2871
|
|
|
2982
2872
|
// Module-level counter — unique drop-list ID per Section instance across the whole app session.
|
|
2983
2873
|
let dropListCounter = 0;
|
|
@@ -7581,6 +7471,11 @@ class BuilderIconComponentConfig extends ComponentConfig {
|
|
|
7581
7471
|
this.applyStyleDefaults({
|
|
7582
7472
|
fontSize: '24px',
|
|
7583
7473
|
color: '#374151',
|
|
7474
|
+
// An icon is a glyph, not a paragraph — the Typography group's default line-height of
|
|
7475
|
+
// 1.5 adds phantom vertical space and misaligns it. Default it to 1 so the box hugs the
|
|
7476
|
+
// glyph. Serialized into styleProps (self-describing node), so the builder AND the SSR
|
|
7477
|
+
// engine both compile `line-height: 1` — no engine-side special-case needed.
|
|
7478
|
+
lineHeight: '1',
|
|
7584
7479
|
});
|
|
7585
7480
|
}
|
|
7586
7481
|
}
|
|
@@ -7951,5 +7846,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
|
|
|
7951
7846
|
* Generated bundle index. Do not edit.
|
|
7952
7847
|
*/
|
|
7953
7848
|
|
|
7954
|
-
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,
|
|
7849
|
+
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 };
|
|
7955
7850
|
//# sourceMappingURL=vectoriox-iox-builder.mjs.map
|