@ng-prism/core 22.2.1 → 22.3.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 +22 -24
- package/builders.json +11 -11
- 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 +17 -0
- package/dist/app/canvas/prism-canvas-bg-pill.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-bg-pill.component.js +3 -18
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts +1 -0
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-rulers.component.js +9 -14
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +23 -6
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-canvas-toolbar.component.js +110 -140
- package/dist/app/canvas/prism-template-popover.component.d.ts.map +1 -1
- package/dist/app/canvas/prism-template-popover.component.js +8 -49
- package/dist/app/canvas/viewport-snap.d.ts +12 -0
- package/dist/app/canvas/viewport-snap.d.ts.map +1 -0
- package/dist/app/canvas/viewport-snap.js +23 -0
- package/dist/app/component-head/head-metrics.d.ts.map +1 -1
- package/dist/app/component-head/head-metrics.js +2 -2
- package/dist/app/component-head/prism-component-head.component.d.ts +1 -1
- package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-component-head.component.js +17 -50
- package/dist/app/component-head/prism-head-gauge.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-head-gauge.component.js +4 -36
- package/dist/app/component-head/prism-head-info.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-head-info.component.js +3 -36
- package/dist/app/component-head/prism-stat.component.d.ts.map +1 -1
- package/dist/app/component-head/prism-stat.component.js +3 -14
- package/dist/app/controls/boolean-control.component.d.ts.map +1 -1
- package/dist/app/controls/boolean-control.component.js +4 -12
- package/dist/app/controls/json-control.component.d.ts.map +1 -1
- package/dist/app/controls/json-control.component.js +4 -24
- package/dist/app/controls/number-control.component.d.ts.map +1 -1
- package/dist/app/controls/number-control.component.js +4 -11
- package/dist/app/controls/string-control.component.d.ts.map +1 -1
- package/dist/app/controls/string-control.component.js +4 -11
- package/dist/app/controls/union-control.component.d.ts.map +1 -1
- package/dist/app/controls/union-control.component.js +4 -16
- package/dist/app/directives/prism-resizer.directive.d.ts +24 -1
- package/dist/app/directives/prism-resizer.directive.d.ts.map +1 -1
- package/dist/app/directives/prism-resizer.directive.js +44 -7
- package/dist/app/directives/resize-value.d.ts +22 -0
- package/dist/app/directives/resize-value.d.ts.map +1 -0
- package/dist/app/directives/resize-value.js +23 -0
- package/dist/app/discovery-manifest.d.ts.map +1 -1
- package/dist/app/discovery-manifest.js +5 -7
- package/dist/app/header/prism-header-widget-host.component.d.ts.map +1 -1
- package/dist/app/header/prism-header-widget-host.component.js +4 -8
- package/dist/app/header/prism-header.component.d.ts.map +1 -1
- package/dist/app/header/prism-header.component.js +8 -77
- package/dist/app/hmr.d.ts.map +1 -1
- package/dist/app/icons/icon-registry.d.ts.map +1 -1
- package/dist/app/icons/icon-registry.js +2 -1
- package/dist/app/icons/prism-icon.component.d.ts.map +1 -1
- package/dist/app/icons/prism-icon.component.js +5 -5
- package/dist/app/index.d.ts +3 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +3 -3
- package/dist/app/layout-menu/prism-layout-menu.component.d.ts.map +1 -1
- package/dist/app/layout-menu/prism-layout-menu.component.js +3 -77
- package/dist/app/overview/overview-panel.js +1 -1
- package/dist/app/overview/overview-visibility.d.ts.map +1 -1
- package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview-cell.component.js +10 -17
- package/dist/app/overview/prism-overview.component.d.ts.map +1 -1
- package/dist/app/overview/prism-overview.component.js +4 -12
- package/dist/app/page-renderer/prism-page-renderer.component.d.ts.map +1 -1
- package/dist/app/page-renderer/prism-page-renderer.component.js +4 -17
- package/dist/app/panels/a11y/a11y-audit.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-audit.service.js +14 -2
- package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-core.plugin.js +1 -1
- package/dist/app/panels/a11y/a11y-dom-utils.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-dom-utils.js +9 -6
- package/dist/app/panels/a11y/a11y-header-badge.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-header-badge.component.js +6 -22
- package/dist/app/panels/a11y/a11y-keyboard-overlay.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-keyboard-overlay.component.js +6 -25
- package/dist/app/panels/a11y/a11y-keyboard.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.component.js +5 -36
- package/dist/app/panels/a11y/a11y-keyboard.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.service.js +2 -2
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-overlay-host.component.js +5 -32
- package/dist/app/panels/a11y/a11y-panel-state.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.d.ts +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.js +7 -69
- package/dist/app/panels/a11y/a11y-perspective.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.js +4 -31
- package/dist/app/panels/a11y/a11y-sr-overlay.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-sr-overlay.component.js +8 -28
- package/dist/app/panels/a11y/a11y-sr.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-sr.component.js +5 -28
- package/dist/app/panels/a11y/a11y-sr.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-sr.service.js +4 -7
- package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-summary.js +2 -5
- package/dist/app/panels/a11y/a11y-thresholds.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-thresholds.js +1 -1
- package/dist/app/panels/a11y/a11y-tree.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-tree.component.js +9 -46
- package/dist/app/panels/a11y/a11y-tree.service.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-tree.service.js +3 -5
- package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-violations.component.js +7 -58
- package/dist/app/panels/a11y/a11y.types.d.ts.map +1 -1
- package/dist/app/panels/builtin-header-widgets.js +2 -2
- package/dist/app/panels/builtin-navigation-decorations.d.ts.map +1 -1
- package/dist/app/panels/builtin-navigation-decorations.js +2 -2
- package/dist/app/panels/builtin-panels.d.ts.map +1 -1
- package/dist/app/panels/builtin-panels.js +2 -7
- package/dist/app/panels/controls/controls-plugin.js +3 -3
- package/dist/app/panels/controls/non-editable-input-types.d.ts.map +1 -1
- package/dist/app/panels/controls/non-editable-input-types.js +1 -5
- package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
- package/dist/app/panels/controls/prism-controls-panel.component.js +5 -95
- package/dist/app/panels/events/events-plugin.js +3 -3
- package/dist/app/panels/events/prism-events-panel.component.d.ts.map +1 -1
- package/dist/app/panels/events/prism-events-panel.component.js +5 -23
- package/dist/app/panels/events/prism-json-node.component.d.ts.map +1 -1
- package/dist/app/panels/events/prism-json-node.component.js +4 -86
- package/dist/app/panels/events/prism-json-node.utils.d.ts.map +1 -1
- package/dist/app/panels/panel-host/panel-badge.d.ts.map +1 -1
- package/dist/app/panels/panel-host/panel-badge.js +2 -4
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +1 -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 +12 -67
- package/dist/app/provide-prism.d.ts +1 -1
- package/dist/app/provide-prism.d.ts.map +1 -1
- package/dist/app/provide-prism.js +7 -11
- package/dist/app/renderer/known-inputs.d.ts.map +1 -1
- package/dist/app/renderer/overlay-resolver.d.ts.map +1 -1
- package/dist/app/renderer/overlay-resolver.js +1 -1
- package/dist/app/renderer/prism-renderer.component.d.ts +27 -2
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +94 -76
- package/dist/app/renderer/projectable-content.d.ts.map +1 -1
- package/dist/app/renderer/projectable-content.js +1 -3
- package/dist/app/renderer/snippet-generator.d.ts +1 -1
- package/dist/app/renderer/snippet-generator.d.ts.map +1 -1
- package/dist/app/renderer/snippet-generator.js +7 -22
- package/dist/app/services/navigation-item.types.d.ts +1 -1
- package/dist/app/services/navigation-item.types.d.ts.map +1 -1
- package/dist/app/services/prism-canvas.service.d.ts +22 -0
- package/dist/app/services/prism-canvas.service.d.ts.map +1 -1
- package/dist/app/services/prism-canvas.service.js +49 -2
- package/dist/app/services/prism-capture.service.d.ts.map +1 -1
- package/dist/app/services/prism-capture.service.js +2 -6
- package/dist/app/services/prism-event-log.service.d.ts.map +1 -1
- package/dist/app/services/prism-event-log.service.js +1 -4
- package/dist/app/services/prism-layout.service.d.ts.map +1 -1
- package/dist/app/services/prism-layout.service.js +5 -4
- package/dist/app/services/prism-manifest.service.d.ts +1 -1
- package/dist/app/services/prism-manifest.service.d.ts.map +1 -1
- package/dist/app/services/prism-manifest.service.js +1 -1
- package/dist/app/services/prism-navigation.service.d.ts +1 -1
- package/dist/app/services/prism-navigation.service.d.ts.map +1 -1
- package/dist/app/services/prism-navigation.service.js +5 -13
- package/dist/app/services/prism-panel.service.d.ts.map +1 -1
- package/dist/app/services/prism-panel.service.js +2 -5
- package/dist/app/services/prism-persistence.service.d.ts.map +1 -1
- package/dist/app/services/prism-persistence.service.js +8 -10
- package/dist/app/services/prism-plugin.service.d.ts.map +1 -1
- package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
- package/dist/app/services/prism-renderer.service.js +5 -9
- package/dist/app/services/prism-search.service.d.ts.map +1 -1
- package/dist/app/services/prism-search.service.js +1 -2
- package/dist/app/services/prism-theme.service.d.ts.map +1 -1
- package/dist/app/services/prism-theme.service.js +6 -4
- package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
- package/dist/app/services/prism-url-state.service.js +3 -9
- package/dist/app/services/prism-variant-bg.service.d.ts.map +1 -1
- package/dist/app/services/prism-variant-bg.service.js +3 -5
- package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -1
- package/dist/app/shared/prism-metric-badge.component.js +4 -17
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +20 -122
- package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -1
- package/dist/app/sidebar/navigation-decorations.js +1 -1
- package/dist/app/sidebar/prism-sidebar.component.d.ts +1 -1
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +19 -154
- package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
- package/dist/app/theme/prism-default-theme.js +5 -5
- package/dist/app/tokens/prism-tokens.d.ts.map +1 -1
- package/dist/app/tokens/prism-tokens.js +1 -1
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -1
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +4 -49
- package/dist/app/variant-ribbon/spectrum.d.ts.map +1 -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 +1 -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 +5 -17
- 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 +4 -27
- package/dist/builder/a11y/a11y-report-reader.d.ts +1 -1
- package/dist/builder/a11y/a11y-report-reader.d.ts.map +1 -1
- package/dist/builder/a11y/a11y-report-reader.js +7 -7
- package/dist/builder/build/index.d.ts.map +1 -1
- package/dist/builder/build/index.js +5 -9
- package/dist/builder/build/schema.d.ts.map +1 -1
- package/dist/builder/config-loader/config-loader.d.ts.map +1 -1
- package/dist/builder/config-loader/config-loader.js +4 -5
- package/dist/builder/manifest/host-parser.d.ts.map +1 -1
- package/dist/builder/manifest/host-parser.js +1 -1
- package/dist/builder/manifest/runtime-manifest.generator.d.ts +1 -1
- package/dist/builder/manifest/runtime-manifest.generator.d.ts.map +1 -1
- package/dist/builder/manifest/runtime-manifest.generator.js +9 -34
- package/dist/builder/plugin-runner/plugin-runner.d.ts.map +1 -1
- package/dist/builder/plugin-runner/plugin-runner.js +1 -3
- package/dist/builder/scanner/ast-utils.d.ts.map +1 -1
- package/dist/builder/scanner/ast-utils.js +2 -8
- package/dist/builder/scanner/component.scanner.d.ts.map +1 -1
- package/dist/builder/scanner/component.scanner.js +15 -22
- package/dist/builder/scanner/entry-point-discovery.d.ts.map +1 -1
- package/dist/builder/scanner/entry-point-discovery.js +3 -5
- package/dist/builder/scanner/entry-point.scanner.d.ts.map +1 -1
- package/dist/builder/scanner/entry-point.scanner.js +1 -3
- package/dist/builder/scanner/index.d.ts +1 -1
- package/dist/builder/scanner/index.d.ts.map +1 -1
- package/dist/builder/scanner/input.extractor.d.ts.map +1 -1
- package/dist/builder/scanner/input.extractor.js +11 -28
- package/dist/builder/scanner/manifest.generator.d.ts.map +1 -1
- package/dist/builder/scanner/manifest.generator.js +2 -4
- package/dist/builder/scanner/scanner.d.ts.map +1 -1
- package/dist/builder/scanner/scanner.js +4 -4
- package/dist/builder/serve/index.d.ts.map +1 -1
- package/dist/builder/serve/index.js +8 -10
- package/dist/builder/serve/schema.d.ts.map +1 -1
- package/dist/builder/shared/index.d.ts +1 -1
- package/dist/builder/shared/index.d.ts.map +1 -1
- package/dist/builder/shared/index.js +1 -1
- package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
- package/dist/builder/shared/prism-pipeline.js +18 -25
- package/dist/builder/shared/resolve-cache-dir.d.ts.map +1 -1
- package/dist/builder/shared/resolve-cache-dir.js +1 -1
- package/dist/builder/watcher/index.d.ts +1 -1
- package/dist/builder/watcher/index.d.ts.map +1 -1
- package/dist/builder/watcher/prism-watcher.d.ts.map +1 -1
- package/dist/builder/watcher/prism-watcher.js +12 -10
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/decorator/index.d.ts +1 -1
- package/dist/decorator/index.d.ts.map +1 -1
- package/dist/decorator/showcase.decorator.d.ts.map +1 -1
- package/dist/decorator/showcase.types.d.ts.map +1 -1
- package/dist/plugin/index.d.ts +4 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +2 -2
- package/dist/plugin/page-helpers.d.ts +1 -1
- package/dist/plugin/page-helpers.d.ts.map +1 -1
- package/dist/plugin/page-helpers.js +2 -2
- package/dist/plugin/page.types.d.ts.map +1 -1
- package/dist/plugin/plugin.types.d.ts +1 -1
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/dist/schematics/migrations/v21-13-manifest-cache/index.d.ts.map +1 -1
- package/dist/schematics/migrations/v21-13-manifest-cache/index.js +4 -10
- package/dist/schematics/migrations/v22-0-cache-dir-rename/index.d.ts.map +1 -1
- package/dist/schematics/migrations/v22-0-cache-dir-rename/index.js +4 -8
- package/dist/schematics/ng-add/index.d.ts.map +1 -1
- package/dist/schematics/ng-add/index.js +122 -56
- package/dist/schematics/ng-add/schema.d.ts.map +1 -1
- package/dist/schematics/utils/config-ast.d.ts.map +1 -1
- package/dist/schematics/utils/config-ast.js +8 -15
- package/dist/schematics/utils/tsconfig-paths.d.ts.map +1 -1
- package/dist/schematics/utils/tsconfig-paths.js +1 -1
- package/dist/shared/canvas-bg.type.d.ts.map +1 -1
- package/dist/shared/canvas-bg.type.js +1 -8
- package/dist/shared/canvas-layout.type.d.ts.map +1 -1
- package/dist/shared/canvas-layout.type.js +1 -4
- package/dist/shared/variant-bg.d.ts.map +1 -1
- package/dist/shared/viewport.type.d.ts +47 -0
- package/dist/shared/viewport.type.d.ts.map +1 -0
- package/dist/shared/viewport.type.js +48 -0
- package/dist/transformer/cli.js +0 -0
- package/dist/transformer/index.d.ts +2 -2
- package/dist/transformer/index.d.ts.map +1 -1
- package/dist/transformer/index.js +2 -2
- package/dist/transformer/showcase-strip.transformer.d.ts.map +1 -1
- package/dist/transformer/showcase-strip.transformer.js +6 -15
- package/dist/transformer/strip-directory.d.ts.map +1 -1
- package/dist/transformer/strip-directory.js +2 -4
- package/package.json +4 -1
- package/schematics/collection.json +7 -7
- package/schematics/migrations.json +12 -12
- package/schematics/ng-add/schema.json +22 -22
- package/src/builder/build/schema.json +36 -36
- package/src/builder/serve/schema.json +37 -37
|
@@ -12,8 +12,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
12
12
|
throw new SchematicsException(`${configPath} not found. Run "ng add @ng-prism/core" first.`);
|
|
13
13
|
}
|
|
14
14
|
const source = buffer.toString('utf-8');
|
|
15
|
-
const sf = ts.createSourceFile(configPath, source, ts.ScriptTarget.Latest,
|
|
16
|
-
/* setParentNodes */ true);
|
|
15
|
+
const sf = ts.createSourceFile(configPath, source, ts.ScriptTarget.Latest, /* setParentNodes */ true);
|
|
17
16
|
const imports = sf.statements.filter(ts.isImportDeclaration);
|
|
18
17
|
const defineConfigCall = findDefineConfigCall(sf);
|
|
19
18
|
if (!defineConfigCall) {
|
|
@@ -30,9 +29,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
30
29
|
}
|
|
31
30
|
const importAlreadyPresent = imports.some((imp) => importHasNamedBinding(imp, options.importFrom, options.importName));
|
|
32
31
|
const callAlreadyPresent = !!pluginsProp &&
|
|
33
|
-
pluginsProp.initializer.elements.some((el) => ts.isCallExpression(el) &&
|
|
34
|
-
ts.isIdentifier(el.expression) &&
|
|
35
|
-
el.expression.text === options.importName);
|
|
32
|
+
pluginsProp.initializer.elements.some((el) => ts.isCallExpression(el) && ts.isIdentifier(el.expression) && el.expression.text === options.importName);
|
|
36
33
|
if (importAlreadyPresent && callAlreadyPresent)
|
|
37
34
|
return false;
|
|
38
35
|
const edits = [];
|
|
@@ -41,7 +38,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
41
38
|
edits.push({
|
|
42
39
|
start: insertPos,
|
|
43
40
|
end: insertPos,
|
|
44
|
-
newText: `\nimport { ${options.importName} } from '${options.importFrom}'
|
|
41
|
+
newText: `\nimport { ${options.importName} } from '${options.importFrom}';`
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
44
|
if (!callAlreadyPresent) {
|
|
@@ -50,7 +47,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
50
47
|
edits.push({
|
|
51
48
|
start: insertPos,
|
|
52
49
|
end: insertPos,
|
|
53
|
-
newText: `\n plugins: [${options.call}]
|
|
50
|
+
newText: `\n plugins: [${options.call}],`
|
|
54
51
|
});
|
|
55
52
|
}
|
|
56
53
|
else {
|
|
@@ -59,7 +56,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
59
56
|
edits.push({
|
|
60
57
|
start: arr.getStart(sf),
|
|
61
58
|
end: arr.getEnd(),
|
|
62
|
-
newText: `[${options.call}]
|
|
59
|
+
newText: `[${options.call}]`
|
|
63
60
|
});
|
|
64
61
|
}
|
|
65
62
|
else {
|
|
@@ -68,7 +65,7 @@ export function addPluginToConfig(tree, configPath, options) {
|
|
|
68
65
|
edits.push({
|
|
69
66
|
start: insertPos,
|
|
70
67
|
end: insertPos,
|
|
71
|
-
newText: `, ${options.call}
|
|
68
|
+
newText: `, ${options.call}`
|
|
72
69
|
});
|
|
73
70
|
}
|
|
74
71
|
}
|
|
@@ -86,9 +83,7 @@ function findDefineConfigCall(sf) {
|
|
|
86
83
|
if (!ts.isExportAssignment(stmt) || stmt.isExportEquals)
|
|
87
84
|
continue;
|
|
88
85
|
const expr = stmt.expression;
|
|
89
|
-
if (ts.isCallExpression(expr) &&
|
|
90
|
-
ts.isIdentifier(expr.expression) &&
|
|
91
|
-
expr.expression.text === 'defineConfig') {
|
|
86
|
+
if (ts.isCallExpression(expr) && ts.isIdentifier(expr.expression) && expr.expression.text === 'defineConfig') {
|
|
92
87
|
return expr;
|
|
93
88
|
}
|
|
94
89
|
}
|
|
@@ -96,9 +91,7 @@ function findDefineConfigCall(sf) {
|
|
|
96
91
|
}
|
|
97
92
|
function findPluginsProperty(obj) {
|
|
98
93
|
for (const prop of obj.properties) {
|
|
99
|
-
if (ts.isPropertyAssignment(prop) &&
|
|
100
|
-
ts.isIdentifier(prop.name) &&
|
|
101
|
-
prop.name.text === 'plugins') {
|
|
94
|
+
if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'plugins') {
|
|
102
95
|
return prop;
|
|
103
96
|
}
|
|
104
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/schematics/utils/tsconfig-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/schematics/utils/tsconfig-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAWvD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAgBvG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { applyEdits as applyJsoncEdits, modify as modifyJsonc, parse as parseJsonc } from 'jsonc-parser';
|
|
2
2
|
/**
|
|
3
3
|
* Adds `compilerOptions.paths[<key>] = <value>` to a tsconfig.json (JSONC-safe).
|
|
4
4
|
* Idempotent: does not overwrite an existing entry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-bg.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-bg.type.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"canvas-bg.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-bg.type.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GACd,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM;AACR;;;;;;;GAOG;GACD,SAAS,GACT,aAAa,CAAC;AAEpB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAA0E,CAAC"}
|
|
@@ -7,11 +7,4 @@
|
|
|
7
7
|
* to offer. Persisted canvas state is validated against this list too, so a
|
|
8
8
|
* value only a decorator can reach still round-trips.
|
|
9
9
|
*/
|
|
10
|
-
export const CANVAS_BGS = [
|
|
11
|
-
'dots',
|
|
12
|
-
'plain',
|
|
13
|
-
'light',
|
|
14
|
-
'dark',
|
|
15
|
-
'checker',
|
|
16
|
-
'transparent',
|
|
17
|
-
];
|
|
10
|
+
export const CANVAS_BGS = ['dots', 'plain', 'light', 'dark', 'checker', 'transparent'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-layout.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-layout.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,
|
|
1
|
+
{"version":3,"file":"canvas-layout.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-layout.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant-bg.d.ts","sourceRoot":"","sources":["../../src/shared/variant-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAwB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;
|
|
1
|
+
{"version":3,"file":"variant-bg.d.ts","sourceRoot":"","sources":["../../src/shared/variant-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAwB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS;QAAE,EAAE,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAEhG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,CAExF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canvas viewport: one nullable number, not a device list.
|
|
3
|
+
*
|
|
4
|
+
* The question this tool answers is "where does the layout break", not "how
|
|
5
|
+
* does it look on a Pixel 8" — so the presets below are plain widths and carry
|
|
6
|
+
* no device names. A name would imply a simulation the constraint does not
|
|
7
|
+
* perform: it narrows the box and nothing else. Media queries still read the
|
|
8
|
+
* real browser viewport; only `@container` rules respond.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The narrowest the constraint will go.
|
|
12
|
+
*
|
|
13
|
+
* Below any real device on purpose. The presets cover the widths people design
|
|
14
|
+
* against; this floor is for the other half of the job — dragging past where a
|
|
15
|
+
* layout still works to find the point at which it gives up. A floor set to the
|
|
16
|
+
* narrowest real phone would put that point out of reach on exactly the
|
|
17
|
+
* components most worth checking.
|
|
18
|
+
*/
|
|
19
|
+
export declare const VIEWPORT_MIN = 100;
|
|
20
|
+
/** Wide enough for a desktop breakpoint, short of the point where the stage scrolls on any realistic screen. */
|
|
21
|
+
export declare const VIEWPORT_MAX = 1600;
|
|
22
|
+
/** Where the toggle lands when no width has been set this session. */
|
|
23
|
+
export declare const VIEWPORT_DEFAULT = 390;
|
|
24
|
+
/** How near a drag has to come before it rests on a preset, in pixels. */
|
|
25
|
+
export declare const VIEWPORT_SNAP_TOLERANCE = 8;
|
|
26
|
+
/**
|
|
27
|
+
* The named widths, as numbers.
|
|
28
|
+
*
|
|
29
|
+
* Common CSS breakpoints plus the two phone widths that actually differ from
|
|
30
|
+
* them. Rendered as the "Width" group in the canvas tools menu, exactly like
|
|
31
|
+
* the zoom chooser next to it.
|
|
32
|
+
*/
|
|
33
|
+
export declare const VIEWPORT_SNAPS: readonly number[];
|
|
34
|
+
/**
|
|
35
|
+
* `width` brought inside the legal range and onto a whole pixel.
|
|
36
|
+
*
|
|
37
|
+
* Lives beside the bounds it enforces rather than next to the canvas's
|
|
38
|
+
* snapping: the clamp is the service's business — it is what keeps a stored
|
|
39
|
+
* or programmatic width legal — and a service reaching into the canvas UI
|
|
40
|
+
* folder for arithmetic over these two constants was the wrong direction.
|
|
41
|
+
*
|
|
42
|
+
* Rounded rather than truncated: the value is read back out as a label on the
|
|
43
|
+
* canvas, and `389.6 px` under a drag reads as a rendering fault rather than as
|
|
44
|
+
* the sub-pixel arithmetic it is.
|
|
45
|
+
*/
|
|
46
|
+
export declare function clampViewportWidth(width: number): number;
|
|
47
|
+
//# sourceMappingURL=viewport.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport.type.d.ts","sourceRoot":"","sources":["../../src/shared/viewport.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,gHAAgH;AAChH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAoC,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canvas viewport: one nullable number, not a device list.
|
|
3
|
+
*
|
|
4
|
+
* The question this tool answers is "where does the layout break", not "how
|
|
5
|
+
* does it look on a Pixel 8" — so the presets below are plain widths and carry
|
|
6
|
+
* no device names. A name would imply a simulation the constraint does not
|
|
7
|
+
* perform: it narrows the box and nothing else. Media queries still read the
|
|
8
|
+
* real browser viewport; only `@container` rules respond.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The narrowest the constraint will go.
|
|
12
|
+
*
|
|
13
|
+
* Below any real device on purpose. The presets cover the widths people design
|
|
14
|
+
* against; this floor is for the other half of the job — dragging past where a
|
|
15
|
+
* layout still works to find the point at which it gives up. A floor set to the
|
|
16
|
+
* narrowest real phone would put that point out of reach on exactly the
|
|
17
|
+
* components most worth checking.
|
|
18
|
+
*/
|
|
19
|
+
export const VIEWPORT_MIN = 100;
|
|
20
|
+
/** Wide enough for a desktop breakpoint, short of the point where the stage scrolls on any realistic screen. */
|
|
21
|
+
export const VIEWPORT_MAX = 1600;
|
|
22
|
+
/** Where the toggle lands when no width has been set this session. */
|
|
23
|
+
export const VIEWPORT_DEFAULT = 390;
|
|
24
|
+
/** How near a drag has to come before it rests on a preset, in pixels. */
|
|
25
|
+
export const VIEWPORT_SNAP_TOLERANCE = 8;
|
|
26
|
+
/**
|
|
27
|
+
* The named widths, as numbers.
|
|
28
|
+
*
|
|
29
|
+
* Common CSS breakpoints plus the two phone widths that actually differ from
|
|
30
|
+
* them. Rendered as the "Width" group in the canvas tools menu, exactly like
|
|
31
|
+
* the zoom chooser next to it.
|
|
32
|
+
*/
|
|
33
|
+
export const VIEWPORT_SNAPS = [320, 390, 480, 640, 768, 1024];
|
|
34
|
+
/**
|
|
35
|
+
* `width` brought inside the legal range and onto a whole pixel.
|
|
36
|
+
*
|
|
37
|
+
* Lives beside the bounds it enforces rather than next to the canvas's
|
|
38
|
+
* snapping: the clamp is the service's business — it is what keeps a stored
|
|
39
|
+
* or programmatic width legal — and a service reaching into the canvas UI
|
|
40
|
+
* folder for arithmetic over these two constants was the wrong direction.
|
|
41
|
+
*
|
|
42
|
+
* Rounded rather than truncated: the value is read back out as a label on the
|
|
43
|
+
* canvas, and `389.6 px` under a drag reads as a rendering fault rather than as
|
|
44
|
+
* the sub-pixel arithmetic it is.
|
|
45
|
+
*/
|
|
46
|
+
export function clampViewportWidth(width) {
|
|
47
|
+
return Math.round(Math.max(VIEWPORT_MIN, Math.min(VIEWPORT_MAX, width)));
|
|
48
|
+
}
|
package/dist/transformer/cli.js
CHANGED
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createShowcaseStripTransformer, stripShowcaseDecorators
|
|
2
|
-
export {
|
|
1
|
+
export { createShowcaseStripTransformer, stripShowcaseDecorators } from './showcase-strip.transformer.js';
|
|
2
|
+
export { type StripResult, stripShowcaseFromDirectory } from './strip-directory.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,EAAE,KAAK,WAAW,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createShowcaseStripTransformer, stripShowcaseDecorators
|
|
2
|
-
export { stripShowcaseFromDirectory
|
|
1
|
+
export { createShowcaseStripTransformer, stripShowcaseDecorators } from './showcase-strip.transformer.js';
|
|
2
|
+
export { stripShowcaseFromDirectory } from './strip-directory.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showcase-strip.transformer.d.ts","sourceRoot":"","sources":["../../src/transformer/showcase-strip.transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"showcase-strip.transformer.d.ts","sourceRoot":"","sources":["../../src/transformer/showcase-strip.transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAqK5B,wBAAgB,8BAA8B,IAAI,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,CA2CrF;AAyBD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,MAAM,CAyBpF"}
|
|
@@ -4,9 +4,7 @@ function isShowcaseModule(specifier) {
|
|
|
4
4
|
return SHOWCASE_MODULE_PREFIXES.some((prefix) => specifier === prefix || specifier.startsWith(prefix + '/'));
|
|
5
5
|
}
|
|
6
6
|
function isShowcaseCall(expr, names) {
|
|
7
|
-
return
|
|
8
|
-
ts.isIdentifier(expr.expression) &&
|
|
9
|
-
names.has(expr.expression.text));
|
|
7
|
+
return ts.isCallExpression(expr) && ts.isIdentifier(expr.expression) && names.has(expr.expression.text);
|
|
10
8
|
}
|
|
11
9
|
function isLoweredShowcaseCall(expr, names) {
|
|
12
10
|
if (!ts.isCallExpression(expr))
|
|
@@ -15,21 +13,17 @@ function isLoweredShowcaseCall(expr, names) {
|
|
|
15
13
|
}
|
|
16
14
|
function tryHandleDecorateStatement(stmt, names, factory) {
|
|
17
15
|
const expr = stmt.expression;
|
|
18
|
-
if (!ts.isBinaryExpression(expr) ||
|
|
19
|
-
expr.operatorToken.kind !== ts.SyntaxKind.EqualsToken) {
|
|
16
|
+
if (!ts.isBinaryExpression(expr) || expr.operatorToken.kind !== ts.SyntaxKind.EqualsToken) {
|
|
20
17
|
return undefined;
|
|
21
18
|
}
|
|
22
19
|
const chain = [];
|
|
23
20
|
let current = expr;
|
|
24
|
-
while (ts.isBinaryExpression(current) &&
|
|
25
|
-
current.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
|
|
21
|
+
while (ts.isBinaryExpression(current) && current.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
|
|
26
22
|
chain.push(current);
|
|
27
23
|
current = current.right;
|
|
28
24
|
}
|
|
29
25
|
const rhs = current;
|
|
30
|
-
if (!ts.isCallExpression(rhs) ||
|
|
31
|
-
!ts.isIdentifier(rhs.expression) ||
|
|
32
|
-
rhs.expression.text !== '__decorate') {
|
|
26
|
+
if (!ts.isCallExpression(rhs) || !ts.isIdentifier(rhs.expression) || rhs.expression.text !== '__decorate') {
|
|
33
27
|
return undefined;
|
|
34
28
|
}
|
|
35
29
|
const args = rhs.arguments;
|
|
@@ -55,9 +49,7 @@ function tryHandleDecorateStatement(stmt, names, factory) {
|
|
|
55
49
|
return { action: 'replace', statement: newStmt };
|
|
56
50
|
}
|
|
57
51
|
function isShowcaseDecorator(d, names) {
|
|
58
|
-
return
|
|
59
|
-
ts.isIdentifier(d.expression.expression) &&
|
|
60
|
-
names.has(d.expression.expression.text));
|
|
52
|
+
return ts.isCallExpression(d.expression) && ts.isIdentifier(d.expression.expression) && names.has(d.expression.expression.text);
|
|
61
53
|
}
|
|
62
54
|
function stripNativeDecorators(node, names, factory) {
|
|
63
55
|
const decorators = ts.getDecorators(node);
|
|
@@ -128,8 +120,7 @@ export function createShowcaseStripTransformer() {
|
|
|
128
120
|
continue;
|
|
129
121
|
const decorateResult = tryHandleDecorateStatement(stmt, names, factory);
|
|
130
122
|
if (decorateResult) {
|
|
131
|
-
if (decorateResult.action === 'replace' &&
|
|
132
|
-
decorateResult.statement) {
|
|
123
|
+
if (decorateResult.action === 'replace' && decorateResult.statement) {
|
|
133
124
|
filtered.push(decorateResult.statement);
|
|
134
125
|
}
|
|
135
126
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strip-directory.d.ts","sourceRoot":"","sources":["../../src/transformer/strip-directory.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;
|
|
1
|
+
{"version":3,"file":"strip-directory.d.ts","sourceRoot":"","sources":["../../src/transformer/strip-directory.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBlF"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { extname, join } from 'node:path';
|
|
3
3
|
import { stripShowcaseDecorators } from './showcase-strip.transformer.js';
|
|
4
4
|
const JS_EXTENSIONS = new Set(['.js', '.mjs']);
|
|
5
5
|
export async function stripShowcaseFromDirectory(dir) {
|
|
6
6
|
const entries = await readdir(dir, { recursive: true });
|
|
7
|
-
const files = entries
|
|
8
|
-
.filter((entry) => JS_EXTENSIONS.has(extname(entry)))
|
|
9
|
-
.map((entry) => join(dir, entry));
|
|
7
|
+
const files = entries.filter((entry) => JS_EXTENSIONS.has(extname(entry))).map((entry) => join(dir, entry));
|
|
10
8
|
let strippedFiles = 0;
|
|
11
9
|
for (const file of files) {
|
|
12
10
|
const source = await readFile(file, 'utf-8');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-prism/core",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.3.0",
|
|
4
4
|
"description": "ng-prism — the Angular-native Storybook alternative. Lightweight component showcase with @Showcase decorator, no story files needed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ng-prism",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@angular/core": ">=20.0.0",
|
|
78
78
|
"@angular/common": ">=20.0.0",
|
|
79
|
+
"@angular/compiler": ">=20.0.0",
|
|
79
80
|
"@angular-devkit/architect": ">=0.2000.0",
|
|
80
81
|
"@angular-devkit/core": ">=20.0.0",
|
|
81
82
|
"@angular-devkit/schematics": ">=20.0.0",
|
|
@@ -92,7 +93,9 @@
|
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
"dependencies": {
|
|
96
|
+
"axe-core": "^4.11.1",
|
|
95
97
|
"chokidar": "^5.0.0",
|
|
98
|
+
"jsonc-parser": "^3.3.1",
|
|
96
99
|
"tslib": "^2.3.0"
|
|
97
100
|
},
|
|
98
101
|
"repository": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Set up ng-prism in an Angular workspace",
|
|
6
|
+
"factory": "../dist/schematics/ng-add/index#ngAdd",
|
|
7
|
+
"schema": "./ng-add/schema.json"
|
|
8
|
+
}
|
|
8
9
|
}
|
|
9
|
-
}
|
|
10
10
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"migration-v22-manifest-cache": {
|
|
5
|
+
"version": "22.0.0-beta.0",
|
|
6
|
+
"description": "Move generated prism-manifest.ts into <workspaceRoot>/ng-prism-cache/<prismProject>/ and resolve it via a wildcard tsconfig path mapping.",
|
|
7
|
+
"factory": "../dist/schematics/migrations/v21-13-manifest-cache/index#migrate"
|
|
8
|
+
},
|
|
9
|
+
"migration-v22-cache-dir-rename": {
|
|
10
|
+
"version": "22.0.0-beta.4",
|
|
11
|
+
"description": "Rename the manifest cache directory from .ng-prism/ to ng-prism-cache/. The dot-prefixed name was silently excluded from @angular/build's watcher (hardcoded **/.*/** ignore pattern), so @Showcase decorator edits never triggered an HMR / reload.",
|
|
12
|
+
"factory": "../dist/schematics/migrations/v22-0-cache-dir-rename/index#migrate"
|
|
13
|
+
}
|
|
13
14
|
}
|
|
14
|
-
}
|
|
15
15
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ng-prism ng-add Schematic",
|
|
4
|
+
"description": "Set up ng-prism in an Angular workspace",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The library project to set up ng-prism for",
|
|
10
|
+
"x-prompt": "Which library project should ng-prism showcase?"
|
|
11
|
+
},
|
|
12
|
+
"port": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"default": 4400,
|
|
15
|
+
"description": "Dev server port for the Prism styleguide"
|
|
16
|
+
},
|
|
17
|
+
"zoneless": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false,
|
|
20
|
+
"description": "Use zoneless change detection (no zone.js polyfill)"
|
|
21
|
+
}
|
|
11
22
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"default": 4400,
|
|
15
|
-
"description": "Dev server port for the Prism styleguide"
|
|
16
|
-
},
|
|
17
|
-
"zoneless": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"default": false,
|
|
20
|
-
"description": "Use zoneless change detection (no zone.js polyfill)"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"required": ["project"],
|
|
24
|
-
"additionalProperties": false
|
|
23
|
+
"required": ["project"],
|
|
24
|
+
"additionalProperties": false
|
|
25
25
|
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ng-prism Build Builder",
|
|
4
|
+
"description": "Build the ng-prism styleguide for production",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"entryPoint": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Path to the library's public-api.ts (entry point for scanning)"
|
|
10
|
+
},
|
|
11
|
+
"prismProject": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Angular project name for the Prism styleguide app"
|
|
14
|
+
},
|
|
15
|
+
"libraryProject": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Library project name (used to resolve source root)"
|
|
18
|
+
},
|
|
19
|
+
"outputPath": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Output directory for the production build"
|
|
22
|
+
},
|
|
23
|
+
"libraryImportPath": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
|
|
26
|
+
},
|
|
27
|
+
"configFile": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "ng-prism.config.ts",
|
|
30
|
+
"description": "Path to the ng-prism config file"
|
|
31
|
+
},
|
|
32
|
+
"cacheDir": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
|
|
35
|
+
}
|
|
10
36
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"description": "Angular project name for the Prism styleguide app"
|
|
14
|
-
},
|
|
15
|
-
"libraryProject": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Library project name (used to resolve source root)"
|
|
18
|
-
},
|
|
19
|
-
"outputPath": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"description": "Output directory for the production build"
|
|
22
|
-
},
|
|
23
|
-
"libraryImportPath": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
|
|
26
|
-
},
|
|
27
|
-
"configFile": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"default": "ng-prism.config.ts",
|
|
30
|
-
"description": "Path to the ng-prism config file"
|
|
31
|
-
},
|
|
32
|
-
"cacheDir": {
|
|
33
|
-
"type": "string",
|
|
34
|
-
"description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"required": ["entryPoint", "prismProject"],
|
|
38
|
-
"additionalProperties": false
|
|
37
|
+
"required": ["entryPoint", "prismProject"],
|
|
38
|
+
"additionalProperties": false
|
|
39
39
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ng-prism Serve Builder",
|
|
4
|
+
"description": "Start the ng-prism development server",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"entryPoint": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Path to the library's public-api.ts (entry point for scanning)"
|
|
10
|
+
},
|
|
11
|
+
"prismProject": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Angular project name for the Prism styleguide app"
|
|
14
|
+
},
|
|
15
|
+
"libraryProject": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Library project name (used to resolve source root)"
|
|
18
|
+
},
|
|
19
|
+
"port": {
|
|
20
|
+
"type": "number",
|
|
21
|
+
"default": 4400,
|
|
22
|
+
"description": "Dev server port"
|
|
23
|
+
},
|
|
24
|
+
"libraryImportPath": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
|
|
27
|
+
},
|
|
28
|
+
"configFile": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"default": "ng-prism.config.ts",
|
|
31
|
+
"description": "Path to the ng-prism config file"
|
|
32
|
+
},
|
|
33
|
+
"cacheDir": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
|
|
36
|
+
}
|
|
10
37
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"description": "Angular project name for the Prism styleguide app"
|
|
14
|
-
},
|
|
15
|
-
"libraryProject": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Library project name (used to resolve source root)"
|
|
18
|
-
},
|
|
19
|
-
"port": {
|
|
20
|
-
"type": "number",
|
|
21
|
-
"default": 4400,
|
|
22
|
-
"description": "Dev server port"
|
|
23
|
-
},
|
|
24
|
-
"libraryImportPath": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
|
|
27
|
-
},
|
|
28
|
-
"configFile": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"default": "ng-prism.config.ts",
|
|
31
|
-
"description": "Path to the ng-prism config file"
|
|
32
|
-
},
|
|
33
|
-
"cacheDir": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"required": ["entryPoint", "prismProject"],
|
|
39
|
-
"additionalProperties": false
|
|
38
|
+
"required": ["entryPoint", "prismProject"],
|
|
39
|
+
"additionalProperties": false
|
|
40
40
|
}
|