@ng-prism/core 21.8.0 → 21.8.2
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/dist/app/panels/controls/prism-controls-panel.component.d.ts +3 -2
- 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 -4
- package/dist/app/panels/events/prism-events-panel.component.d.ts +3 -1
- 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 -4
- package/dist/builder/watcher/prism-watcher.js +1 -1
- package/dist/schematics/ng-add/index.d.ts.map +1 -1
- package/dist/schematics/ng-add/index.js +14 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControlDefinition, InputMeta } from '../../../plugin/plugin.types.js';
|
|
1
|
+
import type { ControlDefinition, InputMeta, RuntimeComponent } from '../../../plugin/plugin.types.js';
|
|
2
2
|
import { PrismNavigationService } from '../../services/prism-navigation.service.js';
|
|
3
3
|
import { PrismRendererService } from '../../services/prism-renderer.service.js';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -6,11 +6,12 @@ export declare class PrismControlsPanelComponent {
|
|
|
6
6
|
protected readonly navigationService: PrismNavigationService;
|
|
7
7
|
protected readonly rendererService: PrismRendererService;
|
|
8
8
|
private readonly pluginService;
|
|
9
|
+
readonly activeComponent: import("@angular/core").InputSignal<RuntimeComponent | null>;
|
|
9
10
|
protected getCustomControl(input: InputMeta): ControlDefinition | null;
|
|
10
11
|
protected asBoolean(val: unknown): boolean;
|
|
11
12
|
protected asNumber(val: unknown): number;
|
|
12
13
|
protected asString(val: unknown): string;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismControlsPanelComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PrismControlsPanelComponent, "prism-controls-panel", never, {}, {}, never, never, true, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismControlsPanelComponent, "prism-controls-panel", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=prism-controls-panel.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-controls-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/controls/prism-controls-panel.component.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,
|
|
1
|
+
{"version":3,"file":"prism-controls-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/controls/prism-controls-panel.component.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;;AAEhF,qBA2Ha,2BAA2B;IACtC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,yBAAkC;IACtE,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAClE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAE5D,QAAQ,CAAC,eAAe,+DAAwC;IAEhE,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB,GAAG,IAAI;IAOtE,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;IAI1C,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM;IAIxC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM;yCAtB7B,2BAA2B;2CAA3B,2BAA2B;CAyBvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NgComponentOutlet } from '@angular/common';
|
|
2
|
-
import { Component, inject, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import { BooleanControlComponent } from '../../controls/boolean-control.component.js';
|
|
4
4
|
import { JsonControlComponent } from '../../controls/json-control.component.js';
|
|
5
5
|
import { NumberControlComponent } from '../../controls/number-control.component.js';
|
|
@@ -121,6 +121,7 @@ export class PrismControlsPanelComponent {
|
|
|
121
121
|
navigationService = inject(PrismNavigationService);
|
|
122
122
|
rendererService = inject(PrismRendererService);
|
|
123
123
|
pluginService = inject(PrismPluginService);
|
|
124
|
+
activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
|
|
124
125
|
getCustomControl(input) {
|
|
125
126
|
return (this.pluginService.controls().find((ctrl) => ctrl.matchType(input)) ??
|
|
126
127
|
null);
|
|
@@ -135,7 +136,7 @@ export class PrismControlsPanelComponent {
|
|
|
135
136
|
return String(val ?? '');
|
|
136
137
|
}
|
|
137
138
|
static ɵfac = function PrismControlsPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismControlsPanelComponent)(); };
|
|
138
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismControlsPanelComponent, selectors: [["prism-controls-panel"]], decls: 1, vars: 1, consts: [[1, "ctl-panel"], [1, "ctl-row"], [1, "ctl-empty"], [3, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "ctl-label"], [1, "ctl-name"], [1, "ctl-type"], [1, "ctl-input"], [3, "value"], [3, "value", "options"], [3, "valueChange", "value"], [3, "valueChange", "value", "options"]], template: function PrismControlsPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismControlsPanelComponent, selectors: [["prism-controls-panel"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 1, vars: 1, consts: [[1, "ctl-panel"], [1, "ctl-row"], [1, "ctl-empty"], [3, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "ctl-label"], [1, "ctl-name"], [1, "ctl-type"], [1, "ctl-input"], [3, "value"], [3, "value", "options"], [3, "valueChange", "value"], [3, "valueChange", "value", "options"]], template: function PrismControlsPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
139
140
|
i0.ɵɵconditionalCreate(0, PrismControlsPanelComponent_Conditional_0_Template, 4, 1, "div", 0);
|
|
140
141
|
} if (rf & 2) {
|
|
141
142
|
let tmp_0_0;
|
|
@@ -213,5 +214,5 @@ export class PrismControlsPanelComponent {
|
|
|
213
214
|
</div>
|
|
214
215
|
}
|
|
215
216
|
`, styles: ["\n .ctl-panel {\n overflow-y: auto;\n height: 100%;\n }\n\n .ctl-row {\n display: grid;\n grid-template-columns: 180px 1fr;\n align-items: center;\n gap: 12px;\n padding: 8px 20px;\n min-height: 40px;\n border-bottom: 1px solid var(--prism-border);\n }\n .ctl-row:hover {\n background: color-mix(in srgb, var(--prism-primary) 3%, transparent);\n }\n\n .ctl-label {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n .ctl-name {\n font-size: 13px;\n color: var(--prism-text);\n font-weight: 500;\n }\n .ctl-type {\n font-family: var(--font-mono);\n font-size: 10.5px;\n color: var(--prism-text-ghost);\n }\n .ctl-type b {\n color: var(--prism-primary);\n font-weight: 500;\n }\n\n .ctl-input {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n }\n\n .ctl-empty {\n color: var(--prism-text-ghost);\n font-size: 13px;\n margin: 0;\n padding: 16px 20px;\n }\n "] }]
|
|
216
|
-
}], null,
|
|
217
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismControlsPanelComponent, { className: "PrismControlsPanelComponent", filePath: "app/panels/controls/prism-controls-panel.component.ts", lineNumber:
|
|
217
|
+
}], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
|
|
218
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismControlsPanelComponent, { className: "PrismControlsPanelComponent", filePath: "app/panels/controls/prism-controls-panel.component.ts", lineNumber: 140 }); })();
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import type { RuntimeComponent } from '../../../plugin/plugin.types.js';
|
|
1
2
|
import { PrismEventLogService } from '../../services/prism-event-log.service.js';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class PrismEventsPanelComponent {
|
|
4
5
|
protected readonly eventLogService: PrismEventLogService;
|
|
6
|
+
readonly activeComponent: import("@angular/core").InputSignal<RuntimeComponent | null>;
|
|
5
7
|
protected formatTime(ts: number): string;
|
|
6
8
|
protected padIdx(n: number): string;
|
|
7
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismEventsPanelComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PrismEventsPanelComponent, "prism-events-panel", never, {}, {}, never, never, true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrismEventsPanelComponent, "prism-events-panel", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=prism-events-panel.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-events-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/events/prism-events-panel.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;;AAGjF,qBA+Ea,yBAAyB;IACpC,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAElE,SAAS,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAQxC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"prism-events-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/events/prism-events-panel.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;;AAGjF,qBA+Ea,yBAAyB;IACpC,SAAS,CAAC,QAAQ,CAAC,eAAe,uBAAgC;IAElE,QAAQ,CAAC,eAAe,+DAAwC;IAEhE,SAAS,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAQxC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;yCAbxB,yBAAyB;2CAAzB,yBAAyB;CAgBrC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, inject, ChangeDetectionStrategy } from '@angular/core';
|
|
1
|
+
import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { PrismEventLogService } from '../../services/prism-event-log.service.js';
|
|
3
3
|
import { PrismJsonNodeComponent } from './prism-json-node.component.js';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -36,6 +36,7 @@ function PrismEventsPanelComponent_ForEmpty_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
36
36
|
} }
|
|
37
37
|
export class PrismEventsPanelComponent {
|
|
38
38
|
eventLogService = inject(PrismEventLogService);
|
|
39
|
+
activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
|
|
39
40
|
formatTime(ts) {
|
|
40
41
|
const d = new Date(ts);
|
|
41
42
|
return d.toLocaleTimeString('en-US', {
|
|
@@ -47,7 +48,7 @@ export class PrismEventsPanelComponent {
|
|
|
47
48
|
return String(n).padStart(3, '0');
|
|
48
49
|
}
|
|
49
50
|
static ɵfac = function PrismEventsPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismEventsPanelComponent)(); };
|
|
50
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismEventsPanelComponent, selectors: [["prism-events-panel"]], decls: 5, vars: 1, consts: [[1, "ev-panel"], [1, "ev-body"], [1, "ev"], [1, "ev-empty"], [1, "ev-time"], [1, "ev-idx"], [1, "ev-name"], [1, "ev-args"], [3, "value"]], template: function PrismEventsPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismEventsPanelComponent, selectors: [["prism-events-panel"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 5, vars: 1, consts: [[1, "ev-panel"], [1, "ev-body"], [1, "ev"], [1, "ev-empty"], [1, "ev-time"], [1, "ev-idx"], [1, "ev-name"], [1, "ev-args"], [3, "value"]], template: function PrismEventsPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
51
52
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
52
53
|
i0.ɵɵrepeaterCreate(2, PrismEventsPanelComponent_For_3_Template, 9, 4, "div", 2, _forTrack0, false, PrismEventsPanelComponent_ForEmpty_4_Template, 2, 0, "p", 3);
|
|
53
54
|
i0.ɵɵelementEnd()();
|
|
@@ -77,5 +78,5 @@ export class PrismEventsPanelComponent {
|
|
|
77
78
|
</div>
|
|
78
79
|
</div>
|
|
79
80
|
`, styles: ["\n .ev-panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .ev-body {\n padding: 6px 0;\n overflow-y: auto;\n flex: 1;\n }\n\n .ev {\n display: grid;\n grid-template-columns: auto auto 1fr auto;\n align-items: center;\n gap: 12px;\n padding: 6px 20px;\n font-family: var(--font-mono);\n font-size: 12px;\n border-bottom: 1px solid var(--prism-border);\n min-height: 32px;\n }\n .ev:hover {\n background: color-mix(in srgb, var(--prism-primary) 3%, transparent);\n }\n\n .ev-time {\n color: var(--prism-text-ghost);\n font-size: 11px;\n }\n .ev-idx {\n color: var(--prism-text-muted);\n font-size: 11px;\n }\n .ev-name {\n color: var(--prism-primary);\n font-weight: 500;\n }\n .ev-args {\n color: var(--prism-text-2);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .ev-empty {\n color: var(--prism-text-ghost);\n font-size: 13px;\n padding: 16px 20px;\n margin: 0;\n }\n "] }]
|
|
80
|
-
}], null,
|
|
81
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismEventsPanelComponent, { className: "PrismEventsPanelComponent", filePath: "app/panels/events/prism-events-panel.component.ts", lineNumber:
|
|
81
|
+
}], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
|
|
82
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismEventsPanelComponent, { className: "PrismEventsPanelComponent", filePath: "app/panels/events/prism-events-panel.component.ts", lineNumber: 85 }); })();
|
|
@@ -39,7 +39,7 @@ export function createChangeHandler(options) {
|
|
|
39
39
|
function handleChange(filename) {
|
|
40
40
|
if (disposed)
|
|
41
41
|
return;
|
|
42
|
-
if (filename && !/\.
|
|
42
|
+
if (filename && !/\.ts$/.test(filename))
|
|
43
43
|
return;
|
|
44
44
|
if (timer)
|
|
45
45
|
clearTimeout(timer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAIV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAIV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA0UtD,wBAAgB,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAUvD"}
|
|
@@ -88,12 +88,25 @@ function addPrismAppProject(options) {
|
|
|
88
88
|
allowedCommonJsDependencies: ['highlight.js'],
|
|
89
89
|
preserveSymlinks: true,
|
|
90
90
|
},
|
|
91
|
+
configurations: {
|
|
92
|
+
production: {
|
|
93
|
+
outputHashing: 'all',
|
|
94
|
+
},
|
|
95
|
+
development: {
|
|
96
|
+
outputHashing: 'none',
|
|
97
|
+
optimization: false,
|
|
98
|
+
sourceMap: true,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
defaultConfiguration: 'production',
|
|
91
102
|
},
|
|
92
103
|
serve: {
|
|
93
104
|
builder: '@angular-devkit/build-angular:dev-server',
|
|
94
105
|
options: {
|
|
95
|
-
buildTarget: `${prismProjectName}:build`,
|
|
106
|
+
buildTarget: `${prismProjectName}:build:development`,
|
|
96
107
|
port,
|
|
108
|
+
hmr: true,
|
|
109
|
+
liveReload: true,
|
|
97
110
|
},
|
|
98
111
|
},
|
|
99
112
|
},
|
package/package.json
CHANGED