@ng-prism/core 22.2.0-beta.5 → 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-toolbar.component.d.ts +25 -7
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +152 -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/header/prism-header.component.js +2 -2
- package/dist/app/icons/icon-registry.d.ts.map +1 -1
- package/dist/app/icons/icon-registry.js +2 -0
- 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 +2 -2
- 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-header-badge.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.js +21 -30
- package/dist/app/panels/builtin-panels.d.ts.map +1 -1
- package/dist/app/panels/builtin-panels.js +2 -0
- 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 +15 -11
- 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 +9 -71
- 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-capture.service.d.ts.map +1 -1
- package/dist/app/services/prism-capture.service.js +20 -0
- package/dist/app/services/prism-layout.service.d.ts +0 -3
- 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-panel.service.d.ts +18 -0
- 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/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 +56 -48
- package/dist/app/sidebar/navigation-decorations.d.ts +6 -3
- package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -1
- package/dist/app/sidebar/navigation-decorations.js +7 -4
- package/dist/app/sidebar/prism-sidebar.component.d.ts +11 -7
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +61 -83
- 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 +10 -11
- 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/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
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
|
+
import { PrismIconComponent } from '../icons/prism-icon.component.js';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
function PrismHeadInfoComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵelementStart(0, "p", 4);
|
|
6
|
+
i0.ɵɵtext(1);
|
|
7
|
+
i0.ɵɵelementEnd();
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10
|
+
i0.ɵɵadvance();
|
|
11
|
+
i0.ɵɵtextInterpolate(ctx_r0.description());
|
|
12
|
+
} }
|
|
13
|
+
function PrismHeadInfoComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementStart(0, "p", 5);
|
|
15
|
+
i0.ɵɵtext(1);
|
|
16
|
+
i0.ɵɵelementEnd();
|
|
17
|
+
} if (rf & 2) {
|
|
18
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
19
|
+
i0.ɵɵadvance();
|
|
20
|
+
i0.ɵɵtextInterpolate2(" ", ctx_r0.variantCount(), " ", ctx_r0.variantCount() === 1 ? "variant" : "variants", " ");
|
|
21
|
+
} }
|
|
22
|
+
function PrismHeadInfoComponent_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
24
|
+
i0.ɵɵtext(1);
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const tag_r2 = ctx.$implicit;
|
|
28
|
+
i0.ɵɵadvance();
|
|
29
|
+
i0.ɵɵtextInterpolate(tag_r2);
|
|
30
|
+
} }
|
|
31
|
+
function PrismHeadInfoComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
33
|
+
i0.ɵɵrepeaterCreate(1, PrismHeadInfoComponent_Conditional_7_For_2_Template, 2, 1, "span", 7, i0.ɵɵrepeaterTrackByIdentity);
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
37
|
+
i0.ɵɵadvance();
|
|
38
|
+
i0.ɵɵrepeater(ctx_r0.tags());
|
|
39
|
+
} }
|
|
40
|
+
/**
|
|
41
|
+
* Identity disclosure for the component head.
|
|
42
|
+
*
|
|
43
|
+
* Selector, description and tags all answer "what is this component" — a
|
|
44
|
+
* question you read once on arrival and never again while building. Keeping
|
|
45
|
+
* them permanently on screen cost a 128px band to say something that belongs
|
|
46
|
+
* behind one glyph.
|
|
47
|
+
*
|
|
48
|
+
* Opening is click-only, through the native Popover API. Escape, click-outside
|
|
49
|
+
* dismissal and top-layer placement come with it declaratively; a hover panel
|
|
50
|
+
* would mean rebuilding all three by hand, and crossing the gap between icon
|
|
51
|
+
* and card without the card closing is its own problem.
|
|
52
|
+
*/
|
|
53
|
+
export class PrismHeadInfoComponent {
|
|
54
|
+
selector = input.required(/* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "selector" }] : /* istanbul ignore next */ []));
|
|
56
|
+
description = input(undefined, /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
58
|
+
tags = input([], /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "tags" }] : /* istanbul ignore next */ []));
|
|
60
|
+
variantCount = input(0, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "variantCount" }] : /* istanbul ignore next */ []));
|
|
62
|
+
static ɵfac = function PrismHeadInfoComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismHeadInfoComponent)(); };
|
|
63
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismHeadInfoComponent, selectors: [["prism-head-info"]], inputs: { selector: [1, "selector"], description: [1, "description"], tags: [1, "tags"], variantCount: [1, "variantCount"] }, decls: 8, vars: 5, consts: [["type", "button", "popovertarget", "prism-head-info", "title", "Component details", "aria-label", "Component details", 1, "info-btn"], ["name", "info", 3, "size"], ["popover", "", "id", "prism-head-info", "role", "dialog", "aria-label", "Component details", 1, "info-card"], [1, "info-card__selector"], [1, "info-card__desc"], [1, "info-card__meta"], [1, "info-card__tags"], [1, "info-card__tag"]], template: function PrismHeadInfoComponent_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
+
i0.ɵɵelementStart(0, "button", 0);
|
|
65
|
+
i0.ɵɵelement(1, "prism-icon", 1);
|
|
66
|
+
i0.ɵɵelementEnd();
|
|
67
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "code", 3);
|
|
68
|
+
i0.ɵɵtext(4);
|
|
69
|
+
i0.ɵɵelementEnd();
|
|
70
|
+
i0.ɵɵconditionalCreate(5, PrismHeadInfoComponent_Conditional_5_Template, 2, 1, "p", 4);
|
|
71
|
+
i0.ɵɵconditionalCreate(6, PrismHeadInfoComponent_Conditional_6_Template, 2, 2, "p", 5);
|
|
72
|
+
i0.ɵɵconditionalCreate(7, PrismHeadInfoComponent_Conditional_7_Template, 3, 0, "div", 6);
|
|
73
|
+
i0.ɵɵelementEnd();
|
|
74
|
+
} if (rf & 2) {
|
|
75
|
+
i0.ɵɵadvance();
|
|
76
|
+
i0.ɵɵproperty("size", 13);
|
|
77
|
+
i0.ɵɵadvance(3);
|
|
78
|
+
i0.ɵɵtextInterpolate1("<", ctx.selector(), ">");
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵconditional(ctx.description() ? 5 : -1);
|
|
81
|
+
i0.ɵɵadvance();
|
|
82
|
+
i0.ɵɵconditional(ctx.variantCount() > 0 ? 6 : -1);
|
|
83
|
+
i0.ɵɵadvance();
|
|
84
|
+
i0.ɵɵconditional(ctx.tags().length ? 7 : -1);
|
|
85
|
+
} }, dependencies: [PrismIconComponent], styles: ["[_nghost-%COMP%] { display: inline-flex; }\n\n .info-btn[_ngcontent-%COMP%] {\n display: grid;\n place-items: center;\n width: 20px;\n height: 20px;\n padding: 0;\n border: 0;\n border-radius: var(--%NS%radius-xs);\n background: transparent;\n color: var(--%NS%prism-text-ghost);\n cursor: pointer;\n anchor-name: --prism-head-info;\n }\n .info-btn[_ngcontent-%COMP%]:hover { color: var(--%NS%prism-text-2); }\n .info-btn[_ngcontent-%COMP%]:focus-visible {\n outline: 2px solid var(--%NS%prism-primary);\n outline-offset: 1px;\n }\n\n .info-card[_ngcontent-%COMP%] {\n margin: 0;\n padding: var(--%NS%sp-4);\n width: 320px;\n max-width: calc(100vw - var(--%NS%sp-6));\n border: 1px solid var(--%NS%prism-border-strong);\n border-radius: var(--%NS%radius-md);\n background: var(--%NS%prism-bg-elevated);\n color: var(--%NS%prism-text-2);\n box-shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.45);\n position-anchor: --prism-head-info;\n position-area: block-end span-inline-end;\n position-try-fallbacks: flip-block, flip-inline;\n inset: auto;\n }\n\n .info-card__selector[_ngcontent-%COMP%] {\n display: block;\n font-family: var(--%NS%font-mono);\n font-size: var(--%NS%fs-md);\n color: var(--%NS%prism-primary);\n user-select: all;\n }\n .info-card__desc[_ngcontent-%COMP%] {\n margin: var(--%NS%sp-3) 0 0;\n font-size: var(--%NS%fs-lg);\n line-height: 1.55;\n }\n \n\n\n .info-card__meta[_ngcontent-%COMP%] {\n margin: var(--%NS%sp-3) 0 0;\n font-size: var(--%NS%fs-md);\n color: var(--%NS%prism-text-muted);\n }\n .info-card__tags[_ngcontent-%COMP%] {\n margin-top: var(--%NS%sp-4);\n display: flex;\n flex-wrap: wrap;\n gap: var(--%NS%sp-2);\n }\n .info-card__tag[_ngcontent-%COMP%] {\n padding: 1px var(--%NS%sp-3);\n font-size: var(--%NS%fs-xs);\n border-radius: var(--%NS%radius-xs);\n border: 1px solid var(--%NS%prism-border);\n color: var(--%NS%prism-text-muted);\n }"] });
|
|
86
|
+
}
|
|
87
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismHeadInfoComponent, [{
|
|
88
|
+
type: Component,
|
|
89
|
+
args: [{ selector: 'prism-head-info', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismIconComponent], template: `
|
|
90
|
+
<button
|
|
91
|
+
class="info-btn"
|
|
92
|
+
type="button"
|
|
93
|
+
popovertarget="prism-head-info"
|
|
94
|
+
title="Component details"
|
|
95
|
+
aria-label="Component details"
|
|
96
|
+
>
|
|
97
|
+
<prism-icon name="info" [size]="13" />
|
|
98
|
+
</button>
|
|
99
|
+
|
|
100
|
+
<div
|
|
101
|
+
popover
|
|
102
|
+
id="prism-head-info"
|
|
103
|
+
class="info-card"
|
|
104
|
+
role="dialog"
|
|
105
|
+
aria-label="Component details"
|
|
106
|
+
>
|
|
107
|
+
<code class="info-card__selector"><{{ selector() }}></code>
|
|
108
|
+
@if (description()) {
|
|
109
|
+
<p class="info-card__desc">{{ description() }}</p>
|
|
110
|
+
} @if (variantCount() > 0) {
|
|
111
|
+
<p class="info-card__meta">
|
|
112
|
+
{{ variantCount() }} {{ variantCount() === 1 ? 'variant' : 'variants' }}
|
|
113
|
+
</p>
|
|
114
|
+
} @if (tags().length) {
|
|
115
|
+
<div class="info-card__tags">
|
|
116
|
+
@for (tag of tags(); track tag) {
|
|
117
|
+
<span class="info-card__tag">{{ tag }}</span>
|
|
118
|
+
}
|
|
119
|
+
</div>
|
|
120
|
+
}
|
|
121
|
+
</div>
|
|
122
|
+
`, styles: ["\n :host { display: inline-flex; }\n\n .info-btn {\n display: grid;\n place-items: center;\n width: 20px;\n height: 20px;\n padding: 0;\n border: 0;\n border-radius: var(--radius-xs);\n background: transparent;\n color: var(--prism-text-ghost);\n cursor: pointer;\n anchor-name: --prism-head-info;\n }\n .info-btn:hover { color: var(--prism-text-2); }\n .info-btn:focus-visible {\n outline: 2px solid var(--prism-primary);\n outline-offset: 1px;\n }\n\n .info-card {\n margin: 0;\n padding: var(--sp-4);\n width: 320px;\n max-width: calc(100vw - var(--sp-6));\n border: 1px solid var(--prism-border-strong);\n border-radius: var(--radius-md);\n background: var(--prism-bg-elevated);\n color: var(--prism-text-2);\n box-shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.45);\n position-anchor: --prism-head-info;\n position-area: block-end span-inline-end;\n position-try-fallbacks: flip-block, flip-inline;\n inset: auto;\n }\n\n .info-card__selector {\n display: block;\n font-family: var(--font-mono);\n font-size: var(--fs-md);\n color: var(--prism-primary);\n user-select: all;\n }\n .info-card__desc {\n margin: var(--sp-3) 0 0;\n font-size: var(--fs-lg);\n line-height: 1.55;\n }\n /* A plain fact about the component, not a measurement \u2014 it sits here with\n the selector and the tags rather than in the gauge, whose numbers all\n answer \"did this pass its threshold\". A count cannot. */\n .info-card__meta {\n margin: var(--sp-3) 0 0;\n font-size: var(--fs-md);\n color: var(--prism-text-muted);\n }\n .info-card__tags {\n margin-top: var(--sp-4);\n display: flex;\n flex-wrap: wrap;\n gap: var(--sp-2);\n }\n .info-card__tag {\n padding: 1px var(--sp-3);\n font-size: var(--fs-xs);\n border-radius: var(--radius-xs);\n border: 1px solid var(--prism-border);\n color: var(--prism-text-muted);\n }\n "] }]
|
|
123
|
+
}], null, { selector: [{ type: i0.Input, args: [{ isSignal: true, alias: "selector", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], tags: [{ type: i0.Input, args: [{ isSignal: true, alias: "tags", required: false }] }], variantCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "variantCount", required: false }] }] }); })();
|
|
124
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismHeadInfoComponent, { className: "PrismHeadInfoComponent", filePath: "app/component-head/prism-head-info.component.ts", lineNumber: 129 }); })();
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import type { MetricVariant } from './head-metrics.js';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* One line of the gauge's readout: caption left, value right.
|
|
5
|
+
*
|
|
6
|
+
* Was a right-aligned tile in the old head. The pill it used to carry is gone
|
|
7
|
+
* rather than restyled — it duplicated the caption directly beneath it.
|
|
8
|
+
*/
|
|
2
9
|
export declare class PrismStatComponent {
|
|
3
|
-
readonly value: import("@angular/core").InputSignal<string | number>;
|
|
4
10
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
11
|
+
readonly value: import("@angular/core").InputSignal<string | number>;
|
|
12
|
+
readonly variant: import("@angular/core").InputSignal<MetricVariant>;
|
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismStatComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PrismStatComponent, "prism-stat", never, { "
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismStatComponent, "prism-stat", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
15
|
}
|
|
10
16
|
//# sourceMappingURL=prism-stat.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-stat.component.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/prism-stat.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prism-stat.component.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/prism-stat.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;AAEvD;;;;;GAKG;AACH,qBAoDa,kBAAkB;IAC7B,QAAQ,CAAC,KAAK,8CAA4B;IAC1C,QAAQ,CAAC,KAAK,uDAAqC;IACnD,QAAQ,CAAC,OAAO,qDAA8B;yCAHnC,kBAAkB;2CAAlB,kBAAkB;CAI9B"}
|
|
@@ -1,59 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
i0.ɵɵclassProp("warn", ctx_r0.pillVariant() === "warn")("danger", ctx_r0.pillVariant() === "danger");
|
|
10
|
-
i0.ɵɵadvance();
|
|
11
|
-
i0.ɵɵtextInterpolate(ctx_r0.pill());
|
|
12
|
-
} }
|
|
3
|
+
/**
|
|
4
|
+
* One line of the gauge's readout: caption left, value right.
|
|
5
|
+
*
|
|
6
|
+
* Was a right-aligned tile in the old head. The pill it used to carry is gone
|
|
7
|
+
* rather than restyled — it duplicated the caption directly beneath it.
|
|
8
|
+
*/
|
|
13
9
|
export class PrismStatComponent {
|
|
14
|
-
value = input.required(/* @ts-ignore */
|
|
15
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
16
10
|
label = input.required(/* @ts-ignore */
|
|
17
11
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
18
|
-
|
|
19
|
-
...(ngDevMode ? [
|
|
20
|
-
|
|
21
|
-
...(ngDevMode ? [{ debugName: "
|
|
12
|
+
value = input.required(/* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
14
|
+
variant = input('ok', /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
22
16
|
static ɵfac = function PrismStatComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismStatComponent)(); };
|
|
23
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismStatComponent, selectors: [["prism-stat"]], inputs: {
|
|
24
|
-
i0.ɵɵdomElementStart(0, "div", 0)
|
|
25
|
-
i0.ɵɵ
|
|
26
|
-
i0.ɵɵ
|
|
17
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismStatComponent, selectors: [["prism-stat"]], inputs: { label: [1, "label"], value: [1, "value"], variant: [1, "variant"] }, decls: 6, vars: 8, consts: [[1, "stat"], ["aria-hidden", "true", 1, "stat__dot"], [1, "stat__lbl"], [1, "stat__val"]], template: function PrismStatComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
19
|
+
i0.ɵɵdomElement(1, "span", 1);
|
|
20
|
+
i0.ɵɵdomElementStart(2, "span", 2);
|
|
21
|
+
i0.ɵɵtext(3);
|
|
27
22
|
i0.ɵɵdomElementEnd();
|
|
28
|
-
i0.ɵɵdomElementStart(4, "
|
|
23
|
+
i0.ɵɵdomElementStart(4, "span", 3);
|
|
29
24
|
i0.ɵɵtext(5);
|
|
30
25
|
i0.ɵɵdomElementEnd()();
|
|
31
26
|
} if (rf & 2) {
|
|
32
|
-
i0.ɵɵ
|
|
33
|
-
i0.ɵɵ
|
|
34
|
-
i0.ɵɵadvance();
|
|
35
|
-
i0.ɵɵconditional(ctx.pill() ? 3 : -1);
|
|
36
|
-
i0.ɵɵadvance(2);
|
|
27
|
+
i0.ɵɵclassProp("stat--ok", ctx.variant() === "ok")("stat--warn", ctx.variant() === "warn")("stat--danger", ctx.variant() === "danger");
|
|
28
|
+
i0.ɵɵadvance(3);
|
|
37
29
|
i0.ɵɵtextInterpolate(ctx.label());
|
|
38
|
-
|
|
30
|
+
i0.ɵɵadvance(2);
|
|
31
|
+
i0.ɵɵtextInterpolate(ctx.value());
|
|
32
|
+
} }, styles: [".stat[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--%NS%sp-3);\n padding: var(--%NS%sp-2) var(--%NS%sp-3);\n border-radius: var(--%NS%radius-xs);\n font-size: var(--%NS%fs-md);\n color: var(--%NS%prism-text-2);\n }\n .stat__dot[_ngcontent-%COMP%] {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: transparent;\n flex: none;\n }\n .stat__lbl[_ngcontent-%COMP%] { white-space: nowrap; }\n .stat__val[_ngcontent-%COMP%] {\n margin-left: auto;\n font-family: var(--%NS%font-mono);\n font-variant-numeric: tabular-nums;\n color: var(--%NS%prism-text);\n }\n \n\n\n\n .stat--ok[_ngcontent-%COMP%] .stat__dot[_ngcontent-%COMP%] { background: var(--%NS%prism-mark-nominal); }\n .stat--ok[_ngcontent-%COMP%] .stat__val[_ngcontent-%COMP%] { color: var(--%NS%prism-mark-nominal); }\n .stat--warn[_ngcontent-%COMP%] .stat__dot[_ngcontent-%COMP%] { background: var(--%NS%prism-mark-attention); }\n .stat--warn[_ngcontent-%COMP%] .stat__val[_ngcontent-%COMP%] { color: var(--%NS%prism-mark-attention); }\n .stat--danger[_ngcontent-%COMP%] .stat__dot[_ngcontent-%COMP%] { background: var(--%NS%prism-mark-critical); }\n .stat--danger[_ngcontent-%COMP%] .stat__val[_ngcontent-%COMP%] { color: var(--%NS%prism-mark-critical); }"] });
|
|
39
33
|
}
|
|
40
34
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismStatComponent, [{
|
|
41
35
|
type: Component,
|
|
42
36
|
args: [{ selector: 'prism-stat', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
43
|
-
<div
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
}
|
|
54
|
-
</div>
|
|
55
|
-
<div class="stat-lbl">{{ label() }}</div>
|
|
37
|
+
<div
|
|
38
|
+
class="stat"
|
|
39
|
+
[class.stat--ok]="variant() === 'ok'"
|
|
40
|
+
[class.stat--warn]="variant() === 'warn'"
|
|
41
|
+
[class.stat--danger]="variant() === 'danger'"
|
|
42
|
+
>
|
|
43
|
+
<span class="stat__dot" aria-hidden="true"></span>
|
|
44
|
+
<span class="stat__lbl">{{ label() }}</span>
|
|
45
|
+
<span class="stat__val">{{ value() }}</span>
|
|
56
46
|
</div>
|
|
57
|
-
`, styles: ["\n .stat {\n display: flex;\n
|
|
58
|
-
}], null, {
|
|
59
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismStatComponent, { className: "PrismStatComponent", filePath: "app/component-head/prism-stat.component.ts", lineNumber:
|
|
47
|
+
`, styles: ["\n .stat {\n display: flex;\n align-items: center;\n gap: var(--sp-3);\n padding: var(--sp-2) var(--sp-3);\n border-radius: var(--radius-xs);\n font-size: var(--fs-md);\n color: var(--prism-text-2);\n }\n .stat__dot {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: transparent;\n flex: none;\n }\n .stat__lbl { white-space: nowrap; }\n .stat__val {\n margin-left: auto;\n font-family: var(--font-mono);\n font-variant-numeric: tabular-nums;\n color: var(--prism-text);\n }\n /* Four states, four treatments. \"ok\" earns the nominal green, and \"none\"\n deliberately does not: a metric with no data has nothing to report, and\n colouring it green would claim a clean result the tool never measured.\n That is the one distinction worth keeping grey. */\n .stat--ok .stat__dot { background: var(--prism-mark-nominal); }\n .stat--ok .stat__val { color: var(--prism-mark-nominal); }\n .stat--warn .stat__dot { background: var(--prism-mark-attention); }\n .stat--warn .stat__val { color: var(--prism-mark-attention); }\n .stat--danger .stat__dot { background: var(--prism-mark-critical); }\n .stat--danger .stat__val { color: var(--prism-mark-critical); }\n "] }]
|
|
48
|
+
}], null, { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] }); })();
|
|
49
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismStatComponent, { className: "PrismStatComponent", filePath: "app/component-head/prism-stat.component.ts", lineNumber: 62 }); })();
|
|
@@ -158,7 +158,7 @@ export class PrismHeaderComponent {
|
|
|
158
158
|
i0.ɵɵconditional(ctx.themeService.isDark() ? 14 : 15);
|
|
159
159
|
} }, dependencies: [PrismIconComponent,
|
|
160
160
|
PrismLayoutMenuComponent,
|
|
161
|
-
PrismHeaderWidgetHostComponent], styles: [".prism-header[_ngcontent-%COMP%] {\n height:
|
|
161
|
+
PrismHeaderWidgetHostComponent], styles: [".prism-header[_ngcontent-%COMP%] {\n height: var(--%NS%band-header);\n display: grid;\n grid-template-columns: minmax(min-content, var(--%NS%sw, 264px)) 1fr auto;\n align-items: center;\n padding: 0 14px 0 0;\n background: var(--%NS%prism-bg);\n border-bottom: 1px solid var(--%NS%prism-border);\n }\n\n .prism-header__brand[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 16px;\n cursor: pointer;\n white-space: nowrap;\n }\n\n .prism-header__logo-default[_ngcontent-%COMP%] {\n width: 26px;\n height: 26px;\n flex: 0 0 26px;\n color: var(--%NS%prism-primary);\n filter: drop-shadow(0 0 8px var(--%NS%prism-glow-strong));\n }\n .prism-header__logo-default[_ngcontent-%COMP%] img[_ngcontent-%COMP%] { width: 30px; }\n\n .prism-header__logo-img[_ngcontent-%COMP%] {\n height: 26px;\n width: auto;\n object-fit: contain;\n }\n\n .prism-header__brand-text[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n line-height: 1.1;\n }\n\n .prism-header__brand-name[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: var(--%NS%fs-xl);\n letter-spacing: -0.01em;\n background: linear-gradient(90deg, var(--%NS%prism-primary), var(--%NS%prism-accent) 60%, var(--%NS%prism-primary-to));\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n }\n\n .prism-header__brand-sub[_ngcontent-%COMP%] {\n font-family: var(--%NS%font-mono);\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-ghost);\n }\n\n .prism-header__cmdbar[_ngcontent-%COMP%] {\n max-width: 540px;\n width: 100%;\n justify-self: center;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 32px;\n padding: 0 12px;\n background: var(--%NS%prism-input-bg);\n border: 1px solid var(--%NS%prism-border);\n border-radius: 8px;\n color: var(--%NS%prism-text-muted);\n font-size: var(--%NS%fs-lg);\n cursor: pointer;\n transition: border-color var(--%NS%dur-fast), background var(--%NS%dur-fast);\n }\n .prism-header__cmdbar[_ngcontent-%COMP%]:hover {\n border-color: var(--%NS%prism-border-strong);\n color: var(--%NS%prism-text-2);\n }\n\n .prism-header__cmdbar-text[_ngcontent-%COMP%] {\n flex: 1;\n text-align: left;\n }\n\n .prism-header__cmdbar-shortcut[_ngcontent-%COMP%] {\n display: flex;\n gap: 3px;\n }\n .prism-header__cmdbar-shortcut[_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 .prism-header__build-pill[_ngcontent-%COMP%] {\n font-family: var(--%NS%font-mono);\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-ghost);\n background: var(--%NS%prism-input-bg);\n border: 1px solid var(--%NS%prism-border);\n border-radius: 9999px;\n padding: 2px 10px;\n white-space: nowrap;\n line-height: 1.4;\n }\n\n .prism-header__actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n }\n\n .prism-header__widgets[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n .prism-header__widgets--start[_ngcontent-%COMP%] {\n padding-left: 4px;\n justify-content: flex-start;\n }\n\n .prism-header__icon-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: grid;\n place-items: center;\n border-radius: 8px;\n color: var(--%NS%prism-text-muted);\n background: none;\n border: none;\n cursor: pointer;\n position: relative;\n transition: all var(--%NS%dur-fast);\n }\n .prism-header__icon-btn[_ngcontent-%COMP%]:hover {\n background: var(--%NS%prism-input-bg);\n color: var(--%NS%prism-text);\n }\n\n [_ngcontent-%COMP%]:focus-visible {\n outline: 2px solid var(--%NS%prism-primary);\n outline-offset: 2px;\n }"] });
|
|
162
162
|
}
|
|
163
163
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismHeaderComponent, [{
|
|
164
164
|
type: Component,
|
|
@@ -223,7 +223,7 @@ export class PrismHeaderComponent {
|
|
|
223
223
|
<prism-layout-menu />
|
|
224
224
|
</div>
|
|
225
225
|
</header>
|
|
226
|
-
`, styles: ["\n .prism-header {\n height:
|
|
226
|
+
`, styles: ["\n .prism-header {\n height: var(--band-header);\n display: grid;\n grid-template-columns: minmax(min-content, var(--sw, 264px)) 1fr auto;\n align-items: center;\n padding: 0 14px 0 0;\n background: var(--prism-bg);\n border-bottom: 1px solid var(--prism-border);\n }\n\n .prism-header__brand {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 16px;\n cursor: pointer;\n white-space: nowrap;\n }\n\n .prism-header__logo-default {\n width: 26px;\n height: 26px;\n flex: 0 0 26px;\n color: var(--prism-primary);\n filter: drop-shadow(0 0 8px var(--prism-glow-strong));\n }\n .prism-header__logo-default img { width: 30px; }\n\n .prism-header__logo-img {\n height: 26px;\n width: auto;\n object-fit: contain;\n }\n\n .prism-header__brand-text {\n display: flex;\n flex-direction: column;\n line-height: 1.1;\n }\n\n .prism-header__brand-name {\n font-weight: 700;\n font-size: var(--fs-xl);\n letter-spacing: -0.01em;\n background: linear-gradient(90deg, var(--prism-primary), var(--prism-accent) 60%, var(--prism-primary-to));\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n }\n\n .prism-header__brand-sub {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n color: var(--prism-text-ghost);\n }\n\n .prism-header__cmdbar {\n max-width: 540px;\n width: 100%;\n justify-self: center;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 32px;\n padding: 0 12px;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: 8px;\n color: var(--prism-text-muted);\n font-size: var(--fs-lg);\n cursor: pointer;\n transition: border-color var(--dur-fast), background var(--dur-fast);\n }\n .prism-header__cmdbar:hover {\n border-color: var(--prism-border-strong);\n color: var(--prism-text-2);\n }\n\n .prism-header__cmdbar-text {\n flex: 1;\n text-align: left;\n }\n\n .prism-header__cmdbar-shortcut {\n display: flex;\n gap: 3px;\n }\n .prism-header__cmdbar-shortcut 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 .prism-header__build-pill {\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n color: var(--prism-text-ghost);\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: 9999px;\n padding: 2px 10px;\n white-space: nowrap;\n line-height: 1.4;\n }\n\n .prism-header__actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n }\n\n .prism-header__widgets {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n .prism-header__widgets--start {\n padding-left: 4px;\n justify-content: flex-start;\n }\n\n .prism-header__icon-btn {\n width: 32px;\n height: 32px;\n display: grid;\n place-items: center;\n border-radius: 8px;\n color: var(--prism-text-muted);\n background: none;\n border: none;\n cursor: pointer;\n position: relative;\n transition: all var(--dur-fast);\n }\n .prism-header__icon-btn:hover {\n background: var(--prism-input-bg);\n color: var(--prism-text);\n }\n\n :focus-visible {\n outline: 2px solid var(--prism-primary);\n outline-offset: 2px;\n }\n "] }]
|
|
227
227
|
}], null, { onGlobalKey: [{
|
|
228
228
|
type: HostListener,
|
|
229
229
|
args: ['document:keydown', ['$event']]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-registry.d.ts","sourceRoot":"","sources":["../../../src/app/icons/icon-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,QAAA,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"icon-registry.d.ts","sourceRoot":"","sources":["../../../src/app/icons/icon-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,QAAA,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2CjC,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,iFAAiF;AACjF,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAuB,CAAC"}
|
|
@@ -36,6 +36,8 @@ const ICONS = {
|
|
|
36
36
|
code: '<path d="m18 16 4-4-4-4M6 8l-4 4 4 4m8.5-12-5 16"/>',
|
|
37
37
|
x: '<path d="M18 6 6 18M6 6l12 12"/>',
|
|
38
38
|
check: '<path d="M20 6 9 17l-5-5"/>',
|
|
39
|
+
info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
|
|
40
|
+
'circle-dashed': '<path d="M10.1 2.18a9.93 9.93 0 0 1 3.8 0"/><path d="M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7"/><path d="M21.82 10.1a9.93 9.93 0 0 1 0 3.8"/><path d="M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69"/><path d="M13.9 21.82a9.94 9.94 0 0 1-3.8 0"/><path d="M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7"/><path d="M2.18 13.9a9.93 9.93 0 0 1 0-3.8"/><path d="M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69"/>',
|
|
39
41
|
};
|
|
40
42
|
export { ICONS };
|
|
41
43
|
/** Every name the registry can draw — what a panel's `icon` has to pick from. */
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PRISM_MANIFEST, PRISM_CONFIG
|
|
1
|
+
export { PRISM_MANIFEST, PRISM_CONFIG } from './tokens/prism-tokens.js';
|
|
2
2
|
export { PRISM_DEFAULT_THEME, PRISM_DARK_THEME, PRISM_LIGHT_THEME, PRISM_BASE_TOKENS, } from './theme/prism-default-theme.js';
|
|
3
3
|
export { PrismThemeService } from './services/prism-theme.service.js';
|
|
4
4
|
export type { NavigationItem } from './services/navigation-item.types.js';
|
|
@@ -16,4 +16,6 @@ export { PrismPageRendererComponent } from './page-renderer/prism-page-renderer.
|
|
|
16
16
|
export { providePrism } from './provide-prism.js';
|
|
17
17
|
export type { ProvidePrismOptions } from './provide-prism.js';
|
|
18
18
|
export { enablePrismHmr } from './hmr.js';
|
|
19
|
+
export { PrismMetricBadgeComponent } from './shared/prism-metric-badge.component.js';
|
|
20
|
+
export { PrismIconComponent } from './icons/prism-icon.component.js';
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxE,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;AAyB1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}
|
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");
|
|
@@ -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"}
|