@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
|
@@ -10,11 +10,11 @@ const _c0 = ["outlet"];
|
|
|
10
10
|
* One frame of the contact sheet: a stage painting the variant's declared
|
|
11
11
|
* background, with the variant's own instance on it and a caption beneath.
|
|
12
12
|
*
|
|
13
|
-
* It
|
|
13
|
+
* It shares none of the Playground's bookkeeping. Output
|
|
14
14
|
* subscriptions, `renderedElement`, the `prism:render:*` marks, the renderer
|
|
15
15
|
* hooks and `data-prism-rendered` all describe *one* rendered thing; n cells
|
|
16
16
|
* writing to any of them would corrupt what they mean. `data-prism-rendered`
|
|
17
|
-
* matters most
|
|
17
|
+
* matters most: it is the selector external screenshot runners key on (see
|
|
18
18
|
* `docs/guide/external-tooling.md`), and this component never emits it.
|
|
19
19
|
*/
|
|
20
20
|
export class PrismOverviewCellComponent {
|
|
@@ -34,7 +34,7 @@ export class PrismOverviewCellComponent {
|
|
|
34
34
|
// Defensive, not reachable today: `Variant.name` is required
|
|
35
35
|
// (decorator/showcase.types.ts) and `prism-overview` only ever creates a
|
|
36
36
|
// cell for an index it just read out of that same `variants` array. A
|
|
37
|
-
// bare `07` would only appear if those two facts stopped lining up
|
|
37
|
+
// bare `07` would only appear if those two facts stopped lining up, i.e. the
|
|
38
38
|
// grid indexing past the array it iterates, or `name` becoming optional.
|
|
39
39
|
return variant ? `${number} ${variant.name}` : number;
|
|
40
40
|
}, /* @ts-ignore */
|
|
@@ -56,10 +56,9 @@ export class PrismOverviewCellComponent {
|
|
|
56
56
|
// The Playground lets a variant that throws on construction propagate: one
|
|
57
57
|
// broken instance, and the user navigates away from it. The Overview
|
|
58
58
|
// fans instantiation out from one instance to n, all mounted in the same
|
|
59
|
-
// change-detection pass
|
|
59
|
+
// change-detection pass. An uncaught throw here would abort the refresh of
|
|
60
60
|
// every cell after it, so one bad variant would take down the whole sheet
|
|
61
|
-
// instead of just its own cell.
|
|
62
|
-
// propagate there.
|
|
61
|
+
// instead of just its own cell. Hence: contain here, propagate there.
|
|
63
62
|
mount(component, index) {
|
|
64
63
|
try {
|
|
65
64
|
this.outlet().clear();
|
|
@@ -91,8 +90,8 @@ export class PrismOverviewCellComponent {
|
|
|
91
90
|
// *after* that attach. So there is usually a half-built subtree sitting
|
|
92
91
|
// in the outlet by the time we get here, and clearing it is what makes
|
|
93
92
|
// a caught cell actually show an empty stage with its caption still in
|
|
94
|
-
// place
|
|
95
|
-
//
|
|
93
|
+
// place, which shows "this variant failed" instead of a broken grid
|
|
94
|
+
// with no indication of which cell caused it.
|
|
96
95
|
this.outlet().clear();
|
|
97
96
|
console.error(`[ng-prism] Variant ${index} of ${component.meta.className} failed to render:`, error);
|
|
98
97
|
}
|
|
@@ -115,14 +114,14 @@ export class PrismOverviewCellComponent {
|
|
|
115
114
|
i0.ɵɵattribute("data-bg", ctx.bg());
|
|
116
115
|
i0.ɵɵadvance(5);
|
|
117
116
|
i0.ɵɵtextInterpolate(ctx.caption());
|
|
118
|
-
} }, styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--%NS%sp-2);\n min-width: 0;\n}\n\n\n\n[data-wide][_nghost-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.cell__stage[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n padding: var(--%NS%sp-5);\n overflow: hidden;\n outline: 1px solid var(--%NS%prism-stage-edge);\n outline-offset: -1px;\n background-color: var(--%NS%prism-stage);\n border-radius: var(--%NS%radius-sm);\n}\n\n.cell__mount[_ngcontent-%COMP%] {\n display: inline-block;\n max-width: 100%;\n}\n\n[data-wide][_nghost-%COMP%] .cell__mount[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n}\n\n\n\n\n\n.cell__caption[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: var(--%NS%prism-font-mono);\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-muted);\n white-space: nowrap;\n}", "[data-bg=\"dots\"][_ngcontent-%COMP%] {\n background-image: radial-gradient(circle, var(--%NS%prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n }\n\n [data-bg=\"plain\"][_ngcontent-%COMP%] {\n background-image: none;\n }\n\n \n\n\n\n\n
|
|
117
|
+
} }, styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--%NS%sp-2);\n min-width: 0;\n}\n\n\n\n[data-wide][_nghost-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.cell__stage[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n padding: var(--%NS%sp-5);\n overflow: hidden;\n outline: 1px solid var(--%NS%prism-stage-edge);\n outline-offset: -1px;\n background-color: var(--%NS%prism-stage);\n border-radius: var(--%NS%radius-sm);\n}\n\n.cell__mount[_ngcontent-%COMP%] {\n display: inline-block;\n max-width: 100%;\n}\n\n[data-wide][_nghost-%COMP%] .cell__mount[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n}\n\n\n\n\n\n.cell__caption[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: var(--%NS%prism-font-mono);\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-muted);\n white-space: nowrap;\n}", "[data-bg=\"dots\"][_ngcontent-%COMP%] {\n background-image: radial-gradient(circle, var(--%NS%prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n }\n\n [data-bg=\"plain\"][_ngcontent-%COMP%] {\n background-image: none;\n }\n\n \n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [data-bg=\"light\"][_ngcontent-%COMP%] {\n background-color: var(--%NS%prism-void-light, #f7f5fc);\n background-image: none;\n --%NS%prism-measure: #ca00c1;\n --%NS%prism-measure-plate: var(--%NS%prism-void-light, #f7f5fc);\n }\n [data-bg=\"dark\"][_ngcontent-%COMP%] {\n background-color: var(--%NS%prism-void-dark, #07050f);\n background-image: none;\n --%NS%prism-measure: #f632ff;\n --%NS%prism-measure-plate: var(--%NS%prism-void-dark, #07050f);\n }\n\n \n\n\n [data-bg=\"checker\"][_ngcontent-%COMP%], \n [data-bg=\"transparent\"][_ngcontent-%COMP%] {\n background-image:\n linear-gradient(45deg, var(--%NS%prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--%NS%prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--%NS%prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--%NS%prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }"] });
|
|
119
118
|
}
|
|
120
119
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismOverviewCellComponent, [{
|
|
121
120
|
type: Component,
|
|
122
121
|
args: [{ selector: 'prism-overview-cell', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
123
122
|
role: 'listitem',
|
|
124
123
|
'[attr.data-wide]': "isWide() ? '' : null"
|
|
125
|
-
}, template: "<div\n class=\"cell__stage\"\n [attr.data-bg]=\"bg()\">\n <div class=\"cell__mount\"><ng-container #outlet /></div>\n</div>\n<span class=\"cell__caption\">{{ caption() }}</span>\n", styles: [":host {\n display: flex;\n flex-direction: column;\n gap: var(--sp-2);\n min-width: 0;\n}\n\n/* A stretch variant has no intrinsic width to compare against its\n neighbours, so it takes the row rather than a column. */\n:host([data-wide]) {\n grid-column: 1 / -1;\n}\n\n.cell__stage {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n padding: var(--sp-5);\n overflow: hidden;\n outline: 1px solid var(--prism-stage-edge);\n outline-offset: -1px;\n background-color: var(--prism-stage);\n border-radius: var(--radius-sm);\n}\n\n.cell__mount {\n display: inline-block;\n max-width: 100%;\n}\n\n:host([data-wide]) .cell__mount {\n display: block;\n width: 100%;\n}\n\n/* The caption sits below the frame, not on it. Inside, it would have to\n invert against every background the cell can paint
|
|
124
|
+
}, template: "<div\n class=\"cell__stage\"\n [attr.data-bg]=\"bg()\">\n <div class=\"cell__mount\"><ng-container #outlet /></div>\n</div>\n<span class=\"cell__caption\">{{ caption() }}</span>\n", styles: [":host {\n display: flex;\n flex-direction: column;\n gap: var(--sp-2);\n min-width: 0;\n}\n\n/* A stretch variant has no intrinsic width to compare against its\n neighbours, so it takes the row rather than a column. */\n:host([data-wide]) {\n grid-column: 1 / -1;\n}\n\n.cell__stage {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n padding: var(--sp-5);\n overflow: hidden;\n outline: 1px solid var(--prism-stage-edge);\n outline-offset: -1px;\n background-color: var(--prism-stage);\n border-radius: var(--radius-sm);\n}\n\n.cell__mount {\n display: inline-block;\n max-width: 100%;\n}\n\n:host([data-wide]) .cell__mount {\n display: block;\n width: 100%;\n}\n\n/* The caption sits below the frame, not on it. Inside, it would have to\n invert against every background the cell can paint, and gaining a new\n contrast rule per CanvasBg value is the cost the sheet exists to\n avoid. */\n.cell__caption {\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: var(--prism-font-mono);\n font-size: var(--fs-xs);\n color: var(--prism-text-muted);\n white-space: nowrap;\n}\n", "\n [data-bg=\"dots\"] {\n background-image: radial-gradient(circle, var(--prism-dot) 1px, transparent 1px);\n background-size: 20px 20px;\n }\n\n [data-bg=\"plain\"] {\n background-image: none;\n }\n\n /* Flat, not dotted. \"light\" and \"dark\" name the surface a component was\n designed against, and their colour is absolute rather than a theme token,\n which makes them the values to declare for a screenshot baseline. Use\n \"dots\" for the grid. */\n /* These two also re-point --prism-measure. Other overlays use theme colours\n on theme surfaces, but these grounds ignore the theme: \"light\" stays\n near-white in the dark theme and \"dark\" stays near-black in the light one.\n The dark theme's magenta reaches only 2.85:1 on the light ground, under the\n 4.5:1 its 9px readout needs, so the measurement colour has to follow the\n ground, not the theme.\n\n --prism-measure-plate follows it for the same reason. It is the surface\n the measuring tool's value label paints itself on, so the label reads as a\n gap in the measurement line rather than a badge on top of it. At its\n --prism-stage fallback it would be the theme's stage under a re-pointed\n foreground: the light theme's magenta on the dark theme's stage reads\n 3.71:1, the dark theme's on white 3.08:1. Pinned to the ground the same way,\n the pairs reach 4.54:1 and 6.57:1. A color-mix against the ground would\n work too, but this file already states both grounds literally, and one\n mechanism per decision is enough.\n\n Literal values because this file is theme-independent, like the two\n grounds below. Keep them in step with --prism-measure in\n prism-default-theme.ts; semantic-colours.spec.ts fails if they drift. */\n [data-bg=\"light\"] {\n background-color: var(--prism-void-light, #f7f5fc);\n background-image: none;\n --prism-measure: #ca00c1;\n --prism-measure-plate: var(--prism-void-light, #f7f5fc);\n }\n [data-bg=\"dark\"] {\n background-color: var(--prism-void-dark, #07050f);\n background-image: none;\n --prism-measure: #f632ff;\n --prism-measure-plate: var(--prism-void-dark, #07050f);\n }\n\n /* \"transparent\" shares the checkerboard. In the app the checkerboard is\n already the UI's sign for \"no surface\", and a see-through stage would only\n show the shell behind it. Only CAPTURE_STYLES tells the two apart. */\n [data-bg=\"checker\"],\n [data-bg=\"transparent\"] {\n background-image:\n linear-gradient(45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(-45deg, var(--prism-border) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--prism-border) 75%),\n linear-gradient(-45deg, transparent 75%, var(--prism-border) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n }\n"] }]
|
|
126
125
|
}], () => [], { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], outlet: [{ type: i0.ViewChild, args: ['outlet', { ...{
|
|
127
126
|
read: ViewContainerRef
|
|
128
127
|
}, isSignal: true }] }] }); })();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
|
-
* All variants of one component at once
|
|
4
|
+
* All variants of one component at once: a contact sheet rather than a
|
|
5
5
|
* viewfinder.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* No controls of any kind: columns follow the window, and
|
|
8
8
|
* everything else a cell shows is what the variant itself declared.
|
|
9
9
|
*/
|
|
10
10
|
export declare class PrismOverviewComponent {
|
|
@@ -18,10 +18,10 @@ function PrismOverviewComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
18
18
|
i0.ɵɵrepeater(ctx_r2.variants());
|
|
19
19
|
} }
|
|
20
20
|
/**
|
|
21
|
-
* All variants of one component at once
|
|
21
|
+
* All variants of one component at once: a contact sheet rather than a
|
|
22
22
|
* viewfinder.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* No controls of any kind: columns follow the window, and
|
|
25
25
|
* everything else a cell shows is what the variant itself declared.
|
|
26
26
|
*/
|
|
27
27
|
export class PrismOverviewComponent {
|
|
@@ -58,6 +58,6 @@ export class PrismPageRendererComponent {
|
|
|
58
58
|
}
|
|
59
59
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismPageRendererComponent, [{
|
|
60
60
|
type: Component,
|
|
61
|
-
args: [{ selector: 'prism-page-renderer', standalone: true, imports: [JsonPipe, NgComponentOutlet], template: "@if (page(); as p) {\n <div class=\"prism-page-renderer\">\n <h2 class=\"prism-page-renderer__title\">{{ p.title }}</h2>\n @switch (p.type) {\n @case ('custom') {\n <pre class=\"prism-page-renderer__json\">{{ $any(p).data | json }}</pre>\n }\n @case ('component') {\n <div class=\"prism-page-renderer__component\">\n <ng-container *ngComponentOutlet=\"$any(p).component\" />\n </div>\n }\n }\n </div>\n}\n", styles: [":host {\n display: block;\n flex: 1;\n overflow-y: auto;\n}\n\n.prism-page-renderer__title {\n padding: 16px 20px;\n margin: 0;\n font-family: var(--prism-font-sans);\n font-size: 18px;\n font-weight: 600;\n color: var(--prism-text);\n letter-spacing: -0.01em;\n background: var(--prism-bg-surface);\n border-bottom: 1px solid var(--prism-border);\n border-left: 3px solid;\n border-image: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to)) 1;\n}\n\n.prism-page-renderer__component {\n padding: var(--sp-5) var(--sp-6);\n font-family: var(--prism-font-sans);\n font-size: var(--fs-lg);\n line-height: 1.6;\n color: var(--prism-text-2);\n}\n\n/* Projected page content arrives through ngComponentOutlet and carries no\n theme of its own. Without this scope a consuming app's plain <h2> renders\n in the browser default colour on the styleguide's dark shell
|
|
61
|
+
args: [{ selector: 'prism-page-renderer', standalone: true, imports: [JsonPipe, NgComponentOutlet], template: "@if (page(); as p) {\n <div class=\"prism-page-renderer\">\n <h2 class=\"prism-page-renderer__title\">{{ p.title }}</h2>\n @switch (p.type) {\n @case ('custom') {\n <pre class=\"prism-page-renderer__json\">{{ $any(p).data | json }}</pre>\n }\n @case ('component') {\n <div class=\"prism-page-renderer__component\">\n <ng-container *ngComponentOutlet=\"$any(p).component\" />\n </div>\n }\n }\n </div>\n}\n", styles: [":host {\n display: block;\n flex: 1;\n overflow-y: auto;\n}\n\n.prism-page-renderer__title {\n padding: 16px 20px;\n margin: 0;\n font-family: var(--prism-font-sans);\n font-size: 18px;\n font-weight: 600;\n color: var(--prism-text);\n letter-spacing: -0.01em;\n background: var(--prism-bg-surface);\n border-bottom: 1px solid var(--prism-border);\n border-left: 3px solid;\n border-image: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to)) 1;\n}\n\n.prism-page-renderer__component {\n padding: var(--sp-5) var(--sp-6);\n font-family: var(--prism-font-sans);\n font-size: var(--fs-lg);\n line-height: 1.6;\n color: var(--prism-text-2);\n}\n\n/* Projected page content arrives through ngComponentOutlet and carries no\n theme of its own. Without this scope a consuming app's plain <h2> renders\n in the browser default colour on the styleguide's dark shell (measured at\n rgb(26,26,46) on a dark ground), which is darker than the body text beneath\n it and inverts the hierarchy. These are element selectors because\n the content is authored by the consumer and carries no classes we know. */\n.prism-page-renderer__component :is(h1, h2, h3, h4, h5, h6) {\n margin: var(--sp-6) 0 var(--sp-3);\n font-family: var(--prism-font-sans);\n font-weight: 600;\n line-height: 1.25;\n color: var(--prism-text);\n letter-spacing: -0.01em;\n}\n\n.prism-page-renderer__component :is(h1, h2, h3, h4, h5, h6):first-child {\n margin-top: 0;\n}\n\n.prism-page-renderer__component h1 {\n font-size: 24px;\n}\n\n.prism-page-renderer__component h2 {\n font-size: 20px;\n}\n\n.prism-page-renderer__component h3 {\n font-size: 17px;\n}\n\n.prism-page-renderer__component :is(h4, h5, h6) {\n font-size: var(--fs-xl);\n}\n\n.prism-page-renderer__component :is(p, ul, ol) {\n margin: 0 0 var(--sp-4);\n}\n\n.prism-page-renderer__component :is(strong, b) {\n color: var(--prism-text);\n}\n\n.prism-page-renderer__component a {\n color: var(--prism-primary);\n}\n\n.prism-page-renderer__component :is(code, pre) {\n font-family: var(--prism-font-mono);\n font-size: var(--fs-md);\n color: var(--prism-text);\n}\n\n.prism-page-renderer__json {\n padding: 24px;\n margin: 0;\n font-family: monospace;\n font-size: 12px;\n color: var(--prism-text-muted);\n white-space: pre-wrap;\n}\n"] }]
|
|
62
62
|
}], () => [], null); })();
|
|
63
63
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismPageRendererComponent, { className: "PrismPageRendererComponent", filePath: "app/page-renderer/prism-page-renderer.component.ts", lineNumber: 12 }); })();
|
|
@@ -20,14 +20,14 @@ export function calculateScore(results) {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* axe-core is a dependency of `@ng-prism/core` and loaded lazily, so a failure
|
|
23
|
-
* here means the chunk could not be fetched
|
|
23
|
+
* here means the chunk could not be fetched, not that anything is missing.
|
|
24
24
|
*/
|
|
25
25
|
async function loadAxe() {
|
|
26
26
|
try {
|
|
27
27
|
return await import('axe-core');
|
|
28
28
|
}
|
|
29
29
|
catch (cause) {
|
|
30
|
-
throw new Error('Could not load axe-core, so the accessibility audit is unavailable. It ships with @ng-prism/core
|
|
30
|
+
throw new Error('Could not load axe-core, so the accessibility audit is unavailable. It ships with @ng-prism/core; check that the install is intact and the chunk is reachable.', { cause });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export async function runCoreAudit(element, config) {
|
|
@@ -3,12 +3,11 @@ import type { A11yComponentMeta, A11yScoreResult, A11yThresholds } from './a11y.
|
|
|
3
3
|
* A component's standing, derived with the same precedence
|
|
4
4
|
* `checkA11yThresholds` uses library-wide.
|
|
5
5
|
*
|
|
6
|
-
* Browser-safe
|
|
7
|
-
* caller: the derivation is written down once and read from both sides. The
|
|
6
|
+
* Browser-safe, even though the build step is its main caller: the derivation is written down once and read from both sides. The
|
|
8
7
|
* build-time hook stores the result in the component's meta for the navigation
|
|
9
8
|
* marker, and the panel tab grades the *live* audit with the very same rule.
|
|
10
|
-
* The two look at different numbers
|
|
11
|
-
* running now
|
|
9
|
+
* The two look at different numbers (the report is a snapshot, the audit is
|
|
10
|
+
* running now), but they must never grade the same number differently, which
|
|
12
11
|
* is what a second hardcoded scale next to this one would guarantee.
|
|
13
12
|
*/
|
|
14
13
|
export declare function deriveA11ySummary(score: A11yScoreResult, thresholds: A11yThresholds): NonNullable<A11yComponentMeta['summary']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-summary.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1F
|
|
1
|
+
{"version":3,"file":"a11y-summary.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1F;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,GAAG,WAAW,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAmB/H"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* A component's standing, derived with the same precedence
|
|
3
3
|
* `checkA11yThresholds` uses library-wide.
|
|
4
4
|
*
|
|
5
|
-
* Browser-safe
|
|
6
|
-
* caller: the derivation is written down once and read from both sides. The
|
|
5
|
+
* Browser-safe, even though the build step is its main caller: the derivation is written down once and read from both sides. The
|
|
7
6
|
* build-time hook stores the result in the component's meta for the navigation
|
|
8
7
|
* marker, and the panel tab grades the *live* audit with the very same rule.
|
|
9
|
-
* The two look at different numbers
|
|
10
|
-
* running now
|
|
8
|
+
* The two look at different numbers (the report is a snapshot, the audit is
|
|
9
|
+
* running now), but they must never grade the same number differently, which
|
|
11
10
|
* is what a second hardcoded scale next to this one would guarantee.
|
|
12
11
|
*/
|
|
13
12
|
export function deriveA11ySummary(score, thresholds) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { A11yThresholds } from './a11y.types.js';
|
|
2
|
-
/** Sentinel value meaning "no upper bound"
|
|
2
|
+
/** Sentinel value meaning "no upper bound". JSON-safe (unlike Infinity, which serializes to null). */
|
|
3
3
|
export declare const A11Y_UNLIMITED: number;
|
|
4
4
|
export declare const DEFAULT_A11Y_THRESHOLDS: A11yThresholds;
|
|
5
5
|
export declare function resolveA11yThresholds(input?: Partial<A11yThresholds>): A11yThresholds;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-thresholds.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-thresholds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,
|
|
1
|
+
{"version":3,"file":"a11y-thresholds.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-thresholds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,sGAAsG;AACtG,eAAO,MAAM,cAAc,QAA0B,CAAC;AAEtD,eAAO,MAAM,uBAAuB,EAAE,cAKrC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAGrF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Sentinel value meaning "no upper bound"
|
|
1
|
+
/** Sentinel value meaning "no upper bound". JSON-safe (unlike Infinity, which serializes to null). */
|
|
2
2
|
export const A11Y_UNLIMITED = Number.MAX_SAFE_INTEGER;
|
|
3
3
|
export const DEFAULT_A11Y_THRESHOLDS = {
|
|
4
4
|
score: 80,
|
|
@@ -31,7 +31,7 @@ export interface A11yReport {
|
|
|
31
31
|
auditedComponents: number;
|
|
32
32
|
auditedVariants: number;
|
|
33
33
|
};
|
|
34
|
-
/** Optional per-component breakdown (className
|
|
34
|
+
/** Optional per-component breakdown (className -> score). Used for tooltips/drilldown. */
|
|
35
35
|
components?: Record<string, A11yScoreResult>;
|
|
36
36
|
/** Timestamp the report was generated. */
|
|
37
37
|
generatedAt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.types.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACvB,mEAAmE;IACnE,KAAK,EAAE,eAAe,GAAG;QACrB,iBAAiB,EAAE,MAAM,CAAC;QAC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@
|
|
|
1
1
|
import type { NavigationDecorationDefinition } from '../../plugin/plugin.types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Core-owned navigation markers
|
|
3
|
+
* Core-owned navigation markers, the counterpart to `BUILTIN_PANELS` and
|
|
4
4
|
* `BUILTIN_HEADER_WIDGETS`. A11y is a core feature, not a plugin, so its
|
|
5
5
|
* marker lives here rather than in a plugin's contribution list.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Core-owned navigation markers
|
|
2
|
+
* Core-owned navigation markers, the counterpart to `BUILTIN_PANELS` and
|
|
3
3
|
* `BUILTIN_HEADER_WIDGETS`. A11y is a core feature, not a plugin, so its
|
|
4
4
|
* marker lives here rather than in a plugin's contribution list.
|
|
5
5
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* a JSON textarea (they wrap live framework objects, not data). When a
|
|
4
4
|
* showcased component declares an input of one of these types, the controls
|
|
5
5
|
* panel renders a "Not editable" placeholder instead of routing it through
|
|
6
|
-
* the JsonControl
|
|
6
|
+
* the JsonControl, which would otherwise crash on `undefined`/non-serializable
|
|
7
7
|
* defaults and presents a misleading editor to the developer anyway.
|
|
8
8
|
*/
|
|
9
9
|
const NON_EDITABLE_TYPE_NAMES = ['TemplateRef', 'ElementRef', 'ViewContainerRef'];
|
|
@@ -6,7 +6,7 @@ import type { A11yScoreResult, A11yThresholds } from '../a11y/a11y.types.js';
|
|
|
6
6
|
* Passed in rather than injected so this stays a pure function. The panel host
|
|
7
7
|
* reads them from its own services and hands them over; that is the whole
|
|
8
8
|
* reason the built-in chain could not simply be expressed as
|
|
9
|
-
* {@link PanelDefinition.badge} callbacks
|
|
9
|
+
* {@link PanelDefinition.badge} callbacks: `a11y` reports a running audit, not
|
|
10
10
|
* anything the component's meta holds.
|
|
11
11
|
*
|
|
12
12
|
* The thresholds travel with the audit result rather than being baked in here.
|
|
@@ -13,7 +13,7 @@ export function providePrism(manifest, config, options) {
|
|
|
13
13
|
: manifest;
|
|
14
14
|
// Exposes a thin discovery view of the manifest to external audit tooling:
|
|
15
15
|
// class name, title, variants, and the `@Showcase` metadata a tool needs to
|
|
16
|
-
// decide how to treat a variant. Still no Angular type references
|
|
16
|
+
// decide how to treat a variant. Still no Angular type references; see
|
|
17
17
|
// buildDiscoveryManifest for what gets stripped and why.
|
|
18
18
|
if (typeof globalThis !== 'undefined') {
|
|
19
19
|
globalThis['__PRISM_MANIFEST__'] = buildDiscoveryManifest(mergedManifest);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
2
|
/** Synthetic input the manifest generator emits on directive wrapper classes
|
|
3
3
|
* to project per-variant `content` text into the host element. The directive
|
|
4
|
-
* itself doesn't declare it, so it isn't in `meta.inputs
|
|
4
|
+
* itself doesn't declare it, so it isn't in `meta.inputs`, and code that
|
|
5
5
|
* validates / filters inputs against that list must allow this key through.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PRISM_CONTENT_INPUT = "__prismContent__";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Synthetic input the manifest generator emits on directive wrapper classes
|
|
2
2
|
* to project per-variant `content` text into the host element. The directive
|
|
3
|
-
* itself doesn't declare it, so it isn't in `meta.inputs
|
|
3
|
+
* itself doesn't declare it, so it isn't in `meta.inputs`, and code that
|
|
4
4
|
* validates / filters inputs against that list must allow this key through.
|
|
5
5
|
*/
|
|
6
6
|
export const PRISM_CONTENT_INPUT = '__prismContent__';
|
|
@@ -14,12 +14,26 @@ export type OverlayResolution = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Decides which overlay component belongs to the active panel.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Resolves to `none` regardless of which panel is active, and never
|
|
18
|
+
* triggers a lazy overlay load, under either of two independent
|
|
19
|
+
* conditions:
|
|
20
|
+
*
|
|
21
|
+
* - Capture mode: panel overlays render *inside* `.demo-wrap`, the same
|
|
22
|
+
* element external screenshot tools capture.
|
|
23
|
+
* - Measure mode: see the `measureActive` option below for why a running
|
|
24
|
+
* measuring tool preempts every panel overlay the same way.
|
|
20
25
|
*/
|
|
21
26
|
export declare function resolveOverlay(panels: readonly PanelDefinition[], activePanelId: string, options: {
|
|
22
27
|
captureActive: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* True while the measuring tool is running.
|
|
30
|
+
*
|
|
31
|
+
* A bridge for now: once the tool can attribute a measured pixel gap
|
|
32
|
+
* to the CSS property that produced it, the box-model plugin has
|
|
33
|
+
* nothing left that it alone can do, and the competition for the
|
|
34
|
+
* pointer dissolves. See Spec §13.
|
|
35
|
+
*/
|
|
36
|
+
measureActive: boolean;
|
|
23
37
|
cache: ReadonlyMap<string, Type<unknown>>;
|
|
24
38
|
}): OverlayResolution;
|
|
25
39
|
//# sourceMappingURL=overlay-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-resolver.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/overlay-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GACvB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;CAAE,GAC3C;IACI,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CACtC,CAAC;AAIR
|
|
1
|
+
{"version":3,"file":"overlay-resolver.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/overlay-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GACvB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;CAAE,GAC3C;IACI,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CACtC,CAAC;AAIR;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE;IACL,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7C,GACF,iBAAiB,CA+BnB"}
|
|
@@ -2,12 +2,17 @@ const NONE = { kind: 'none' };
|
|
|
2
2
|
/**
|
|
3
3
|
* Decides which overlay component belongs to the active panel.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Resolves to `none` regardless of which panel is active, and never
|
|
6
|
+
* triggers a lazy overlay load, under either of two independent
|
|
7
|
+
* conditions:
|
|
8
|
+
*
|
|
9
|
+
* - Capture mode: panel overlays render *inside* `.demo-wrap`, the same
|
|
10
|
+
* element external screenshot tools capture.
|
|
11
|
+
* - Measure mode: see the `measureActive` option below for why a running
|
|
12
|
+
* measuring tool preempts every panel overlay the same way.
|
|
8
13
|
*/
|
|
9
14
|
export function resolveOverlay(panels, activePanelId, options) {
|
|
10
|
-
if (options.captureActive)
|
|
15
|
+
if (options.captureActive || options.measureActive)
|
|
11
16
|
return NONE;
|
|
12
17
|
const panel = panels.find((p) => p.id === activePanelId);
|
|
13
18
|
if (!panel)
|
|
@@ -17,7 +17,7 @@ export declare class PrismRendererComponent {
|
|
|
17
17
|
* Every viewport binding reads this rather than the service directly, so
|
|
18
18
|
* capture mode cannot be constrained by any route. Previously only the grips
|
|
19
19
|
* and the dimension line sat behind the capture guard while the attributes
|
|
20
|
-
* that change `.demo-wrap`'s box did not
|
|
20
|
+
* that change `.demo-wrap`'s box did not. Safe in practice, because capture
|
|
21
21
|
* never restores a persisted width and every setter is suppressed, but safe
|
|
22
22
|
* by reachability argument rather than by construction. A future caller of
|
|
23
23
|
* `setViewportWidth` during a capture run would have recorded every
|
|
@@ -30,7 +30,7 @@ export declare class PrismRendererComponent {
|
|
|
30
30
|
/**
|
|
31
31
|
* A drag on either grip, rested on a preset if it came close enough.
|
|
32
32
|
*
|
|
33
|
-
* The snapping lives here and not in `PrismResizerDirective`
|
|
33
|
+
* The snapping lives here and not in `PrismResizerDirective` because the
|
|
34
34
|
* directive also drives the sidebar and the panel, where there is nothing to
|
|
35
35
|
* snap to, and a generic control that knows about viewport presets would be
|
|
36
36
|
* the wrong shape.
|
|
@@ -53,7 +53,7 @@ export declare class PrismRendererComponent {
|
|
|
53
53
|
readonly activeOverlay: import("@angular/core").WritableSignal<Type<unknown> | null>;
|
|
54
54
|
/** Identifier of the currently rendered component/variant (for audit tooling / e2e). */
|
|
55
55
|
protected readonly renderedKey: import("@angular/core").Signal<string | null>;
|
|
56
|
-
/** Resolved canvas layout for the active variant
|
|
56
|
+
/** Resolved canvas layout for the active variant. Variant overrides component config; defaults to 'fit'. */
|
|
57
57
|
protected readonly canvasLayout: import("@angular/core").Signal<import("../../shared/canvas-layout.type.js").CanvasLayout>;
|
|
58
58
|
protected readonly overlayInputs: {
|
|
59
59
|
rendererService: PrismRendererService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/prism-renderer.component.ts"],"names":[],"mappings":"AACA,OAAO,EASH,QAAQ,EAER,KAAK,IAAI,EAIZ,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"prism-renderer.component.d.ts","sourceRoot":"","sources":["../../../src/app/renderer/prism-renderer.component.ts"],"names":[],"mappings":"AACA,OAAO,EASH,QAAQ,EAER,KAAK,IAAI,EAIZ,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;;AAMhF,qBASa,sBAAsB;IAC/B,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IACtE,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,SAAS,CAAC,QAAQ,CAAC,aAAa,qBAA8B;IAC9D,SAAS,CAAC,QAAQ,CAAC,OAAO,sBAA+B;IACzD,SAAS,CAAC,QAAQ,CAAC,SAAS,wBAAiC;IAE7D;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,gDAAuF;IAEvH,SAAS,CAAC,QAAQ,CAAC,YAAY,OAAgB;IAC/C,SAAS,CAAC,QAAQ,CAAC,YAAY,QAAgB;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAChE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IA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