@siemens/live-preview 49.1.0 → 49.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.
- package/assets/angular/angular.json +63 -0
- package/assets/angular/package.json +47 -0
- package/assets/angular/src/app/app.component.ts +15 -0
- package/assets/angular/src/app/example.component.ts +12 -0
- package/assets/angular/src/index.html +12 -0
- package/assets/angular/src/main.ts +39 -0
- package/assets/angular/src/styles.scss +16 -0
- package/assets/angular/tsconfig.app.json +10 -0
- package/assets/angular/tsconfig.json +31 -0
- package/fesm2022/siemens-live-preview-webcomponents.mjs.map +1 -1
- package/fesm2022/siemens-live-preview.mjs +229 -9
- package/fesm2022/siemens-live-preview.mjs.map +1 -1
- package/package.json +3 -2
- package/types/siemens-live-preview-webcomponents.d.ts +1 -1
- package/types/siemens-live-preview.d.ts +59 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/live-preview",
|
|
3
3
|
"description": "Element live preview for web",
|
|
4
|
-
"version": "49.
|
|
4
|
+
"version": "49.3.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@stackblitz/sdk": "^1.11.0",
|
|
21
22
|
"codeflask": "^1.4.1",
|
|
22
23
|
"qrcode-generator": "^2.0.0",
|
|
23
24
|
"glob": "13.0.6",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"react-dom": "18 || 19",
|
|
31
32
|
"vue": "3",
|
|
32
33
|
"vue3-sfc-loader": "0.9.5",
|
|
33
|
-
"@babel/standalone": "7.29.
|
|
34
|
+
"@babel/standalone": "7.29.2"
|
|
34
35
|
},
|
|
35
36
|
"peerDependenciesMeta": {
|
|
36
37
|
"react": {
|
|
@@ -34,7 +34,7 @@ declare class SiLivePreviewWebComponent implements OnChanges {
|
|
|
34
34
|
renderingDone: boolean;
|
|
35
35
|
private reactRoot;
|
|
36
36
|
private vueRoot;
|
|
37
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
37
|
+
ngOnChanges(changes: SimpleChanges<this>): void;
|
|
38
38
|
loadReactFromCodeTemplate(code: string): void;
|
|
39
39
|
loadVueFromCodeTemplate(code: string): void;
|
|
40
40
|
loadHTMLFromCodeTemplate(code: string): void;
|
|
@@ -89,7 +89,7 @@ declare class SiLivePreviewRendererComponent implements OnChanges, OnDestroy {
|
|
|
89
89
|
private activatedRoute;
|
|
90
90
|
private defaultRoutes;
|
|
91
91
|
private cdRef;
|
|
92
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
92
|
+
ngOnChanges(changes: SimpleChanges<this>): void;
|
|
93
93
|
ngOnDestroy(): void;
|
|
94
94
|
recompile(): void;
|
|
95
95
|
private logError;
|
|
@@ -230,7 +230,7 @@ declare class SiLivePreviewComponent implements OnInit, AfterViewInit, OnChanges
|
|
|
230
230
|
private webcomponentsList;
|
|
231
231
|
private cdRef;
|
|
232
232
|
constructor();
|
|
233
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
233
|
+
ngOnChanges(changes: SimpleChanges<this>): void;
|
|
234
234
|
ngOnInit(): void;
|
|
235
235
|
ngAfterViewInit(): void;
|
|
236
236
|
activateTab(tab: string): void;
|
|
@@ -339,7 +339,7 @@ declare class SiLivePreviewIframeComponent implements OnInit, OnChanges {
|
|
|
339
339
|
protected showQrMenu: boolean;
|
|
340
340
|
protected plainUrl: string;
|
|
341
341
|
protected plainUrlShort: string;
|
|
342
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
342
|
+
ngOnChanges(changes: SimpleChanges<this>): void;
|
|
343
343
|
ngOnInit(): void;
|
|
344
344
|
deviceChanged(): void;
|
|
345
345
|
private onMessage;
|
|
@@ -396,7 +396,7 @@ declare class SiLivePreviewQrComponent implements AfterViewInit, OnDestroy, OnCh
|
|
|
396
396
|
qrImg: string;
|
|
397
397
|
qrShort: boolean;
|
|
398
398
|
private unlisten?;
|
|
399
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
399
|
+
ngOnChanges(changes: SimpleChanges<this>): void;
|
|
400
400
|
ngAfterViewInit(): void;
|
|
401
401
|
ngOnDestroy(): void;
|
|
402
402
|
private generateQr;
|
|
@@ -404,6 +404,60 @@ declare class SiLivePreviewQrComponent implements AfterViewInit, OnDestroy, OnCh
|
|
|
404
404
|
static ɵcmp: i0.ɵɵComponentDeclaration<SiLivePreviewQrComponent, "si-live-preview-qr", never, { "url": { "alias": "url"; "required": false; }; "urlShort": { "alias": "urlShort"; "required": false; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
409
|
+
* SPDX-License-Identifier: MIT
|
|
410
|
+
*/
|
|
411
|
+
type FilePaths = string[];
|
|
412
|
+
type Files = Record<string, string>;
|
|
413
|
+
interface Project {
|
|
414
|
+
/** The frontend framework / template name. */
|
|
415
|
+
name: string;
|
|
416
|
+
/** The files to include in the Stackblitz project. */
|
|
417
|
+
files: Files;
|
|
418
|
+
}
|
|
419
|
+
interface AssetProject extends Omit<Project, 'files'> {
|
|
420
|
+
/** Base URL to load the project files from the application assets folder. */
|
|
421
|
+
assetUrl: string;
|
|
422
|
+
/** Array of file paths retrieved from the application asset folder. */
|
|
423
|
+
files: FilePaths;
|
|
424
|
+
}
|
|
425
|
+
type ProjectTemplates = (AssetProject | Project)[];
|
|
426
|
+
interface StackblitzConfig {
|
|
427
|
+
/**
|
|
428
|
+
* Project templates for Stackblitz
|
|
429
|
+
* Optional set of files and dependencies for to build a Stackblitz project.
|
|
430
|
+
* The key is the template name e.g. angular.
|
|
431
|
+
*/
|
|
432
|
+
templates: ProjectTemplates;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
437
|
+
* SPDX-License-Identifier: MIT
|
|
438
|
+
*/
|
|
439
|
+
|
|
440
|
+
/** Injection token to configure the open in Stackblitz button. */
|
|
441
|
+
declare const SI_STACKBLITZ_CONFIG: InjectionToken<StackblitzConfig>;
|
|
442
|
+
/** Provides the Stackblitz configuration with default template projects. */
|
|
443
|
+
declare const provideStackblitzConfig: (config?: StackblitzConfig) => Provider;
|
|
444
|
+
/**
|
|
445
|
+
* Create default Angular template project config.
|
|
446
|
+
* The files are loaded from the assets folder, consumers need to add the following asset configuration
|
|
447
|
+
* to their angular.json file:
|
|
448
|
+
*
|
|
449
|
+
* ```json
|
|
450
|
+
* "assets": [
|
|
451
|
+
* ...
|
|
452
|
+
* {
|
|
453
|
+
* "glob": "**\/*",
|
|
454
|
+
* "input": "projects/live-preview/assets/",
|
|
455
|
+
* "output": "/assets/"
|
|
456
|
+
* }]
|
|
457
|
+
* ```
|
|
458
|
+
*/
|
|
459
|
+
declare const angularTemplateProject: () => AssetProject;
|
|
460
|
+
|
|
407
461
|
/**
|
|
408
462
|
* Copyright (c) Siemens 2016 - 2026
|
|
409
463
|
* SPDX-License-Identifier: MIT
|
|
@@ -475,5 +529,5 @@ declare class SiLivePreviewModule {
|
|
|
475
529
|
static ɵinj: i0.ɵɵInjectorDeclaration<SiLivePreviewModule>;
|
|
476
530
|
}
|
|
477
531
|
|
|
478
|
-
export { DummyAppSampleComponent, LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SiDummyComponent, SiExampleOverviewComponent, SiExampleViewerComponent, SiLivePreviewComponent, SiLivePreviewIframeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewQrComponent, SiLivePreviewRendererComponent, SiLivePreviewRoutingModule, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewWrapperComponent, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, livePreviewRoutes, provideExampleRoutes };
|
|
532
|
+
export { DummyAppSampleComponent, LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SI_STACKBLITZ_CONFIG, SiDummyComponent, SiExampleOverviewComponent, SiExampleViewerComponent, SiLivePreviewComponent, SiLivePreviewIframeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewQrComponent, SiLivePreviewRendererComponent, SiLivePreviewRoutingModule, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewWrapperComponent, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, angularTemplateProject, livePreviewRoutes, provideExampleRoutes, provideStackblitzConfig };
|
|
479
533
|
export type { SiLivePreviewConfig, SiLivePreviewInternals, ThemeType };
|