@siemens/live-preview 51.1.0 → 51.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.
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, InjectionToken, input, output, computed, viewChild, model, NgZone, DestroyRef, linkedSignal, signal, effect, Directive, ElementRef, Injectable, ViewContainerRef, Compiler, Injector, untracked, afterNextRender, ɵcompileComponent as _compileComponent, ɵresetCompiledComponents as _resetCompiledComponents, inputBinding, NgModule } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, InjectionToken, viewChild, output, input, computed, signal, effect, model, NgZone, DestroyRef, Directive, ElementRef, Injectable, ViewContainerRef, Compiler, Injector, untracked, afterNextRender, ɵcompileComponent as _compileComponent, ɵresetCompiledComponents as _resetCompiledComponents, inputBinding, NgModule, ErrorHandler, createComponent, makeEnvironmentProviders } from '@angular/core';
3
3
  import * as i1$1 from '@angular/router';
4
- import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterModule } from '@angular/router';
5
- import { KeyValuePipe, AsyncPipe } from '@angular/common';
4
+ import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterModule, provideRouter, withDisabledInitialNavigation, withHashLocation } from '@angular/router';
5
+ import { KeyValuePipe, AsyncPipe, LocationStrategy, Location } from '@angular/common';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormsModule, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
8
- import { Title, ɵDomRendererFactory2 as _DomRendererFactory2, REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';
8
+ import { Title, ɵDomRendererFactory2 as _DomRendererFactory2, createApplication, REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';
9
9
  import { throttleTime, timeout, retry, filter, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
10
10
  import { httpResource, HttpClient } from '@angular/common/http';
11
11
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -55,6 +55,28 @@ class SiLivePreviewThemeApi {
55
55
  class SiLivePreviewLocaleApi {
56
56
  }
57
57
 
58
+ /**
59
+ * Copyright (c) Siemens 2016 - 2026
60
+ * SPDX-License-Identifier: MIT
61
+ */
62
+ class SiLivePreviewIframeModeComponent {
63
+ previewIframe = viewChild.required('previewIframe', /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "previewIframe" }] : /* istanbul ignore next */ []));
65
+ iframeChange = output();
66
+ ngAfterViewInit() {
67
+ this.iframeChange.emit(this.previewIframe());
68
+ }
69
+ ngOnDestroy() {
70
+ this.iframeChange.emit(undefined);
71
+ }
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeModeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewIframeModeComponent, isStandalone: true, selector: "si-live-preview-iframe-mode", outputs: { iframeChange: "iframeChange" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: `<iframe #previewIframe src="#/iframe" title="Example view"></iframe>`, isInline: true, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] });
74
+ }
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeModeComponent, decorators: [{
76
+ type: Component,
77
+ args: [{ selector: 'si-live-preview-iframe-mode', template: `<iframe #previewIframe src="#/iframe" title="Example view"></iframe>`, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] }]
78
+ }], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], iframeChange: [{ type: i0.Output, args: ["iframeChange"] }] } });
79
+
58
80
  /**
59
81
  * Copyright (c) Siemens 2016 - 2026
60
82
  * SPDX-License-Identifier: MIT
@@ -190,9 +212,149 @@ const availableDevices = [
190
212
  * Copyright (c) Siemens 2016 - 2026
191
213
  * SPDX-License-Identifier: MIT
192
214
  */
193
- class SiLivePreviewIframeComponent {
194
- previewIframe = viewChild('previewIframe', /* @ts-ignore */
215
+ class SiLivePreviewMobileModeComponent {
216
+ previewIframe = viewChild.required('previewIframe', /* @ts-ignore */
195
217
  ...(ngDevMode ? [{ debugName: "previewIframe" }] : /* istanbul ignore next */ []));
218
+ config = inject(SI_LIVE_PREVIEW_CONFIG);
219
+ exampleUrl = input.required(/* @ts-ignore */
220
+ ...(ngDevMode ? [{ debugName: "exampleUrl" }] : /* istanbul ignore next */ []));
221
+ template = input.required(/* @ts-ignore */
222
+ ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
223
+ theme = input.required(/* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
225
+ locale = input(/* @ts-ignore */
226
+ ...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
227
+ rootFontSize = input.required(/* @ts-ignore */
228
+ ...(ngDevMode ? [{ debugName: "rootFontSize" }] : /* istanbul ignore next */ []));
229
+ isRTL = input(/* @ts-ignore */
230
+ ...(ngDevMode ? [undefined, { debugName: "isRTL" }] : /* istanbul ignore next */ []));
231
+ templateModified = input.required(/* @ts-ignore */
232
+ ...(ngDevMode ? [{ debugName: "templateModified" }] : /* istanbul ignore next */ []));
233
+ supportsLandscape = input.required(/* @ts-ignore */
234
+ ...(ngDevMode ? [{ debugName: "supportsLandscape" }] : /* istanbul ignore next */ []));
235
+ iFrameHeight = input(/* @ts-ignore */
236
+ ...(ngDevMode ? [undefined, { debugName: "iFrameHeight" }] : /* istanbul ignore next */ []));
237
+ iFrameWidth = input(/* @ts-ignore */
238
+ ...(ngDevMode ? [undefined, { debugName: "iFrameWidth" }] : /* istanbul ignore next */ []));
239
+ iframeChange = output();
240
+ viewportChange = output();
241
+ themeToggle = output();
242
+ switcherEnabled = this.config.themeSwitcher;
243
+ landscapeEnabled = this.config.landscapeToggle;
244
+ availableDevices = availableDevices;
245
+ selectedDevice = signal(undefined, /* @ts-ignore */
246
+ ...(ngDevMode ? [{ debugName: "selectedDevice" }] : /* istanbul ignore next */ []));
247
+ landscape = signal(false, /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "landscape" }] : /* istanbul ignore next */ []));
249
+ showQrMenu = signal(false, /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "showQrMenu" }] : /* istanbul ignore next */ []));
251
+ plainUrl = signal('', /* @ts-ignore */
252
+ ...(ngDevMode ? [{ debugName: "plainUrl" }] : /* istanbul ignore next */ []));
253
+ plainUrlShort = signal('', /* @ts-ignore */
254
+ ...(ngDevMode ? [{ debugName: "plainUrlShort" }] : /* istanbul ignore next */ []));
255
+ mode = computed(() => this.selectedDevice()?.mode ?? 'ios', /* @ts-ignore */
256
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
257
+ showNotch = computed(() => this.selectedDevice()?.notch ?? false, /* @ts-ignore */
258
+ ...(ngDevMode ? [{ debugName: "showNotch" }] : /* istanbul ignore next */ []));
259
+ currentIFrameHeight = computed(() => {
260
+ const device = this.selectedDevice();
261
+ return device ? (this.landscape() ? device.width : device.height) : this.iFrameHeight();
262
+ }, /* @ts-ignore */
263
+ ...(ngDevMode ? [{ debugName: "currentIFrameHeight" }] : /* istanbul ignore next */ []));
264
+ currentIFrameWidth = computed(() => {
265
+ const device = this.selectedDevice();
266
+ return device ? (this.landscape() ? device.height : device.width) : this.iFrameWidth();
267
+ }, /* @ts-ignore */
268
+ ...(ngDevMode ? [{ debugName: "currentIFrameWidth" }] : /* istanbul ignore next */ []));
269
+ constructor() {
270
+ effect(() => {
271
+ if (!this.supportsLandscape() && this.landscape()) {
272
+ this.landscape.set(false);
273
+ this.emitViewport();
274
+ }
275
+ });
276
+ }
277
+ ngOnInit() {
278
+ const deviceId = localStorage.getItem('si-live-preview-selected-device');
279
+ this.selectDevice(this.availableDevices.find(device => device.id === deviceId));
280
+ }
281
+ ngAfterViewInit() {
282
+ this.iframeChange.emit(this.previewIframe());
283
+ }
284
+ ngOnDestroy() {
285
+ this.iframeChange.emit(undefined);
286
+ }
287
+ selectDevice(device) {
288
+ const selectedDevice = device ?? this.availableDevices[0];
289
+ this.selectedDevice.set(selectedDevice);
290
+ localStorage.setItem('si-live-preview-selected-device', selectedDevice.id);
291
+ this.emitViewport();
292
+ }
293
+ deviceChanged() {
294
+ this.selectDevice(this.selectedDevice());
295
+ }
296
+ toggleLandscape() {
297
+ this.landscape.update(landscape => !landscape);
298
+ this.emitViewport();
299
+ }
300
+ openQrMenu() {
301
+ this.plainUrl.set(this.createTemplateLink(false));
302
+ this.plainUrlShort.set(this.createTemplateLink(true));
303
+ this.showQrMenu.set(true);
304
+ }
305
+ emitViewport() {
306
+ const device = this.selectedDevice();
307
+ const safeArea = this.landscape() ? device?.safeAreaLandscape : device?.safeAreaPortrait;
308
+ this.viewportChange.emit({
309
+ mode: this.mode(),
310
+ safeAreaTop: safeArea?.top,
311
+ safeAreaBottom: safeArea?.bottom,
312
+ safeAreaLeft: safeArea?.left,
313
+ safeAreaRight: safeArea?.right
314
+ });
315
+ }
316
+ createTemplateLink(skipTemplate) {
317
+ let url = `${window.location.protocol}//${window.location.host}`;
318
+ url += window.location.pathname;
319
+ url += '#/viewer/plain?';
320
+ url += 'theme=' + this.theme();
321
+ url += '&mode=' + this.mode();
322
+ if (this.isRTL()) {
323
+ url += '&isRTL=true';
324
+ }
325
+ const locale = this.locale();
326
+ if (locale) {
327
+ url += '&locale=' + locale;
328
+ }
329
+ if (this.rootFontSize()) {
330
+ url += '&rfs=' + this.rootFontSize();
331
+ }
332
+ if (this.templateModified() && !skipTemplate) {
333
+ url += '&t=' + this.encode(this.template());
334
+ }
335
+ const exampleUrl = this.exampleUrl();
336
+ if (exampleUrl) {
337
+ url += '&e=' + this.encode(exampleUrl);
338
+ }
339
+ return url;
340
+ }
341
+ encode(value) {
342
+ // Using `+` for spaces produces shorter QR code URLs than `%20`.
343
+ return encodeURIComponent(value).replace(/%20/g, '+');
344
+ }
345
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewMobileModeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
346
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewMobileModeComponent, isStandalone: true, selector: "si-live-preview-mobile-mode", inputs: { exampleUrl: { classPropertyName: "exampleUrl", publicName: "exampleUrl", isSignal: true, isRequired: true, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: true, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: true, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, rootFontSize: { classPropertyName: "rootFontSize", publicName: "rootFontSize", isSignal: true, isRequired: true, transformFunction: null }, isRTL: { classPropertyName: "isRTL", publicName: "isRTL", isSignal: true, isRequired: false, transformFunction: null }, templateModified: { classPropertyName: "templateModified", publicName: "templateModified", isSignal: true, isRequired: true, transformFunction: null }, supportsLandscape: { classPropertyName: "supportsLandscape", publicName: "supportsLandscape", isSignal: true, isRequired: true, transformFunction: null }, iFrameHeight: { classPropertyName: "iFrameHeight", publicName: "iFrameHeight", isSignal: true, isRequired: false, transformFunction: null }, iFrameWidth: { classPropertyName: "iFrameWidth", publicName: "iFrameWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { iframeChange: "iframeChange", viewportChange: "viewportChange", themeToggle: "themeToggle" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"themeToggle.emit()\"\n >\n @if (theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n title=\"Mobile example view\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewQrComponent, selector: "si-live-preview-qr", inputs: ["url", "urlShort"], outputs: ["closed"] }] });
347
+ }
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewMobileModeComponent, decorators: [{
349
+ type: Component,
350
+ args: [{ selector: 'si-live-preview-mobile-mode', imports: [FormsModule, SiLivePreviewQrComponent], template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"themeToggle.emit()\"\n >\n @if (theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n title=\"Mobile example view\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"] }]
351
+ }], ctorParameters: () => [], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], exampleUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "exampleUrl", required: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: true }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: true }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], rootFontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootFontSize", required: true }] }], isRTL: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRTL", required: false }] }], templateModified: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateModified", required: true }] }], supportsLandscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "supportsLandscape", required: true }] }], iFrameHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameHeight", required: false }] }], iFrameWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameWidth", required: false }] }], iframeChange: [{ type: i0.Output, args: ["iframeChange"] }], viewportChange: [{ type: i0.Output, args: ["viewportChange"] }], themeToggle: [{ type: i0.Output, args: ["themeToggle"] }] } });
352
+
353
+ /**
354
+ * Copyright (c) Siemens 2016 - 2026
355
+ * SPDX-License-Identifier: MIT
356
+ */
357
+ class SiLivePreviewIframeComponent {
196
358
  baseUrl = input.required(/* @ts-ignore */
197
359
  ...(ngDevMode ? [{ debugName: "baseUrl" }] : /* istanbul ignore next */ []));
198
360
  exampleUrl = input.required(/* @ts-ignore */
@@ -230,44 +392,26 @@ class SiLivePreviewIframeComponent {
230
392
  logMessage = output();
231
393
  logRenderingError = output();
232
394
  inProgress = output();
233
- originalTemplate = '';
234
- templateModified = false;
395
+ originalTemplate = signal('', /* @ts-ignore */
396
+ ...(ngDevMode ? [{ debugName: "originalTemplate" }] : /* istanbul ignore next */ []));
397
+ templateModified = computed(() => this.originalTemplate() !== this.template(), /* @ts-ignore */
398
+ ...(ngDevMode ? [{ debugName: "templateModified" }] : /* istanbul ignore next */ []));
235
399
  rendererInProgress = false;
236
- config = inject(SI_LIVE_PREVIEW_CONFIG);
400
+ previewIframeRef = signal(undefined, /* @ts-ignore */
401
+ ...(ngDevMode ? [{ debugName: "previewIframeRef" }] : /* istanbul ignore next */ []));
402
+ previewIframe = this.previewIframeRef.asReadonly();
237
403
  internalConfig = inject(SI_LIVE_PREVIEW_INTERNALS);
238
404
  ngZone = inject(NgZone);
239
405
  destroyRef = inject(DestroyRef);
240
406
  cdRef = inject(ChangeDetectorRef);
241
407
  isMobile = this.internalConfig.isMobile;
242
- /** iframe height, seeded from the {@link iFrameHeight} input and mutable in mobile mode. */
243
- currentIFrameHeight = linkedSignal(() => this.iFrameHeight(), /* @ts-ignore */
244
- ...(ngDevMode ? [{ debugName: "currentIFrameHeight" }] : /* istanbul ignore next */ []));
245
- /** iframe width, seeded from the {@link iFrameWidth} input and mutable in mobile mode. */
246
- currentIFrameWidth = linkedSignal(() => this.iFrameWidth(), /* @ts-ignore */
247
- ...(ngDevMode ? [{ debugName: "currentIFrameWidth" }] : /* istanbul ignore next */ []));
248
- mode = signal('ios', /* @ts-ignore */
249
- ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
250
- landscape = signal(false, /* @ts-ignore */
251
- ...(ngDevMode ? [{ debugName: "landscape" }] : /* istanbul ignore next */ []));
252
- switcherEnabled = this.config.themeSwitcher;
253
- landscapeEnabled = this.config.landscapeToggle;
254
408
  supportsLandscape = signal(false, /* @ts-ignore */
255
409
  ...(ngDevMode ? [{ debugName: "supportsLandscape" }] : /* istanbul ignore next */ []));
256
- availableDevices = availableDevices;
257
- selectedDevice = signal(undefined, /* @ts-ignore */
258
- ...(ngDevMode ? [{ debugName: "selectedDevice" }] : /* istanbul ignore next */ []));
259
- showNotch = signal(false, /* @ts-ignore */
260
- ...(ngDevMode ? [{ debugName: "showNotch" }] : /* istanbul ignore next */ []));
261
- showQrMenu = signal(false, /* @ts-ignore */
262
- ...(ngDevMode ? [{ debugName: "showQrMenu" }] : /* istanbul ignore next */ []));
263
- plainUrl = signal('', /* @ts-ignore */
264
- ...(ngDevMode ? [{ debugName: "plainUrl" }] : /* istanbul ignore next */ []));
265
- plainUrlShort = signal('', /* @ts-ignore */
266
- ...(ngDevMode ? [{ debugName: "plainUrlShort" }] : /* istanbul ignore next */ []));
410
+ viewport = signal({ mode: 'ios' }, /* @ts-ignore */
411
+ ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
267
412
  constructor() {
268
413
  effect(() => {
269
414
  // recompute on template changes and re-send whenever any rendered input changes
270
- this.templateModified = this.originalTemplate !== this.template();
271
415
  if (this.previewIframe()) {
272
416
  this.sendMessage();
273
417
  }
@@ -280,25 +424,6 @@ class SiLivePreviewIframeComponent {
280
424
  this.onMessage(message);
281
425
  this.cdRef.markForCheck();
282
426
  }));
283
- if (this.isMobile) {
284
- const deviceId = localStorage.getItem('si-live-preview-selected-device');
285
- this.selectedDevice.set(this.availableDevices.find(dev => dev.id === deviceId) ?? this.availableDevices[0]);
286
- this.deviceChanged();
287
- }
288
- }
289
- deviceChanged() {
290
- let selectedDevice = this.selectedDevice();
291
- if (!selectedDevice) {
292
- selectedDevice = this.availableDevices[0];
293
- this.selectedDevice.set(selectedDevice);
294
- }
295
- const landscape = this.landscape();
296
- this.currentIFrameHeight.set(landscape ? selectedDevice.width : selectedDevice.height);
297
- this.currentIFrameWidth.set(landscape ? selectedDevice.height : selectedDevice.width);
298
- this.showNotch.set(selectedDevice.notch ?? false);
299
- this.mode.set(selectedDevice.mode);
300
- localStorage.setItem('si-live-preview-selected-device', selectedDevice.id);
301
- this.sendMessage();
302
427
  }
303
428
  onMessage(event) {
304
429
  if (event.data?.src !== 'renderer') {
@@ -313,10 +438,6 @@ class SiLivePreviewIframeComponent {
313
438
  break;
314
439
  case 'landscapeMode':
315
440
  this.supportsLandscape.set(event.data.message);
316
- if (!this.supportsLandscape() && this.landscape()) {
317
- this.landscape.set(false);
318
- this.deviceChanged();
319
- }
320
441
  break;
321
442
  case 'clear':
322
443
  this.logClear.emit();
@@ -338,8 +459,7 @@ class SiLivePreviewIframeComponent {
338
459
  }
339
460
  break;
340
461
  case 'templateFromComponent':
341
- this.originalTemplate = event.data.message;
342
- this.templateModified = false;
462
+ this.originalTemplate.set(event.data.message);
343
463
  this.templateFromComponent.emit(event.data.message);
344
464
  break;
345
465
  case 'theme':
@@ -354,51 +474,14 @@ class SiLivePreviewIframeComponent {
354
474
  this.theme.set(this.theme() === 'dark' ? 'light' : 'dark');
355
475
  this.sendMessage();
356
476
  }
357
- toggleLandscape() {
358
- const landscape = !this.landscape();
359
- this.landscape.set(landscape);
360
- const selectedDevice = this.selectedDevice();
361
- this.currentIFrameHeight.set(landscape ? selectedDevice?.width : selectedDevice?.height);
362
- this.currentIFrameWidth.set(landscape ? selectedDevice?.height : selectedDevice?.width);
363
- this.sendMessage();
364
- }
365
- openQrMenu() {
366
- this.plainUrl.set(this.createTemplateLink('plain'));
367
- this.plainUrlShort.set(this.createTemplateLink('plain', true));
368
- this.showQrMenu.set(true);
369
- }
370
- createTemplateLink(mode, skipTemplate = false) {
371
- let url = `${window.location.protocol}//${window.location.host}`;
372
- url += window.location.pathname;
373
- url += `#/viewer/${mode}?`;
374
- url += 'theme=' + this.theme();
375
- url += '&mode=' + this.mode();
376
- if (this.isRTL()) {
377
- url += '&isRTL=true';
378
- }
379
- const locale = this.locale();
380
- if (locale) {
381
- url += '&locale=' + locale;
382
- }
383
- if (this.rootFontSize()) {
384
- url += '&rfs=' + this.rootFontSize();
385
- }
386
- if (this.templateModified && !skipTemplate) {
387
- url += '&t=' + this.encode(this.template());
388
- }
389
- const exampleUrl = this.exampleUrl();
390
- if (exampleUrl) {
391
- url += '&e=' + this.encode(exampleUrl);
392
- }
393
- return url;
477
+ setPreviewIframe(iframe) {
478
+ this.previewIframeRef.set(iframe);
394
479
  }
395
- encode(value) {
396
- // using `+` for space is shorter than `%20`
397
- return encodeURIComponent(value).replace(/%20/g, '+');
480
+ setViewport(viewport) {
481
+ this.viewport.set(viewport);
398
482
  }
399
483
  sendMessage() {
400
- const landscape = this.landscape();
401
- const selectedDevice = this.selectedDevice();
484
+ const viewport = this.viewport();
402
485
  this.previewIframe()?.nativeElement.contentWindow.postMessage({
403
486
  src: 'editor',
404
487
  exampleUrl: this.baseUrl() + this.exampleUrl(),
@@ -411,30 +494,22 @@ class SiLivePreviewIframeComponent {
411
494
  locale: this.locale(),
412
495
  rootFontSize: this.rootFontSize(),
413
496
  isRTL: this.isRTL(),
414
- mode: this.mode(),
415
- safeAreaTop: landscape
416
- ? selectedDevice?.safeAreaLandscape?.top
417
- : selectedDevice?.safeAreaPortrait?.top,
418
- safeAreaBottom: landscape
419
- ? selectedDevice?.safeAreaLandscape?.bottom
420
- : selectedDevice?.safeAreaPortrait?.bottom,
421
- safeAreaLeft: landscape
422
- ? selectedDevice?.safeAreaLandscape?.left
423
- : selectedDevice?.safeAreaPortrait?.left,
424
- safeAreaRight: landscape
425
- ? selectedDevice?.safeAreaLandscape?.right
426
- : selectedDevice?.safeAreaPortrait?.right
497
+ mode: viewport.mode,
498
+ safeAreaTop: viewport.safeAreaTop,
499
+ safeAreaBottom: viewport.safeAreaBottom,
500
+ safeAreaLeft: viewport.safeAreaLeft,
501
+ safeAreaRight: viewport.safeAreaRight
427
502
  }, '*');
428
503
  }
429
504
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
430
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewIframeComponent, isStandalone: true, selector: "si-live-preview-iframe", inputs: { baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: true, transformFunction: null }, exampleUrl: { classPropertyName: "exampleUrl", publicName: "exampleUrl", isSignal: true, isRequired: true, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: true, transformFunction: null }, ticketLinkBug: { classPropertyName: "ticketLinkBug", publicName: "ticketLinkBug", isSignal: true, isRequired: true, transformFunction: null }, ticketLinkFeature: { classPropertyName: "ticketLinkFeature", publicName: "ticketLinkFeature", isSignal: true, isRequired: true, transformFunction: null }, isFullscreen: { classPropertyName: "isFullscreen", publicName: "isFullscreen", isSignal: true, isRequired: false, transformFunction: null }, iFrameHeight: { classPropertyName: "iFrameHeight", publicName: "iFrameHeight", isSignal: true, isRequired: false, transformFunction: null }, iFrameWidth: { classPropertyName: "iFrameWidth", publicName: "iFrameWidth", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, rootFontSize: { classPropertyName: "rootFontSize", publicName: "rootFontSize", isSignal: true, isRequired: false, transformFunction: null }, isRTL: { classPropertyName: "isRTL", publicName: "isRTL", isSignal: true, isRequired: false, transformFunction: null }, loadReact: { classPropertyName: "loadReact", publicName: "loadReact", isSignal: true, isRequired: false, transformFunction: null }, loadVue: { classPropertyName: "loadVue", publicName: "loadVue", isSignal: true, isRequired: false, transformFunction: null }, loadJs: { classPropertyName: "loadJs", publicName: "loadJs", isSignal: true, isRequired: false, transformFunction: null }, reactVueTemplate: { classPropertyName: "reactVueTemplate", publicName: "reactVueTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { theme: "themeChange", locale: "localeChange", templateFromComponent: "templateFromComponent", logClear: "logClear", logMessage: "logMessage", logRenderingError: "logRenderingError", inProgress: "inProgress" }, host: { properties: { "class.is-mobile": "isMobile" } }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ exampleUrl() }}</h1>\n @if (!isMobile || !isFullscreen()) {\n <div class=\"ticket-links\">\n <a target=\"_blank\" [href]=\"ticketLinkBug()\">Report a bug</a> |\n <a target=\"_blank\" [href]=\"ticketLinkFeature()\">Request a feature</a>\n </div>\n }\n</section>\n\n@if (isMobile) {\n <section class=\"settings-selection\">\n <select class=\"device-selection\" [(ngModel)]=\"selectedDevice\" (ngModelChange)=\"deviceChanged()\">\n @for (device of availableDevices; track $index) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n [disabled]=\"!supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path\n d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\"\n />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button type=\"button\" title=\"Toggle theme\" (click)=\"toggleTheme()\">\n @if (theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button type=\"button\" title=\"Show QR code\" class=\"qr-button\" (click)=\"openQrMenu()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n </section>\n\n <div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n >\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n </div>\n} @else {\n <iframe #previewIframe src=\"#/iframe\" title=\"Example view\"></iframe>\n}\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:inline-flex;flex-direction:column}:host.is-mobile{margin-block-end:28px}:host:not(.is-mobile){flex:1}iframe{border:0;display:block}:host:not(.is-mobile) iframe{block-size:100%}.header-links{block-size:32px;padding-block:9px;color:var(--si-sys-color-text-primary);font-size:11px;flex-shrink:0;display:flex;align-items:center}:host:not(.is-mobile) .header-links{padding-inline:10px}.header-links .ticket-links,.header-links .example-text{line-height:14px}.header-links .ticket-links{margin-inline-start:auto}.header-links .example-text{color:var(--si-sys-color-text-primary);display:inline;font-size:11px;font-weight:600;margin-block:0;margin-inline:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;inline-size:0}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewQrComponent, selector: "si-live-preview-qr", inputs: ["url", "urlShort"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
505
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewIframeComponent, isStandalone: true, selector: "si-live-preview-iframe", inputs: { baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: true, transformFunction: null }, exampleUrl: { classPropertyName: "exampleUrl", publicName: "exampleUrl", isSignal: true, isRequired: true, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: true, transformFunction: null }, ticketLinkBug: { classPropertyName: "ticketLinkBug", publicName: "ticketLinkBug", isSignal: true, isRequired: true, transformFunction: null }, ticketLinkFeature: { classPropertyName: "ticketLinkFeature", publicName: "ticketLinkFeature", isSignal: true, isRequired: true, transformFunction: null }, isFullscreen: { classPropertyName: "isFullscreen", publicName: "isFullscreen", isSignal: true, isRequired: false, transformFunction: null }, iFrameHeight: { classPropertyName: "iFrameHeight", publicName: "iFrameHeight", isSignal: true, isRequired: false, transformFunction: null }, iFrameWidth: { classPropertyName: "iFrameWidth", publicName: "iFrameWidth", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, rootFontSize: { classPropertyName: "rootFontSize", publicName: "rootFontSize", isSignal: true, isRequired: false, transformFunction: null }, isRTL: { classPropertyName: "isRTL", publicName: "isRTL", isSignal: true, isRequired: false, transformFunction: null }, loadReact: { classPropertyName: "loadReact", publicName: "loadReact", isSignal: true, isRequired: false, transformFunction: null }, loadVue: { classPropertyName: "loadVue", publicName: "loadVue", isSignal: true, isRequired: false, transformFunction: null }, loadJs: { classPropertyName: "loadJs", publicName: "loadJs", isSignal: true, isRequired: false, transformFunction: null }, reactVueTemplate: { classPropertyName: "reactVueTemplate", publicName: "reactVueTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { theme: "themeChange", locale: "localeChange", templateFromComponent: "templateFromComponent", logClear: "logClear", logMessage: "logMessage", logRenderingError: "logRenderingError", inProgress: "inProgress" }, host: { properties: { "class.is-mobile": "isMobile" } }, ngImport: i0, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ exampleUrl() }}</h1>\n @if (!isMobile || !isFullscreen()) {\n <div class=\"ticket-links\">\n <a target=\"_blank\" [href]=\"ticketLinkBug()\">Report a bug</a> |\n <a target=\"_blank\" [href]=\"ticketLinkFeature()\">Request a feature</a>\n </div>\n }\n</section>\n\n@if (isMobile) {\n <si-live-preview-mobile-mode\n [exampleUrl]=\"exampleUrl()\"\n [template]=\"template()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [rootFontSize]=\"rootFontSize()\"\n [isRTL]=\"isRTL()\"\n [templateModified]=\"templateModified()\"\n [supportsLandscape]=\"supportsLandscape()\"\n [iFrameHeight]=\"iFrameHeight()\"\n [iFrameWidth]=\"iFrameWidth()\"\n (iframeChange)=\"setPreviewIframe($event)\"\n (viewportChange)=\"setViewport($event)\"\n (themeToggle)=\"toggleTheme()\"\n />\n} @else {\n <si-live-preview-iframe-mode (iframeChange)=\"setPreviewIframe($event)\" />\n}\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}:host{display:inline-flex;flex-direction:column}:host.is-mobile{margin-block-end:28px}:host:not(.is-mobile){flex:1}.header-links{block-size:32px;padding-block:9px;color:var(--si-sys-color-text-primary);font-size:11px;flex-shrink:0;display:flex;align-items:center}:host:not(.is-mobile) .header-links{padding-inline:10px}.header-links .ticket-links,.header-links .example-text{line-height:14px}.header-links .ticket-links{margin-inline-start:auto}.header-links .example-text{color:var(--si-sys-color-text-primary);display:inline;font-size:11px;font-weight:600;margin-block:0;margin-inline:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;inline-size:0}\n"], dependencies: [{ kind: "component", type: SiLivePreviewIframeModeComponent, selector: "si-live-preview-iframe-mode", outputs: ["iframeChange"] }, { kind: "component", type: SiLivePreviewMobileModeComponent, selector: "si-live-preview-mobile-mode", inputs: ["exampleUrl", "template", "theme", "locale", "rootFontSize", "isRTL", "templateModified", "supportsLandscape", "iFrameHeight", "iFrameWidth"], outputs: ["iframeChange", "viewportChange", "themeToggle"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
431
506
  }
432
507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeComponent, decorators: [{
433
508
  type: Component,
434
- args: [{ selector: 'si-live-preview-iframe', imports: [FormsModule, SiLivePreviewQrComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
509
+ args: [{ selector: 'si-live-preview-iframe', imports: [SiLivePreviewIframeModeComponent, SiLivePreviewMobileModeComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
435
510
  '[class.is-mobile]': 'isMobile'
436
- }, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ exampleUrl() }}</h1>\n @if (!isMobile || !isFullscreen()) {\n <div class=\"ticket-links\">\n <a target=\"_blank\" [href]=\"ticketLinkBug()\">Report a bug</a> |\n <a target=\"_blank\" [href]=\"ticketLinkFeature()\">Request a feature</a>\n </div>\n }\n</section>\n\n@if (isMobile) {\n <section class=\"settings-selection\">\n <select class=\"device-selection\" [(ngModel)]=\"selectedDevice\" (ngModelChange)=\"deviceChanged()\">\n @for (device of availableDevices; track $index) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n [disabled]=\"!supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path\n d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\"\n />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button type=\"button\" title=\"Toggle theme\" (click)=\"toggleTheme()\">\n @if (theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button type=\"button\" title=\"Show QR code\" class=\"qr-button\" (click)=\"openQrMenu()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n </section>\n\n <div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n >\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n </div>\n} @else {\n <iframe #previewIframe src=\"#/iframe\" title=\"Example view\"></iframe>\n}\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:inline-flex;flex-direction:column}:host.is-mobile{margin-block-end:28px}:host:not(.is-mobile){flex:1}iframe{border:0;display:block}:host:not(.is-mobile) iframe{block-size:100%}.header-links{block-size:32px;padding-block:9px;color:var(--si-sys-color-text-primary);font-size:11px;flex-shrink:0;display:flex;align-items:center}:host:not(.is-mobile) .header-links{padding-inline:10px}.header-links .ticket-links,.header-links .example-text{line-height:14px}.header-links .ticket-links{margin-inline-start:auto}.header-links .example-text{color:var(--si-sys-color-text-primary);display:inline;font-size:11px;font-weight:600;margin-block:0;margin-inline:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;inline-size:0}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"] }]
437
- }], ctorParameters: () => [], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], baseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseUrl", required: true }] }], exampleUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "exampleUrl", required: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: true }] }], ticketLinkBug: [{ type: i0.Input, args: [{ isSignal: true, alias: "ticketLinkBug", required: true }] }], ticketLinkFeature: [{ type: i0.Input, args: [{ isSignal: true, alias: "ticketLinkFeature", required: true }] }], isFullscreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFullscreen", required: false }] }], iFrameHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameHeight", required: false }] }], iFrameWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameWidth", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }, { type: i0.Output, args: ["themeChange"] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }, { type: i0.Output, args: ["localeChange"] }], rootFontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootFontSize", required: false }] }], isRTL: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRTL", required: false }] }], loadReact: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadReact", required: false }] }], loadVue: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadVue", required: false }] }], loadJs: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadJs", required: false }] }], reactVueTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "reactVueTemplate", required: false }] }], templateFromComponent: [{ type: i0.Output, args: ["templateFromComponent"] }], logClear: [{ type: i0.Output, args: ["logClear"] }], logMessage: [{ type: i0.Output, args: ["logMessage"] }], logRenderingError: [{ type: i0.Output, args: ["logRenderingError"] }], inProgress: [{ type: i0.Output, args: ["inProgress"] }] } });
511
+ }, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ exampleUrl() }}</h1>\n @if (!isMobile || !isFullscreen()) {\n <div class=\"ticket-links\">\n <a target=\"_blank\" [href]=\"ticketLinkBug()\">Report a bug</a> |\n <a target=\"_blank\" [href]=\"ticketLinkFeature()\">Request a feature</a>\n </div>\n }\n</section>\n\n@if (isMobile) {\n <si-live-preview-mobile-mode\n [exampleUrl]=\"exampleUrl()\"\n [template]=\"template()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [rootFontSize]=\"rootFontSize()\"\n [isRTL]=\"isRTL()\"\n [templateModified]=\"templateModified()\"\n [supportsLandscape]=\"supportsLandscape()\"\n [iFrameHeight]=\"iFrameHeight()\"\n [iFrameWidth]=\"iFrameWidth()\"\n (iframeChange)=\"setPreviewIframe($event)\"\n (viewportChange)=\"setViewport($event)\"\n (themeToggle)=\"toggleTheme()\"\n />\n} @else {\n <si-live-preview-iframe-mode (iframeChange)=\"setPreviewIframe($event)\" />\n}\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}:host{display:inline-flex;flex-direction:column}:host.is-mobile{margin-block-end:28px}:host:not(.is-mobile){flex:1}.header-links{block-size:32px;padding-block:9px;color:var(--si-sys-color-text-primary);font-size:11px;flex-shrink:0;display:flex;align-items:center}:host:not(.is-mobile) .header-links{padding-inline:10px}.header-links .ticket-links,.header-links .example-text{line-height:14px}.header-links .ticket-links{margin-inline-start:auto}.header-links .example-text{color:var(--si-sys-color-text-primary);display:inline;font-size:11px;font-weight:600;margin-block:0;margin-inline:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;inline-size:0}\n"] }]
512
+ }], ctorParameters: () => [], propDecorators: { baseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseUrl", required: true }] }], exampleUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "exampleUrl", required: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: true }] }], ticketLinkBug: [{ type: i0.Input, args: [{ isSignal: true, alias: "ticketLinkBug", required: true }] }], ticketLinkFeature: [{ type: i0.Input, args: [{ isSignal: true, alias: "ticketLinkFeature", required: true }] }], isFullscreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFullscreen", required: false }] }], iFrameHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameHeight", required: false }] }], iFrameWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "iFrameWidth", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }, { type: i0.Output, args: ["themeChange"] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }, { type: i0.Output, args: ["localeChange"] }], rootFontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootFontSize", required: false }] }], isRTL: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRTL", required: false }] }], loadReact: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadReact", required: false }] }], loadVue: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadVue", required: false }] }], loadJs: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadJs", required: false }] }], reactVueTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "reactVueTemplate", required: false }] }], templateFromComponent: [{ type: i0.Output, args: ["templateFromComponent"] }], logClear: [{ type: i0.Output, args: ["logClear"] }], logMessage: [{ type: i0.Output, args: ["logMessage"] }], logRenderingError: [{ type: i0.Output, args: ["logRenderingError"] }], inProgress: [{ type: i0.Output, args: ["inProgress"] }] } });
438
513
 
439
514
  /**
440
515
  * Copyright (c) Siemens 2016 - 2026
@@ -2228,6 +2303,163 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2228
2303
  }]
2229
2304
  }] });
2230
2305
 
2306
+ /**
2307
+ * Copyright (c) Siemens 2016 - 2026
2308
+ * SPDX-License-Identifier: MIT
2309
+ */
2310
+ /** A router location that is private to a rendered example application. */
2311
+ class ExampleLocationStrategy extends LocationStrategy {
2312
+ currentPath = '/';
2313
+ state = null;
2314
+ path() {
2315
+ return this.currentPath;
2316
+ }
2317
+ prepareExternalUrl(internal) {
2318
+ return internal;
2319
+ }
2320
+ getState() {
2321
+ return this.state;
2322
+ }
2323
+ pushState(state, _title, url, queryParams) {
2324
+ this.state = state;
2325
+ this.currentPath = url + queryParams;
2326
+ }
2327
+ replaceState(state, _title, url, queryParams) {
2328
+ this.state = state;
2329
+ this.currentPath = url + queryParams;
2330
+ }
2331
+ forward() { }
2332
+ back() { }
2333
+ onPopState(_fn) { }
2334
+ getBaseHref() {
2335
+ return '';
2336
+ }
2337
+ }
2338
+
2339
+ /**
2340
+ * Copyright (c) Siemens 2016 - 2026
2341
+ * SPDX-License-Identifier: MIT
2342
+ */
2343
+ /**
2344
+ * Runtime shell that renders each example in an independent Angular application.
2345
+ * The example application owns its router and does not modify the live-preview router.
2346
+ */
2347
+ class SiLivePreviewApplicationRuntimeComponent extends SiLivePreviewRuntimeComponent {
2348
+ applicationConfig = inject(SI_LIVE_PREVIEW_CONFIG);
2349
+ parentInjector = inject(Injector);
2350
+ exampleComponentRef;
2351
+ applicationRef;
2352
+ hostElement;
2353
+ destroyed = false;
2354
+ ngAfterViewInit() {
2355
+ this.createExampleApplication();
2356
+ }
2357
+ ngOnDestroy() {
2358
+ this.destroyed = true;
2359
+ this.exampleComponentRef?.destroy();
2360
+ this.exampleComponentRef = undefined;
2361
+ this.applicationRef?.destroy();
2362
+ this.hostElement?.remove();
2363
+ }
2364
+ async createExampleApplication() {
2365
+ try {
2366
+ const locationStrategy = new ExampleLocationStrategy();
2367
+ const configuredApplication = this.applicationConfig.exampleApplicationConfig;
2368
+ const exampleApplicationConfig = typeof configuredApplication === 'function'
2369
+ ? configuredApplication(this.parentInjector)
2370
+ : configuredApplication;
2371
+ this.applicationRef = await createApplication({
2372
+ ...exampleApplicationConfig,
2373
+ providers: [
2374
+ ...(exampleApplicationConfig?.providers ?? []),
2375
+ provideRouter([], withDisabledInitialNavigation()),
2376
+ { provide: LocationStrategy, useValue: locationStrategy },
2377
+ {
2378
+ provide: Location,
2379
+ useFactory: () => new Location(inject(LocationStrategy))
2380
+ },
2381
+ {
2382
+ provide: LOG_EVENT,
2383
+ useFactory: () => this.parentInjector.get(LOG_EVENT)
2384
+ },
2385
+ {
2386
+ provide: ErrorHandler,
2387
+ useValue: { handleError: (error) => this.handleError(error) }
2388
+ }
2389
+ ]
2390
+ });
2391
+ if (this.destroyed) {
2392
+ this.applicationRef.destroy();
2393
+ return;
2394
+ }
2395
+ this.exampleComponentRef = createComponent(this.component(), {
2396
+ environmentInjector: this.applicationRef.injector
2397
+ });
2398
+ this.hostElement = this.exampleComponentRef.location.nativeElement;
2399
+ const anchor = this.container().element.nativeElement;
2400
+ anchor.parentNode?.insertBefore(this.hostElement, anchor);
2401
+ const exampleRoutes = this.exampleComponentRef.injector.get(SI_LIVE_PREVIEW_EXAMPLE_ROUTES, this.applicationConfig.defaultRoutes ?? [{ path: '**', component: SiDummyComponent }], { self: true });
2402
+ this.applicationRef.injector.get(Router).resetConfig(exampleRoutes);
2403
+ this.applicationRef.attachView(this.exampleComponentRef.hostView);
2404
+ this.applicationRef.tick();
2405
+ this.ready.emit();
2406
+ }
2407
+ catch (error) {
2408
+ this.handleError(error);
2409
+ }
2410
+ }
2411
+ handleError(error) {
2412
+ this.renderingError.emit(error instanceof Error ? error : new Error(String(error)));
2413
+ }
2414
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewApplicationRuntimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2415
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SiLivePreviewApplicationRuntimeComponent, isStandalone: true, usesInheritance: true, ngImport: i0 });
2416
+ }
2417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewApplicationRuntimeComponent, decorators: [{
2418
+ type: Directive
2419
+ }] });
2420
+
2421
+ /**
2422
+ * Copyright (c) Siemens 2016 - 2026
2423
+ * SPDX-License-Identifier: MIT
2424
+ */
2425
+ /** Default shell that renders an example in an independent Angular application. */
2426
+ class SiDefaultLivePreviewApplicationRuntimeComponent extends SiLivePreviewApplicationRuntimeComponent {
2427
+ container = viewChild.required('container', { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
2428
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiDefaultLivePreviewApplicationRuntimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2429
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiDefaultLivePreviewApplicationRuntimeComponent, isStandalone: true, selector: "si-live-preview-application-runtime", viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: '<ng-container #container />', isInline: true });
2430
+ }
2431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiDefaultLivePreviewApplicationRuntimeComponent, decorators: [{
2432
+ type: Component,
2433
+ args: [{
2434
+ selector: 'si-live-preview-application-runtime',
2435
+ template: '<ng-container #container />'
2436
+ }]
2437
+ }], propDecorators: { container: [{ type: i0.ViewChild, args: ['container', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
2438
+
2439
+ /**
2440
+ * Copyright (c) Siemens 2016 - 2026
2441
+ * SPDX-License-Identifier: MIT
2442
+ */
2443
+ /**
2444
+ * Configures live preview with each example rendered in an independent Angular application.
2445
+ */
2446
+ const provideLivePreview = (config, isMobile = false) => {
2447
+ return makeEnvironmentProviders([
2448
+ provideRouter(livePreviewRoutes, withHashLocation()),
2449
+ {
2450
+ provide: SI_LIVE_PREVIEW_CONFIG,
2451
+ useValue: {
2452
+ ...config,
2453
+ runtimeComponent: config.runtimeComponent ?? SiDefaultLivePreviewApplicationRuntimeComponent
2454
+ }
2455
+ },
2456
+ {
2457
+ provide: SI_LIVE_PREVIEW_INTERNALS,
2458
+ useValue: { isMobile, titleBase: 'Overview - Live Preview' }
2459
+ }
2460
+ ]);
2461
+ };
2462
+
2231
2463
  /**
2232
2464
  * Copyright (c) Siemens 2016 - 2026
2233
2465
  * SPDX-License-Identifier: MIT
@@ -2246,15 +2478,13 @@ class SiLivePreviewModule {
2246
2478
  };
2247
2479
  }
2248
2480
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2249
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule, imports: [SiExampleViewerComponent, SiExampleOverviewComponent], exports: [SiExampleOverviewComponent, SiExampleViewerComponent] });
2250
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule, providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: true }], imports: [SiExampleViewerComponent, SiExampleOverviewComponent] });
2481
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule });
2482
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule, providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: true }] });
2251
2483
  }
2252
2484
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewModule, decorators: [{
2253
2485
  type: NgModule,
2254
2486
  args: [{
2255
- imports: [SiExampleViewerComponent, SiExampleOverviewComponent],
2256
- providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: true }],
2257
- exports: [SiExampleOverviewComponent, SiExampleViewerComponent]
2487
+ providers: [{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: true }]
2258
2488
  }]
2259
2489
  }] });
2260
2490
 
@@ -2268,5 +2498,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2268
2498
  * Generated bundle index. Do not edit.
2269
2499
  */
2270
2500
 
2271
- export { DummyAppSampleComponent, LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SI_STACKBLITZ_CONFIG, SiDummyComponent, SiExampleOverviewComponent, SiExampleViewerComponent, SiLivePreviewComponent, SiLivePreviewIframeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewQrComponent, SiLivePreviewRendererComponent, SiLivePreviewRoutingModule, SiLivePreviewRuntimeComponent, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewWrapperComponent, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, angularTemplateProject, livePreviewRoutes, provideExampleRoutes, provideStackblitzConfig };
2501
+ export { LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SI_STACKBLITZ_CONFIG, SiDummyComponent, SiLivePreviewApplicationRuntimeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewRoutingModule, SiLivePreviewRuntimeComponent, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, angularTemplateProject, livePreviewRoutes, provideExampleRoutes, provideLivePreview, provideStackblitzConfig };
2272
2502
  //# sourceMappingURL=siemens-live-preview.mjs.map