@ng-prism/core 21.7.1 → 21.8.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.
Files changed (53) hide show
  1. package/README.md +5 -5
  2. package/dist/app/index.d.ts +2 -2
  3. package/dist/app/index.d.ts.map +1 -1
  4. package/dist/app/index.js +4 -1
  5. package/dist/app/panels/a11y/a11y-audit.service.d.ts +2 -0
  6. package/dist/app/panels/a11y/a11y-audit.service.d.ts.map +1 -1
  7. package/dist/app/panels/a11y/a11y-audit.service.js +15 -2
  8. package/dist/app/panels/a11y/a11y-keyboard.component.d.ts +1 -2
  9. package/dist/app/panels/a11y/a11y-keyboard.component.d.ts.map +1 -1
  10. package/dist/app/panels/a11y/a11y-keyboard.component.js +4 -5
  11. package/dist/app/panels/a11y/a11y-panel.component.d.ts +2 -1
  12. package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
  13. package/dist/app/panels/a11y/a11y-panel.component.js +10 -19
  14. package/dist/app/panels/a11y/a11y-sr.component.d.ts +1 -2
  15. package/dist/app/panels/a11y/a11y-sr.component.d.ts.map +1 -1
  16. package/dist/app/panels/a11y/a11y-sr.component.js +4 -5
  17. package/dist/app/panels/a11y/a11y-tree.component.d.ts +3 -2
  18. package/dist/app/panels/a11y/a11y-tree.component.d.ts.map +1 -1
  19. package/dist/app/panels/a11y/a11y-tree.component.js +21 -9
  20. package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
  21. package/dist/app/renderer/prism-renderer.component.js +8 -5
  22. package/dist/app/renderer/snippet-generator.d.ts.map +1 -1
  23. package/dist/app/renderer/snippet-generator.js +6 -3
  24. package/dist/app/services/prism-persistence.service.d.ts +20 -0
  25. package/dist/app/services/prism-persistence.service.d.ts.map +1 -0
  26. package/dist/app/services/prism-persistence.service.js +139 -0
  27. package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
  28. package/dist/app/services/prism-renderer.service.js +8 -2
  29. package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
  30. package/dist/app/services/prism-url-state.service.js +12 -2
  31. package/dist/app/shell/prism-shell.component.d.ts +1 -0
  32. package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
  33. package/dist/app/shell/prism-shell.component.js +4 -1
  34. package/dist/builder/config-loader/config-loader.d.ts.map +1 -1
  35. package/dist/builder/config-loader/config-loader.js +9 -3
  36. package/dist/builder/plugin-runner/plugin-runner.d.ts.map +1 -1
  37. package/dist/builder/plugin-runner/plugin-runner.js +40 -14
  38. package/dist/builder/scanner/component.scanner.js +9 -4
  39. package/dist/builder/scanner/entry-point-discovery.js +24 -15
  40. package/dist/builder/serve/index.d.ts.map +1 -1
  41. package/dist/builder/serve/index.js +8 -4
  42. package/dist/builder/shared/prism-pipeline.js +11 -3
  43. package/dist/builder/watcher/prism-watcher.d.ts.map +1 -1
  44. package/dist/builder/watcher/prism-watcher.js +31 -20
  45. package/dist/config/index.d.ts +1 -1
  46. package/dist/config/index.d.ts.map +1 -1
  47. package/dist/plugin/define-config.d.ts.map +1 -1
  48. package/dist/plugin/define-config.js +20 -0
  49. package/dist/plugin/plugin.types.d.ts +2 -0
  50. package/dist/plugin/plugin.types.d.ts.map +1 -1
  51. package/dist/schematics/ng-add/index.d.ts.map +1 -1
  52. package/dist/schematics/ng-add/index.js +79 -59
  53. package/package.json +15 -3
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # ng-prism
2
2
 
3
- Lightweight, Angular-native component showcase tool. Annotate components with `@Showcase` no separate story files needed.
3
+ **ng-prism** is the Angular-native Storybook alternative. A lightweight component showcase tool that scans your library at build time and renders interactive demos — annotate components with `@Showcase`, no separate story files needed.
4
4
 
5
- [![Angular](https://img.shields.io/badge/Angular-19+-dd0031)](https://angular.dev)
6
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178c6)](https://www.typescriptlang.org)
5
+ [![Angular](https://img.shields.io/badge/Angular-21+-dd0031)](https://angular.dev)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5+-3178c6)](https://www.typescriptlang.org)
7
7
  [![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
8
8
 
9
9
  **[Live Demo](https://dyingangel666.github.io/ng-prism/demo/)** · **[Documentation](https://dyingangel666.github.io/ng-prism/)**
@@ -150,8 +150,8 @@ Link to a `@Showcase`-decorated component for combined API docs + custom renderi
150
150
 
151
151
  ## Requirements
152
152
 
153
- - Angular >= 19
154
- - TypeScript >= 5.9
153
+ - Angular >= 21
154
+ - TypeScript >= 5.5
155
155
  - Components must use `input()` / `output()` signals
156
156
 
157
157
  ## License
@@ -1,5 +1,4 @@
1
- export { PRISM_MANIFEST, PRISM_CONFIG, PRISM_RENDERER_HOOKS, } from './tokens/prism-tokens.js';
2
- export type { PrismRendererHooks } from './tokens/prism-tokens.js';
1
+ export { PRISM_MANIFEST, PRISM_CONFIG, } from './tokens/prism-tokens.js';
3
2
  export { PRISM_DEFAULT_THEME, PRISM_DARK_THEME, PRISM_LIGHT_THEME, PRISM_BASE_TOKENS, } from './theme/prism-default-theme.js';
4
3
  export { PrismThemeService } from './services/prism-theme.service.js';
5
4
  export type { NavigationItem } from './services/navigation-item.types.js';
@@ -11,6 +10,7 @@ export { PrismEventLogService, type EventLogEntry, } from './services/prism-even
11
10
  export { PrismPluginService } from './services/prism-plugin.service.js';
12
11
  export { PrismLayoutService } from './services/prism-layout.service.js';
13
12
  export { PrismUrlStateService } from './services/prism-url-state.service.js';
13
+ export { PrismPersistenceService } from './services/prism-persistence.service.js';
14
14
  export { PrismShellComponent } from './shell/prism-shell.component.js';
15
15
  export { PrismPageRendererComponent } from './page-renderer/prism-page-renderer.component.js';
16
16
  export { providePrism } from './provide-prism.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,YAAY,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,KAAK,aAAa,GACnB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAG9F,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,YAAY,GACb,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,YAAY,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,KAAK,aAAa,GACnB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAG9F,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
package/dist/app/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // Tokens
2
- export { PRISM_MANIFEST, PRISM_CONFIG, PRISM_RENDERER_HOOKS, } from './tokens/prism-tokens.js';
2
+ // PRISM_RENDERER_HOOKS + PrismRendererHooks are exported from the plugin entry point
3
+ // (src/plugin/index.ts) since they belong to the plugin API surface.
4
+ export { PRISM_MANIFEST, PRISM_CONFIG, } from './tokens/prism-tokens.js';
3
5
  // Theme
4
6
  export { PRISM_DEFAULT_THEME, PRISM_DARK_THEME, PRISM_LIGHT_THEME, PRISM_BASE_TOKENS, } from './theme/prism-default-theme.js';
5
7
  export { PrismThemeService } from './services/prism-theme.service.js';
@@ -12,6 +14,7 @@ export { PrismEventLogService, } from './services/prism-event-log.service.js';
12
14
  export { PrismPluginService } from './services/prism-plugin.service.js';
13
15
  export { PrismLayoutService } from './services/prism-layout.service.js';
14
16
  export { PrismUrlStateService } from './services/prism-url-state.service.js';
17
+ export { PrismPersistenceService } from './services/prism-persistence.service.js';
15
18
  // Shell (root component)
16
19
  export { PrismShellComponent } from './shell/prism-shell.component.js';
17
20
  // Page renderers
@@ -9,6 +9,8 @@ export declare class A11yAuditService {
9
9
  readonly error: import("@angular/core").WritableSignal<string | null>;
10
10
  readonly scoreResult: import("@angular/core").Signal<A11yScoreResult | null>;
11
11
  private timer;
12
+ private destroyed;
13
+ constructor();
12
14
  scheduleAudit(element: Element, config?: A11yCoreConfig, debounceMs?: number): void;
13
15
  clear(): void;
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<A11yAuditService, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"a11y-audit.service.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-audit.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;;AAEvE,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,eAAe,CAkBnE;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAYjG;AAED,qBACa,gBAAgB;IAC3B,QAAQ,CAAC,OAAO,4DAAmC;IACnD,QAAQ,CAAC,OAAO,kDAAiB;IACjC,QAAQ,CAAC,KAAK,wDAA+B;IAE7C,QAAQ,CAAC,WAAW,yDAGjB;IAEH,OAAO,CAAC,KAAK,CAA8C;IAE3D,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc,EAAE,UAAU,SAAM,GAAG,IAAI;IAmBhF,KAAK,IAAI,IAAI;yCA/BF,gBAAgB;6CAAhB,gBAAgB;CAwC5B"}
1
+ {"version":3,"file":"a11y-audit.service.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-audit.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;;AAEvE,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,eAAe,CAkBnE;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAYjG;AAED,qBACa,gBAAgB;IAC3B,QAAQ,CAAC,OAAO,4DAAmC;IACnD,QAAQ,CAAC,OAAO,kDAAiB;IACjC,QAAQ,CAAC,KAAK,wDAA+B;IAE7C,QAAQ,CAAC,WAAW,yDAGjB;IAEH,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,SAAS,CAAS;;IAS1B,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc,EAAE,UAAU,SAAM,GAAG,IAAI;IAsBhF,KAAK,IAAI,IAAI;yCA1CF,gBAAgB;6CAAhB,gBAAgB;CAmD5B"}
@@ -1,4 +1,4 @@
1
- import { computed, Injectable, signal } from '@angular/core';
1
+ import { computed, DestroyRef, inject, Injectable, signal } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export function calculateScore(results) {
4
4
  const violations = results.violations;
@@ -38,16 +38,29 @@ export class A11yAuditService {
38
38
  return r ? calculateScore(r) : null;
39
39
  }, ...(ngDevMode ? [{ debugName: "scoreResult" }] : []));
40
40
  timer = null;
41
+ destroyed = false;
42
+ constructor() {
43
+ inject(DestroyRef).onDestroy(() => {
44
+ this.destroyed = true;
45
+ this.clear();
46
+ });
47
+ }
41
48
  scheduleAudit(element, config, debounceMs = 500) {
49
+ if (this.destroyed)
50
+ return;
42
51
  if (this.timer)
43
52
  clearTimeout(this.timer);
44
53
  this.running.set(true);
45
54
  this.error.set(null);
46
55
  this.timer = setTimeout(() => {
47
56
  runCoreAudit(element, config).then((result) => {
57
+ if (this.destroyed)
58
+ return;
48
59
  this.results.set(result);
49
60
  this.running.set(false);
50
61
  }, (err) => {
62
+ if (this.destroyed)
63
+ return;
51
64
  this.error.set(err instanceof Error ? err.message : String(err));
52
65
  this.running.set(false);
53
66
  });
@@ -68,4 +81,4 @@ export class A11yAuditService {
68
81
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yAuditService, [{
69
82
  type: Injectable,
70
83
  args: [{ providedIn: 'root' }]
71
- }], null, null); })();
84
+ }], () => [], null); })();
@@ -3,10 +3,9 @@ import * as i0 from "@angular/core";
3
3
  export declare class A11yKeyboardComponent {
4
4
  protected readonly rendererService: PrismRendererService;
5
5
  private readonly keyboardService;
6
- readonly activeComponent: import("@angular/core").InputSignal<unknown>;
7
6
  protected readonly items: import("@angular/core").Signal<import("./a11y.types.js").FocusableElement[]>;
8
7
  protected typeAttr(el: Element): string;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<A11yKeyboardComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<A11yKeyboardComponent, "prism-a11y-keyboard", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<A11yKeyboardComponent, "prism-a11y-keyboard", never, {}, {}, never, never, true, never>;
11
10
  }
12
11
  //# sourceMappingURL=a11y-keyboard.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y-keyboard.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-keyboard.component.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;;AAEhF,qBAwFa,qBAAqB;IAChC,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA+B;IAE/D,QAAQ,CAAC,eAAe,+CAAwB;IAEhD,SAAS,CAAC,QAAQ,CAAC,KAAK,+EAQrB;IAEH,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM;yCAhB5B,qBAAqB;2CAArB,qBAAqB;CAoBjC"}
1
+ {"version":3,"file":"a11y-keyboard.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-keyboard.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;;AAEhF,qBAwFa,qBAAqB;IAChC,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA+B;IAE/D,SAAS,CAAC,QAAQ,CAAC,KAAK,+EAQrB;IAEH,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM;yCAd5B,qBAAqB;2CAArB,qBAAqB;CAkBjC"}
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, computed, inject, input, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, computed, inject, } from '@angular/core';
2
2
  import { A11yKeyboardService } from './a11y-keyboard.service.js';
3
3
  import { PrismRendererService } from '../../services/prism-renderer.service.js';
4
4
  import * as i0 from "@angular/core";
@@ -54,7 +54,6 @@ function A11yKeyboardComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
54
54
  export class A11yKeyboardComponent {
55
55
  rendererService = inject(PrismRendererService);
56
56
  keyboardService = inject(A11yKeyboardService);
57
- activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
58
57
  items = computed(() => {
59
58
  const root = this.rendererService.renderedElement();
60
59
  if (!root)
@@ -67,7 +66,7 @@ export class A11yKeyboardComponent {
67
66
  return type ? `[type=${type}]` : '';
68
67
  }
69
68
  static ɵfac = function A11yKeyboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yKeyboardComponent)(); };
70
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yKeyboardComponent, selectors: [["prism-a11y-keyboard"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 3, vars: 1, consts: [[1, "kb-empty"], [1, "kb-body"], [1, "kb-row"], [1, "kb-keys"], [1, "kb-desc"], [1, "kb-tgt"]], template: function A11yKeyboardComponent_Template(rf, ctx) { if (rf & 1) {
69
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yKeyboardComponent, selectors: [["prism-a11y-keyboard"]], decls: 3, vars: 1, consts: [[1, "kb-empty"], [1, "kb-body"], [1, "kb-row"], [1, "kb-keys"], [1, "kb-desc"], [1, "kb-tgt"]], template: function A11yKeyboardComponent_Template(rf, ctx) { if (rf & 1) {
71
70
  i0.ɵɵconditionalCreate(0, A11yKeyboardComponent_Conditional_0_Template, 2, 0, "div", 0)(1, A11yKeyboardComponent_Conditional_1_Template, 2, 0, "div", 0)(2, A11yKeyboardComponent_Conditional_2_Template, 3, 0, "div", 1);
72
71
  } if (rf & 2) {
73
72
  i0.ɵɵconditional(!ctx.rendererService.renderedElement() ? 0 : !ctx.items().length ? 1 : 2);
@@ -107,5 +106,5 @@ export class A11yKeyboardComponent {
107
106
  </div>
108
107
  }
109
108
  `, styles: ["\n :host { display: block; height: 100%; overflow: auto; }\n\n .kb-empty {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--prism-text-muted); font-size: 13px;\n }\n\n .kb-body {\n padding: 16px 20px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .kb-row {\n display: grid;\n grid-template-columns: 110px 1fr auto;\n align-items: center;\n gap: 12px;\n padding: 9px 14px;\n background: var(--prism-bg-surface);\n border: 1px solid var(--prism-border);\n border-radius: 8px;\n }\n\n .kb-keys { display: flex; gap: 4px; }\n .kb-keys kbd {\n font-family: var(--font-mono);\n font-size: 10.5px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n }\n\n .kb-desc {\n font-size: 12.5px;\n color: var(--prism-text-2);\n }\n\n .kb-tgt {\n font-family: var(--font-mono);\n font-size: 11px;\n color: var(--prism-primary);\n padding: 2px 7px;\n background: color-mix(in srgb, var(--prism-primary) 10%, transparent);\n border-radius: var(--radius-xs);\n }\n "] }]
110
- }], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
111
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yKeyboardComponent, { className: "A11yKeyboardComponent", filePath: "app/panels/a11y/a11y-keyboard.component.ts", lineNumber: 99 }); })();
109
+ }], null, null); })();
110
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yKeyboardComponent, { className: "A11yKeyboardComponent", filePath: "app/panels/a11y/a11y-keyboard.component.ts", lineNumber: 98 }); })();
@@ -1,9 +1,10 @@
1
1
  import { A11yPanelStateService } from './a11y-panel-state.service.js';
2
+ import type { RuntimeComponent } from '../../../plugin/plugin.types.js';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class A11yPanelComponent {
4
5
  private readonly auditService;
5
6
  protected readonly state: A11yPanelStateService;
6
- readonly activeComponent: import("@angular/core").InputSignal<unknown>;
7
+ readonly activeComponent: import("@angular/core").InputSignal<RuntimeComponent | null>;
7
8
  protected readonly disabled: import("@angular/core").Signal<boolean>;
8
9
  protected readonly violationCount: import("@angular/core").Signal<number | null>;
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<A11yPanelComponent, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"a11y-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-panel.component.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;AAGtE,qBAgJa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IACzD,SAAS,CAAC,QAAQ,CAAC,KAAK,wBAAiC;IAEzD,QAAQ,CAAC,eAAe,+CAAwB;IAEhD,SAAS,CAAC,QAAQ,CAAC,QAAQ,0CAKxB;IAEH,SAAS,CAAC,QAAQ,CAAC,cAAc,gDAG9B;yCAhBQ,kBAAkB;2CAAlB,kBAAkB;CAiB9B"}
1
+ {"version":3,"file":"a11y-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-panel.component.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;;AAExE,qBAgJa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IACzD,SAAS,CAAC,QAAQ,CAAC,KAAK,wBAAiC;IAEzD,QAAQ,CAAC,eAAe,+DAAwC;IAEhE,SAAS,CAAC,QAAQ,CAAC,QAAQ,0CAIxB;IAEH,SAAS,CAAC,QAAQ,CAAC,cAAc,gDAG9B;yCAfQ,kBAAkB;2CAAlB,kBAAkB;CAgB9B"}
@@ -25,25 +25,16 @@ function A11yPanelComponent_Conditional_13_Case_0_Template(rf, ctx) { if (rf & 1
25
25
  i0.ɵɵelement(0, "prism-a11y-violations");
26
26
  } }
27
27
  function A11yPanelComponent_Conditional_13_Case_1_Template(rf, ctx) { if (rf & 1) {
28
- i0.ɵɵelement(0, "prism-a11y-keyboard", 7);
29
- } if (rf & 2) {
30
- const ctx_r0 = i0.ɵɵnextContext(2);
31
- i0.ɵɵproperty("activeComponent", ctx_r0.activeComponent());
28
+ i0.ɵɵelement(0, "prism-a11y-keyboard");
32
29
  } }
33
30
  function A11yPanelComponent_Conditional_13_Case_2_Template(rf, ctx) { if (rf & 1) {
34
- i0.ɵɵelement(0, "prism-a11y-tree", 7);
35
- } if (rf & 2) {
36
- const ctx_r0 = i0.ɵɵnextContext(2);
37
- i0.ɵɵproperty("activeComponent", ctx_r0.activeComponent());
31
+ i0.ɵɵelement(0, "prism-a11y-tree");
38
32
  } }
39
33
  function A11yPanelComponent_Conditional_13_Case_3_Template(rf, ctx) { if (rf & 1) {
40
- i0.ɵɵelement(0, "prism-a11y-sr", 7);
41
- } if (rf & 2) {
42
- const ctx_r0 = i0.ɵɵnextContext(2);
43
- i0.ɵɵproperty("activeComponent", ctx_r0.activeComponent());
34
+ i0.ɵɵelement(0, "prism-a11y-sr");
44
35
  } }
45
36
  function A11yPanelComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
46
- i0.ɵɵconditionalCreate(0, A11yPanelComponent_Conditional_13_Case_0_Template, 1, 0, "prism-a11y-violations")(1, A11yPanelComponent_Conditional_13_Case_1_Template, 1, 1, "prism-a11y-keyboard", 7)(2, A11yPanelComponent_Conditional_13_Case_2_Template, 1, 1, "prism-a11y-tree", 7)(3, A11yPanelComponent_Conditional_13_Case_3_Template, 1, 1, "prism-a11y-sr", 7);
37
+ i0.ɵɵconditionalCreate(0, A11yPanelComponent_Conditional_13_Case_0_Template, 1, 0, "prism-a11y-violations")(1, A11yPanelComponent_Conditional_13_Case_1_Template, 1, 0, "prism-a11y-keyboard")(2, A11yPanelComponent_Conditional_13_Case_2_Template, 1, 0, "prism-a11y-tree")(3, A11yPanelComponent_Conditional_13_Case_3_Template, 1, 0, "prism-a11y-sr");
47
38
  } if (rf & 2) {
48
39
  let tmp_1_0;
49
40
  const ctx_r0 = i0.ɵɵnextContext();
@@ -55,7 +46,7 @@ export class A11yPanelComponent {
55
46
  activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
56
47
  disabled = computed(() => {
57
48
  const comp = this.activeComponent();
58
- const config = comp?.meta?.showcaseConfig?.meta?.['a11y'];
49
+ const config = comp?.meta.showcaseConfig.meta?.['a11y'];
59
50
  return config?.disable === true;
60
51
  }, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
61
52
  violationCount = computed(() => {
@@ -63,7 +54,7 @@ export class A11yPanelComponent {
63
54
  return r ? r.violations.length : null;
64
55
  }, ...(ngDevMode ? [{ debugName: "violationCount" }] : []));
65
56
  static ɵfac = function A11yPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yPanelComponent)(); };
66
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yPanelComponent, selectors: [["prism-a11y-panel"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 14, vars: 10, consts: [[1, "a11y-panel"], [1, "subtabs"], [1, "st-tab", 3, "click"], [1, "st-badge", 3, "st-badge--ok", "st-badge--warn"], [1, "a11y-content"], [1, "a11y-disabled"], [1, "st-badge"], [3, "activeComponent"]], template: function A11yPanelComponent_Template(rf, ctx) { if (rf & 1) {
57
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yPanelComponent, selectors: [["prism-a11y-panel"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 14, vars: 10, consts: [[1, "a11y-panel"], [1, "subtabs"], [1, "st-tab", 3, "click"], [1, "st-badge", 3, "st-badge--ok", "st-badge--warn"], [1, "a11y-content"], [1, "a11y-disabled"], [1, "st-badge"]], template: function A11yPanelComponent_Template(rf, ctx) { if (rf & 1) {
67
58
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "button", 2);
68
59
  i0.ɵɵlistener("click", function A11yPanelComponent_Template_button_click_2_listener() { return ctx.state.activeTab.set("violations"); });
69
60
  i0.ɵɵtext(3, " Violations ");
@@ -157,12 +148,12 @@ export class A11yPanelComponent {
157
148
  </div>
158
149
  } @else { @switch (state.activeTab()) { @case ('violations') {
159
150
  <prism-a11y-violations /> } @case ('keyboard') {
160
- <prism-a11y-keyboard [activeComponent]="activeComponent()" /> } @case
161
- ('tree') { <prism-a11y-tree [activeComponent]="activeComponent()" /> }
162
- @case ('sr') { <prism-a11y-sr [activeComponent]="activeComponent()" /> }
151
+ <prism-a11y-keyboard /> } @case
152
+ ('tree') { <prism-a11y-tree /> }
153
+ @case ('sr') { <prism-a11y-sr /> }
163
154
  } }
164
155
  </div>
165
156
  </div>
166
157
  `, styles: ["\n :host { display: flex; flex-direction: column; height: 100%; }\n\n .a11y-panel { display: flex; flex-direction: column; height: 100%; }\n\n .subtabs {\n display: flex;\n gap: 2px;\n padding: 10px 20px 0;\n border-bottom: 1px solid var(--prism-border);\n background: var(--prism-bg-elevated);\n position: sticky;\n top: 0;\n z-index: 2;\n }\n\n .st-tab {\n padding: 7px 12px;\n font-size: 12px;\n font-weight: 500;\n color: var(--prism-text-muted);\n border-radius: var(--radius-sm) var(--radius-sm) 0 0;\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n background: none;\n border: none;\n cursor: pointer;\n font-family: var(--font-sans);\n transition: color var(--dur-fast);\n }\n .st-tab:hover { color: var(--prism-text-2); }\n .st-tab--active { color: var(--prism-text); }\n .st-tab--active::after {\n content: '';\n position: absolute;\n left: 8px;\n right: 8px;\n bottom: -1px;\n height: 2px;\n background: var(--prism-primary);\n border-radius: 1px;\n }\n\n .st-badge {\n min-width: 16px;\n height: 16px;\n padding: 0 5px;\n border-radius: 8px;\n font-family: var(--font-mono);\n font-size: 10px;\n font-weight: 700;\n display: grid;\n place-items: center;\n background: color-mix(in srgb, var(--prism-primary) 18%, transparent);\n color: var(--prism-primary);\n }\n .st-badge--ok {\n background: color-mix(in srgb, var(--prism-success) 18%, transparent);\n color: var(--prism-success);\n }\n .st-badge--warn {\n background: color-mix(in srgb, var(--prism-warn) 18%, transparent);\n color: var(--prism-warn);\n }\n\n .a11y-content { flex: 1; overflow: auto; min-height: 0; }\n\n .a11y-disabled {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n color: var(--prism-text-muted);\n font-size: 13px;\n }\n "] }]
167
158
  }], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
168
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yPanelComponent, { className: "A11yPanelComponent", filePath: "app/panels/a11y/a11y-panel.component.ts", lineNumber: 160 }); })();
159
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yPanelComponent, { className: "A11yPanelComponent", filePath: "app/panels/a11y/a11y-panel.component.ts", lineNumber: 161 }); })();
@@ -3,9 +3,8 @@ import * as i0 from "@angular/core";
3
3
  export declare class A11ySrComponent {
4
4
  protected readonly rendererService: PrismRendererService;
5
5
  private readonly srService;
6
- readonly activeComponent: import("@angular/core").InputSignal<unknown>;
7
6
  protected readonly announcements: import("@angular/core").Signal<import("./a11y.types.js").SrAnnouncement[]>;
8
7
  static ɵfac: i0.ɵɵFactoryDeclaration<A11ySrComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<A11ySrComponent, "prism-a11y-sr", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<A11ySrComponent, "prism-a11y-sr", never, {}, {}, never, never, true, never>;
10
9
  }
11
10
  //# sourceMappingURL=a11y-sr.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y-sr.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-sr.component.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;;AAEhF,qBAkFa,eAAe;IAC1B,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,QAAQ,CAAC,eAAe,+CAAwB;IAEhD,SAAS,CAAC,QAAQ,CAAC,aAAa,6EAQ7B;yCAdQ,eAAe;2CAAf,eAAe;CAe3B"}
1
+ {"version":3,"file":"a11y-sr.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-sr.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;;AAEhF,qBAkFa,eAAe;IAC1B,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,SAAS,CAAC,QAAQ,CAAC,aAAa,6EAQ7B;yCAZQ,eAAe;2CAAf,eAAe;CAa3B"}
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, computed, inject, input, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, computed, inject, } from '@angular/core';
2
2
  import { A11ySrService } from './a11y-sr.service.js';
3
3
  import { PrismRendererService } from '../../services/prism-renderer.service.js';
4
4
  import * as i0 from "@angular/core";
@@ -64,7 +64,6 @@ function A11ySrComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
64
64
  export class A11ySrComponent {
65
65
  rendererService = inject(PrismRendererService);
66
66
  srService = inject(A11ySrService);
67
- activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
68
67
  announcements = computed(() => {
69
68
  const root = this.rendererService.renderedElement();
70
69
  if (!root)
@@ -73,7 +72,7 @@ export class A11ySrComponent {
73
72
  return this.srService.buildAnnouncementList(root, doc ? (id) => doc.getElementById(id) : undefined);
74
73
  }, ...(ngDevMode ? [{ debugName: "announcements" }] : []));
75
74
  static ɵfac = function A11ySrComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11ySrComponent)(); };
76
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11ySrComponent, selectors: [["prism-a11y-sr"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 3, vars: 1, consts: [[1, "sr-empty"], [1, "sr-body"], [1, "sr-line"], [1, "sr-step"], [1, "sr-text"], [1, "sr-name"]], template: function A11ySrComponent_Template(rf, ctx) { if (rf & 1) {
75
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11ySrComponent, selectors: [["prism-a11y-sr"]], decls: 3, vars: 1, consts: [[1, "sr-empty"], [1, "sr-body"], [1, "sr-line"], [1, "sr-step"], [1, "sr-text"], [1, "sr-name"]], template: function A11ySrComponent_Template(rf, ctx) { if (rf & 1) {
77
76
  i0.ɵɵconditionalCreate(0, A11ySrComponent_Conditional_0_Template, 2, 0, "div", 0)(1, A11ySrComponent_Conditional_1_Template, 2, 0, "div", 0)(2, A11ySrComponent_Conditional_2_Template, 3, 0, "div", 1);
78
77
  } if (rf & 2) {
79
78
  i0.ɵɵconditional(!ctx.rendererService.renderedElement() ? 0 : !ctx.announcements().length ? 1 : 2);
@@ -105,5 +104,5 @@ export class A11ySrComponent {
105
104
  </div>
106
105
  }
107
106
  `, styles: ["\n :host { display: block; height: 100%; overflow: auto; }\n\n .sr-empty {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--prism-text-muted); font-size: 13px;\n }\n\n .sr-body {\n padding: 16px 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .sr-line {\n display: grid;\n grid-template-columns: 56px 1fr;\n gap: 12px;\n padding: 10px 12px;\n background: var(--prism-bg-surface);\n border: 1px solid var(--prism-border);\n border-radius: 8px;\n }\n\n .sr-step {\n font-family: var(--font-mono);\n font-size: 11px;\n color: var(--prism-text-ghost);\n font-weight: 600;\n }\n\n .sr-text {\n font-size: 13px;\n color: var(--prism-text);\n line-height: 1.5;\n }\n\n .sr-name {\n color: var(--prism-primary);\n font-weight: 600;\n font-style: normal;\n }\n\n .sr-text code {\n font-family: var(--font-mono);\n font-size: 11.5px;\n color: var(--prism-text-muted);\n padding: 1px 5px;\n background: var(--prism-input-bg);\n border-radius: var(--radius-xs);\n }\n "] }]
108
- }], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
109
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11ySrComponent, { className: "A11ySrComponent", filePath: "app/panels/a11y/a11y-sr.component.ts", lineNumber: 93 }); })();
107
+ }], null, null); })();
108
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11ySrComponent, { className: "A11ySrComponent", filePath: "app/panels/a11y/a11y-sr.component.ts", lineNumber: 92 }); })();
@@ -6,6 +6,8 @@ export declare class A11yTreeNodeComponent {
6
6
  readonly depth: import("@angular/core").InputSignal<number>;
7
7
  readonly isLast: import("@angular/core").InputSignal<boolean>;
8
8
  protected readonly expanded: import("@angular/core").WritableSignal<boolean>;
9
+ private lastElement;
10
+ constructor();
9
11
  protected readonly stateEntries: import("@angular/core").Signal<{
10
12
  key: string;
11
13
  label: string;
@@ -17,9 +19,8 @@ export declare class A11yTreeNodeComponent {
17
19
  export declare class A11yTreeComponent {
18
20
  protected readonly rendererService: PrismRendererService;
19
21
  private readonly treeService;
20
- readonly activeComponent: import("@angular/core").InputSignal<unknown>;
21
22
  protected readonly tree: import("@angular/core").Signal<A11yNode | null>;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<A11yTreeComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<A11yTreeComponent, "prism-a11y-tree", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<A11yTreeComponent, "prism-a11y-tree", never, {}, {}, never, never, true, never>;
24
25
  }
25
26
  //# sourceMappingURL=a11y-tree.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y-tree.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-tree.component.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;;AAEhD,qBAyEa,qBAAqB;IAChC,QAAQ,CAAC,IAAI,gDAA8B;IAC3C,QAAQ,CAAC,KAAK,8CAAY;IAC1B,QAAQ,CAAC,MAAM,+CAAgB;IAE/B,SAAS,CAAC,QAAQ,CAAC,QAAQ,kDAAgB;IAE3C,SAAS,CAAC,QAAQ,CAAC,YAAY;;;SAQ5B;IAEH,SAAS,CAAC,cAAc,IAAI,IAAI;yCAjBrB,qBAAqB;2CAArB,qBAAqB;CAsBjC;AAED,qBA6Ba,iBAAiB;IAC5B,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;IAEvD,QAAQ,CAAC,eAAe,+CAAwB;IAEhD,SAAS,CAAC,QAAQ,CAAC,IAAI,kDAQpB;yCAdQ,iBAAiB;2CAAjB,iBAAiB;CAe7B"}
1
+ {"version":3,"file":"a11y-tree.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-tree.component.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;;AAEhD,qBAyEa,qBAAqB;IAChC,QAAQ,CAAC,IAAI,gDAA8B;IAC3C,QAAQ,CAAC,KAAK,8CAAY;IAC1B,QAAQ,CAAC,MAAM,+CAAgB;IAE/B,SAAS,CAAC,QAAQ,CAAC,QAAQ,kDAAgB;IAC3C,OAAO,CAAC,WAAW,CAAwB;;IAc3C,SAAS,CAAC,QAAQ,CAAC,YAAY;;;SAQ5B;IAEH,SAAS,CAAC,cAAc,IAAI,IAAI;yCA9BrB,qBAAqB;2CAArB,qBAAqB;CAmCjC;AAED,qBA6Ba,iBAAiB;IAC5B,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;IAEvD,SAAS,CAAC,QAAQ,CAAC,IAAI,kDAQpB;yCAZQ,iBAAiB;2CAAjB,iBAAiB;CAa7B"}
@@ -1,8 +1,9 @@
1
- import { ChangeDetectionStrategy, Component, computed, inject, input, signal, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal, untracked, } from '@angular/core';
2
2
  import { A11yTreeService } from './a11y-tree.service.js';
3
3
  import { PrismRendererService } from '../../services/prism-renderer.service.js';
4
4
  import * as i0 from "@angular/core";
5
5
  const _forTrack0 = ($index, $item) => $item.key;
6
+ const _forTrack1 = ($index, $item) => $item.element;
6
7
  function A11yTreeNodeComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
7
8
  i0.ɵɵtext(0);
8
9
  } if (rf & 2) {
@@ -48,7 +49,7 @@ function A11yTreeNodeComponent_Conditional_9_For_1_Template(rf, ctx) { if (rf &
48
49
  i0.ɵɵproperty("node", child_r4)("depth", ctx_r0.depth() + 1)("isLast", ɵ$index_23_r5 === ɵ$count_23_r6 - 1);
49
50
  } }
50
51
  function A11yTreeNodeComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
51
- i0.ɵɵrepeaterCreate(0, A11yTreeNodeComponent_Conditional_9_For_1_Template, 1, 3, "prism-a11y-tree-node", 7, i0.ɵɵrepeaterTrackByIndex);
52
+ i0.ɵɵrepeaterCreate(0, A11yTreeNodeComponent_Conditional_9_For_1_Template, 1, 3, "prism-a11y-tree-node", 7, _forTrack1);
52
53
  } if (rf & 2) {
53
54
  const ctx_r0 = i0.ɵɵnextContext();
54
55
  i0.ɵɵrepeater(ctx_r0.node().children);
@@ -72,6 +73,18 @@ export class A11yTreeNodeComponent {
72
73
  depth = input(0, ...(ngDevMode ? [{ debugName: "depth" }] : []));
73
74
  isLast = input(false, ...(ngDevMode ? [{ debugName: "isLast" }] : []));
74
75
  expanded = signal(true, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
76
+ lastElement = null;
77
+ constructor() {
78
+ effect(() => {
79
+ const el = this.node().element;
80
+ untracked(() => {
81
+ if (this.lastElement !== el) {
82
+ this.lastElement = el;
83
+ this.expanded.set(true);
84
+ }
85
+ });
86
+ });
87
+ }
75
88
  stateEntries = computed(() => {
76
89
  const states = this.node().states;
77
90
  return Object.entries(states)
@@ -139,7 +152,7 @@ export class A11yTreeNodeComponent {
139
152
  }
140
153
  </div>
141
154
  @if (expanded() && node().children.length) { @for (child of node().children;
142
- track $index; let last = $last) {
155
+ track child.element; let last = $last) {
143
156
  <prism-a11y-tree-node
144
157
  [node]="child"
145
158
  [depth]="depth() + 1"
@@ -147,12 +160,11 @@ export class A11yTreeNodeComponent {
147
160
  />
148
161
  } }
149
162
  `, styles: ["\n :host { display: block; }\n\n .aria-tree-line {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 0;\n font-family: var(--font-mono);\n font-size: 12.5px;\n line-height: 1.8;\n color: var(--prism-text-2);\n }\n .aria-tree-line--hidden { opacity: 0.4; }\n\n .indent {\n color: var(--prism-text-ghost);\n opacity: 0.5;\n user-select: none;\n flex-shrink: 0;\n white-space: pre;\n font-size: 12px;\n text-align: right;\n }\n\n .tree-toggle {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 10px;\n color: var(--prism-text-muted);\n padding: 0;\n width: 12px;\n flex-shrink: 0;\n }\n\n .role { color: var(--prism-primary); font-weight: 600; }\n .name { color: var(--prism-text); }\n .attr { color: var(--prism-text-ghost); }\n "] }]
150
- }], null, { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }], isLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLast", required: false }] }] }); })();
151
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeNodeComponent, { className: "A11yTreeNodeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 86 }); })();
163
+ }], () => [], { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }], isLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLast", required: false }] }] }); })();
164
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeNodeComponent, { className: "A11yTreeNodeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 88 }); })();
152
165
  export class A11yTreeComponent {
153
166
  rendererService = inject(PrismRendererService);
154
167
  treeService = inject(A11yTreeService);
155
- activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
156
168
  tree = computed(() => {
157
169
  const root = this.rendererService.renderedElement();
158
170
  if (!root)
@@ -161,7 +173,7 @@ export class A11yTreeComponent {
161
173
  return this.treeService.buildTree(root, doc ? (id) => doc.getElementById(id) : undefined);
162
174
  }, ...(ngDevMode ? [{ debugName: "tree" }] : []));
163
175
  static ɵfac = function A11yTreeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yTreeComponent)(); };
164
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeComponent, selectors: [["prism-a11y-tree"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 2, vars: 1, consts: [[1, "tree-empty"], [1, "aria-tree"], [3, "node", "depth", "isLast"]], template: function A11yTreeComponent_Template(rf, ctx) { if (rf & 1) {
176
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeComponent, selectors: [["prism-a11y-tree"]], decls: 2, vars: 1, consts: [[1, "tree-empty"], [1, "aria-tree"], [3, "node", "depth", "isLast"]], template: function A11yTreeComponent_Template(rf, ctx) { if (rf & 1) {
165
177
  i0.ɵɵconditionalCreate(0, A11yTreeComponent_Conditional_0_Template, 2, 0, "div", 0)(1, A11yTreeComponent_Conditional_1_Template, 2, 3, "div", 1);
166
178
  } if (rf & 2) {
167
179
  i0.ɵɵconditional(!ctx.rendererService.renderedElement() ? 0 : ctx.tree() ? 1 : -1);
@@ -180,5 +192,5 @@ export class A11yTreeComponent {
180
192
  </div>
181
193
  }
182
194
  `, styles: ["\n :host { display: block; height: 100%; overflow: auto; }\n\n .aria-tree {\n padding: 14px 20px;\n }\n\n .tree-empty {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--prism-text-muted); font-size: 13px;\n }\n "] }]
183
- }], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
184
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeComponent, { className: "A11yTreeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 139 }); })();
195
+ }], null, null); })();
196
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeComponent, { className: "A11yTreeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 154 }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"prism-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/prism-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAER,KAAK,IAAI,EAIV,MAAM,eAAe,CAAC;AAYvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;;AAGzE,qBAmHa,sBAAsB;IACjC,SAAS,CAAC,QAAQ,CAAC,IAAI,OAAQ;IAC/B,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IACtE,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,SAAS,CAAC,QAAQ,CAAC,aAAa,qBAA8B;IAC9D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAE3B;IAEH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAE5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAEpB;IACH,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,mBAAmB,CAAsC;IACjE,OAAO,CAAC,oBAAoB,CAChB;IACZ,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IACjE,QAAQ,CAAC,aAAa,+DAAsC;IAC5D,SAAS,CAAC,QAAQ,CAAC,aAAa;;MAA6C;IAC7E,SAAS,CAAC,QAAQ,CAAC,eAAe,yFAG/B;;IAuFH,OAAO,CAAC,eAAe;IA6FvB,OAAO,CAAC,OAAO;yCApNJ,sBAAsB;2CAAtB,sBAAsB;CAkOlC"}
1
+ {"version":3,"file":"prism-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/prism-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAER,KAAK,IAAI,EAIV,MAAM,eAAe,CAAC;AAYvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;;AAGzE,qBAwHa,sBAAsB;IACjC,SAAS,CAAC,QAAQ,CAAC,IAAI,OAAQ;IAC/B,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IACtE,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,SAAS,CAAC,QAAQ,CAAC,aAAa,qBAA8B;IAC9D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAE3B;IAEH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAE5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAEpB;IACH,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,mBAAmB,CAAsC;IACjE,OAAO,CAAC,oBAAoB,CAChB;IACZ,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IACjE,QAAQ,CAAC,aAAa,+DAAsC;IAC5D,SAAS,CAAC,QAAQ,CAAC,aAAa;;MAA6C;IAC7E,SAAS,CAAC,QAAQ,CAAC,eAAe,yFAG/B;;IA0FH,OAAO,CAAC,eAAe;IA6FvB,OAAO,CAAC,OAAO;yCAvNJ,sBAAsB;2CAAtB,sBAAsB;CAqOlC"}
@@ -113,9 +113,12 @@ export class PrismRendererComponent {
113
113
  return;
114
114
  }
115
115
  this.activeOverlay.set(null);
116
+ const requestedPanelId = panel.id;
116
117
  panel.loadOverlayComponent().then((c) => {
117
- this.overlayCache.set(panel.id, c);
118
- this.activeOverlay.set(c);
118
+ this.overlayCache.set(requestedPanelId, c);
119
+ if (this.panelService.activePanelId() === requestedPanelId) {
120
+ this.activeOverlay.set(c);
121
+ }
119
122
  });
120
123
  return;
121
124
  }
@@ -220,7 +223,7 @@ export class PrismRendererComponent {
220
223
  i0.ɵɵstyleProp("--zoom", ctx.canvasService.zoom());
221
224
  i0.ɵɵadvance(3);
222
225
  i0.ɵɵconditional(ctx.activeOverlay() ? 9 : -1);
223
- } }, dependencies: [PrismCanvasRulersComponent, NgComponentOutlet], styles: ["[_nghost-%COMP%] { display: block; min-height: 0; flex: 1; }\n\n .prism-canvas-stage[_ngcontent-%COMP%] {\n position: relative;\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n min-height: 200px;\n height: 100%;\n background-color: var(--prism-bg-surface);\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n transition: filter var(--dur-base);\n }\n\n .prism-canvas-stage[data-bg=\"plain\"][_ngcontent-%COMP%] {\n background-image: none;\n }\n .prism-canvas-stage[data-bg=\"light\"][_ngcontent-%COMP%] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary-from) 15%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"dark\"][_ngcontent-%COMP%] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary) 18%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"checker\"][_ngcontent-%COMP%] {\n background-image:\n linear-gradient(45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }\n\n .stage-crosshair[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-base);\n }\n .stage-crosshair.visible[_ngcontent-%COMP%] { opacity: 1; }\n .stage-crosshair[_ngcontent-%COMP%]::before, \n .stage-crosshair[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n background: color-mix(in srgb, var(--prism-primary) 20%, transparent);\n }\n .stage-crosshair[_ngcontent-%COMP%]::before { left: 0; right: 0; top: 50%; height: 1px; }\n .stage-crosshair[_ngcontent-%COMP%]::after { top: 0; bottom: 0; left: 50%; width: 1px; }\n\n .canvas-badges[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n left: 20px;\n display: flex;\n gap: 6px;\n pointer-events: none;\n }\n .c-badge[_ngcontent-%COMP%] {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n padding: 3px 7px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--prism-bg-elevated) 90%, transparent);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n backdrop-filter: blur(8px);\n }\n\n .demo-wrap[_ngcontent-%COMP%] {\n position: relative;\n transform: scale(var(--zoom, 1));\n transition: transform 0.18s;\n }"], changeDetection: 0 });
226
+ } }, dependencies: [PrismCanvasRulersComponent, NgComponentOutlet], styles: ["[_nghost-%COMP%] { display: block; min-height: 0; flex: 1; }\n\n .prism-canvas-stage[_ngcontent-%COMP%] {\n position: relative;\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n min-height: 200px;\n height: 100%;\n background-color: var(--prism-bg-surface);\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n transition: filter var(--dur-base);\n }\n\n .prism-canvas-stage[data-bg=\"plain\"][_ngcontent-%COMP%] {\n background-image: none;\n }\n .prism-canvas-stage[data-bg=\"light\"][_ngcontent-%COMP%] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary-from) 15%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"dark\"][_ngcontent-%COMP%] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary) 18%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"checker\"][_ngcontent-%COMP%] {\n background-image:\n linear-gradient(45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }\n\n .stage-crosshair[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-base);\n }\n .stage-crosshair.visible[_ngcontent-%COMP%] { opacity: 1; }\n .stage-crosshair[_ngcontent-%COMP%]::before, \n .stage-crosshair[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n background: color-mix(in srgb, var(--prism-primary) 20%, transparent);\n }\n .stage-crosshair[_ngcontent-%COMP%]::before { left: 0; right: 0; top: 50%; height: 1px; }\n .stage-crosshair[_ngcontent-%COMP%]::after { top: 0; bottom: 0; left: 50%; width: 1px; }\n\n .canvas-badges[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n left: 20px;\n display: flex;\n gap: 6px;\n pointer-events: none;\n }\n .c-badge[_ngcontent-%COMP%] {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n padding: 3px 7px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--prism-bg-elevated) 90%, transparent);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n backdrop-filter: blur(8px);\n }\n\n .demo-wrap[_ngcontent-%COMP%] {\n position: relative;\n transform: scale(var(--zoom, 1));\n transition: transform 0.18s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }"], changeDetection: 0 });
224
227
  }
225
228
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismRendererComponent, [{
226
229
  type: Component,
@@ -250,11 +253,11 @@ export class PrismRendererComponent {
250
253
  }
251
254
  </div>
252
255
  </div>
253
- `, styles: ["\n :host { display: block; min-height: 0; flex: 1; }\n\n .prism-canvas-stage {\n position: relative;\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n min-height: 200px;\n height: 100%;\n background-color: var(--prism-bg-surface);\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n transition: filter var(--dur-base);\n }\n\n .prism-canvas-stage[data-bg=\"plain\"] {\n background-image: none;\n }\n .prism-canvas-stage[data-bg=\"light\"] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary-from) 15%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"dark\"] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary) 18%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"checker\"] {\n background-image:\n linear-gradient(45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }\n\n .stage-crosshair {\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-base);\n }\n .stage-crosshair.visible { opacity: 1; }\n .stage-crosshair::before,\n .stage-crosshair::after {\n content: '';\n position: absolute;\n background: color-mix(in srgb, var(--prism-primary) 20%, transparent);\n }\n .stage-crosshair::before { left: 0; right: 0; top: 50%; height: 1px; }\n .stage-crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }\n\n .canvas-badges {\n position: absolute;\n top: 12px;\n left: 20px;\n display: flex;\n gap: 6px;\n pointer-events: none;\n }\n .c-badge {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n padding: 3px 7px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--prism-bg-elevated) 90%, transparent);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n backdrop-filter: blur(8px);\n }\n\n .demo-wrap {\n position: relative;\n transform: scale(var(--zoom, 1));\n transition: transform 0.18s;\n }\n\n "] }]
256
+ `, styles: ["\n :host { display: block; min-height: 0; flex: 1; }\n\n .prism-canvas-stage {\n position: relative;\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n min-height: 200px;\n height: 100%;\n background-color: var(--prism-bg-surface);\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n transition: filter var(--dur-base);\n }\n\n .prism-canvas-stage[data-bg=\"plain\"] {\n background-image: none;\n }\n .prism-canvas-stage[data-bg=\"light\"] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary-from) 15%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"dark\"] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: radial-gradient(circle, color-mix(in srgb, var(--prism-primary) 18%, transparent) 1px, transparent 1px);\n }\n .prism-canvas-stage[data-bg=\"checker\"] {\n background-image:\n linear-gradient(45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }\n\n .stage-crosshair {\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-base);\n }\n .stage-crosshair.visible { opacity: 1; }\n .stage-crosshair::before,\n .stage-crosshair::after {\n content: '';\n position: absolute;\n background: color-mix(in srgb, var(--prism-primary) 20%, transparent);\n }\n .stage-crosshair::before { left: 0; right: 0; top: 50%; height: 1px; }\n .stage-crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }\n\n .canvas-badges {\n position: absolute;\n top: 12px;\n left: 20px;\n display: flex;\n gap: 6px;\n pointer-events: none;\n }\n .c-badge {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n padding: 3px 7px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--prism-bg-elevated) 90%, transparent);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n backdrop-filter: blur(8px);\n }\n\n .demo-wrap {\n position: relative;\n transform: scale(var(--zoom, 1));\n transition: transform 0.18s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n "] }]
254
257
  }], () => [], { outlet: [{ type: i0.ViewChild, args: ['outlet', { ...{
255
258
  read: ViewContainerRef,
256
259
  }, isSignal: true }] }] }); })();
257
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismRendererComponent, { className: "PrismRendererComponent", filePath: "app/renderer/prism-renderer.component.ts", lineNumber: 150 }); })();
260
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismRendererComponent, { className: "PrismRendererComponent", filePath: "app/renderer/prism-renderer.component.ts", lineNumber: 155 }); })();
258
261
  function parseContentToNodes(content) {
259
262
  if (typeof content === 'string') {
260
263
  return [htmlToNodes(content)];
@@ -1 +1 @@
1
- {"version":3,"file":"snippet-generator.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/snippet-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CAC/B;AAgBD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,EAAE,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAClC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,gBAAgB,CAAC,EAAE,uBAAuB,GACzC,MAAM,CA2DR"}
1
+ {"version":3,"file":"snippet-generator.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/snippet-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CAC/B;AAoBD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,EAAE,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAClC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,gBAAgB,CAAC,EAAE,uBAAuB,GACzC,MAAM,CA2DR"}
@@ -1,6 +1,9 @@
1
+ function escapeAttrValue(value) {
2
+ return String(value).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
3
+ }
1
4
  function pushAttribute(attributes, name, value) {
2
5
  if (typeof value === 'string') {
3
- attributes.push(`${name}="${value}"`);
6
+ attributes.push(`${name}="${escapeAttrValue(value)}"`);
4
7
  }
5
8
  else if (typeof value === 'boolean') {
6
9
  attributes.push(`[${name}]="true"`);
@@ -12,7 +15,7 @@ function pushAttribute(attributes, name, value) {
12
15
  attributes.push(`[${name}]="yourData"`);
13
16
  }
14
17
  else {
15
- attributes.push(`[${name}]="${String(value)}"`);
18
+ attributes.push(`[${name}]="${escapeAttrValue(value)}"`);
16
19
  }
17
20
  }
18
21
  export function generateSnippet(selector, inputs, values, explicitKeys, content, directiveOptions) {
@@ -92,7 +95,7 @@ function generateDirectiveSnippet(selector, inputs, values, explicitKeys, conten
92
95
  tag = host.selector;
93
96
  if (host.inputs) {
94
97
  for (const [k, v] of Object.entries(host.inputs)) {
95
- hostAttrs.push(`${k}="${String(v)}"`);
98
+ hostAttrs.push(`${k}="${escapeAttrValue(v)}"`);
96
99
  }
97
100
  }
98
101
  }
@@ -0,0 +1,20 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class PrismPersistenceService {
3
+ private readonly config;
4
+ private readonly navigationService;
5
+ private readonly rendererService;
6
+ private readonly a11yPanelState;
7
+ private readonly a11yPerspective;
8
+ private readonly injector;
9
+ private suppressSync;
10
+ private writeTimer;
11
+ private lastSerialized;
12
+ init(): void;
13
+ private restoreFromStorage;
14
+ private setupSyncEffect;
15
+ private writeDebounced;
16
+ private serialize;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrismPersistenceService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<PrismPersistenceService>;
19
+ }
20
+ //# sourceMappingURL=prism-persistence.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prism-persistence.service.d.ts","sourceRoot":"","sources":["../../../src/app/services/prism-persistence.service.ts"],"names":[],"mappings":";AAqBA,qBACa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiE;IACxF,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiC;IAChE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkC;IAClE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAE7C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,cAAc,CAAuB;IAE7C,IAAI,IAAI,IAAI;IAOZ,OAAO,CAAC,kBAAkB;IA6C1B,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,SAAS;yCA7FN,uBAAuB;6CAAvB,uBAAuB;CAwHnC"}