@lifecorner/angular-ui-kit 3.6.1 → 3.8.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 +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-character-svg.mjs +91 -0
- package/fesm2022/lifecorner-angular-ui-kit-character-svg.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-character.mjs +138 -0
- package/fesm2022/lifecorner-angular-ui-kit-character.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs +40 -5
- package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-document-viewer.mjs +2 -0
- package/fesm2022/lifecorner-angular-ui-kit-document-viewer.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-markdown.mjs +2 -0
- package/fesm2022/lifecorner-angular-ui-kit-markdown.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit.mjs +2 -0
- package/package.json +12 -1
- package/src/assets/README.md +4 -0
- package/src/assets/character/all-done-dark.svg +1 -0
- package/src/assets/character/all-done-light.svg +1 -0
- package/src/assets/character/calm-dark.svg +1 -0
- package/src/assets/character/calm-light.svg +1 -0
- package/src/assets/character/comforts-dark.svg +1 -0
- package/src/assets/character/comforts-light.svg +1 -0
- package/src/assets/character/connection-paused-dark.svg +1 -0
- package/src/assets/character/connection-paused-light.svg +1 -0
- package/src/assets/character/connects-dark.svg +1 -0
- package/src/assets/character/connects-light.svg +1 -0
- package/src/assets/character/discovered-dark.svg +1 -0
- package/src/assets/character/discovered-light.svg +1 -0
- package/src/assets/character/happy-dark.svg +1 -0
- package/src/assets/character/happy-light.svg +1 -0
- package/src/assets/character/hello-dark.svg +1 -0
- package/src/assets/character/hello-light.svg +1 -0
- package/src/assets/character/in-his-corner-dark.svg +1 -0
- package/src/assets/character/in-his-corner-light.svg +1 -0
- package/src/assets/character/resting-dark.svg +1 -0
- package/src/assets/character/resting-light.svg +1 -0
- package/src/assets/character/see-you-dark.svg +1 -0
- package/src/assets/character/see-you-light.svg +1 -0
- package/src/assets/character/shows-the-way-dark.svg +1 -0
- package/src/assets/character/shows-the-way-light.svg +1 -0
- package/src/assets/character/thinking-dark.svg +1 -0
- package/src/assets/character/thinking-light.svg +1 -0
- package/src/assets/character/welcomes-member-dark.svg +1 -0
- package/src/assets/character/welcomes-member-light.svg +1 -0
- package/src/styles/_horizon.scss +52 -0
- package/src/styles/horizon.figure.spec.ts +79 -0
- package/types/lifecorner-angular-ui-kit-character-svg.d.ts +44 -0
- package/types/lifecorner-angular-ui-kit-character.d.ts +104 -0
- package/types/lifecorner-angular-ui-kit-code-block.d.ts +27 -0
- package/types/lifecorner-angular-ui-kit.d.ts +2 -0
package/src/styles/_horizon.scss
CHANGED
|
@@ -31,6 +31,19 @@
|
|
|
31
31
|
* on the land add its height, e.g. 136 px on the phone)
|
|
32
32
|
* --lc-horizon-sun-radius the sun's radius (58 px phone, 70 · 90 · 120 · 166 px)
|
|
33
33
|
* --lc-horizon-sun-x the sun's centre from the block's left edge (72%)
|
|
34
|
+
* --lc-horizon-figure-size the figure's size in .lc-horizon__figure
|
|
35
|
+
* (64 px phone, 96 px from 1024, 128 px from 1920)
|
|
36
|
+
* --lc-horizon-figure-gap its right edge to the sun's left edge (16 px; 24 px from 1024)
|
|
37
|
+
*
|
|
38
|
+
* Figure (3.8, G-4): Edu on the line, left of the sun, in a DIRECT child with
|
|
39
|
+
* .lc-horizon__figure (lc-character, <img>, <picture>, or an element holding an
|
|
40
|
+
* inline <svg>), placed BEFORE .lc-horizon__land. His feet stand on the line
|
|
41
|
+
* (the box bottom 12.5 % of its size below it); the block's height above the
|
|
42
|
+
* line becomes max(sun + 22 px, figure + 8 px). Decorative, never a target:
|
|
43
|
+
*
|
|
44
|
+
* <div class="lc-horizon" aria-hidden="true">
|
|
45
|
+
* <lc-character class="lc-horizon__figure" pose="comforts" />
|
|
46
|
+
* </div>
|
|
34
47
|
*
|
|
35
48
|
* Colours: --color-background-low, --color-horizon-line, --color-land-1…3,
|
|
36
49
|
* --color-sun-1…3, --color-sun-ring, --color-sun-halo (theme tokens).
|
|
@@ -40,6 +53,8 @@
|
|
|
40
53
|
--_lc-horizon-land: var(--lc-horizon-land, 112px);
|
|
41
54
|
--_lc-horizon-r: var(--lc-horizon-sun-radius, 58px);
|
|
42
55
|
--_lc-horizon-x: var(--lc-horizon-sun-x, 72%);
|
|
56
|
+
--_lc-horizon-fig: var(--lc-horizon-figure-size, 64px);
|
|
57
|
+
--_lc-horizon-fig-gap: var(--lc-horizon-figure-gap, 16px);
|
|
43
58
|
|
|
44
59
|
position: relative;
|
|
45
60
|
flex: 1 0 auto;
|
|
@@ -84,6 +99,8 @@
|
|
|
84
99
|
@media (min-width: 1024px) {
|
|
85
100
|
--_lc-horizon-land: var(--lc-horizon-land, 100px);
|
|
86
101
|
--_lc-horizon-r: var(--lc-horizon-sun-radius, 70px);
|
|
102
|
+
--_lc-horizon-fig: var(--lc-horizon-figure-size, 96px);
|
|
103
|
+
--_lc-horizon-fig-gap: var(--lc-horizon-figure-gap, 24px);
|
|
87
104
|
}
|
|
88
105
|
|
|
89
106
|
@media (min-width: 1280px) {
|
|
@@ -99,6 +116,7 @@
|
|
|
99
116
|
@media (min-width: 1920px) {
|
|
100
117
|
--_lc-horizon-land: var(--lc-horizon-land, 184px);
|
|
101
118
|
--_lc-horizon-r: var(--lc-horizon-sun-radius, 166px);
|
|
119
|
+
--_lc-horizon-fig: var(--lc-horizon-figure-size, 128px);
|
|
102
120
|
}
|
|
103
121
|
|
|
104
122
|
// Windows high contrast and other forced-colour modes: no decoration.
|
|
@@ -113,3 +131,37 @@
|
|
|
113
131
|
position: absolute;
|
|
114
132
|
inset: auto 0 0;
|
|
115
133
|
}
|
|
134
|
+
|
|
135
|
+
// Edu on the horizon line (3.8, G-4): left of the sun, the feet on the line.
|
|
136
|
+
// Only a block WITH the figure gets the taller minimum; without it the block
|
|
137
|
+
// renders exactly as before.
|
|
138
|
+
.lc-horizon:has(> .lc-horizon__figure) {
|
|
139
|
+
min-height: calc(var(--_lc-horizon-land) + max(var(--_lc-horizon-r) + 22px, var(--_lc-horizon-fig) + 8px));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// The slot sizes the figure (an lc-character's `size` input doesn't apply).
|
|
143
|
+
// Its right edge sits the gap left of the sun's left edge; the box bottom lies
|
|
144
|
+
// 12.5 % of its size below the line, where the standing poses' feet end
|
|
145
|
+
// (y 87.5 of 100). Px, not rem: at 200 % text the figure keeps its size.
|
|
146
|
+
.lc-horizon__figure {
|
|
147
|
+
--lc-character-size: var(--_lc-horizon-fig);
|
|
148
|
+
|
|
149
|
+
position: absolute;
|
|
150
|
+
right: calc(100% - var(--_lc-horizon-x) + var(--_lc-horizon-r) + var(--_lc-horizon-fig-gap));
|
|
151
|
+
bottom: calc(var(--_lc-horizon-land) - var(--_lc-horizon-fig) * 0.125);
|
|
152
|
+
width: var(--_lc-horizon-fig);
|
|
153
|
+
height: var(--_lc-horizon-fig);
|
|
154
|
+
pointer-events: none;
|
|
155
|
+
|
|
156
|
+
// Decoration, like the horizon's own: dropped, its box kept.
|
|
157
|
+
@media (forced-colors: active) {
|
|
158
|
+
visibility: hidden;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// A <picture> or an element holding an inline <svg>.
|
|
163
|
+
.lc-horizon__figure > :is(img, svg) {
|
|
164
|
+
display: block;
|
|
165
|
+
width: 100%;
|
|
166
|
+
height: 100%;
|
|
167
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { compile } from 'sass';
|
|
2
|
+
import { resolve } from 'path';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The horizon's figure slot (3.8, G-4, AC-15 and AC-16 of request 005), read
|
|
6
|
+
* from the compiled CSS. The block without a figure is pinned by
|
|
7
|
+
* horizon.spec.ts, which this request leaves unchanged.
|
|
8
|
+
*/
|
|
9
|
+
const css = '\n' + compile(resolve(__dirname, '_horizon.scss')).css;
|
|
10
|
+
|
|
11
|
+
/** The declarations of the top-level rule whose selector is exactly `selector` (compiled rules start a line). */
|
|
12
|
+
function rule(selector: string): string {
|
|
13
|
+
const start = css.indexOf(`\n${selector} {`);
|
|
14
|
+
expect(start).toBeGreaterThan(-1);
|
|
15
|
+
return css.slice(start, css.indexOf('}', start));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe('.lc-horizon__figure (G-4)', () => {
|
|
19
|
+
it('takes the figure size and gap from custom properties: 64 px and 16 px on the phone', () => {
|
|
20
|
+
const base = rule('.lc-horizon');
|
|
21
|
+
expect(base).toMatch(/--_lc-horizon-fig:\s*var\(--lc-horizon-figure-size, 64px\)/);
|
|
22
|
+
expect(base).toMatch(/--_lc-horizon-fig-gap:\s*var\(--lc-horizon-figure-gap, 16px\)/);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it.each([
|
|
26
|
+
[1024, '96px', '24px'],
|
|
27
|
+
[1920, '128px', null],
|
|
28
|
+
])('steps up from %s px: size %s, gap %s', (width, size, gap) => {
|
|
29
|
+
const start = css.indexOf(`@media (min-width: ${width}px) {\n .lc-horizon {`);
|
|
30
|
+
expect(start).toBeGreaterThan(-1);
|
|
31
|
+
const step = css.slice(start, css.indexOf('}', start));
|
|
32
|
+
expect(step).toContain(`--_lc-horizon-fig: var(--lc-horizon-figure-size, ${size})`);
|
|
33
|
+
if (gap) expect(step).toContain(`--_lc-horizon-fig-gap: var(--lc-horizon-figure-gap, ${gap})`);
|
|
34
|
+
else expect(step).not.toContain('--_lc-horizon-fig-gap');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it.each([1280, 1440])('keeps 96 px and 24 px at %s px (no figure step there)', (width) => {
|
|
38
|
+
const start = css.indexOf(`@media (min-width: ${width}px) {\n .lc-horizon {`);
|
|
39
|
+
expect(css.slice(start, css.indexOf('}', start))).not.toContain('--_lc-horizon-fig');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('raises the minimum above the line to max(sun + 22 px, figure + 8 px) only with a figure child', () => {
|
|
43
|
+
expect(rule('.lc-horizon:has(> .lc-horizon__figure)')).toMatch(
|
|
44
|
+
/min-height:\s*calc\(var\(--_lc-horizon-land\) \+ max\(var\(--_lc-horizon-r\) \+ 22px, var\(--_lc-horizon-fig\) \+ 8px\)\)/,
|
|
45
|
+
);
|
|
46
|
+
// The block without the figure keeps land + sun + 22 px (horizon.spec.ts).
|
|
47
|
+
expect(rule('.lc-horizon')).toMatch(/min-height:\s*calc\(var\(--_lc-horizon-land\) \+ var\(--_lc-horizon-r\) \+ 22px\)/);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('places the figure left of the sun with the gap, its feet on the line, sized by the slot', () => {
|
|
51
|
+
const figure = rule('.lc-horizon__figure');
|
|
52
|
+
expect(figure).toMatch(/position:\s*absolute/);
|
|
53
|
+
expect(figure).toMatch(/right:\s*calc\(100% - var\(--_lc-horizon-x\) \+ var\(--_lc-horizon-r\) \+ var\(--_lc-horizon-fig-gap\)\)/);
|
|
54
|
+
expect(figure).toMatch(/bottom:\s*calc\(var\(--_lc-horizon-land\) - var\(--_lc-horizon-fig\) \* 0\.125\)/);
|
|
55
|
+
expect(figure).toMatch(/width:\s*var\(--_lc-horizon-fig\)/);
|
|
56
|
+
expect(figure).toMatch(/height:\s*var\(--_lc-horizon-fig\)/);
|
|
57
|
+
expect(figure).toMatch(/--lc-character-size:\s*var\(--_lc-horizon-fig\)/);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('AC-16: the figure is never a pointer target', () => {
|
|
61
|
+
expect(rule('.lc-horizon__figure')).toMatch(/pointer-events:\s*none/);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('drops the figure in forced colours, keeping its box', () => {
|
|
65
|
+
expect(css).toMatch(/@media \(forced-colors: active\) \{\s*\.lc-horizon__figure \{\s*visibility: hidden;/);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('fills the slot with a <picture>’s image or an inline <svg>', () => {
|
|
69
|
+
const child = rule('.lc-horizon__figure > :is(img, svg)');
|
|
70
|
+
expect(child).toMatch(/display:\s*block/);
|
|
71
|
+
expect(child).toMatch(/width:\s*100%/);
|
|
72
|
+
expect(child).toMatch(/height:\s*100%/);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('adds no motion and no raw colour', () => {
|
|
76
|
+
const figureCss = css.slice(css.indexOf('.lc-horizon:has('));
|
|
77
|
+
expect(figureCss).not.toMatch(/animation|transition|#[0-9a-f]{3,6}\b/i);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** One of a pose's two drawings: `light` for light surfaces, `dark` for dark ones. */
|
|
2
|
+
export type CharacterDrawing = 'light' | 'dark';
|
|
3
|
+
/** A pose's two drawings as SVG markup, each equal to its file `<pose>-<drawing>.svg`. */
|
|
4
|
+
export interface CharacterSvgPair {
|
|
5
|
+
readonly light: string;
|
|
6
|
+
readonly dark: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Edu's poses (3.8, gap G-4), in the order of the docs. `calm` is the neutral
|
|
10
|
+
* Edu; the post-only poses (peeks-around-corner, amazed, looks-ahead) are not shipped.
|
|
11
|
+
*/
|
|
12
|
+
export type CharacterPose = 'hello' | 'shows-the-way' | 'happy' | 'welcomes-member' | 'resting' | 'in-his-corner' | 'comforts' | 'all-done' | 'calm' | 'connects' | 'discovered' | 'thinking' | 'connection-paused' | 'see-you';
|
|
13
|
+
/** Every shipped pose, in the order of the docs. */
|
|
14
|
+
export declare const CHARACTER_POSES: readonly CharacterPose[];
|
|
15
|
+
/** hello (Hallo); dark drawn. */
|
|
16
|
+
export declare const CHARACTER_SVG_HELLO: CharacterSvgPair;
|
|
17
|
+
/** shows-the-way (Zeigt den Weg); dark drawn. */
|
|
18
|
+
export declare const CHARACTER_SVG_SHOWS_THE_WAY: CharacterSvgPair;
|
|
19
|
+
/** happy (Freut sich); dark drawn. */
|
|
20
|
+
export declare const CHARACTER_SVG_HAPPY: CharacterSvgPair;
|
|
21
|
+
/** welcomes-member (Begrüßt ein Mitglied); dark by the rule. */
|
|
22
|
+
export declare const CHARACTER_SVG_WELCOMES_MEMBER: CharacterSvgPair;
|
|
23
|
+
/** resting (Ruht sich aus); dark by the rule. */
|
|
24
|
+
export declare const CHARACTER_SVG_RESTING: CharacterSvgPair;
|
|
25
|
+
/** in-his-corner (Sitzt in seiner Ecke); dark by the rule. */
|
|
26
|
+
export declare const CHARACTER_SVG_IN_HIS_CORNER: CharacterSvgPair;
|
|
27
|
+
/** comforts (Tröstet); dark by the rule. */
|
|
28
|
+
export declare const CHARACTER_SVG_COMFORTS: CharacterSvgPair;
|
|
29
|
+
/** all-done (Erledigt); dark by the rule. */
|
|
30
|
+
export declare const CHARACTER_SVG_ALL_DONE: CharacterSvgPair;
|
|
31
|
+
/** calm (ruhig); dark drawn. */
|
|
32
|
+
export declare const CHARACTER_SVG_CALM: CharacterSvgPair;
|
|
33
|
+
/** connects (Verbindet); dark by the rule. */
|
|
34
|
+
export declare const CHARACTER_SVG_CONNECTS: CharacterSvgPair;
|
|
35
|
+
/** discovered (Hat etwas entdeckt); dark by the rule. */
|
|
36
|
+
export declare const CHARACTER_SVG_DISCOVERED: CharacterSvgPair;
|
|
37
|
+
/** thinking (Denkt nach); dark by the rule. */
|
|
38
|
+
export declare const CHARACTER_SVG_THINKING: CharacterSvgPair;
|
|
39
|
+
/** connection-paused (Verbindung pausiert); dark by the rule. */
|
|
40
|
+
export declare const CHARACTER_SVG_CONNECTION_PAUSED: CharacterSvgPair;
|
|
41
|
+
/** see-you (Bis bald); dark by the rule. */
|
|
42
|
+
export declare const CHARACTER_SVG_SEE_YOU: CharacterSvgPair;
|
|
43
|
+
/** Every pose's light and dark drawing, keyed by pose. */
|
|
44
|
+
export declare const CHARACTER_SVG: Readonly<Record<CharacterPose, CharacterSvgPair>>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { InjectionToken } from "@angular/core";
|
|
3
|
+
import { CharacterPose, CharacterPose as CharacterPose$1 } from "@lifecorner/angular-ui-kit/character-svg";
|
|
4
|
+
/** Edge of the figure's square box in px. `--lc-character-size` overrides it. */
|
|
5
|
+
export type CharacterSize = 48 | 64 | 80 | 96 | 128;
|
|
6
|
+
/**
|
|
7
|
+
* Which drawing to show.
|
|
8
|
+
* - `auto`: the root theme picks the light or the dark drawing.
|
|
9
|
+
* - `dark`: the on-dark drawing in both themes, for a fixed dark surface.
|
|
10
|
+
*/
|
|
11
|
+
export type CharacterColorMode = 'auto' | 'dark';
|
|
12
|
+
/**
|
|
13
|
+
* The URL folder that holds the pose files (`<pose>-light.svg`,
|
|
14
|
+
* `<pose>-dark.svg`, copied from the package's `assets/character/`). Follows
|
|
15
|
+
* `LC_LOGO_BASE_PATH` (default `/assets` → `/assets/character`) unless you
|
|
16
|
+
* provide it yourself.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* providers: [{ provide: LC_CHARACTER_BASE_PATH, useValue: '/static/edu' }]
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const LC_CHARACTER_BASE_PATH: InjectionToken<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Edu, the LifeCorner character, in one of his poses (3.8, gap G-4).
|
|
26
|
+
*
|
|
27
|
+
* Renders the pose files as `<img>` (no inline SVG, no Trusted Types policy),
|
|
28
|
+
* in a square box that is sized by CSS before any JavaScript runs, so the
|
|
29
|
+
* figure prerenders and never shifts the layout. Decorative by default
|
|
30
|
+
* (`aria-hidden="true"`); `ariaLabel` makes it an image with that name. The
|
|
31
|
+
* figure is still: nothing animates.
|
|
32
|
+
*
|
|
33
|
+
* Without Angular, use the files (`@lifecorner/angular-ui-kit/assets/character/<pose>-<light|dark>.svg`)
|
|
34
|
+
* or the strings of `@lifecorner/angular-ui-kit/character-svg`.
|
|
35
|
+
*
|
|
36
|
+
* @example Decorative, follows the app theme
|
|
37
|
+
* ```html
|
|
38
|
+
* <lc-character pose="comforts" size="96" />
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example On a fixed dark surface, with a name
|
|
42
|
+
* ```html
|
|
43
|
+
* <lc-character pose="hello" colorMode="dark" ariaLabel="Edu winkt" />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class CharacterComponent {
|
|
47
|
+
/**
|
|
48
|
+
* Which pose to draw: hello, shows-the-way, happy, welcomes-member, resting,
|
|
49
|
+
* in-his-corner, comforts, all-done, calm, connects, discovered, thinking,
|
|
50
|
+
* connection-paused, see-you. `calm` is the neutral Edu.
|
|
51
|
+
* @default 'calm'
|
|
52
|
+
*/
|
|
53
|
+
readonly pose: import("@angular/core").InputSignal<CharacterPose$1>;
|
|
54
|
+
/**
|
|
55
|
+
* Edge of the square box in px: 48, 64, 80, 96 or 128 (`size="96"` works
|
|
56
|
+
* too). `--lc-character-size` overrides it; set that hook per breakpoint in
|
|
57
|
+
* CSS.
|
|
58
|
+
* @default 64
|
|
59
|
+
*/
|
|
60
|
+
readonly size: import("@angular/core").InputSignalWithTransform<CharacterSize, CharacterSize | "48" | "64" | "80" | "96" | "128">;
|
|
61
|
+
/**
|
|
62
|
+
* Which drawing to show.
|
|
63
|
+
* - `auto`: both drawings are in the DOM and the root theme shows one
|
|
64
|
+
* (light, dark, and system with the OS setting), without JavaScript.
|
|
65
|
+
* - `dark`: only the on-dark drawing, in both themes, for a fixed dark
|
|
66
|
+
* surface such as the hero band.
|
|
67
|
+
* @default 'auto'
|
|
68
|
+
*/
|
|
69
|
+
readonly colorMode: import("@angular/core").InputSignal<CharacterColorMode>;
|
|
70
|
+
/**
|
|
71
|
+
* Empty: decorative (`aria-hidden="true"`). Set: `role="img"` with this
|
|
72
|
+
* name. This is your own translated text; the kit ships none.
|
|
73
|
+
* @default ''
|
|
74
|
+
*/
|
|
75
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
76
|
+
private readonly basePath;
|
|
77
|
+
protected readonly lightSrc: import("@angular/core").Signal<string>;
|
|
78
|
+
protected readonly darkSrc: import("@angular/core").Signal<string>;
|
|
79
|
+
protected readonly hostClass: import("@angular/core").Signal<string>;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CharacterComponent, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CharacterComponent, "lc-character", never, {
|
|
82
|
+
"pose": {
|
|
83
|
+
"alias": "pose";
|
|
84
|
+
"required": false;
|
|
85
|
+
"isSignal": true;
|
|
86
|
+
};
|
|
87
|
+
"size": {
|
|
88
|
+
"alias": "size";
|
|
89
|
+
"required": false;
|
|
90
|
+
"isSignal": true;
|
|
91
|
+
};
|
|
92
|
+
"colorMode": {
|
|
93
|
+
"alias": "colorMode";
|
|
94
|
+
"required": false;
|
|
95
|
+
"isSignal": true;
|
|
96
|
+
};
|
|
97
|
+
"ariaLabel": {
|
|
98
|
+
"alias": "ariaLabel";
|
|
99
|
+
"required": false;
|
|
100
|
+
"isSignal": true;
|
|
101
|
+
};
|
|
102
|
+
}, {}, never, never, true, never>;
|
|
103
|
+
}
|
|
104
|
+
export type { CharacterPose };
|
|
@@ -20,6 +20,21 @@ export declare class CodeBlockComponent {
|
|
|
20
20
|
showCopy: import("@angular/core").InputSignal<boolean>;
|
|
21
21
|
/** Whether the code block has a header bar */
|
|
22
22
|
showHeader: import("@angular/core").InputSignal<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Accessible name of the scrollable code region (`role="region"`). When it
|
|
25
|
+
* is unset or empty, the `filename` is used, then the `language`. Set a
|
|
26
|
+
* short, localised name that is unique on the page, such as "Befehl für
|
|
27
|
+
* Claude Code". Not used when `wrap` is set.
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
regionLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Wraps long lines (`white-space: pre-wrap`, breaking anywhere if needed)
|
|
33
|
+
* instead of scrolling sideways. A wrapped block doesn't scroll, so its body
|
|
34
|
+
* is neither a tab stop nor a region.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
wrap: import("@angular/core").InputSignal<boolean>;
|
|
23
38
|
/** Visible label of the copy button. */
|
|
24
39
|
copyLabel: import("@angular/core").InputSignal<string>;
|
|
25
40
|
/** Accessible name of the copy button. */
|
|
@@ -32,6 +47,8 @@ export declare class CodeBlockComponent {
|
|
|
32
47
|
protected highlightedLines: import("@angular/core").Signal<CodeLine[]>;
|
|
33
48
|
protected lineNumbers: import("@angular/core").Signal<number[]>;
|
|
34
49
|
protected headerLabel: import("@angular/core").Signal<string>;
|
|
50
|
+
/** The region's name: `regionLabel`, then `filename`, then `language` (`''` falls through). */
|
|
51
|
+
protected regionName: import("@angular/core").Signal<string>;
|
|
35
52
|
protected codeClasses: import("@angular/core").Signal<string>;
|
|
36
53
|
protected copyToClipboard(): Promise<void>;
|
|
37
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<CodeBlockComponent, never>;
|
|
@@ -66,6 +83,16 @@ export declare class CodeBlockComponent {
|
|
|
66
83
|
"required": false;
|
|
67
84
|
"isSignal": true;
|
|
68
85
|
};
|
|
86
|
+
"regionLabel": {
|
|
87
|
+
"alias": "regionLabel";
|
|
88
|
+
"required": false;
|
|
89
|
+
"isSignal": true;
|
|
90
|
+
};
|
|
91
|
+
"wrap": {
|
|
92
|
+
"alias": "wrap";
|
|
93
|
+
"required": false;
|
|
94
|
+
"isSignal": true;
|
|
95
|
+
};
|
|
69
96
|
"copyLabel": {
|
|
70
97
|
"alias": "copyLabel";
|
|
71
98
|
"required": false;
|
|
@@ -9,6 +9,8 @@ export * from "@lifecorner/angular-ui-kit/icon";
|
|
|
9
9
|
export * from "@lifecorner/angular-ui-kit/icon-names";
|
|
10
10
|
export * from "@lifecorner/angular-ui-kit/icons";
|
|
11
11
|
export * from "@lifecorner/angular-ui-kit/logo";
|
|
12
|
+
export * from "@lifecorner/angular-ui-kit/character";
|
|
13
|
+
export * from "@lifecorner/angular-ui-kit/character-svg";
|
|
12
14
|
export * from "@lifecorner/angular-ui-kit/menu";
|
|
13
15
|
export * from "@lifecorner/angular-ui-kit/input";
|
|
14
16
|
export * from "@lifecorner/angular-ui-kit/radio";
|