@ng-prism/core 21.4.5 → 21.5.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/dist/app/canvas/prism-canvas-rulers.component.d.ts +16 -0
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-rulers.component.js +177 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +14 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.js +144 -0
- package/dist/app/canvas/prism-code-drawer.component.d.ts +12 -0
- package/dist/app/canvas/prism-code-drawer.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-code-drawer.component.js +114 -0
- package/dist/app/component-head/prism-component-head.component.d.ts +15 -0
- package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-component-head.component.js +207 -0
- package/dist/app/component-head/prism-stat.component.d.ts +10 -0
- package/dist/app/component-head/prism-stat.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-stat.component.js +52 -0
- package/dist/app/controls/boolean-control.component.d.ts.map +1 -1
- package/dist/app/controls/boolean-control.component.js +16 -44
- package/dist/app/controls/json-control.component.d.ts.map +1 -1
- package/dist/app/controls/json-control.component.js +33 -54
- package/dist/app/controls/number-control.component.d.ts.map +1 -1
- package/dist/app/controls/number-control.component.js +18 -35
- package/dist/app/controls/string-control.component.d.ts.map +1 -1
- package/dist/app/controls/string-control.component.js +14 -41
- package/dist/app/controls/union-control.component.d.ts.map +1 -1
- package/dist/app/controls/union-control.component.js +26 -50
- package/dist/app/directives/prism-resizer.directive.d.ts +14 -0
- package/dist/app/directives/prism-resizer.directive.d.ts.map +1 -0
- package/dist/app/directives/prism-resizer.directive.js +71 -0
- package/dist/app/header/prism-header.component.d.ts +3 -0
- package/dist/app/header/prism-header.component.d.ts.map +1 -1
- package/dist/app/header/prism-header.component.js +91 -215
- package/dist/app/icons/prism-icon.component.d.ts +10 -0
- package/dist/app/icons/prism-icon.component.d.ts.map +1 -0
- package/dist/app/icons/prism-icon.component.js +64 -0
- package/dist/app/index.d.ts +4 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +4 -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 +63 -69
- package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-core.plugin.js +1 -0
- package/dist/app/panels/a11y/a11y-keyboard.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.component.js +61 -100
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts +4 -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 +87 -11
- package/dist/app/panels/a11y/a11y-panel.component.d.ts +0 -2
- package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.js +70 -85
- package/dist/app/panels/a11y/a11y-score.component.d.ts +2 -1
- package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.js +55 -49
- package/dist/app/panels/a11y/a11y-sr.component.d.ts +1 -9
- package/dist/app/panels/a11y/a11y-sr.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-sr.component.js +60 -208
- package/dist/app/panels/a11y/a11y-tree.component.d.ts +2 -4
- package/dist/app/panels/a11y/a11y-tree.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-tree.component.js +92 -137
- package/dist/app/panels/a11y/a11y-violations.component.d.ts +2 -6
- package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-violations.component.js +126 -373
- package/dist/app/panels/controls/controls-plugin.d.ts.map +1 -1
- package/dist/app/panels/controls/controls-plugin.js +1 -0
- package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
- package/dist/app/panels/controls/prism-controls-panel.component.js +96 -88
- package/dist/app/panels/events/events-plugin.d.ts.map +1 -1
- package/dist/app/panels/events/events-plugin.js +1 -0
- package/dist/app/panels/events/prism-events-panel.component.d.ts +1 -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 +44 -46
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +7 -2
- 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 +102 -42
- package/dist/app/renderer/prism-renderer.component.d.ts +5 -6
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +84 -150
- package/dist/app/services/prism-canvas.service.d.ts +18 -0
- package/dist/app/services/prism-canvas.service.d.ts.map +1 -0
- package/dist/app/services/prism-canvas.service.js +63 -0
- package/dist/app/services/prism-theme.service.d.ts +13 -1
- package/dist/app/services/prism-theme.service.d.ts.map +1 -1
- package/dist/app/services/prism-theme.service.js +56 -9
- package/dist/app/shell/prism-shell.component.d.ts +1 -2
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +189 -178
- package/dist/app/sidebar/prism-sidebar.component.d.ts +16 -10
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +318 -204
- package/dist/app/theme/prism-default-theme.d.ts +1 -0
- package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
- package/dist/app/theme/prism-default-theme.js +53 -34
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts +13 -0
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -0
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +134 -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 +15 -11
- package/dist/decorator/showcase.decorator.d.ts +1 -3
- package/dist/decorator/showcase.decorator.d.ts.map +1 -1
- package/dist/decorator/showcase.decorator.js +2 -6
- package/dist/plugin/plugin.types.d.ts +1 -0
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,55 +1,38 @@
|
|
|
1
|
-
import { Component, input, output } from '@angular/core';
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input, output, } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
function NumberControlComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
4
|
-
i0.ɵɵdomElementStart(0, "code", 3);
|
|
5
|
-
i0.ɵɵtext(1);
|
|
6
|
-
i0.ɵɵdomElementEnd();
|
|
7
|
-
} if (rf & 2) {
|
|
8
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
9
|
-
i0.ɵɵadvance();
|
|
10
|
-
i0.ɵɵtextInterpolate(ctx_r0.typeName());
|
|
11
|
-
} }
|
|
12
3
|
export class NumberControlComponent {
|
|
13
4
|
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
14
5
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
15
6
|
typeName = input('', ...(ngDevMode ? [{ debugName: "typeName" }] : []));
|
|
16
7
|
valueChange = output();
|
|
17
8
|
static ɵfac = function NumberControlComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NumberControlComponent)(); };
|
|
18
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NumberControlComponent, selectors: [["prism-number-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"] }, outputs: { valueChange: "valueChange" }, decls:
|
|
19
|
-
i0.ɵɵdomElementStart(0, "div", 0)(1, "
|
|
20
|
-
i0.ɵɵ
|
|
21
|
-
i0.ɵɵdomElementEnd();
|
|
22
|
-
i0.ɵɵconditionalCreate(4, NumberControlComponent_Conditional_4_Template, 2, 1, "code", 3);
|
|
9
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NumberControlComponent, selectors: [["prism-number-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"] }, outputs: { valueChange: "valueChange" }, decls: 4, vars: 4, consts: [[1, "ctl-slider"], ["type", "range", 3, "input", "min", "max", "value"], [1, "ctl-slider-val"]], template: function NumberControlComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵdomElementStart(0, "div", 0)(1, "input", 1);
|
|
11
|
+
i0.ɵɵdomListener("input", function NumberControlComponent_Template_input_input_1_listener($event) { return ctx.valueChange.emit($event.target.valueAsNumber || 0); });
|
|
23
12
|
i0.ɵɵdomElementEnd();
|
|
24
|
-
i0.ɵɵdomElementStart(
|
|
25
|
-
i0.ɵɵ
|
|
13
|
+
i0.ɵɵdomElementStart(2, "span", 2);
|
|
14
|
+
i0.ɵɵtext(3);
|
|
26
15
|
i0.ɵɵdomElementEnd()();
|
|
27
16
|
} if (rf & 2) {
|
|
28
|
-
i0.ɵɵadvance(3);
|
|
29
|
-
i0.ɵɵtextInterpolate(ctx.label());
|
|
30
|
-
i0.ɵɵadvance();
|
|
31
|
-
i0.ɵɵconditional(ctx.typeName() ? 4 : -1);
|
|
32
17
|
i0.ɵɵadvance();
|
|
33
|
-
i0.ɵɵdomProperty("value", ctx.value());
|
|
34
|
-
i0.ɵɵ
|
|
35
|
-
|
|
18
|
+
i0.ɵɵdomProperty("min", 0)("max", 100)("value", ctx.value());
|
|
19
|
+
i0.ɵɵadvance(2);
|
|
20
|
+
i0.ɵɵtextInterpolate(ctx.value());
|
|
21
|
+
} }, styles: [".ctl-slider[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .ctl-slider[_ngcontent-%COMP%] input[type=range][_ngcontent-%COMP%] {\n flex: 1;\n -webkit-appearance: none;\n height: 4px;\n background: var(--prism-input-bg);\n border-radius: 2px;\n outline: none;\n }\n .ctl-slider[_ngcontent-%COMP%] input[type=range][_ngcontent-%COMP%]::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to));\n cursor: pointer;\n border: 2px solid var(--prism-bg-elevated);\n }\n .ctl-slider-val[_ngcontent-%COMP%] {\n font-family: var(--font-mono);\n font-size: 12px;\n color: var(--prism-text);\n min-width: 44px;\n text-align: right;\n }"], changeDetection: 0 });
|
|
36
22
|
}
|
|
37
23
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NumberControlComponent, [{
|
|
38
24
|
type: Component,
|
|
39
|
-
args: [{ selector: 'prism-number-control', standalone: true, template: `
|
|
40
|
-
<div class="
|
|
41
|
-
<div class="prism-number-control__label">
|
|
42
|
-
<span class="prism-number-control__label-text">{{ label() }}</span>
|
|
43
|
-
@if (typeName()) { <code class="prism-number-control__type">{{ typeName() }}</code> }
|
|
44
|
-
</div>
|
|
25
|
+
args: [{ selector: 'prism-number-control', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
26
|
+
<div class="ctl-slider">
|
|
45
27
|
<input
|
|
46
|
-
type="
|
|
47
|
-
|
|
48
|
-
[
|
|
28
|
+
type="range"
|
|
29
|
+
[min]="0"
|
|
30
|
+
[max]="100"
|
|
49
31
|
[value]="value()"
|
|
50
32
|
(input)="valueChange.emit($any($event.target).valueAsNumber || 0)"
|
|
51
33
|
/>
|
|
34
|
+
<span class="ctl-slider-val">{{ value() }}</span>
|
|
52
35
|
</div>
|
|
53
|
-
`, styles: ["\n .
|
|
36
|
+
`, styles: ["\n .ctl-slider {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .ctl-slider input[type=range] {\n flex: 1;\n -webkit-appearance: none;\n height: 4px;\n background: var(--prism-input-bg);\n border-radius: 2px;\n outline: none;\n }\n .ctl-slider input[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: linear-gradient(180deg, var(--prism-primary-from), var(--prism-primary-to));\n cursor: pointer;\n border: 2px solid var(--prism-bg-elevated);\n }\n .ctl-slider-val {\n font-family: var(--font-mono);\n font-size: 12px;\n color: var(--prism-text);\n min-width: 44px;\n text-align: right;\n }\n "] }]
|
|
54
37
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], typeName: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeName", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] }); })();
|
|
55
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NumberControlComponent, { className: "NumberControlComponent", filePath: "app/controls/number-control.component.ts", lineNumber:
|
|
38
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NumberControlComponent, { className: "NumberControlComponent", filePath: "app/controls/number-control.component.ts", lineNumber: 57 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-control.component.d.ts","sourceRoot":"","sources":["../../../src/app/controls/string-control.component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"string-control.component.d.ts","sourceRoot":"","sources":["../../../src/app/controls/string-control.component.ts"],"names":[],"mappings":";AAOA,qBAiCa,sBAAsB;IACjC,QAAQ,CAAC,KAAK,8CAAa;IAC3B,QAAQ,CAAC,KAAK,8CAAa;IAC3B,QAAQ,CAAC,QAAQ,8CAAa;IAC9B,QAAQ,CAAC,WAAW,mDAAoB;yCAJ7B,sBAAsB;2CAAtB,sBAAsB;CAKlC"}
|
|
@@ -1,55 +1,28 @@
|
|
|
1
|
-
import { Component, input, output } from '@angular/core';
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input, output, } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
function StringControlComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
4
|
-
i0.ɵɵdomElementStart(0, "code", 3);
|
|
5
|
-
i0.ɵɵtext(1);
|
|
6
|
-
i0.ɵɵdomElementEnd();
|
|
7
|
-
} if (rf & 2) {
|
|
8
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
9
|
-
i0.ɵɵadvance();
|
|
10
|
-
i0.ɵɵtextInterpolate(ctx_r0.typeName());
|
|
11
|
-
} }
|
|
12
3
|
export class StringControlComponent {
|
|
13
4
|
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
14
5
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
15
6
|
typeName = input('', ...(ngDevMode ? [{ debugName: "typeName" }] : []));
|
|
16
7
|
valueChange = output();
|
|
17
8
|
static ɵfac = function StringControlComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || StringControlComponent)(); };
|
|
18
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StringControlComponent, selectors: [["prism-string-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"] }, outputs: { valueChange: "valueChange" }, decls:
|
|
19
|
-
i0.ɵɵdomElementStart(0, "
|
|
20
|
-
i0.ɵɵ
|
|
9
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StringControlComponent, selectors: [["prism-string-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"] }, outputs: { valueChange: "valueChange" }, decls: 1, vars: 1, consts: [["type", "text", 1, "ctl-text", 3, "input", "value"]], template: function StringControlComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵdomElementStart(0, "input", 0);
|
|
11
|
+
i0.ɵɵdomListener("input", function StringControlComponent_Template_input_input_0_listener($event) { return ctx.valueChange.emit($event.target.value); });
|
|
21
12
|
i0.ɵɵdomElementEnd();
|
|
22
|
-
i0.ɵɵconditionalCreate(4, StringControlComponent_Conditional_4_Template, 2, 1, "code", 3);
|
|
23
|
-
i0.ɵɵdomElementEnd();
|
|
24
|
-
i0.ɵɵdomElementStart(5, "input", 4);
|
|
25
|
-
i0.ɵɵdomListener("input", function StringControlComponent_Template_input_input_5_listener($event) { return ctx.valueChange.emit($event.target.value); });
|
|
26
|
-
i0.ɵɵdomElementEnd()();
|
|
27
13
|
} if (rf & 2) {
|
|
28
|
-
i0.ɵɵadvance(3);
|
|
29
|
-
i0.ɵɵtextInterpolate(ctx.label());
|
|
30
|
-
i0.ɵɵadvance();
|
|
31
|
-
i0.ɵɵconditional(ctx.typeName() ? 4 : -1);
|
|
32
|
-
i0.ɵɵadvance();
|
|
33
14
|
i0.ɵɵdomProperty("value", ctx.value());
|
|
34
|
-
|
|
35
|
-
} }, styles: [".prism-string-control[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 16px;\n min-height: 36px;\n }\n\n .prism-string-control__label[_ngcontent-%COMP%] {\n flex-shrink: 0;\n width: 140px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 1px;\n }\n .prism-string-control__label-text[_ngcontent-%COMP%] {\n font-size: 13px;\n font-family: var(--prism-font-sans);\n color: var(--prism-text-muted);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .prism-string-control__type[_ngcontent-%COMP%] {\n font-size: 10px;\n font-family: var(--prism-font-mono, monospace);\n color: var(--prism-text-ghost);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .prism-string-control__input[_ngcontent-%COMP%] {\n flex: 1;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: var(--prism-radius-sm);\n color: var(--prism-text);\n font-family: var(--prism-font-sans);\n padding: 4px 8px;\n font-size: 13px;\n min-width: 0;\n box-sizing: border-box;\n transition: border-color 0.15s;\n }\n\n .prism-string-control__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--prism-primary);\n box-shadow: 0 0 0 2px var(--prism-glow);\n }"] });
|
|
15
|
+
} }, styles: [".ctl-text[_ngcontent-%COMP%] {\n height: 30px;\n padding: 0 10px;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: var(--radius-sm);\n color: var(--prism-text);\n font-size: 13px;\n font-family: var(--font-sans);\n flex: 1;\n min-width: 0;\n outline: none;\n transition: border-color var(--dur-fast), box-shadow var(--dur-fast);\n }\n .ctl-text[_ngcontent-%COMP%]:focus {\n border-color: var(--prism-primary);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--prism-primary) 30%, transparent);\n }"], changeDetection: 0 });
|
|
36
16
|
}
|
|
37
17
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StringControlComponent, [{
|
|
38
18
|
type: Component,
|
|
39
|
-
args: [{ selector: 'prism-string-control', standalone: true, template: `
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class="prism-string-control__input"
|
|
48
|
-
[attr.aria-label]="label()"
|
|
49
|
-
[value]="value()"
|
|
50
|
-
(input)="valueChange.emit($any($event.target).value)"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
`, styles: ["\n .prism-string-control {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 16px;\n min-height: 36px;\n }\n\n .prism-string-control__label {\n flex-shrink: 0;\n width: 140px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 1px;\n }\n .prism-string-control__label-text {\n font-size: 13px;\n font-family: var(--prism-font-sans);\n color: var(--prism-text-muted);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .prism-string-control__type {\n font-size: 10px;\n font-family: var(--prism-font-mono, monospace);\n color: var(--prism-text-ghost);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .prism-string-control__input {\n flex: 1;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: var(--prism-radius-sm);\n color: var(--prism-text);\n font-family: var(--prism-font-sans);\n padding: 4px 8px;\n font-size: 13px;\n min-width: 0;\n box-sizing: border-box;\n transition: border-color 0.15s;\n }\n\n .prism-string-control__input:focus {\n outline: none;\n border-color: var(--prism-primary);\n box-shadow: 0 0 0 2px var(--prism-glow);\n }\n "] }]
|
|
19
|
+
args: [{ selector: 'prism-string-control', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
20
|
+
<input
|
|
21
|
+
type="text"
|
|
22
|
+
class="ctl-text"
|
|
23
|
+
[value]="value()"
|
|
24
|
+
(input)="valueChange.emit($any($event.target).value)"
|
|
25
|
+
/>
|
|
26
|
+
`, styles: ["\n .ctl-text {\n height: 30px;\n padding: 0 10px;\n background: var(--prism-input-bg);\n border: 1px solid var(--prism-border);\n border-radius: var(--radius-sm);\n color: var(--prism-text);\n font-size: 13px;\n font-family: var(--font-sans);\n flex: 1;\n min-width: 0;\n outline: none;\n transition: border-color var(--dur-fast), box-shadow var(--dur-fast);\n }\n .ctl-text:focus {\n border-color: var(--prism-primary);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--prism-primary) 30%, transparent);\n }\n "] }]
|
|
54
27
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], typeName: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeName", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] }); })();
|
|
55
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StringControlComponent, { className: "StringControlComponent", filePath: "app/controls/string-control.component.ts", lineNumber:
|
|
28
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StringControlComponent, { className: "StringControlComponent", filePath: "app/controls/string-control.component.ts", lineNumber: 41 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union-control.component.d.ts","sourceRoot":"","sources":["../../../src/app/controls/union-control.component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"union-control.component.d.ts","sourceRoot":"","sources":["../../../src/app/controls/union-control.component.ts"],"names":[],"mappings":";AAOA,qBAgDa,qBAAqB;IAChC,QAAQ,CAAC,KAAK,8CAAa;IAC3B,QAAQ,CAAC,KAAK,8CAAa;IAC3B,QAAQ,CAAC,QAAQ,8CAAa;IAC9B,QAAQ,CAAC,OAAO,gDAAuB;IACvC,QAAQ,CAAC,WAAW,mDAAoB;yCAL7B,qBAAqB;2CAArB,qBAAqB;CAMjC"}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import { Component, input, output } from '@angular/core';
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input, output, } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
function
|
|
4
|
-
i0.ɵɵ
|
|
3
|
+
function UnionControlComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
4
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
5
|
+
i0.ɵɵdomElementStart(0, "button", 2);
|
|
6
|
+
i0.ɵɵdomListener("click", function UnionControlComponent_For_2_Template_button_click_0_listener() { const option_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.valueChange.emit(option_r2)); });
|
|
5
7
|
i0.ɵɵtext(1);
|
|
6
8
|
i0.ɵɵdomElementEnd();
|
|
7
9
|
} if (rf & 2) {
|
|
8
|
-
const
|
|
10
|
+
const option_r2 = ctx.$implicit;
|
|
11
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
12
|
+
i0.ɵɵclassProp("ctl-pill--active", option_r2 === ctx_r2.value());
|
|
9
13
|
i0.ɵɵadvance();
|
|
10
|
-
i0.ɵɵ
|
|
11
|
-
} }
|
|
12
|
-
function UnionControlComponent_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
14
|
-
i0.ɵɵdomElementStart(0, "button", 6);
|
|
15
|
-
i0.ɵɵdomListener("click", function UnionControlComponent_For_7_Template_button_click_0_listener() { const option_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.valueChange.emit(option_r3)); });
|
|
16
|
-
i0.ɵɵtext(1);
|
|
17
|
-
i0.ɵɵdomElementEnd();
|
|
18
|
-
} if (rf & 2) {
|
|
19
|
-
const option_r3 = ctx.$implicit;
|
|
20
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
-
i0.ɵɵclassProp("prism-union-control__option--active", option_r3 === ctx_r0.value());
|
|
22
|
-
i0.ɵɵadvance();
|
|
23
|
-
i0.ɵɵtextInterpolate(option_r3);
|
|
14
|
+
i0.ɵɵtextInterpolate1(" ", option_r2, " ");
|
|
24
15
|
} }
|
|
25
16
|
export class UnionControlComponent {
|
|
26
17
|
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
@@ -29,44 +20,29 @@ export class UnionControlComponent {
|
|
|
29
20
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
30
21
|
valueChange = output();
|
|
31
22
|
static ɵfac = function UnionControlComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UnionControlComponent)(); };
|
|
32
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnionControlComponent, selectors: [["prism-union-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"], options: [1, "options"] }, outputs: { valueChange: "valueChange" }, decls:
|
|
33
|
-
i0.ɵɵdomElementStart(0, "div", 0)
|
|
34
|
-
i0.ɵɵ
|
|
35
|
-
i0.ɵɵdomElementEnd();
|
|
36
|
-
i0.ɵɵconditionalCreate(4, UnionControlComponent_Conditional_4_Template, 2, 1, "code", 3);
|
|
23
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnionControlComponent, selectors: [["prism-union-control"]], inputs: { value: [1, "value"], label: [1, "label"], typeName: [1, "typeName"], options: [1, "options"] }, outputs: { valueChange: "valueChange" }, decls: 3, vars: 0, consts: [["role", "group", 1, "ctl-pills"], [1, "ctl-pill", 3, "ctl-pill--active"], [1, "ctl-pill", 3, "click"]], template: function UnionControlComponent_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
25
|
+
i0.ɵɵrepeaterCreate(1, UnionControlComponent_For_2_Template, 2, 3, "button", 1, i0.ɵɵrepeaterTrackByIdentity);
|
|
37
26
|
i0.ɵɵdomElementEnd();
|
|
38
|
-
i0.ɵɵdomElementStart(5, "div", 4);
|
|
39
|
-
i0.ɵɵrepeaterCreate(6, UnionControlComponent_For_7_Template, 2, 3, "button", 5, i0.ɵɵrepeaterTrackByIdentity);
|
|
40
|
-
i0.ɵɵdomElementEnd()();
|
|
41
27
|
} if (rf & 2) {
|
|
42
|
-
i0.ɵɵadvance(3);
|
|
43
|
-
i0.ɵɵtextInterpolate(ctx.label());
|
|
44
|
-
i0.ɵɵadvance();
|
|
45
|
-
i0.ɵɵconditional(ctx.typeName() ? 4 : -1);
|
|
46
|
-
i0.ɵɵadvance();
|
|
47
|
-
i0.ɵɵattribute("aria-label", ctx.label());
|
|
48
28
|
i0.ɵɵadvance();
|
|
49
29
|
i0.ɵɵrepeater(ctx.options());
|
|
50
|
-
} }, styles: [".
|
|
30
|
+
} }, styles: [".ctl-pills[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n flex-wrap: wrap;\n }\n .ctl-pill[_ngcontent-%COMP%] {\n height: 26px;\n padding: 0 10px;\n font-size: var(--fs-sm);\n font-weight: 500;\n border: 1px solid var(--prism-border);\n border-radius: 4px;\n color: var(--prism-text-muted);\n background: transparent;\n cursor: pointer;\n transition: all var(--dur-fast);\n font-family: var(--font-sans);\n }\n .ctl-pill[_ngcontent-%COMP%]:hover {\n color: var(--prism-text);\n border-color: var(--prism-border-strong);\n }\n .ctl-pill--active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--prism-primary) 15%, transparent);\n color: var(--prism-primary);\n border-color: color-mix(in srgb, var(--prism-primary) 40%, transparent);\n font-weight: 600;\n }"], changeDetection: 0 });
|
|
51
31
|
}
|
|
52
32
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnionControlComponent, [{
|
|
53
33
|
type: Component,
|
|
54
|
-
args: [{ selector: 'prism-union-control', standalone: true, template: `
|
|
55
|
-
<div class="
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
(click)="valueChange.emit(option)"
|
|
66
|
-
>{{ option }}</button>
|
|
67
|
-
}
|
|
68
|
-
</div>
|
|
34
|
+
args: [{ selector: 'prism-union-control', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
35
|
+
<div class="ctl-pills" role="group">
|
|
36
|
+
@for (option of options(); track option) {
|
|
37
|
+
<button
|
|
38
|
+
class="ctl-pill"
|
|
39
|
+
[class.ctl-pill--active]="option === value()"
|
|
40
|
+
(click)="valueChange.emit(option)"
|
|
41
|
+
>
|
|
42
|
+
{{ option }}
|
|
43
|
+
</button>
|
|
44
|
+
}
|
|
69
45
|
</div>
|
|
70
|
-
`, styles: ["\n .
|
|
46
|
+
`, styles: ["\n .ctl-pills {\n display: flex;\n gap: 4px;\n flex-wrap: wrap;\n }\n .ctl-pill {\n height: 26px;\n padding: 0 10px;\n font-size: var(--fs-sm);\n font-weight: 500;\n border: 1px solid var(--prism-border);\n border-radius: 4px;\n color: var(--prism-text-muted);\n background: transparent;\n cursor: pointer;\n transition: all var(--dur-fast);\n font-family: var(--font-sans);\n }\n .ctl-pill:hover {\n color: var(--prism-text);\n border-color: var(--prism-border-strong);\n }\n .ctl-pill--active {\n background: color-mix(in srgb, var(--prism-primary) 15%, transparent);\n color: var(--prism-primary);\n border-color: color-mix(in srgb, var(--prism-primary) 40%, transparent);\n font-weight: 600;\n }\n "] }]
|
|
71
47
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], typeName: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeName", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] }); })();
|
|
72
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnionControlComponent, { className: "UnionControlComponent", filePath: "app/controls/union-control.component.ts", lineNumber:
|
|
48
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnionControlComponent, { className: "UnionControlComponent", filePath: "app/controls/union-control.component.ts", lineNumber: 56 }); })();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class PrismResizerDirective {
|
|
3
|
+
readonly axis: import("@angular/core").InputSignal<"x" | "y">;
|
|
4
|
+
readonly min: import("@angular/core").InputSignal<number>;
|
|
5
|
+
readonly max: import("@angular/core").InputSignal<number>;
|
|
6
|
+
readonly value: import("@angular/core").InputSignal<number>;
|
|
7
|
+
readonly valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
8
|
+
private readonly el;
|
|
9
|
+
protected onMouseDown(e: MouseEvent): void;
|
|
10
|
+
protected onKeyDown(e: KeyboardEvent): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrismResizerDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PrismResizerDirective, "[prismResizer]", never, { "axis": { "alias": "axis"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=prism-resizer.directive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prism-resizer.directive.d.ts","sourceRoot":"","sources":["../../../src/app/directives/prism-resizer.directive.ts"],"names":[],"mappings":";AAEA,qBAYa,qBAAqB;IAChC,QAAQ,CAAC,IAAI,iDAA+B;IAC5C,QAAQ,CAAC,GAAG,8CAAc;IAC1B,QAAQ,CAAC,GAAG,8CAAc;IAC1B,QAAQ,CAAC,KAAK,8CAAY;IAC1B,QAAQ,CAAC,WAAW,mDAAoB;IAExC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAmC;IAEtD,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAwB1C,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;yCAjChC,qBAAqB;2CAArB,qBAAqB;CAmDjC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Directive, ElementRef, inject, input, output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class PrismResizerDirective {
|
|
4
|
+
axis = input.required(...(ngDevMode ? [{ debugName: "axis" }] : []));
|
|
5
|
+
min = input(200, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
6
|
+
max = input(600, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
7
|
+
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
8
|
+
valueChange = output();
|
|
9
|
+
el = inject((ElementRef));
|
|
10
|
+
onMouseDown(e) {
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
const startPos = this.axis() === 'x' ? e.clientX : e.clientY;
|
|
13
|
+
const startVal = this.value();
|
|
14
|
+
this.el.nativeElement.classList.add('active');
|
|
15
|
+
const onMove = (ev) => {
|
|
16
|
+
const delta = this.axis() === 'x' ? ev.clientX - startPos : startPos - ev.clientY;
|
|
17
|
+
const next = Math.max(this.min(), Math.min(this.max(), startVal + delta));
|
|
18
|
+
this.valueChange.emit(next);
|
|
19
|
+
};
|
|
20
|
+
const onUp = () => {
|
|
21
|
+
this.el.nativeElement.classList.remove('active');
|
|
22
|
+
document.removeEventListener('mousemove', onMove);
|
|
23
|
+
document.removeEventListener('mouseup', onUp);
|
|
24
|
+
};
|
|
25
|
+
document.addEventListener('mousemove', onMove);
|
|
26
|
+
document.addEventListener('mouseup', onUp);
|
|
27
|
+
}
|
|
28
|
+
onKeyDown(e) {
|
|
29
|
+
const step = 10;
|
|
30
|
+
const current = this.value();
|
|
31
|
+
let next = null;
|
|
32
|
+
if (this.axis() === 'x') {
|
|
33
|
+
if (e.key === 'ArrowRight')
|
|
34
|
+
next = current + step;
|
|
35
|
+
if (e.key === 'ArrowLeft')
|
|
36
|
+
next = current - step;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (e.key === 'ArrowUp')
|
|
40
|
+
next = current + step;
|
|
41
|
+
if (e.key === 'ArrowDown')
|
|
42
|
+
next = current - step;
|
|
43
|
+
}
|
|
44
|
+
if (next !== null) {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
this.valueChange.emit(Math.max(this.min(), Math.min(this.max(), next)));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static ɵfac = function PrismResizerDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismResizerDirective)(); };
|
|
50
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PrismResizerDirective, selectors: [["", "prismResizer", ""]], hostVars: 5, hostBindings: function PrismResizerDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
51
|
+
i0.ɵɵlistener("mousedown", function PrismResizerDirective_mousedown_HostBindingHandler($event) { return ctx.onMouseDown($event); })("keydown", function PrismResizerDirective_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });
|
|
52
|
+
} if (rf & 2) {
|
|
53
|
+
i0.ɵɵattribute("role", "separator")("aria-orientation", ctx.axis() === "x" ? "vertical" : "horizontal")("tabindex", "0");
|
|
54
|
+
i0.ɵɵstyleProp("cursor", ctx.axis() === "x" ? "col-resize" : "row-resize");
|
|
55
|
+
} }, inputs: { axis: [1, "axis"], min: [1, "min"], max: [1, "max"], value: [1, "value"] }, outputs: { valueChange: "valueChange" } });
|
|
56
|
+
}
|
|
57
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismResizerDirective, [{
|
|
58
|
+
type: Directive,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: '[prismResizer]',
|
|
61
|
+
standalone: true,
|
|
62
|
+
host: {
|
|
63
|
+
'[style.cursor]': 'axis() === "x" ? "col-resize" : "row-resize"',
|
|
64
|
+
'[attr.role]': '"separator"',
|
|
65
|
+
'[attr.aria-orientation]': 'axis() === "x" ? "vertical" : "horizontal"',
|
|
66
|
+
'(mousedown)': 'onMouseDown($event)',
|
|
67
|
+
'(keydown)': 'onKeyDown($event)',
|
|
68
|
+
'[attr.tabindex]': '"0"',
|
|
69
|
+
},
|
|
70
|
+
}]
|
|
71
|
+
}], null, { axis: [{ type: i0.Input, args: [{ isSignal: true, alias: "axis", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] }); })();
|
|
@@ -7,6 +7,9 @@ export declare class PrismHeaderComponent {
|
|
|
7
7
|
protected readonly themeService: PrismThemeService;
|
|
8
8
|
protected readonly logoUrl: import("@angular/core").Signal<string | null>;
|
|
9
9
|
protected readonly title: import("@angular/core").Signal<string>;
|
|
10
|
+
protected readonly subtitle: import("@angular/core").Signal<string | null>;
|
|
11
|
+
protected onGlobalKey(e: KeyboardEvent): void;
|
|
12
|
+
protected onSearchFocus(): void;
|
|
10
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrismHeaderComponent, never>;
|
|
11
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<PrismHeaderComponent, "prism-header", never, {}, {}, never, never, true, never>;
|
|
12
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prism-header.component.d.ts","sourceRoot":"","sources":["../../../src/app/header/prism-header.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prism-header.component.d.ts","sourceRoot":"","sources":["../../../src/app/header/prism-header.component.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;;AAEvE,qBAmLa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,SAAS,CAAC,QAAQ,CAAC,aAAa,qBAA8B;IAC9D,SAAS,CAAC,QAAQ,CAAC,YAAY,oBAA6B;IAE5D,SAAS,CAAC,QAAQ,CAAC,OAAO,gDAKvB;IAEH,SAAS,CAAC,QAAQ,CAAC,KAAK,yCAAmD;IAC3E,SAAS,CAAC,QAAQ,CAAC,QAAQ,gDAAgD;IAG3E,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;IAO7C,SAAS,CAAC,aAAa,IAAI,IAAI;yCAvBpB,oBAAoB;2CAApB,oBAAoB;CA0BhC"}
|