@ng-prism/core 22.6.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 +11 -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 +3 -2
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +89 -97
- 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/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 +19 -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 +80 -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 +13 -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 +57 -16
- 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/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 +8 -0
- package/dist/app/overview/open-in-playground.d.ts.map +1 -1
- package/dist/app/overview/open-in-playground.js +13 -0
- package/dist/app/overview/overview-matrix.d.ts +10 -4
- package/dist/app/overview/overview-matrix.d.ts.map +1 -1
- package/dist/app/overview/overview-matrix.js +3 -3
- package/dist/app/overview/prism-overview-cell.component.d.ts +6 -2
- package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview-cell.component.js +35 -24
- package/dist/app/overview/prism-overview-matrix.component.js +46 -55
- package/dist/app/page-renderer/prism-page-renderer.component.js +2 -2
- 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/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/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/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 +13 -1
- package/dist/app/renderer/input-bindings.d.ts.map +1 -1
- package/dist/app/renderer/input-bindings.js +22 -1
- package/dist/app/renderer/prism-renderer.component.d.ts +8 -1
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +40 -28
- 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 +137 -82
- 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-renderer.service.d.ts +6 -0
- package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
- package/dist/app/services/prism-renderer.service.js +40 -6
- 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 +42 -4
- 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 +116 -61
- 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 +4 -2
- package/dist/builder/config-loader/deprecated-options.d.ts.map +1 -1
- package/dist/builder/config-loader/deprecated-options.js +13 -2
- 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 +135 -64
- 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 +209 -57
- 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/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 +52 -15
- 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/scanner.d.ts +25 -1
- package/dist/builder/scanner/scanner.d.ts.map +1 -1
- package/dist/builder/scanner/scanner.js +60 -26
- 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 +114 -1
- 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 +43 -5
- package/dist/decorator/index.d.ts +1 -1
- package/dist/decorator/index.d.ts.map +1 -1
- package/dist/decorator/showcase.types.d.ts +79 -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 +140 -3
- 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
|
@@ -2,6 +2,7 @@ import { NgComponentOutlet } from '@angular/common';
|
|
|
2
2
|
import { Component, computed, createEnvironmentInjector, effect, EnvironmentInjector, inject, signal } from '@angular/core';
|
|
3
3
|
import { PrismNavigationService } from '../services/prism-navigation.service.js';
|
|
4
4
|
import { PrismPanelService } from '../services/prism-panel.service.js';
|
|
5
|
+
import { activeViewPanel, panelInputsFor } from './panel-inputs.js';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
function PrismViewPanelHostComponent_Conditional_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
7
8
|
i0.ɵɵelementContainer(0);
|
|
@@ -19,15 +20,14 @@ export class PrismViewPanelHostComponent {
|
|
|
19
20
|
allViewPanels = this.panelService.viewPanels;
|
|
20
21
|
resolvedComponent = signal(null, /* @ts-ignore */
|
|
21
22
|
...(ngDevMode ? [{ debugName: "resolvedComponent" }] : /* istanbul ignore next */ []));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
activePanel = computed(() => activeViewPanel(this.allViewPanels(), this.panelService.activeViewId(), this.nav.activeTarget() ?? 'component'), /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "activePanel" }] : /* istanbul ignore next */ []));
|
|
25
|
+
panelInputs = computed(() => panelInputsFor(this.activePanel(), this.nav.activeComponent(), this.nav.activeService(), this.nav.activePipe()), /* @ts-ignore */
|
|
25
26
|
...(ngDevMode ? [{ debugName: "panelInputs" }] : /* istanbul ignore next */ []));
|
|
26
27
|
lazyCache = new Map();
|
|
27
28
|
injectorCache = new Map();
|
|
28
29
|
activeInjector = computed(() => {
|
|
29
|
-
const
|
|
30
|
-
const panel = this.allViewPanels().find((p) => p.id === panelId);
|
|
30
|
+
const panel = this.activePanel();
|
|
31
31
|
if (!panel?.providers?.length)
|
|
32
32
|
return this.envInjector;
|
|
33
33
|
if (!this.injectorCache.has(panel.id)) {
|
|
@@ -38,7 +38,7 @@ export class PrismViewPanelHostComponent {
|
|
|
38
38
|
...(ngDevMode ? [{ debugName: "activeInjector" }] : /* istanbul ignore next */ []));
|
|
39
39
|
constructor() {
|
|
40
40
|
effect(() => {
|
|
41
|
-
const panel = this.
|
|
41
|
+
const panel = this.activePanel();
|
|
42
42
|
if (!panel) {
|
|
43
43
|
this.resolvedComponent.set(null);
|
|
44
44
|
return;
|
|
@@ -72,10 +72,10 @@ export class PrismViewPanelHostComponent {
|
|
|
72
72
|
} if (rf & 2) {
|
|
73
73
|
i0.ɵɵadvance();
|
|
74
74
|
i0.ɵɵconditional(ctx.resolvedComponent() ? 1 : -1);
|
|
75
|
-
} }, dependencies: [NgComponentOutlet], styles: [".prism-view-panel-host[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n background: var(--%NS%prism-bg-
|
|
75
|
+
} }, dependencies: [NgComponentOutlet], styles: [".prism-view-panel-host[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n background: var(--%NS%prism-bg-surface);\n}"] });
|
|
76
76
|
}
|
|
77
77
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismViewPanelHostComponent, [{
|
|
78
78
|
type: Component,
|
|
79
|
-
args: [{ selector: 'prism-view-panel-host', standalone: true, imports: [NgComponentOutlet], template: "<div class=\"prism-view-panel-host\">\n @if (resolvedComponent()) {\n <ng-container *ngComponentOutlet=\"resolvedComponent(); inputs: panelInputs(); injector: activeInjector()\" />\n }\n</div>\n", styles: [".prism-view-panel-host {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n background: var(--prism-bg-
|
|
79
|
+
args: [{ selector: 'prism-view-panel-host', standalone: true, imports: [NgComponentOutlet], template: "<div class=\"prism-view-panel-host\">\n @if (resolvedComponent()) {\n <ng-container *ngComponentOutlet=\"resolvedComponent(); inputs: panelInputs(); injector: activeInjector()\" />\n }\n</div>\n", styles: [".prism-view-panel-host {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n background: var(--prism-bg-surface);\n}\n"] }]
|
|
80
80
|
}], () => [], null); })();
|
|
81
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismViewPanelHostComponent, { className: "PrismViewPanelHostComponent", filePath: "app/view-tab-bar/prism-view-panel-host.component.ts", lineNumber:
|
|
81
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismViewPanelHostComponent, { className: "PrismViewPanelHostComponent", filePath: "app/view-tab-bar/prism-view-panel-host.component.ts", lineNumber: 14 }); })();
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { PrismNavigationService } from '../services/prism-navigation.service.js';
|
|
1
2
|
import { PrismPanelService } from '../services/prism-panel.service.js';
|
|
3
|
+
import { type PrismSegmentOption } from '../shared/prism-segmented.component.js';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/** The view switch of the component head: Playground and every view panel (Overview, API, …). */
|
|
3
6
|
export declare class PrismViewTabBarComponent {
|
|
4
7
|
protected readonly panelService: PrismPanelService;
|
|
8
|
+
protected readonly navigationService: PrismNavigationService;
|
|
5
9
|
protected readonly viewPanels: import("@angular/core").Signal<import("../../index.js").PanelDefinition[]>;
|
|
10
|
+
protected readonly options: import("@angular/core").Signal<PrismSegmentOption<string>[]>;
|
|
11
|
+
protected select(id: string | null): void;
|
|
6
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismViewTabBarComponent, never>;
|
|
7
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<PrismViewTabBarComponent, "prism-view-tab-bar", never, {}, {}, never, never, true, never>;
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-view-tab-bar.component.d.ts","sourceRoot":"","sources":["../../../src/app/view-tab-bar/prism-view-tab-bar.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;;
|
|
1
|
+
{"version":3,"file":"prism-view-tab-bar.component.d.ts","sourceRoot":"","sources":["../../../src/app/view-tab-bar/prism-view-tab-bar.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;;AAE1G,iGAAiG;AACjG,qBAQa,wBAAwB;IACjC,SAAS,CAAC,QAAQ,CAAC,YAAY,oBAA6B;IAC5D,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IAEtE,SAAS,CAAC,QAAQ,CAAC,UAAU,6EAAuC;IAEpE,SAAS,CAAC,QAAQ,CAAC,OAAO,+DAGvB;IAEH,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;yCAXhC,wBAAwB;2CAAxB,wBAAwB;CAcpC"}
|
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
|
|
2
|
+
import { PrismNavigationService } from '../services/prism-navigation.service.js';
|
|
2
3
|
import { PrismPanelService } from '../services/prism-panel.service.js';
|
|
4
|
+
import { PrismSegmentedComponent } from '../shared/prism-segmented.component.js';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
function PrismViewTabBarComponent_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
7
|
-
i0.ɵɵdomElementStart(0, "button", 1);
|
|
8
|
-
i0.ɵɵdomListener("click", function PrismViewTabBarComponent_For_4_Template_button_click_0_listener() { const panel_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.panelService.activeViewId.set(panel_r2.id)); });
|
|
9
|
-
i0.ɵɵtext(1);
|
|
10
|
-
i0.ɵɵdomElementEnd();
|
|
11
|
-
} if (rf & 2) {
|
|
12
|
-
const panel_r2 = ctx.$implicit;
|
|
13
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
14
|
-
i0.ɵɵclassProp("prism-view-tab-bar__tab--active", ctx_r2.panelService.activeViewId() === panel_r2.id);
|
|
15
|
-
i0.ɵɵadvance();
|
|
16
|
-
i0.ɵɵtextInterpolate1(" ", panel_r2.label, " ");
|
|
17
|
-
} }
|
|
6
|
+
/** The view switch of the component head: Playground and every view panel (Overview, API, …). */
|
|
18
7
|
export class PrismViewTabBarComponent {
|
|
19
8
|
panelService = inject(PrismPanelService);
|
|
9
|
+
navigationService = inject(PrismNavigationService);
|
|
20
10
|
viewPanels = this.panelService.visibleViewPanels;
|
|
11
|
+
options = computed(() => [
|
|
12
|
+
...(this.navigationService.activeTarget() === 'component' ? [{ value: 'renderer', label: 'Playground' }] : []),
|
|
13
|
+
...this.viewPanels().map((panel) => ({ value: panel.id, label: panel.label }))
|
|
14
|
+
], /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
16
|
+
select(id) {
|
|
17
|
+
if (id !== null)
|
|
18
|
+
this.panelService.activeViewId.set(id);
|
|
19
|
+
}
|
|
21
20
|
static ɵfac = function PrismViewTabBarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismViewTabBarComponent)(); };
|
|
22
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismViewTabBarComponent, selectors: [["prism-view-tab-bar"]], decls:
|
|
23
|
-
i0.ɵɵ
|
|
24
|
-
i0.ɵɵ
|
|
25
|
-
i0.ɵɵ
|
|
26
|
-
i0.ɵɵdomElementEnd();
|
|
27
|
-
i0.ɵɵrepeaterCreate(3, PrismViewTabBarComponent_For_4_Template, 2, 3, "button", 2, _forTrack0);
|
|
28
|
-
i0.ɵɵdomElementEnd();
|
|
21
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismViewTabBarComponent, selectors: [["prism-view-tab-bar"]], decls: 1, vars: 2, consts: [["ariaLabel", "View", 3, "valueChange", "options", "value"]], template: function PrismViewTabBarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
i0.ɵɵelementStart(0, "prism-segmented", 0);
|
|
23
|
+
i0.ɵɵlistener("valueChange", function PrismViewTabBarComponent_Template_prism_segmented_valueChange_0_listener($event) { return ctx.select($event); });
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
29
25
|
} if (rf & 2) {
|
|
30
|
-
i0.ɵɵ
|
|
31
|
-
|
|
32
|
-
i0.ɵɵadvance(2);
|
|
33
|
-
i0.ɵɵrepeater(ctx.viewPanels());
|
|
34
|
-
} }, styles: ["[_nghost-%COMP%] {\n display: inline-flex;\n}\n\n.prism-view-tab-bar[_ngcontent-%COMP%] {\n display: inline-flex;\n gap: 2px;\n padding: 2px;\n background: var(--%NS%prism-input-bg);\n border-radius: var(--%NS%radius-sm);\n}\n\n.prism-view-tab-bar__tab[_ngcontent-%COMP%] {\n padding: 2px var(--%NS%sp-4);\n font-family: var(--%NS%prism-font-sans);\n font-size: var(--%NS%fs-md);\n color: var(--%NS%prism-text-muted);\n white-space: nowrap;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: var(--%NS%radius-xs);\n transition: color var(--%NS%dur-fast) var(--%NS%ease-default);\n}\n\n.prism-view-tab-bar__tab[_ngcontent-%COMP%]:hover {\n color: var(--%NS%prism-text-2);\n}\n\n.prism-view-tab-bar__tab[_ngcontent-%COMP%]:focus-visible {\n outline: 2px solid var(--%NS%prism-primary);\n outline-offset: 1px;\n}\n\n.prism-view-tab-bar__tab--active[_ngcontent-%COMP%] {\n font-weight: 500;\n color: var(--%NS%prism-text);\n background: var(--%NS%prism-bg-elevated);\n box-shadow: 0 1px 2px rgb(0 0 0 / 18%);\n}"] });
|
|
26
|
+
i0.ɵɵproperty("options", ctx.options())("value", ctx.panelService.activeViewId());
|
|
27
|
+
} }, dependencies: [PrismSegmentedComponent], styles: ["[_nghost-%COMP%] {\n display: inline-flex;\n}"] });
|
|
35
28
|
}
|
|
36
29
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismViewTabBarComponent, [{
|
|
37
30
|
type: Component,
|
|
38
|
-
args: [{ selector: 'prism-view-tab-bar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
31
|
+
args: [{ selector: 'prism-view-tab-bar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismSegmentedComponent], template: "<prism-segmented\n ariaLabel=\"View\"\n [options]=\"options()\"\n [value]=\"panelService.activeViewId()\"\n (valueChange)=\"select($event)\" />\n", styles: [":host {\n display: inline-flex;\n}\n"] }]
|
|
39
32
|
}], null, null); })();
|
|
40
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismViewTabBarComponent, { className: "PrismViewTabBarComponent", filePath: "app/view-tab-bar/prism-view-tab-bar.component.ts", lineNumber:
|
|
33
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismViewTabBarComponent, { className: "PrismViewTabBarComponent", filePath: "app/view-tab-bar/prism-view-tab-bar.component.ts", lineNumber: 15 }); })();
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { NgPrismConfig } from '../../plugin/plugin.types.js';
|
|
2
2
|
/**
|
|
3
|
-
* One notice per deprecated option the config or one of its plugins sets
|
|
4
|
-
*
|
|
3
|
+
* One notice per deprecated option the config or one of its plugins sets, and
|
|
4
|
+
* per deprecated theme token an override names. The options never had an
|
|
5
|
+
* effect, so their notice only asks to remove them; a token's names what
|
|
6
|
+
* replaces it.
|
|
5
7
|
*/
|
|
6
8
|
export declare function describeDeprecatedOptions(config: NgPrismConfig, configFile: string): string[];
|
|
7
9
|
//# sourceMappingURL=deprecated-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-options.d.ts","sourceRoot":"","sources":["../../../src/builder/config-loader/deprecated-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deprecated-options.d.ts","sourceRoot":"","sources":["../../../src/builder/config-loader/deprecated-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAUlE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAqB7F"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { DEPRECATED_THEME_TOKENS, deprecatedTokenNotice } from '../../app/theme/deprecated-tokens.js';
|
|
1
2
|
/** Config options declared since the first release that nothing has ever read. */
|
|
2
3
|
const DEPRECATED_CONFIG_OPTIONS = ['ui', 'themeStylesheet', 'headless', 'appComponent'];
|
|
3
4
|
const NEVER_HAD_AN_EFFECT = 'which is deprecated and will be removed in 23.0.0. It has never had an effect; remove it.';
|
|
5
|
+
/** The config options that hold theme token overrides. */
|
|
6
|
+
const THEME_OPTIONS = ['theme', 'darkTheme', 'lightTheme'];
|
|
4
7
|
/**
|
|
5
|
-
* One notice per deprecated option the config or one of its plugins sets
|
|
6
|
-
*
|
|
8
|
+
* One notice per deprecated option the config or one of its plugins sets, and
|
|
9
|
+
* per deprecated theme token an override names. The options never had an
|
|
10
|
+
* effect, so their notice only asks to remove them; a token's names what
|
|
11
|
+
* replaces it.
|
|
7
12
|
*/
|
|
8
13
|
export function describeDeprecatedOptions(config, configFile) {
|
|
9
14
|
const notices = [];
|
|
@@ -11,6 +16,12 @@ export function describeDeprecatedOptions(config, configFile) {
|
|
|
11
16
|
if (config[option] !== undefined)
|
|
12
17
|
notices.push(`${configFile} sets "${option}", ${NEVER_HAD_AN_EFFECT}`);
|
|
13
18
|
}
|
|
19
|
+
for (const option of THEME_OPTIONS) {
|
|
20
|
+
for (const token of Object.keys(config[option] ?? {})) {
|
|
21
|
+
if (token in DEPRECATED_THEME_TOKENS)
|
|
22
|
+
notices.push(`${configFile} sets ${token} in "${option}": ${deprecatedTokenNotice(token)}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
14
25
|
for (const plugin of config.plugins ?? []) {
|
|
15
26
|
if (plugin.wrapComponent !== undefined)
|
|
16
27
|
notices.push(`plugin "${plugin.name}" sets wrapComponent, ${NEVER_HAD_AN_EFFECT}`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentComposition, ScannedComponent } from '../../plugin/plugin.types.js';
|
|
2
|
+
/** The name of the generated wrapper that renders the compositions of `className`. */
|
|
3
|
+
export declare function compositionClassName(className: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* The AOT-compiled wrapper that renders the compositions of one showcase: a `@switch` over its cases, the one that
|
|
6
|
+
* `__prismVariant__` selects through `variantCases`. Each case is the author's markup with the subject element
|
|
7
|
+
* bound to the wrapper's own inputs and outputs, which are the subject's re-declared under their member names, as in
|
|
8
|
+
* the host wrapper of a directive. An input is declared when at least one case binds it.
|
|
9
|
+
*
|
|
10
|
+
* `localNames` holds the identifier of each class in `composition.imports` that differs from its name, by
|
|
11
|
+
* `importKey`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateCompositionClass(comp: ScannedComponent, composition: ComponentComposition, localNames: ReadonlyMap<string, string>): string;
|
|
14
|
+
//# sourceMappingURL=composition-wrapper.generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-wrapper.generator.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/composition-wrapper.generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAA8B,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAQvH,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9D;AA4BD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CA4BnJ"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { relative } from 'node:path';
|
|
2
|
+
import { COMPOSITION_SUBJECT_ATTR, COMPOSITION_SUBJECT_SLOT, PRISM_VARIANT_INPUT } from '../../shared/composition.js';
|
|
3
|
+
import { localName } from './manifest-imports.js';
|
|
4
|
+
import { escapeTemplateLiteral } from './template-literal.js';
|
|
5
|
+
/** The member the template switches on: the case of the variant the wrapper is set to. */
|
|
6
|
+
const CASE_MEMBER = '__prismCase__';
|
|
7
|
+
/** The name of the generated wrapper that renders the compositions of `className`. */
|
|
8
|
+
export function compositionClassName(className) {
|
|
9
|
+
return `${className}__PrismComposition`;
|
|
10
|
+
}
|
|
11
|
+
/** `input<any>()`: the wrapper declares every input untyped, as the template of a case binds it to the subject, which checks it. */
|
|
12
|
+
function formatInputDeclaration(input) {
|
|
13
|
+
return input.required ? 'input.required<any>()' : `input<any>(${JSON.stringify(input.defaultValue)})`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* What goes where {@link COMPOSITION_SUBJECT_SLOT} stands: the marker of the subject, its inputs this case binds, and
|
|
17
|
+
* every output. The members are read with `this.`, so that a variable the author's markup declares around the subject
|
|
18
|
+
* (`@for (label of …)`, `@let label`, `#label`) cannot take the place of the wrapper's own `label`.
|
|
19
|
+
*/
|
|
20
|
+
function subjectBindings(comp, unbound) {
|
|
21
|
+
const inputs = comp.inputs.filter((input) => !unbound.has(input.name)).map((input) => ` [${input.alias ?? input.name}]="this.${input.name}()"`);
|
|
22
|
+
const outputs = comp.outputs.map((output) => ` (${output.alias ?? output.name})="this.${output.name}.emit($event)"`);
|
|
23
|
+
return ` ${COMPOSITION_SUBJECT_ATTR}${inputs.join('')}${outputs.join('')}`;
|
|
24
|
+
}
|
|
25
|
+
/** The `@case` of one composition: where it comes from as an HTML comment, then its markup with the subject's bindings in the slot. */
|
|
26
|
+
function formatCase(comp, composition, index) {
|
|
27
|
+
const bindings = subjectBindings(comp, new Set(composition.unbound.map(({ name }) => name)));
|
|
28
|
+
// A variant name is free text: `--` could end the comment early, so it becomes two hyphens of another kind.
|
|
29
|
+
const origin = composition.origin === undefined ? '' : `<!-- ${composition.origin.replace(/--/g, '\u2010\u2010')} -->\n`;
|
|
30
|
+
return `@case (${index}) {\n${origin}${composition.template.replace(COMPOSITION_SUBJECT_SLOT, () => bindings)}\n}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The AOT-compiled wrapper that renders the compositions of one showcase: a `@switch` over its cases, the one that
|
|
34
|
+
* `__prismVariant__` selects through `variantCases`. Each case is the author's markup with the subject element
|
|
35
|
+
* bound to the wrapper's own inputs and outputs, which are the subject's re-declared under their member names, as in
|
|
36
|
+
* the host wrapper of a directive. An input is declared when at least one case binds it.
|
|
37
|
+
*
|
|
38
|
+
* `localNames` holds the identifier of each class in `composition.imports` that differs from its name, by
|
|
39
|
+
* `importKey`.
|
|
40
|
+
*/
|
|
41
|
+
export function generateCompositionClass(comp, composition, localNames) {
|
|
42
|
+
const { cases, variantCases } = composition;
|
|
43
|
+
const imports = new Set([comp.className, ...(composition.imports ?? []).map(({ name, from }) => localName(localNames, from, name))]);
|
|
44
|
+
const template = `@switch (${CASE_MEMBER}()) {\n${cases.map((entry, index) => formatCase(comp, entry, index)).join('\n')}\n}`;
|
|
45
|
+
const isBound = (input) => cases.some(({ unbound }) => !unbound.some(({ name }) => name === input.name));
|
|
46
|
+
const members = [
|
|
47
|
+
...comp.inputs.filter(isBound).map((input) => ` ${input.name} = ${formatInputDeclaration(input)};`),
|
|
48
|
+
...comp.outputs.map((output) => ` ${output.name} = output<any>();`),
|
|
49
|
+
` ${PRISM_VARIANT_INPUT} = input(0);`,
|
|
50
|
+
` protected ${CASE_MEMBER} = computed(() => [${variantCases.join(', ')}][this.${PRISM_VARIANT_INPUT}()]);`
|
|
51
|
+
];
|
|
52
|
+
// The scan holds the absolute path: the comment names it relative to the working directory, and in one line whatever the path holds.
|
|
53
|
+
const header = `${comp.className} · ${relative(process.cwd(), comp.filePath)}`.replace(/\s+/g, ' ');
|
|
54
|
+
return [
|
|
55
|
+
`// ${header}`,
|
|
56
|
+
`@Component({`,
|
|
57
|
+
` standalone: true,`,
|
|
58
|
+
` imports: [${[...imports].join(', ')}],`,
|
|
59
|
+
` host: { style: 'display: block' },`,
|
|
60
|
+
` template: \`${escapeTemplateLiteral(template)}\`,`,
|
|
61
|
+
`})`,
|
|
62
|
+
`class ${compositionClassName(comp.className)} {`,
|
|
63
|
+
...members,
|
|
64
|
+
`}`
|
|
65
|
+
].join('\n');
|
|
66
|
+
}
|
|
@@ -4,4 +4,6 @@ export interface ParsedHost {
|
|
|
4
4
|
content?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function parseHostString(host: string): ParsedHost | null;
|
|
7
|
+
/** {@link parseHostString} without its warning, for a caller that reports a host it cannot parse itself. */
|
|
8
|
+
export declare function matchHostString(host: string): ParsedHost | null;
|
|
7
9
|
//# sourceMappingURL=host-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-parser.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/host-parser.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"host-parser.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/host-parser.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAU/D;AAED,4GAA4G;AAC5G,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAoB/D"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export function parseHostString(host) {
|
|
2
|
+
const parsed = matchHostString(host);
|
|
3
|
+
if (!parsed && host.trim().length > 0) {
|
|
4
|
+
console.warn(`[ng-prism] @Showcase host="${host}" could not be parsed and will fall back to <div>. ` +
|
|
5
|
+
`Supported forms: "<tag>", "<tag attrs>", "<tag />", or "<tag>text</tag>".`);
|
|
6
|
+
}
|
|
7
|
+
return parsed;
|
|
8
|
+
}
|
|
9
|
+
/** {@link parseHostString} without its warning, for a caller that reports a host it cannot parse itself. */
|
|
10
|
+
export function matchHostString(host) {
|
|
2
11
|
const trimmed = host.trim();
|
|
3
12
|
const open = trimmed.match(/^<\s*([a-zA-Z][a-zA-Z0-9-]*)((?:\s+[^>]*?)?)\s*\/?\s*>$/);
|
|
4
13
|
if (open) {
|
|
@@ -12,9 +21,5 @@ export function parseHostString(host) {
|
|
|
12
21
|
content: wrapped[3]
|
|
13
22
|
};
|
|
14
23
|
}
|
|
15
|
-
if (trimmed.length > 0) {
|
|
16
|
-
console.warn(`[ng-prism] @Showcase host="${host}" could not be parsed and will fall back to <div>. ` +
|
|
17
|
-
`Supported forms: "<tag>", "<tag attrs>", "<tag />", or "<tag>text</tag>".`);
|
|
18
|
-
}
|
|
19
24
|
return null;
|
|
20
25
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the generated module can import `name` by name, `import { name } from '…'`: an identifier and no reserved
|
|
3
|
+
* word, which also rules out `default`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function isImportableName(name: string): boolean;
|
|
6
|
+
/** The key of `{ name, from }` in the map of {@link ManifestImports.names}. */
|
|
7
|
+
export declare function importKey(from: string, name: string): string;
|
|
8
|
+
/** The identifier `name` from `from` has in the generated module: `localNames` holds the ones that differ from `name`. */
|
|
9
|
+
export declare function localName(localNames: ReadonlyMap<string, string>, from: string, name: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* What the generated manifest imports, and the identifier each class has in it. Two classes of the same name from
|
|
12
|
+
* different modules, such as an explicit import next to a library class of another entry point, would be one
|
|
13
|
+
* identifier twice: the later one is imported under an alias, `Name__2`.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ManifestImports {
|
|
16
|
+
private readonly modules;
|
|
17
|
+
private readonly taken;
|
|
18
|
+
/** `reserved`: identifiers the module declares or imports itself, which no class may take. */
|
|
19
|
+
constructor(reserved: Iterable<string>);
|
|
20
|
+
/** A class the manifest refers to by its own name, which is never renamed: one of the showcased components. */
|
|
21
|
+
keep(from: string, name: string): void;
|
|
22
|
+
/** Import `name` from `from` and return the identifier it has: the name itself, or an alias when another class took it. */
|
|
23
|
+
local(from: string, name: string): string;
|
|
24
|
+
/** The identifier of each imported class that is not its own name, by {@link importKey}. */
|
|
25
|
+
names(): ReadonlyMap<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* One `import` statement per module, in the order the modules were first used. The module is written as a JSON
|
|
28
|
+
* string, which is a valid one whatever it holds; the names are the scan's, which only lets identifiers through.
|
|
29
|
+
*/
|
|
30
|
+
lines(): string[];
|
|
31
|
+
private module;
|
|
32
|
+
private free;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=manifest-imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-imports.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/manifest-imports.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CActD;AAED,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,0HAA0H;AAC1H,wBAAgB,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErG;AAED;;;;GAIG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0C;IAClE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IAEpC,8FAA8F;gBAClF,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAItC,+GAA+G;IAC/G,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKtC,2HAA2H;IAC3H,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAYzC,4FAA4F;IAC5F,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;IAWpC;;;OAGG;IACH,KAAK,IAAI,MAAM,EAAE;IAQjB,OAAO,CAAC,MAAM;IAUd,OAAO,CAAC,IAAI;CAQf"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the generated module can import `name` by name, `import { name } from '…'`: an identifier and no reserved
|
|
4
|
+
* word, which also rules out `default`.
|
|
5
|
+
*/
|
|
6
|
+
export function isImportableName(name) {
|
|
7
|
+
const scanner = ts.createScanner(ts.ScriptTarget.Latest, false, ts.LanguageVariant.Standard, name);
|
|
8
|
+
const token = scanner.scan();
|
|
9
|
+
if (scanner.getTokenEnd() !== name.length)
|
|
10
|
+
return false;
|
|
11
|
+
if (token === ts.SyntaxKind.Identifier)
|
|
12
|
+
return true;
|
|
13
|
+
const isReserved = (token >= ts.SyntaxKind.FirstReservedWord && token <= ts.SyntaxKind.LastReservedWord) ||
|
|
14
|
+
(token >= ts.SyntaxKind.FirstFutureReservedWord && token <= ts.SyntaxKind.LastFutureReservedWord) ||
|
|
15
|
+
token === ts.SyntaxKind.AwaitKeyword;
|
|
16
|
+
// A contextual keyword such as `type` or `from` is a name like any other.
|
|
17
|
+
return token >= ts.SyntaxKind.FirstKeyword && token <= ts.SyntaxKind.LastKeyword && !isReserved;
|
|
18
|
+
}
|
|
19
|
+
/** The key of `{ name, from }` in the map of {@link ManifestImports.names}. */
|
|
20
|
+
export function importKey(from, name) {
|
|
21
|
+
return `${from}#${name}`;
|
|
22
|
+
}
|
|
23
|
+
/** The identifier `name` from `from` has in the generated module: `localNames` holds the ones that differ from `name`. */
|
|
24
|
+
export function localName(localNames, from, name) {
|
|
25
|
+
return localNames.get(importKey(from, name)) ?? name;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What the generated manifest imports, and the identifier each class has in it. Two classes of the same name from
|
|
29
|
+
* different modules, such as an explicit import next to a library class of another entry point, would be one
|
|
30
|
+
* identifier twice: the later one is imported under an alias, `Name__2`.
|
|
31
|
+
*/
|
|
32
|
+
export class ManifestImports {
|
|
33
|
+
modules = new Map();
|
|
34
|
+
taken;
|
|
35
|
+
/** `reserved`: identifiers the module declares or imports itself, which no class may take. */
|
|
36
|
+
constructor(reserved) {
|
|
37
|
+
this.taken = new Set(reserved);
|
|
38
|
+
}
|
|
39
|
+
/** A class the manifest refers to by its own name, which is never renamed: one of the showcased components. */
|
|
40
|
+
keep(from, name) {
|
|
41
|
+
this.module(from).set(name, name);
|
|
42
|
+
this.taken.add(name);
|
|
43
|
+
}
|
|
44
|
+
/** Import `name` from `from` and return the identifier it has: the name itself, or an alias when another class took it. */
|
|
45
|
+
local(from, name) {
|
|
46
|
+
const module = this.module(from);
|
|
47
|
+
let local = module.get(name);
|
|
48
|
+
if (local === undefined) {
|
|
49
|
+
local = this.free(name);
|
|
50
|
+
module.set(name, local);
|
|
51
|
+
this.taken.add(local);
|
|
52
|
+
}
|
|
53
|
+
return local;
|
|
54
|
+
}
|
|
55
|
+
/** The identifier of each imported class that is not its own name, by {@link importKey}. */
|
|
56
|
+
names() {
|
|
57
|
+
const names = new Map();
|
|
58
|
+
for (const [from, module] of this.modules) {
|
|
59
|
+
for (const [name, local] of module) {
|
|
60
|
+
if (local !== name)
|
|
61
|
+
names.set(importKey(from, name), local);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return names;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* One `import` statement per module, in the order the modules were first used. The module is written as a JSON
|
|
68
|
+
* string, which is a valid one whatever it holds; the names are the scan's, which only lets identifiers through.
|
|
69
|
+
*/
|
|
70
|
+
lines() {
|
|
71
|
+
return [...this.modules].map(([from, module]) => {
|
|
72
|
+
const specifiers = [...module].map(([name, local]) => (local === name ? name : `${name} as ${local}`));
|
|
73
|
+
return `import { ${specifiers.join(', ')} } from ${JSON.stringify(from)};`;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
module(from) {
|
|
77
|
+
let module = this.modules.get(from);
|
|
78
|
+
if (!module) {
|
|
79
|
+
module = new Map();
|
|
80
|
+
this.modules.set(from, module);
|
|
81
|
+
}
|
|
82
|
+
return module;
|
|
83
|
+
}
|
|
84
|
+
free(name) {
|
|
85
|
+
let local = name;
|
|
86
|
+
for (let n = 2; this.taken.has(local); n++) {
|
|
87
|
+
local = `${name}__${n}`;
|
|
88
|
+
}
|
|
89
|
+
return local;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import type { StyleguidePage } from '../../plugin/page.types.js';
|
|
2
|
+
import type { ScannedPipe } from '../../plugin/pipe.types.js';
|
|
2
3
|
import type { ScannedComponent } from '../../plugin/plugin.types.js';
|
|
4
|
+
import type { ScannedService } from '../../plugin/service.types.js';
|
|
5
|
+
type Warn = (message: string) => void;
|
|
3
6
|
export interface RuntimeManifestOptions {
|
|
4
7
|
components: ScannedComponent[];
|
|
8
|
+
/** Written as data: a service's class is never imported into the styleguide. */
|
|
9
|
+
services?: ScannedService[];
|
|
10
|
+
/** Written as data too: a pipe's class is never imported into the styleguide. */
|
|
11
|
+
pipes?: ScannedPipe[];
|
|
5
12
|
libraryImportPath: string;
|
|
6
13
|
pages?: StyleguidePage[];
|
|
7
14
|
meta?: Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Where the generator reports a host it cannot render as written. Defaults to `console.warn` under a `⚠ ng-prism:` prefix.
|
|
17
|
+
* Since 22.7.0.
|
|
18
|
+
*/
|
|
19
|
+
warn?: Warn;
|
|
8
20
|
}
|
|
9
21
|
export declare function generateRuntimeManifest(options: RuntimeManifestOptions): string;
|
|
22
|
+
export {};
|
|
10
23
|
//# sourceMappingURL=runtime-manifest.generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-manifest.generator.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/runtime-manifest.generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAa,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-manifest.generator.d.ts","sourceRoot":"","sources":["../../../src/builder/manifest/runtime-manifest.generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAa,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAQpE,KAAK,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEtC,MAAM,WAAW,sBAAsB;IACnC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,iFAAiF;IACjF,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACf;AA+KD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAyE/E"}
|