@ng-prism/core 22.2.0-beta.4 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/canvas/canvas-bg.styles.d.ts +19 -0
- package/dist/app/canvas/canvas-bg.styles.d.ts.map +1 -0
- package/dist/app/canvas/canvas-bg.styles.js +58 -0
- package/dist/app/canvas/prism-canvas-bg-pill.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-bg-pill.component.js +3 -3
- package/dist/app/canvas/prism-canvas-rulers.component.js +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +31 -7
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +158 -121
- package/dist/app/canvas/prism-template-popover.component.d.ts +0 -3
- package/dist/app/canvas/prism-template-popover.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-template-popover.component.js +43 -59
- package/dist/app/component-head/head-metrics.d.ts +41 -0
- package/dist/app/component-head/head-metrics.d.ts.map +1 -0
- package/dist/app/component-head/head-metrics.js +39 -0
- package/dist/app/component-head/prism-component-head.component.d.ts +10 -2
- package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-component-head.component.js +107 -209
- package/dist/app/component-head/prism-head-gauge.component.d.ts +23 -0
- package/dist/app/component-head/prism-head-gauge.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-head-gauge.component.js +123 -0
- package/dist/app/component-head/prism-head-info.component.d.ts +23 -0
- package/dist/app/component-head/prism-head-info.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-head-info.component.js +124 -0
- package/dist/app/component-head/prism-stat.component.d.ts +10 -4
- package/dist/app/component-head/prism-stat.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-stat.component.js +34 -44
- package/dist/app/controls/boolean-control.component.js +1 -1
- package/dist/app/controls/json-control.component.js +1 -1
- package/dist/app/controls/number-control.component.js +1 -1
- package/dist/app/controls/string-control.component.js +1 -1
- package/dist/app/controls/union-control.component.js +1 -1
- package/dist/app/header/prism-header.component.js +2 -2
- package/dist/app/icons/icon-registry.d.ts +15 -0
- package/dist/app/icons/icon-registry.d.ts.map +1 -0
- package/dist/app/icons/icon-registry.js +44 -0
- package/dist/app/icons/prism-icon.component.d.ts +2 -2
- package/dist/app/icons/prism-icon.component.d.ts.map +1 -1
- package/dist/app/icons/prism-icon.component.js +7 -32
- package/dist/app/index.d.ts +3 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +26 -1
- package/dist/app/layout-menu/prism-layout-menu.component.js +3 -3
- package/dist/app/overview/overview-panel.d.ts +3 -0
- package/dist/app/overview/overview-panel.d.ts.map +1 -0
- package/dist/app/overview/overview-panel.js +9 -0
- package/dist/app/overview/overview-visibility.d.ts +15 -0
- package/dist/app/overview/overview-visibility.d.ts.map +1 -0
- package/dist/app/overview/overview-visibility.js +18 -0
- package/dist/app/overview/prism-overview-cell.component.d.ts +29 -0
- package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -0
- package/dist/app/overview/prism-overview-cell.component.js +136 -0
- package/dist/app/overview/prism-overview.component.d.ts +17 -0
- package/dist/app/overview/prism-overview.component.d.ts.map +1 -0
- package/dist/app/overview/prism-overview.component.js +53 -0
- package/dist/app/page-renderer/prism-page-renderer.component.d.ts.map +1 -1
- package/dist/app/page-renderer/prism-page-renderer.component.js +3 -3
- package/dist/app/panels/a11y/a11y-audit.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-audit.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.js +21 -30
- package/dist/app/panels/a11y/a11y-keyboard-overlay.component.js +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.component.js +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-overlay-host.component.js +1 -1
- package/dist/app/panels/a11y/a11y-panel-state.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-panel-state.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.js +1 -1
- package/dist/app/panels/a11y/a11y-perspective.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-perspective.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.js +1 -1
- package/dist/app/panels/a11y/a11y-sr-overlay.component.js +1 -1
- package/dist/app/panels/a11y/a11y-sr.component.js +1 -1
- package/dist/app/panels/a11y/a11y-sr.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-sr.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-summary.d.ts +15 -0
- package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -0
- package/dist/app/panels/a11y/a11y-summary.js +33 -0
- package/dist/app/panels/a11y/a11y-tree.component.js +2 -2
- package/dist/app/panels/a11y/a11y-tree.service.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-tree.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-violations.component.js +3 -3
- package/dist/app/panels/a11y/a11y.types.d.ts +14 -0
- package/dist/app/panels/a11y/a11y.types.d.ts.map +1 -1
- package/dist/app/panels/builtin-navigation-decorations.d.ts +8 -0
- package/dist/app/panels/builtin-navigation-decorations.d.ts.map +1 -0
- package/dist/app/panels/builtin-navigation-decorations.js +20 -0
- package/dist/app/panels/builtin-panels.d.ts.map +1 -1
- package/dist/app/panels/builtin-panels.js +2 -0
- package/dist/app/panels/controls/prism-controls-panel.component.js +1 -1
- package/dist/app/panels/events/prism-events-panel.component.js +1 -1
- package/dist/app/panels/events/prism-json-node.component.js +1 -1
- package/dist/app/panels/panel-host/panel-badge.d.ts +8 -2
- package/dist/app/panels/panel-host/panel-badge.d.ts.map +1 -1
- package/dist/app/panels/panel-host/panel-badge.js +8 -13
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +8 -2
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts.map +1 -1
- package/dist/app/panels/panel-host/prism-panel-host.component.js +33 -22
- package/dist/app/renderer/overlay-resolver.d.ts.map +1 -1
- package/dist/app/renderer/overlay-resolver.js +12 -1
- package/dist/app/renderer/prism-renderer.component.d.ts +0 -1
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +11 -75
- package/dist/app/renderer/projectable-content.d.ts +10 -0
- package/dist/app/renderer/projectable-content.d.ts.map +1 -0
- package/dist/app/renderer/projectable-content.js +60 -0
- package/dist/app/services/prism-canvas.service.d.ts +1 -1
- package/dist/app/services/prism-canvas.service.d.ts.map +1 -1
- package/dist/app/services/prism-capture.service.d.ts +7 -1
- package/dist/app/services/prism-capture.service.d.ts.map +1 -1
- package/dist/app/services/prism-capture.service.js +27 -1
- package/dist/app/services/prism-event-log.service.d.ts +1 -1
- package/dist/app/services/prism-event-log.service.d.ts.map +1 -1
- package/dist/app/services/prism-layout.service.d.ts +1 -4
- package/dist/app/services/prism-layout.service.d.ts.map +1 -1
- package/dist/app/services/prism-layout.service.js +0 -8
- package/dist/app/services/prism-manifest.service.d.ts +1 -1
- package/dist/app/services/prism-manifest.service.d.ts.map +1 -1
- package/dist/app/services/prism-navigation.service.d.ts +1 -1
- package/dist/app/services/prism-navigation.service.d.ts.map +1 -1
- package/dist/app/services/prism-panel.service.d.ts +19 -1
- package/dist/app/services/prism-panel.service.d.ts.map +1 -1
- package/dist/app/services/prism-panel.service.js +28 -0
- package/dist/app/services/prism-persistence.service.d.ts +1 -1
- package/dist/app/services/prism-persistence.service.d.ts.map +1 -1
- package/dist/app/services/prism-plugin.service.d.ts +8 -2
- package/dist/app/services/prism-plugin.service.d.ts.map +1 -1
- package/dist/app/services/prism-plugin.service.js +15 -0
- package/dist/app/services/prism-renderer.service.d.ts +1 -1
- package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
- package/dist/app/services/prism-search.service.d.ts +1 -1
- package/dist/app/services/prism-search.service.d.ts.map +1 -1
- package/dist/app/services/prism-theme.service.d.ts +1 -1
- package/dist/app/services/prism-theme.service.d.ts.map +1 -1
- package/dist/app/services/prism-url-state.service.d.ts +1 -1
- package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
- package/dist/app/services/prism-variant-bg.service.d.ts +1 -1
- package/dist/app/services/prism-variant-bg.service.d.ts.map +1 -1
- package/dist/app/shared/prism-metric-badge.component.d.ts +32 -0
- package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -0
- package/dist/app/shared/prism-metric-badge.component.js +70 -0
- package/dist/app/shell/prism-shell.component.d.ts +0 -1
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +57 -49
- package/dist/app/sidebar/navigation-decorations.d.ts +70 -0
- package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -0
- package/dist/app/sidebar/navigation-decorations.js +87 -0
- package/dist/app/sidebar/prism-sidebar.component.d.ts +29 -8
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +129 -76
- package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
- package/dist/app/theme/prism-default-theme.js +44 -4
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts +4 -1
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -1
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +13 -26
- package/dist/app/variant-ribbon/spectrum.d.ts +19 -0
- package/dist/app/variant-ribbon/spectrum.d.ts.map +1 -0
- package/dist/app/variant-ribbon/spectrum.js +15 -0
- package/dist/app/view-tab-bar/next-view-id.d.ts +12 -0
- package/dist/app/view-tab-bar/next-view-id.d.ts.map +1 -0
- package/dist/app/view-tab-bar/next-view-id.js +16 -0
- package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts +0 -1
- package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts.map +1 -1
- package/dist/app/view-tab-bar/prism-view-panel-host.component.js +11 -12
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts +0 -1
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts.map +1 -1
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.js +6 -13
- package/dist/builder/a11y/a11y-report-reader.d.ts +15 -1
- package/dist/builder/a11y/a11y-report-reader.d.ts.map +1 -1
- package/dist/builder/a11y/a11y-report-reader.js +37 -0
- package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
- package/dist/builder/shared/prism-pipeline.js +19 -2
- package/dist/plugin/index.d.ts +2 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +10 -0
- package/dist/plugin/plugin.types.d.ts +33 -0
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/dist/transformer/cli.js +0 -0
- package/package.json +1 -1
- package/dist/app/canvas/prism-code-drawer.component.d.ts +0 -14
- package/dist/app/canvas/prism-code-drawer.component.d.ts.map +0 -1
- package/dist/app/canvas/prism-code-drawer.component.js +0 -116
- package/dist/app/component-header/prism-component-header.component.d.ts +0 -8
- package/dist/app/component-header/prism-component-header.component.d.ts.map +0 -1
- package/dist/app/component-header/prism-component-header.component.js +0 -77
- package/dist/cli/audit-a11y/aggregator.d.ts +0 -10
- package/dist/cli/audit-a11y/aggregator.d.ts.map +0 -1
- package/dist/cli/audit-a11y/aggregator.js +0 -64
- package/dist/cli/audit-a11y/auditor.d.ts +0 -14
- package/dist/cli/audit-a11y/auditor.d.ts.map +0 -1
- package/dist/cli/audit-a11y/auditor.js +0 -104
- package/dist/cli/audit-a11y/cli.d.ts +0 -3
- package/dist/cli/audit-a11y/cli.d.ts.map +0 -1
- package/dist/cli/audit-a11y/cli.js +0 -143
- package/dist/cli/audit-a11y/index.d.ts +0 -4
- package/dist/cli/audit-a11y/index.d.ts.map +0 -1
- package/dist/cli/audit-a11y/index.js +0 -3
- package/dist/cli/audit-a11y/static-server.d.ts +0 -11
- package/dist/cli/audit-a11y/static-server.d.ts.map +0 -1
- package/dist/cli/audit-a11y/static-server.js +0 -61
package/dist/app/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Tokens
|
|
2
2
|
// PRISM_RENDERER_HOOKS + PrismRendererHooks are exported from the plugin entry point
|
|
3
3
|
// (src/plugin/index.ts) since they belong to the plugin API surface.
|
|
4
|
-
export { PRISM_MANIFEST, PRISM_CONFIG
|
|
4
|
+
export { PRISM_MANIFEST, PRISM_CONFIG } from './tokens/prism-tokens.js';
|
|
5
5
|
// Theme
|
|
6
6
|
export { PRISM_DEFAULT_THEME, PRISM_DARK_THEME, PRISM_LIGHT_THEME, PRISM_BASE_TOKENS, } from './theme/prism-default-theme.js';
|
|
7
7
|
export { PrismThemeService } from './services/prism-theme.service.js';
|
|
@@ -23,3 +23,28 @@ export { PrismPageRendererComponent } from './page-renderer/prism-page-renderer.
|
|
|
23
23
|
export { providePrism } from './provide-prism.js';
|
|
24
24
|
// HMR helper
|
|
25
25
|
export { enablePrismHmr } from './hmr.js';
|
|
26
|
+
// Shared presentational components for plugin contributions. These live on
|
|
27
|
+
// the main entry rather than `plugin/index.ts` because the builder evaluates
|
|
28
|
+
// plugin config — and everything it imports — in Node.js, and that barrel
|
|
29
|
+
// draws an explicit line at decorated declarations.
|
|
30
|
+
//
|
|
31
|
+
// This barrel draws no such line, and the badges do cross into Node. The
|
|
32
|
+
// `loadComponent` indirection keeps plugin *panels* out of the builder's
|
|
33
|
+
// module graph, but `@ng-prism/plugin-coverage` and
|
|
34
|
+
// `@ng-prism/plugin-visual-regression` also re-export their header badge
|
|
35
|
+
// components *statically* from their Node entry (`exports["."].import`), and
|
|
36
|
+
// those components import `PrismMetricBadgeComponent` from here. So loading a
|
|
37
|
+
// plugin config in `builder/config-loader` pulls this whole file — shell
|
|
38
|
+
// component included — into Node. It evaluates cleanly only because the
|
|
39
|
+
// config loader imports `@angular/compiler` before anything else.
|
|
40
|
+
//
|
|
41
|
+
// Moving those two re-exports to the packages' `.browser.ts` entries does not
|
|
42
|
+
// fix it: `package.json` maps "types" to the single `index.d.ts` generated
|
|
43
|
+
// from the Node entry under every condition, so a symbol dropped from that
|
|
44
|
+
// entry disappears from the public type surface while still shipping in the
|
|
45
|
+
// browser bundle — the mismatch `plugin-visual-regression`'s
|
|
46
|
+
// `entry-parity.spec.ts` exists to forbid. Making the badges Node-safe means
|
|
47
|
+
// giving them an import that is not this barrel, which is a public API
|
|
48
|
+
// decision, not a cleanup.
|
|
49
|
+
export { PrismMetricBadgeComponent } from './shared/prism-metric-badge.component.js';
|
|
50
|
+
export { PrismIconComponent } from './icons/prism-icon.component.js';
|
|
@@ -32,7 +32,7 @@ function PrismLayoutMenuComponent_Conditional_6_Template(rf, ctx) { if (rf & 1)
|
|
|
32
32
|
i0.ɵɵdomElementEnd()();
|
|
33
33
|
i0.ɵɵnamespaceHTML();
|
|
34
34
|
i0.ɵɵdomElementStart(17, "span", 12);
|
|
35
|
-
i0.ɵɵtext(18, "Show
|
|
35
|
+
i0.ɵɵtext(18, "Show variant rail");
|
|
36
36
|
i0.ɵɵdomElementEnd();
|
|
37
37
|
i0.ɵɵdomElementStart(19, "span", 13)(20, "kbd");
|
|
38
38
|
i0.ɵɵtext(21, "\u2325");
|
|
@@ -102,7 +102,7 @@ export class PrismLayoutMenuComponent {
|
|
|
102
102
|
i0.ɵɵclassProp("layout-menu__trigger--active", ctx.open());
|
|
103
103
|
i0.ɵɵadvance(5);
|
|
104
104
|
i0.ɵɵconditional(ctx.open() ? 6 : -1);
|
|
105
|
-
} }, styles: [".layout-menu[_ngcontent-%COMP%] { position: relative; }\n\n .layout-menu__trigger[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid var(
|
|
105
|
+
} }, styles: [".layout-menu[_ngcontent-%COMP%] { position: relative; }\n\n .layout-menu__trigger[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid var(--%NS%prism-border);\n border-radius: var(--%NS%prism-radius-sm);\n background: transparent;\n color: var(--%NS%prism-text-muted);\n cursor: pointer;\n transition: border-color 0.15s, color 0.15s, background 0.15s;\n }\n .layout-menu__trigger[_ngcontent-%COMP%]:hover, \n .layout-menu__trigger--active[_ngcontent-%COMP%] {\n border-color: var(--%NS%prism-border-strong);\n color: var(--%NS%prism-text);\n background: var(--%NS%prism-bg-surface);\n }\n\n .layout-menu__backdrop[_ngcontent-%COMP%] {\n position: fixed;\n inset: 0;\n z-index: 40;\n }\n\n .layout-menu__dropdown[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n z-index: 50;\n min-width: 240px;\n background: var(--%NS%prism-bg-elevated);\n border: 1px solid var(--%NS%prism-border-strong);\n border-radius: var(--%NS%prism-radius);\n box-shadow: 0 8px 32px rgba(0,0,0,0.4);\n padding: 4px;\n }\n\n .layout-menu__item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n background: none;\n color: var(--%NS%prism-text);\n font-family: var(--%NS%prism-font-sans);\n font-size: 13px;\n cursor: pointer;\n border-radius: var(--%NS%prism-radius-sm);\n text-align: left;\n transition: background 0.1s;\n }\n .layout-menu__item[_ngcontent-%COMP%]:hover { background: var(--%NS%prism-bg-surface); }\n\n .layout-menu__check[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border: 1px solid var(--%NS%prism-border-strong);\n border-radius: 3px;\n flex-shrink: 0;\n color: transparent;\n }\n .layout-menu__check--on[_ngcontent-%COMP%] {\n background: var(--%NS%prism-primary);\n border-color: var(--%NS%prism-primary);\n color: white;\n }\n\n .layout-menu__icon[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--%NS%prism-text-muted);\n flex-shrink: 0;\n }\n\n .layout-menu__label[_ngcontent-%COMP%] { flex: 1; }\n\n .layout-menu__kbd[_ngcontent-%COMP%] {\n display: flex;\n gap: 2px;\n opacity: 0.6;\n }\n kbd[_ngcontent-%COMP%] {\n font-family: var(--%NS%prism-font-sans);\n font-size: 11px;\n padding: 1px 4px;\n border: 1px solid var(--%NS%prism-border-strong);\n border-radius: 3px;\n background: var(--%NS%prism-bg-surface);\n color: var(--%NS%prism-text-muted);\n }\n\n .layout-menu__divider[_ngcontent-%COMP%] {\n height: 1px;\n background: var(--%NS%prism-border);\n margin: 4px 0;\n }"] });
|
|
106
106
|
}
|
|
107
107
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismLayoutMenuComponent, [{
|
|
108
108
|
type: Component,
|
|
@@ -156,7 +156,7 @@ export class PrismLayoutMenuComponent {
|
|
|
156
156
|
/>
|
|
157
157
|
</svg>
|
|
158
158
|
</span>
|
|
159
|
-
<span class="layout-menu__label">Show
|
|
159
|
+
<span class="layout-menu__label">Show variant rail</span>
|
|
160
160
|
<span class="layout-menu__kbd"><kbd>⌥</kbd><kbd>T</kbd></span>
|
|
161
161
|
</button>
|
|
162
162
|
<button class="layout-menu__item" (click)="toggle('addons')">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview-panel.d.ts","sourceRoot":"","sources":["../../../src/app/overview/overview-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAIpE,eAAO,MAAM,cAAc,EAAE,eAM5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { showsOverview } from './overview-visibility.js';
|
|
2
|
+
import { PrismOverviewComponent } from './prism-overview.component.js';
|
|
3
|
+
export const OVERVIEW_PANEL = {
|
|
4
|
+
id: 'overview',
|
|
5
|
+
label: 'Overview',
|
|
6
|
+
placement: 'view',
|
|
7
|
+
component: PrismOverviewComponent,
|
|
8
|
+
isVisible: showsOverview,
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the Overview tab is offered for this component.
|
|
4
|
+
*
|
|
5
|
+
* Two conditions, and the second is a correctness argument rather than taste.
|
|
6
|
+
* A `renderPage` component does not render itself — it renders a registered
|
|
7
|
+
* `ComponentPage`, and that page reads its values from the *global*
|
|
8
|
+
* `PrismRendererService`. n cells side by side would all show the same state,
|
|
9
|
+
* so an Overview there would be demonstrably wrong, not merely unhelpful.
|
|
10
|
+
*
|
|
11
|
+
* A single variant needs no contact sheet: the grid would be one cell, and the
|
|
12
|
+
* Playground says the same thing better.
|
|
13
|
+
*/
|
|
14
|
+
export declare function showsOverview(component: RuntimeComponent): boolean;
|
|
15
|
+
//# sourceMappingURL=overview-visibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview-visibility.d.ts","sourceRoot":"","sources":["../../../src/app/overview/overview-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAIlE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the Overview tab is offered for this component.
|
|
3
|
+
*
|
|
4
|
+
* Two conditions, and the second is a correctness argument rather than taste.
|
|
5
|
+
* A `renderPage` component does not render itself — it renders a registered
|
|
6
|
+
* `ComponentPage`, and that page reads its values from the *global*
|
|
7
|
+
* `PrismRendererService`. n cells side by side would all show the same state,
|
|
8
|
+
* so an Overview there would be demonstrably wrong, not merely unhelpful.
|
|
9
|
+
*
|
|
10
|
+
* A single variant needs no contact sheet: the grid would be one cell, and the
|
|
11
|
+
* Playground says the same thing better.
|
|
12
|
+
*/
|
|
13
|
+
export function showsOverview(component) {
|
|
14
|
+
const config = component.meta.showcaseConfig;
|
|
15
|
+
if (config.renderPage)
|
|
16
|
+
return false;
|
|
17
|
+
return (config.variants?.length ?? 0) >= 2;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* One frame of the contact sheet: a stage painting the variant's declared
|
|
5
|
+
* background, with the variant's own instance on it and a caption beneath.
|
|
6
|
+
*
|
|
7
|
+
* It deliberately shares none of the Playground's bookkeeping. Output
|
|
8
|
+
* subscriptions, `renderedElement`, the `prism:render:*` marks, the renderer
|
|
9
|
+
* hooks and `data-prism-rendered` all describe *one* rendered thing; n cells
|
|
10
|
+
* writing to any of them would corrupt what they mean. `data-prism-rendered`
|
|
11
|
+
* matters most — it is the selector external screenshot runners key on (see
|
|
12
|
+
* `docs/guide/external-tooling.md`), and this component never emits it.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PrismOverviewCellComponent {
|
|
15
|
+
readonly component: import("@angular/core").InputSignal<RuntimeComponent>;
|
|
16
|
+
readonly index: import("@angular/core").InputSignal<number>;
|
|
17
|
+
private readonly injector;
|
|
18
|
+
private readonly destroyRef;
|
|
19
|
+
private readonly outlet;
|
|
20
|
+
/** Never null: `resolveVariantBg` falls back to `DEFAULT_VARIANT_BG`. */
|
|
21
|
+
protected readonly bg: import("@angular/core").Signal<import("../services/prism-canvas.service.js").CanvasBg>;
|
|
22
|
+
protected readonly caption: import("@angular/core").Signal<string>;
|
|
23
|
+
protected readonly isWide: import("@angular/core").Signal<boolean>;
|
|
24
|
+
constructor();
|
|
25
|
+
private mount;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrismOverviewCellComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismOverviewCellComponent, "prism-overview-cell", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=prism-overview-cell.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prism-overview-cell.component.d.ts","sourceRoot":"","sources":["../../../src/app/overview/prism-overview-cell.component.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;;AAOrE;;;;;;;;;;GAUG;AACH,qBAmEa,0BAA0B;IACrC,QAAQ,CAAC,SAAS,wDAAsC;IACxD,QAAQ,CAAC,KAAK,8CAA4B;IAE1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAEpB;IAEH,yEAAyE;IACzE,SAAS,CAAC,QAAQ,CAAC,EAAE,yFAEnB;IAEF,SAAS,CAAC,QAAQ,CAAC,OAAO,yCAUvB;IAEH,SAAS,CAAC,QAAQ,CAAC,MAAM,0CAMtB;;IAmBH,OAAO,CAAC,KAAK;yCApDF,0BAA0B;2CAA1B,0BAA0B;CAgGtC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, DestroyRef, effect, inject, Injector, input, untracked, viewChild, ViewContainerRef, } from '@angular/core';
|
|
2
|
+
import { resolveVariantBg } from '../../shared/variant-bg.js';
|
|
3
|
+
import { CANVAS_BG_STYLES } from '../canvas/canvas-bg.styles.js';
|
|
4
|
+
import { buildKnownInputs } from '../renderer/known-inputs.js';
|
|
5
|
+
import { parseContentToNodes } from '../renderer/projectable-content.js';
|
|
6
|
+
import { computeVariantState } from '../services/prism-renderer.service.js';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
const _c0 = ["outlet"];
|
|
9
|
+
/**
|
|
10
|
+
* One frame of the contact sheet: a stage painting the variant's declared
|
|
11
|
+
* background, with the variant's own instance on it and a caption beneath.
|
|
12
|
+
*
|
|
13
|
+
* It deliberately shares none of the Playground's bookkeeping. Output
|
|
14
|
+
* subscriptions, `renderedElement`, the `prism:render:*` marks, the renderer
|
|
15
|
+
* hooks and `data-prism-rendered` all describe *one* rendered thing; n cells
|
|
16
|
+
* writing to any of them would corrupt what they mean. `data-prism-rendered`
|
|
17
|
+
* matters most — it is the selector external screenshot runners key on (see
|
|
18
|
+
* `docs/guide/external-tooling.md`), and this component never emits it.
|
|
19
|
+
*/
|
|
20
|
+
export class PrismOverviewCellComponent {
|
|
21
|
+
component = input.required(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
23
|
+
index = input.required(/* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
25
|
+
injector = inject(Injector);
|
|
26
|
+
destroyRef = inject(DestroyRef);
|
|
27
|
+
outlet = viewChild.required('outlet', { ...(ngDevMode ? { debugName: "outlet" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
28
|
+
/** Never null: `resolveVariantBg` falls back to `DEFAULT_VARIANT_BG`. */
|
|
29
|
+
bg = computed(() => resolveVariantBg(this.component().meta.showcaseConfig, this.index()), /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "bg" }] : /* istanbul ignore next */ []));
|
|
31
|
+
caption = computed(() => {
|
|
32
|
+
const variant = this.component().meta.showcaseConfig.variants?.[this.index()];
|
|
33
|
+
const number = String(this.index() + 1).padStart(2, '0');
|
|
34
|
+
// Defensive, not reachable today: `Variant.name` is required
|
|
35
|
+
// (decorator/showcase.types.ts) and `prism-overview` only ever creates a
|
|
36
|
+
// cell for an index it just read out of that same `variants` array. A
|
|
37
|
+
// bare `07` would only appear if those two facts stopped lining up — the
|
|
38
|
+
// grid indexing past the array it iterates, or `name` becoming optional.
|
|
39
|
+
return variant ? `${number} ${variant.name}` : number;
|
|
40
|
+
}, /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
42
|
+
isWide = computed(() => {
|
|
43
|
+
const config = this.component().meta.showcaseConfig;
|
|
44
|
+
const variant = config.variants?.[this.index()];
|
|
45
|
+
return ((variant?.canvasLayout ?? config.canvasLayout ?? 'fit') === 'stretch');
|
|
46
|
+
}, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "isWide" }] : /* istanbul ignore next */ []));
|
|
48
|
+
constructor() {
|
|
49
|
+
effect(() => {
|
|
50
|
+
const component = this.component();
|
|
51
|
+
const index = this.index();
|
|
52
|
+
untracked(() => this.mount(component, index));
|
|
53
|
+
});
|
|
54
|
+
this.destroyRef.onDestroy(() => this.outlet().clear());
|
|
55
|
+
}
|
|
56
|
+
// The Playground lets a variant that throws on construction propagate: one
|
|
57
|
+
// broken instance, and the user navigates away from it. The Overview
|
|
58
|
+
// fans instantiation out from one instance to n, all mounted in the same
|
|
59
|
+
// change-detection pass — an uncaught throw here would abort the refresh of
|
|
60
|
+
// every cell after it, so one bad variant would take down the whole sheet
|
|
61
|
+
// instead of just its own cell. That asymmetry is deliberate: contain here,
|
|
62
|
+
// propagate there.
|
|
63
|
+
mount(component, index) {
|
|
64
|
+
try {
|
|
65
|
+
this.outlet().clear();
|
|
66
|
+
// No `onUnknownInput` callback: the Playground already warns once per
|
|
67
|
+
// component, and repeating that warning per cell would say the same thing
|
|
68
|
+
// n times.
|
|
69
|
+
const { values, activeContent } = computeVariantState(component, index);
|
|
70
|
+
const injector = Injector.create({
|
|
71
|
+
providers: component.meta.showcaseConfig.providers ?? [],
|
|
72
|
+
parent: this.injector,
|
|
73
|
+
});
|
|
74
|
+
const projectableNodes = activeContent
|
|
75
|
+
? parseContentToNodes(activeContent)
|
|
76
|
+
: undefined;
|
|
77
|
+
const ref = this.outlet().createComponent(component.type, {
|
|
78
|
+
injector,
|
|
79
|
+
projectableNodes,
|
|
80
|
+
});
|
|
81
|
+
const knownInputs = buildKnownInputs(component);
|
|
82
|
+
for (const [key, value] of Object.entries(values)) {
|
|
83
|
+
if (!knownInputs.has(key))
|
|
84
|
+
continue;
|
|
85
|
+
ref.setInput(key, value);
|
|
86
|
+
}
|
|
87
|
+
ref.changeDetectorRef.detectChanges();
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
// `createComponent` attaches the host element and its structural DOM
|
|
91
|
+
// synchronously; a throw almost always comes from `detectChanges` right
|
|
92
|
+
// above, i.e. from a template expression or a lifecycle hook running
|
|
93
|
+
// *after* that attach. So there is usually a half-built subtree sitting
|
|
94
|
+
// in the outlet by the time we get here, and clearing it is what makes
|
|
95
|
+
// a caught cell actually show an empty stage with its caption still in
|
|
96
|
+
// place — an honest picture of "this variant failed", rather than a
|
|
97
|
+
// broken grid with no indication of which cell caused it.
|
|
98
|
+
this.outlet().clear();
|
|
99
|
+
console.error(`[ng-prism] Variant ${index} of ${component.meta.className} failed to render:`, error);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
static ɵfac = function PrismOverviewCellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismOverviewCellComponent)(); };
|
|
103
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismOverviewCellComponent, selectors: [["prism-overview-cell"]], viewQuery: function PrismOverviewCellComponent_Query(rf, ctx) { if (rf & 1) {
|
|
104
|
+
i0.ɵɵviewQuerySignal(ctx.outlet, _c0, 5, ViewContainerRef);
|
|
105
|
+
} if (rf & 2) {
|
|
106
|
+
i0.ɵɵqueryAdvance();
|
|
107
|
+
} }, hostAttrs: ["role", "listitem"], hostVars: 1, hostBindings: function PrismOverviewCellComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
108
|
+
i0.ɵɵattribute("data-wide", ctx.isWide() ? "" : null);
|
|
109
|
+
} }, inputs: { component: [1, "component"], index: [1, "index"] }, decls: 6, vars: 2, consts: [["outlet", ""], [1, "cell__stage"], [1, "cell__mount"], [1, "cell__caption"]], template: function PrismOverviewCellComponent_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
+
i0.ɵɵdomElementStart(0, "div", 1)(1, "div", 2);
|
|
111
|
+
i0.ɵɵdomElementContainer(2, null, 0);
|
|
112
|
+
i0.ɵɵdomElementEnd()();
|
|
113
|
+
i0.ɵɵdomElementStart(4, "span", 3);
|
|
114
|
+
i0.ɵɵtext(5);
|
|
115
|
+
i0.ɵɵdomElementEnd();
|
|
116
|
+
} if (rf & 2) {
|
|
117
|
+
i0.ɵɵattribute("data-bg", ctx.bg());
|
|
118
|
+
i0.ɵɵadvance(5);
|
|
119
|
+
i0.ɵɵtextInterpolate(ctx.caption());
|
|
120
|
+
} }, styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--%NS%sp-2);\n min-width: 0;\n }\n \n\n [data-wide][_nghost-%COMP%] {\n grid-column: 1 / -1;\n }\n\n .cell__stage[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 120px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--%NS%sp-5);\n border-radius: var(--%NS%radius-sm);\n background-color: var(--%NS%prism-stage);\n outline: 1px solid var(--%NS%prism-stage-edge);\n outline-offset: -1px;\n overflow: hidden;\n }\n\n .cell__mount[_ngcontent-%COMP%] {\n display: inline-block;\n max-width: 100%;\n }\n [data-wide][_nghost-%COMP%] .cell__mount[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n }\n\n \n\n\n\n .cell__caption[_ngcontent-%COMP%] {\n font-family: var(--%NS%prism-font-mono);\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }", "[data-bg=\"dots\"][_ngcontent-%COMP%] {\n background-image: radial-gradient(circle, var(--%NS%prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n }\n\n [data-bg=\"plain\"][_ngcontent-%COMP%] {\n background-image: none;\n }\n\n \n\n\n\n\n [data-bg=\"light\"][_ngcontent-%COMP%] {\n background-color: var(--%NS%prism-void-light, #f7f5fc);\n background-image: none;\n }\n [data-bg=\"dark\"][_ngcontent-%COMP%] {\n background-color: var(--%NS%prism-void-dark, #07050f);\n background-image: none;\n }\n\n \n\n\n\n\n\n [data-bg=\"checker\"][_ngcontent-%COMP%], \n [data-bg=\"transparent\"][_ngcontent-%COMP%] {\n background-image:\n linear-gradient(45deg, var(--%NS%prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--%NS%prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--%NS%prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--%NS%prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }"] });
|
|
121
|
+
}
|
|
122
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismOverviewCellComponent, [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{ selector: 'prism-overview-cell', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
125
|
+
role: 'listitem',
|
|
126
|
+
'[attr.data-wide]': "isWide() ? '' : null",
|
|
127
|
+
}, template: `
|
|
128
|
+
<div class="cell__stage" [attr.data-bg]="bg()">
|
|
129
|
+
<div class="cell__mount"><ng-container #outlet /></div>
|
|
130
|
+
</div>
|
|
131
|
+
<span class="cell__caption">{{ caption() }}</span>
|
|
132
|
+
`, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n gap: var(--sp-2);\n min-width: 0;\n }\n /* A stretch variant has no intrinsic width to compare against its\n neighbours, so it takes the row rather than a column. */\n :host([data-wide]) {\n grid-column: 1 / -1;\n }\n\n .cell__stage {\n flex: 1;\n min-height: 120px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--sp-5);\n border-radius: var(--radius-sm);\n background-color: var(--prism-stage);\n outline: 1px solid var(--prism-stage-edge);\n outline-offset: -1px;\n overflow: hidden;\n }\n\n .cell__mount {\n display: inline-block;\n max-width: 100%;\n }\n :host([data-wide]) .cell__mount {\n display: block;\n width: 100%;\n }\n\n /* The caption sits below the frame, not on it. Inside, it would have to\n invert against every background the cell can paint \u2014 and gaining a new\n contrast rule per CanvasBg value is exactly the cost the sheet exists\n to avoid. */\n .cell__caption {\n font-family: var(--prism-font-mono);\n font-size: var(--fs-xs);\n color: var(--prism-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n ", "\n [data-bg=\"dots\"] {\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n }\n\n [data-bg=\"plain\"] {\n background-image: none;\n }\n\n /* Flat, not dotted. \"light\" and \"dark\" name a surface a component was\n designed against \u2014 and they are the two backgrounds whose colour is\n absolute rather than a theme token, which is what makes them the values\n to declare for a screenshot baseline. \"dots\" already exists for anyone\n who wants the grid. */\n [data-bg=\"light\"] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: none;\n }\n [data-bg=\"dark\"] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: none;\n }\n\n /* \"transparent\" shares the checkerboard on purpose. The two say the same\n thing in the two media the canvas has: while browsing, the checkerboard\n is already the UI's word for \"no surface here\"; in a capture it becomes\n literal transparency. A stage that were really see-through in the app\n would just show the shell through the canvas, which means nothing. The\n split between the two lives entirely in CAPTURE_STYLES. */\n [data-bg=\"checker\"],\n [data-bg=\"transparent\"] {\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"] }]
|
|
133
|
+
}], () => [], { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], outlet: [{ type: i0.ViewChild, args: ['outlet', { ...{
|
|
134
|
+
read: ViewContainerRef,
|
|
135
|
+
}, isSignal: true }] }] }); })();
|
|
136
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismOverviewCellComponent, { className: "PrismOverviewCellComponent", filePath: "app/overview/prism-overview-cell.component.ts", lineNumber: 99 }); })();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* All variants of one component at once — a contact sheet rather than a
|
|
5
|
+
* viewfinder.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately without controls of any kind: columns follow the window, and
|
|
8
|
+
* everything else a cell shows is what the variant itself declared.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PrismOverviewComponent {
|
|
11
|
+
/** Input name fixed by `prism-view-panel-host`, which feeds every view panel. */
|
|
12
|
+
readonly activeComponent: import("@angular/core").InputSignal<RuntimeComponent | null>;
|
|
13
|
+
protected readonly variants: import("@angular/core").Signal<import("../../index.js").Variant<unknown>[]>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrismOverviewComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismOverviewComponent, "prism-overview", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=prism-overview.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prism-overview.component.d.ts","sourceRoot":"","sources":["../../../src/app/overview/prism-overview.component.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;;AAGrE;;;;;;GAMG;AACH,qBA0Ba,sBAAsB;IACjC,iFAAiF;IACjF,QAAQ,CAAC,eAAe,+DAAwC;IAEhE,SAAS,CAAC,QAAQ,CAAC,QAAQ,8EAEzB;yCANS,sBAAsB;2CAAtB,sBAAsB;CAOlC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input, } from '@angular/core';
|
|
2
|
+
import { PrismOverviewCellComponent } from './prism-overview-cell.component.js';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
function PrismOverviewComponent_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵelement(0, "prism-overview-cell", 1);
|
|
6
|
+
} if (rf & 2) {
|
|
7
|
+
const $index_r1 = ctx.$index;
|
|
8
|
+
const component_r2 = i0.ɵɵnextContext();
|
|
9
|
+
i0.ɵɵproperty("component", component_r2)("index", $index_r1);
|
|
10
|
+
} }
|
|
11
|
+
function PrismOverviewComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
13
|
+
i0.ɵɵrepeaterCreate(1, PrismOverviewComponent_Conditional_0_For_2_Template, 1, 2, "prism-overview-cell", 1, i0.ɵɵrepeaterTrackByIndex);
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
17
|
+
i0.ɵɵadvance();
|
|
18
|
+
i0.ɵɵrepeater(ctx_r2.variants());
|
|
19
|
+
} }
|
|
20
|
+
/**
|
|
21
|
+
* All variants of one component at once — a contact sheet rather than a
|
|
22
|
+
* viewfinder.
|
|
23
|
+
*
|
|
24
|
+
* Deliberately without controls of any kind: columns follow the window, and
|
|
25
|
+
* everything else a cell shows is what the variant itself declared.
|
|
26
|
+
*/
|
|
27
|
+
export class PrismOverviewComponent {
|
|
28
|
+
/** Input name fixed by `prism-view-panel-host`, which feeds every view panel. */
|
|
29
|
+
activeComponent = input(null, /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "activeComponent" }] : /* istanbul ignore next */ []));
|
|
31
|
+
variants = computed(() => this.activeComponent()?.meta.showcaseConfig.variants ?? [], /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "variants" }] : /* istanbul ignore next */ []));
|
|
33
|
+
static ɵfac = function PrismOverviewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismOverviewComponent)(); };
|
|
34
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismOverviewComponent, selectors: [["prism-overview"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 1, vars: 1, consts: [["role", "list", 1, "prism-overview"], [3, "component", "index"]], template: function PrismOverviewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
i0.ɵɵconditionalCreate(0, PrismOverviewComponent_Conditional_0_Template, 3, 0, "div", 0);
|
|
36
|
+
} if (rf & 2) {
|
|
37
|
+
let tmp_0_0;
|
|
38
|
+
i0.ɵɵconditional((tmp_0_0 = ctx.activeComponent()) ? 0 : -1, tmp_0_0);
|
|
39
|
+
} }, dependencies: [PrismOverviewCellComponent], styles: ["[_nghost-%COMP%] { display: block; }\n\n .prism-overview[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n gap: var(--%NS%sp-4);\n padding: var(--%NS%sp-6);\n align-content: start;\n }"] });
|
|
40
|
+
}
|
|
41
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismOverviewComponent, [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ selector: 'prism-overview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismOverviewCellComponent], template: `
|
|
44
|
+
@if (activeComponent(); as component) {
|
|
45
|
+
<div class="prism-overview" role="list">
|
|
46
|
+
@for (_ of variants(); track $index) {
|
|
47
|
+
<prism-overview-cell [component]="component" [index]="$index" />
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
50
|
+
}
|
|
51
|
+
`, styles: ["\n :host { display: block; }\n\n .prism-overview {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n gap: var(--sp-4);\n padding: var(--sp-6);\n align-content: start;\n }\n "] }]
|
|
52
|
+
}], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
|
|
53
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismOverviewComponent, { className: "PrismOverviewComponent", filePath: "app/overview/prism-overview.component.ts", lineNumber: 43 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-page-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/page-renderer/prism-page-renderer.component.ts"],"names":[],"mappings":";AAIA,
|
|
1
|
+
{"version":3,"file":"prism-page-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/page-renderer/prism-page-renderer.component.ts"],"names":[],"mappings":";AAIA,qBAiFa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;IACtD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,SAAS,CAAC,QAAQ,CAAC,IAAI,iFAAuB;;yCAHnC,0BAA0B;2CAA1B,0BAA0B;CAWtC"}
|
|
@@ -54,7 +54,7 @@ export class PrismPageRendererComponent {
|
|
|
54
54
|
} if (rf & 2) {
|
|
55
55
|
let tmp_0_0;
|
|
56
56
|
i0.ɵɵconditional((tmp_0_0 = ctx.page()) ? 0 : -1, tmp_0_0);
|
|
57
|
-
} }, dependencies: [NgComponentOutlet, JsonPipe], styles: ["[_nghost-%COMP%] { display: block; flex: 1; overflow-y: auto; }\n .prism-page-renderer__title[_ngcontent-%COMP%] {\n margin: 0;\n padding: 16px 20px;\n font-size: 18px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(
|
|
57
|
+
} }, dependencies: [NgComponentOutlet, JsonPipe], styles: ["[_nghost-%COMP%] { display: block; flex: 1; overflow-y: auto; }\n .prism-page-renderer__title[_ngcontent-%COMP%] {\n margin: 0;\n padding: 16px 20px;\n font-size: 18px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--%NS%prism-text);\n font-family: var(--%NS%prism-font-sans);\n border-bottom: 1px solid var(--%NS%prism-border);\n border-left: 3px solid;\n border-image: linear-gradient(180deg, var(--%NS%prism-primary-from), var(--%NS%prism-primary-to)) 1;\n background: var(--%NS%prism-bg-surface);\n }\n .prism-page-renderer__component[_ngcontent-%COMP%] {\n padding: var(--%NS%sp-5) var(--%NS%sp-6);\n color: var(--%NS%prism-text-2);\n font-family: var(--%NS%prism-font-sans);\n font-size: var(--%NS%fs-lg);\n line-height: 1.6;\n }\n\n \n\n\n\n\n\n .prism-page-renderer__component[_ngcontent-%COMP%] :is(h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%]) {\n color: var(--%NS%prism-text);\n font-family: var(--%NS%prism-font-sans);\n font-weight: 600;\n letter-spacing: -0.01em;\n line-height: 1.25;\n margin: var(--%NS%sp-6) 0 var(--%NS%sp-3);\n }\n .prism-page-renderer__component[_ngcontent-%COMP%] [_ngcontent-%COMP%]:is(h1, h2, h3, h4, h5, h6):first-child {\n margin-top: 0;\n }\n .prism-page-renderer__component[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] { font-size: 24px; }\n .prism-page-renderer__component[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] { font-size: 20px; }\n .prism-page-renderer__component[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-size: 17px; }\n .prism-page-renderer__component[_ngcontent-%COMP%] :is(h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%]) { font-size: var(--%NS%fs-xl); }\n\n .prism-page-renderer__component[_ngcontent-%COMP%] :is(p[_ngcontent-%COMP%], ul[_ngcontent-%COMP%], ol[_ngcontent-%COMP%]) { margin: 0 0 var(--%NS%sp-4); }\n .prism-page-renderer__component[_ngcontent-%COMP%] :is(strong[_ngcontent-%COMP%], b[_ngcontent-%COMP%]) { color: var(--%NS%prism-text); }\n .prism-page-renderer__component[_ngcontent-%COMP%] a[_ngcontent-%COMP%] { color: var(--%NS%prism-primary); }\n .prism-page-renderer__component[_ngcontent-%COMP%] :is(code[_ngcontent-%COMP%], pre[_ngcontent-%COMP%]) {\n font-family: var(--%NS%prism-font-mono);\n font-size: var(--%NS%fs-md);\n color: var(--%NS%prism-text);\n }\n .prism-page-renderer__json[_ngcontent-%COMP%] {\n margin: 0;\n padding: 24px;\n font-size: 12px;\n font-family: monospace;\n color: var(--%NS%prism-text-muted);\n white-space: pre-wrap;\n }"] });
|
|
58
58
|
}
|
|
59
59
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismPageRendererComponent, [{
|
|
60
60
|
type: Component,
|
|
@@ -71,6 +71,6 @@ export class PrismPageRendererComponent {
|
|
|
71
71
|
} }
|
|
72
72
|
</div>
|
|
73
73
|
}
|
|
74
|
-
`, styles: ["\n :host { display: block; flex: 1; overflow-y: auto; }\n .prism-page-renderer__title {\n margin: 0;\n padding: 16px 20px;\n font-size: 18px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--prism-text);\n font-family: var(--prism-font-sans);\n border-bottom: 1px solid var(--prism-border);\n border-left: 3px solid;\n border-image: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to)) 1;\n background: var(--prism-bg-surface);\n }\n .prism-page-renderer__component {\n padding:
|
|
74
|
+
`, styles: ["\n :host { display: block; flex: 1; overflow-y: auto; }\n .prism-page-renderer__title {\n margin: 0;\n padding: 16px 20px;\n font-size: 18px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--prism-text);\n font-family: var(--prism-font-sans);\n border-bottom: 1px solid var(--prism-border);\n border-left: 3px solid;\n border-image: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to)) 1;\n background: var(--prism-bg-surface);\n }\n .prism-page-renderer__component {\n padding: var(--sp-5) var(--sp-6);\n color: var(--prism-text-2);\n font-family: var(--prism-font-sans);\n font-size: var(--fs-lg);\n line-height: 1.6;\n }\n\n /* Projected page content arrives through ngComponentOutlet and carries no\n theme of its own. Without this scope a consuming app's plain <h2> renders\n in the browser default colour on the styleguide's dark shell \u2014 measured at\n rgb(26,26,46) on a dark ground, which is darker than the body text beneath\n it and inverts the hierarchy. These are deliberately element selectors:\n the content is authored by the consumer and carries no classes we know. */\n .prism-page-renderer__component :is(h1, h2, h3, h4, h5, h6) {\n color: var(--prism-text);\n font-family: var(--prism-font-sans);\n font-weight: 600;\n letter-spacing: -0.01em;\n line-height: 1.25;\n margin: var(--sp-6) 0 var(--sp-3);\n }\n .prism-page-renderer__component :is(h1, h2, h3, h4, h5, h6):first-child {\n margin-top: 0;\n }\n .prism-page-renderer__component h1 { font-size: 24px; }\n .prism-page-renderer__component h2 { font-size: 20px; }\n .prism-page-renderer__component h3 { font-size: 17px; }\n .prism-page-renderer__component :is(h4, h5, h6) { font-size: var(--fs-xl); }\n\n .prism-page-renderer__component :is(p, ul, ol) { margin: 0 0 var(--sp-4); }\n .prism-page-renderer__component :is(strong, b) { color: var(--prism-text); }\n .prism-page-renderer__component a { color: var(--prism-primary); }\n .prism-page-renderer__component :is(code, pre) {\n font-family: var(--prism-font-mono);\n font-size: var(--fs-md);\n color: var(--prism-text);\n }\n .prism-page-renderer__json {\n margin: 0;\n padding: 24px;\n font-size: 12px;\n font-family: monospace;\n color: var(--prism-text-muted);\n white-space: pre-wrap;\n }\n "] }]
|
|
75
75
|
}], () => [], null); })();
|
|
76
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismPageRendererComponent, { className: "PrismPageRendererComponent", filePath: "app/page-renderer/prism-page-renderer.component.ts", lineNumber:
|
|
76
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismPageRendererComponent, { className: "PrismPageRendererComponent", filePath: "app/page-renderer/prism-page-renderer.component.ts", lineNumber: 86 }); })();
|
|
@@ -14,6 +14,6 @@ export declare class A11yAuditService {
|
|
|
14
14
|
scheduleAudit(element: Element, config?: A11yCoreConfig, debounceMs?: number): void;
|
|
15
15
|
clear(): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<A11yAuditService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=a11y-audit.service.d.ts.map
|
|
@@ -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;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
|
|
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;;CAmD5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-header-badge.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-header-badge.component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"a11y-header-badge.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-header-badge.component.ts"],"names":[],"mappings":";AAeA,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExC,qBAiBa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IACpE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D,SAAS,CAAC,QAAQ,CAAC,IAAI;;;;cAoBpB;IAEH,OAAO,CAAC,cAAc;yCA1BX,wBAAwB;2CAAxB,wBAAwB;CAsCpC"}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, inject, } from '@angular/core';
|
|
2
2
|
import { PRISM_CONFIG, PRISM_MANIFEST } from '../../tokens/prism-tokens.js';
|
|
3
|
+
import { PrismMetricBadgeComponent } from '../../shared/prism-metric-badge.component.js';
|
|
3
4
|
import { resolveA11yThresholds } from './a11y-thresholds.js';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
function A11yHeaderBadgeComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
-
i0.ɵɵ
|
|
7
|
-
i0.ɵɵdomElement(1, "span", 2);
|
|
8
|
-
i0.ɵɵdomElementStart(2, "span", 3);
|
|
9
|
-
i0.ɵɵtext(3, "A11y");
|
|
10
|
-
i0.ɵɵdomElementEnd();
|
|
11
|
-
i0.ɵɵdomElementStart(4, "span", 4);
|
|
12
|
-
i0.ɵɵtext(5);
|
|
13
|
-
i0.ɵɵdomElementStart(6, "small");
|
|
14
|
-
i0.ɵɵtext(7, "%");
|
|
15
|
-
i0.ɵɵdomElementEnd()()();
|
|
7
|
+
i0.ɵɵelement(0, "prism-metric-badge", 0);
|
|
16
8
|
} if (rf & 2) {
|
|
17
9
|
const d_r1 = ctx;
|
|
18
|
-
i0.ɵɵ
|
|
19
|
-
i0.ɵɵdomProperty("title", d_r1.title);
|
|
20
|
-
i0.ɵɵadvance(5);
|
|
21
|
-
i0.ɵɵtextInterpolate(d_r1.score);
|
|
10
|
+
i0.ɵɵproperty("value", d_r1.score + "%")("variant", d_r1.variant)("title", d_r1.title);
|
|
22
11
|
} }
|
|
23
12
|
export class A11yHeaderBadgeComponent {
|
|
24
13
|
manifest = inject(PRISM_MANIFEST);
|
|
@@ -57,29 +46,31 @@ export class A11yHeaderBadgeComponent {
|
|
|
57
46
|
return 'ok';
|
|
58
47
|
}
|
|
59
48
|
static ɵfac = function A11yHeaderBadgeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yHeaderBadgeComponent)(); };
|
|
60
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yHeaderBadgeComponent, selectors: [["prism-a11y-header-badge"]], decls: 1, vars: 1, consts: [[
|
|
61
|
-
i0.ɵɵconditionalCreate(0, A11yHeaderBadgeComponent_Conditional_0_Template,
|
|
49
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yHeaderBadgeComponent, selectors: [["prism-a11y-header-badge"]], decls: 1, vars: 1, consts: [["icon", "accessibility", "label", "Library accessibility score", 3, "value", "variant", "title"]], template: function A11yHeaderBadgeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
i0.ɵɵconditionalCreate(0, A11yHeaderBadgeComponent_Conditional_0_Template, 1, 3, "prism-metric-badge", 0);
|
|
62
51
|
} if (rf & 2) {
|
|
63
52
|
let tmp_0_0;
|
|
64
53
|
i0.ɵɵconditional((tmp_0_0 = ctx.data()) ? 0 : -1, tmp_0_0);
|
|
65
|
-
} },
|
|
54
|
+
} }, dependencies: [PrismMetricBadgeComponent], encapsulation: 2 });
|
|
66
55
|
}
|
|
67
56
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yHeaderBadgeComponent, [{
|
|
68
57
|
type: Component,
|
|
69
|
-
args: [{
|
|
58
|
+
args: [{
|
|
59
|
+
selector: 'prism-a11y-header-badge',
|
|
60
|
+
standalone: true,
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
imports: [PrismMetricBadgeComponent],
|
|
63
|
+
template: `
|
|
70
64
|
@if (data(); as d) {
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
[
|
|
75
|
-
[
|
|
65
|
+
<prism-metric-badge
|
|
66
|
+
icon="accessibility"
|
|
67
|
+
label="Library accessibility score"
|
|
68
|
+
[value]="d.score + '%'"
|
|
69
|
+
[variant]="d.variant"
|
|
76
70
|
[title]="d.title"
|
|
77
|
-
|
|
78
|
-
<span class="a11y-pill__dot"></span>
|
|
79
|
-
<span class="a11y-pill__label">A11y</span>
|
|
80
|
-
<span class="a11y-pill__value">{{ d.score }}<small>%</small></span>
|
|
81
|
-
</span>
|
|
71
|
+
/>
|
|
82
72
|
}
|
|
83
|
-
`,
|
|
73
|
+
`,
|
|
74
|
+
}]
|
|
84
75
|
}], null, null); })();
|
|
85
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yHeaderBadgeComponent, { className: "A11yHeaderBadgeComponent", filePath: "app/panels/a11y/a11y-header-badge.component.ts", lineNumber:
|
|
76
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yHeaderBadgeComponent, { className: "A11yHeaderBadgeComponent", filePath: "app/panels/a11y/a11y-header-badge.component.ts", lineNumber: 35 }); })();
|
|
@@ -78,7 +78,7 @@ export class A11yKeyboardOverlayComponent {
|
|
|
78
78
|
i0.ɵɵconditionalCreate(0, A11yKeyboardOverlayComponent_Conditional_0_Template, 2, 0);
|
|
79
79
|
} if (rf & 2) {
|
|
80
80
|
i0.ɵɵconditional(ctx.panelState.activeTab() === "keyboard" ? 0 : -1);
|
|
81
|
-
} }, styles: ["[_nghost-%COMP%] {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 100;\n overflow: hidden;\n }\n\n .prism-a11y-kbd-ov__highlight[_ngcontent-%COMP%] {\n position: absolute;\n border: 2px solid rgba(129, 140, 248, 0.5);\n border-radius: 4px;\n background: rgba(129, 140, 248, 0.06);\n box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.08);\n pointer-events: none;\n }\n\n .prism-a11y-kbd-ov__badge[_ngcontent-%COMP%] {\n position: absolute;\n width: 20px;\n height: 20px;\n background: var(
|
|
81
|
+
} }, styles: ["[_nghost-%COMP%] {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 100;\n overflow: hidden;\n }\n\n .prism-a11y-kbd-ov__highlight[_ngcontent-%COMP%] {\n position: absolute;\n border: 2px solid rgba(129, 140, 248, 0.5);\n border-radius: 4px;\n background: rgba(129, 140, 248, 0.06);\n box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.08);\n pointer-events: none;\n }\n\n .prism-a11y-kbd-ov__badge[_ngcontent-%COMP%] {\n position: absolute;\n width: 20px;\n height: 20px;\n background: var(--%NS%prism-primary);\n color: white;\n border-radius: 50%;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 0 0 2px white, 0 2px 6px rgba(0, 0, 0, 0.3);\n font-family: var(--%NS%prism-font-sans, system-ui, sans-serif);\n pointer-events: auto;\n cursor: default;\n }"] });
|
|
82
82
|
}
|
|
83
83
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yKeyboardOverlayComponent, [{
|
|
84
84
|
type: Component,
|
|
@@ -71,7 +71,7 @@ export class A11yKeyboardComponent {
|
|
|
71
71
|
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
72
|
} if (rf & 2) {
|
|
73
73
|
i0.ɵɵconditional(!ctx.rendererService.renderedElement() ? 0 : !ctx.items().length ? 1 : 2);
|
|
74
|
-
} }, styles: ["[_nghost-%COMP%] { display: block; height: 100%; overflow: auto; }\n\n .kb-empty[_ngcontent-%COMP%] {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(
|
|
74
|
+
} }, styles: ["[_nghost-%COMP%] { display: block; height: 100%; overflow: auto; }\n\n .kb-empty[_ngcontent-%COMP%] {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--%NS%prism-text-muted); font-size: 13px;\n }\n\n .kb-body[_ngcontent-%COMP%] {\n padding: 16px 20px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .kb-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 110px 1fr auto;\n align-items: center;\n gap: 12px;\n padding: 9px 14px;\n background: var(--%NS%prism-bg-surface);\n border: 1px solid var(--%NS%prism-border);\n border-radius: 8px;\n }\n\n .kb-keys[_ngcontent-%COMP%] { display: flex; gap: 4px; }\n .kb-keys[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%] {\n font-family: var(--%NS%font-mono);\n font-size: 10.5px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--%NS%prism-input-bg);\n border: 1px solid var(--%NS%prism-border);\n color: var(--%NS%prism-text-muted);\n }\n\n .kb-desc[_ngcontent-%COMP%] {\n font-size: 12.5px;\n color: var(--%NS%prism-text-2);\n }\n\n .kb-tgt[_ngcontent-%COMP%] {\n font-family: var(--%NS%font-mono);\n font-size: 11px;\n color: var(--%NS%prism-primary);\n padding: 2px 7px;\n background: color-mix(in srgb, var(--%NS%prism-primary) 10%, transparent);\n border-radius: var(--%NS%radius-xs);\n }"] });
|
|
75
75
|
}
|
|
76
76
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yKeyboardComponent, [{
|
|
77
77
|
type: Component,
|
|
@@ -3,6 +3,6 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class A11yKeyboardService {
|
|
4
4
|
extractTabOrder(root: Element, getById?: (id: string) => Element | null): FocusableElement[];
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<A11yKeyboardService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=a11y-keyboard.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-keyboard.service.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-keyboard.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;;AA2BxD,qBACa,mBAAmB;IAC9B,eAAe,CACb,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,GACvC,gBAAgB,EAAE;yCAJV,mBAAmB
|
|
1
|
+
{"version":3,"file":"a11y-keyboard.service.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-keyboard.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;;AA2BxD,qBACa,mBAAmB;IAC9B,eAAe,CACb,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,GACvC,gBAAgB,EAAE;yCAJV,mBAAmB;;CAyB/B"}
|
|
@@ -104,7 +104,7 @@ export class A11yOverlayHostComponent {
|
|
|
104
104
|
} if (rf & 2) {
|
|
105
105
|
let tmp_0_0;
|
|
106
106
|
i0.ɵɵconditional((tmp_0_0 = ctx.bounds()) ? 0 : -1, tmp_0_0);
|
|
107
|
-
} }, styles: ["[_nghost-%COMP%] { display: contents; }\n .a11y-mark[_ngcontent-%COMP%] {\n position: absolute;\n pointer-events: none;\n z-index: 1;\n }\n .outline[_ngcontent-%COMP%] {\n border: 2px solid rgba(59, 130, 246, 0.95);\n border-radius: 4px;\n background: rgba(59, 130, 246, 0.08);\n }\n .tag[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 6px;\n border-radius: 4px;\n background: rgba(17, 24, 39, 0.92);\n color: var(
|
|
107
|
+
} }, styles: ["[_nghost-%COMP%] { display: contents; }\n .a11y-mark[_ngcontent-%COMP%] {\n position: absolute;\n pointer-events: none;\n z-index: 1;\n }\n .outline[_ngcontent-%COMP%] {\n border: 2px solid rgba(59, 130, 246, 0.95);\n border-radius: 4px;\n background: rgba(59, 130, 246, 0.08);\n }\n .tag[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 6px;\n border-radius: 4px;\n background: rgba(17, 24, 39, 0.92);\n color: var(--%NS%prism-text-light, #fff);\n font: 11px/1.4 var(--%NS%font-mono);\n white-space: nowrap;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);\n }\n .kb[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%] { background: rgba(5, 150, 105, 0.95); }"] });
|
|
108
108
|
}
|
|
109
109
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yOverlayHostComponent, [{
|
|
110
110
|
type: Component,
|