@vectoriox/iox-builder 1.6.7 → 1.6.9
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,7 +17,7 @@ import { SelectModule } from 'primeng/select';
|
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
18
18
|
import { DialogModule } from 'primeng/dialog';
|
|
19
19
|
import * as i14 from '@vectoriox/iox-ui';
|
|
20
|
-
import { ComponentInstanceRegistryService, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
20
|
+
import { ComponentInstanceRegistryService, compileDeclarations, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
21
21
|
export { ComponentInstanceRegistryService } from '@vectoriox/iox-ui';
|
|
22
22
|
import Lenis from 'lenis';
|
|
23
23
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
@@ -2618,32 +2618,14 @@ class StyleRegistryService {
|
|
|
2618
2618
|
}
|
|
2619
2619
|
}
|
|
2620
2620
|
compile(className, styles) {
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
return ` ${this.toKebabCase(k)}: ${val}${bang};`;
|
|
2627
|
-
});
|
|
2628
|
-
if (!entries.length)
|
|
2621
|
+
// Declaration compilation (kebab-case, viewport-unit rewrite, !important) lives in
|
|
2622
|
+
// the shared style-compiler so the SSR engine produces byte-identical output.
|
|
2623
|
+
// The inner/outer partition + selector emission stay here (builder-only concern).
|
|
2624
|
+
const decls = compileDeclarations(styles, StyleRegistryService.IMPORTANT_PROPS);
|
|
2625
|
+
if (!decls.length)
|
|
2629
2626
|
return '';
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
/**
|
|
2633
|
-
* Rewrite viewport-relative units so they resolve to the simulated canvas
|
|
2634
|
-
* dimensions rather than the real browser viewport.
|
|
2635
|
-
*
|
|
2636
|
-
* --preview-vh / --preview-vw are set by BuilderComponent via ResizeObserver
|
|
2637
|
-
* and viewport-state subscription. In production (no variables defined) the
|
|
2638
|
-
* fallbacks `1vh` / `1vw` restore the original browser behaviour.
|
|
2639
|
-
*/
|
|
2640
|
-
rewriteVh(value) {
|
|
2641
|
-
return value
|
|
2642
|
-
.replace(/(-?\d*\.?\d+)vh/g, 'calc($1 * var(--preview-vh, 1vh))')
|
|
2643
|
-
.replace(/(-?\d*\.?\d+)vw/g, 'calc($1 * var(--preview-vw, 1vw))');
|
|
2644
|
-
}
|
|
2645
|
-
toKebabCase(str) {
|
|
2646
|
-
return str.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);
|
|
2627
|
+
const body = decls.map(d => ` ${d};`).join('\n');
|
|
2628
|
+
return `.${className} {\n${body}\n}`;
|
|
2647
2629
|
}
|
|
2648
2630
|
flush() {
|
|
2649
2631
|
if (!this.styleEl || this._flushPending)
|
|
@@ -5523,11 +5505,16 @@ class SliderContainerComponent {
|
|
|
5523
5505
|
if (v === this._style)
|
|
5524
5506
|
return;
|
|
5525
5507
|
this._style = v;
|
|
5526
|
-
//
|
|
5527
|
-
//
|
|
5528
|
-
|
|
5508
|
+
// `direction` is driven by the `dir` (Language direction) trait via [style.direction].
|
|
5509
|
+
// Strip it from the ngStyle map: NgStyle writes the inline style last and would otherwise
|
|
5510
|
+
// override the dir-driven direction with the generic Layout default → RTL wouldn't apply.
|
|
5511
|
+
// Rebuild cached objects so ngStyle only re-applies on real input changes (avoids MO spam).
|
|
5512
|
+
const { direction: _dropDirection, ...rest } = v || {};
|
|
5513
|
+
this._previewStyle = rest;
|
|
5514
|
+
this._editShellStyle = { ...rest, position: 'relative' };
|
|
5529
5515
|
}
|
|
5530
5516
|
get style() { return this._style; }
|
|
5517
|
+
get previewStyle() { return this._previewStyle; }
|
|
5531
5518
|
get editShellStyle() { return this._editShellStyle; }
|
|
5532
5519
|
get source() { return this._source; }
|
|
5533
5520
|
set source(value) {
|
|
@@ -5564,6 +5551,7 @@ class SliderContainerComponent {
|
|
|
5564
5551
|
this.activatedRoute = activatedRoute;
|
|
5565
5552
|
this.children = [];
|
|
5566
5553
|
this._style = {};
|
|
5554
|
+
this._previewStyle = {};
|
|
5567
5555
|
this._editShellStyle = { position: 'relative' };
|
|
5568
5556
|
this.nodeId = '';
|
|
5569
5557
|
this.dropListId = '';
|
|
@@ -6014,7 +6002,7 @@ class SliderContainerComponent {
|
|
|
6014
6002
|
#swiperEl
|
|
6015
6003
|
class="swiper"
|
|
6016
6004
|
[ngClass]="['iox-node-' + nodeId]"
|
|
6017
|
-
[ngStyle]="
|
|
6005
|
+
[ngStyle]="previewStyle"
|
|
6018
6006
|
[attr.dir]="dir"
|
|
6019
6007
|
[style.direction]="dir"
|
|
6020
6008
|
[style.--swiper-navigation-color]="navigationColor || null"
|
|
@@ -6165,7 +6153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6165
6153
|
#swiperEl
|
|
6166
6154
|
class="swiper"
|
|
6167
6155
|
[ngClass]="['iox-node-' + nodeId]"
|
|
6168
|
-
[ngStyle]="
|
|
6156
|
+
[ngStyle]="previewStyle"
|
|
6169
6157
|
[attr.dir]="dir"
|
|
6170
6158
|
[style.direction]="dir"
|
|
6171
6159
|
[style.--swiper-navigation-color]="navigationColor || null"
|