@ng-prism/core 22.3.0 → 22.4.1
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/README.md +13 -13
- package/dist/app/canvas/canvas-bg.styles.d.ts +7 -12
- package/dist/app/canvas/canvas-bg.styles.d.ts.map +1 -1
- package/dist/app/canvas/canvas-bg.styles.js +35 -37
- package/dist/app/canvas/measure-geometry.d.ts +140 -0
- package/dist/app/canvas/measure-geometry.d.ts.map +1 -0
- package/dist/app/canvas/measure-geometry.js +217 -0
- package/dist/app/canvas/measure-keyboard.d.ts +20 -0
- package/dist/app/canvas/measure-keyboard.d.ts.map +1 -0
- package/dist/app/canvas/measure-keyboard.js +34 -0
- package/dist/app/canvas/measure-quad.d.ts +114 -0
- package/dist/app/canvas/measure-quad.d.ts.map +1 -0
- package/dist/app/canvas/measure-quad.js +173 -0
- package/dist/app/canvas/measure-snap.d.ts +35 -0
- package/dist/app/canvas/measure-snap.d.ts.map +1 -0
- package/dist/app/canvas/measure-snap.js +63 -0
- package/dist/app/canvas/prism-canvas-measure.component.d.ts +142 -0
- package/dist/app/canvas/prism-canvas-measure.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-measure.component.js +554 -0
- package/dist/app/canvas/prism-canvas-pin-row.component.d.ts +23 -0
- package/dist/app/canvas/prism-canvas-pin-row.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-pin-row.component.js +64 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +22 -39
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +61 -69
- package/dist/app/canvas/prism-template-popover.component.js +1 -1
- package/dist/app/canvas/viewport-snap.d.ts +1 -1
- package/dist/app/canvas/viewport-snap.js +1 -1
- package/dist/app/component-head/head-metrics.d.ts +2 -2
- package/dist/app/component-head/head-metrics.js +1 -1
- package/dist/app/component-head/prism-component-head.component.d.ts +2 -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 +11 -18
- package/dist/app/component-head/prism-head-gauge.component.js +1 -1
- package/dist/app/component-head/prism-head-info.component.d.ts +1 -1
- package/dist/app/component-head/prism-head-info.component.js +2 -2
- package/dist/app/component-head/prism-stat.component.d.ts +1 -1
- package/dist/app/component-head/prism-stat.component.js +2 -2
- package/dist/app/directives/prism-resizer.directive.d.ts +1 -1
- package/dist/app/directives/prism-resizer.directive.js +2 -2
- package/dist/app/directives/resize-value.d.ts +2 -2
- package/dist/app/directives/resize-value.js +2 -2
- package/dist/app/discovery-manifest.d.ts +2 -2
- package/dist/app/discovery-manifest.d.ts.map +1 -1
- package/dist/app/discovery-manifest.js +11 -15
- package/dist/app/header/prism-header.component.js +1 -1
- package/dist/app/icons/icon-registry.d.ts +2 -2
- package/dist/app/icons/icon-registry.d.ts.map +1 -1
- package/dist/app/icons/icon-registry.js +3 -2
- package/dist/app/icons/prism-icon.component.d.ts +2 -2
- package/dist/app/icons/prism-icon.component.js +4 -4
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +14 -21
- package/dist/app/overview/overview-visibility.d.ts +1 -1
- package/dist/app/overview/overview-visibility.js +1 -1
- package/dist/app/overview/prism-overview-cell.component.d.ts +2 -2
- package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview-cell.component.js +9 -10
- package/dist/app/overview/prism-overview.component.d.ts +2 -2
- package/dist/app/overview/prism-overview.component.js +2 -2
- package/dist/app/page-renderer/prism-page-renderer.component.js +1 -1
- package/dist/app/panels/a11y/a11y-audit.service.js +2 -2
- package/dist/app/panels/a11y/a11y-summary.d.ts +3 -4
- package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-summary.js +3 -4
- package/dist/app/panels/a11y/a11y-thresholds.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-thresholds.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-thresholds.js +1 -1
- package/dist/app/panels/a11y/a11y.types.d.ts +1 -1
- package/dist/app/panels/a11y/a11y.types.d.ts.map +1 -1
- package/dist/app/panels/builtin-navigation-decorations.d.ts +1 -1
- package/dist/app/panels/builtin-navigation-decorations.js +1 -1
- package/dist/app/panels/controls/non-editable-input-types.js +1 -1
- package/dist/app/panels/panel-host/panel-badge.d.ts +1 -1
- package/dist/app/provide-prism.js +1 -1
- package/dist/app/renderer/known-inputs.d.ts +1 -1
- package/dist/app/renderer/known-inputs.js +1 -1
- package/dist/app/renderer/overlay-resolver.d.ts +17 -3
- package/dist/app/renderer/overlay-resolver.d.ts.map +1 -1
- package/dist/app/renderer/overlay-resolver.js +9 -4
- package/dist/app/renderer/prism-renderer.component.d.ts +3 -3
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +25 -16
- package/dist/app/renderer/projectable-content.js +3 -3
- package/dist/app/services/prism-canvas.service.d.ts +12 -1
- package/dist/app/services/prism-canvas.service.d.ts.map +1 -1
- package/dist/app/services/prism-canvas.service.js +23 -5
- package/dist/app/services/prism-capture.service.d.ts +24 -50
- package/dist/app/services/prism-capture.service.d.ts.map +1 -1
- package/dist/app/services/prism-capture.service.js +60 -140
- package/dist/app/services/prism-measure.service.d.ts +44 -0
- package/dist/app/services/prism-measure.service.d.ts.map +1 -0
- package/dist/app/services/prism-measure.service.js +91 -0
- package/dist/app/services/prism-panel.service.d.ts +2 -2
- package/dist/app/services/prism-panel.service.js +2 -2
- package/dist/app/services/prism-persistence.service.js +1 -1
- package/dist/app/services/prism-renderer.service.js +1 -1
- package/dist/app/services/prism-url-state.service.js +1 -1
- package/dist/app/services/prism-variant-bg.service.d.ts +10 -24
- package/dist/app/services/prism-variant-bg.service.d.ts.map +1 -1
- package/dist/app/services/prism-variant-bg.service.js +10 -24
- package/dist/app/shared/prism-metric-badge.component.d.ts +9 -15
- package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -1
- package/dist/app/shared/prism-metric-badge.component.js +10 -16
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +12 -9
- package/dist/app/sidebar/navigation-decorations.d.ts +4 -4
- package/dist/app/sidebar/navigation-decorations.js +2 -2
- package/dist/app/sidebar/prism-sidebar.component.d.ts +2 -2
- package/dist/app/sidebar/prism-sidebar.component.js +3 -3
- package/dist/app/theme/prism-default-theme.js +3 -3
- package/dist/app/variant-ribbon/spectrum.d.ts +1 -1
- package/dist/app/variant-ribbon/spectrum.js +1 -1
- package/dist/app/view-tab-bar/next-view-id.d.ts +1 -1
- package/dist/app/view-tab-bar/next-view-id.js +1 -1
- package/dist/builder/a11y/a11y-report-reader.d.ts +1 -1
- package/dist/builder/a11y/a11y-report-reader.js +1 -1
- package/dist/builder/manifest/runtime-manifest.generator.js +6 -2
- package/dist/builder/plugin-runner/plugin-runner.js +1 -1
- package/dist/builder/scanner/ast-utils.d.ts +46 -2
- package/dist/builder/scanner/ast-utils.d.ts.map +1 -1
- package/dist/builder/scanner/ast-utils.js +337 -31
- package/dist/builder/scanner/class-hierarchy.d.ts +33 -0
- package/dist/builder/scanner/class-hierarchy.d.ts.map +1 -0
- package/dist/builder/scanner/class-hierarchy.js +87 -0
- package/dist/builder/scanner/component.scanner.d.ts +7 -1
- package/dist/builder/scanner/component.scanner.d.ts.map +1 -1
- package/dist/builder/scanner/component.scanner.js +106 -58
- package/dist/builder/scanner/input.extractor.d.ts +7 -4
- package/dist/builder/scanner/input.extractor.d.ts.map +1 -1
- package/dist/builder/scanner/input.extractor.js +153 -55
- package/dist/builder/scanner/manifest.generator.js +6 -2
- package/dist/builder/scanner/scanner.d.ts +3 -1
- package/dist/builder/scanner/scanner.d.ts.map +1 -1
- package/dist/builder/scanner/scanner.js +6 -4
- package/dist/builder/scanner/showcase-diagnostics.d.ts +25 -0
- package/dist/builder/scanner/showcase-diagnostics.d.ts.map +1 -0
- package/dist/builder/scanner/showcase-diagnostics.js +96 -0
- package/dist/builder/shared/prism-pipeline.d.ts +1 -1
- package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
- package/dist/builder/shared/prism-pipeline.js +12 -14
- package/dist/builder/watcher/prism-watcher.js +2 -2
- package/dist/decorator/showcase.types.d.ts +11 -9
- package/dist/decorator/showcase.types.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/plugin/define-config.js +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +5 -9
- package/dist/plugin/plugin.types.d.ts +30 -13
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/dist/schematics/migrations/v22-0-cache-dir-rename/index.js +2 -2
- package/dist/schematics/ng-add/index.js +4 -4
- package/dist/shared/canvas-bg.type.d.ts +5 -6
- package/dist/shared/canvas-bg.type.d.ts.map +1 -1
- package/dist/shared/canvas-bg.type.js +4 -5
- package/dist/shared/measure.type.d.ts +52 -0
- package/dist/shared/measure.type.d.ts.map +1 -0
- package/dist/shared/measure.type.js +21 -0
- package/dist/shared/variant-bg.d.ts +20 -31
- package/dist/shared/variant-bg.d.ts.map +1 -1
- package/dist/shared/variant-bg.js +20 -31
- package/dist/shared/viewport.type.d.ts +15 -19
- package/dist/shared/viewport.type.d.ts.map +1 -1
- package/dist/shared/viewport.type.js +15 -19
- package/dist/transformer/showcase-strip.transformer.js +1 -1
- package/package.json +5 -5
|
@@ -4,21 +4,15 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Library-wide metric badge for the header.
|
|
6
6
|
*
|
|
7
|
-
* Presentational only
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* regression in their plugins) owning their own data logic while sharing one
|
|
11
|
-
* appearance.
|
|
7
|
+
* Presentational only: it takes a formatted value and a variant, so each badge
|
|
8
|
+
* (a11y in core, coverage and visual regression in their plugins) keeps its own
|
|
9
|
+
* data logic while sharing one appearance.
|
|
12
10
|
*
|
|
13
|
-
* It
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* name is composed here as "label: value" (e.g. "Library coverage: 23%"), so
|
|
19
|
-
* the figure that is the whole point of the badge cannot be dropped by a
|
|
20
|
-
* consumer that only passes `label`. `title` stays the full text the
|
|
21
|
-
* consumer passes, for the hover tooltip.
|
|
11
|
+
* It shows an icon instead of a text label: the same glyph the source uses for
|
|
12
|
+
* its navigation marks and panel tab, and narrow enough to fit three badges in
|
|
13
|
+
* the 40px header. The icon is `aria-hidden`; the accessible name is built here
|
|
14
|
+
* as "label: value" (e.g. "Library coverage: 23%") so a consumer cannot drop
|
|
15
|
+
* the figure. `title` is the consumer's full text for the hover tooltip.
|
|
22
16
|
*/
|
|
23
17
|
export class PrismMetricBadgeComponent {
|
|
24
18
|
icon = input.required(/* @ts-ignore */
|
|
@@ -31,7 +25,7 @@ export class PrismMetricBadgeComponent {
|
|
|
31
25
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
32
26
|
variant = input('ok', /* @ts-ignore */
|
|
33
27
|
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
34
|
-
/** "label: value"
|
|
28
|
+
/** "label: value" is the accessible name, so the figure is never dropped. */
|
|
35
29
|
accessibleName = computed(() => `${this.label()}: ${this.value()}`, /* @ts-ignore */
|
|
36
30
|
...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
37
31
|
static ɵfac = function PrismMetricBadgeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismMetricBadgeComponent)(); };
|
|
@@ -54,4 +48,4 @@ export class PrismMetricBadgeComponent {
|
|
|
54
48
|
type: Component,
|
|
55
49
|
args: [{ selector: 'prism-metric-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismIconComponent], template: "<span\n class=\"metric-badge\"\n role=\"img\"\n [class.metric-badge--ok]=\"variant() === 'ok'\"\n [class.metric-badge--warn]=\"variant() === 'warn'\"\n [class.metric-badge--danger]=\"variant() === 'danger'\"\n [attr.title]=\"title() || label()\"\n [attr.aria-label]=\"accessibleName()\">\n <prism-icon\n [name]=\"icon()\"\n [size]=\"12\"\n aria-hidden=\"true\" />\n <span class=\"metric-badge__value\">{{ value() }}</span>\n</span>\n", styles: [":host {\n display: inline-flex;\n align-items: center;\n}\n\n.metric-badge {\n display: inline-flex;\n gap: var(--sp-2);\n align-items: center;\n height: 20px;\n padding: 0 var(--sp-3) 0 var(--sp-2);\n font-family: var(--font-mono);\n font-size: var(--fs-xs);\n font-variant-numeric: tabular-nums;\n color: var(--prism-text-muted);\n white-space: nowrap;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: var(--radius-sm);\n}\n\n.metric-badge__value {\n font-weight: 600;\n color: var(--prism-text);\n}\n\n.metric-badge--ok {\n color: var(--prism-mark-nominal);\n background: color-mix(in srgb, var(--prism-mark-nominal) 10%, transparent);\n border-color: color-mix(in srgb, var(--prism-mark-nominal) 35%, transparent);\n}\n\n.metric-badge--ok .metric-badge__value {\n color: var(--prism-mark-nominal);\n}\n\n.metric-badge--warn {\n color: var(--prism-mark-attention);\n background: color-mix(in srgb, var(--prism-mark-attention) 10%, transparent);\n border-color: color-mix(in srgb, var(--prism-mark-attention) 35%, transparent);\n}\n\n.metric-badge--warn .metric-badge__value {\n color: var(--prism-mark-attention);\n}\n\n.metric-badge--danger {\n color: var(--prism-mark-critical);\n background: color-mix(in srgb, var(--prism-mark-critical) 10%, transparent);\n border-color: color-mix(in srgb, var(--prism-mark-critical) 40%, transparent);\n}\n\n.metric-badge--danger .metric-badge__value {\n color: var(--prism-mark-critical);\n}\n"] }]
|
|
56
50
|
}], null, { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] }); })();
|
|
57
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismMetricBadgeComponent, { className: "PrismMetricBadgeComponent", filePath: "app/shared/prism-metric-badge.component.ts", lineNumber:
|
|
51
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismMetricBadgeComponent, { className: "PrismMetricBadgeComponent", filePath: "app/shared/prism-metric-badge.component.ts", lineNumber: 25 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-shell.component.d.ts","sourceRoot":"","sources":["../../../src/app/shell/prism-shell.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prism-shell.component.d.ts","sourceRoot":"","sources":["../../../src/app/shell/prism-shell.component.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;;AAWvE,qBAsBa,mBAAmB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IACtE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,SAAS,CAAC,QAAQ,CAAC,MAAM,qBAA8B;IACvD,SAAS,CAAC,QAAQ,CAAC,YAAY,oBAA6B;IAC5D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAmC;IAEtE,SAAS,CAAC,QAAQ,CAAC,UAAU,2FAAuC;IAEpE,SAAS,CAAC,QAAQ,CAAC,SAAS,0CAA0I;IAEtK,SAAS,CAAC,QAAQ,CAAC,UAAU,yCAI1B;;IAmCH,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;yCApDlC,mBAAmB;2CAAnB,mBAAmB;CAwE/B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, effect, HostListener, inject, untracked } from '@angular/core';
|
|
2
|
+
import { PrismCanvasPinRowComponent } from '../canvas/prism-canvas-pin-row.component.js';
|
|
2
3
|
import { PrismCanvasToolbarComponent } from '../canvas/prism-canvas-toolbar.component.js';
|
|
3
4
|
import { PrismTemplatePopoverComponent } from '../canvas/prism-template-popover.component.js';
|
|
4
5
|
import { PrismComponentHeadComponent } from '../component-head/prism-component-head.component.js';
|
|
@@ -49,7 +50,7 @@ function PrismShellComponent_Conditional_5_Conditional_0_Template(rf, ctx) { if
|
|
|
49
50
|
i0.ɵɵelementEnd();
|
|
50
51
|
i0.ɵɵconditionalCreate(2, PrismShellComponent_Conditional_5_Conditional_0_Conditional_2_Template, 1, 0, "prism-variant-ribbon");
|
|
51
52
|
i0.ɵɵelementStart(3, "div", 12);
|
|
52
|
-
i0.ɵɵelement(4, "prism-canvas-toolbar")(5, "prism-renderer")(6, "prism-template-popover");
|
|
53
|
+
i0.ɵɵelement(4, "prism-canvas-toolbar")(5, "prism-renderer")(6, "prism-template-popover")(7, "prism-canvas-pin-row");
|
|
53
54
|
i0.ɵɵelementEnd();
|
|
54
55
|
} if (rf & 2) {
|
|
55
56
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -77,7 +78,7 @@ function PrismShellComponent_Conditional_5_Conditional_2_Template(rf, ctx) { if
|
|
|
77
78
|
i0.ɵɵproperty("min", 200)("max", 560)("value", ctx_r1.layout.panelHeight());
|
|
78
79
|
} }
|
|
79
80
|
function PrismShellComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
80
|
-
i0.ɵɵconditionalCreate(0, PrismShellComponent_Conditional_5_Conditional_0_Template,
|
|
81
|
+
i0.ɵɵconditionalCreate(0, PrismShellComponent_Conditional_5_Conditional_0_Template, 8, 2)(1, PrismShellComponent_Conditional_5_Conditional_1_Template, 3, 0);
|
|
81
82
|
i0.ɵɵconditionalCreate(2, PrismShellComponent_Conditional_5_Conditional_2_Template, 3, 3);
|
|
82
83
|
} if (rf & 2) {
|
|
83
84
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -124,11 +125,11 @@ export class PrismShellComponent {
|
|
|
124
125
|
this.urlStateService.init();
|
|
125
126
|
this.persistenceService.init();
|
|
126
127
|
// A view survives a component switch as long as the new component still
|
|
127
|
-
// offers it
|
|
128
|
+
// offers it. Browsing a library variant-sheet by variant-sheet was
|
|
128
129
|
// impossible while every navigation dropped back to the Playground. The
|
|
129
130
|
// old rule watched for the *event* of switching and needed a key to
|
|
130
131
|
// remember; this one states the invariant and needs nothing. The rule
|
|
131
|
-
// itself lives in `nextViewId`, a pure function with its own tests
|
|
132
|
+
// itself lives in `nextViewId`, a pure function with its own tests; this
|
|
132
133
|
// effect only reads the two signals it needs and applies the result.
|
|
133
134
|
effect(() => {
|
|
134
135
|
const next = nextViewId(this.panelService.activeViewId(), this.panelService.visibleViewPanels());
|
|
@@ -169,7 +170,7 @@ export class PrismShellComponent {
|
|
|
169
170
|
static ɵfac = function PrismShellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismShellComponent)(); };
|
|
170
171
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismShellComponent, selectors: [["prism-shell"]], hostBindings: function PrismShellComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
171
172
|
i0.ɵɵlistener("keydown", function PrismShellComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); }, i0.ɵɵresolveDocument);
|
|
172
|
-
} }, decls: 8, vars: 8, consts: [[1, "prism-shell"], [1, "prism-shell__header"], [1, "prism-body"], [1, "prism-main"], [1, "prism-main__canvas"], [1, "prism-shell__empty"], [1, "prism-sidebar-wr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/+t67584Cf3tLsLIMo1S4uJw2istpWM1Pm36j+veWyZhJmJE0I2iG00zEDORjNW2glZXVtGnTBg6cYGU1YRgE/gy/mWA1bMIwmz/QGVRJ3BG6bAAAAABJRU5ErkJggg==", 1, "prism-sidebar-foot__logo"], ["href", "https://
|
|
173
|
+
} }, decls: 8, vars: 8, consts: [[1, "prism-shell"], [1, "prism-shell__header"], [1, "prism-body"], [1, "prism-main"], [1, "prism-main__canvas"], [1, "prism-shell__empty"], [1, "prism-sidebar-wrap"], [1, "prism-sidebar-foot"], ["alt", "ng-prism logo", "src", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABYCAMAAAA0hKKwAAAC7lBMVEUAAADFkfu6Dn9fLlcmNclKI0WFKFAnRr9XJ09tUI3jTZDxU5vxUJvIQ30wYuRNIMFoF7qBEq61g7y0N2+SL1ljQnL8vO5dUqqhNGPps/coVdQ4K8iUEKCkEJm1O3GKaL2JXpzTmePcS4zCitkoQdeVgfK4ie7hqeGde9p7bNTRR4PQRYRqYMawjPe/SHyBX7D4WJ75WaD6W6H4Vp37XKL9y/UlMtbDEoR90f39uvndn/v5U5rYm/vMlPsrTPJLI8z/YbNWH8f6tfr+0PjxrPvqqPu8jPs1K9QxY/zko/tFJc5RIcnTmfuuifv/1PkmNdz0r/olM9hoGcDopPurh/swXPotUfVzF7rCj/ukhvv9zfb9wv+XgvvuqfovVvgrRO7/5/60i/zhofunhvv6WJ6B0f2ghPvQlvttGL2/Eoa3i/soPeYnOuA8KdJfHMNjG8F8FbX/4P6yiPuSgfsxYPv3sfq2EYpAJ9BaHcX8Vpy7EYf+x/R3FbiIFLD/X62YE6W5jPychPz+tvb7Yab4Qo/+2P/IkvsvLtaCFLOPE6vIk/v9W6C4BH2Vzv2/jvv+XqOtEY/JEYWH0P28xf2fEpb//f//7v81af+myf2Mf/ykE6P6SpWmEJIkYP3/ZaP/zf+N0P1my/2dyv3/Wqf6uP8UM/D9ZaixD4vBDoGwxv3Mv/v6rv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YBhBGSHhMTAxD/r14d4OiYEhYcoFLrdYXjMT86Ub1FeO+f8TGgsAQVJJiEIk2N4kHRTZtAoVDXFySk1+WarWo2HA/NBYfPkaWYU+DBihJ4eHhxpNs7Q0hxwUBxQsQplAmQJ4YGjrYUN8UISN4JAgNRMwunkeCg0HhEWSgAQGJ+XPoy8OFww9g32DwCDBJSX2YxINHIBLOoIHVyLX5A8hP3egyTBD73Wc5xGy7TBClhDfYMKdr8TYenXYzNuOEaexP2B9PwjAkmkOcAaH/+t67584Cf3tLsLIMo1S4uJw2istpWM1Pm36j+veWyZhJmJE0I2iG00zEDORjNW2glZXVtGnTBg6cYGU1YRgE/gy/mWA1bMIwmz/QGVRJ3BG6bAAAAABJRU5ErkJggg==", 1, "prism-sidebar-foot__logo"], ["href", "https://ng-prism.github.io/ng-prism/#/", "target", "_blank", "rel", "noopener", 1, "prism-sidebar-foot__link"], ["prismResizer", "", "axis", "x", 1, "prism-resizer-col", 3, "valueChange", "min", "max", "value"], ["headEnd", ""], [1, "prism-canvas-wrap"], ["prismResizer", "", "axis", "y", 1, "prism-resizer-row", 3, "valueChange", "min", "max", "value"], [1, "prism-main__panel"], ["viewBox", "0 0 24 24", "fill", "none", "stroke", "currentColor", "stroke-width", "1.5", "stroke-linecap", "round", "stroke-linejoin", "round", 1, "prism-shell__empty-icon"], ["d", "M12 2L4 14h16L12 2z"], ["d", "M4 14l4 8h8l4-8"], [1, "prism-shell__empty-text"], [1, "prism-shell__empty-hint"]], template: function PrismShellComponent_Template(rf, ctx) { if (rf & 1) {
|
|
173
174
|
i0.ɵɵelementStart(0, "div", 0);
|
|
174
175
|
i0.ɵɵelement(1, "prism-header", 1);
|
|
175
176
|
i0.ɵɵelementStart(2, "div", 2);
|
|
@@ -198,7 +199,8 @@ export class PrismShellComponent {
|
|
|
198
199
|
PrismViewPanelHostComponent,
|
|
199
200
|
PrismResizerDirective,
|
|
200
201
|
PrismCanvasToolbarComponent,
|
|
201
|
-
PrismTemplatePopoverComponent
|
|
202
|
+
PrismTemplatePopoverComponent,
|
|
203
|
+
PrismCanvasPinRowComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n.prism-shell[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: var(--%NS%band-header) 1fr;\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n grid-template-columns: minmax(0, 1fr);\n height: 100vh;\n overflow: hidden;\n font-family: var(--%NS%font-sans, var(--%NS%prism-font-sans));\n color: var(--%NS%prism-text);\n background: var(--%NS%prism-void);\n}\n\n.prism-body[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: var(--%NS%sw, 264px) 4px 1fr;\n min-height: 0;\n}\n\n.prism-body--no-sidebar[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n}\n\n.prism-sidebar-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--%NS%prism-bg);\n border-right: 1px solid var(--%NS%prism-border);\n}\n\n.prism-sidebar-wrap[_ngcontent-%COMP%] prism-sidebar[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n}\n\n.prism-sidebar-foot[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 10px 14px;\n font-size: 11px;\n color: var(--%NS%prism-text-ghost);\n border-top: 1px solid var(--%NS%prism-border);\n}\n\n.prism-sidebar-foot__logo[_ngcontent-%COMP%] {\n flex-shrink: 0;\n width: 16px;\n}\n\n.prism-sidebar-foot__link[_ngcontent-%COMP%] {\n color: var(--%NS%prism-text-ghost);\n text-decoration: none;\n transition: color var(--%NS%dur-fast);\n}\n\n.prism-sidebar-foot__link[_ngcontent-%COMP%]:hover {\n color: var(--%NS%prism-text-2);\n}\n\n.prism-resizer-col[_ngcontent-%COMP%] {\n position: relative;\n z-index: 5;\n width: 4px;\n background: transparent;\n transition: background var(--%NS%dur-fast) var(--%NS%ease-default);\n}\n\n.prism-resizer-col[_ngcontent-%COMP%]:hover, \n.prism-resizer-col.active[_ngcontent-%COMP%] {\n background: var(--%NS%prism-primary);\n}\n\n.prism-main[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--%NS%prism-void);\n}\n\n.prism-resizer-row[_ngcontent-%COMP%] {\n position: relative;\n z-index: 5;\n flex-shrink: 0;\n height: 4px;\n background: transparent;\n transition: background var(--%NS%dur-fast) var(--%NS%ease-default);\n}\n\n.prism-resizer-row[_ngcontent-%COMP%]:hover, \n.prism-resizer-row.active[_ngcontent-%COMP%] {\n background: var(--%NS%prism-primary);\n}\n\n\n\n\n.prism-canvas-wrap[_ngcontent-%COMP%] {\n position: relative;\n display: grid;\n flex: 1;\n grid-template-rows: minmax(0, 1fr);\n min-height: 0;\n overflow: hidden;\n background: var(--%NS%prism-bg-surface);\n}\n\n.prism-main__canvas[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.prism-main__panel[_ngcontent-%COMP%] {\n flex-shrink: 0;\n height: var(--%NS%ph, 260px);\n min-height: 0;\n overflow: hidden;\n}\n\n.prism-shell__empty[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n grid-row: 1 / -1;\n gap: 8px;\n align-items: center;\n justify-content: center;\n}\n\n.prism-shell__empty-icon[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n margin-bottom: 8px;\n color: var(--%NS%prism-text-ghost);\n}\n\n.prism-shell__empty-text[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--%NS%fs-xl);\n font-weight: 500;\n color: var(--%NS%prism-text-muted);\n}\n\n.prism-shell__empty-hint[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--%NS%fs-lg);\n color: var(--%NS%prism-text-ghost);\n}"] });
|
|
202
204
|
}
|
|
203
205
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismShellComponent, [{
|
|
204
206
|
type: Component,
|
|
@@ -214,10 +216,11 @@ export class PrismShellComponent {
|
|
|
214
216
|
PrismViewPanelHostComponent,
|
|
215
217
|
PrismResizerDirective,
|
|
216
218
|
PrismCanvasToolbarComponent,
|
|
217
|
-
PrismTemplatePopoverComponent
|
|
218
|
-
], template: "<div\n class=\"prism-shell\"\n [style]=\"shellStyle()\">\n <prism-header class=\"prism-shell__header\" />\n\n <div\n class=\"prism-body\"\n [class.prism-body--no-sidebar]=\"!layout.sidebarVisible()\">\n @if (layout.sidebarVisible()) {\n <aside class=\"prism-sidebar-wrap\">\n <prism-sidebar />\n <div class=\"prism-sidebar-foot\">\n <img\n class=\"prism-sidebar-foot__logo\"\n alt=\"ng-prism logo\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABYCAMAAAA0hKKwAAAC7lBMVEUAAADFkfu6Dn9fLlcmNclKI0WFKFAnRr9XJ09tUI3jTZDxU5vxUJvIQ30wYuRNIMFoF7qBEq61g7y0N2+SL1ljQnL8vO5dUqqhNGPps/coVdQ4K8iUEKCkEJm1O3GKaL2JXpzTmePcS4zCitkoQdeVgfK4ie7hqeGde9p7bNTRR4PQRYRqYMawjPe/SHyBX7D4WJ75WaD6W6H4Vp37XKL9y/UlMtbDEoR90f39uvndn/v5U5rYm/vMlPsrTPJLI8z/YbNWH8f6tfr+0PjxrPvqqPu8jPs1K9QxY/zko/tFJc5RIcnTmfuuifv/1PkmNdz0r/olM9hoGcDopPurh/swXPotUfVzF7rCj/ukhvv9zfb9wv+XgvvuqfovVvgrRO7/5/60i/zhofunhvv6WJ6B0f2ghPvQlvttGL2/Eoa3i/soPeYnOuA8KdJfHMNjG8F8FbX/4P6yiPuSgfsxYPv3sfq2EYpAJ9BaHcX8Vpy7EYf+x/R3FbiIFLD/X62YE6W5jPychPz+tvb7Yab4Qo/+2P/IkvsvLtaCFLOPE6vIk/v9W6C4BH2Vzv2/jvv+XqOtEY/JEYWH0P28xf2fEpb//f//7v81af+myf2Mf/ykE6P6SpWmEJIkYP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TK9fSF2KXZvMmIz7O2DQNkOSSeGKeLaC7IJFAUqiISFARO6To5IIqkxX19YxjFYBhBGSHhMTAxD/r14d4OiYEhYcoFLrdYXjMT86Ub1FeO+f8TGgsAQVJJiEIk2N4kHRTZtAoVDXFySk1+WarWo2HA/NBYfPkaWYU+DBihJ4eHhxpNs7Q0hxwUBxQsQplAmQJ4YGjrYUN8UISN4JAgNRMwunkeCg0HhEWSgAQGJ+XPoy8OFww9g32DwCDBJSX2YxINHIBLOoIHVyLX5A8hP3egyTBD73Wc5xGy7TBClhDfYMKdr8TYenXYzNuOEaexP2B9PwjAkmkOcAaH/+t67584Cf3tLsLIMo1S4uJw2istpWM1Pm36j+veWyZhJmJE0I2iG00zEDORjNW2glZXVtGnTBg6cYGU1YRgE/gy/mWA1bMIwmz/QGVRJ3BG6bAAAAABJRU5ErkJggg==\" />\n <a\n class=\"prism-sidebar-foot__link\"\n href=\"https://dyingangel666.github.io/ng-prism/#/\"\n target=\"_blank\"\n rel=\"noopener\">\n Powered by ng-prism\n </a>\n </div>\n </aside>\n <div\n class=\"prism-resizer-col\"\n prismResizer\n axis=\"x\"\n [min]=\"200\"\n [max]=\"360\"\n [value]=\"layout.sidebarWidth()\"\n (valueChange)=\"layout.setSidebarWidth($event)\"></div>\n }\n\n <main\n class=\"prism-main\"\n [style.--ph.px]=\"showPanel() ? layout.panelHeight() : 0\">\n @if (navigationService.activeComponent()) {\n @if (panelService.activeViewId() === 'renderer') {\n <prism-component-head>\n @if (viewPanels().length > 0) {\n <prism-view-tab-bar headEnd />\n }\n </prism-component-head>\n @if (layout.toolbarVisible()) {\n <prism-variant-ribbon />\n }\n <div class=\"prism-canvas-wrap\">\n <prism-canvas-toolbar />\n <prism-renderer />\n <prism-template-popover />\n </div>\n } @else {\n <prism-component-head>\n <prism-view-tab-bar headEnd />\n </prism-component-head>\n <prism-view-panel-host class=\"prism-main__canvas\" />\n }\n @if (showPanel()) {\n <div\n class=\"prism-resizer-row\"\n prismResizer\n axis=\"y\"\n [min]=\"200\"\n [max]=\"560\"\n [value]=\"layout.panelHeight()\"\n (valueChange)=\"layout.setPanelHeight($event)\"></div>\n <div class=\"prism-main__panel\">\n <prism-panel-host />\n </div>\n }\n } @else if (navigationService.activePage()) {\n <prism-page-renderer class=\"prism-main__canvas\" />\n } @else {\n <div class=\"prism-shell__empty\">\n <svg\n class=\"prism-shell__empty-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path d=\"M12 2L4 14h16L12 2z\" />\n <path d=\"M4 14l4 8h8l4-8\" />\n </svg>\n <p class=\"prism-shell__empty-text\">Select a component</p>\n <p class=\"prism-shell__empty-hint\"> from the sidebar to preview it here </p>\n </div>\n }\n </main>\n </div>\n</div>\n", styles: [":host {\n display: block;\n height: 100%;\n}\n\n.prism-shell {\n display: grid;\n grid-template-rows: var(--band-header) 1fr;\n\n /* Declared for its minimum, not for its size. An implicit grid track is\n auto, and an auto track's minimum is the min-content width of what sits\n in it -- here the whole body, sidebar and resizer and main together. The\n track therefore grows to whatever the widest panel demands and the\n overflow: hidden below clips the remainder, instead of the viewport ever\n getting a chance to reflow. Measured at a 500px viewport the track stood\n at 763px and held the canvas at 415px however far the window was dragged\n in, so responsive behaviour inside a showcased component was impossible\n to reach.\n The rows stay bare because min-height: 0 is already spelled out on every\n level below them. The inline axis had no such counterpart anywhere, and\n the levels below zero their own minimum through overflow: hidden, which\n is why this one track is the only place that needs saying. */\n grid-template-columns: minmax(0, 1fr);\n height: 100vh;\n overflow: hidden;\n font-family: var(--font-sans, var(--prism-font-sans));\n color: var(--prism-text);\n background: var(--prism-void);\n}\n\n.prism-body {\n display: grid;\n grid-template-columns: var(--sw, 264px) 4px 1fr;\n min-height: 0;\n}\n\n.prism-body--no-sidebar {\n grid-template-columns: 1fr;\n}\n\n.prism-sidebar-wrap {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--prism-bg);\n border-right: 1px solid var(--prism-border);\n}\n\n.prism-sidebar-wrap prism-sidebar {\n flex: 1;\n min-height: 0;\n}\n\n.prism-sidebar-foot {\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 10px 14px;\n font-size: 11px;\n color: var(--prism-text-ghost);\n border-top: 1px solid var(--prism-border);\n}\n\n.prism-sidebar-foot__logo {\n flex-shrink: 0;\n width: 16px;\n}\n\n.prism-sidebar-foot__link {\n color: var(--prism-text-ghost);\n text-decoration: none;\n transition: color var(--dur-fast);\n}\n\n.prism-sidebar-foot__link:hover {\n color: var(--prism-text-2);\n}\n\n.prism-resizer-col {\n position: relative;\n z-index: 5;\n width: 4px;\n background: transparent;\n transition: background var(--dur-fast) var(--ease-default);\n}\n\n.prism-resizer-col:hover,\n.prism-resizer-col.active {\n background: var(--prism-primary);\n}\n\n.prism-main {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--prism-void);\n}\n\n.prism-resizer-row {\n position: relative;\n z-index: 5;\n flex-shrink: 0;\n height: 4px;\n background: transparent;\n transition: background var(--dur-fast) var(--ease-default);\n}\n\n.prism-resizer-row:hover,\n.prism-resizer-row.active {\n background: var(--prism-primary);\n}\n\n/* One row, not two: the canvas tools no longer occupy a band above the\n stage, they float over it from a rail absolutely positioned against\n this element. The position: relative below is what anchors it. */\n.prism-canvas-wrap {\n position: relative;\n display: grid;\n flex: 1;\n grid-template-rows: minmax(0, 1fr);\n min-height: 0;\n overflow: hidden;\n background: var(--prism-bg-surface);\n}\n\n.prism-main__canvas {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.prism-main__panel {\n flex-shrink: 0;\n height: var(--ph, 260px);\n min-height: 0;\n overflow: hidden;\n}\n\n.prism-shell__empty {\n display: flex;\n flex-direction: column;\n grid-row: 1 / -1;\n gap: 8px;\n align-items: center;\n justify-content: center;\n}\n\n.prism-shell__empty-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 8px;\n color: var(--prism-text-ghost);\n}\n\n.prism-shell__empty-text {\n margin: 0;\n font-size: var(--fs-xl);\n font-weight: 500;\n color: var(--prism-text-muted);\n}\n\n.prism-shell__empty-hint {\n margin: 0;\n font-size: var(--fs-lg);\n color: var(--prism-text-ghost);\n}\n"] }]
|
|
219
|
+
PrismTemplatePopoverComponent,
|
|
220
|
+
PrismCanvasPinRowComponent
|
|
221
|
+
], template: "<div\n class=\"prism-shell\"\n [style]=\"shellStyle()\">\n <prism-header class=\"prism-shell__header\" />\n\n <div\n class=\"prism-body\"\n [class.prism-body--no-sidebar]=\"!layout.sidebarVisible()\">\n @if (layout.sidebarVisible()) {\n <aside class=\"prism-sidebar-wrap\">\n <prism-sidebar />\n <div class=\"prism-sidebar-foot\">\n <img\n class=\"prism-sidebar-foot__logo\"\n alt=\"ng-prism logo\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABYCAMAAAA0hKKwAAAC7lBMVEUAAADFkfu6Dn9fLlcmNclKI0WFKFAnRr9XJ09tUI3jTZDxU5vxUJvIQ30wYuRNIMFoF7qBEq61g7y0N2+SL1ljQnL8vO5dUqqhNGPps/coVdQ4K8iUEKCkEJm1O3GKaL2JXpzTmePcS4zCitkoQdeVgfK4ie7hqeGde9p7bNTRR4PQRYRqYMawjPe/SHyBX7D4WJ75WaD6W6H4Vp37XKL9y/UlMtbDEoR90f39uvndn/v5U5rYm/vMlPsrTPJLI8z/YbNWH8f6tfr+0PjxrPvqqPu8jPs1K9QxY/zko/tFJc5RIcnTmfuuifv/1PkmNdz0r/olM9hoGcDopPurh/swXPotUfVzF7rCj/ukhvv9zfb9wv+XgvvuqfovVvgrRO7/5/60i/zhofunhvv6WJ6B0f2ghPvQlvttGL2/Eoa3i/soPeYnOuA8KdJfHMNjG8F8FbX/4P6yiPuSgfsxYPv3sfq2EYpAJ9BaHcX8Vpy7EYf+x/R3FbiIFLD/X62YE6W5jPychPz+tvb7Yab4Qo/+2P/IkvsvL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9MzY2iCEQMMwjHh7uoCAC8SoouJvoto4h8vwxf9WXLgOJjCAeCd+7d280HJc3j5geFxju7sGrMIh4eRUkA6MNxSRWzTK9fSF2KXZvMmIz7O2DQNkOSSeGKeLaC7IJFAUqiISFARO6To5IIqkxX19YxjFYBhBGSHhMTAxD/r14d4OiYEhYcoFLrdYXjMT86Ub1FeO+f8TGgsAQVJJiEIk2N4kHRTZtAoVDXFySk1+WarWo2HA/NBYfPkaWYU+DBihJ4eHhxpNs7Q0hxwUBxQsQplAmQJ4YGjrYUN8UISN4JAgNRMwunkeCg0HhEWSgAQGJ+XPoy8OFww9g32DwCDBJSX2YxINHIBLOoIHVyLX5A8hP3egyTBD73Wc5xGy7TBClhDfYMKdr8TYenXYzNuOEaexP2B9PwjAkmkOcAaH/+t67584Cf3tLsLIMo1S4uJw2istpWM1Pm36j+veWyZhJmJE0I2iG00zEDORjNW2glZXVtGnTBg6cYGU1YRgE/gy/mWA1bMIwmz/QGVRJ3BG6bAAAAABJRU5ErkJggg==\" />\n <a\n class=\"prism-sidebar-foot__link\"\n href=\"https://ng-prism.github.io/ng-prism/#/\"\n target=\"_blank\"\n rel=\"noopener\">\n Powered by ng-prism\n </a>\n </div>\n </aside>\n <div\n class=\"prism-resizer-col\"\n prismResizer\n axis=\"x\"\n [min]=\"200\"\n [max]=\"360\"\n [value]=\"layout.sidebarWidth()\"\n (valueChange)=\"layout.setSidebarWidth($event)\"></div>\n }\n\n <main\n class=\"prism-main\"\n [style.--ph.px]=\"showPanel() ? layout.panelHeight() : 0\">\n @if (navigationService.activeComponent()) {\n @if (panelService.activeViewId() === 'renderer') {\n <prism-component-head>\n @if (viewPanels().length > 0) {\n <prism-view-tab-bar headEnd />\n }\n </prism-component-head>\n @if (layout.toolbarVisible()) {\n <prism-variant-ribbon />\n }\n <div class=\"prism-canvas-wrap\">\n <prism-canvas-toolbar />\n <prism-renderer />\n <prism-template-popover />\n <prism-canvas-pin-row />\n </div>\n } @else {\n <prism-component-head>\n <prism-view-tab-bar headEnd />\n </prism-component-head>\n <prism-view-panel-host class=\"prism-main__canvas\" />\n }\n @if (showPanel()) {\n <div\n class=\"prism-resizer-row\"\n prismResizer\n axis=\"y\"\n [min]=\"200\"\n [max]=\"560\"\n [value]=\"layout.panelHeight()\"\n (valueChange)=\"layout.setPanelHeight($event)\"></div>\n <div class=\"prism-main__panel\">\n <prism-panel-host />\n </div>\n }\n } @else if (navigationService.activePage()) {\n <prism-page-renderer class=\"prism-main__canvas\" />\n } @else {\n <div class=\"prism-shell__empty\">\n <svg\n class=\"prism-shell__empty-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path d=\"M12 2L4 14h16L12 2z\" />\n <path d=\"M4 14l4 8h8l4-8\" />\n </svg>\n <p class=\"prism-shell__empty-text\">Select a component</p>\n <p class=\"prism-shell__empty-hint\"> from the sidebar to preview it here </p>\n </div>\n }\n </main>\n </div>\n</div>\n", styles: [":host {\n display: block;\n height: 100%;\n}\n\n.prism-shell {\n display: grid;\n grid-template-rows: var(--band-header) 1fr;\n\n /* Declared for its minimum, not for its size. An implicit grid track is\n auto, and an auto track's minimum is the min-content width of what sits\n in it -- here the whole body, sidebar and resizer and main together. The\n track therefore grows to whatever the widest panel demands and the\n overflow: hidden below clips the remainder, instead of the viewport ever\n getting a chance to reflow. Measured at a 500px viewport the track stood\n at 763px and held the canvas at 415px however far the window was dragged\n in, so responsive behaviour inside a showcased component was impossible\n to reach.\n The rows stay bare because min-height: 0 is already spelled out on every\n level below them. The inline axis had no such counterpart anywhere, and\n the levels below zero their own minimum through overflow: hidden, which\n is why this one track is the only place that needs saying. */\n grid-template-columns: minmax(0, 1fr);\n height: 100vh;\n overflow: hidden;\n font-family: var(--font-sans, var(--prism-font-sans));\n color: var(--prism-text);\n background: var(--prism-void);\n}\n\n.prism-body {\n display: grid;\n grid-template-columns: var(--sw, 264px) 4px 1fr;\n min-height: 0;\n}\n\n.prism-body--no-sidebar {\n grid-template-columns: 1fr;\n}\n\n.prism-sidebar-wrap {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--prism-bg);\n border-right: 1px solid var(--prism-border);\n}\n\n.prism-sidebar-wrap prism-sidebar {\n flex: 1;\n min-height: 0;\n}\n\n.prism-sidebar-foot {\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 10px 14px;\n font-size: 11px;\n color: var(--prism-text-ghost);\n border-top: 1px solid var(--prism-border);\n}\n\n.prism-sidebar-foot__logo {\n flex-shrink: 0;\n width: 16px;\n}\n\n.prism-sidebar-foot__link {\n color: var(--prism-text-ghost);\n text-decoration: none;\n transition: color var(--dur-fast);\n}\n\n.prism-sidebar-foot__link:hover {\n color: var(--prism-text-2);\n}\n\n.prism-resizer-col {\n position: relative;\n z-index: 5;\n width: 4px;\n background: transparent;\n transition: background var(--dur-fast) var(--ease-default);\n}\n\n.prism-resizer-col:hover,\n.prism-resizer-col.active {\n background: var(--prism-primary);\n}\n\n.prism-main {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background: var(--prism-void);\n}\n\n.prism-resizer-row {\n position: relative;\n z-index: 5;\n flex-shrink: 0;\n height: 4px;\n background: transparent;\n transition: background var(--dur-fast) var(--ease-default);\n}\n\n.prism-resizer-row:hover,\n.prism-resizer-row.active {\n background: var(--prism-primary);\n}\n\n/* One row, not two: the canvas tools no longer occupy a band above the\n stage, they float over it from a rail absolutely positioned against\n this element. The position: relative below is what anchors it. */\n.prism-canvas-wrap {\n position: relative;\n display: grid;\n flex: 1;\n grid-template-rows: minmax(0, 1fr);\n min-height: 0;\n overflow: hidden;\n background: var(--prism-bg-surface);\n}\n\n.prism-main__canvas {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.prism-main__panel {\n flex-shrink: 0;\n height: var(--ph, 260px);\n min-height: 0;\n overflow: hidden;\n}\n\n.prism-shell__empty {\n display: flex;\n flex-direction: column;\n grid-row: 1 / -1;\n gap: 8px;\n align-items: center;\n justify-content: center;\n}\n\n.prism-shell__empty-icon {\n width: 48px;\n height: 48px;\n margin-bottom: 8px;\n color: var(--prism-text-ghost);\n}\n\n.prism-shell__empty-text {\n margin: 0;\n font-size: var(--fs-xl);\n font-weight: 500;\n color: var(--prism-text-muted);\n}\n\n.prism-shell__empty-hint {\n margin: 0;\n font-size: var(--fs-lg);\n color: var(--prism-text-ghost);\n}\n"] }]
|
|
219
222
|
}], () => [], { onKeyDown: [{
|
|
220
223
|
type: HostListener,
|
|
221
224
|
args: ['document:keydown', ['$event']]
|
|
222
225
|
}] }); })();
|
|
223
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismShellComponent, { className: "PrismShellComponent", filePath: "app/shell/prism-shell.component.ts", lineNumber:
|
|
226
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismShellComponent, { className: "PrismShellComponent", filePath: "app/shell/prism-shell.component.ts", lineNumber: 47 }); })();
|
|
@@ -5,7 +5,7 @@ import type { NavigationItem } from '../services/navigation-item.types.js';
|
|
|
5
5
|
export interface ItemMark {
|
|
6
6
|
/**
|
|
7
7
|
* The definition's id. `resolveNavigationDecorations` guarantees these are
|
|
8
|
-
* unique, so this is the only field safe to `@for track` by
|
|
8
|
+
* unique, so this is the only field safe to `@for track` by. `icon` is a
|
|
9
9
|
* free-form string on a public extension point and two sources can pick the
|
|
10
10
|
* same one.
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export interface ItemMark {
|
|
|
15
15
|
label: string;
|
|
16
16
|
}
|
|
17
17
|
export interface ItemDecorations {
|
|
18
|
-
/** Ordered marks
|
|
18
|
+
/** Ordered marks, never empty (`decorateItem` returns null instead). */
|
|
19
19
|
marks: ItemMark[];
|
|
20
20
|
/** Worst variant across `marks`. Drives the group roll-up. */
|
|
21
21
|
worst: 'warn' | 'danger';
|
|
@@ -33,7 +33,7 @@ export interface CategoryRollup {
|
|
|
33
33
|
* by `order`.
|
|
34
34
|
*
|
|
35
35
|
* Built-ins win a collision: a plugin must not be able to silence or restyle a
|
|
36
|
-
* core source by claiming its id. Sorting is by `order` alone
|
|
36
|
+
* core source by claiming its id. Sorting is by `order` alone because the reading
|
|
37
37
|
* contract says position names the source, so registration order must not leak
|
|
38
38
|
* into the result.
|
|
39
39
|
*/
|
|
@@ -53,7 +53,7 @@ export declare function decorateItem(item: NavigationItem, defs: readonly Naviga
|
|
|
53
53
|
* the work.
|
|
54
54
|
*
|
|
55
55
|
* Takes each item's already-resolved `ItemDecorations` rather than the raw
|
|
56
|
-
* items
|
|
56
|
+
* items. Callers already run `decorateItem` once per item to render its
|
|
57
57
|
* marks, and recomputing it here would both waste the work and let the
|
|
58
58
|
* roll-up drift from what actually renders.
|
|
59
59
|
*/
|
|
@@ -4,7 +4,7 @@ const SEVERITY = { warn: 1, danger: 2 };
|
|
|
4
4
|
* by `order`.
|
|
5
5
|
*
|
|
6
6
|
* Built-ins win a collision: a plugin must not be able to silence or restyle a
|
|
7
|
-
* core source by claiming its id. Sorting is by `order` alone
|
|
7
|
+
* core source by claiming its id. Sorting is by `order` alone because the reading
|
|
8
8
|
* contract says position names the source, so registration order must not leak
|
|
9
9
|
* into the result.
|
|
10
10
|
*/
|
|
@@ -57,7 +57,7 @@ export function decorateItem(item, defs) {
|
|
|
57
57
|
* the work.
|
|
58
58
|
*
|
|
59
59
|
* Takes each item's already-resolved `ItemDecorations` rather than the raw
|
|
60
|
-
* items
|
|
60
|
+
* items. Callers already run `decorateItem` once per item to render its
|
|
61
61
|
* marks, and recomputing it here would both waste the work and let the
|
|
62
62
|
* roll-up drift from what actually renders.
|
|
63
63
|
*/
|
|
@@ -41,12 +41,12 @@ export declare class PrismSidebarComponent {
|
|
|
41
41
|
protected itemStatus(item: NavigationItem): ComponentStatus | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Accessible name for the roll-up pill, for the deviating case only. The
|
|
44
|
-
* pill otherwise renders a bare number distinguished only by colour
|
|
44
|
+
* pill otherwise renders a bare number distinguished only by colour. A
|
|
45
45
|
* screen reader would read the group head as "Feedback 3 12" with nothing
|
|
46
46
|
* naming what either number means, and a colour-blind reader can't tell
|
|
47
47
|
* them apart at all.
|
|
48
48
|
*
|
|
49
|
-
* There is
|
|
49
|
+
* There is no zero branch: a clean category renders its plain
|
|
50
50
|
* item count and the template leaves both attributes off, because
|
|
51
51
|
* `aria-label` on a descendant feeds the group button's name-from-content
|
|
52
52
|
* and "Buttons 0 components need review" is a claim about a group that has
|
|
@@ -272,12 +272,12 @@ export class PrismSidebarComponent {
|
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
274
|
* Accessible name for the roll-up pill, for the deviating case only. The
|
|
275
|
-
* pill otherwise renders a bare number distinguished only by colour
|
|
275
|
+
* pill otherwise renders a bare number distinguished only by colour. A
|
|
276
276
|
* screen reader would read the group head as "Feedback 3 12" with nothing
|
|
277
277
|
* naming what either number means, and a colour-blind reader can't tell
|
|
278
278
|
* them apart at all.
|
|
279
279
|
*
|
|
280
|
-
* There is
|
|
280
|
+
* There is no zero branch: a clean category renders its plain
|
|
281
281
|
* item count and the template leaves both attributes off, because
|
|
282
282
|
* `aria-label` on a descendant feeds the group button's name-from-content
|
|
283
283
|
* and "Buttons 0 components need review" is a claim about a group that has
|
|
@@ -366,7 +366,7 @@ export class PrismSidebarComponent {
|
|
|
366
366
|
}
|
|
367
367
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismSidebarComponent, [{
|
|
368
368
|
type: Component,
|
|
369
|
-
args: [{ selector: 'prism-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismIconComponent], template: "<nav class=\"prism-sidebar\">\n <div class=\"sb-filter\">\n <prism-icon\n name=\"search\"\n [size]=\"12\" />\n <input\n #filterInput\n placeholder=\"Filter components\u2026\"\n [value]=\"searchService.query()\"\n (input)=\"searchService.search($any($event.target).value)\" />\n <kbd>/</kbd>\n </div>\n\n <div class=\"sb-scroll\">\n @if (pageCategories().length > 0) {\n <div class=\"sb-pinned\">\n <div class=\"sb-pinned-head\">\n <span class=\"sb-pinned-head-l\">\n <prism-icon\n name=\"pin\"\n [size]=\"10\"\n class=\"sb-pinned-pin\" />\n Pages\n </span>\n <span>{{ totalPages() }}</span>\n </div>\n @for (cat of pageCategories(); track cat.name) {\n <div\n class=\"sb-group\"\n [class.sb-group--collapsed]=\"isCollapsed('page:' + cat.name)\">\n <button\n class=\"sb-group-head\"\n (click)=\"toggleCollapse('page:' + cat.name)\"\n [attr.aria-expanded]=\"!isCollapsed('page:' + cat.name)\">\n <prism-icon\n name=\"chevron-down\"\n [size]=\"10\" />\n <span class=\"sb-group-chip\"></span>\n {{ cat.name }}\n </button>\n @if (!isCollapsed('page:' + cat.name)) {\n <div class=\"sb-group-body\">\n @for (item of cat.items; track itemKey(item)) {\n <button\n class=\"sb-item\"\n [class.sb-item--active]=\"isActive(item)\"\n (click)=\"onSelect(item)\">\n <span class=\"sb-item-name\">{{ itemLabel(item) }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n @for (section of componentSections(); track section.name) {\n <div class=\"sb-section-head\">\n <span class=\"sb-section-head-l\">\n <prism-icon\n [name]=\"section.icon\"\n [size]=\"10\"\n class=\"sb-section-icon\" />\n {{ section.name }}\n </span>\n <span>{{ section.totalCount }}</span>\n </div>\n @for (cat of section.categories; track cat.name) {\n <div\n class=\"sb-group\"\n [class.sb-group--collapsed]=\"isCollapsed('sec:' + section.name + ':' + cat.name)\">\n <button\n class=\"sb-group-head\"\n (click)=\"toggleCollapse('sec:' + section.name + ':' + cat.name)\"\n [attr.aria-expanded]=\"!isCollapsed('sec:' + section.name + ':' + cat.name)\">\n <prism-icon\n name=\"chevron-down\"\n [size]=\"10\" />\n <span class=\"sb-group-chip\"></span>\n {{ cat.name }}\n <span\n class=\"sb-group-count\"\n [class.sb-group-count--warn]=\"cat.rollup.variant === 'warn'\"\n [class.sb-group-count--danger]=\"cat.rollup.variant === 'danger'\"\n [attr.title]=\"cat.rollup.problems ? rollupTooltip(cat.rollup) : null\"\n [attr.aria-label]=\"cat.rollup.problems ? rollupTooltip(cat.rollup) : null\">\n @if (cat.rollup.problems) {\n {{ cat.rollup.problems }}/{{ cat.items.length }}\n } @else {\n {{ cat.items.length }}\n }\n </span>\n </button>\n @if (!isCollapsed('sec:' + section.name + ':' + cat.name)) {\n <div class=\"sb-group-body\">\n @for (row of cat.items; track itemKey(row.item)) {\n <button\n class=\"sb-item\"\n [class.sb-item--active]=\"isActive(row.item)\"\n [class.sb-item--deprecated]=\"itemStatus(row.item) === 'deprecated'\"\n [attr.title]=\"itemTooltip(row.item, row.decorations)\"\n (click)=\"onSelect(row.item)\">\n <prism-icon\n [name]=\"row.icon\"\n [size]=\"12\"\n class=\"sb-item-icon\" />\n <span class=\"sb-item-name\">{{ itemLabel(row.item) }}</span>\n <span class=\"sb-item-health\">\n @for (mark of row.decorations?.marks ?? []; track mark.id) {\n <prism-icon\n [name]=\"mark.icon\"\n [size]=\"11\"\n [class]=\"'sb-health sb-health--' + mark.variant\" />\n }\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n</nav>\n", styles: [".prism-sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n}\n\n.sb-filter {\n display: flex;\n gap: 8px;\n align-items: center;\n height: 30px;\n padding: 0 10px;\n margin: 12px;\n color: var(--prism-text-muted);\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: 6px;\n}\n\n.sb-filter input {\n flex: 1;\n min-width: 0;\n font-family: var(--font-sans);\n font-size: var(--fs-md);\n color: var(--prism-text);\n outline: none;\n background: transparent;\n border: 0;\n}\n\n.sb-filter input::placeholder {\n color: var(--prism-text-muted);\n}\n\n.sb-filter kbd {\n padding: 1px 5px;\n font-family: var(--font-mono);\n font-size: 10px;\n color: var(--prism-text-ghost);\n border: 1px solid var(--prism-border);\n border-radius: 3px;\n}\n\n.sb-scroll {\n flex: 1;\n padding: 10px 0 16px;\n padding-top: 0;\n overflow-y: auto;\n}\n\n.sb-scroll::-webkit-scrollbar {\n width: 8px;\n}\n\n.sb-scroll::-webkit-scrollbar-thumb {\n background: var(--prism-border-strong);\n border-radius: 4px;\n}\n\n.sb-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.sb-pinned {\n padding: 0 0 10px;\n margin-bottom: 4px;\n border-top: 1px solid var(--prism-border);\n border-bottom: 1px solid var(--prism-border);\n}\n\n.sb-section-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 14px 6px;\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.09em;\n}\n\n.sb-section-head-l {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.sb-section-icon {\n color: var(--prism-primary);\n}\n\n.sb-pinned-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 14px 6px;\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.09em;\n}\n\n.sb-pinned-head-l {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.sb-pinned-pin {\n color: var(--prism-accent);\n}\n\n.sb-group {\n margin-bottom: 4px;\n}\n\n.sb-group-head {\n display: flex;\n gap: 6px;\n align-items: center;\n width: 100%;\n padding: 8px 14px 6px;\n font-family: var(--font-sans);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-align: left;\n text-transform: uppercase;\n letter-spacing: 0.09em;\n cursor: pointer;\n user-select: none;\n background: none;\n border: none;\n}\n\n.sb-group-head prism-icon {\n color: var(--prism-text-ghost);\n transition: transform var(--dur-fast);\n}\n\n.sb-group--collapsed .sb-group-head prism-icon {\n transform: rotate(-90deg);\n}\n\n.sb-group-chip {\n width: 6px;\n height: 6px;\n background: var(--prism-text-ghost);\n border-radius: 2px;\n}\n\n.sb-group-count {\n margin-left: auto;\n font-family: var(--font-mono);\n font-size: 10px;\n font-weight: 500;\n color: var(--prism-text-ghost);\n}\n\n.sb-group-count--warn {\n color: var(--prism-mark-attention);\n}\n\n.sb-group-count--danger {\n color: var(--prism-mark-critical);\n}\n\n.sb-item {\n display: flex;\n gap: 10px;\n align-items: center;\n width: 100%;\n height: 30px;\n padding: 0 14px 0 28px;\n font-family: var(--font-sans);\n font-size: 13px;\n color: var(--prism-text-2);\n text-align: left;\n cursor: pointer;\n background: none;\n border: none;\n transition:\n background var(--dur-fast),\n color var(--dur-fast);\n}\n\n.sb-item:hover {\n color: var(--prism-text);\n background: color-mix(in srgb, var(--prism-primary) 5%, transparent);\n}\n\n.sb-item--active {\n font-weight: 500;\n background: color-mix(in srgb, var(--prism-primary) 12%, transparent);\n}\n\n.sb-item-icon {\n flex: 0 0 12px;\n opacity: 0.7;\n}\n\n.sb-item-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Fixed width sized for the three built-in decoration sources (a11y,\n plugin-coverage, plugin-visual-regression) at 11px each plus two\n --sp-1 gaps, with a little headroom. navigationDecorations is an open\n extension point, so a fourth mark from a third-party plugin is\n clipped via overflow: hidden rather than allowed to grow the gutter \u2014\n the point of a fixed-width gutter is that rows never shift\n horizontally as you scan the list. */\n.sb-item-health {\n display: flex;\n flex: none;\n gap: var(--sp-1);\n align-items: center;\n justify-content: flex-end;\n width: 40px;\n overflow: hidden;\n}\n\n/* Outline, not fill, and full saturation only for danger. The mechanism\n behind these marks is already deviation-driven: decorateItem returns\n null for a clean component and every source bails out at variant === 'ok'.\n What made them read as wallpaper was the drawing: a filled shape at full\n saturation, one per row, in a repo where deviating is the normal case. */\n.sb-health {\n fill: none;\n stroke: currentcolor;\n stroke-width: 2;\n}\n\n.sb-health--warn {\n color: color-mix(in srgb, var(--prism-mark-attention) 80%, transparent);\n}\n\n.sb-health--danger {\n color: var(--prism-mark-critical);\n}\n\n.sb-item--deprecated .sb-item-name {\n color: var(--prism-text-ghost);\n text-decoration: line-through;\n text-decoration-thickness: 1px;\n opacity: 0.7;\n}\n\n:focus-visible {\n outline: 2px solid var(--prism-primary);\n outline-offset: 2px;\n}\n"] }]
|
|
369
|
+
args: [{ selector: 'prism-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismIconComponent], template: "<nav class=\"prism-sidebar\">\n <div class=\"sb-filter\">\n <prism-icon\n name=\"search\"\n [size]=\"12\" />\n <input\n #filterInput\n placeholder=\"Filter components\u2026\"\n [value]=\"searchService.query()\"\n (input)=\"searchService.search($any($event.target).value)\" />\n <kbd>/</kbd>\n </div>\n\n <div class=\"sb-scroll\">\n @if (pageCategories().length > 0) {\n <div class=\"sb-pinned\">\n <div class=\"sb-pinned-head\">\n <span class=\"sb-pinned-head-l\">\n <prism-icon\n name=\"pin\"\n [size]=\"10\"\n class=\"sb-pinned-pin\" />\n Pages\n </span>\n <span>{{ totalPages() }}</span>\n </div>\n @for (cat of pageCategories(); track cat.name) {\n <div\n class=\"sb-group\"\n [class.sb-group--collapsed]=\"isCollapsed('page:' + cat.name)\">\n <button\n class=\"sb-group-head\"\n (click)=\"toggleCollapse('page:' + cat.name)\"\n [attr.aria-expanded]=\"!isCollapsed('page:' + cat.name)\">\n <prism-icon\n name=\"chevron-down\"\n [size]=\"10\" />\n <span class=\"sb-group-chip\"></span>\n {{ cat.name }}\n </button>\n @if (!isCollapsed('page:' + cat.name)) {\n <div class=\"sb-group-body\">\n @for (item of cat.items; track itemKey(item)) {\n <button\n class=\"sb-item\"\n [class.sb-item--active]=\"isActive(item)\"\n (click)=\"onSelect(item)\">\n <span class=\"sb-item-name\">{{ itemLabel(item) }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n @for (section of componentSections(); track section.name) {\n <div class=\"sb-section-head\">\n <span class=\"sb-section-head-l\">\n <prism-icon\n [name]=\"section.icon\"\n [size]=\"10\"\n class=\"sb-section-icon\" />\n {{ section.name }}\n </span>\n <span>{{ section.totalCount }}</span>\n </div>\n @for (cat of section.categories; track cat.name) {\n <div\n class=\"sb-group\"\n [class.sb-group--collapsed]=\"isCollapsed('sec:' + section.name + ':' + cat.name)\">\n <button\n class=\"sb-group-head\"\n (click)=\"toggleCollapse('sec:' + section.name + ':' + cat.name)\"\n [attr.aria-expanded]=\"!isCollapsed('sec:' + section.name + ':' + cat.name)\">\n <prism-icon\n name=\"chevron-down\"\n [size]=\"10\" />\n <span class=\"sb-group-chip\"></span>\n {{ cat.name }}\n <span\n class=\"sb-group-count\"\n [class.sb-group-count--warn]=\"cat.rollup.variant === 'warn'\"\n [class.sb-group-count--danger]=\"cat.rollup.variant === 'danger'\"\n [attr.title]=\"cat.rollup.problems ? rollupTooltip(cat.rollup) : null\"\n [attr.aria-label]=\"cat.rollup.problems ? rollupTooltip(cat.rollup) : null\">\n @if (cat.rollup.problems) {\n {{ cat.rollup.problems }}/{{ cat.items.length }}\n } @else {\n {{ cat.items.length }}\n }\n </span>\n </button>\n @if (!isCollapsed('sec:' + section.name + ':' + cat.name)) {\n <div class=\"sb-group-body\">\n @for (row of cat.items; track itemKey(row.item)) {\n <button\n class=\"sb-item\"\n [class.sb-item--active]=\"isActive(row.item)\"\n [class.sb-item--deprecated]=\"itemStatus(row.item) === 'deprecated'\"\n [attr.title]=\"itemTooltip(row.item, row.decorations)\"\n (click)=\"onSelect(row.item)\">\n <prism-icon\n [name]=\"row.icon\"\n [size]=\"12\"\n class=\"sb-item-icon\" />\n <span class=\"sb-item-name\">{{ itemLabel(row.item) }}</span>\n <span class=\"sb-item-health\">\n @for (mark of row.decorations?.marks ?? []; track mark.id) {\n <prism-icon\n [name]=\"mark.icon\"\n [size]=\"11\"\n [class]=\"'sb-health sb-health--' + mark.variant\" />\n }\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n</nav>\n", styles: [".prism-sidebar {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n}\n\n.sb-filter {\n display: flex;\n gap: 8px;\n align-items: center;\n height: 30px;\n padding: 0 10px;\n margin: 12px;\n color: var(--prism-text-muted);\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: 6px;\n}\n\n.sb-filter input {\n flex: 1;\n min-width: 0;\n font-family: var(--font-sans);\n font-size: var(--fs-md);\n color: var(--prism-text);\n outline: none;\n background: transparent;\n border: 0;\n}\n\n.sb-filter input::placeholder {\n color: var(--prism-text-muted);\n}\n\n.sb-filter kbd {\n padding: 1px 5px;\n font-family: var(--font-mono);\n font-size: 10px;\n color: var(--prism-text-ghost);\n border: 1px solid var(--prism-border);\n border-radius: 3px;\n}\n\n.sb-scroll {\n flex: 1;\n padding: 10px 0 16px;\n padding-top: 0;\n overflow-y: auto;\n}\n\n.sb-scroll::-webkit-scrollbar {\n width: 8px;\n}\n\n.sb-scroll::-webkit-scrollbar-thumb {\n background: var(--prism-border-strong);\n border-radius: 4px;\n}\n\n.sb-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.sb-pinned {\n padding: 0 0 10px;\n margin-bottom: 4px;\n border-top: 1px solid var(--prism-border);\n border-bottom: 1px solid var(--prism-border);\n}\n\n.sb-section-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 14px 6px;\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.09em;\n}\n\n.sb-section-head-l {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.sb-section-icon {\n color: var(--prism-primary);\n}\n\n.sb-pinned-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 14px 6px;\n margin-top: 6px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.09em;\n}\n\n.sb-pinned-head-l {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.sb-pinned-pin {\n color: var(--prism-accent);\n}\n\n.sb-group {\n margin-bottom: 4px;\n}\n\n.sb-group-head {\n display: flex;\n gap: 6px;\n align-items: center;\n width: 100%;\n padding: 8px 14px 6px;\n font-family: var(--font-sans);\n font-size: 10.5px;\n font-weight: 700;\n color: var(--prism-text-ghost);\n text-align: left;\n text-transform: uppercase;\n letter-spacing: 0.09em;\n cursor: pointer;\n user-select: none;\n background: none;\n border: none;\n}\n\n.sb-group-head prism-icon {\n color: var(--prism-text-ghost);\n transition: transform var(--dur-fast);\n}\n\n.sb-group--collapsed .sb-group-head prism-icon {\n transform: rotate(-90deg);\n}\n\n.sb-group-chip {\n width: 6px;\n height: 6px;\n background: var(--prism-text-ghost);\n border-radius: 2px;\n}\n\n.sb-group-count {\n margin-left: auto;\n font-family: var(--font-mono);\n font-size: 10px;\n font-weight: 500;\n color: var(--prism-text-ghost);\n}\n\n.sb-group-count--warn {\n color: var(--prism-mark-attention);\n}\n\n.sb-group-count--danger {\n color: var(--prism-mark-critical);\n}\n\n.sb-item {\n display: flex;\n gap: 10px;\n align-items: center;\n width: 100%;\n height: 30px;\n padding: 0 14px 0 28px;\n font-family: var(--font-sans);\n font-size: 13px;\n color: var(--prism-text-2);\n text-align: left;\n cursor: pointer;\n background: none;\n border: none;\n transition:\n background var(--dur-fast),\n color var(--dur-fast);\n}\n\n.sb-item:hover {\n color: var(--prism-text);\n background: color-mix(in srgb, var(--prism-primary) 5%, transparent);\n}\n\n.sb-item--active {\n font-weight: 500;\n background: color-mix(in srgb, var(--prism-primary) 12%, transparent);\n}\n\n.sb-item-icon {\n flex: 0 0 12px;\n opacity: 0.7;\n}\n\n.sb-item-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Fixed width sized for the three built-in decoration sources (a11y,\n plugin-coverage, plugin-visual-regression) at 11px each plus two\n --sp-1 gaps, with a little headroom. navigationDecorations is an open\n extension point, so a fourth mark from a third-party plugin is\n clipped via overflow: hidden rather than allowed to grow the gutter.\n The point of a fixed-width gutter is that rows never shift\n horizontally as you scan the list. */\n.sb-item-health {\n display: flex;\n flex: none;\n gap: var(--sp-1);\n align-items: center;\n justify-content: flex-end;\n width: 40px;\n overflow: hidden;\n}\n\n/* Outline, not fill, and full saturation only for danger. The mechanism\n behind these marks is already deviation-driven: decorateItem returns\n null for a clean component and every source bails out at variant === 'ok'.\n What made them read as wallpaper was the drawing: a filled shape at full\n saturation, one per row, in a repo where deviating is the normal case. */\n.sb-health {\n fill: none;\n stroke: currentcolor;\n stroke-width: 2;\n}\n\n.sb-health--warn {\n color: color-mix(in srgb, var(--prism-mark-attention) 80%, transparent);\n}\n\n.sb-health--danger {\n color: var(--prism-mark-critical);\n}\n\n.sb-item--deprecated .sb-item-name {\n color: var(--prism-text-ghost);\n text-decoration: line-through;\n text-decoration-thickness: 1px;\n opacity: 0.7;\n}\n\n:focus-visible {\n outline: 2px solid var(--prism-primary);\n outline-offset: 2px;\n}\n"] }]
|
|
370
370
|
}], null, { filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }], onGlobalKey: [{
|
|
371
371
|
type: HostListener,
|
|
372
372
|
args: ['document:keydown', ['$event']]
|
|
@@ -29,7 +29,7 @@ export const PRISM_DARK_THEME = {
|
|
|
29
29
|
'--prism-mark-nominal': '#34d399',
|
|
30
30
|
'--prism-mark-attention': '#e8a33d',
|
|
31
31
|
'--prism-mark-critical': '#e5484d',
|
|
32
|
-
'--prism-measure': '#
|
|
32
|
+
'--prism-measure': '#f632ff',
|
|
33
33
|
'--prism-spectrum': 'linear-gradient(90deg, var(--prism-accent), var(--prism-primary), var(--prism-primary-to))'
|
|
34
34
|
};
|
|
35
35
|
export const PRISM_LIGHT_THEME = {
|
|
@@ -63,7 +63,7 @@ export const PRISM_LIGHT_THEME = {
|
|
|
63
63
|
'--prism-mark-nominal': '#047857',
|
|
64
64
|
'--prism-mark-attention': '#8f6b00',
|
|
65
65
|
'--prism-mark-critical': '#951226',
|
|
66
|
-
'--prism-measure': '#
|
|
66
|
+
'--prism-measure': '#ca00c1',
|
|
67
67
|
'--prism-spectrum': 'linear-gradient(90deg, var(--prism-accent), var(--prism-primary), var(--prism-primary-to))'
|
|
68
68
|
};
|
|
69
69
|
export const PRISM_BASE_TOKENS = {
|
|
@@ -96,7 +96,7 @@ export const PRISM_BASE_TOKENS = {
|
|
|
96
96
|
*
|
|
97
97
|
* prism-shell { --density: .8 }
|
|
98
98
|
*
|
|
99
|
-
* There is
|
|
99
|
+
* There is no signal, service or menu behind this. The whole
|
|
100
100
|
* control surface is the custom property.
|
|
101
101
|
*/
|
|
102
102
|
'--density': '1',
|
|
@@ -9,7 +9,7 @@ export interface SpectrumSlot {
|
|
|
9
9
|
* Maps a variant's index onto the spectrum rail.
|
|
10
10
|
*
|
|
11
11
|
* The CSS reads `calc(var(--i) / (var(--n) - 1) * 100%)`, so n = 1 would
|
|
12
|
-
* divide by zero
|
|
12
|
+
* divide by zero, and an invalid calc() drops the whole declaration rather
|
|
13
13
|
* than falling back to a sane default, leaving the result dependent on
|
|
14
14
|
* whatever else happens to target background-position. Reporting a floor of 2
|
|
15
15
|
* keeps the arithmetic defined and parks a lone variant at the start of the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Maps a variant's index onto the spectrum rail.
|
|
3
3
|
*
|
|
4
4
|
* The CSS reads `calc(var(--i) / (var(--n) - 1) * 100%)`, so n = 1 would
|
|
5
|
-
* divide by zero
|
|
5
|
+
* divide by zero, and an invalid calc() drops the whole declaration rather
|
|
6
6
|
* than falling back to a sane default, leaving the result dependent on
|
|
7
7
|
* whatever else happens to target background-position. Reporting a floor of 2
|
|
8
8
|
* keeps the arithmetic defined and parks a lone variant at the start of the
|
|
@@ -3,7 +3,7 @@ import type { PanelDefinition } from '../../plugin/plugin.types.js';
|
|
|
3
3
|
* The view to switch to, or `null` when the active one still stands.
|
|
4
4
|
*
|
|
5
5
|
* A view survives a component switch for as long as the new component still
|
|
6
|
-
* offers it
|
|
6
|
+
* offers it. That is the whole rule. `renderer` needs no check of its own
|
|
7
7
|
* because it is the one view every component has: there is no `isVisible` for
|
|
8
8
|
* the Playground, so it can never drop out of the visible list and never
|
|
9
9
|
* needs a fallback away from itself.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The view to switch to, or `null` when the active one still stands.
|
|
3
3
|
*
|
|
4
4
|
* A view survives a component switch for as long as the new component still
|
|
5
|
-
* offers it
|
|
5
|
+
* offers it. That is the whole rule. `renderer` needs no check of its own
|
|
6
6
|
* because it is the one view every component has: there is no `isVisible` for
|
|
7
7
|
* the Playground, so it can never drop out of the visible list and never
|
|
8
8
|
* needs a fallback away from itself.
|
|
@@ -10,7 +10,7 @@ export declare function readA11yMeta(reportPath: string, thresholdsInput?: Parti
|
|
|
10
10
|
* The plural form exists because {@link readA11yForComponent} re-enters
|
|
11
11
|
* {@link loadA11yReport}, which `statSync`s the file even on a cache hit.
|
|
12
12
|
* Calling it once per scanned component turns a 300-component library into 300
|
|
13
|
-
* redundant syscalls per build, and a watch-mode rebuild repeats them all
|
|
13
|
+
* redundant syscalls per build, and a watch-mode rebuild repeats them all. So
|
|
14
14
|
* the pipeline reads the report once and looks components up in the result.
|
|
15
15
|
*/
|
|
16
16
|
export declare function readA11yForComponents(reportPath: string, thresholds: A11yThresholds): Map<string, A11yComponentMeta>;
|
|
@@ -37,7 +37,7 @@ export function readA11yMeta(reportPath, thresholdsInput) {
|
|
|
37
37
|
* The plural form exists because {@link readA11yForComponent} re-enters
|
|
38
38
|
* {@link loadA11yReport}, which `statSync`s the file even on a cache hit.
|
|
39
39
|
* Calling it once per scanned component turns a 300-component library into 300
|
|
40
|
-
* redundant syscalls per build, and a watch-mode rebuild repeats them all
|
|
40
|
+
* redundant syscalls per build, and a watch-mode rebuild repeats them all. So
|
|
41
41
|
* the pipeline reads the report once and looks components up in the result.
|
|
42
42
|
*/
|
|
43
43
|
export function readA11yForComponents(reportPath, thresholds) {
|
|
@@ -100,7 +100,7 @@ export function generateRuntimeManifest(options) {
|
|
|
100
100
|
const { components, libraryImportPath, pages, meta } = options;
|
|
101
101
|
const directives = components.filter((c) => c.componentMeta.isDirective);
|
|
102
102
|
const hasDirectives = directives.length > 0;
|
|
103
|
-
const lines = ['// AUTO-GENERATED by ng-prism
|
|
103
|
+
const lines = ['// AUTO-GENERATED by ng-prism. Do not edit!', "import type { RuntimeManifest } from '@ng-prism/core/plugin';"];
|
|
104
104
|
if (hasDirectives) {
|
|
105
105
|
lines.push("import { Component, input, output } from '@angular/core';");
|
|
106
106
|
}
|
|
@@ -166,6 +166,10 @@ function json(value) {
|
|
|
166
166
|
function indent(depth) {
|
|
167
167
|
return ' '.repeat(depth);
|
|
168
168
|
}
|
|
169
|
+
/** `'aria-label'` and content slots like `'[card-header]'` are only valid keys in quotes. */
|
|
170
|
+
function formatKey(key) {
|
|
171
|
+
return /^[A-Za-z_$][\w$]*$/.test(key) ? key : JSON.stringify(key);
|
|
172
|
+
}
|
|
169
173
|
function formatMeta(comp, baseIndent) {
|
|
170
174
|
const inner = baseIndent + 2;
|
|
171
175
|
const lines = [
|
|
@@ -192,7 +196,7 @@ function formatObject(obj, baseIndent) {
|
|
|
192
196
|
: typeof value === 'object' && value !== null
|
|
193
197
|
? formatObject(value, inner)
|
|
194
198
|
: json(value);
|
|
195
|
-
return `${indent(inner)}${key}: ${formatted},`;
|
|
199
|
+
return `${indent(inner)}${formatKey(key)}: ${formatted},`;
|
|
196
200
|
});
|
|
197
201
|
return `{\n${lines.join('\n')}\n${indent(baseIndent)}}`;
|
|
198
202
|
}
|
|
@@ -3,7 +3,7 @@ function pluginLabel(plugin) {
|
|
|
3
3
|
}
|
|
4
4
|
function wrapPluginError(plugin, hook, target, err) {
|
|
5
5
|
const cause = err instanceof Error ? err.message : String(err);
|
|
6
|
-
const wrapped = new Error(`ng-prism: plugin ${pluginLabel(plugin)} failed in ${hook} for ${target}
|
|
6
|
+
const wrapped = new Error(`ng-prism: plugin ${pluginLabel(plugin)} failed in ${hook} for ${target}: ${cause}`, err instanceof Error ? { cause: err } : undefined);
|
|
7
7
|
if (err instanceof Error && err.stack) {
|
|
8
8
|
wrapped.stack = `${wrapped.message}\nCaused by: ${err.stack}`;
|
|
9
9
|
}
|
|
@@ -1,9 +1,53 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* What {@link evaluateStatic} returns for a root it cannot evaluate. A symbol,
|
|
4
|
+
* so that it stays distinct from an `undefined` written on purpose.
|
|
5
|
+
*/
|
|
6
|
+
export declare const UNEVALUABLE: unique symbol;
|
|
7
|
+
export type EvaluationPath = ReadonlyArray<string | number>;
|
|
8
|
+
/** A reference in the source whose declaration has no value the evaluator can use. */
|
|
9
|
+
export interface UnresolvedReference {
|
|
10
|
+
/** The identifier, shorthand property or property access that did not resolve. */
|
|
11
|
+
node: ts.Node;
|
|
12
|
+
/**
|
|
13
|
+
* `let` and `var` are not constants. `no-value` is a declaration without an
|
|
14
|
+
* initializer: `declare const`, a compiled package's `.d.ts`, or a global
|
|
15
|
+
* of the JavaScript runtime such as `Math`. `cycle` is a constant that refers back to itself, and
|
|
16
|
+
* `runtime-value` a function or class.
|
|
17
|
+
*/
|
|
18
|
+
kind: 'let' | 'var' | 'no-value' | 'cycle' | 'runtime-value';
|
|
19
|
+
}
|
|
20
|
+
export interface UnevaluableIssue {
|
|
21
|
+
/** Where the dropped part sat in the evaluated value, with array indices as written in the source. */
|
|
22
|
+
path: EvaluationPath;
|
|
23
|
+
/** The expression, spread or property that could not be evaluated. */
|
|
24
|
+
node: ts.Node;
|
|
25
|
+
/** `runtime-value` marks functions, classes and instances, which no static evaluation can ever capture. */
|
|
26
|
+
reason: 'unsupported' | 'runtime-value';
|
|
27
|
+
/** The innermost reference that failed, when one is what made `node` unevaluable. */
|
|
28
|
+
cause?: UnresolvedReference;
|
|
29
|
+
}
|
|
30
|
+
export type UnevaluableReporter = (issue: UnevaluableIssue) => void;
|
|
31
|
+
export interface EvaluateOptions {
|
|
32
|
+
/** Called for every property, element or spread that is dropped. */
|
|
33
|
+
report?: UnevaluableReporter;
|
|
34
|
+
/** Resolves constants, enum members and imports. Without it, every reference is unevaluable. */
|
|
35
|
+
checker?: ts.TypeChecker;
|
|
36
|
+
}
|
|
2
37
|
/**
|
|
3
38
|
* Statically evaluate an AST expression node.
|
|
4
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* Inside an object or array literal, whatever cannot be evaluated costs only
|
|
41
|
+
* that property or element: it is reported and left out, never the container
|
|
42
|
+
* around it. Only the root itself can come back as {@link UNEVALUABLE}.
|
|
43
|
+
*/
|
|
44
|
+
export declare function evaluateStatic(node: ts.Expression, options?: EvaluateOptions): unknown;
|
|
45
|
+
/**
|
|
46
|
+
* {@link evaluateStatic} for callers that read a few known fields and have no
|
|
47
|
+
* use for diagnostics, such as `@Component` metadata: what cannot be evaluated
|
|
48
|
+
* is left out silently, and an unevaluable root becomes `undefined`.
|
|
5
49
|
*/
|
|
6
|
-
export declare function evaluateExpression(node: ts.Expression): unknown;
|
|
50
|
+
export declare function evaluateExpression(node: ts.Expression, checker?: ts.TypeChecker): unknown;
|
|
7
51
|
/**
|
|
8
52
|
* Find a decorator by name on a class or property declaration.
|
|
9
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../../src/builder/scanner/ast-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../../src/builder/scanner/ast-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;A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