@bimetal/output-angular-components 0.0.0-stage → 0.44.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/LICENSE +57 -0
- package/README.md +7 -2
- package/dist/components/OutputView.d.ts +30 -0
- package/dist/components/OutputView.d.ts.map +1 -0
- package/dist/components/OutputView.js +180 -0
- package/dist/components/OutputView.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/index.css +3 -0
- package/dist/styles/index.css.d.ts +3 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Copyright 2026 Andreas Biederbeck
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
|
|
5
|
+
Version 2.0, January 2004
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/
|
|
8
|
+
|
|
9
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
10
|
+
|
|
11
|
+
1. Definitions.
|
|
12
|
+
|
|
13
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
18
|
+
|
|
19
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
20
|
+
|
|
21
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
22
|
+
|
|
23
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
24
|
+
|
|
25
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
26
|
+
|
|
27
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
28
|
+
|
|
29
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
30
|
+
|
|
31
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
32
|
+
|
|
33
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
34
|
+
|
|
35
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
36
|
+
|
|
37
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
38
|
+
|
|
39
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
40
|
+
|
|
41
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
42
|
+
|
|
43
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
44
|
+
|
|
45
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
46
|
+
|
|
47
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
48
|
+
|
|
49
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
50
|
+
|
|
51
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
52
|
+
|
|
53
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
54
|
+
|
|
55
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
56
|
+
|
|
57
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bimetal/output-angular-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Part of the BIMETAL output family (bimetal #624): a thin angular binding over `@bimetal/output-headless`.
|
|
4
|
+
It renders the controller snapshot as the canonical `.bm-output*` DOM — excerpt first, one
|
|
5
|
+
`.bm-output__section` per section with its title as a `button.bm-output__toggle` (`aria-expanded`),
|
|
6
|
+
collapsed sections without lines, the truncation marker always visible without a toggle, ANSI colours as
|
|
7
|
+
class modifiers (`.bm-output__span--fg-<name>` / `--bg-<name>` / `--bold`). Every decision lives in the
|
|
8
|
+
controller; the look comes from `@bimetal/output-themes` (`./styles`).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnDestroy, OnInit, type Signal } from '@angular/core';
|
|
2
|
+
import type { AnsiSpan, OutputController, OutputSnapshot } from '@bimetal/output-headless';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The Angular output view — a thin, standalone-component binding over the canonical
|
|
6
|
+
* `@bimetal/output-headless` controller. Renders the canonical `.bm-output*` DOM
|
|
7
|
+
* (`test-vertrag/packages/output/dom-vertrag.ts`). Every decision (ANSI parsing, sections, what is
|
|
8
|
+
* collapsed, what goes into the excerpt) lives in the controller — this binding only subscribes,
|
|
9
|
+
* renders the snapshot and forwards a section toggle.
|
|
10
|
+
*
|
|
11
|
+
* Bound-only: the app OWNS the controller (it is what you `setText()` on) — mirroring the React view.
|
|
12
|
+
*
|
|
13
|
+
* The template keeps each line's spans adjacent: whitespace between them would become line text.
|
|
14
|
+
*/
|
|
15
|
+
export declare class OutputViewComponent implements OnInit, OnDestroy {
|
|
16
|
+
/** The owned output controller to render + subscribe to (bound-only). */
|
|
17
|
+
controller: OutputController;
|
|
18
|
+
/** Render the dark palette (`data-theme="dark"` on the root `.bm-output`). */
|
|
19
|
+
darkMode: boolean;
|
|
20
|
+
private readonly zone;
|
|
21
|
+
private unsub?;
|
|
22
|
+
snapshot: Signal<OutputSnapshot>;
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
/** Colours and bold as class modifiers, never as inline values. */
|
|
26
|
+
spanClass(s: AnsiSpan): string;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OutputViewComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OutputViewComponent, "bm-output-view", never, { "controller": { "alias": "controller"; "required": true; }; "darkMode": { "alias": "darkMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=OutputView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputView.d.ts","sourceRoot":"","sources":["../../src/components/OutputView.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,SAAS,EAAE,MAAM,EAAkB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;;AAE3F;;;;;;;;;;GAUG;AACH,qBA6Ba,mBAAoB,YAAW,MAAM,EAAE,SAAS;IAC3D,yEAAyE;IAC9C,UAAU,EAAG,gBAAgB,CAAC;IACzD,8EAA8E;IACrE,QAAQ,UAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkB;IACvC,OAAO,CAAC,KAAK,CAAC,CAAa;IAC3B,QAAQ,EAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAElC,QAAQ,IAAI,IAAI;IAOhB,WAAW,IAAI,IAAI;IAInB,mEAAmE;IACnE,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM;yCAtBnB,mBAAmB;2CAAnB,mBAAmB;CA8B/B"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { Component, Input, NgZone, inject, signal } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
const _forTrack0 = ($index, $item) => $item.id;
|
|
4
|
+
const _forTrack1 = ($index, $item) => $item.index;
|
|
5
|
+
function OutputViewComponent_For_3_For_4_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
i0.ɵɵdomElementStart(0, "span");
|
|
7
|
+
i0.ɵɵtext(1);
|
|
8
|
+
i0.ɵɵdomElementEnd();
|
|
9
|
+
} if (rf & 2) {
|
|
10
|
+
const s_r1 = ctx.$implicit;
|
|
11
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
12
|
+
i0.ɵɵclassMap(ctx_r1.spanClass(s_r1));
|
|
13
|
+
i0.ɵɵadvance();
|
|
14
|
+
i0.ɵɵtextInterpolate(s_r1.text);
|
|
15
|
+
} }
|
|
16
|
+
function OutputViewComponent_For_3_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵdomElementStart(0, "div", 5);
|
|
18
|
+
i0.ɵɵrepeaterCreate(1, OutputViewComponent_For_3_For_4_For_2_Template, 2, 3, "span", 3, i0.ɵɵrepeaterTrackByIndex);
|
|
19
|
+
i0.ɵɵdomElementEnd();
|
|
20
|
+
} if (rf & 2) {
|
|
21
|
+
const l_r3 = ctx.$implicit;
|
|
22
|
+
i0.ɵɵadvance();
|
|
23
|
+
i0.ɵɵrepeater(l_r3.spans);
|
|
24
|
+
} }
|
|
25
|
+
function OutputViewComponent_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
i0.ɵɵdomElementStart(0, "div", 2)(1, "div", 4);
|
|
27
|
+
i0.ɵɵtext(2);
|
|
28
|
+
i0.ɵɵdomElementEnd();
|
|
29
|
+
i0.ɵɵrepeaterCreate(3, OutputViewComponent_For_3_For_4_Template, 3, 0, "div", 5, _forTrack1);
|
|
30
|
+
i0.ɵɵdomElementEnd();
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
const ex_r4 = ctx.$implicit;
|
|
33
|
+
i0.ɵɵadvance(2);
|
|
34
|
+
i0.ɵɵtextInterpolate(ex_r4.title);
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵrepeater(ex_r4.lines);
|
|
37
|
+
} }
|
|
38
|
+
function OutputViewComponent_For_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
40
|
+
i0.ɵɵdomElementStart(0, "button", 7);
|
|
41
|
+
i0.ɵɵdomListener("click", function OutputViewComponent_For_5_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const sec_r6 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.controller.toggle(sec_r6.id)); });
|
|
42
|
+
i0.ɵɵtext(1);
|
|
43
|
+
i0.ɵɵdomElementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const sec_r6 = i0.ɵɵnextContext().$implicit;
|
|
46
|
+
i0.ɵɵattribute("aria-expanded", !sec_r6.collapsed);
|
|
47
|
+
i0.ɵɵadvance();
|
|
48
|
+
i0.ɵɵtextInterpolate(sec_r6.title);
|
|
49
|
+
} }
|
|
50
|
+
function OutputViewComponent_For_5_Conditional_2_For_1_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
i0.ɵɵdomElementStart(0, "span");
|
|
52
|
+
i0.ɵɵtext(1);
|
|
53
|
+
i0.ɵɵdomElementEnd();
|
|
54
|
+
} if (rf & 2) {
|
|
55
|
+
const s_r7 = ctx.$implicit;
|
|
56
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
57
|
+
i0.ɵɵclassMap(ctx_r1.spanClass(s_r7));
|
|
58
|
+
i0.ɵɵadvance();
|
|
59
|
+
i0.ɵɵtextInterpolate(s_r7.text);
|
|
60
|
+
} }
|
|
61
|
+
function OutputViewComponent_For_5_Conditional_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵdomElementStart(0, "div", 5);
|
|
63
|
+
i0.ɵɵrepeaterCreate(1, OutputViewComponent_For_5_Conditional_2_For_1_For_2_Template, 2, 3, "span", 3, i0.ɵɵrepeaterTrackByIndex);
|
|
64
|
+
i0.ɵɵdomElementEnd();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
const l_r8 = ctx.$implicit;
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵrepeater(l_r8.spans);
|
|
69
|
+
} }
|
|
70
|
+
function OutputViewComponent_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
i0.ɵɵrepeaterCreate(0, OutputViewComponent_For_5_Conditional_2_For_1_Template, 3, 0, "div", 5, _forTrack1);
|
|
72
|
+
} if (rf & 2) {
|
|
73
|
+
const sec_r6 = i0.ɵɵnextContext().$implicit;
|
|
74
|
+
i0.ɵɵrepeater(sec_r6.lines);
|
|
75
|
+
} }
|
|
76
|
+
function OutputViewComponent_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
77
|
+
i0.ɵɵdomElementStart(0, "div");
|
|
78
|
+
i0.ɵɵconditionalCreate(1, OutputViewComponent_For_5_Conditional_1_Template, 2, 2, "button", 6);
|
|
79
|
+
i0.ɵɵconditionalCreate(2, OutputViewComponent_For_5_Conditional_2_Template, 2, 0);
|
|
80
|
+
i0.ɵɵdomElementEnd();
|
|
81
|
+
} if (rf & 2) {
|
|
82
|
+
const sec_r6 = ctx.$implicit;
|
|
83
|
+
i0.ɵɵclassMap("bm-output__section bm-output__section--" + sec_r6.kind + (sec_r6.collapsed ? " bm-output__section--collapsed" : ""));
|
|
84
|
+
i0.ɵɵattribute("data-section-id", sec_r6.id);
|
|
85
|
+
i0.ɵɵadvance();
|
|
86
|
+
i0.ɵɵconditional(sec_r6.collapsible ? 1 : -1);
|
|
87
|
+
i0.ɵɵadvance();
|
|
88
|
+
i0.ɵɵconditional(!sec_r6.collapsed ? 2 : -1);
|
|
89
|
+
} }
|
|
90
|
+
/**
|
|
91
|
+
* The Angular output view — a thin, standalone-component binding over the canonical
|
|
92
|
+
* `@bimetal/output-headless` controller. Renders the canonical `.bm-output*` DOM
|
|
93
|
+
* (`test-vertrag/packages/output/dom-vertrag.ts`). Every decision (ANSI parsing, sections, what is
|
|
94
|
+
* collapsed, what goes into the excerpt) lives in the controller — this binding only subscribes,
|
|
95
|
+
* renders the snapshot and forwards a section toggle.
|
|
96
|
+
*
|
|
97
|
+
* Bound-only: the app OWNS the controller (it is what you `setText()` on) — mirroring the React view.
|
|
98
|
+
*
|
|
99
|
+
* The template keeps each line's spans adjacent: whitespace between them would become line text.
|
|
100
|
+
*/
|
|
101
|
+
export class OutputViewComponent {
|
|
102
|
+
/** The owned output controller to render + subscribe to (bound-only). */
|
|
103
|
+
controller;
|
|
104
|
+
/** Render the dark palette (`data-theme="dark"` on the root `.bm-output`). */
|
|
105
|
+
darkMode = false;
|
|
106
|
+
zone = inject(NgZone);
|
|
107
|
+
unsub;
|
|
108
|
+
snapshot;
|
|
109
|
+
ngOnInit() {
|
|
110
|
+
// BOUND: adapt the owned controller to a signal; never create/destroy/mutate it.
|
|
111
|
+
const sig = signal(this.controller.getSnapshot(), ...(ngDevMode ? [{ debugName: "sig" }] : []));
|
|
112
|
+
this.unsub = this.controller.subscribe(() => this.zone.run(() => sig.set(this.controller.getSnapshot())));
|
|
113
|
+
this.snapshot = sig;
|
|
114
|
+
}
|
|
115
|
+
ngOnDestroy() {
|
|
116
|
+
this.unsub?.();
|
|
117
|
+
}
|
|
118
|
+
/** Colours and bold as class modifiers, never as inline values. */
|
|
119
|
+
spanClass(s) {
|
|
120
|
+
return [
|
|
121
|
+
'bm-output__span',
|
|
122
|
+
s.color && `bm-output__span--fg-${s.color}`,
|
|
123
|
+
s.background && `bm-output__span--bg-${s.background}`,
|
|
124
|
+
s.bold && 'bm-output__span--bold',
|
|
125
|
+
].filter(Boolean).join(' ');
|
|
126
|
+
}
|
|
127
|
+
static ɵfac = function OutputViewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OutputViewComponent)(); };
|
|
128
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OutputViewComponent, selectors: [["bm-output-view"]], inputs: { controller: "controller", darkMode: "darkMode" }, decls: 6, vars: 1, consts: [[1, "bm-output"], [1, "bm-output__excerpts"], [1, "bm-output__excerpt"], [3, "class"], [1, "bm-output__excerpt-title"], [1, "bm-output__line"], ["type", "button", 1, "bm-output__toggle"], ["type", "button", 1, "bm-output__toggle", 3, "click"]], template: function OutputViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
130
|
+
i0.ɵɵrepeaterCreate(2, OutputViewComponent_For_3_Template, 5, 1, "div", 2, i0.ɵɵrepeaterTrackByIndex);
|
|
131
|
+
i0.ɵɵdomElementEnd();
|
|
132
|
+
i0.ɵɵrepeaterCreate(4, OutputViewComponent_For_5_Template, 3, 5, "div", 3, _forTrack0);
|
|
133
|
+
i0.ɵɵdomElementEnd();
|
|
134
|
+
} if (rf & 2) {
|
|
135
|
+
i0.ɵɵattribute("data-theme", ctx.darkMode ? "dark" : null);
|
|
136
|
+
i0.ɵɵadvance(2);
|
|
137
|
+
i0.ɵɵrepeater(ctx.snapshot().excerpts);
|
|
138
|
+
i0.ɵɵadvance(2);
|
|
139
|
+
i0.ɵɵrepeater(ctx.snapshot().sections);
|
|
140
|
+
} }, encapsulation: 2 });
|
|
141
|
+
}
|
|
142
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OutputViewComponent, [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{
|
|
145
|
+
selector: 'bm-output-view',
|
|
146
|
+
standalone: true,
|
|
147
|
+
template: `
|
|
148
|
+
<div class="bm-output" [attr.data-theme]="darkMode ? 'dark' : null">
|
|
149
|
+
<div class="bm-output__excerpts">
|
|
150
|
+
@for (ex of snapshot().excerpts; track $index) {
|
|
151
|
+
<div class="bm-output__excerpt">
|
|
152
|
+
<div class="bm-output__excerpt-title">{{ ex.title }}</div>
|
|
153
|
+
@for (l of ex.lines; track l.index) {<div class="bm-output__line">@for (s of l.spans; track $index) {<span [class]="spanClass(s)">{{ s.text }}</span>}</div>}
|
|
154
|
+
</div>
|
|
155
|
+
}
|
|
156
|
+
</div>
|
|
157
|
+
@for (sec of snapshot().sections; track sec.id) {
|
|
158
|
+
<div
|
|
159
|
+
[class]="'bm-output__section bm-output__section--' + sec.kind + (sec.collapsed ? ' bm-output__section--collapsed' : '')"
|
|
160
|
+
[attr.data-section-id]="sec.id"
|
|
161
|
+
>
|
|
162
|
+
@if (sec.collapsible) {
|
|
163
|
+
<button type="button" class="bm-output__toggle" [attr.aria-expanded]="!sec.collapsed" (click)="controller.toggle(sec.id)">{{ sec.title }}</button>
|
|
164
|
+
}
|
|
165
|
+
@if (!sec.collapsed) {
|
|
166
|
+
@for (l of sec.lines; track l.index) {<div class="bm-output__line">@for (s of l.spans; track $index) {<span [class]="spanClass(s)">{{ s.text }}</span>}</div>}
|
|
167
|
+
}
|
|
168
|
+
</div>
|
|
169
|
+
}
|
|
170
|
+
</div>
|
|
171
|
+
`,
|
|
172
|
+
}]
|
|
173
|
+
}], null, { controller: [{
|
|
174
|
+
type: Input,
|
|
175
|
+
args: [{ required: true }]
|
|
176
|
+
}], darkMode: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}] }); })();
|
|
179
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OutputViewComponent, { className: "OutputViewComponent", filePath: "components/outputview.ts", lineNumber: 44 }); })();
|
|
180
|
+
//# sourceMappingURL=OutputView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputView.js","sourceRoot":"","sources":["../../src/components/OutputView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAqB,MAAM,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;;;;;IAuBQ,+BAA6B;IAAA,YAAY;IAAA,oBAAO;;;;IAA1C,qCAAsB;IAAC,cAAY;IAAZ,+BAAY;;;IAAzG,iCAA6B;IAAA,kHAAoF;IAAA,oBAAM;;;IAA1F,cAAoF;IAApF,yBAAoF;;;IADtJ,AADF,iCAAgC,aACQ;IAAA,YAAc;IAAA,oBAAM;IAC1D,4FAA6J;IAC/J,oBAAM;;;IAFkC,eAAc;IAAd,iCAAc;IACpD,cAA6J;IAA7J,0BAA6J;;;;IAU7J,oCAA0H;IAApC,6OAAS,mCAAyB,KAAC;IAAC,YAAe;IAAA,oBAAS;;;;IAAxB,cAAe;IAAf,kCAAe;;;IAGnC,+BAA6B;IAAA,YAAY;IAAA,oBAAO;;;;IAA1C,qCAAsB;IAAC,cAAY;IAAZ,+BAAY;;;IAAzG,iCAA6B;IAAA,gIAAoF;IAAA,oBAAM;;;IAA1F,cAAoF;IAApF,yBAAoF;;;IAAvJ,0GAA8J;;;IAA9J,2BAA8J;;;IARlK,8BAGC;IACC,8FAAuB;IAGvB,iFAAsB;IAGxB,oBAAM;;;IATJ,mIAAwH;;IAGxH,cAEC;IAFD,6CAEC;IACD,cAEC;IAFD,4CAEC;;AAlCX;;;;;;;;;;GAUG;AA8BH,MAAM,OAAO,mBAAmB;IAC9B,yEAAyE;IAC9C,UAAU,CAAoB;IACzD,8EAA8E;IACrE,QAAQ,GAAG,KAAK,CAAC;IAET,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAc;IAC3B,QAAQ,CAA0B;IAElC,QAAQ;QACN,iFAAiF;QACjF,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,+CAAC,CAAC;QAClE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1G,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;IACtB,CAAC;IAED,WAAW;QACT,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;IACjB,CAAC;IAED,mEAAmE;IACnE,SAAS,CAAC,CAAW;QACnB,OAAO;YACL,iBAAiB;YACjB,CAAC,CAAC,KAAK,IAAI,uBAAuB,CAAC,CAAC,KAAK,EAAE;YAC3C,CAAC,CAAC,UAAU,IAAI,uBAAuB,CAAC,CAAC,UAAU,EAAE;YACrD,CAAC,CAAC,IAAI,IAAI,uBAAuB;SAClC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;6GA7BU,mBAAmB;6DAAnB,mBAAmB;YAxB1B,AADF,iCAAoE,aACjC;YAC/B,qGAKC;YACH,oBAAM;YACN,sFAYC;YACH,oBAAM;;;YApBF,eAKC;YALD,cAAA,cAAU,UAKT;YAEH,eAYC;YAZD,cAAA,cAAU,UAYT;;;iFAIM,mBAAmB;cA7B/B,SAAS;eAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;GAwBT;aACF;;kBAGE,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAExB,KAAK;;kFAJK,mBAAmB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @bimetal/output-angular-components
|
|
3
|
+
*
|
|
4
|
+
* Die Angular-Ansicht der Terminal- und Werkzeugausgabe (bimetal #624): ein dünnes Binding über
|
|
5
|
+
* `@bimetal/output-headless`, rendert den kanonischen `.bm-output*`-DOM.
|
|
6
|
+
*/
|
|
7
|
+
export { OutputViewComponent } from './components/OutputView.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @bimetal/output-angular-components
|
|
3
|
+
*
|
|
4
|
+
* Die Angular-Ansicht der Terminal- und Werkzeugausgabe (bimetal #624): ein dünnes Binding über
|
|
5
|
+
* `@bimetal/output-headless`, rendert den kanonischen `.bm-output*`-DOM.
|
|
6
|
+
*/
|
|
7
|
+
export { OutputViewComponent } from './components/OutputView.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bimetal/output-angular-components",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.44.0",
|
|
4
|
+
"description": "Default Angular view for terminal and tool output — a thin binding over the canonical output controller (@bimetal/output-headless): styled ANSI spans as class modifiers, collapsible sections with titled toggles, always-visible truncation marker, excerpt first. No domain dependency.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./styles": {
|
|
14
|
+
"types": "./dist/styles/index.css.d.ts",
|
|
15
|
+
"default": "./dist/styles/index.css"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"!**/*.tsbuildinfo"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "ngc -p tsconfig.json && node scripts/copy-css.mjs && node ../../../scripts/generate-css-stubs.mjs",
|
|
26
|
+
"typecheck": "ngc -p tsconfig.test.json --noEmit",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@bimetal/angular": "^0.44.0",
|
|
31
|
+
"@bimetal/output-headless": "^0.44.0",
|
|
32
|
+
"@bimetal/output-themes": "^0.44.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@angular/core": "^20.3.0",
|
|
36
|
+
"@angular/common": "^20.3.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@angular/common": "^20.3.34",
|
|
40
|
+
"@angular/compiler": "^20.3.34",
|
|
41
|
+
"@angular/compiler-cli": "^20.3.34",
|
|
42
|
+
"@angular/core": "^20.3.34",
|
|
43
|
+
"@angular/forms": "^20.3.34",
|
|
44
|
+
"@angular/platform-browser": "^20.3.34",
|
|
45
|
+
"happy-dom": "^18.0.1",
|
|
46
|
+
"typescript": "~5.8.3",
|
|
47
|
+
"vitest": "^5.0.0",
|
|
48
|
+
"vite": "^8.0.1"
|
|
49
|
+
},
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"**/*.css"
|
|
52
|
+
],
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"author": "Andreas Biederbeck",
|
|
55
|
+
"keywords": [
|
|
56
|
+
"terminal",
|
|
57
|
+
"ansi",
|
|
58
|
+
"log",
|
|
59
|
+
"output",
|
|
60
|
+
"angular",
|
|
61
|
+
"components"
|
|
62
|
+
]
|
|
63
|
+
}
|