@ng-prism/core 22.5.0 → 22.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/dist/app/canvas/canvas-bg.styles.d.ts +1 -1
- package/dist/app/canvas/canvas-bg.styles.d.ts.map +1 -1
- package/dist/app/canvas/canvas-bg.styles.js +1 -1
- package/dist/app/canvas/canvas-overlay-tokens.d.ts +12 -0
- package/dist/app/canvas/canvas-overlay-tokens.d.ts.map +1 -0
- package/dist/app/canvas/canvas-overlay-tokens.js +52 -0
- package/dist/app/canvas/prism-canvas-bg-pill.component.js +2 -2
- package/dist/app/canvas/prism-canvas-pin-row.component.js +2 -2
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts +2 -0
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-rulers.component.js +17 -12
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +25 -3
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +154 -89
- package/dist/app/canvas/prism-template-popover.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-template-popover.component.js +16 -7
- package/dist/app/canvas/state-chips.d.ts +50 -0
- package/dist/app/canvas/state-chips.d.ts.map +1 -0
- package/dist/app/canvas/state-chips.js +40 -0
- package/dist/app/component-head/head-metrics.d.ts +35 -19
- package/dist/app/component-head/head-metrics.d.ts.map +1 -1
- package/dist/app/component-head/head-metrics.js +57 -27
- package/dist/app/component-head/pipe-facts.d.ts +9 -0
- package/dist/app/component-head/pipe-facts.d.ts.map +1 -0
- package/dist/app/component-head/pipe-facts.js +15 -0
- package/dist/app/component-head/prism-component-head.component.d.ts +20 -22
- package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-component-head.component.js +85 -96
- package/dist/app/component-head/prism-head-gauge.component.d.ts +8 -12
- package/dist/app/component-head/prism-head-gauge.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-head-gauge.component.js +51 -67
- package/dist/app/component-head/prism-head-info.component.d.ts +14 -2
- package/dist/app/component-head/prism-head-info.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-head-info.component.js +84 -20
- package/dist/app/component-head/prism-stat.component.d.ts +4 -5
- package/dist/app/component-head/prism-stat.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-stat.component.js +16 -12
- package/dist/app/component-head/service-facts.d.ts +8 -0
- package/dist/app/component-head/service-facts.d.ts.map +1 -0
- package/dist/app/component-head/service-facts.js +11 -0
- package/dist/app/controls/boolean-control.component.js +2 -2
- package/dist/app/controls/json-control.component.js +2 -2
- package/dist/app/controls/union-control.component.js +4 -3
- package/dist/app/directives/resize-value.d.ts +1 -1
- package/dist/app/directives/resize-value.js +1 -1
- 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 +15 -3
- package/dist/app/header/header-brand.d.ts +25 -0
- package/dist/app/header/header-brand.d.ts.map +1 -0
- package/dist/app/header/header-brand.js +10 -0
- package/dist/app/header/prism-header.component.d.ts +2 -2
- package/dist/app/header/prism-header.component.d.ts.map +1 -1
- package/dist/app/header/prism-header.component.js +73 -57
- package/dist/app/icons/icon-registry.d.ts.map +1 -1
- package/dist/app/icons/icon-registry.js +4 -1
- package/dist/app/index.d.ts +12 -0
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +12 -1
- package/dist/app/layout-menu/prism-layout-menu.component.d.ts +3 -0
- package/dist/app/layout-menu/prism-layout-menu.component.d.ts.map +1 -1
- package/dist/app/layout-menu/prism-layout-menu.component.js +72 -58
- package/dist/app/overview/open-in-playground.d.ts +19 -0
- package/dist/app/overview/open-in-playground.d.ts.map +1 -0
- package/dist/app/overview/open-in-playground.js +25 -0
- package/dist/app/overview/overview-matrix.d.ts +85 -0
- package/dist/app/overview/overview-matrix.d.ts.map +1 -0
- package/dist/app/overview/overview-matrix.js +98 -0
- package/dist/app/overview/overview-visibility.d.ts +10 -2
- package/dist/app/overview/overview-visibility.d.ts.map +1 -1
- package/dist/app/overview/overview-visibility.js +14 -3
- package/dist/app/overview/prism-overview-cell.component.d.ts +27 -2
- package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview-cell.component.js +145 -28
- package/dist/app/overview/prism-overview-matrix.component.d.ts +29 -0
- package/dist/app/overview/prism-overview-matrix.component.d.ts.map +1 -0
- package/dist/app/overview/prism-overview-matrix.component.js +155 -0
- package/dist/app/overview/prism-overview.component.d.ts +4 -0
- package/dist/app/overview/prism-overview.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview.component.js +37 -14
- package/dist/app/page-renderer/prism-page-renderer.component.js +2 -2
- package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-core.plugin.js +0 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.d.ts +1 -4
- package/dist/app/panels/a11y/a11y-header-badge.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.js +8 -19
- package/dist/app/panels/a11y/a11y-keyboard-overlay.component.js +2 -2
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts +1 -0
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-overlay-host.component.js +4 -3
- package/dist/app/panels/a11y/a11y-panel.component.d.ts +4 -1
- package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.js +32 -54
- package/dist/app/panels/a11y/a11y-score.component.d.ts +8 -3
- package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.js +19 -35
- package/dist/app/panels/a11y/a11y-sr-overlay.component.js +2 -2
- package/dist/app/panels/a11y/a11y-sr.component.js +2 -2
- package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-summary.js +8 -1
- package/dist/app/panels/a11y/a11y-tree.component.js +2 -2
- package/dist/app/panels/a11y/a11y-violations.component.d.ts +23 -2
- package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-violations.component.js +104 -89
- package/dist/app/panels/a11y/severity.d.ts +9 -0
- package/dist/app/panels/a11y/severity.d.ts.map +1 -0
- package/dist/app/panels/a11y/severity.js +12 -0
- package/dist/app/panels/controls/controls-plugin.d.ts.map +1 -1
- package/dist/app/panels/controls/controls-plugin.js +1 -2
- package/dist/app/panels/controls/non-editable-input-types.d.ts +9 -1
- package/dist/app/panels/controls/non-editable-input-types.d.ts.map +1 -1
- package/dist/app/panels/controls/non-editable-input-types.js +18 -0
- package/dist/app/panels/controls/prism-controls-panel.component.d.ts +2 -1
- package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
- package/dist/app/panels/controls/prism-controls-panel.component.js +77 -59
- package/dist/app/panels/events/events-plugin.d.ts.map +1 -1
- package/dist/app/panels/events/events-plugin.js +1 -2
- package/dist/app/panels/events/prism-events-panel.component.d.ts +2 -0
- package/dist/app/panels/events/prism-events-panel.component.d.ts.map +1 -1
- package/dist/app/panels/events/prism-events-panel.component.js +20 -7
- package/dist/app/panels/events/prism-json-node.utils.d.ts +6 -0
- package/dist/app/panels/events/prism-json-node.utils.d.ts.map +1 -1
- package/dist/app/panels/events/prism-json-node.utils.js +8 -0
- package/dist/app/panels/panel-host/addon-panels.d.ts +11 -0
- package/dist/app/panels/panel-host/addon-panels.d.ts.map +1 -0
- package/dist/app/panels/panel-host/addon-panels.js +12 -0
- package/dist/app/panels/panel-host/panel-badge.d.ts +22 -0
- package/dist/app/panels/panel-host/panel-badge.d.ts.map +1 -1
- package/dist/app/panels/panel-host/panel-badge.js +56 -11
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +4 -1
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts.map +1 -1
- package/dist/app/panels/panel-host/prism-panel-host.component.js +36 -70
- package/dist/app/pseudo/pseudo-state-marker.d.ts +32 -10
- package/dist/app/pseudo/pseudo-state-marker.d.ts.map +1 -1
- package/dist/app/pseudo/pseudo-state-marker.js +83 -67
- package/dist/app/pseudo/pseudo-targets.d.ts +11 -0
- package/dist/app/pseudo/pseudo-targets.d.ts.map +1 -0
- package/dist/app/pseudo/pseudo-targets.js +46 -0
- package/dist/app/pseudo/state-fit.d.ts +28 -0
- package/dist/app/pseudo/state-fit.d.ts.map +1 -0
- package/dist/app/pseudo/state-fit.js +97 -0
- package/dist/app/renderer/composition.d.ts +20 -0
- package/dist/app/renderer/composition.d.ts.map +1 -0
- package/dist/app/renderer/composition.js +26 -0
- package/dist/app/renderer/input-bindings.d.ts +28 -0
- package/dist/app/renderer/input-bindings.d.ts.map +1 -0
- package/dist/app/renderer/input-bindings.js +42 -0
- package/dist/app/renderer/known-inputs.d.ts +8 -1
- package/dist/app/renderer/known-inputs.d.ts.map +1 -1
- package/dist/app/renderer/known-inputs.js +13 -5
- package/dist/app/renderer/prism-renderer.component.d.ts +18 -4
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +78 -44
- package/dist/app/renderer/projectable-content.d.ts +8 -1
- package/dist/app/renderer/projectable-content.d.ts.map +1 -1
- package/dist/app/renderer/projectable-content.js +40 -29
- package/dist/app/renderer/rendered-key.d.ts +20 -6
- package/dist/app/renderer/rendered-key.d.ts.map +1 -1
- package/dist/app/renderer/rendered-key.js +25 -8
- package/dist/app/renderer/snippet-generator.d.ts +14 -2
- package/dist/app/renderer/snippet-generator.d.ts.map +1 -1
- package/dist/app/renderer/snippet-generator.js +138 -81
- package/dist/app/services/navigation-item.d.ts +10 -0
- package/dist/app/services/navigation-item.d.ts.map +1 -0
- package/dist/app/services/navigation-item.js +20 -0
- package/dist/app/services/navigation-item.types.d.ts +8 -0
- package/dist/app/services/navigation-item.types.d.ts.map +1 -1
- package/dist/app/services/prism-layout.service.d.ts +12 -0
- package/dist/app/services/prism-layout.service.d.ts.map +1 -1
- package/dist/app/services/prism-layout.service.js +17 -7
- package/dist/app/services/prism-manifest.service.d.ts +4 -0
- package/dist/app/services/prism-manifest.service.d.ts.map +1 -1
- package/dist/app/services/prism-manifest.service.js +4 -0
- package/dist/app/services/prism-navigation.service.d.ts +12 -0
- package/dist/app/services/prism-navigation.service.d.ts.map +1 -1
- package/dist/app/services/prism-navigation.service.js +85 -19
- package/dist/app/services/prism-panel.service.d.ts +7 -3
- package/dist/app/services/prism-panel.service.d.ts.map +1 -1
- package/dist/app/services/prism-panel.service.js +13 -4
- package/dist/app/services/prism-pseudo-state.service.d.ts +59 -14
- package/dist/app/services/prism-pseudo-state.service.d.ts.map +1 -1
- package/dist/app/services/prism-pseudo-state.service.js +86 -29
- package/dist/app/services/prism-renderer.service.d.ts +23 -0
- package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
- package/dist/app/services/prism-renderer.service.js +77 -8
- package/dist/app/services/prism-search.service.d.ts +4 -0
- package/dist/app/services/prism-search.service.d.ts.map +1 -1
- package/dist/app/services/prism-search.service.js +29 -6
- package/dist/app/services/prism-theme.service.d.ts +11 -3
- package/dist/app/services/prism-theme.service.d.ts.map +1 -1
- package/dist/app/services/prism-theme.service.js +27 -19
- package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
- package/dist/app/services/prism-url-state.service.js +81 -12
- package/dist/app/shared/badge.types.d.ts +7 -0
- package/dist/app/shared/badge.types.d.ts.map +1 -0
- package/dist/app/shared/badge.types.js +9 -0
- package/dist/app/shared/brand-mark.d.ts +35 -0
- package/dist/app/shared/brand-mark.d.ts.map +1 -0
- package/dist/app/shared/brand-mark.js +52 -0
- package/dist/app/shared/metric-bar.d.ts +6 -0
- package/dist/app/shared/metric-bar.d.ts.map +1 -0
- package/dist/app/shared/metric-bar.js +7 -0
- package/dist/app/shared/prism-badge.component.d.ts +21 -0
- package/dist/app/shared/prism-badge.component.d.ts.map +1 -0
- package/dist/app/shared/prism-badge.component.js +68 -0
- package/dist/app/shared/prism-button.component.d.ts +12 -0
- package/dist/app/shared/prism-button.component.d.ts.map +1 -0
- package/dist/app/shared/prism-button.component.js +28 -0
- package/dist/app/shared/prism-icon-button.component.d.ts +17 -0
- package/dist/app/shared/prism-icon-button.component.d.ts.map +1 -0
- package/dist/app/shared/prism-icon-button.component.js +37 -0
- package/dist/app/shared/prism-list-row.component.d.ts +17 -0
- package/dist/app/shared/prism-list-row.component.d.ts.map +1 -0
- package/dist/app/shared/prism-list-row.component.js +57 -0
- package/dist/app/shared/prism-logo.component.d.ts +24 -0
- package/dist/app/shared/prism-logo.component.d.ts.map +1 -0
- package/dist/app/shared/prism-logo.component.js +77 -0
- package/dist/app/shared/prism-metric-badge.component.d.ts +9 -4
- package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -1
- package/dist/app/shared/prism-metric-badge.component.js +33 -12
- package/dist/app/shared/prism-metric-card.component.d.ts +30 -0
- package/dist/app/shared/prism-metric-card.component.d.ts.map +1 -0
- package/dist/app/shared/prism-metric-card.component.js +111 -0
- package/dist/app/shared/prism-panel-toolbar.component.d.ts +13 -0
- package/dist/app/shared/prism-panel-toolbar.component.d.ts.map +1 -0
- package/dist/app/shared/prism-panel-toolbar.component.js +28 -0
- package/dist/app/shared/prism-segmented.component.d.ts +25 -0
- package/dist/app/shared/prism-segmented.component.d.ts.map +1 -0
- package/dist/app/shared/prism-segmented.component.js +77 -0
- package/dist/app/shared/prism-tabs.component.d.ts +44 -0
- package/dist/app/shared/prism-tabs.component.d.ts.map +1 -0
- package/dist/app/shared/prism-tabs.component.js +134 -0
- package/dist/app/shared/roving-focus.d.ts +13 -0
- package/dist/app/shared/roving-focus.d.ts.map +1 -0
- package/dist/app/shared/roving-focus.js +34 -0
- package/dist/app/shell/prism-shell.component.d.ts +13 -0
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +57 -28
- package/dist/app/shell/should-select-first.d.ts +17 -0
- package/dist/app/shell/should-select-first.d.ts.map +1 -0
- package/dist/app/shell/should-select-first.js +13 -0
- package/dist/app/sidebar/navigation-decorations.d.ts +23 -1
- package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -1
- package/dist/app/sidebar/navigation-decorations.js +33 -2
- package/dist/app/sidebar/prism-sidebar.component.d.ts +5 -15
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +89 -77
- package/dist/app/theme/deprecated-tokens.d.ts +15 -0
- package/dist/app/theme/deprecated-tokens.d.ts.map +1 -0
- package/dist/app/theme/deprecated-tokens.js +22 -0
- package/dist/app/theme/favicon.d.ts +3 -0
- package/dist/app/theme/favicon.d.ts.map +1 -0
- package/dist/app/theme/favicon.js +3 -0
- package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
- package/dist/app/theme/prism-default-theme.js +122 -66
- package/dist/app/theme/resolve-theme-tokens.d.ts +29 -0
- package/dist/app/theme/resolve-theme-tokens.d.ts.map +1 -0
- package/dist/app/theme/resolve-theme-tokens.js +43 -0
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts +4 -7
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -1
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +31 -69
- package/dist/app/view-tab-bar/next-view-id.d.ts +7 -1
- package/dist/app/view-tab-bar/next-view-id.d.ts.map +1 -1
- package/dist/app/view-tab-bar/next-view-id.js +9 -1
- package/dist/app/view-tab-bar/panel-inputs.d.ts +28 -0
- package/dist/app/view-tab-bar/panel-inputs.d.ts.map +1 -0
- package/dist/app/view-tab-bar/panel-inputs.js +41 -0
- package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts +2 -3
- package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts.map +1 -1
- package/dist/app/view-tab-bar/prism-view-panel-host.component.js +9 -9
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts +6 -0
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts.map +1 -1
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.js +22 -29
- package/dist/builder/config-loader/deprecated-options.d.ts +9 -0
- package/dist/builder/config-loader/deprecated-options.d.ts.map +1 -0
- package/dist/builder/config-loader/deprecated-options.js +34 -0
- package/dist/builder/manifest/composition-wrapper.generator.d.ts +14 -0
- package/dist/builder/manifest/composition-wrapper.generator.d.ts.map +1 -0
- package/dist/builder/manifest/composition-wrapper.generator.js +66 -0
- package/dist/builder/manifest/host-parser.d.ts +2 -0
- package/dist/builder/manifest/host-parser.d.ts.map +1 -1
- package/dist/builder/manifest/host-parser.js +9 -4
- package/dist/builder/manifest/manifest-imports.d.ts +34 -0
- package/dist/builder/manifest/manifest-imports.d.ts.map +1 -0
- package/dist/builder/manifest/manifest-imports.js +91 -0
- package/dist/builder/manifest/runtime-manifest.generator.d.ts +13 -0
- package/dist/builder/manifest/runtime-manifest.generator.d.ts.map +1 -1
- package/dist/builder/manifest/runtime-manifest.generator.js +137 -65
- package/dist/builder/manifest/selector-element.d.ts +16 -0
- package/dist/builder/manifest/selector-element.d.ts.map +1 -0
- package/dist/builder/manifest/selector-element.js +46 -0
- package/dist/builder/manifest/template-literal.d.ts +3 -0
- package/dist/builder/manifest/template-literal.d.ts.map +1 -0
- package/dist/builder/manifest/template-literal.js +4 -0
- package/dist/builder/plugin-runner/plugin-runner.d.ts.map +1 -1
- package/dist/builder/plugin-runner/plugin-runner.js +29 -26
- package/dist/builder/scanner/api/angular-decorators.d.ts +84 -0
- package/dist/builder/scanner/api/angular-decorators.d.ts.map +1 -0
- package/dist/builder/scanner/api/angular-decorators.js +157 -0
- package/dist/builder/scanner/api/component-api.extractor.d.ts +13 -0
- package/dist/builder/scanner/api/component-api.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/api/component-api.extractor.js +104 -0
- package/dist/builder/scanner/api/doc-tags.d.ts +13 -0
- package/dist/builder/scanner/api/doc-tags.d.ts.map +1 -0
- package/dist/builder/scanner/api/doc-tags.js +101 -0
- package/dist/builder/scanner/api/export-index.d.ts +18 -0
- package/dist/builder/scanner/api/export-index.d.ts.map +1 -0
- package/dist/builder/scanner/api/export-index.js +22 -0
- package/dist/builder/scanner/api/member.extractor.d.ts +90 -0
- package/dist/builder/scanner/api/member.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/api/member.extractor.js +270 -0
- package/dist/builder/scanner/api/pipe-api.extractor.d.ts +12 -0
- package/dist/builder/scanner/api/pipe-api.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/api/pipe-api.extractor.js +52 -0
- package/dist/builder/scanner/api/service-api.extractor.d.ts +14 -0
- package/dist/builder/scanner/api/service-api.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/api/service-api.extractor.js +119 -0
- package/dist/builder/scanner/api/setup.reader.d.ts +26 -0
- package/dist/builder/scanner/api/setup.reader.d.ts.map +1 -0
- package/dist/builder/scanner/api/setup.reader.js +89 -0
- package/dist/builder/scanner/api/type-collector.d.ts +24 -0
- package/dist/builder/scanner/api/type-collector.d.ts.map +1 -0
- package/dist/builder/scanner/api/type-collector.js +211 -0
- package/dist/builder/scanner/ast-utils.d.ts +8 -0
- package/dist/builder/scanner/ast-utils.d.ts.map +1 -1
- package/dist/builder/scanner/ast-utils.js +37 -1
- package/dist/builder/scanner/class-hierarchy.d.ts +5 -3
- package/dist/builder/scanner/class-hierarchy.d.ts.map +1 -1
- package/dist/builder/scanner/class-hierarchy.js +12 -6
- package/dist/builder/scanner/component.scanner.d.ts +60 -6
- package/dist/builder/scanner/component.scanner.d.ts.map +1 -1
- package/dist/builder/scanner/component.scanner.js +229 -58
- package/dist/builder/scanner/composition/compose-template.d.ts +36 -0
- package/dist/builder/scanner/composition/compose-template.d.ts.map +1 -0
- package/dist/builder/scanner/composition/compose-template.js +187 -0
- package/dist/builder/scanner/composition/declarables.d.ts +54 -0
- package/dist/builder/scanner/composition/declarables.d.ts.map +1 -0
- package/dist/builder/scanner/composition/declarables.js +182 -0
- package/dist/builder/scanner/composition/match-declarables.d.ts +43 -0
- package/dist/builder/scanner/composition/match-declarables.d.ts.map +1 -0
- package/dist/builder/scanner/composition/match-declarables.js +131 -0
- package/dist/builder/scanner/composition/read-composition.d.ts +77 -0
- package/dist/builder/scanner/composition/read-composition.d.ts.map +1 -0
- package/dist/builder/scanner/composition/read-composition.js +302 -0
- package/dist/builder/scanner/composition/template-elements.d.ts +12 -0
- package/dist/builder/scanner/composition/template-elements.d.ts.map +1 -0
- package/dist/builder/scanner/composition/template-elements.js +41 -0
- package/dist/builder/scanner/entry-point-discovery.d.ts +5 -0
- package/dist/builder/scanner/entry-point-discovery.d.ts.map +1 -1
- package/dist/builder/scanner/entry-point-discovery.js +14 -0
- package/dist/builder/scanner/entry-point.scanner.d.ts +3 -1
- package/dist/builder/scanner/entry-point.scanner.d.ts.map +1 -1
- package/dist/builder/scanner/entry-point.scanner.js +7 -6
- package/dist/builder/scanner/index.d.ts +4 -0
- package/dist/builder/scanner/index.d.ts.map +1 -1
- package/dist/builder/scanner/index.js +2 -0
- package/dist/builder/scanner/input.extractor.d.ts +31 -2
- package/dist/builder/scanner/input.extractor.d.ts.map +1 -1
- package/dist/builder/scanner/input.extractor.js +73 -17
- package/dist/builder/scanner/pipe.scanner.d.ts +29 -0
- package/dist/builder/scanner/pipe.scanner.d.ts.map +1 -0
- package/dist/builder/scanner/pipe.scanner.js +65 -0
- package/dist/builder/scanner/pseudo-states.d.ts +1 -0
- package/dist/builder/scanner/pseudo-states.d.ts.map +1 -1
- package/dist/builder/scanner/pseudo-states.js +1 -1
- package/dist/builder/scanner/scanner.d.ts +27 -3
- package/dist/builder/scanner/scanner.d.ts.map +1 -1
- package/dist/builder/scanner/scanner.js +68 -24
- package/dist/builder/scanner/service/angular-decorators.d.ts +80 -0
- package/dist/builder/scanner/service/angular-decorators.d.ts.map +1 -0
- package/dist/builder/scanner/service/angular-decorators.js +154 -0
- package/dist/builder/scanner/service/doc-tags.d.ts +13 -0
- package/dist/builder/scanner/service/doc-tags.d.ts.map +1 -0
- package/dist/builder/scanner/service/doc-tags.js +97 -0
- package/dist/builder/scanner/service/export-index.d.ts +18 -0
- package/dist/builder/scanner/service/export-index.d.ts.map +1 -0
- package/dist/builder/scanner/service/export-index.js +22 -0
- package/dist/builder/scanner/service/member.extractor.d.ts +65 -0
- package/dist/builder/scanner/service/member.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/service/member.extractor.js +216 -0
- package/dist/builder/scanner/service/pipe-api.extractor.d.ts +12 -0
- package/dist/builder/scanner/service/pipe-api.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/service/pipe-api.extractor.js +72 -0
- package/dist/builder/scanner/service/service-api.extractor.d.ts +14 -0
- package/dist/builder/scanner/service/service-api.extractor.d.ts.map +1 -0
- package/dist/builder/scanner/service/service-api.extractor.js +119 -0
- package/dist/builder/scanner/service/setup.reader.d.ts +26 -0
- package/dist/builder/scanner/service/setup.reader.d.ts.map +1 -0
- package/dist/builder/scanner/service/setup.reader.js +89 -0
- package/dist/builder/scanner/service/type-collector.d.ts +23 -0
- package/dist/builder/scanner/service/type-collector.d.ts.map +1 -0
- package/dist/builder/scanner/service/type-collector.js +210 -0
- package/dist/builder/scanner/service.scanner.d.ts +26 -0
- package/dist/builder/scanner/service.scanner.d.ts.map +1 -0
- package/dist/builder/scanner/service.scanner.js +61 -0
- package/dist/builder/scanner/showcase-diagnostics.d.ts +60 -1
- package/dist/builder/scanner/showcase-diagnostics.d.ts.map +1 -1
- package/dist/builder/scanner/showcase-diagnostics.js +123 -10
- package/dist/builder/scanner/showcase-states.d.ts +17 -0
- package/dist/builder/scanner/showcase-states.d.ts.map +1 -0
- package/dist/builder/scanner/showcase-states.js +58 -0
- package/dist/builder/scanner/source-file-cache.d.ts +26 -0
- package/dist/builder/scanner/source-file-cache.d.ts.map +1 -0
- package/dist/builder/scanner/source-file-cache.js +60 -0
- package/dist/builder/shared/prism-pipeline.d.ts +6 -0
- package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
- package/dist/builder/shared/prism-pipeline.js +71 -18
- package/dist/decorator/index.d.ts +1 -1
- package/dist/decorator/index.d.ts.map +1 -1
- package/dist/decorator/showcase.types.d.ts +102 -9
- package/dist/decorator/showcase.types.d.ts.map +1 -1
- package/dist/plugin/index.d.ts +6 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +4 -0
- package/dist/plugin/pipe.types.d.ts +36 -0
- package/dist/plugin/pipe.types.d.ts.map +1 -0
- package/dist/plugin/pipe.types.js +1 -0
- package/dist/plugin/plugin.types.d.ts +184 -8
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/dist/plugin/service.types.d.ts +124 -0
- package/dist/plugin/service.types.d.ts.map +1 -0
- package/dist/plugin/service.types.js +1 -0
- package/dist/plugin/status.d.ts +27 -0
- package/dist/plugin/status.d.ts.map +1 -0
- package/dist/plugin/status.js +26 -0
- package/dist/shared/composition.d.ts +30 -0
- package/dist/shared/composition.d.ts.map +1 -0
- package/dist/shared/composition.js +29 -0
- package/dist/shared/pseudo-state.type.d.ts +2 -1
- package/dist/shared/pseudo-state.type.d.ts.map +1 -1
- package/dist/shared/void-elements.d.ts +3 -0
- package/dist/shared/void-elements.d.ts.map +1 -0
- package/dist/shared/void-elements.js +2 -0
- package/package.json +1 -1
- package/src/builder/build/schema.json +6 -6
- package/src/builder/serve/schema.json +6 -6
package/dist/app/index.js
CHANGED
|
@@ -29,7 +29,9 @@ export { enablePrismHmr } from './hmr.js';
|
|
|
29
29
|
//
|
|
30
30
|
// They still reach Node: `@ng-prism/plugin-coverage` and
|
|
31
31
|
// `@ng-prism/plugin-visual-regression` re-export their header badges statically
|
|
32
|
-
// from their Node entry, and those import `PrismMetricBadgeComponent` from here
|
|
32
|
+
// from their Node entry, and those import `PrismMetricBadgeComponent` from here;
|
|
33
|
+
// since 22.7 `@ng-prism/plugin-perf` does the same with its panel, which is
|
|
34
|
+
// built from the UI primitives below.
|
|
33
35
|
// Loading a plugin config in `builder/config-loader` therefore pulls this whole
|
|
34
36
|
// file, shell included, into Node. That only works because the config loader
|
|
35
37
|
// imports `@angular/compiler` first.
|
|
@@ -41,3 +43,12 @@ export { enablePrismHmr } from './hmr.js';
|
|
|
41
43
|
// public API decision.
|
|
42
44
|
export { PrismMetricBadgeComponent } from './shared/prism-metric-badge.component.js';
|
|
43
45
|
export { PrismIconComponent } from './icons/prism-icon.component.js';
|
|
46
|
+
export { PrismBadgeComponent } from './shared/prism-badge.component.js';
|
|
47
|
+
export { toneForStatus } from './shared/badge.types.js';
|
|
48
|
+
export { PrismTabsComponent } from './shared/prism-tabs.component.js';
|
|
49
|
+
export { PrismSegmentedComponent } from './shared/prism-segmented.component.js';
|
|
50
|
+
export { PrismPanelToolbarComponent } from './shared/prism-panel-toolbar.component.js';
|
|
51
|
+
export { PrismListRowComponent } from './shared/prism-list-row.component.js';
|
|
52
|
+
export { PrismIconButtonComponent } from './shared/prism-icon-button.component.js';
|
|
53
|
+
export { PrismButtonComponent } from './shared/prism-button.component.js';
|
|
54
|
+
export { PrismMetricCardComponent } from './shared/prism-metric-card.component.js';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PrismLayoutService } from '../services/prism-layout.service.js';
|
|
2
|
+
import { PrismThemeService } from '../services/prism-theme.service.js';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class PrismLayoutMenuComponent {
|
|
4
5
|
protected readonly layout: PrismLayoutService;
|
|
6
|
+
/** The dropdown opens out of the navy header band but belongs to the app, so it takes the active theme back. */
|
|
7
|
+
protected readonly theme: PrismThemeService;
|
|
5
8
|
protected readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
6
9
|
protected toggle(target: 'sidebar' | 'toolbar' | 'addons' | 'orientation'): void;
|
|
7
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismLayoutMenuComponent, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-layout-menu.component.d.ts","sourceRoot":"","sources":["../../../src/app/layout-menu/prism-layout-menu.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prism-layout-menu.component.d.ts","sourceRoot":"","sources":["../../../src/app/layout-menu/prism-layout-menu.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;;AAGvE,qBAOa,wBAAwB;IACjC,SAAS,CAAC,QAAQ,CAAC,MAAM,qBAA8B;IACvD,gHAAgH;IAChH,SAAS,CAAC,QAAQ,CAAC,KAAK,oBAA6B;IACrD,SAAS,CAAC,QAAQ,CAAC,IAAI,kDAAiB;IAExC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,IAAI;yCANvE,wBAAwB;2CAAxB,wBAAwB;CAuBpC"}
|
|
@@ -1,73 +1,86 @@
|
|
|
1
1
|
import { Component, inject, signal } from '@angular/core';
|
|
2
|
+
import { PrismIconComponent } from '../icons/prism-icon.component.js';
|
|
2
3
|
import { PrismLayoutService } from '../services/prism-layout.service.js';
|
|
4
|
+
import { PrismThemeService } from '../services/prism-theme.service.js';
|
|
5
|
+
import { PrismIconButtonComponent } from '../shared/prism-icon-button.component.js';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
|
-
function
|
|
7
|
+
function PrismLayoutMenuComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
5
8
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
6
|
-
i0.ɵɵ
|
|
7
|
-
i0.ɵɵ
|
|
8
|
-
i0.ɵɵ
|
|
9
|
-
i0.ɵɵ
|
|
10
|
-
i0.ɵɵ
|
|
11
|
-
i0.ɵɵ
|
|
9
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
10
|
+
i0.ɵɵlistener("click", function PrismLayoutMenuComponent_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.open.set(false)); });
|
|
11
|
+
i0.ɵɵelementEnd();
|
|
12
|
+
i0.ɵɵelementStart(1, "div", 4)(2, "button", 5);
|
|
13
|
+
i0.ɵɵlistener("click", function PrismLayoutMenuComponent_Conditional_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggle("sidebar")); });
|
|
14
|
+
i0.ɵɵelementStart(3, "span", 6);
|
|
12
15
|
i0.ɵɵnamespaceSVG();
|
|
13
|
-
i0.ɵɵ
|
|
14
|
-
i0.ɵɵ
|
|
15
|
-
i0.ɵɵ
|
|
16
|
+
i0.ɵɵelementStart(4, "svg", 7);
|
|
17
|
+
i0.ɵɵelement(5, "path", 8);
|
|
18
|
+
i0.ɵɵelementEnd()();
|
|
16
19
|
i0.ɵɵnamespaceHTML();
|
|
17
|
-
i0.ɵɵ
|
|
20
|
+
i0.ɵɵelementStart(6, "span", 9);
|
|
18
21
|
i0.ɵɵtext(7, "Show sidebar");
|
|
19
|
-
i0.ɵɵ
|
|
20
|
-
i0.ɵɵ
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
i0.ɵɵelementStart(8, "span", 10)(9, "kbd");
|
|
21
24
|
i0.ɵɵtext(10, "\u2325");
|
|
22
|
-
i0.ɵɵ
|
|
23
|
-
i0.ɵɵ
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
i0.ɵɵelementStart(11, "kbd");
|
|
24
27
|
i0.ɵɵtext(12, "S");
|
|
25
|
-
i0.ɵɵ
|
|
26
|
-
i0.ɵɵ
|
|
27
|
-
i0.ɵɵ
|
|
28
|
-
i0.ɵɵ
|
|
28
|
+
i0.ɵɵelementEnd()()();
|
|
29
|
+
i0.ɵɵelementStart(13, "button", 5);
|
|
30
|
+
i0.ɵɵlistener("click", function PrismLayoutMenuComponent_Conditional_3_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggle("toolbar")); });
|
|
31
|
+
i0.ɵɵelementStart(14, "span", 6);
|
|
29
32
|
i0.ɵɵnamespaceSVG();
|
|
30
|
-
i0.ɵɵ
|
|
31
|
-
i0.ɵɵ
|
|
32
|
-
i0.ɵɵ
|
|
33
|
+
i0.ɵɵelementStart(15, "svg", 7);
|
|
34
|
+
i0.ɵɵelement(16, "path", 8);
|
|
35
|
+
i0.ɵɵelementEnd()();
|
|
33
36
|
i0.ɵɵnamespaceHTML();
|
|
34
|
-
i0.ɵɵ
|
|
37
|
+
i0.ɵɵelementStart(17, "span", 9);
|
|
35
38
|
i0.ɵɵtext(18, "Show variant rail");
|
|
36
|
-
i0.ɵɵ
|
|
37
|
-
i0.ɵɵ
|
|
39
|
+
i0.ɵɵelementEnd();
|
|
40
|
+
i0.ɵɵelementStart(19, "span", 10)(20, "kbd");
|
|
38
41
|
i0.ɵɵtext(21, "\u2325");
|
|
39
|
-
i0.ɵɵ
|
|
40
|
-
i0.ɵɵ
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵelementStart(22, "kbd");
|
|
41
44
|
i0.ɵɵtext(23, "T");
|
|
42
|
-
i0.ɵɵ
|
|
43
|
-
i0.ɵɵ
|
|
44
|
-
i0.ɵɵ
|
|
45
|
-
i0.ɵɵ
|
|
45
|
+
i0.ɵɵelementEnd()()();
|
|
46
|
+
i0.ɵɵelementStart(24, "button", 5);
|
|
47
|
+
i0.ɵɵlistener("click", function PrismLayoutMenuComponent_Conditional_3_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggle("addons")); });
|
|
48
|
+
i0.ɵɵelementStart(25, "span", 6);
|
|
46
49
|
i0.ɵɵnamespaceSVG();
|
|
47
|
-
i0.ɵɵ
|
|
48
|
-
i0.ɵɵ
|
|
49
|
-
i0.ɵɵ
|
|
50
|
+
i0.ɵɵelementStart(26, "svg", 7);
|
|
51
|
+
i0.ɵɵelement(27, "path", 8);
|
|
52
|
+
i0.ɵɵelementEnd()();
|
|
50
53
|
i0.ɵɵnamespaceHTML();
|
|
51
|
-
i0.ɵɵ
|
|
54
|
+
i0.ɵɵelementStart(28, "span", 9);
|
|
52
55
|
i0.ɵɵtext(29, "Show addons panel");
|
|
53
|
-
i0.ɵɵ
|
|
54
|
-
i0.ɵɵ
|
|
56
|
+
i0.ɵɵelementEnd();
|
|
57
|
+
i0.ɵɵelementStart(30, "span", 10)(31, "kbd");
|
|
55
58
|
i0.ɵɵtext(32, "\u2325");
|
|
56
|
-
i0.ɵɵ
|
|
57
|
-
i0.ɵɵ
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
i0.ɵɵelementStart(33, "kbd");
|
|
58
61
|
i0.ɵɵtext(34, "A");
|
|
59
|
-
i0.ɵɵ
|
|
62
|
+
i0.ɵɵelementEnd()()()();
|
|
60
63
|
} if (rf & 2) {
|
|
61
64
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
62
|
-
i0.ɵɵadvance(
|
|
65
|
+
i0.ɵɵadvance();
|
|
66
|
+
i0.ɵɵstyleMap(ctx_r1.theme.appTokens());
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵattribute("aria-checked", ctx_r1.layout.sidebarVisible());
|
|
69
|
+
i0.ɵɵadvance();
|
|
63
70
|
i0.ɵɵclassProp("layout-menu__check--on", ctx_r1.layout.sidebarVisible());
|
|
64
|
-
i0.ɵɵadvance(
|
|
71
|
+
i0.ɵɵadvance(10);
|
|
72
|
+
i0.ɵɵattribute("aria-checked", ctx_r1.layout.toolbarVisible());
|
|
73
|
+
i0.ɵɵadvance();
|
|
65
74
|
i0.ɵɵclassProp("layout-menu__check--on", ctx_r1.layout.toolbarVisible());
|
|
66
|
-
i0.ɵɵadvance(
|
|
75
|
+
i0.ɵɵadvance(10);
|
|
76
|
+
i0.ɵɵattribute("aria-checked", ctx_r1.layout.addonsVisible());
|
|
77
|
+
i0.ɵɵadvance();
|
|
67
78
|
i0.ɵɵclassProp("layout-menu__check--on", ctx_r1.layout.addonsVisible());
|
|
68
79
|
} }
|
|
69
80
|
export class PrismLayoutMenuComponent {
|
|
70
81
|
layout = inject(PrismLayoutService);
|
|
82
|
+
/** The dropdown opens out of the navy header band but belongs to the app, so it takes the active theme back. */
|
|
83
|
+
theme = inject(PrismThemeService);
|
|
71
84
|
open = signal(false, /* @ts-ignore */
|
|
72
85
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
73
86
|
toggle(target) {
|
|
@@ -88,24 +101,25 @@ export class PrismLayoutMenuComponent {
|
|
|
88
101
|
}
|
|
89
102
|
}
|
|
90
103
|
static ɵfac = function PrismLayoutMenuComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismLayoutMenuComponent)(); };
|
|
91
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismLayoutMenuComponent, selectors: [["prism-layout-menu"]], decls:
|
|
92
|
-
i0.ɵɵ
|
|
93
|
-
i0.ɵɵ
|
|
94
|
-
i0.ɵɵ
|
|
95
|
-
i0.ɵɵ
|
|
96
|
-
i0.ɵɵ
|
|
97
|
-
i0.ɵɵ
|
|
98
|
-
i0.ɵɵconditionalCreate(6, PrismLayoutMenuComponent_Conditional_6_Template, 35, 6);
|
|
99
|
-
i0.ɵɵdomElementEnd();
|
|
104
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismLayoutMenuComponent, selectors: [["prism-layout-menu"]], decls: 4, vars: 4, consts: [[1, "layout-menu"], ["prismIconButton", "", "size", "md", "aria-label", "Layout options", "aria-haspopup", "menu", "title", "Layout options", 3, "click", "pressed"], ["name", "more-vertical", 3, "size"], [1, "layout-menu__backdrop", 3, "click"], ["role", "menu", "aria-label", "Layout", 1, "layout-menu__dropdown"], ["role", "menuitemcheckbox", 1, "layout-menu__item", 3, "click"], [1, "layout-menu__check"], ["width", "12", "height", "12", "viewBox", "0 0 12 12", "fill", "none"], ["d", "M2 6l3 3 5-5", "stroke", "currentColor", "stroke-width", "1.5", "stroke-linecap", "round", "stroke-linejoin", "round"], [1, "layout-menu__label"], [1, "layout-menu__kbd"]], template: function PrismLayoutMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
106
|
+
i0.ɵɵlistener("click", function PrismLayoutMenuComponent_Template_button_click_1_listener() { return ctx.open.set(!ctx.open()); });
|
|
107
|
+
i0.ɵɵelement(2, "prism-icon", 2);
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
i0.ɵɵconditionalCreate(3, PrismLayoutMenuComponent_Conditional_3_Template, 35, 11);
|
|
110
|
+
i0.ɵɵelementEnd();
|
|
100
111
|
} if (rf & 2) {
|
|
101
112
|
i0.ɵɵadvance();
|
|
102
|
-
i0.ɵɵ
|
|
103
|
-
i0.ɵɵ
|
|
104
|
-
i0.ɵɵ
|
|
105
|
-
|
|
113
|
+
i0.ɵɵproperty("pressed", ctx.open() ? true : null);
|
|
114
|
+
i0.ɵɵattribute("aria-expanded", ctx.open());
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵproperty("size", 16);
|
|
117
|
+
i0.ɵɵadvance();
|
|
118
|
+
i0.ɵɵconditional(ctx.open() ? 3 : -1);
|
|
119
|
+
} }, dependencies: [PrismIconButtonComponent, PrismIconComponent], styles: [".layout-menu[_ngcontent-%COMP%] {\n position: relative;\n}\n\n.layout-menu__backdrop[_ngcontent-%COMP%] {\n position: fixed;\n inset: 0;\n z-index: 40;\n}\n\n.layout-menu__dropdown[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n z-index: 50;\n min-width: 240px;\n padding: 4px;\n background: var(--%NS%prism-bg-elevated);\n border: 1px solid var(--%NS%prism-border);\n border-radius: var(--%NS%radius-md);\n box-shadow: var(--%NS%prism-shadow-md);\n}\n\n.layout-menu__item[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 7px 10px;\n font-family: var(--%NS%prism-font-sans);\n font-size: 13px;\n color: var(--%NS%prism-text);\n text-align: left;\n cursor: pointer;\n background: none;\n border: none;\n border-radius: var(--%NS%radius-sm);\n transition: background 0.1s;\n}\n\n.layout-menu__item[_ngcontent-%COMP%]:hover {\n background: var(--%NS%prism-bg-surface);\n}\n\n.layout-menu__check[_ngcontent-%COMP%] {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: transparent;\n border: 1px solid var(--%NS%prism-border-strong);\n border-radius: 3px;\n}\n\n.layout-menu__check--on[_ngcontent-%COMP%] {\n color: var(--%NS%prism-on-primary);\n background: var(--%NS%prism-primary-fill);\n border-color: var(--%NS%prism-primary-fill);\n}\n\n.layout-menu__icon[_ngcontent-%COMP%] {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--%NS%prism-text-muted);\n}\n\n.layout-menu__label[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.layout-menu__kbd[_ngcontent-%COMP%] {\n display: flex;\n gap: 2px;\n opacity: 0.6;\n}\n\nkbd[_ngcontent-%COMP%] {\n padding: 1px 4px;\n font-family: var(--%NS%prism-font-sans);\n font-size: 11px;\n color: var(--%NS%prism-text-muted);\n background: var(--%NS%prism-bg-surface);\n border: 1px solid var(--%NS%prism-border);\n border-radius: 3px;\n}\n\n.layout-menu__divider[_ngcontent-%COMP%] {\n height: 1px;\n margin: 4px 0;\n background: var(--%NS%prism-border);\n}"] });
|
|
106
120
|
}
|
|
107
121
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismLayoutMenuComponent, [{
|
|
108
122
|
type: Component,
|
|
109
|
-
args: [{ selector: 'prism-layout-menu', standalone: true, template: "<div class=\"layout-menu\">\n <button\n
|
|
123
|
+
args: [{ selector: 'prism-layout-menu', standalone: true, imports: [PrismIconButtonComponent, PrismIconComponent], template: "<div class=\"layout-menu\">\n <button\n prismIconButton\n size=\"md\"\n aria-label=\"Layout options\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n [pressed]=\"open() ? true : null\"\n (click)=\"open.set(!open())\"\n title=\"Layout options\">\n <prism-icon\n name=\"more-vertical\"\n [size]=\"16\" />\n </button>\n @if (open()) {\n <div\n class=\"layout-menu__backdrop\"\n (click)=\"open.set(false)\"></div>\n <div\n class=\"layout-menu__dropdown\"\n role=\"menu\"\n aria-label=\"Layout\"\n [style]=\"theme.appTokens()\">\n <button\n class=\"layout-menu__item\"\n role=\"menuitemcheckbox\"\n [attr.aria-checked]=\"layout.sidebarVisible()\"\n (click)=\"toggle('sidebar')\">\n <span\n class=\"layout-menu__check\"\n [class.layout-menu__check--on]=\"layout.sidebarVisible()\">\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\">\n <path\n d=\"M2 6l3 3 5-5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </span>\n <span class=\"layout-menu__label\">Show sidebar</span>\n <span class=\"layout-menu__kbd\"><kbd>\u2325</kbd><kbd>S</kbd></span>\n </button>\n <button\n class=\"layout-menu__item\"\n role=\"menuitemcheckbox\"\n [attr.aria-checked]=\"layout.toolbarVisible()\"\n (click)=\"toggle('toolbar')\">\n <span\n class=\"layout-menu__check\"\n [class.layout-menu__check--on]=\"layout.toolbarVisible()\">\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\">\n <path\n d=\"M2 6l3 3 5-5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </span>\n <span class=\"layout-menu__label\">Show variant rail</span>\n <span class=\"layout-menu__kbd\"><kbd>\u2325</kbd><kbd>T</kbd></span>\n </button>\n <button\n class=\"layout-menu__item\"\n role=\"menuitemcheckbox\"\n [attr.aria-checked]=\"layout.addonsVisible()\"\n (click)=\"toggle('addons')\">\n <span\n class=\"layout-menu__check\"\n [class.layout-menu__check--on]=\"layout.addonsVisible()\">\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\">\n <path\n d=\"M2 6l3 3 5-5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </span>\n <span class=\"layout-menu__label\">Show addons panel</span>\n <span class=\"layout-menu__kbd\"><kbd>\u2325</kbd><kbd>A</kbd></span>\n </button>\n </div>\n }\n</div>\n", styles: [".layout-menu {\n position: relative;\n}\n\n.layout-menu__backdrop {\n position: fixed;\n inset: 0;\n z-index: 40;\n}\n\n.layout-menu__dropdown {\n position: absolute;\n top: calc(100% + 6px);\n right: 0;\n z-index: 50;\n min-width: 240px;\n padding: 4px;\n background: var(--prism-bg-elevated);\n border: 1px solid var(--prism-border);\n border-radius: var(--radius-md);\n box-shadow: var(--prism-shadow-md);\n}\n\n.layout-menu__item {\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 7px 10px;\n font-family: var(--prism-font-sans);\n font-size: 13px;\n color: var(--prism-text);\n text-align: left;\n cursor: pointer;\n background: none;\n border: none;\n border-radius: var(--radius-sm);\n transition: background 0.1s;\n}\n\n.layout-menu__item:hover {\n background: var(--prism-bg-surface);\n}\n\n.layout-menu__check {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: transparent;\n border: 1px solid var(--prism-border-strong);\n border-radius: 3px;\n}\n\n.layout-menu__check--on {\n color: var(--prism-on-primary);\n background: var(--prism-primary-fill);\n border-color: var(--prism-primary-fill);\n}\n\n.layout-menu__icon {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--prism-text-muted);\n}\n\n.layout-menu__label {\n flex: 1;\n}\n\n.layout-menu__kbd {\n display: flex;\n gap: 2px;\n opacity: 0.6;\n}\n\nkbd {\n padding: 1px 4px;\n font-family: var(--prism-font-sans);\n font-size: 11px;\n color: var(--prism-text-muted);\n background: var(--prism-bg-surface);\n border: 1px solid var(--prism-border);\n border-radius: 3px;\n}\n\n.layout-menu__divider {\n height: 1px;\n margin: 4px 0;\n background: var(--prism-border);\n}\n"] }]
|
|
110
124
|
}], null, null); })();
|
|
111
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismLayoutMenuComponent, { className: "PrismLayoutMenuComponent", filePath: "app/layout-menu/prism-layout-menu.component.ts", lineNumber:
|
|
125
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismLayoutMenuComponent, { className: "PrismLayoutMenuComponent", filePath: "app/layout-menu/prism-layout-menu.component.ts", lineNumber: 14 }); })();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PrismPanelService } from '../services/prism-panel.service.js';
|
|
2
|
+
import type { PrismRendererService } from '../services/prism-renderer.service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Shows one Overview cell's exact combination in the Playground: the variant,
|
|
5
|
+
* the component state (`null` for none), and the Playground view itself.
|
|
6
|
+
*
|
|
7
|
+
* The view switches last, so the Playground never paints the variant it showed
|
|
8
|
+
* before for a frame.
|
|
9
|
+
*/
|
|
10
|
+
export declare function openInPlayground(renderer: Pick<PrismRendererService, 'selectVariant' | 'selectState'>, panels: Pick<PrismPanelService, 'activeViewId'>, variantIndex: number, stateIndex: number | null): void;
|
|
11
|
+
/**
|
|
12
|
+
* Whether a cell shows what the Playground shows: the same variant under the
|
|
13
|
+
* same component state. A variant that opted out with `states: false` shows
|
|
14
|
+
* no state in either place, so only the variant counts for it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPlaygroundCombination(renderer: Pick<PrismRendererService, 'activeVariantIndex' | 'activeStateIndex'>, variantIndex: number, stateIndex: number | null, statesOptedOut?: boolean): boolean;
|
|
17
|
+
/** A cell's accessible name, with the reason when its state does not apply: the cell itself shows only a dash then. */
|
|
18
|
+
export declare function playgroundLabel(variant: string, state: string | undefined, unfitReason: string | null): string;
|
|
19
|
+
//# sourceMappingURL=open-in-playground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-playground.d.ts","sourceRoot":"","sources":["../../../src/app/overview/open-in-playground.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAElF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EAAE,eAAe,GAAG,aAAa,CAAC,EACrE,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC/C,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GAAG,IAAI,GAC1B,IAAI,CAIN;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACnC,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,kBAAkB,CAAC,EAC/E,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,cAAc,UAAQ,GACvB,OAAO,CAET;AAED,uHAAuH;AACvH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAI9G"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shows one Overview cell's exact combination in the Playground: the variant,
|
|
3
|
+
* the component state (`null` for none), and the Playground view itself.
|
|
4
|
+
*
|
|
5
|
+
* The view switches last, so the Playground never paints the variant it showed
|
|
6
|
+
* before for a frame.
|
|
7
|
+
*/
|
|
8
|
+
export function openInPlayground(renderer, panels, variantIndex, stateIndex) {
|
|
9
|
+
renderer.selectVariant(variantIndex);
|
|
10
|
+
renderer.selectState(stateIndex);
|
|
11
|
+
panels.activeViewId.set('renderer');
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Whether a cell shows what the Playground shows: the same variant under the
|
|
15
|
+
* same component state. A variant that opted out with `states: false` shows
|
|
16
|
+
* no state in either place, so only the variant counts for it.
|
|
17
|
+
*/
|
|
18
|
+
export function isPlaygroundCombination(renderer, variantIndex, stateIndex, statesOptedOut = false) {
|
|
19
|
+
return renderer.activeVariantIndex() === variantIndex && (statesOptedOut || renderer.activeStateIndex() === stateIndex);
|
|
20
|
+
}
|
|
21
|
+
/** A cell's accessible name, with the reason when its state does not apply: the cell itself shows only a dash then. */
|
|
22
|
+
export function playgroundLabel(variant, state, unfitReason) {
|
|
23
|
+
const label = `Open ${variant}${state ? ` × ${state}` : ''} in the Playground`;
|
|
24
|
+
return unfitReason === null ? label : `${label} (not applicable: ${unfitReason})`;
|
|
25
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ShowcaseConfig } from '../../decorator/showcase.types.js';
|
|
2
|
+
import { type ForcedPseudoStates } from '../../shared/pseudo-state.type.js';
|
|
3
|
+
import { type StateFit } from '../pseudo/state-fit.js';
|
|
4
|
+
/** `state` is the position in `ShowcaseConfig.states`, `null` for the Default column. */
|
|
5
|
+
export interface MatrixColumn {
|
|
6
|
+
state: number | null;
|
|
7
|
+
title: string;
|
|
8
|
+
signature: string;
|
|
9
|
+
/** Whether the column's state forces anything. `false` for Default and for a slot the scanner could not use. */
|
|
10
|
+
forcesState: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** `variant` is the position in `ShowcaseConfig.variants`; the implicit Default row of a variant-less component is 0. */
|
|
13
|
+
export interface MatrixRow {
|
|
14
|
+
variant: number;
|
|
15
|
+
title: string;
|
|
16
|
+
/** `bg: dark` or `states: false`: the row header's tooltip. */
|
|
17
|
+
note: string | null;
|
|
18
|
+
optedOut: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface OverviewMatrix {
|
|
21
|
+
columns: MatrixColumn[];
|
|
22
|
+
rows: MatrixRow[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Overview as a matrix: a row per variant, a column for Default and one
|
|
26
|
+
* per component state.
|
|
27
|
+
*
|
|
28
|
+
* A component without variants still renders, as a variant of its own, so it
|
|
29
|
+
* gets one implicit `Default` row, like the canvas. A variant that opts out
|
|
30
|
+
* with `states: false` keeps its row but takes part in no state column.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildOverviewMatrix(config: ShowcaseConfig): OverviewMatrix;
|
|
33
|
+
/**
|
|
34
|
+
* What a state forces, in a line: `hover + active → .btn`.
|
|
35
|
+
*
|
|
36
|
+
* The pseudo-classes come in {@link PSEUDO_STATES} order, grouped by the target
|
|
37
|
+
* they share. Classes with different targets make one group each, joined with
|
|
38
|
+
* `; ` (`hover → .pill; focus-visible → .pill__close`). A slot that names no
|
|
39
|
+
* target forces nothing, as the marker sees it.
|
|
40
|
+
*/
|
|
41
|
+
export declare function pseudoSignature(pseudo: ForcedPseudoStates): string;
|
|
42
|
+
/** A column's fit count: short in the header, spelled out in its tooltip. */
|
|
43
|
+
export interface FitLabel {
|
|
44
|
+
text: string;
|
|
45
|
+
title: string;
|
|
46
|
+
}
|
|
47
|
+
/** `2/5`: the variants a state fits, of those it is combined with. */
|
|
48
|
+
export declare function fitLabel(fits: number, total: number): FitLabel;
|
|
49
|
+
/** Key of one cell's result in the map the matrix collects from the cells. */
|
|
50
|
+
export declare function fitKey(variant: number, state: number): string;
|
|
51
|
+
export interface ColumnFit {
|
|
52
|
+
/** Cells of the column whose state fits. */
|
|
53
|
+
fits: number;
|
|
54
|
+
/** Cells the column has: the rows that did not opt out. */
|
|
55
|
+
eligible: number;
|
|
56
|
+
/** Whether every one of those cells has answered. */
|
|
57
|
+
complete: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** The fits of one state column, as far as the cells have answered. */
|
|
60
|
+
export declare function columnFit(results: ReadonlyMap<string, StateFit>, matrix: OverviewMatrix, state: number): ColumnFit;
|
|
61
|
+
/**
|
|
62
|
+
* The states whose column is complete and fits nowhere, by index: almost
|
|
63
|
+
* certainly a selector with a typo.
|
|
64
|
+
*
|
|
65
|
+
* A column that is still waiting for a cell, or whose cell failed to render and
|
|
66
|
+
* so never answers, is not complete: a state is only called misplaced once every
|
|
67
|
+
* cell has had its say. A state no variant is combined with has no cell to
|
|
68
|
+
* judge it, so it is not reported either. Nor is a state that forces nothing (a
|
|
69
|
+
* slot the scanner could not use): it fits nowhere by construction, has no
|
|
70
|
+
* selector to check, and the scanner has reported it already.
|
|
71
|
+
*
|
|
72
|
+
* Stateless: the caller keeps track of what it already reported.
|
|
73
|
+
*/
|
|
74
|
+
export declare function statesFittingNowhere(results: ReadonlyMap<string, StateFit>, matrix: OverviewMatrix): number[];
|
|
75
|
+
/** One column header of the matrix. */
|
|
76
|
+
export interface ColumnHeader {
|
|
77
|
+
column: MatrixColumn;
|
|
78
|
+
/** `x/y` and its tooltip, `null` for the Default column. */
|
|
79
|
+
fit: FitLabel | null;
|
|
80
|
+
/** The state is one of {@link statesFittingNowhere}. */
|
|
81
|
+
fitsNowhere: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** The column headers with their fit counts, and whether a state fits no variant, as far as the cells have answered. */
|
|
84
|
+
export declare function columnHeaders(results: ReadonlyMap<string, StateFit>, matrix: OverviewMatrix): ColumnHeader[];
|
|
85
|
+
//# sourceMappingURL=overview-matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview-matrix.d.ts","sourceRoot":"","sources":["../../../src/app/overview/overview-matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,KAAK,kBAAkB,EAAmC,MAAM,mCAAmC,CAAC;AAE7G,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvE,yFAAyF;AACzF,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gHAAgH;IAChH,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,yHAAyH;AACzH,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAsB1E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAelE;AAED,6EAA6E;AAC7E,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAE9D;AAED,8EAA8E;AAC9E,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,MAAM,WAAW,SAAS;IACtB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAKlH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CAQ7G;AAED,uCAAuC;AACvC,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,4DAA4D;IAC5D,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrB,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,wHAAwH;AACxH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,cAAc,GAAG,YAAY,EAAE,CAU5G"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { PSEUDO_STATES } from '../../shared/pseudo-state.type.js';
|
|
2
|
+
import { forcesAnyState, hasTarget } from '../pseudo/pseudo-targets.js';
|
|
3
|
+
import { describeTarget } from '../pseudo/state-fit.js';
|
|
4
|
+
/**
|
|
5
|
+
* The Overview as a matrix: a row per variant, a column for Default and one
|
|
6
|
+
* per component state.
|
|
7
|
+
*
|
|
8
|
+
* A component without variants still renders, as a variant of its own, so it
|
|
9
|
+
* gets one implicit `Default` row, like the canvas. A variant that opts out
|
|
10
|
+
* with `states: false` keeps its row but takes part in no state column.
|
|
11
|
+
*/
|
|
12
|
+
export function buildOverviewMatrix(config) {
|
|
13
|
+
const columns = [
|
|
14
|
+
{ state: null, title: 'Default', signature: 'no state', forcesState: false },
|
|
15
|
+
...(config.states ?? []).map((state, index) => ({
|
|
16
|
+
state: index,
|
|
17
|
+
title: state.name,
|
|
18
|
+
signature: pseudoSignature(state.pseudo),
|
|
19
|
+
forcesState: forcesAnyState(state.pseudo)
|
|
20
|
+
}))
|
|
21
|
+
];
|
|
22
|
+
const variants = config.variants ?? [];
|
|
23
|
+
const rows = variants.length === 0
|
|
24
|
+
? [{ variant: 0, title: 'Default', note: null, optedOut: false }]
|
|
25
|
+
: variants.map((variant, index) => ({
|
|
26
|
+
variant: index,
|
|
27
|
+
title: variant.name,
|
|
28
|
+
note: variant.states === false ? 'states: false' : variant.bg ? `bg: ${variant.bg}` : null,
|
|
29
|
+
optedOut: variant.states === false
|
|
30
|
+
}));
|
|
31
|
+
return { columns, rows };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What a state forces, in a line: `hover + active → .btn`.
|
|
35
|
+
*
|
|
36
|
+
* The pseudo-classes come in {@link PSEUDO_STATES} order, grouped by the target
|
|
37
|
+
* they share. Classes with different targets make one group each, joined with
|
|
38
|
+
* `; ` (`hover → .pill; focus-visible → .pill__close`). A slot that names no
|
|
39
|
+
* target forces nothing, as the marker sees it.
|
|
40
|
+
*/
|
|
41
|
+
export function pseudoSignature(pseudo) {
|
|
42
|
+
const groups = new Map();
|
|
43
|
+
for (const state of PSEUDO_STATES) {
|
|
44
|
+
const target = pseudo[state];
|
|
45
|
+
if (target === undefined || !hasTarget(target))
|
|
46
|
+
continue;
|
|
47
|
+
const label = describeTarget(target);
|
|
48
|
+
groups.set(label, [...(groups.get(label) ?? []), state]);
|
|
49
|
+
}
|
|
50
|
+
if (groups.size === 0)
|
|
51
|
+
return 'forces no state';
|
|
52
|
+
return Array.from(groups, ([label, states]) => `${states.join(' + ')} → ${label}`).join('; ');
|
|
53
|
+
}
|
|
54
|
+
/** `2/5`: the variants a state fits, of those it is combined with. */
|
|
55
|
+
export function fitLabel(fits, total) {
|
|
56
|
+
return { text: `${fits}/${total}`, title: `State applies to ${fits} of ${total} ${total === 1 ? 'variant' : 'variants'}` };
|
|
57
|
+
}
|
|
58
|
+
/** Key of one cell's result in the map the matrix collects from the cells. */
|
|
59
|
+
export function fitKey(variant, state) {
|
|
60
|
+
return `${variant}:${state}`;
|
|
61
|
+
}
|
|
62
|
+
/** The fits of one state column, as far as the cells have answered. */
|
|
63
|
+
export function columnFit(results, matrix, state) {
|
|
64
|
+
const rows = matrix.rows.filter((row) => !row.optedOut);
|
|
65
|
+
const answers = rows.map((row) => results.get(fitKey(row.variant, state))).filter((answer) => answer !== undefined);
|
|
66
|
+
return { fits: answers.filter((answer) => answer.fits).length, eligible: rows.length, complete: answers.length === rows.length };
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The states whose column is complete and fits nowhere, by index: almost
|
|
70
|
+
* certainly a selector with a typo.
|
|
71
|
+
*
|
|
72
|
+
* A column that is still waiting for a cell, or whose cell failed to render and
|
|
73
|
+
* so never answers, is not complete: a state is only called misplaced once every
|
|
74
|
+
* cell has had its say. A state no variant is combined with has no cell to
|
|
75
|
+
* judge it, so it is not reported either. Nor is a state that forces nothing (a
|
|
76
|
+
* slot the scanner could not use): it fits nowhere by construction, has no
|
|
77
|
+
* selector to check, and the scanner has reported it already.
|
|
78
|
+
*
|
|
79
|
+
* Stateless: the caller keeps track of what it already reported.
|
|
80
|
+
*/
|
|
81
|
+
export function statesFittingNowhere(results, matrix) {
|
|
82
|
+
return matrix.columns.flatMap((column) => {
|
|
83
|
+
if (column.state === null || !column.forcesState)
|
|
84
|
+
return [];
|
|
85
|
+
const { fits, eligible, complete } = columnFit(results, matrix, column.state);
|
|
86
|
+
return eligible > 0 && complete && fits === 0 ? [column.state] : [];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** The column headers with their fit counts, and whether a state fits no variant, as far as the cells have answered. */
|
|
90
|
+
export function columnHeaders(results, matrix) {
|
|
91
|
+
const nowhere = new Set(statesFittingNowhere(results, matrix));
|
|
92
|
+
return matrix.columns.map((column) => {
|
|
93
|
+
if (column.state === null)
|
|
94
|
+
return { column, fit: null, fitsNowhere: false };
|
|
95
|
+
const { fits, eligible } = columnFit(results, matrix, column.state);
|
|
96
|
+
return { column, fit: fitLabel(fits, eligible), fitsNowhere: nowhere.has(column.state) };
|
|
97
|
+
});
|
|
98
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import type { ShowcaseConfig } from '../../decorator/showcase.types.js';
|
|
1
2
|
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* How many cells the Overview would hold for this config: the matrix's rows
|
|
5
|
+
* times its columns, where a variant that opted out with `states: false` has
|
|
6
|
+
* one cell instead of a row of them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function overviewCellCount(config: ShowcaseConfig): number;
|
|
2
9
|
/**
|
|
3
10
|
* Whether the Overview tab is offered for this component.
|
|
4
11
|
*
|
|
@@ -8,8 +15,9 @@ import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
|
8
15
|
* `PrismRendererService`. n cells side by side would all show the same state,
|
|
9
16
|
* so an Overview there would be demonstrably wrong, not merely unhelpful.
|
|
10
17
|
*
|
|
11
|
-
* A single
|
|
12
|
-
*
|
|
18
|
+
* A single cell needs no contact sheet: the Playground says the same thing
|
|
19
|
+
* better. A state counts as a cell, so one variant with one state already
|
|
20
|
+
* earns the Overview.
|
|
13
21
|
*/
|
|
14
22
|
export declare function showsOverview(component: RuntimeComponent): boolean;
|
|
15
23
|
//# sourceMappingURL=overview-visibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-visibility.d.ts","sourceRoot":"","sources":["../../../src/app/overview/overview-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"overview-visibility.d.ts","sourceRoot":"","sources":["../../../src/app/overview/overview-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAIhE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAKlE"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { buildOverviewMatrix } from './overview-matrix.js';
|
|
2
|
+
/**
|
|
3
|
+
* How many cells the Overview would hold for this config: the matrix's rows
|
|
4
|
+
* times its columns, where a variant that opted out with `states: false` has
|
|
5
|
+
* one cell instead of a row of them.
|
|
6
|
+
*/
|
|
7
|
+
export function overviewCellCount(config) {
|
|
8
|
+
const { columns, rows } = buildOverviewMatrix(config);
|
|
9
|
+
return rows.reduce((cells, row) => cells + (row.optedOut ? 1 : columns.length), 0);
|
|
10
|
+
}
|
|
1
11
|
/**
|
|
2
12
|
* Whether the Overview tab is offered for this component.
|
|
3
13
|
*
|
|
@@ -7,12 +17,13 @@
|
|
|
7
17
|
* `PrismRendererService`. n cells side by side would all show the same state,
|
|
8
18
|
* so an Overview there would be demonstrably wrong, not merely unhelpful.
|
|
9
19
|
*
|
|
10
|
-
* A single
|
|
11
|
-
*
|
|
20
|
+
* A single cell needs no contact sheet: the Playground says the same thing
|
|
21
|
+
* better. A state counts as a cell, so one variant with one state already
|
|
22
|
+
* earns the Overview.
|
|
12
23
|
*/
|
|
13
24
|
export function showsOverview(component) {
|
|
14
25
|
const config = component.meta.showcaseConfig;
|
|
15
26
|
if (config.renderPage)
|
|
16
27
|
return false;
|
|
17
|
-
return (config
|
|
28
|
+
return overviewCellCount(config) >= 2;
|
|
18
29
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RuntimeComponent } from '../../plugin/plugin.types.js';
|
|
2
|
+
import type { StateFit } from '../pseudo/state-fit.js';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* One frame of the contact sheet: a stage painting the variant's declared
|
|
@@ -15,21 +16,45 @@ import * as i0 from "@angular/core";
|
|
|
15
16
|
* cell's own, so a hovered cell never hovers its neighbour. The tools menu's
|
|
16
17
|
* state toggle does not reach here: like every other control, it belongs to
|
|
17
18
|
* the Playground.
|
|
19
|
+
*
|
|
20
|
+
* A cell can combine its variant with one of the component's `states` (the
|
|
21
|
+
* matrix does). When the marker finds that the state does not fit the rendered
|
|
22
|
+
* component, or the variant opted out with `states: false`, the cell shows the
|
|
23
|
+
* a dash in place of the component, with the reason as its tooltip and in its
|
|
24
|
+
* label. Every cell, with or without a state, opens its exact combination in
|
|
25
|
+
* the Playground on click, Enter or Space, and the one the Playground shows is
|
|
26
|
+
* outlined.
|
|
18
27
|
*/
|
|
19
28
|
export declare class PrismOverviewCellComponent {
|
|
20
29
|
readonly component: import("@angular/core").InputSignal<RuntimeComponent>;
|
|
21
30
|
readonly index: import("@angular/core").InputSignal<number>;
|
|
31
|
+
/** Position of the component state in `ShowcaseConfig.states`, `null` for the variant alone. */
|
|
32
|
+
readonly state: import("@angular/core").InputSignal<number | null>;
|
|
33
|
+
/** `matrix` leaves the caption and the grid span to the matrix around the cell. */
|
|
34
|
+
readonly mode: import("@angular/core").InputSignal<"sheet" | "matrix">;
|
|
35
|
+
/** Whether the state fits the rendered variant. Only emitted while `state` is not `null`. */
|
|
36
|
+
readonly fitChange: import("@angular/core").OutputEmitterRef<StateFit>;
|
|
22
37
|
private readonly injector;
|
|
23
38
|
private readonly destroyRef;
|
|
39
|
+
private readonly renderer;
|
|
40
|
+
private readonly panels;
|
|
24
41
|
private readonly pseudoMarker;
|
|
25
42
|
private readonly outlet;
|
|
26
43
|
/** Never null: `resolveVariantBg` falls back to `DEFAULT_VARIANT_BG`. */
|
|
27
44
|
protected readonly bg: import("@angular/core").Signal<import("../services/prism-canvas.service.js").CanvasBg>;
|
|
28
45
|
protected readonly caption: import("@angular/core").Signal<string>;
|
|
29
|
-
|
|
46
|
+
/** Why the state is not shown on this cell, `null` while the component is. */
|
|
47
|
+
protected readonly unfitReason: import("@angular/core").WritableSignal<string | null>;
|
|
48
|
+
protected readonly label: import("@angular/core").Signal<string>;
|
|
49
|
+
/** The combination the Playground shows right now. */
|
|
50
|
+
protected readonly current: import("@angular/core").Signal<boolean>;
|
|
51
|
+
protected readonly stretches: import("@angular/core").Signal<boolean>;
|
|
30
52
|
constructor();
|
|
53
|
+
protected open(): void;
|
|
54
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
31
55
|
private mount;
|
|
56
|
+
private unfit;
|
|
32
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismOverviewCellComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PrismOverviewCellComponent, "prism-overview-cell", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismOverviewCellComponent, "prism-overview-cell", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "fitChange": "fitChange"; }, never, never, true, never>;
|
|
34
59
|
}
|
|
35
60
|
//# sourceMappingURL=prism-overview-cell.component.d.ts.map
|