@rulecms/widget-angular 0.8.1 → 0.8.2

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.
Files changed (23) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/rulecms-widget-angular.mjs +191 -40
  3. package/fesm2022/rulecms-widget-angular.mjs.map +1 -1
  4. package/lib/helpers/prepare-style-element-css.d.ts +11 -0
  5. package/lib/helpers/prepare-style-element-css.d.ts.map +1 -0
  6. package/lib/project-css-classes/project-css-classes-stylesheet.component.d.ts.map +1 -1
  7. package/lib/project-css-fonts/project-css-fonts-stylesheet.component.d.ts.map +1 -1
  8. package/lib/project-css-keyframes/project-css-keyframes-stylesheet.component.d.ts.map +1 -1
  9. package/lib/project-css-position-try/project-css-position-try-stylesheet.component.d.ts.map +1 -1
  10. package/lib/project-css-properties/project-css-properties-stylesheet.component.d.ts.map +1 -1
  11. package/lib/project-css-themes/project-css-themes-stylesheet.component.d.ts.map +1 -1
  12. package/lib/project-css-variables/project-css-variables-stylesheet.component.d.ts.map +1 -1
  13. package/lib/project-css-widget-chrome/project-css-widget-chrome-stylesheet.component.d.ts.map +1 -1
  14. package/lib/render/breakpoint-variant-render.component.d.ts +4 -0
  15. package/lib/render/breakpoint-variant-render.component.d.ts.map +1 -1
  16. package/lib/render/embed-in-vertical-container.component.d.ts +1 -1
  17. package/lib/render/embed-in-vertical-container.component.d.ts.map +1 -1
  18. package/lib/render/library-stylesheets.component.d.ts.map +1 -1
  19. package/lib/render/scope-id-from-content.d.ts +8 -0
  20. package/lib/render/scope-id-from-content.d.ts.map +1 -0
  21. package/lib/render/style-element.directive.d.ts +24 -0
  22. package/lib/render/style-element.directive.d.ts.map +1 -0
  23. package/package.json +1 -1
package/README.md CHANGED
@@ -65,7 +65,7 @@ const data = await fetchRuleCMSWidget({
65
65
  />
66
66
  ```
67
67
 
68
- No token is needed on the client in `pre-fetched` mode — the widget does not refetch in the browser. Pre-fetched mode uses CSS breakpoint variants so server HTML matches all viewport widths.
68
+ No token is needed on the client in `pre-fetched` mode — the widget does not refetch in the browser. When a widget's content differs by device, the server HTML carries its phone, tablet and desktop versions with a `<style>` of media queries that shows the one matching the viewport, so the first paint is right at every width. The widget's library, project and container CSS are `<style>` elements in the same HTML, and hydration keeps them. Before 0.8.2 none of these `<style>` elements were emitted, so all three versions showed.
69
69
 
70
70
  ## Host `componentProps`
71
71
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, Component, HostBinding, EventEmitter, ErrorHandler, Output, Optional, Inject } from '@angular/core';
2
+ import { Injectable, Input, Component, ViewEncapsulation, inject, ViewContainerRef, Renderer2, Directive, HostBinding, EventEmitter, ErrorHandler, Output, Optional, Inject } from '@angular/core';
3
3
  import { NgComponentOutlet, NgStyle, NgTemplateOutlet } from '@angular/common';
4
4
 
5
5
  /**
@@ -2322,6 +2322,29 @@ ${phone}, ${tablet}, ${desktop} { display: none; }
2322
2322
  `.trim();
2323
2323
  }
2324
2324
 
2325
+ /** cyrb53, a public-domain 53-bit string hash. */
2326
+ const cyrb53 = (value) => {
2327
+ let h1 = 0xdeadbeef;
2328
+ let h2 = 0x41c6ce57;
2329
+ for (let index = 0; index < value.length; index += 1) {
2330
+ const code = value.charCodeAt(index);
2331
+ h1 = Math.imul(h1 ^ code, 2654435761);
2332
+ h2 = Math.imul(h2 ^ code, 1597334677);
2333
+ }
2334
+ h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);
2335
+ h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);
2336
+ h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);
2337
+ h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);
2338
+ return 4294967296 * (2097151 & h2) + (h1 >>> 0);
2339
+ };
2340
+ /**
2341
+ * Class-name-safe scope id computed from what the scope styles, so a server
2342
+ * render, every later render in that process, and the browser hydrating it
2343
+ * all agree without a framework id API. Equal content shares an id, which is
2344
+ * harmless because its scoped rules are equal too.
2345
+ */
2346
+ const scopeIdFromContent = (prefix, content) => `${prefix}-${cyrb53(content).toString(36)}`;
2347
+
2325
2348
  /**
2326
2349
  * Extracts the (already composed) source components plugin from the plugins
2327
2350
  * object the pipeline receives. Throws if it is missing or malformed.
@@ -2352,7 +2375,80 @@ function getComponentsPluginFromPlugins(plugins) {
2352
2375
  return sourceComponentsPlugin;
2353
2376
  }
2354
2377
 
2355
- let verticalContainerSeq = 0;
2378
+ const STYLE_TAG_PATTERN = /(<\/|<)(s)(tyle)/gi;
2379
+ /**
2380
+ * Prepares CSS for the text of a `<style>` element.
2381
+ *
2382
+ * Angular's server renderer writes `<style>` text raw, as browsers expect, so
2383
+ * this is the security boundary: the only way out of a `<style>` element is a
2384
+ * `</style` sequence, and its `s` becomes the CSS escape `\73 ` / `\53 `, as
2385
+ * React 19 and the other RuleCMS SDKs do. The CSS means the same; nothing else
2386
+ * is changed.
2387
+ */
2388
+ function prepareStyleElementCss(css) {
2389
+ return css.replace(STYLE_TAG_PATTERN, (_match, prefix, s, suffix) => `${prefix}${s === 's' ? '\\73 ' : '\\53 '}${suffix}`);
2390
+ }
2391
+
2392
+ /** Created dynamically, so its host element is a `<style>`; it renders nothing itself. */
2393
+ class StyleElementHostComponent {
2394
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StyleElementHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2395
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: StyleElementHostComponent, isStandalone: true, selector: "style", ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
2396
+ }
2397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StyleElementHostComponent, decorators: [{
2398
+ type: Component,
2399
+ args: [{
2400
+ selector: 'style',
2401
+ standalone: true,
2402
+ template: '',
2403
+ encapsulation: ViewEncapsulation.None,
2404
+ }]
2405
+ }] });
2406
+ /**
2407
+ * Puts a `<style>` holding `rulecmsStyleElement` where this `<ng-container>` is.
2408
+ *
2409
+ * Angular's template compiler removes every `<style>` element from a template,
2410
+ * and a bound one leaves nothing behind. A component created through
2411
+ * `ViewContainerRef` takes its host element from its selector instead, so this
2412
+ * `<style>` never reaches the template compiler, yet it is a node Angular owns:
2413
+ * the server render writes it, hydration adopts the server's element rather
2414
+ * than adding a second one, and destroying the surrounding view removes it.
2415
+ */
2416
+ class StyleElementDirective {
2417
+ constructor() {
2418
+ this.viewContainer = inject(ViewContainerRef);
2419
+ this.renderer = inject(Renderer2);
2420
+ }
2421
+ ngOnChanges() {
2422
+ if (!this.styleRef) {
2423
+ this.styleRef = this.viewContainer.createComponent(StyleElementHostComponent);
2424
+ if (this.rulecmsStyleElementMarker) {
2425
+ this.renderer.setAttribute(this.styleRef.location.nativeElement, this.rulecmsStyleElementMarker, '');
2426
+ }
2427
+ }
2428
+ const style = this.styleRef.location.nativeElement;
2429
+ const css = prepareStyleElementCss(this.rulecmsStyleElement);
2430
+ // Hydration adopts the server's element with its text; writing the same
2431
+ // text again would only make the browser parse the sheet a second time.
2432
+ if (style.textContent !== css) {
2433
+ this.renderer.setProperty(style, 'textContent', css);
2434
+ }
2435
+ }
2436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StyleElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2437
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: StyleElementDirective, isStandalone: true, selector: "ng-container[rulecmsStyleElement]", inputs: { rulecmsStyleElement: "rulecmsStyleElement", rulecmsStyleElementMarker: "rulecmsStyleElementMarker" }, usesOnChanges: true, ngImport: i0 }); }
2438
+ }
2439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StyleElementDirective, decorators: [{
2440
+ type: Directive,
2441
+ args: [{
2442
+ selector: 'ng-container[rulecmsStyleElement]',
2443
+ standalone: true,
2444
+ }]
2445
+ }], propDecorators: { rulecmsStyleElement: [{
2446
+ type: Input,
2447
+ args: [{ required: true }]
2448
+ }], rulecmsStyleElementMarker: [{
2449
+ type: Input
2450
+ }] } });
2451
+
2356
2452
  class EmbedInVerticalContainerComponent {
2357
2453
  constructor() {
2358
2454
  this.isComposeMode = false;
@@ -2361,7 +2457,7 @@ class EmbedInVerticalContainerComponent {
2361
2457
  this.deviceDisplayType = 'Desktop';
2362
2458
  this.cssString = '';
2363
2459
  this.scopedCss = '';
2364
- this.scopeClass = `rulecms-vc-${++verticalContainerSeq}`;
2460
+ this.scopeClass = '';
2365
2461
  this.wrap = false;
2366
2462
  this.hidden = false;
2367
2463
  this.wrapperClass = '';
@@ -2385,6 +2481,7 @@ class EmbedInVerticalContainerComponent {
2385
2481
  ngOnChanges() {
2386
2482
  const containerCss = this.displayItemList.containerAttributes?.[cssAttrArrayKey] || [];
2387
2483
  this.cssString = containerCss.join(';\n');
2484
+ this.scopeClass = scopeIdFromContent('rulecms-vc', this.cssString);
2388
2485
  this.scopedCss = this.cssString
2389
2486
  ? `.${this.scopeClass} {\n${this.cssString}\n}`
2390
2487
  : '';
@@ -2424,19 +2521,20 @@ class EmbedInVerticalContainerComponent {
2424
2521
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: EmbedInVerticalContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2425
2522
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: EmbedInVerticalContainerComponent, isStandalone: true, selector: "rulecms-embed-vertical", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", showDropContainers: "showDropContainers", isWithinCollection: "isWithinCollection", deviceDisplayType: "deviceDisplayType" }, host: { properties: { "attr.hidden": "this.hiddenAttr", "class": "this.hostClass", "style": "this.hostStyle" } }, usesOnChanges: true, ngImport: i0, template: `
2426
2523
  @if (cssString) {
2427
- <style [innerText]="scopedCss"></style>
2524
+ <ng-container [rulecmsStyleElement]="scopedCss" />
2428
2525
  }
2429
2526
  <ng-content />
2430
- `, isInline: true }); }
2527
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
2431
2528
  }
2432
2529
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: EmbedInVerticalContainerComponent, decorators: [{
2433
2530
  type: Component,
2434
2531
  args: [{
2435
2532
  selector: 'rulecms-embed-vertical',
2436
2533
  standalone: true,
2534
+ imports: [StyleElementDirective],
2437
2535
  template: `
2438
2536
  @if (cssString) {
2439
- <style [innerText]="scopedCss"></style>
2537
+ <ng-container [rulecmsStyleElement]="scopedCss" />
2440
2538
  }
2441
2539
  <ng-content />
2442
2540
  `,
@@ -3223,18 +3321,25 @@ class LibraryStylesheetsComponent {
3223
3321
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibraryStylesheetsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3224
3322
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: LibraryStylesheetsComponent, isStandalone: true, selector: "rulecms-library-stylesheets", inputs: { stylesheets: "stylesheets" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
3225
3323
  @for (css of stylesheets ?? []; track $index) {
3226
- <style data-rulecms-library-stylesheet="" [innerText]="css"></style>
3324
+ <ng-container
3325
+ [rulecmsStyleElement]="css"
3326
+ rulecmsStyleElementMarker="data-rulecms-library-stylesheet"
3327
+ />
3227
3328
  }
3228
- `, isInline: true }); }
3329
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
3229
3330
  }
3230
3331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibraryStylesheetsComponent, decorators: [{
3231
3332
  type: Component,
3232
3333
  args: [{
3233
3334
  selector: 'rulecms-library-stylesheets',
3234
3335
  standalone: true,
3336
+ imports: [StyleElementDirective],
3235
3337
  template: `
3236
3338
  @for (css of stylesheets ?? []; track $index) {
3237
- <style data-rulecms-library-stylesheet="" [innerText]="css"></style>
3339
+ <ng-container
3340
+ [rulecmsStyleElement]="css"
3341
+ rulecmsStyleElementMarker="data-rulecms-library-stylesheet"
3342
+ />
3238
3343
  }
3239
3344
  `,
3240
3345
  host: { style: 'display: contents' },
@@ -3244,19 +3349,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
3244
3349
  }] } });
3245
3350
 
3246
3351
  const DEVICE_VARIANTS = ['Phone', 'Tablet', 'Desktop'];
3247
- let breakpointSeq = 0;
3248
3352
  class BreakpointVariantRenderComponent {
3249
3353
  constructor() {
3250
3354
  this.devices = DEVICE_VARIANTS;
3251
3355
  this.divergent = false;
3252
3356
  this.variantStyles = '';
3253
- this.resolvedScopeId = `rulecms-bp-${++breakpointSeq}`;
3357
+ this.resolvedScopeId = '';
3358
+ this.itemListScopeId = '';
3254
3359
  }
3255
3360
  ngOnChanges() {
3256
- this.resolvedScopeId = this.scopeIdInput ?? this.resolvedScopeId;
3361
+ this.resolvedScopeId = this.scopeIdInput ?? this.scopeIdForItemList();
3257
3362
  this.divergent = hasDeviceDivergentValues(this.displayItemList, this.widgetCollections);
3258
3363
  this.variantStyles = buildBreakpointVariantStyles(this.resolvedScopeId);
3259
3364
  }
3365
+ /** Hashes once per item list: `rulecms-widget` passes a new `plugins` object on every check. */
3366
+ scopeIdForItemList() {
3367
+ if (this.hashedItemList !== this.displayItemList) {
3368
+ this.hashedItemList = this.displayItemList;
3369
+ this.itemListScopeId = scopeIdFromContent('rulecms-bp', JSON.stringify(this.displayItemList));
3370
+ }
3371
+ return this.itemListScopeId;
3372
+ }
3260
3373
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BreakpointVariantRenderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3261
3374
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: BreakpointVariantRenderComponent, isStandalone: true, selector: "rulecms-breakpoint-variants", inputs: { displayItemList: "displayItemList", widgetCollections: "widgetCollections", plugins: "plugins", componentProps: "componentProps", mounts: "mounts", placeholderValues: "placeholderValues", scopeIdInput: "scopeIdInput" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
3262
3375
  <rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
@@ -3275,7 +3388,7 @@ class BreakpointVariantRenderComponent {
3275
3388
  [placeholderValues]="placeholderValues"
3276
3389
  />
3277
3390
  } @else {
3278
- <style [innerText]="variantStyles"></style>
3391
+ <ng-container [rulecmsStyleElement]="variantStyles" />
3279
3392
  @for (device of devices; track device) {
3280
3393
  <div [class]="resolvedScopeId + '-' + device.toLowerCase()">
3281
3394
  <rulecms-render-for-device
@@ -3294,14 +3407,14 @@ class BreakpointVariantRenderComponent {
3294
3407
  </div>
3295
3408
  }
3296
3409
  }
3297
- `, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "mounts", "placeholderValues", "ancestorColumnIds"] }, { kind: "component", type: LibraryStylesheetsComponent, selector: "rulecms-library-stylesheets", inputs: ["stylesheets"] }] }); }
3410
+ `, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "mounts", "placeholderValues", "ancestorColumnIds"] }, { kind: "component", type: LibraryStylesheetsComponent, selector: "rulecms-library-stylesheets", inputs: ["stylesheets"] }, { kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
3298
3411
  }
3299
3412
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BreakpointVariantRenderComponent, decorators: [{
3300
3413
  type: Component,
3301
3414
  args: [{
3302
3415
  selector: 'rulecms-breakpoint-variants',
3303
3416
  standalone: true,
3304
- imports: [RenderComponentsForDeviceComponent, LibraryStylesheetsComponent],
3417
+ imports: [RenderComponentsForDeviceComponent, LibraryStylesheetsComponent, StyleElementDirective],
3305
3418
  template: `
3306
3419
  <rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
3307
3420
  @if (!divergent) {
@@ -3319,7 +3432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
3319
3432
  [placeholderValues]="placeholderValues"
3320
3433
  />
3321
3434
  } @else {
3322
- <style [innerText]="variantStyles"></style>
3435
+ <ng-container [rulecmsStyleElement]="variantStyles" />
3323
3436
  @for (device of devices; track device) {
3324
3437
  <div [class]="resolvedScopeId + '-' + device.toLowerCase()">
3325
3438
  <rulecms-render-for-device
@@ -3623,18 +3736,25 @@ class ProjectCssClassesStylesheetComponent {
3623
3736
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssClassesStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3624
3737
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssClassesStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-classes-stylesheet", inputs: { publishedKey: "publishedKey", classes: "classes", classLayer: "classLayer" }, ngImport: i0, template: `
3625
3738
  @if (css) {
3626
- <style data-rulecms-project-class-definitions="" [innerText]="css"></style>
3739
+ <ng-container
3740
+ [rulecmsStyleElement]="css"
3741
+ rulecmsStyleElementMarker="data-rulecms-project-class-definitions"
3742
+ />
3627
3743
  }
3628
- `, isInline: true }); }
3744
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
3629
3745
  }
3630
3746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssClassesStylesheetComponent, decorators: [{
3631
3747
  type: Component,
3632
3748
  args: [{
3633
3749
  selector: 'rulecms-project-css-classes-stylesheet',
3634
3750
  standalone: true,
3751
+ imports: [StyleElementDirective],
3635
3752
  template: `
3636
3753
  @if (css) {
3637
- <style data-rulecms-project-class-definitions="" [innerText]="css"></style>
3754
+ <ng-container
3755
+ [rulecmsStyleElement]="css"
3756
+ rulecmsStyleElementMarker="data-rulecms-project-class-definitions"
3757
+ />
3638
3758
  }
3639
3759
  `,
3640
3760
  }]
@@ -3903,21 +4023,22 @@ class ProjectCssFontsStylesheetComponent {
3903
4023
  <link rel="stylesheet" [attr.href]="href" data-rulecms-project-fonts="" />
3904
4024
  }
3905
4025
  @if (css) {
3906
- <style data-rulecms-project-fonts="" [innerText]="css"></style>
4026
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-fonts" />
3907
4027
  }
3908
- `, isInline: true }); }
4028
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
3909
4029
  }
3910
4030
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssFontsStylesheetComponent, decorators: [{
3911
4031
  type: Component,
3912
4032
  args: [{
3913
4033
  selector: 'rulecms-project-css-fonts-stylesheet',
3914
4034
  standalone: true,
4035
+ imports: [StyleElementDirective],
3915
4036
  template: `
3916
4037
  @if (href) {
3917
4038
  <link rel="stylesheet" [attr.href]="href" data-rulecms-project-fonts="" />
3918
4039
  }
3919
4040
  @if (css) {
3920
- <style data-rulecms-project-fonts="" [innerText]="css"></style>
4041
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-fonts" />
3921
4042
  }
3922
4043
  `,
3923
4044
  }]
@@ -4106,18 +4227,19 @@ class ProjectCssKeyframesStylesheetComponent {
4106
4227
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssKeyframesStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4107
4228
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssKeyframesStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-keyframes-stylesheet", inputs: { publishedKey: "publishedKey", keyframes: "keyframes" }, ngImport: i0, template: `
4108
4229
  @if (css) {
4109
- <style data-rulecms-project-keyframes="" [innerText]="css"></style>
4230
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-keyframes" />
4110
4231
  }
4111
- `, isInline: true }); }
4232
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4112
4233
  }
4113
4234
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssKeyframesStylesheetComponent, decorators: [{
4114
4235
  type: Component,
4115
4236
  args: [{
4116
4237
  selector: 'rulecms-project-css-keyframes-stylesheet',
4117
4238
  standalone: true,
4239
+ imports: [StyleElementDirective],
4118
4240
  template: `
4119
4241
  @if (css) {
4120
- <style data-rulecms-project-keyframes="" [innerText]="css"></style>
4242
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-keyframes" />
4121
4243
  }
4122
4244
  `,
4123
4245
  }]
@@ -4230,18 +4352,25 @@ class ProjectCssPositionTryStylesheetComponent {
4230
4352
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssPositionTryStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4231
4353
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssPositionTryStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-position-try-stylesheet", inputs: { publishedKey: "publishedKey", positionTry: "positionTry" }, ngImport: i0, template: `
4232
4354
  @if (css) {
4233
- <style data-rulecms-project-position-try="" [innerText]="css"></style>
4355
+ <ng-container
4356
+ [rulecmsStyleElement]="css"
4357
+ rulecmsStyleElementMarker="data-rulecms-project-position-try"
4358
+ />
4234
4359
  }
4235
- `, isInline: true }); }
4360
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4236
4361
  }
4237
4362
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssPositionTryStylesheetComponent, decorators: [{
4238
4363
  type: Component,
4239
4364
  args: [{
4240
4365
  selector: 'rulecms-project-css-position-try-stylesheet',
4241
4366
  standalone: true,
4367
+ imports: [StyleElementDirective],
4242
4368
  template: `
4243
4369
  @if (css) {
4244
- <style data-rulecms-project-position-try="" [innerText]="css"></style>
4370
+ <ng-container
4371
+ [rulecmsStyleElement]="css"
4372
+ rulecmsStyleElementMarker="data-rulecms-project-position-try"
4373
+ />
4245
4374
  }
4246
4375
  `,
4247
4376
  }]
@@ -4368,18 +4497,25 @@ class ProjectCssPropertiesStylesheetComponent {
4368
4497
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssPropertiesStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4369
4498
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssPropertiesStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-properties-stylesheet", inputs: { publishedKey: "publishedKey", cssProperties: "cssProperties" }, ngImport: i0, template: `
4370
4499
  @if (css) {
4371
- <style data-rulecms-project-css-properties="" [innerText]="css"></style>
4500
+ <ng-container
4501
+ [rulecmsStyleElement]="css"
4502
+ rulecmsStyleElementMarker="data-rulecms-project-css-properties"
4503
+ />
4372
4504
  }
4373
- `, isInline: true }); }
4505
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4374
4506
  }
4375
4507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssPropertiesStylesheetComponent, decorators: [{
4376
4508
  type: Component,
4377
4509
  args: [{
4378
4510
  selector: 'rulecms-project-css-properties-stylesheet',
4379
4511
  standalone: true,
4512
+ imports: [StyleElementDirective],
4380
4513
  template: `
4381
4514
  @if (css) {
4382
- <style data-rulecms-project-css-properties="" [innerText]="css"></style>
4515
+ <ng-container
4516
+ [rulecmsStyleElement]="css"
4517
+ rulecmsStyleElementMarker="data-rulecms-project-css-properties"
4518
+ />
4383
4519
  }
4384
4520
  `,
4385
4521
  }]
@@ -4562,18 +4698,19 @@ class ProjectCssThemesStylesheetComponent {
4562
4698
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssThemesStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4563
4699
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssThemesStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-themes-stylesheet", inputs: { publishedKey: "publishedKey", themes: "themes" }, ngImport: i0, template: `
4564
4700
  @if (css) {
4565
- <style data-rulecms-project-themes="" [innerText]="css"></style>
4701
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-themes" />
4566
4702
  }
4567
- `, isInline: true }); }
4703
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4568
4704
  }
4569
4705
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssThemesStylesheetComponent, decorators: [{
4570
4706
  type: Component,
4571
4707
  args: [{
4572
4708
  selector: 'rulecms-project-css-themes-stylesheet',
4573
4709
  standalone: true,
4710
+ imports: [StyleElementDirective],
4574
4711
  template: `
4575
4712
  @if (css) {
4576
- <style data-rulecms-project-themes="" [innerText]="css"></style>
4713
+ <ng-container [rulecmsStyleElement]="css" rulecmsStyleElementMarker="data-rulecms-project-themes" />
4577
4714
  }
4578
4715
  `,
4579
4716
  }]
@@ -4595,18 +4732,25 @@ class ProjectCssVariablesStylesheetComponent {
4595
4732
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssVariablesStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4596
4733
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssVariablesStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-variables-stylesheet", inputs: { publishedKey: "publishedKey", variables: "variables" }, ngImport: i0, template: `
4597
4734
  @if (css) {
4598
- <style data-rulecms-project-css-variables="" [innerText]="css"></style>
4735
+ <ng-container
4736
+ [rulecmsStyleElement]="css"
4737
+ rulecmsStyleElementMarker="data-rulecms-project-css-variables"
4738
+ />
4599
4739
  }
4600
- `, isInline: true }); }
4740
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4601
4741
  }
4602
4742
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssVariablesStylesheetComponent, decorators: [{
4603
4743
  type: Component,
4604
4744
  args: [{
4605
4745
  selector: 'rulecms-project-css-variables-stylesheet',
4606
4746
  standalone: true,
4747
+ imports: [StyleElementDirective],
4607
4748
  template: `
4608
4749
  @if (css) {
4609
- <style data-rulecms-project-css-variables="" [innerText]="css"></style>
4750
+ <ng-container
4751
+ [rulecmsStyleElement]="css"
4752
+ rulecmsStyleElementMarker="data-rulecms-project-css-variables"
4753
+ />
4610
4754
  }
4611
4755
  `,
4612
4756
  }]
@@ -4717,18 +4861,25 @@ class ProjectCssWidgetChromeStylesheetComponent {
4717
4861
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssWidgetChromeStylesheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4718
4862
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: ProjectCssWidgetChromeStylesheetComponent, isStandalone: true, selector: "rulecms-project-css-widget-chrome-stylesheet", inputs: { publishedKey: "publishedKey", widgetChrome: "widgetChrome" }, ngImport: i0, template: `
4719
4863
  @if (css) {
4720
- <style data-rulecms-project-widget-chrome="" [innerText]="css"></style>
4864
+ <ng-container
4865
+ [rulecmsStyleElement]="css"
4866
+ rulecmsStyleElementMarker="data-rulecms-project-widget-chrome"
4867
+ />
4721
4868
  }
4722
- `, isInline: true }); }
4869
+ `, isInline: true, dependencies: [{ kind: "directive", type: StyleElementDirective, selector: "ng-container[rulecmsStyleElement]", inputs: ["rulecmsStyleElement", "rulecmsStyleElementMarker"] }] }); }
4723
4870
  }
4724
4871
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ProjectCssWidgetChromeStylesheetComponent, decorators: [{
4725
4872
  type: Component,
4726
4873
  args: [{
4727
4874
  selector: 'rulecms-project-css-widget-chrome-stylesheet',
4728
4875
  standalone: true,
4876
+ imports: [StyleElementDirective],
4729
4877
  template: `
4730
4878
  @if (css) {
4731
- <style data-rulecms-project-widget-chrome="" [innerText]="css"></style>
4879
+ <ng-container
4880
+ [rulecmsStyleElement]="css"
4881
+ rulecmsStyleElementMarker="data-rulecms-project-widget-chrome"
4882
+ />
4732
4883
  }
4733
4884
  `,
4734
4885
  }]