@siemens/live-preview 51.2.0 → 51.3.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,12 +1,12 @@
1
1
  import * as i0 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';
2
+ import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, InjectionToken, computed, signal, effect, Service, viewChild, output, input, NgZone, DestroyRef, Directive, ElementRef, untracked, Injectable, ViewContainerRef, Compiler, Injector, 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
4
  import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterModule, provideRouter, withDisabledInitialNavigation, withHashLocation } from '@angular/router';
5
- import { KeyValuePipe, AsyncPipe, LocationStrategy, Location } from '@angular/common';
6
5
  import * as i1 from '@angular/forms';
7
6
  import { FormsModule, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
8
7
  import { Title, ɵDomRendererFactory2 as _DomRendererFactory2, createApplication, REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';
9
- import { throttleTime, timeout, retry, filter, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
8
+ import { throttleTime, timeout, retry, debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
+ import { KeyValuePipe, LocationStrategy, Location } from '@angular/common';
10
10
  import { httpResource, HttpClient } from '@angular/common/http';
11
11
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
12
  import CodeFlask from 'codeflask';
@@ -55,6 +55,192 @@ 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 LivePreviewStateService {
63
+ router = inject(Router);
64
+ overviewExample = computed(() => {
65
+ this.router.lastSuccessfulNavigation();
66
+ const route = this.findOverviewRoute(this.router.routerState.root);
67
+ return this.getOverviewExample(route?.snapshot.url ?? []);
68
+ }, /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "overviewExample" }] : /* istanbul ignore next */ []));
70
+ delayedLogClearTimer;
71
+ example = signal('', /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "example" }] : /* istanbul ignore next */ []));
73
+ dataId = signal('', /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "dataId" }] : /* istanbul ignore next */ []));
75
+ template = signal('', /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
77
+ templateReact = signal('', /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "templateReact" }] : /* istanbul ignore next */ []));
79
+ templateVue = signal('', /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "templateVue" }] : /* istanbul ignore next */ []));
81
+ templateJs = signal('', /* @ts-ignore */
82
+ ...(ngDevMode ? [{ debugName: "templateJs" }] : /* istanbul ignore next */ []));
83
+ originalTemplate = signal('', /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "originalTemplate" }] : /* istanbul ignore next */ []));
85
+ theme = signal('light', /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
87
+ locale = signal(undefined, /* @ts-ignore */
88
+ ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
89
+ isRTL = signal(false, /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "isRTL" }] : /* istanbul ignore next */ []));
91
+ rootFontSize = signal(0, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "rootFontSize" }] : /* istanbul ignore next */ []));
93
+ framework = signal('angular', /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "framework" }] : /* istanbul ignore next */ []));
95
+ loadReact = signal(false, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "loadReact" }] : /* istanbul ignore next */ []));
97
+ loadVue = signal(false, /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "loadVue" }] : /* istanbul ignore next */ []));
99
+ loadJs = signal(false, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "loadJs" }] : /* istanbul ignore next */ []));
101
+ supportsLandscape = signal(false, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "supportsLandscape" }] : /* istanbul ignore next */ []));
103
+ viewport = signal({ mode: 'ios' }, /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
105
+ iFrameHeight = signal(undefined, /* @ts-ignore */
106
+ ...(ngDevMode ? [{ debugName: "iFrameHeight" }] : /* istanbul ignore next */ []));
107
+ iFrameWidth = signal(undefined, /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "iFrameWidth" }] : /* istanbul ignore next */ []));
109
+ renderingError = signal(undefined, /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "renderingError" }] : /* istanbul ignore next */ []));
111
+ logMessages = signal([], /* @ts-ignore */
112
+ ...(ngDevMode ? [{ debugName: "logMessages" }] : /* istanbul ignore next */ []));
113
+ newMessages = signal(false, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "newMessages" }] : /* istanbul ignore next */ []));
115
+ pendingOperations = signal(0, /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "pendingOperations" }] : /* istanbul ignore next */ []));
117
+ inProgress = computed(() => this.pendingOperations() > 0, /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
119
+ templateModified = computed(() => this.originalTemplate() !== this.template(), /* @ts-ignore */
120
+ ...(ngDevMode ? [{ debugName: "templateModified" }] : /* istanbul ignore next */ []));
121
+ activeWebComponentTemplate = computed(() => {
122
+ switch (this.framework()) {
123
+ case 'react':
124
+ return this.templateReact();
125
+ case 'vue':
126
+ return this.templateVue();
127
+ case 'js':
128
+ return this.templateJs();
129
+ default:
130
+ return '';
131
+ }
132
+ }, /* @ts-ignore */
133
+ ...(ngDevMode ? [{ debugName: "activeWebComponentTemplate" }] : /* istanbul ignore next */ []));
134
+ constructor() {
135
+ effect(() => {
136
+ const example = this.overviewExample();
137
+ if (example !== undefined) {
138
+ this.clearTemplates();
139
+ this.example.set(example);
140
+ }
141
+ });
142
+ }
143
+ findOverviewRoute(route) {
144
+ if (route.routeConfig?.path === 'overview') {
145
+ let activeRoute = route;
146
+ while (activeRoute.firstChild) {
147
+ activeRoute = activeRoute.firstChild;
148
+ }
149
+ return activeRoute;
150
+ }
151
+ for (const child of route.children) {
152
+ const overviewRoute = this.findOverviewRoute(child);
153
+ if (overviewRoute) {
154
+ return overviewRoute;
155
+ }
156
+ }
157
+ return undefined;
158
+ }
159
+ getOverviewExample(segments) {
160
+ return segments.length ? segments.join('/') : undefined;
161
+ }
162
+ setFramework(framework) {
163
+ this.framework.set(framework);
164
+ this.loadReact.set(framework === 'react');
165
+ this.loadVue.set(framework === 'vue');
166
+ this.loadJs.set(framework === 'js');
167
+ }
168
+ applyRenderRequest(request) {
169
+ this.example.set(request.exampleUrl);
170
+ this.template.set(request.template);
171
+ this.loadReact.set(request.loadReact);
172
+ this.loadVue.set(request.loadVue);
173
+ this.loadJs.set(request.loadJs);
174
+ if (request.loadReact) {
175
+ this.framework.set('react');
176
+ this.templateReact.set(request.reactVueTemplate);
177
+ }
178
+ else if (request.loadVue) {
179
+ this.framework.set('vue');
180
+ this.templateVue.set(request.reactVueTemplate);
181
+ }
182
+ else if (request.loadJs) {
183
+ this.framework.set('js');
184
+ this.templateJs.set(request.reactVueTemplate);
185
+ }
186
+ else {
187
+ this.framework.set('angular');
188
+ }
189
+ this.viewport.set({
190
+ mode: request.mode,
191
+ safeAreaTop: request.safeAreaTop,
192
+ safeAreaBottom: request.safeAreaBottom,
193
+ safeAreaLeft: request.safeAreaLeft,
194
+ safeAreaRight: request.safeAreaRight
195
+ });
196
+ }
197
+ stopWebComponentLoading() {
198
+ this.loadReact.set(false);
199
+ this.loadVue.set(false);
200
+ this.loadJs.set(false);
201
+ }
202
+ clearTemplates() {
203
+ this.template.set('');
204
+ this.templateReact.set('');
205
+ this.templateVue.set('');
206
+ this.templateJs.set('');
207
+ this.originalTemplate.set('');
208
+ }
209
+ toggleTheme() {
210
+ this.theme.update(theme => (theme === 'dark' ? 'light' : 'dark'));
211
+ }
212
+ setRenderingProgress(inProgress) {
213
+ this.pendingOperations.update(count => Math.max(0, count + (inProgress ? 1 : -1)));
214
+ }
215
+ resetRenderingProgress() {
216
+ this.pendingOperations.set(0);
217
+ }
218
+ addLog(message) {
219
+ if (this.delayedLogClearTimer) {
220
+ clearTimeout(this.delayedLogClearTimer);
221
+ this.delayedLogClearTimer = undefined;
222
+ this.logMessages.set([]);
223
+ }
224
+ this.logMessages.update(messages => [...messages, message]);
225
+ this.newMessages.set(true);
226
+ }
227
+ clearLogs(delayed = false) {
228
+ if (delayed && this.logMessages().length) {
229
+ this.delayedLogClearTimer = setTimeout(() => {
230
+ this.delayedLogClearTimer = undefined;
231
+ this.logMessages.set([]);
232
+ }, 100);
233
+ return;
234
+ }
235
+ this.logMessages.set([]);
236
+ }
237
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewStateService, deps: [], target: i0.ɵɵFactoryTarget.Service });
238
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewStateService });
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewStateService, decorators: [{
241
+ type: Service
242
+ }], ctorParameters: () => [] });
243
+
58
244
  /**
59
245
  * Copyright (c) Siemens 2016 - 2026
60
246
  * SPDX-License-Identifier: MIT
@@ -216,29 +402,8 @@ class SiLivePreviewMobileModeComponent {
216
402
  previewIframe = viewChild.required('previewIframe', /* @ts-ignore */
217
403
  ...(ngDevMode ? [{ debugName: "previewIframe" }] : /* istanbul ignore next */ []));
218
404
  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 */ []));
405
+ state = inject(LivePreviewStateService);
239
406
  iframeChange = output();
240
- viewportChange = output();
241
- themeToggle = output();
242
407
  switcherEnabled = this.config.themeSwitcher;
243
408
  landscapeEnabled = this.config.landscapeToggle;
244
409
  availableDevices = availableDevices;
@@ -258,17 +423,17 @@ class SiLivePreviewMobileModeComponent {
258
423
  ...(ngDevMode ? [{ debugName: "showNotch" }] : /* istanbul ignore next */ []));
259
424
  currentIFrameHeight = computed(() => {
260
425
  const device = this.selectedDevice();
261
- return device ? (this.landscape() ? device.width : device.height) : this.iFrameHeight();
426
+ return device ? (this.landscape() ? device.width : device.height) : this.state.iFrameHeight();
262
427
  }, /* @ts-ignore */
263
428
  ...(ngDevMode ? [{ debugName: "currentIFrameHeight" }] : /* istanbul ignore next */ []));
264
429
  currentIFrameWidth = computed(() => {
265
430
  const device = this.selectedDevice();
266
- return device ? (this.landscape() ? device.height : device.width) : this.iFrameWidth();
431
+ return device ? (this.landscape() ? device.height : device.width) : this.state.iFrameWidth();
267
432
  }, /* @ts-ignore */
268
433
  ...(ngDevMode ? [{ debugName: "currentIFrameWidth" }] : /* istanbul ignore next */ []));
269
434
  constructor() {
270
435
  effect(() => {
271
- if (!this.supportsLandscape() && this.landscape()) {
436
+ if (!this.state.supportsLandscape() && this.landscape()) {
272
437
  this.landscape.set(false);
273
438
  this.emitViewport();
274
439
  }
@@ -305,7 +470,7 @@ class SiLivePreviewMobileModeComponent {
305
470
  emitViewport() {
306
471
  const device = this.selectedDevice();
307
472
  const safeArea = this.landscape() ? device?.safeAreaLandscape : device?.safeAreaPortrait;
308
- this.viewportChange.emit({
473
+ this.state.viewport.set({
309
474
  mode: this.mode(),
310
475
  safeAreaTop: safeArea?.top,
311
476
  safeAreaBottom: safeArea?.bottom,
@@ -317,22 +482,22 @@ class SiLivePreviewMobileModeComponent {
317
482
  let url = `${window.location.protocol}//${window.location.host}`;
318
483
  url += window.location.pathname;
319
484
  url += '#/viewer/plain?';
320
- url += 'theme=' + this.theme();
485
+ url += 'theme=' + this.state.theme();
321
486
  url += '&mode=' + this.mode();
322
- if (this.isRTL()) {
487
+ if (this.state.isRTL()) {
323
488
  url += '&isRTL=true';
324
489
  }
325
- const locale = this.locale();
490
+ const locale = this.state.locale();
326
491
  if (locale) {
327
492
  url += '&locale=' + locale;
328
493
  }
329
- if (this.rootFontSize()) {
330
- url += '&rfs=' + this.rootFontSize();
494
+ if (this.state.rootFontSize()) {
495
+ url += '&rfs=' + this.state.rootFontSize();
331
496
  }
332
- if (this.templateModified() && !skipTemplate) {
333
- url += '&t=' + this.encode(this.template());
497
+ if (this.state.templateModified() && !skipTemplate) {
498
+ url += '&t=' + this.encode(this.state.template());
334
499
  }
335
- const exampleUrl = this.exampleUrl();
500
+ const exampleUrl = this.state.example();
336
501
  if (exampleUrl) {
337
502
  url += '&e=' + this.encode(exampleUrl);
338
503
  }
@@ -343,72 +508,36 @@ class SiLivePreviewMobileModeComponent {
343
508
  return encodeURIComponent(value).replace(/%20/g, '+');
344
509
  }
345
510
  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"] }] });
511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewMobileModeComponent, isStandalone: true, selector: "si-live-preview-mobile-mode", outputs: { iframeChange: "iframeChange" }, 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]=\"!state.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)=\"state.toggleTheme()\"\n >\n @if (state.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]=\"state.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]=\"state.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]=\"state.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
512
  }
348
513
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewMobileModeComponent, decorators: [{
349
514
  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"] }] } });
515
+ 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]=\"!state.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)=\"state.toggleTheme()\"\n >\n @if (state.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]=\"state.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]=\"state.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]=\"state.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"] }]
516
+ }], ctorParameters: () => [], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], iframeChange: [{ type: i0.Output, args: ["iframeChange"] }] } });
352
517
 
353
518
  /**
354
519
  * Copyright (c) Siemens 2016 - 2026
355
520
  * SPDX-License-Identifier: MIT
356
521
  */
357
522
  class SiLivePreviewIframeComponent {
358
- baseUrl = input.required(/* @ts-ignore */
359
- ...(ngDevMode ? [{ debugName: "baseUrl" }] : /* istanbul ignore next */ []));
360
- exampleUrl = input.required(/* @ts-ignore */
361
- ...(ngDevMode ? [{ debugName: "exampleUrl" }] : /* istanbul ignore next */ []));
362
- template = input.required(/* @ts-ignore */
363
- ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
364
- ticketLinkBug = input.required(/* @ts-ignore */
365
- ...(ngDevMode ? [{ debugName: "ticketLinkBug" }] : /* istanbul ignore next */ []));
366
- ticketLinkFeature = input.required(/* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "ticketLinkFeature" }] : /* istanbul ignore next */ []));
368
523
  isFullscreen = input(false, /* @ts-ignore */
369
524
  ...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
370
- iFrameHeight = input(/* @ts-ignore */
371
- ...(ngDevMode ? [undefined, { debugName: "iFrameHeight" }] : /* istanbul ignore next */ []));
372
- iFrameWidth = input(/* @ts-ignore */
373
- ...(ngDevMode ? [undefined, { debugName: "iFrameWidth" }] : /* istanbul ignore next */ []));
374
- theme = model('light', /* @ts-ignore */
375
- ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
376
- locale = model(/* @ts-ignore */
377
- ...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
378
- rootFontSize = input(0, /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "rootFontSize" }] : /* istanbul ignore next */ []));
380
- isRTL = input(/* @ts-ignore */
381
- ...(ngDevMode ? [undefined, { debugName: "isRTL" }] : /* istanbul ignore next */ []));
382
- loadReact = input(/* @ts-ignore */
383
- ...(ngDevMode ? [undefined, { debugName: "loadReact" }] : /* istanbul ignore next */ []));
384
- loadVue = input(/* @ts-ignore */
385
- ...(ngDevMode ? [undefined, { debugName: "loadVue" }] : /* istanbul ignore next */ []));
386
- loadJs = input(/* @ts-ignore */
387
- ...(ngDevMode ? [undefined, { debugName: "loadJs" }] : /* istanbul ignore next */ []));
388
- reactVueTemplate = input(/* @ts-ignore */
389
- ...(ngDevMode ? [undefined, { debugName: "reactVueTemplate" }] : /* istanbul ignore next */ []));
390
525
  templateFromComponent = output();
391
- logClear = output();
392
- logMessage = output();
393
- logRenderingError = output();
394
- inProgress = output();
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 */ []));
526
+ state = inject(LivePreviewStateService);
399
527
  rendererInProgress = false;
400
528
  previewIframeRef = signal(undefined, /* @ts-ignore */
401
529
  ...(ngDevMode ? [{ debugName: "previewIframeRef" }] : /* istanbul ignore next */ []));
402
530
  previewIframe = this.previewIframeRef.asReadonly();
403
531
  internalConfig = inject(SI_LIVE_PREVIEW_INTERNALS);
532
+ config = inject(SI_LIVE_PREVIEW_CONFIG);
404
533
  ngZone = inject(NgZone);
405
534
  destroyRef = inject(DestroyRef);
406
535
  cdRef = inject(ChangeDetectorRef);
407
536
  isMobile = this.internalConfig.isMobile;
408
- supportsLandscape = signal(false, /* @ts-ignore */
409
- ...(ngDevMode ? [{ debugName: "supportsLandscape" }] : /* istanbul ignore next */ []));
410
- viewport = signal({ mode: 'ios' }, /* @ts-ignore */
411
- ...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
537
+ ticketLinkBug = computed(() => `${this.config.ticketBaseUrl}?issue%5Btitle%5D=%3C${this.state.example()}%3E:&issuable_template=Bug`, /* @ts-ignore */
538
+ ...(ngDevMode ? [{ debugName: "ticketLinkBug" }] : /* istanbul ignore next */ []));
539
+ ticketLinkFeature = computed(() => `${this.config.ticketBaseUrl}?issue%5Btitle%5D=%3C${this.state.example()}%3E:&issuable_template=Feature Request`, /* @ts-ignore */
540
+ ...(ngDevMode ? [{ debugName: "ticketLinkFeature" }] : /* istanbul ignore next */ []));
412
541
  constructor() {
413
542
  effect(() => {
414
543
  // recompute on template changes and re-send whenever any rendered input changes
@@ -437,16 +566,16 @@ class SiLivePreviewIframeComponent {
437
566
  this.sendMessage();
438
567
  break;
439
568
  case 'landscapeMode':
440
- this.supportsLandscape.set(event.data.message);
569
+ this.state.supportsLandscape.set(event.data.message);
441
570
  break;
442
571
  case 'clear':
443
- this.logClear.emit();
572
+ this.state.clearLogs(true);
444
573
  break;
445
574
  case 'log':
446
- this.logMessage.emit(event.data.message);
575
+ this.state.addLog(event.data.message);
447
576
  break;
448
577
  case 'error':
449
- this.logRenderingError.emit(event.data.message);
578
+ this.state.renderingError.set(event.data.message);
450
579
  break;
451
580
  case 'progress':
452
581
  {
@@ -454,46 +583,43 @@ class SiLivePreviewIframeComponent {
454
583
  if (progress !== this.rendererInProgress) {
455
584
  // only emit changes since live-previewer does counting
456
585
  this.rendererInProgress = progress;
457
- this.inProgress.emit(progress);
586
+ this.state.setRenderingProgress(progress);
458
587
  }
459
588
  }
460
589
  break;
461
590
  case 'templateFromComponent':
462
- this.originalTemplate.set(event.data.message);
591
+ this.state.originalTemplate.set(event.data.message ?? '');
463
592
  this.templateFromComponent.emit(event.data.message);
464
593
  break;
465
594
  case 'theme':
466
- this.theme.set(event.data.message);
595
+ this.state.theme.set(event.data.message);
467
596
  break;
468
597
  case 'locale':
469
- this.locale.set(event.data.message);
598
+ this.state.locale.set(event.data.message);
470
599
  break;
471
600
  }
472
601
  }
473
602
  toggleTheme() {
474
- this.theme.set(this.theme() === 'dark' ? 'light' : 'dark');
603
+ this.state.toggleTheme();
475
604
  this.sendMessage();
476
605
  }
477
606
  setPreviewIframe(iframe) {
478
607
  this.previewIframeRef.set(iframe);
479
608
  }
480
- setViewport(viewport) {
481
- this.viewport.set(viewport);
482
- }
483
609
  sendMessage() {
484
- const viewport = this.viewport();
610
+ const viewport = this.state.viewport();
485
611
  this.previewIframe()?.nativeElement.contentWindow.postMessage({
486
612
  src: 'editor',
487
- exampleUrl: this.baseUrl() + this.exampleUrl(),
488
- template: this.template(),
489
- loadReact: this.loadReact(),
490
- loadVue: this.loadVue(),
491
- loadJs: this.loadJs(),
492
- reactVueTemplate: this.reactVueTemplate(),
493
- theme: this.theme(),
494
- locale: this.locale(),
495
- rootFontSize: this.rootFontSize(),
496
- isRTL: this.isRTL(),
613
+ exampleUrl: this.state.example(),
614
+ template: this.state.template(),
615
+ loadReact: this.state.loadReact(),
616
+ loadVue: this.state.loadVue(),
617
+ loadJs: this.state.loadJs(),
618
+ reactVueTemplate: this.state.activeWebComponentTemplate(),
619
+ theme: this.state.theme(),
620
+ locale: this.state.locale(),
621
+ rootFontSize: this.state.rootFontSize(),
622
+ isRTL: this.state.isRTL(),
497
623
  mode: viewport.mode,
498
624
  safeAreaTop: viewport.safeAreaTop,
499
625
  safeAreaBottom: viewport.safeAreaBottom,
@@ -502,14 +628,14 @@ class SiLivePreviewIframeComponent {
502
628
  }, '*');
503
629
  }
504
630
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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 });
631
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewIframeComponent, isStandalone: true, selector: "si-live-preview-iframe", inputs: { isFullscreen: { classPropertyName: "isFullscreen", publicName: "isFullscreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { templateFromComponent: "templateFromComponent" }, host: { properties: { "class.is-mobile": "isMobile" } }, ngImport: i0, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ state.example() }}</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 (iframeChange)=\"setPreviewIframe($event)\" />\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", outputs: ["iframeChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
506
632
  }
507
633
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeComponent, decorators: [{
508
634
  type: Component,
509
635
  args: [{ selector: 'si-live-preview-iframe', imports: [SiLivePreviewIframeModeComponent, SiLivePreviewMobileModeComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
510
636
  '[class.is-mobile]': 'isMobile'
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"] }] } });
637
+ }, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ state.example() }}</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 (iframeChange)=\"setPreviewIframe($event)\" />\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"] }]
638
+ }], ctorParameters: () => [], propDecorators: { isFullscreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFullscreen", required: false }] }], templateFromComponent: [{ type: i0.Output, args: ["templateFromComponent"] }] } });
513
639
 
514
640
  /**
515
641
  * Copyright (c) Siemens 2016 - 2026
@@ -747,6 +873,7 @@ class SiLivePreviewComponent {
747
873
  self = inject(ElementRef);
748
874
  http = inject(HttpClient);
749
875
  localeApi = inject(SiLivePreviewLocaleApi, { optional: true });
876
+ state = inject(LivePreviewStateService);
750
877
  templateElem = viewChild.required('codeTemplate', /* @ts-ignore */
751
878
  ...(ngDevMode ? [{ debugName: "templateElem" }] : /* istanbul ignore next */ []));
752
879
  typescriptElem = viewChild.required('codeTypescript', /* @ts-ignore */
@@ -755,67 +882,29 @@ class SiLivePreviewComponent {
755
882
  ...(ngDevMode ? [{ debugName: "reactVueElem" }] : /* istanbul ignore next */ []));
756
883
  consoleElem = viewChild.required('consoleContainer', /* @ts-ignore */
757
884
  ...(ngDevMode ? [{ debugName: "consoleElem" }] : /* istanbul ignore next */ []));
758
- baseUrl = input.required(/* @ts-ignore */
759
- ...(ngDevMode ? [{ debugName: "baseUrl" }] : /* istanbul ignore next */ []));
760
- example = input(/* @ts-ignore */
761
- ...(ngDevMode ? [undefined, { debugName: "example" }] : /* istanbul ignore next */ []));
762
- template = model('', /* @ts-ignore */
763
- ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
764
- theme = model('light', /* @ts-ignore */
765
- ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
766
- locale = model(/* @ts-ignore */
767
- ...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
768
- isRTL = model(false, /* @ts-ignore */
769
- ...(ngDevMode ? [{ debugName: "isRTL" }] : /* istanbul ignore next */ []));
770
- ticketBaseUrl = input('', /* @ts-ignore */
771
- ...(ngDevMode ? [{ debugName: "ticketBaseUrl" }] : /* istanbul ignore next */ []));
772
- templateReact = model('', /* @ts-ignore */
773
- ...(ngDevMode ? [{ debugName: "templateReact" }] : /* istanbul ignore next */ []));
774
- templateVue = model('', /* @ts-ignore */
775
- ...(ngDevMode ? [{ debugName: "templateVue" }] : /* istanbul ignore next */ []));
776
- templateJs = model('', /* @ts-ignore */
777
- ...(ngDevMode ? [{ debugName: "templateJs" }] : /* istanbul ignore next */ []));
885
+ baseUrl = this.config.examplesBaseUrl;
778
886
  isFullscreen = signal(false, /* @ts-ignore */
779
887
  ...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
780
888
  isMobile = this.internalConfig.isMobile;
781
889
  templateTs = '';
782
- renderingError = signal(null, /* @ts-ignore */
783
- ...(ngDevMode ? [{ debugName: "renderingError" }] : /* istanbul ignore next */ []));
784
- logMessages = signal([], /* @ts-ignore */
785
- ...(ngDevMode ? [{ debugName: "logMessages" }] : /* istanbul ignore next */ []));
786
890
  activeTab = signal('template', /* @ts-ignore */
787
891
  ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
788
892
  showCopied = signal(false, /* @ts-ignore */
789
893
  ...(ngDevMode ? [{ debugName: "showCopied" }] : /* istanbul ignore next */ []));
790
- inProgress = signal(false, /* @ts-ignore */
791
- ...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
792
894
  allowFullscreen = !!document.fullscreenEnabled || !!document.webkitFullscreenEnabled;
793
895
  exampleFullscreen = signal(false, /* @ts-ignore */
794
896
  ...(ngDevMode ? [{ debugName: "exampleFullscreen" }] : /* istanbul ignore next */ []));
795
897
  allowCopy = !!navigator.clipboard;
796
- loadReact = signal(false, /* @ts-ignore */
797
- ...(ngDevMode ? [{ debugName: "loadReact" }] : /* istanbul ignore next */ []));
798
- loadVue = signal(false, /* @ts-ignore */
799
- ...(ngDevMode ? [{ debugName: "loadVue" }] : /* istanbul ignore next */ []));
800
- loadJs = signal(false, /* @ts-ignore */
801
- ...(ngDevMode ? [{ debugName: "loadJs" }] : /* istanbul ignore next */ []));
802
898
  switcherEnabled = this.config.themeSwitcher;
803
899
  rtlSwitcher = this.config.rtlSwitcher;
804
900
  rootFontSizes = this.config.rootFontSizes ?? [];
805
- rootFontSize = signal(0, /* @ts-ignore */
806
- ...(ngDevMode ? [{ debugName: "rootFontSize" }] : /* istanbul ignore next */ []));
807
901
  webcomponents = this.config.webcomponents;
808
902
  frameworks = new Map([['Angular', 'angular']]);
809
- selectedFramework = localStorage.getItem('si-live-preview-framework') ?? 'angular';
810
903
  availableLocales = this.localeApi?.availableLocales() ?? [];
811
- ticketLinkBug;
812
- ticketLinkFeature;
813
904
  editorCollapsed = signal(localStorage.getItem('si-live-preview-editor-collapsed') === 'true' && !this.isMobile, /* @ts-ignore */
814
905
  ...(ngDevMode ? [{ debugName: "editorCollapsed" }] : /* istanbul ignore next */ []));
815
906
  showEditor = signal(!this.editorCollapsed(), /* @ts-ignore */
816
907
  ...(ngDevMode ? [{ debugName: "showEditor" }] : /* istanbul ignore next */ []));
817
- newMsgs = signal(false, /* @ts-ignore */
818
- ...(ngDevMode ? [{ debugName: "newMsgs" }] : /* istanbul ignore next */ []));
819
908
  compileSubject = new Subject();
820
909
  templateModified = false;
821
910
  skipInitialLoad = false;
@@ -823,56 +912,64 @@ class SiLivePreviewComponent {
823
912
  flaskTypescript;
824
913
  flaskReactVue;
825
914
  savedScrollPos = { top: 0, left: 0 };
826
- inProgressCounter = 0;
827
915
  tsLoaded = false;
828
916
  reactLoaded = false;
829
917
  vueLoaded = false;
830
918
  jsLoaded = false;
831
- delayClearTimer;
832
919
  webcomponentsList = [];
833
920
  constructor() {
921
+ const storedFramework = localStorage.getItem('si-live-preview-framework');
922
+ if (storedFramework === 'react' || storedFramework === 'vue' || storedFramework === 'js') {
923
+ this.state.framework.set(storedFramework);
924
+ }
834
925
  this.compileSubject
835
926
  .pipe(throttleTime(500, undefined, { leading: true, trailing: true }))
836
927
  .pipe(takeUntilDestroyed())
837
928
  .subscribe(template => {
838
- this.template.set(template);
929
+ this.state.template.set(template);
839
930
  });
840
931
  this.webcomponentsList = this.config.componentLoader.webcomponentsList;
841
- }
842
- ngOnChanges(changes) {
843
- this.activeTab.set(this.activeTab() !== 'typescript' ? 'template' : this.activeTab());
844
- if (changes.template?.currentValue) {
845
- this.skipInitialLoad = !!changes.template.isFirstChange;
846
- this.templateModified = true;
847
- this.templateReact.set('');
848
- this.templateVue.set('');
849
- this.templateJs.set('');
850
- }
851
- else {
852
- this.skipInitialLoad = !!(changes.templateReact?.currentValue ??
853
- changes.templateVue?.currentValue ??
854
- changes.templateJs?.currentValue);
855
- }
856
- if (changes.example?.currentValue) {
857
- this.loadFromUrl(changes.example.firstChange && this.skipInitialLoad);
858
- if (this.webcomponents) {
859
- this.checkWebComponentsAvailable();
932
+ let previousExample;
933
+ effect(() => {
934
+ const example = this.state.example();
935
+ if (!example || example === previousExample) {
936
+ return;
860
937
  }
861
- }
862
- if (this.webcomponents) {
863
- this.reactLoaded = false;
864
- this.vueLoaded = false;
865
- this.jsLoaded = false;
866
- this.loadReact.set(false);
867
- this.loadVue.set(false);
868
- this.loadJs.set(false);
869
- }
870
- this.createTicketLinks();
938
+ const firstLoad = previousExample === undefined;
939
+ previousExample = example;
940
+ untracked(() => {
941
+ this.activeTab.set(this.activeTab() !== 'typescript' ? 'template' : this.activeTab());
942
+ this.skipInitialLoad =
943
+ firstLoad &&
944
+ !!(this.state.template() ||
945
+ this.state.templateReact() ||
946
+ this.state.templateVue() ||
947
+ this.state.templateJs());
948
+ this.templateModified = !!this.state.template();
949
+ this.loadFromUrl(this.skipInitialLoad);
950
+ if (this.webcomponents) {
951
+ this.reactLoaded = false;
952
+ this.vueLoaded = false;
953
+ this.jsLoaded = false;
954
+ this.state.stopWebComponentLoading();
955
+ this.checkWebComponentsAvailable();
956
+ }
957
+ });
958
+ });
959
+ effect(() => localStorage.setItem('si-live-preview-theme', this.state.theme()));
960
+ effect(() => {
961
+ if (this.state.logMessages().length) {
962
+ setTimeout(() => {
963
+ this.consoleElem().nativeElement.scrollTop =
964
+ this.consoleElem().nativeElement.scrollHeight;
965
+ });
966
+ }
967
+ });
871
968
  }
872
969
  ngOnInit() {
873
- this.theme.set(localStorage.getItem('si-live-preview-theme') ?? 'light');
970
+ this.state.theme.set(localStorage.getItem('si-live-preview-theme') === 'dark' ? 'dark' : 'light');
874
971
  const rfs = localStorage.getItem('si-live-preview-rfs') ?? '';
875
- this.rootFontSize.set(rfs === 'initial' ? rfs : rfs ? parseInt(rfs, 10) : 0);
972
+ this.state.rootFontSize.set(rfs === 'initial' ? rfs : rfs ? parseInt(rfs, 10) : 0);
876
973
  }
877
974
  ngAfterViewInit() {
878
975
  this.flaskTemplate = new CodeFlask(this.templateElem().nativeElement, {
@@ -900,41 +997,41 @@ class SiLivePreviewComponent {
900
997
  areaId: 'reactVueEditor'
901
998
  });
902
999
  this.flaskTemplate.onUpdate((code) => {
903
- if (code !== this.template()) {
1000
+ if (code !== this.state.template()) {
904
1001
  this.templateModified = true;
905
1002
  }
906
1003
  this.compileSubject.next(code);
907
1004
  });
908
1005
  this.flaskReactVue.onUpdate((code) => {
909
1006
  if (this.activeTab() === 'react') {
910
- this.templateReact.set(code);
911
- this.loadReact.set(true);
1007
+ this.state.templateReact.set(code);
1008
+ this.state.loadReact.set(true);
912
1009
  }
913
1010
  else if (this.activeTab() === 'vue') {
914
- this.templateVue.set(code);
915
- this.loadVue.set(true);
1011
+ this.state.templateVue.set(code);
1012
+ this.state.loadVue.set(true);
916
1013
  }
917
1014
  else if (this.activeTab() === 'js') {
918
- this.templateJs.set(code);
919
- this.loadJs.set(true);
1015
+ this.state.templateJs.set(code);
1016
+ this.state.loadJs.set(true);
920
1017
  }
921
1018
  });
922
1019
  if (this.skipInitialLoad) {
923
- if (this.templateReact()) {
1020
+ if (this.state.templateReact()) {
924
1021
  this.reactLoaded = true;
925
1022
  this.changeFramework('react');
926
1023
  }
927
- else if (this.templateVue()) {
1024
+ else if (this.state.templateVue()) {
928
1025
  this.vueLoaded = true;
929
1026
  this.changeFramework('vue');
930
1027
  }
931
- else if (this.templateJs()) {
1028
+ else if (this.state.templateJs()) {
932
1029
  this.jsLoaded = true;
933
1030
  this.changeFramework('js');
934
1031
  }
935
1032
  else {
936
- this.flaskTemplate.updateCode(this.template());
937
- this.compileSubject.next(this.template());
1033
+ this.flaskTemplate.updateCode(this.state.template());
1034
+ this.compileSubject.next(this.state.template());
938
1035
  }
939
1036
  this.skipInitialLoad = false;
940
1037
  }
@@ -943,9 +1040,9 @@ class SiLivePreviewComponent {
943
1040
  this.activeTab.set(tab);
944
1041
  let saveScroll;
945
1042
  let restoreScroll;
946
- this.loadReact.set(false);
947
- this.loadVue.set(false);
948
- this.loadJs.set(false);
1043
+ this.state.loadReact.set(false);
1044
+ this.state.loadVue.set(false);
1045
+ this.state.loadJs.set(false);
949
1046
  if (tab === 'template') {
950
1047
  saveScroll = this.typescriptElem();
951
1048
  restoreScroll = this.templateElem();
@@ -967,14 +1064,14 @@ class SiLivePreviewComponent {
967
1064
  });
968
1065
  }
969
1066
  themeChange(theme) {
970
- this.theme.set(theme);
971
- localStorage.setItem('si-live-preview-theme', this.theme());
1067
+ this.state.theme.set(theme);
1068
+ localStorage.setItem('si-live-preview-theme', this.state.theme());
972
1069
  }
973
1070
  updateTemplate(template) {
974
1071
  this.templateModified = false;
975
- this.template.set(template);
1072
+ this.state.template.set(template);
976
1073
  if (this.flaskTemplate) {
977
- this.flaskTemplate.updateCode(this.template());
1074
+ this.flaskTemplate.updateCode(this.state.template());
978
1075
  }
979
1076
  }
980
1077
  updateTs(ts) {
@@ -984,24 +1081,24 @@ class SiLivePreviewComponent {
984
1081
  }
985
1082
  }
986
1083
  updateReact(ts) {
987
- this.templateReact.set(ts);
1084
+ this.state.templateReact.set(ts);
988
1085
  if (this.flaskReactVue) {
989
- this.flaskReactVue.updateCode(this.templateReact());
990
- this.loadReact.set(true);
1086
+ this.flaskReactVue.updateCode(this.state.templateReact());
1087
+ this.state.loadReact.set(true);
991
1088
  }
992
1089
  }
993
1090
  updateVue(ts) {
994
- this.templateVue.set(ts);
1091
+ this.state.templateVue.set(ts);
995
1092
  if (this.flaskReactVue) {
996
- this.flaskReactVue.updateCode(this.templateVue());
997
- this.loadVue.set(true);
1093
+ this.flaskReactVue.updateCode(this.state.templateVue());
1094
+ this.state.loadVue.set(true);
998
1095
  }
999
1096
  }
1000
1097
  updateJs(js) {
1001
- this.templateJs.set(js);
1098
+ this.state.templateJs.set(js);
1002
1099
  if (this.flaskReactVue) {
1003
- this.flaskReactVue.updateCode(this.templateJs());
1004
- this.loadJs.set(true);
1100
+ this.flaskReactVue.updateCode(this.state.templateJs());
1101
+ this.state.loadJs.set(true);
1005
1102
  }
1006
1103
  }
1007
1104
  loadFromUrl(skipTemplate) {
@@ -1010,21 +1107,20 @@ class SiLivePreviewComponent {
1010
1107
  }
1011
1108
  this.updateTs('');
1012
1109
  this.savedScrollPos = { top: 0, left: 0 };
1013
- this.inProgressCounter = 0;
1014
- this.inProgress.set(false);
1110
+ this.state.resetRenderingProgress();
1015
1111
  this.tsLoaded = false;
1016
1112
  if (this.activeTab() === 'typescript') {
1017
1113
  this.loadTsFromUrl();
1018
1114
  }
1019
1115
  }
1020
1116
  loadTemplateFromUrl() {
1021
- const example = this.example();
1117
+ const example = this.state.example();
1022
1118
  if (!example) {
1023
1119
  return;
1024
1120
  }
1025
1121
  this.handleInProgressEvent(true);
1026
1122
  this.http
1027
- .get(this.baseUrl() + example + '.html', { responseType: 'text' })
1123
+ .get(this.baseUrl + example + '.html', { responseType: 'text' })
1028
1124
  .pipe(timeout(3000), retry(1))
1029
1125
  .subscribe({
1030
1126
  next: data => {
@@ -1039,13 +1135,13 @@ class SiLivePreviewComponent {
1039
1135
  });
1040
1136
  }
1041
1137
  loadTsFromUrl() {
1042
- const example = this.example();
1138
+ const example = this.state.example();
1043
1139
  if (!example) {
1044
1140
  return;
1045
1141
  }
1046
1142
  this.handleInProgressEvent(true);
1047
1143
  this.http
1048
- .get(this.baseUrl() + example + '.ts', { responseType: 'text' })
1144
+ .get(this.baseUrl + example + '.ts', { responseType: 'text' })
1049
1145
  .pipe(timeout(3000), retry(1))
1050
1146
  .subscribe({
1051
1147
  next: data => {
@@ -1062,14 +1158,14 @@ class SiLivePreviewComponent {
1062
1158
  });
1063
1159
  }
1064
1160
  checkWebComponentsAvailable() {
1065
- const baseUrl = this.baseUrl();
1066
- const example = this.example() ?? '';
1161
+ const baseUrl = this.baseUrl;
1162
+ const example = this.state.example() ?? '';
1067
1163
  if (this.webcomponentsList.includes(baseUrl + example + '-react')) {
1068
1164
  this.frameworks.set('React', 'react');
1069
1165
  }
1070
1166
  else {
1071
- if (this.selectedFramework === 'react') {
1072
- this.selectedFramework = 'angular';
1167
+ if (this.state.framework() === 'react') {
1168
+ this.state.framework.set('angular');
1073
1169
  }
1074
1170
  this.frameworks.delete('React');
1075
1171
  }
@@ -1077,8 +1173,8 @@ class SiLivePreviewComponent {
1077
1173
  this.frameworks.set('Vue', 'vue');
1078
1174
  }
1079
1175
  else {
1080
- if (this.selectedFramework === 'vue') {
1081
- this.selectedFramework = 'angular';
1176
+ if (this.state.framework() === 'vue') {
1177
+ this.state.framework.set('angular');
1082
1178
  }
1083
1179
  this.frameworks.delete('Vue');
1084
1180
  }
@@ -1086,19 +1182,20 @@ class SiLivePreviewComponent {
1086
1182
  this.frameworks.set('Js', 'js');
1087
1183
  }
1088
1184
  else {
1089
- if (this.selectedFramework === 'js') {
1090
- this.selectedFramework = 'angular';
1185
+ if (this.state.framework() === 'js') {
1186
+ this.state.framework.set('angular');
1091
1187
  }
1092
1188
  this.frameworks.delete('Js');
1093
1189
  }
1094
- this.changeFramework(this.selectedFramework);
1190
+ this.changeFramework(this.state.framework());
1095
1191
  }
1096
1192
  changeFramework(framework) {
1097
1193
  this.activeTab.set(framework);
1194
+ this.state.framework.set(framework);
1098
1195
  localStorage.setItem('si-live-preview-framework', framework);
1099
- this.loadReact.set(false);
1100
- this.loadVue.set(false);
1101
- this.loadJs.set(false);
1196
+ this.state.loadReact.set(false);
1197
+ this.state.loadVue.set(false);
1198
+ this.state.loadJs.set(false);
1102
1199
  let fileType = 'vue';
1103
1200
  if (framework === 'angular') {
1104
1201
  this.activeTab.set('template');
@@ -1107,41 +1204,41 @@ class SiLivePreviewComponent {
1107
1204
  else if (framework === 'react') {
1108
1205
  fileType = 'tsx';
1109
1206
  if (this.reactLoaded) {
1110
- this.updateReact(this.templateReact());
1207
+ this.updateReact(this.state.templateReact());
1111
1208
  return;
1112
1209
  }
1113
1210
  }
1114
1211
  else if (framework === 'vue' && this.vueLoaded) {
1115
- this.updateVue(this.templateVue());
1212
+ this.updateVue(this.state.templateVue());
1116
1213
  return;
1117
1214
  }
1118
1215
  else if (framework === 'js') {
1119
1216
  fileType = 'html';
1120
1217
  if (this.jsLoaded) {
1121
- this.updateJs(this.templateJs());
1218
+ this.updateJs(this.state.templateJs());
1122
1219
  return;
1123
1220
  }
1124
1221
  }
1125
1222
  this.handleInProgressEvent(true);
1126
- const baseUrl = this.baseUrl();
1127
- const example = this.example() ?? '';
1223
+ const baseUrl = this.baseUrl;
1224
+ const example = this.state.example() ?? '';
1128
1225
  this.http
1129
1226
  .get(`${baseUrl}${example}-${framework}.${fileType}`, { responseType: 'text' })
1130
1227
  .subscribe({
1131
1228
  next: (res) => {
1132
1229
  if (framework === 'react') {
1133
1230
  this.updateReact(res);
1134
- this.templateReact.set(res);
1231
+ this.state.templateReact.set(res);
1135
1232
  this.reactLoaded = true;
1136
1233
  }
1137
1234
  else if (framework === 'vue') {
1138
1235
  this.updateVue(res);
1139
- this.templateVue.set(res);
1236
+ this.state.templateVue.set(res);
1140
1237
  this.vueLoaded = true;
1141
1238
  }
1142
1239
  else if (framework === 'js') {
1143
1240
  this.updateJs(res);
1144
- this.templateJs.set(res);
1241
+ this.state.templateJs.set(res);
1145
1242
  this.jsLoaded = true;
1146
1243
  }
1147
1244
  setTimeout(() => {
@@ -1166,7 +1263,7 @@ class SiLivePreviewComponent {
1166
1263
  });
1167
1264
  }
1168
1265
  templateFromComponent(template) {
1169
- if (this.template()) {
1266
+ if (this.state.template()) {
1170
1267
  return;
1171
1268
  }
1172
1269
  if (template === undefined) {
@@ -1179,43 +1276,18 @@ class SiLivePreviewComponent {
1179
1276
  }
1180
1277
  }
1181
1278
  handleInProgressEvent(inProgress) {
1182
- if (inProgress) {
1183
- this.inProgressCounter++;
1184
- }
1185
- else {
1186
- this.inProgressCounter--;
1187
- }
1188
- this.inProgress.set(!!this.inProgressCounter);
1279
+ this.state.setRenderingProgress(inProgress);
1189
1280
  }
1190
1281
  logClear(delayed = false) {
1191
- if (delayed && this.logMessages().length) {
1192
- this.delayClearTimer = setTimeout(() => {
1193
- this.delayClearTimer = undefined;
1194
- this.doLogClear();
1195
- }, 100);
1196
- return;
1197
- }
1198
- this.doLogClear();
1199
- }
1200
- doLogClear() {
1201
- if (this.logMessages().length) {
1202
- this.logMessages.set([]);
1282
+ if (this.state.logMessages().length) {
1283
+ this.state.clearLogs(delayed);
1203
1284
  setTimeout(() => {
1204
1285
  this.consoleElem().nativeElement.scrollTop = 0;
1205
- });
1286
+ }, delayed ? 100 : 0);
1206
1287
  }
1207
1288
  }
1208
1289
  logEvent(msg) {
1209
- if (this.delayClearTimer) {
1210
- this.logMessages.set([]);
1211
- clearTimeout(this.delayClearTimer);
1212
- this.delayClearTimer = undefined;
1213
- }
1214
- this.logMessages.set([...this.logMessages(), msg]);
1215
- this.newMsgs.set(true);
1216
- setTimeout(() => {
1217
- this.consoleElem().nativeElement.scrollTop = this.consoleElem().nativeElement.scrollHeight;
1218
- });
1290
+ this.state.addLog(msg);
1219
1291
  }
1220
1292
  showCopiedLabel() {
1221
1293
  this.showCopied.set(true);
@@ -1252,40 +1324,43 @@ class SiLivePreviewComponent {
1252
1324
  else {
1253
1325
  setTimeout(() => {
1254
1326
  this.showEditor.set(true);
1255
- this.newMsgs.set(false);
1327
+ this.state.newMessages.set(false);
1256
1328
  window.dispatchEvent(new Event('resize'));
1257
1329
  }, 500);
1258
1330
  }
1259
1331
  }
1260
1332
  toggleRTL() {
1261
- this.isRTL.set(!this.isRTL());
1333
+ this.state.isRTL.set(!this.state.isRTL());
1262
1334
  }
1263
1335
  toggleTheme() {
1264
- this.themeChange(this.theme() === 'dark' ? 'light' : 'dark');
1336
+ this.themeChange(this.state.theme() === 'dark' ? 'light' : 'dark');
1265
1337
  }
1266
1338
  localeSelectionChanged(target) {
1267
1339
  const locale = target?.value;
1268
1340
  this.changeLocale(locale);
1269
1341
  }
1270
1342
  rfsSelectionChanges(value) {
1271
- this.rootFontSize.set(value === 'initial' ? value : parseInt(value, 10));
1272
- localStorage.setItem('si-live-preview-rfs', this.rootFontSize().toString());
1343
+ this.state.rootFontSize.set(value === 'initial' ? value : parseInt(value, 10));
1344
+ localStorage.setItem('si-live-preview-rfs', this.state.rootFontSize().toString());
1273
1345
  }
1274
1346
  changeLocale(locale) {
1275
- this.locale.set(locale);
1347
+ this.state.locale.set(locale ?? undefined);
1348
+ }
1349
+ renderingErrorMessage() {
1350
+ return String(this.state.renderingError());
1276
1351
  }
1277
1352
  copyTemplate() {
1278
- this.clipboardCopy(this.template());
1353
+ this.clipboardCopy(this.state.template());
1279
1354
  }
1280
1355
  copyCode() {
1281
1356
  if (this.activeTab() === 'react') {
1282
- this.clipboardCopy(this.templateReact());
1357
+ this.clipboardCopy(this.state.templateReact());
1283
1358
  }
1284
1359
  else if (this.activeTab() === 'vue') {
1285
- this.clipboardCopy(this.templateVue());
1360
+ this.clipboardCopy(this.state.templateVue());
1286
1361
  }
1287
1362
  else if (this.activeTab() === 'js') {
1288
- this.clipboardCopy(this.templateJs());
1363
+ this.clipboardCopy(this.state.templateJs());
1289
1364
  }
1290
1365
  else {
1291
1366
  this.clipboardCopy(this.templateTs);
@@ -1304,44 +1379,38 @@ class SiLivePreviewComponent {
1304
1379
  window.open(url, '_blank');
1305
1380
  }
1306
1381
  createTemplateLink(mode) {
1307
- const locale = this.locale();
1382
+ const locale = this.state.locale();
1308
1383
  let url = `${window.location.protocol}//${window.location.host}`;
1309
1384
  url += window.location.pathname;
1310
1385
  url += `#/viewer/${mode}?`;
1311
- url += 'theme=' + this.theme();
1312
- if (this.isRTL()) {
1386
+ url += 'theme=' + this.state.theme();
1387
+ if (this.state.isRTL()) {
1313
1388
  url += '&isRTL=true';
1314
1389
  }
1315
1390
  if (locale) {
1316
1391
  url += '&locale=' + locale;
1317
1392
  }
1318
- if (this.rootFontSize()) {
1319
- url += '&rfs=' + this.rootFontSize();
1393
+ if (this.state.rootFontSize()) {
1394
+ url += '&rfs=' + this.state.rootFontSize();
1320
1395
  }
1321
1396
  if (this.activeTab() === 'react') {
1322
- url += '&t=' + encodeURIComponent(this.templateReact()) + '&framework=react';
1397
+ url += '&t=' + encodeURIComponent(this.state.templateReact()) + '&framework=react';
1323
1398
  }
1324
1399
  else if (this.activeTab() === 'vue') {
1325
- url += '&t=' + encodeURIComponent(this.templateVue()) + '&framework=vue';
1400
+ url += '&t=' + encodeURIComponent(this.state.templateVue()) + '&framework=vue';
1326
1401
  }
1327
1402
  else if (this.activeTab() === 'js') {
1328
- url += '&t=' + encodeURIComponent(this.templateJs()) + '&framework=js';
1403
+ url += '&t=' + encodeURIComponent(this.state.templateJs()) + '&framework=js';
1329
1404
  }
1330
1405
  else if (this.templateModified) {
1331
- url += '&t=' + encodeURIComponent(this.template());
1406
+ url += '&t=' + encodeURIComponent(this.state.template());
1332
1407
  }
1333
- const example = this.example();
1408
+ const example = this.state.example();
1334
1409
  if (example) {
1335
1410
  url += '&e=' + encodeURIComponent(example);
1336
1411
  }
1337
1412
  return url;
1338
1413
  }
1339
- createTicketLinks() {
1340
- const ticketBaseUrl = this.ticketBaseUrl();
1341
- const example = this.example() ?? '';
1342
- this.ticketLinkBug = `${ticketBaseUrl}?issue%5Btitle%5D=%3C${example}%3E:&issuable_template=Bug`;
1343
- this.ticketLinkFeature = `${ticketBaseUrl}?issue%5Btitle%5D=%3C${example}%3E:&issuable_template=Feature Request`;
1344
- }
1345
1414
  onFullscreenChange() {
1346
1415
  this.isFullscreen.set(!!document.fullscreenElement || !!document.webkitFullscreenElement);
1347
1416
  if (!this.isFullscreen()) {
@@ -1349,7 +1418,7 @@ class SiLivePreviewComponent {
1349
1418
  }
1350
1419
  }
1351
1420
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1352
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewComponent, isStandalone: true, selector: "si-live-preview", inputs: { baseUrl: { classPropertyName: "baseUrl", publicName: "baseUrl", isSignal: true, isRequired: true, transformFunction: null }, example: { classPropertyName: "example", publicName: "example", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", 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 }, isRTL: { classPropertyName: "isRTL", publicName: "isRTL", isSignal: true, isRequired: false, transformFunction: null }, ticketBaseUrl: { classPropertyName: "ticketBaseUrl", publicName: "ticketBaseUrl", isSignal: true, isRequired: false, transformFunction: null }, templateReact: { classPropertyName: "templateReact", publicName: "templateReact", isSignal: true, isRequired: false, transformFunction: null }, templateVue: { classPropertyName: "templateVue", publicName: "templateVue", isSignal: true, isRequired: false, transformFunction: null }, templateJs: { classPropertyName: "templateJs", publicName: "templateJs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { template: "templateChange", theme: "themeChange", locale: "localeChange", isRTL: "isRTLChange", templateReact: "templateReactChange", templateVue: "templateVueChange", templateJs: "templateJsChange" }, host: { listeners: { "document:fullscreenchange": "onFullscreenChange()", "document:webkitfullscreenchange": "onFullscreenChange()" }, properties: { "class.editor-fullscreen": "isFullscreen()", "class.is-mobile": "isMobile" } }, viewQueries: [{ propertyName: "templateElem", first: true, predicate: ["codeTemplate"], descendants: true, isSignal: true }, { propertyName: "typescriptElem", first: true, predicate: ["codeTypescript"], descendants: true, isSignal: true }, { propertyName: "reactVueElem", first: true, predicate: ["codeReactVue"], descendants: true, isSignal: true }, { propertyName: "consoleElem", first: true, predicate: ["consoleContainer"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [template]=\"template()\"\n [baseUrl]=\"baseUrl()\"\n [exampleUrl]=\"example() ?? ''\"\n [ticketLinkBug]=\"ticketLinkBug\"\n [ticketLinkFeature]=\"ticketLinkFeature\"\n [isFullscreen]=\"isFullscreen()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [rootFontSize]=\"rootFontSize()\"\n [isRTL]=\"isRTL()\"\n [loadReact]=\"loadReact()\"\n [loadVue]=\"loadVue()\"\n [loadJs]=\"loadJs()\"\n [reactVueTemplate]=\"\n active === 'react' ? templateReact() : active === 'vue' ? templateVue() : templateJs()\n \"\n (templateFromComponent)=\"templateFromComponent($event)\"\n (logClear)=\"logClear(true)\"\n (logMessage)=\"logEvent($event)\"\n (logRenderingError)=\"renderingError.set($event)\"\n (inProgress)=\"handleInProgressEvent($event)\"\n (themeChange)=\"themeChange($event)\"\n (localeChange)=\"changeLocale($event)\"\n />\n @if (inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [(ngModel)]=\"selectedFramework\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"selectedFramework === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [(ngModel)]=\"rootFontSize\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile && !showEditor() && (renderingError() || (logMessages().length && newMsgs()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"renderingError()\"\n [class.info]=\"logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\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 @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl()\"\n [framework]=\"selectedFramework\"\n [example]=\"example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!renderingError() && !logMessages().length\">\n <div class=\"buttons\">\n @if (logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (renderingError()) {\n <pre\n class=\"alert-danger\"\n ><code class=\"bg-none\">{{ renderingError().toString() }}</code></pre>\n }\n @if (!renderingError() && logMessages().length) {\n <ul>\n @for (msg of logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\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: SiLivePreviewIframeComponent, selector: "si-live-preview-iframe", inputs: ["baseUrl", "exampleUrl", "template", "ticketLinkBug", "ticketLinkFeature", "isFullscreen", "iFrameHeight", "iFrameWidth", "theme", "locale", "rootFontSize", "isRTL", "loadReact", "loadVue", "loadJs", "reactVueTemplate"], outputs: ["themeChange", "localeChange", "templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress"] }, { kind: "directive", type: SiStackblitzButtonDirective, selector: "button[siStackblitz]", inputs: ["framework", "baseUrl", "example"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1421
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewComponent, isStandalone: true, selector: "si-live-preview", host: { listeners: { "document:fullscreenchange": "onFullscreenChange()", "document:webkitfullscreenchange": "onFullscreenChange()" }, properties: { "class.editor-fullscreen": "isFullscreen()", "class.is-mobile": "isMobile" } }, viewQueries: [{ propertyName: "templateElem", first: true, predicate: ["codeTemplate"], descendants: true, isSignal: true }, { propertyName: "typescriptElem", first: true, predicate: ["codeTypescript"], descendants: true, isSignal: true }, { propertyName: "reactVueElem", first: true, predicate: ["codeReactVue"], descendants: true, isSignal: true }, { propertyName: "consoleElem", first: true, predicate: ["consoleContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.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 @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\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: SiLivePreviewIframeComponent, selector: "si-live-preview-iframe", inputs: ["isFullscreen"], outputs: ["templateFromComponent"] }, { kind: "directive", type: SiStackblitzButtonDirective, selector: "button[siStackblitz]", inputs: ["framework", "baseUrl", "example"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1353
1422
  }
1354
1423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewComponent, decorators: [{
1355
1424
  type: Component,
@@ -1358,8 +1427,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1358
1427
  '[class.is-mobile]': 'isMobile',
1359
1428
  '(document:fullscreenchange)': 'onFullscreenChange()',
1360
1429
  '(document:webkitfullscreenchange)': 'onFullscreenChange()'
1361
- }, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [template]=\"template()\"\n [baseUrl]=\"baseUrl()\"\n [exampleUrl]=\"example() ?? ''\"\n [ticketLinkBug]=\"ticketLinkBug\"\n [ticketLinkFeature]=\"ticketLinkFeature\"\n [isFullscreen]=\"isFullscreen()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [rootFontSize]=\"rootFontSize()\"\n [isRTL]=\"isRTL()\"\n [loadReact]=\"loadReact()\"\n [loadVue]=\"loadVue()\"\n [loadJs]=\"loadJs()\"\n [reactVueTemplate]=\"\n active === 'react' ? templateReact() : active === 'vue' ? templateVue() : templateJs()\n \"\n (templateFromComponent)=\"templateFromComponent($event)\"\n (logClear)=\"logClear(true)\"\n (logMessage)=\"logEvent($event)\"\n (logRenderingError)=\"renderingError.set($event)\"\n (inProgress)=\"handleInProgressEvent($event)\"\n (themeChange)=\"themeChange($event)\"\n (localeChange)=\"changeLocale($event)\"\n />\n @if (inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [(ngModel)]=\"selectedFramework\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"selectedFramework === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [(ngModel)]=\"rootFontSize\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile && !showEditor() && (renderingError() || (logMessages().length && newMsgs()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"renderingError()\"\n [class.info]=\"logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\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 @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl()\"\n [framework]=\"selectedFramework\"\n [example]=\"example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!renderingError() && !logMessages().length\">\n <div class=\"buttons\">\n @if (logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (renderingError()) {\n <pre\n class=\"alert-danger\"\n ><code class=\"bg-none\">{{ renderingError().toString() }}</code></pre>\n }\n @if (!renderingError() && logMessages().length) {\n <ul>\n @for (msg of logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"] }]
1362
- }], ctorParameters: () => [], propDecorators: { templateElem: [{ type: i0.ViewChild, args: ['codeTemplate', { isSignal: true }] }], typescriptElem: [{ type: i0.ViewChild, args: ['codeTypescript', { isSignal: true }] }], reactVueElem: [{ type: i0.ViewChild, args: ['codeReactVue', { isSignal: true }] }], consoleElem: [{ type: i0.ViewChild, args: ['consoleContainer', { isSignal: true }] }], baseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseUrl", required: true }] }], example: [{ type: i0.Input, args: [{ isSignal: true, alias: "example", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }, { type: i0.Output, args: ["templateChange"] }], 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"] }], isRTL: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRTL", required: false }] }, { type: i0.Output, args: ["isRTLChange"] }], ticketBaseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "ticketBaseUrl", required: false }] }], templateReact: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateReact", required: false }] }, { type: i0.Output, args: ["templateReactChange"] }], templateVue: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateVue", required: false }] }, { type: i0.Output, args: ["templateVueChange"] }], templateJs: [{ type: i0.Input, args: [{ isSignal: true, alias: "templateJs", required: false }] }, { type: i0.Output, args: ["templateJsChange"] }] } });
1430
+ }, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.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 @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"] }]
1431
+ }], ctorParameters: () => [], propDecorators: { templateElem: [{ type: i0.ViewChild, args: ['codeTemplate', { isSignal: true }] }], typescriptElem: [{ type: i0.ViewChild, args: ['codeTypescript', { isSignal: true }] }], reactVueElem: [{ type: i0.ViewChild, args: ['codeReactVue', { isSignal: true }] }], consoleElem: [{ type: i0.ViewChild, args: ['consoleContainer', { isSignal: true }] }] } });
1363
1432
 
1364
1433
  /**
1365
1434
  * Copyright (c) Siemens 2016 - 2026
@@ -1375,10 +1444,8 @@ class SiExampleOverviewComponent {
1375
1444
  darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
1376
1445
  mediaQueryListener = () => this.toggleDark(this.darkMediaQuery.matches);
1377
1446
  cdRef = inject(ChangeDetectorRef);
1378
- activeExampleRoute;
1379
1447
  tree = [];
1380
1448
  baseUrl = this.config.examplesBaseUrl;
1381
- ticketBaseUrl = this.config.ticketBaseUrl;
1382
1449
  isCollapsed = localStorage.getItem('si-live-preview-examples-collapsed') === 'true';
1383
1450
  showContent = !this.isCollapsed;
1384
1451
  searchControl = new UntypedFormControl();
@@ -1388,7 +1455,6 @@ class SiExampleOverviewComponent {
1388
1455
  .sort()
1389
1456
  .map(component => component.replace(this.baseUrl, ''));
1390
1457
  this.makeTree();
1391
- this.activeExampleRoute = this.route.url.pipe(filter(segments => !!segments.length), map(segments => segments.join('/')));
1392
1458
  // Handle the filter query parameter
1393
1459
  this.route.queryParams.subscribe(search => {
1394
1460
  this.makeTree(search.q);
@@ -1452,11 +1518,11 @@ class SiExampleOverviewComponent {
1452
1518
  this.searchControl.reset();
1453
1519
  }
1454
1520
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleOverviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1455
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleOverviewComponent, isStandalone: true, selector: "si-example-overview", ngImport: i0, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview\n [ticketBaseUrl]=\"ticketBaseUrl\"\n [baseUrl]=\"baseUrl\"\n [example]=\"activeExampleRoute | async\"\n />\n</main>\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:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview", inputs: ["baseUrl", "example", "template", "theme", "locale", "isRTL", "ticketBaseUrl", "templateReact", "templateVue", "templateJs"], outputs: ["templateChange", "themeChange", "localeChange", "isRTLChange", "templateReactChange", "templateVueChange", "templateJsChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1521
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleOverviewComponent, isStandalone: true, selector: "si-example-overview", ngImport: i0, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\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:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1456
1522
  }
1457
1523
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleOverviewComponent, decorators: [{
1458
1524
  type: Component,
1459
- args: [{ selector: 'si-example-overview', imports: [AsyncPipe, ReactiveFormsModule, RouterLink, RouterLinkActive, SiLivePreviewComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview\n [ticketBaseUrl]=\"ticketBaseUrl\"\n [baseUrl]=\"baseUrl\"\n [example]=\"activeExampleRoute | async\"\n />\n</main>\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:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"] }]
1525
+ args: [{ selector: 'si-example-overview', imports: [ReactiveFormsModule, RouterLink, RouterLinkActive, SiLivePreviewComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\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:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"] }]
1460
1526
  }] });
1461
1527
 
1462
1528
  const setDeviceMode = (mode) => {
@@ -1613,12 +1679,23 @@ DummyAppSampleComponent = __decorate([
1613
1679
  class SiLivePreviewRendererComponent {
1614
1680
  renderedExample = viewChild.required('renderedExample', { ...(ngDevMode ? { debugName: "renderedExample" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
1615
1681
  react = viewChild.required('react', { ...(ngDevMode ? { debugName: "react" } : /* istanbul ignore next */ {}), read: ElementRef });
1616
- exampleUrl = input.required(/* @ts-ignore */
1682
+ state = inject(LivePreviewStateService);
1683
+ config = inject(SI_LIVE_PREVIEW_CONFIG);
1684
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1685
+ compiler = inject(Compiler);
1686
+ injector = Injector.create({
1687
+ parent: inject(Injector),
1688
+ providers: [
1689
+ {
1690
+ provide: LOG_EVENT,
1691
+ useValue: (...msg) => this.logMessage.emit(this.stringifyLog(msg))
1692
+ }
1693
+ ]
1694
+ });
1695
+ rendererFactory = inject(_DomRendererFactory2);
1696
+ cdRef = inject(ChangeDetectorRef);
1697
+ exampleUrl = computed(() => this.config.examplesBaseUrl + this.state.example(), /* @ts-ignore */
1617
1698
  ...(ngDevMode ? [{ debugName: "exampleUrl" }] : /* istanbul ignore next */ []));
1618
- dataId = input('', /* @ts-ignore */
1619
- ...(ngDevMode ? [{ debugName: "dataId" }] : /* istanbul ignore next */ []));
1620
- template = input('', /* @ts-ignore */
1621
- ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
1622
1699
  renderingDone = signal(false, /* @ts-ignore */
1623
1700
  ...(ngDevMode ? [{ debugName: "renderingDone" }] : /* istanbul ignore next */ []));
1624
1701
  templateFromComponent = output();
@@ -1634,20 +1711,6 @@ class SiLivePreviewRendererComponent {
1634
1711
  dynamicComponentId;
1635
1712
  componentTsFirstLoad = true;
1636
1713
  compiledTemplate;
1637
- // eslint-disable-next-line @typescript-eslint/no-deprecated
1638
- compiler = inject(Compiler);
1639
- injector = Injector.create({
1640
- parent: inject(Injector),
1641
- providers: [
1642
- {
1643
- provide: LOG_EVENT,
1644
- useValue: (...msg) => this.logMessage.emit(this.stringifyLog(msg))
1645
- }
1646
- ]
1647
- });
1648
- rendererFactory = inject(_DomRendererFactory2);
1649
- config = inject(SI_LIVE_PREVIEW_CONFIG);
1650
- cdRef = inject(ChangeDetectorRef);
1651
1714
  constructor() {
1652
1715
  effect(() => {
1653
1716
  const url = this.exampleUrl();
@@ -1656,8 +1719,8 @@ class SiLivePreviewRendererComponent {
1656
1719
  }
1657
1720
  });
1658
1721
  effect(() => {
1659
- const template = this.template();
1660
- // when the initial template is pushed from the renderer to the editor, this.template is
1722
+ const template = this.state.template();
1723
+ // when the initial template is pushed from the renderer to the editor, this.state.template is
1661
1724
  // initially empty, but later changes to what the renderer has pushed out. In this case
1662
1725
  // don't compile
1663
1726
  if (template && template !== this.compiledTemplate) {
@@ -1710,7 +1773,7 @@ class SiLivePreviewRendererComponent {
1710
1773
  this.componentTsSampleComponent = m.SampleComponent;
1711
1774
  this.dynamicComponent = m.SampleComponent;
1712
1775
  this.compileWhenReady();
1713
- if (!this.componentTsSampleComponent && !this.template()) {
1776
+ if (!this.componentTsSampleComponent && !this.state.template()) {
1714
1777
  afterNextRender(() => {
1715
1778
  this.setInProgress(false);
1716
1779
  this.cdRef.markForCheck();
@@ -1743,12 +1806,12 @@ class SiLivePreviewRendererComponent {
1743
1806
  // TS, but code not yet loaded
1744
1807
  return;
1745
1808
  }
1746
- if (!this.componentTsFirstLoad && !this.template()) {
1809
+ if (!this.componentTsFirstLoad && !this.state.template()) {
1747
1810
  // TS, first load done, template not yet available
1748
1811
  return;
1749
1812
  }
1750
1813
  }
1751
- else if (!this.template()) {
1814
+ else if (!this.state.template()) {
1752
1815
  // no TS, no template
1753
1816
  return;
1754
1817
  }
@@ -1789,17 +1852,17 @@ class SiLivePreviewRendererComponent {
1789
1852
  if (ann) {
1790
1853
  const supportsLandscape = ann.providers?.includes(LandscapeSupportService);
1791
1854
  this.supportsLandscapeMode.emit(supportsLandscape);
1792
- if (this.componentTsFirstLoad && !this.template()) {
1855
+ if (this.componentTsFirstLoad && !this.state.template()) {
1793
1856
  // skipping compile on first load
1794
1857
  this.compiledTemplate = ann.template;
1795
1858
  this.templateFromComponent.emit(ann.template);
1796
1859
  }
1797
- else if (ann.template !== this.template()) {
1860
+ else if (ann.template !== this.state.template()) {
1798
1861
  // recompile with new template
1799
1862
  this.componentTsFirstLoad = false;
1800
1863
  this.cloneComponentWithoutIvyStuff();
1801
- ann.template = this.template();
1802
- this.compiledTemplate = this.template();
1864
+ ann.template = this.state.template();
1865
+ this.compiledTemplate = this.state.template();
1803
1866
  _compileComponent(this.dynamicComponent, ann);
1804
1867
  this.reuseResolvedScopeOfOriginalComponent();
1805
1868
  }
@@ -1903,7 +1966,7 @@ class SiLivePreviewRendererComponent {
1903
1966
  });
1904
1967
  }
1905
1968
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1906
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewRendererComponent, isStandalone: true, selector: "si-live-preview-renderer", inputs: { exampleUrl: { classPropertyName: "exampleUrl", publicName: "exampleUrl", isSignal: true, isRequired: true, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { templateFromComponent: "templateFromComponent", logClear: "logClear", logMessage: "logMessage", logRenderingError: "logRenderingError", inProgress: "inProgress", supportsLandscapeMode: "supportsLandscapeMode" }, host: { properties: { "class.live-preview-done": "renderingDone()", "attr.data-example": "exampleUrl()", "attr.data-id": "dataId()" } }, viewQueries: [{ propertyName: "renderedExample", first: true, predicate: ["renderedExample"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "react", first: true, predicate: ["react"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: '<div #renderedExample></div><div #react id="app"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager });
1969
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewRendererComponent, isStandalone: true, selector: "si-live-preview-renderer", outputs: { templateFromComponent: "templateFromComponent", logClear: "logClear", logMessage: "logMessage", logRenderingError: "logRenderingError", inProgress: "inProgress", supportsLandscapeMode: "supportsLandscapeMode" }, host: { properties: { "class.live-preview-done": "renderingDone()", "attr.data-example": "exampleUrl()", "attr.data-id": "state.dataId()" } }, viewQueries: [{ propertyName: "renderedExample", first: true, predicate: ["renderedExample"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "react", first: true, predicate: ["react"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: '<div #renderedExample></div><div #react id="app"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager });
1907
1970
  }
1908
1971
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewRendererComponent, decorators: [{
1909
1972
  type: Component,
@@ -1914,10 +1977,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1914
1977
  host: {
1915
1978
  '[class.live-preview-done]': 'renderingDone()',
1916
1979
  '[attr.data-example]': 'exampleUrl()',
1917
- '[attr.data-id]': 'dataId()'
1980
+ '[attr.data-id]': 'state.dataId()'
1918
1981
  }
1919
1982
  }]
1920
- }], ctorParameters: () => [], propDecorators: { renderedExample: [{ type: i0.ViewChild, args: ['renderedExample', { ...{ read: ViewContainerRef }, isSignal: true }] }], react: [{ type: i0.ViewChild, args: ['react', { ...{ read: ElementRef }, isSignal: true }] }], exampleUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "exampleUrl", required: true }] }], dataId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataId", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", 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"] }], supportsLandscapeMode: [{ type: i0.Output, args: ["supportsLandscapeMode"] }] } });
1983
+ }], ctorParameters: () => [], propDecorators: { renderedExample: [{ type: i0.ViewChild, args: ['renderedExample', { ...{ read: ViewContainerRef }, isSignal: true }] }], react: [{ type: i0.ViewChild, args: ['react', { ...{ read: ElementRef }, isSignal: true }] }], 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"] }], supportsLandscapeMode: [{ type: i0.Output, args: ["supportsLandscapeMode"] }] } });
1921
1984
 
1922
1985
  /**
1923
1986
  * Copyright (c) Siemens 2016 - 2026
@@ -1926,34 +1989,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1926
1989
  class SiExampleViewerComponent {
1927
1990
  router = inject(Router);
1928
1991
  route = inject(ActivatedRoute);
1929
- config = inject(SI_LIVE_PREVIEW_CONFIG);
1930
1992
  internalConfig = inject(SI_LIVE_PREVIEW_INTERNALS);
1931
1993
  themeApi = inject(SiLivePreviewThemeApi, { optional: true });
1932
1994
  localeApi = inject(SiLivePreviewLocaleApi, { optional: true });
1995
+ state = inject(LivePreviewStateService);
1933
1996
  renderer = viewChild.required('renderer', /* @ts-ignore */
1934
1997
  ...(ngDevMode ? [{ debugName: "renderer" }] : /* istanbul ignore next */ []));
1935
- ticketBaseUrl = this.config.ticketBaseUrl;
1936
- baseUrl = this.config.examplesBaseUrl;
1937
- exampleUrl = signal('', /* @ts-ignore */
1938
- ...(ngDevMode ? [{ debugName: "exampleUrl" }] : /* istanbul ignore next */ []));
1939
- dataId = signal('', /* @ts-ignore */
1940
- ...(ngDevMode ? [{ debugName: "dataId" }] : /* istanbul ignore next */ []));
1941
1998
  mode = signal('viewer', /* @ts-ignore */
1942
1999
  ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
1943
- theme = signal('light', /* @ts-ignore */
1944
- ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
1945
- locale = signal('', /* @ts-ignore */
1946
- ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
1947
- isRTL = signal(false, /* @ts-ignore */
1948
- ...(ngDevMode ? [{ debugName: "isRTL" }] : /* istanbul ignore next */ []));
1949
- template = signal('', /* @ts-ignore */
1950
- ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
1951
- reactTemplate = signal('', /* @ts-ignore */
1952
- ...(ngDevMode ? [{ debugName: "reactTemplate" }] : /* istanbul ignore next */ []));
1953
- vueTemplate = signal('', /* @ts-ignore */
1954
- ...(ngDevMode ? [{ debugName: "vueTemplate" }] : /* istanbul ignore next */ []));
1955
- jsTemplate = signal('', /* @ts-ignore */
1956
- ...(ngDevMode ? [{ debugName: "jsTemplate" }] : /* istanbul ignore next */ []));
1957
2000
  tabs = signal([], /* @ts-ignore */
1958
2001
  ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
1959
2002
  hasTabs = computed(() => this.tabs().length > 1, /* @ts-ignore */
@@ -1971,10 +2014,12 @@ class SiExampleViewerComponent {
1971
2014
  let recompile = false;
1972
2015
  const base = params.base ? params.base + '/' : '';
1973
2016
  if (params.e) {
1974
- const prevUrl = this.exampleUrl();
2017
+ const prevUrl = this.state.example();
2018
+ const previousTemplate = this.state.template();
1975
2019
  this.tabs.set([]);
1976
2020
  this.activeTabIndex.set(0);
1977
- this.exampleUrl.set('');
2021
+ this.state.example.set('');
2022
+ this.state.clearTemplates();
1978
2023
  const examples = Array.isArray(params.e) ? params.e : [params.e];
1979
2024
  examples.forEach(element => {
1980
2025
  const parts = element.split(';');
@@ -1989,21 +2034,21 @@ class SiExampleViewerComponent {
1989
2034
  });
1990
2035
  if (this.tabs().length) {
1991
2036
  this.activateTab(0);
1992
- recompile = prevUrl === this.exampleUrl();
2037
+ recompile = prevUrl === this.state.example();
1993
2038
  }
1994
2039
  if (this.tabs().length <= 1 && params.t) {
1995
2040
  if (params.framework === 'react') {
1996
- this.reactTemplate.set(params.t);
2041
+ this.state.templateReact.set(params.t);
1997
2042
  }
1998
2043
  else if (params.framework === 'vue') {
1999
- this.vueTemplate.set(params.t);
2044
+ this.state.templateVue.set(params.t);
2000
2045
  }
2001
2046
  else if (params.framework === 'js') {
2002
- this.jsTemplate.set(params.t);
2047
+ this.state.templateJs.set(params.t);
2003
2048
  }
2004
2049
  else {
2005
- recompile = recompile || this.template() !== params.t;
2006
- this.template.set(params.t);
2050
+ recompile = recompile || previousTemplate !== params.t;
2051
+ this.state.template.set(params.t);
2007
2052
  }
2008
2053
  }
2009
2054
  handled = true;
@@ -2033,8 +2078,8 @@ class SiExampleViewerComponent {
2033
2078
  this.router.navigate([], { queryParams: newParams });
2034
2079
  }
2035
2080
  if (params.id) {
2036
- recompile = this.dataId() !== params.id;
2037
- this.dataId.set(params.id);
2081
+ recompile = this.state.dataId() !== params.id;
2082
+ this.state.dataId.set(params.id);
2038
2083
  }
2039
2084
  if (recompile) {
2040
2085
  this.renderer()?.recompile();
@@ -2046,7 +2091,7 @@ class SiExampleViewerComponent {
2046
2091
  }
2047
2092
  setTheme(theme) {
2048
2093
  if (this.mode() === 'editor') {
2049
- this.theme.set(theme);
2094
+ this.state.theme.set(theme);
2050
2095
  }
2051
2096
  if (this.themeApi) {
2052
2097
  this.themeApi.setThemeFromPreviewer(theme);
@@ -2054,14 +2099,14 @@ class SiExampleViewerComponent {
2054
2099
  this.setUiTheme(theme);
2055
2100
  }
2056
2101
  setRTL(rtl) {
2057
- this.isRTL.set(rtl);
2102
+ this.state.isRTL.set(rtl);
2058
2103
  if (this.mode() !== 'editor') {
2059
2104
  setDirectionRtl(rtl);
2060
2105
  }
2061
2106
  }
2062
2107
  setLocale(locale) {
2063
2108
  if (this.mode() === 'editor') {
2064
- this.locale.set(locale);
2109
+ this.state.locale.set(locale);
2065
2110
  return;
2066
2111
  }
2067
2112
  if (this.localeApi) {
@@ -2071,17 +2116,17 @@ class SiExampleViewerComponent {
2071
2116
  activateTab(index) {
2072
2117
  const example = this.tabs()[index].example;
2073
2118
  this.activeTabIndex.set(index);
2074
- this.exampleUrl.set(this.tabs()[index].base + example);
2119
+ this.state.example.set(this.tabs()[index].base + example);
2075
2120
  }
2076
2121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2077
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleViewerComponent, isStandalone: true, selector: "si-example-viewer", host: { properties: { "class.has-tabs": "hasTabs()", "class.has-tabs-mobile": "hasTabsMobile()" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n @if (!exampleUrl() && !template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if ((template() || reactTemplate() || vueTemplate() || jsTemplate()) && mode() === 'editor') {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer\n #renderer\n [exampleUrl]=\"baseUrl + exampleUrl()\"\n [dataId]=\"dataId()\"\n [template]=\"template()\"\n />\n} @else {\n <si-live-preview\n [ticketBaseUrl]=\"ticketBaseUrl\"\n [baseUrl]=\"baseUrl\"\n [example]=\"exampleUrl()\"\n [template]=\"template()\"\n [templateReact]=\"reactTemplate()\"\n [templateVue]=\"vueTemplate()\"\n [templateJs]=\"jsTemplate()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [isRTL]=\"isRTL()\"\n />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"], dependencies: [{ kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview", inputs: ["baseUrl", "example", "template", "theme", "locale", "isRTL", "ticketBaseUrl", "templateReact", "templateVue", "templateJs"], outputs: ["templateChange", "themeChange", "localeChange", "isRTLChange", "templateReactChange", "templateVueChange", "templateJsChange"] }, { kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", inputs: ["exampleUrl", "dataId", "template"], outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleViewerComponent, isStandalone: true, selector: "si-example-viewer", host: { properties: { "class.has-tabs": "hasTabs()", "class.has-tabs-mobile": "hasTabsMobile()" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"], dependencies: [{ kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview" }, { kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2078
2123
  }
2079
2124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleViewerComponent, decorators: [{
2080
2125
  type: Component,
2081
2126
  args: [{ selector: 'si-example-viewer', imports: [SiLivePreviewComponent, SiLivePreviewRendererComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
2082
2127
  '[class.has-tabs]': 'hasTabs()',
2083
2128
  '[class.has-tabs-mobile]': 'hasTabsMobile()'
2084
- }, template: "<div class=\"wrapper\">\n @if (!exampleUrl() && !template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if ((template() || reactTemplate() || vueTemplate() || jsTemplate()) && mode() === 'editor') {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer\n #renderer\n [exampleUrl]=\"baseUrl + exampleUrl()\"\n [dataId]=\"dataId()\"\n [template]=\"template()\"\n />\n} @else {\n <si-live-preview\n [ticketBaseUrl]=\"ticketBaseUrl\"\n [baseUrl]=\"baseUrl\"\n [example]=\"exampleUrl()\"\n [template]=\"template()\"\n [templateReact]=\"reactTemplate()\"\n [templateVue]=\"vueTemplate()\"\n [templateJs]=\"jsTemplate()\"\n [theme]=\"theme()\"\n [locale]=\"locale()\"\n [isRTL]=\"isRTL()\"\n />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"] }]
2129
+ }, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"] }]
2085
2130
  }], ctorParameters: () => [], propDecorators: { renderer: [{ type: i0.ViewChild, args: ['renderer', { isSignal: true }] }] } });
2086
2131
 
2087
2132
  /**
@@ -2106,25 +2151,7 @@ class SiLivePreviewWrapperComponent {
2106
2151
  ...(ngDevMode ? [{ debugName: "renderer" }] : /* istanbul ignore next */ []));
2107
2152
  webcomponentRenderer = viewChild.required('webcomponentRenderer', /* @ts-ignore */
2108
2153
  ...(ngDevMode ? [{ debugName: "webcomponentRenderer" }] : /* istanbul ignore next */ []));
2109
- exampleUrl = signal('', /* @ts-ignore */
2110
- ...(ngDevMode ? [{ debugName: "exampleUrl" }] : /* istanbul ignore next */ []));
2111
- template = signal('', /* @ts-ignore */
2112
- ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
2113
- loadReact = signal(false, /* @ts-ignore */
2114
- ...(ngDevMode ? [{ debugName: "loadReact" }] : /* istanbul ignore next */ []));
2115
- loadVue = signal(false, /* @ts-ignore */
2116
- ...(ngDevMode ? [{ debugName: "loadVue" }] : /* istanbul ignore next */ []));
2117
- loadJs = signal(false, /* @ts-ignore */
2118
- ...(ngDevMode ? [{ debugName: "loadJs" }] : /* istanbul ignore next */ []));
2119
- webcomponentTemplateCode = signal('', /* @ts-ignore */
2120
- ...(ngDevMode ? [{ debugName: "webcomponentTemplateCode" }] : /* istanbul ignore next */ []));
2121
- isMobile = false;
2122
- theme;
2123
- isRTL = false;
2124
- mode;
2125
- locale;
2126
- rootFontSize;
2127
- initialUrl;
2154
+ state = inject(LivePreviewStateService);
2128
2155
  config = inject(SI_LIVE_PREVIEW_CONFIG);
2129
2156
  themeApi = inject(SiLivePreviewThemeApi, { optional: true });
2130
2157
  localeApi = inject(SiLivePreviewLocaleApi, { optional: true });
@@ -2134,21 +2161,23 @@ class SiLivePreviewWrapperComponent {
2134
2161
  optional: true
2135
2162
  });
2136
2163
  cdRef = inject(ChangeDetectorRef);
2164
+ isMobile = false;
2165
+ initialUrl;
2137
2166
  constructor() {
2138
2167
  this.themeApi
2139
2168
  ?.getApplicationThemeObservable()
2140
2169
  .pipe(takeUntilDestroyed())
2141
2170
  .subscribe(theme => {
2142
- this.theme = theme;
2143
- this.sendMessage('theme', this.theme);
2171
+ this.state.theme.set(theme);
2172
+ this.sendMessage('theme', theme);
2144
2173
  });
2145
2174
  this.localeApi
2146
2175
  ?.getLocale()
2147
2176
  .pipe(takeUntilDestroyed())
2148
2177
  .subscribe(locale => {
2149
- if (this.locale !== locale) {
2150
- this.locale = locale;
2151
- this.sendMessage('locale', this.locale);
2178
+ if (this.state.locale() !== locale) {
2179
+ this.state.locale.set(locale);
2180
+ this.sendMessage('locale', locale);
2152
2181
  }
2153
2182
  });
2154
2183
  this.initialUrl = window.location.toString();
@@ -2169,41 +2198,37 @@ class SiLivePreviewWrapperComponent {
2169
2198
  this.ngZone.run(() => this.onMessageInZone(event));
2170
2199
  }
2171
2200
  onMessageInZone(event) {
2172
- this.exampleUrl.set(event.data.exampleUrl);
2173
- this.template.set(event.data.template);
2174
- this.loadReact.set(event.data.loadReact);
2175
- this.loadVue.set(event.data.loadVue);
2176
- this.loadJs.set(event.data.loadJs);
2177
- this.webcomponentTemplateCode.set(event.data.reactVueTemplate);
2178
- if (this.theme !== event.data.theme) {
2201
+ const modeChanged = this.state.viewport().mode !== event.data.mode;
2202
+ this.state.applyRenderRequest(event.data);
2203
+ if (this.state.theme() !== event.data.theme) {
2179
2204
  this.setTheme(event.data.theme);
2180
2205
  }
2181
- if (this.locale !== event.data.locale) {
2206
+ if (this.state.locale() !== event.data.locale) {
2182
2207
  this.setLocale(event.data.locale);
2183
2208
  }
2184
- if (this.rootFontSize !== event.data.rootFontSize) {
2185
- this.rootFontSize = event.data.rootFontSize;
2209
+ if (this.state.rootFontSize() !== event.data.rootFontSize) {
2210
+ this.state.rootFontSize.set(event.data.rootFontSize);
2186
2211
  setRootFontSize(event.data.rootFontSize);
2187
2212
  }
2188
- if (this.isRTL !== event.data.isRTL) {
2213
+ if (this.state.isRTL() !== event.data.isRTL) {
2189
2214
  this.setRTL(event.data.isRTL);
2190
2215
  }
2191
2216
  if (this.isMobile) {
2192
2217
  this.setSafeArea(event.data.safeAreaTop, event.data.safeAreaBottom, event.data.safeAreaLeft, event.data.safeAreaRight);
2193
2218
  }
2194
- if (this.mode !== event.data.mode && this.isMobile) {
2195
- this.mode = event.data.mode;
2196
- setDeviceMode(this.mode);
2219
+ if (modeChanged && this.isMobile) {
2220
+ setDeviceMode(event.data.mode);
2197
2221
  this.renderer().recompile();
2198
2222
  }
2199
2223
  const webcomponentRenderer = this.webcomponentRenderer();
2200
- if (webcomponentRenderer && (this.loadReact() || this.loadVue() || this.loadJs())) {
2224
+ if (webcomponentRenderer &&
2225
+ (this.state.loadReact() || this.state.loadVue() || this.state.loadJs())) {
2201
2226
  this.webcomponentService?.injectComponent(webcomponentRenderer, {
2202
- exampleUrl: this.exampleUrl(),
2203
- loadReact: this.loadReact(),
2204
- loadJs: this.loadJs(),
2205
- webcomponentTemplateCode: this.webcomponentTemplateCode(),
2206
- loadVue: this.loadVue(),
2227
+ exampleUrl: this.config.examplesBaseUrl + this.state.example(),
2228
+ loadReact: this.state.loadReact(),
2229
+ loadJs: this.state.loadJs(),
2230
+ webcomponentTemplateCode: this.state.activeWebComponentTemplate(),
2231
+ loadVue: this.state.loadVue(),
2207
2232
  config: this.config
2208
2233
  }, {
2209
2234
  inProgress: this.sendMessage
@@ -2229,26 +2254,26 @@ class SiLivePreviewWrapperComponent {
2229
2254
  window.parent.postMessage({ src: 'renderer', type, message }, '*');
2230
2255
  }
2231
2256
  setTheme(theme) {
2232
- this.theme = theme;
2257
+ this.state.theme.set(theme);
2233
2258
  if (this.themeApi) {
2234
- this.themeApi.setThemeFromPreviewer(this.theme);
2259
+ this.themeApi.setThemeFromPreviewer(theme);
2235
2260
  }
2236
2261
  else {
2237
- document.documentElement.classList.toggle('app--dark', this.theme === 'dark');
2238
- document.documentElement.classList.toggle('app--light', this.theme === 'light');
2262
+ document.documentElement.classList.toggle('app--dark', theme === 'dark');
2263
+ document.documentElement.classList.toggle('app--light', theme === 'light');
2239
2264
  }
2240
2265
  }
2241
2266
  setRTL(rtl) {
2242
- this.isRTL = rtl;
2267
+ this.state.isRTL.set(rtl);
2243
2268
  setDirectionRtl(rtl);
2244
2269
  }
2245
2270
  setLocale(locale) {
2246
2271
  if (!locale) {
2247
2272
  return;
2248
2273
  }
2249
- this.locale = locale;
2274
+ this.state.locale.set(locale);
2250
2275
  if (this.localeApi) {
2251
- this.localeApi.setLocale(this.locale);
2276
+ this.localeApi.setLocale(locale);
2252
2277
  }
2253
2278
  }
2254
2279
  setSafeArea(top, bottom, left, right) {
@@ -2259,13 +2284,13 @@ class SiLivePreviewWrapperComponent {
2259
2284
  htmlTag.style.setProperty('--ion-safe-area-right', (right ?? 0) + 'px');
2260
2285
  }
2261
2286
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2262
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewWrapperComponent, isStandalone: true, selector: "si-live-preview-wrapper", host: { listeners: { "click": "onClick($event)" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }, { propertyName: "webcomponentRenderer", first: true, predicate: ["webcomponentRenderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<si-live-preview-renderer\n #renderer\n [hidden]=\"loadReact() || loadVue() || loadJs()\"\n [template]=\"template()\"\n [exampleUrl]=\"exampleUrl()\"\n (templateFromComponent)=\"sendMessage('templateFromComponent', $event)\"\n (logClear)=\"sendMessage('clear')\"\n (logMessage)=\"sendMessage('log', $event)\"\n (logRenderingError)=\"sendMessage('error', $event)\"\n (inProgress)=\"sendMessage('progress', $event)\"\n (supportsLandscapeMode)=\"sendMessage('landscapeMode', $event)\"\n/>\n\n<div #webcomponentRenderer></div>\n", styles: ["si-live-preview-renderer{flex:1}\n"], dependencies: [{ kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", inputs: ["exampleUrl", "dataId", "template"], outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2287
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewWrapperComponent, isStandalone: true, selector: "si-live-preview-wrapper", host: { listeners: { "click": "onClick($event)" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }, { propertyName: "webcomponentRenderer", first: true, predicate: ["webcomponentRenderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<si-live-preview-renderer\n #renderer\n [hidden]=\"state.loadReact() || state.loadVue() || state.loadJs()\"\n (templateFromComponent)=\"sendMessage('templateFromComponent', $event)\"\n (logClear)=\"sendMessage('clear')\"\n (logMessage)=\"sendMessage('log', $event)\"\n (logRenderingError)=\"sendMessage('error', $event)\"\n (inProgress)=\"sendMessage('progress', $event)\"\n (supportsLandscapeMode)=\"sendMessage('landscapeMode', $event)\"\n/>\n\n<div #webcomponentRenderer></div>\n", styles: ["si-live-preview-renderer{flex:1}\n"], dependencies: [{ kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2263
2288
  }
2264
2289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewWrapperComponent, decorators: [{
2265
2290
  type: Component,
2266
2291
  args: [{ selector: 'si-live-preview-wrapper', imports: [SiLivePreviewRendererComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
2267
2292
  '(click)': 'onClick($event)'
2268
- }, template: "<si-live-preview-renderer\n #renderer\n [hidden]=\"loadReact() || loadVue() || loadJs()\"\n [template]=\"template()\"\n [exampleUrl]=\"exampleUrl()\"\n (templateFromComponent)=\"sendMessage('templateFromComponent', $event)\"\n (logClear)=\"sendMessage('clear')\"\n (logMessage)=\"sendMessage('log', $event)\"\n (logRenderingError)=\"sendMessage('error', $event)\"\n (inProgress)=\"sendMessage('progress', $event)\"\n (supportsLandscapeMode)=\"sendMessage('landscapeMode', $event)\"\n/>\n\n<div #webcomponentRenderer></div>\n", styles: ["si-live-preview-renderer{flex:1}\n"] }]
2293
+ }, template: "<si-live-preview-renderer\n #renderer\n [hidden]=\"state.loadReact() || state.loadVue() || state.loadJs()\"\n (templateFromComponent)=\"sendMessage('templateFromComponent', $event)\"\n (logClear)=\"sendMessage('clear')\"\n (logMessage)=\"sendMessage('log', $event)\"\n (logRenderingError)=\"sendMessage('error', $event)\"\n (inProgress)=\"sendMessage('progress', $event)\"\n (supportsLandscapeMode)=\"sendMessage('landscapeMode', $event)\"\n/>\n\n<div #webcomponentRenderer></div>\n", styles: ["si-live-preview-renderer{flex:1}\n"] }]
2269
2294
  }], ctorParameters: () => [], propDecorators: { renderer: [{ type: i0.ViewChild, args: ['renderer', { isSignal: true }] }], webcomponentRenderer: [{ type: i0.ViewChild, args: ['webcomponentRenderer', { isSignal: true }] }] } });
2270
2295
 
2271
2296
  /**