@4sh/ui-kit 0.16.0 → 0.17.1
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.fr.md +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseFormField } from "@4sh/ui-kit/forms";
|
|
5
|
+
import { UiSwatch } from "@4sh/ui-kit/forms/ui-swatch-picker";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
5
7
|
/**
|
|
6
8
|
* Rich-text command layer — the only place that talks to the legacy editing API.
|
|
7
9
|
*
|
|
@@ -17,16 +19,16 @@ import { UiSwatch } from '@4sh/ui-kit/forms/ui-swatch-picker';
|
|
|
17
19
|
* `separator` is purely visual; `fontFamily` renders a dropdown rather than a
|
|
18
20
|
* button, since it picks among values instead of toggling one.
|
|
19
21
|
*/
|
|
20
|
-
type EditorTool = 'bold' | 'italic' | 'underline' | 'bulletList' | 'orderedList' | 'codeBlock' | 'fontFamily' | 'fontSize' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'textColor' | 'highlightColor' | 'link' | 'clearFormat' | 'separator';
|
|
22
|
+
export type EditorTool = 'bold' | 'italic' | 'underline' | 'bulletList' | 'orderedList' | 'codeBlock' | 'fontFamily' | 'fontSize' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'textColor' | 'highlightColor' | 'link' | 'clearFormat' | 'separator';
|
|
21
23
|
/** Tools rendered as a dropdown: they pick among values instead of toggling one. */
|
|
22
|
-
type EditorSelectTool = 'fontFamily' | 'fontSize';
|
|
24
|
+
export type EditorSelectTool = 'fontFamily' | 'fontSize';
|
|
23
25
|
/** Tools rendered as an icon button. */
|
|
24
|
-
type EditorButtonTool = Exclude<EditorTool, 'separator' | EditorSelectTool>;
|
|
25
|
-
declare const EDITOR_SELECT_TOOLS: readonly EditorSelectTool[];
|
|
26
|
+
export type EditorButtonTool = Exclude<EditorTool, 'separator' | EditorSelectTool>;
|
|
27
|
+
export declare const EDITOR_SELECT_TOOLS: readonly EditorSelectTool[];
|
|
26
28
|
/** Commands whose active/inactive state the toolbar reflects via `aria-pressed`. */
|
|
27
|
-
type EditorToggleTool = Extract<EditorTool, 'bold' | 'italic' | 'underline' | 'bulletList' | 'orderedList' | 'codeBlock' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify'>;
|
|
29
|
+
export type EditorToggleTool = Extract<EditorTool, 'bold' | 'italic' | 'underline' | 'bulletList' | 'orderedList' | 'codeBlock' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify'>;
|
|
28
30
|
/** Active formatting at the caret, recomputed after every interaction. */
|
|
29
|
-
type EditorState = Record<EditorToggleTool, boolean>;
|
|
31
|
+
export type EditorState = Record<EditorToggleTool, boolean>;
|
|
30
32
|
/**
|
|
31
33
|
* Type families the editor can apply.
|
|
32
34
|
*
|
|
@@ -34,7 +36,7 @@ type EditorState = Record<EditorToggleTool, boolean>;
|
|
|
34
36
|
* into the value and step outside the `--fontfamily-*` tokens. The system has no
|
|
35
37
|
* serif face, so the list is the three families the tokens actually carry.
|
|
36
38
|
*/
|
|
37
|
-
type EditorFont = 'base' | 'title' | 'monospace';
|
|
39
|
+
export type EditorFont = 'base' | 'title' | 'monospace';
|
|
38
40
|
/**
|
|
39
41
|
* Font key → class written into the value, token holding the family, and the
|
|
40
42
|
* fallback label used when the real name cannot be read (SSR, unset token).
|
|
@@ -43,11 +45,11 @@ type EditorFont = 'base' | 'title' | 'monospace';
|
|
|
43
45
|
* (see {@link resolveFontLabel}) rather than hardcoded: a project that rebinds
|
|
44
46
|
* `--fontfamily-base` would otherwise see a menu naming a font it no longer uses.
|
|
45
47
|
*/
|
|
46
|
-
declare const EDITOR_FONTS: readonly {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
export declare const EDITOR_FONTS: readonly {
|
|
49
|
+
key: EditorFont;
|
|
50
|
+
className: string;
|
|
51
|
+
cssVar: string;
|
|
52
|
+
label: string;
|
|
51
53
|
}[];
|
|
52
54
|
/**
|
|
53
55
|
* First face named by a font token — what the family dropdown displays.
|
|
@@ -55,14 +57,14 @@ declare const EDITOR_FONTS: readonly {
|
|
|
55
57
|
* `--fontfamily-base` holds a whole stack (`Inter, system-ui, …`); only the head
|
|
56
58
|
* of it is a name a person recognises.
|
|
57
59
|
*/
|
|
58
|
-
declare function resolveFontLabel(cssVar: string, fallback: string): string;
|
|
60
|
+
export declare function resolveFontLabel(cssVar: string, fallback: string): string;
|
|
59
61
|
/** Text sizes the editor can apply, as a step on the typography scale. */
|
|
60
|
-
type EditorSize = 'sm' | 'default' | 'lg' | 'xl';
|
|
62
|
+
export type EditorSize = 'sm' | 'default' | 'lg' | 'xl';
|
|
61
63
|
/** Size key → class written into the value + French label for the dropdown. */
|
|
62
|
-
declare const EDITOR_SIZES: readonly {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
export declare const EDITOR_SIZES: readonly {
|
|
65
|
+
key: EditorSize;
|
|
66
|
+
className: string;
|
|
67
|
+
label: string;
|
|
66
68
|
}[];
|
|
67
69
|
/**
|
|
68
70
|
* The tools enabled when the consumer does not provide a `tools` list.
|
|
@@ -76,24 +78,24 @@ declare const EDITOR_SIZES: readonly {
|
|
|
76
78
|
* explicitly adds it to `tools`, but shipping it by default would be shipping
|
|
77
79
|
* a broken button.
|
|
78
80
|
*/
|
|
79
|
-
declare const DEFAULT_EDITOR_TOOLS: readonly EditorTool[];
|
|
81
|
+
export declare const DEFAULT_EDITOR_TOOLS: readonly EditorTool[];
|
|
80
82
|
/** Toolbar metadata per button tool: icon (FontAwesome) + French accessible name. */
|
|
81
|
-
declare const EDITOR_TOOL_META: Record<EditorButtonTool, {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
export declare const EDITOR_TOOL_META: Record<EditorButtonTool, {
|
|
84
|
+
icon: string;
|
|
85
|
+
label: string;
|
|
84
86
|
}>;
|
|
85
87
|
/** Every state off — the value used before the first render and on SSR. */
|
|
86
|
-
declare function emptyEditorState(): EditorState;
|
|
88
|
+
export declare function emptyEditorState(): EditorState;
|
|
87
89
|
/** Applies a formatting command to the current selection. */
|
|
88
|
-
declare function applyCommand(tool: Exclude<EditorButtonTool, 'link' | 'codeBlock' | 'textColor' | 'highlightColor'>): void;
|
|
90
|
+
export declare function applyCommand(tool: Exclude<EditorButtonTool, 'link' | 'codeBlock' | 'textColor' | 'highlightColor'>): void;
|
|
89
91
|
/** Toggles the block under the caret between `<pre>` and a plain paragraph. */
|
|
90
|
-
declare function toggleCodeBlock(): void;
|
|
92
|
+
export declare function toggleCodeBlock(): void;
|
|
91
93
|
/** The caret sits in a code block. */
|
|
92
|
-
declare function isInCodeBlock(): boolean;
|
|
94
|
+
export declare function isInCodeBlock(): boolean;
|
|
93
95
|
/** Applies a type family to the selection (see {@link convertFontMarkers}). */
|
|
94
|
-
declare function applyFontFamily(): void;
|
|
96
|
+
export declare function applyFontFamily(): void;
|
|
95
97
|
/** Rewrites the `<font>` elements `fontName` just produced into `<span class>`. */
|
|
96
|
-
declare function convertFontMarkers(root: ParentNode, className: string): void;
|
|
98
|
+
export declare function convertFontMarkers(root: ParentNode, className: string): void;
|
|
97
99
|
/**
|
|
98
100
|
* Type family in force at the caret.
|
|
99
101
|
*
|
|
@@ -102,44 +104,44 @@ declare function convertFontMarkers(root: ParentNode, className: string): void;
|
|
|
102
104
|
* reporting the base family there would name a font the reader does not see.
|
|
103
105
|
* `null` only when the computed face matches none of the system families.
|
|
104
106
|
*/
|
|
105
|
-
declare function readFontFamily(node: Node | null): EditorFont | null;
|
|
107
|
+
export declare function readFontFamily(node: Node | null): EditorFont | null;
|
|
106
108
|
/** Applies a text size to the selection (see {@link convertSizeMarkers}). */
|
|
107
|
-
declare function applyFontSize(): void;
|
|
109
|
+
export declare function applyFontSize(): void;
|
|
108
110
|
/** Rewrites the `<font>` elements `fontSize` just produced into `<span class>`. */
|
|
109
|
-
declare function convertSizeMarkers(root: ParentNode, className: string): void;
|
|
111
|
+
export declare function convertSizeMarkers(root: ParentNode, className: string): void;
|
|
110
112
|
/** Text size active at the caret, or `null` when the text uses the default. */
|
|
111
|
-
declare function readFontSize(node: Node | null): EditorSize | null;
|
|
113
|
+
export declare function readFontSize(node: Node | null): EditorSize | null;
|
|
112
114
|
/**
|
|
113
115
|
* Color key → class written into the value, token holding the swatch, and
|
|
114
116
|
* label, derived from `ui-swatch-picker`'s default palette rather than
|
|
115
117
|
* hand-duplicated: the editor's color tools and the nuancier it opens must
|
|
116
118
|
* always offer the same token set.
|
|
117
119
|
*/
|
|
118
|
-
declare const EDITOR_COLORS: readonly {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
export declare const EDITOR_COLORS: readonly {
|
|
121
|
+
key: string;
|
|
122
|
+
className: string;
|
|
123
|
+
cssVar: string;
|
|
124
|
+
label: string;
|
|
123
125
|
}[];
|
|
124
126
|
/** Same key set as {@link EDITOR_COLORS}, classed separately for the highlight tool. */
|
|
125
|
-
declare const EDITOR_HIGHLIGHTS: readonly {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
export declare const EDITOR_HIGHLIGHTS: readonly {
|
|
128
|
+
key: string;
|
|
129
|
+
className: string;
|
|
130
|
+
cssVar: string;
|
|
131
|
+
label: string;
|
|
130
132
|
}[];
|
|
131
133
|
/** Applies a text color to the selection (see {@link convertColorMarkers}). */
|
|
132
|
-
declare function applyTextColor(): void;
|
|
134
|
+
export declare function applyTextColor(): void;
|
|
133
135
|
/** Rewrites the `<font>` elements `foreColor` just produced into `<span class>`. */
|
|
134
|
-
declare function convertColorMarkers(root: ParentNode, className: string): void;
|
|
136
|
+
export declare function convertColorMarkers(root: ParentNode, className: string): void;
|
|
135
137
|
/** Text color active at the caret, or `null` when the text uses the default. */
|
|
136
|
-
declare function readTextColor(node: Node | null): string | null;
|
|
138
|
+
export declare function readTextColor(node: Node | null): string | null;
|
|
137
139
|
/** Applies a highlight color to the selection (see {@link convertHighlightMarkers}). */
|
|
138
|
-
declare function applyHighlightColor(): void;
|
|
140
|
+
export declare function applyHighlightColor(): void;
|
|
139
141
|
/** Rewrites the `<span style>` elements `hiliteColor` just produced into `<span class>`. */
|
|
140
|
-
declare function convertHighlightMarkers(root: ParentNode, className: string): void;
|
|
142
|
+
export declare function convertHighlightMarkers(root: ParentNode, className: string): void;
|
|
141
143
|
/** Highlight color active at the caret, or `null` when the text carries none. */
|
|
142
|
-
declare function readHighlightColor(node: Node | null): string | null;
|
|
144
|
+
export declare function readHighlightColor(node: Node | null): string | null;
|
|
143
145
|
/**
|
|
144
146
|
* Strips a color/highlight class from every element carrying it inside
|
|
145
147
|
* `range`, unwrapping the element when nothing else justifies it (a plain
|
|
@@ -149,7 +151,7 @@ declare function readHighlightColor(node: Node | null): string | null;
|
|
|
149
151
|
* set a color, there is no native command to remove one, so this undoes what
|
|
150
152
|
* {@link convertColorMarkers}/{@link convertHighlightMarkers} previously wrote.
|
|
151
153
|
*/
|
|
152
|
-
declare function clearMarkerClass(root: ParentNode, range: Range, className: string): void;
|
|
154
|
+
export declare function clearMarkerClass(root: ParentNode, range: Range, className: string): void;
|
|
153
155
|
/**
|
|
154
156
|
* Strips every font/size/color/highlight class the editor writes, from
|
|
155
157
|
* whatever intersects `range`.
|
|
@@ -160,21 +162,21 @@ declare function clearMarkerClass(root: ParentNode, range: Range, className: str
|
|
|
160
162
|
* `textColor`/`highlightColor` write, so "Clear formatting" needs this on top
|
|
161
163
|
* of it to actually clear everything.
|
|
162
164
|
*/
|
|
163
|
-
declare function clearFormatMarkers(root: ParentNode, range: Range): void;
|
|
165
|
+
export declare function clearFormatMarkers(root: ParentNode, range: Range): void;
|
|
164
166
|
/** Wraps the current selection in a link (`removeFormat` alone cannot unlink). */
|
|
165
|
-
declare function applyLink(href: string): void;
|
|
167
|
+
export declare function applyLink(href: string): void;
|
|
166
168
|
/** Removes the link around the caret. */
|
|
167
|
-
declare function removeLink(): void;
|
|
169
|
+
export declare function removeLink(): void;
|
|
168
170
|
/** Reads the formatting active at the caret. */
|
|
169
|
-
declare function readEditorState(): EditorState;
|
|
171
|
+
export declare function readEditorState(): EditorState;
|
|
170
172
|
/** Inserts already-sanitised markup at the caret, replacing the selection. */
|
|
171
|
-
declare function insertHtml(html: string): void;
|
|
173
|
+
export declare function insertHtml(html: string): void;
|
|
172
174
|
/** Inserts plain text at the caret, replacing the selection. */
|
|
173
|
-
declare function insertText(text: string): void;
|
|
175
|
+
export declare function insertText(text: string): void;
|
|
174
176
|
/** Keeps only the allowed declarations of a `style` attribute. */
|
|
175
|
-
declare function sanitizeStyle(style: string): string;
|
|
177
|
+
export declare function sanitizeStyle(style: string): string;
|
|
176
178
|
/** Sanitises a value with `sanitize`, relaying the allowed `style` through a class it keeps. */
|
|
177
|
-
declare function sanitizeEditorHtml(html: string, sanitize: (html: string) => string): string;
|
|
179
|
+
export declare function sanitizeEditorHtml(html: string, sanitize: (html: string) => string): string;
|
|
178
180
|
/**
|
|
179
181
|
* Strips everything outside the whitelist, keeping the text of dropped elements.
|
|
180
182
|
*
|
|
@@ -182,7 +184,7 @@ declare function sanitizeEditorHtml(html: string, sanitize: (html: string) => st
|
|
|
182
184
|
* dangerous, this removes what is merely foreign to the editor (Word spans, inline
|
|
183
185
|
* styles, headings, tables) so the value stays a small, predictable HTML subset.
|
|
184
186
|
*/
|
|
185
|
-
declare function normalizeHtml(html: string): string;
|
|
187
|
+
export declare function normalizeHtml(html: string): string;
|
|
186
188
|
/**
|
|
187
189
|
* Applies the same scrubbing to a live element, in place.
|
|
188
190
|
*
|
|
@@ -191,14 +193,13 @@ declare function normalizeHtml(html: string): string;
|
|
|
191
193
|
* once it is in the document. Attributes are removed node by node rather than by
|
|
192
194
|
* rewriting `innerHTML`, which would drop the caret.
|
|
193
195
|
*/
|
|
194
|
-
declare function scrubInPlace(root: ParentNode): void;
|
|
196
|
+
export declare function scrubInPlace(root: ParentNode): void;
|
|
195
197
|
/** Normalises a browser-produced empty document (`<br>`, empty block) to `''`. */
|
|
196
|
-
declare function isEmptyHtml(html: string): boolean;
|
|
198
|
+
export declare function isEmptyHtml(html: string): boolean;
|
|
197
199
|
/** Plain-text projection of the value — what the character counter measures. */
|
|
198
|
-
declare function htmlToText(html: string): string;
|
|
199
|
-
|
|
200
|
+
export declare function htmlToText(html: string): string;
|
|
200
201
|
/** Where the toolbar sits relative to the editing area. */
|
|
201
|
-
type EditorToolbarPosition = 'top' | 'bottom';
|
|
202
|
+
export type EditorToolbarPosition = 'top' | 'bottom';
|
|
202
203
|
/**
|
|
203
204
|
* ui-editor — headless rich-text field, built on the `ui-field` shell (label +
|
|
204
205
|
* box + helper) in **multiline** mode + a `contenteditable` area and its toolbar.
|
|
@@ -210,276 +211,309 @@ type EditorToolbarPosition = 'top' | 'bottom';
|
|
|
210
211
|
*
|
|
211
212
|
* Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).
|
|
212
213
|
*/
|
|
213
|
-
declare class UiEditor extends BaseFormField<string> {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
214
|
+
export declare class UiEditor extends BaseFormField<string> {
|
|
215
|
+
/**
|
|
216
|
+
* Tools shown in the toolbar, in order (`separator` draws a divider).
|
|
217
|
+
*
|
|
218
|
+
* An empty or absent list falls back to the default set: a template binding an
|
|
219
|
+
* optional variable (`[tools]="tools"`) hands us `undefined`, which would
|
|
220
|
+
* otherwise leave the editor without any formatting at all.
|
|
221
|
+
*/
|
|
222
|
+
tools: import("@angular/core").InputSignalWithTransform<readonly EditorTool[], readonly EditorTool[] | null | undefined>;
|
|
223
|
+
/** Hint shown while the editor is empty (no native placeholder on contenteditable). */
|
|
224
|
+
placeholder: import("@angular/core").InputSignal<string | undefined>;
|
|
225
|
+
/** Minimum height of the editing area, in lines of text. */
|
|
226
|
+
minRows: import("@angular/core").InputSignal<number>;
|
|
227
|
+
/** Maximum number of **text** characters (markup is not counted). */
|
|
228
|
+
maxlength: import("@angular/core").InputSignal<number | undefined>;
|
|
229
|
+
/** Shows a character counter under the field (`count` or `count / maxlength`). */
|
|
230
|
+
showCount: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
231
|
+
/** Toolbar placement relative to the editing area. */
|
|
232
|
+
toolbarPosition: import("@angular/core").InputSignal<EditorToolbarPosition>;
|
|
233
|
+
/** Emitted on each edit with the new HTML value. */
|
|
234
|
+
valueChange: import("@angular/core").OutputEmitterRef<string>;
|
|
235
|
+
/** Emitted when the editing area receives focus. */
|
|
236
|
+
editorFocus: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
237
|
+
/** Emitted when the editing area loses focus. */
|
|
238
|
+
editorBlur: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
239
|
+
/** Emitted when the formatting under the caret changes. */
|
|
240
|
+
selectionChange: import("@angular/core").OutputEmitterRef<EditorState>;
|
|
241
|
+
/** @ignore */
|
|
242
|
+
private readonly sanitizer;
|
|
243
|
+
/** @ignore */
|
|
244
|
+
private readonly contentEl;
|
|
245
|
+
/** @ignore The rendered toolbar — holds the roving tabindex ring, in DOM order. */
|
|
246
|
+
private readonly toolbarEl;
|
|
247
|
+
/** @ignore Text color popup (see {@link onColorToolClick}). */
|
|
248
|
+
private readonly textColorPicker;
|
|
249
|
+
/** @ignore Highlight color popup (see {@link onColorToolClick}). */
|
|
250
|
+
private readonly highlightColorPicker;
|
|
251
|
+
/**
|
|
252
|
+
* @ignore Last HTML this component wrote out.
|
|
253
|
+
*
|
|
254
|
+
* The editing area owns its own DOM while the user types, so the value cannot be
|
|
255
|
+
* bound with `[innerHTML]`: re-rendering it on every keystroke would collapse the
|
|
256
|
+
* caret. Instead the DOM is only rewritten when the incoming value differs from
|
|
257
|
+
* what we last emitted — i.e. when a form writes to us.
|
|
258
|
+
*/
|
|
259
|
+
private lastEmitted;
|
|
260
|
+
/** @ignore Formatting active at the caret. */
|
|
261
|
+
protected readonly state: import("@angular/core").WritableSignal<EditorState>;
|
|
262
|
+
/** @ignore Type family at the caret (`null` = the default family). */
|
|
263
|
+
protected readonly currentFont: import("@angular/core").WritableSignal<EditorFont | null>;
|
|
264
|
+
/** @ignore Text size at the caret (`null` = the default size). */
|
|
265
|
+
protected readonly currentSize: import("@angular/core").WritableSignal<EditorSize | null>;
|
|
266
|
+
/** @ignore Text color at the caret (`null` = the default color). */
|
|
267
|
+
protected readonly currentTextColor: import("@angular/core").WritableSignal<string | null>;
|
|
268
|
+
/** @ignore Highlight color at the caret (`null` = no highlight). */
|
|
269
|
+
protected readonly currentHighlightColor: import("@angular/core").WritableSignal<string | null>;
|
|
270
|
+
/** @ignore Index of the toolbar button reachable with Tab (roving tabindex). */
|
|
271
|
+
protected readonly activeTool: import("@angular/core").WritableSignal<number>;
|
|
272
|
+
/** @ignore Open state of the `textColor` popup (drives its trigger's `aria-expanded`). */
|
|
273
|
+
protected readonly textColorPickerOpen: import("@angular/core").WritableSignal<boolean>;
|
|
274
|
+
/** @ignore Open state of the `highlightColor` popup (drives its trigger's `aria-expanded`). */
|
|
275
|
+
protected readonly highlightColorPickerOpen: import("@angular/core").WritableSignal<boolean>;
|
|
276
|
+
/**
|
|
277
|
+
* @ignore Last selection seen inside the editing area.
|
|
278
|
+
*
|
|
279
|
+
* The buttons cancel their own mousedown and never take the focus, but opening
|
|
280
|
+
* the font dropdown does — and a `contenteditable` loses its selection with it.
|
|
281
|
+
* The range is therefore kept here and restored before the command runs.
|
|
282
|
+
*/
|
|
283
|
+
private savedRange;
|
|
284
|
+
/** @ignore Sanitised value — never inject `modelValue` into the DOM raw. */
|
|
285
|
+
private readonly safeValue;
|
|
286
|
+
/** @ignore Plain-text length, what `maxlength` and the counter measure. */
|
|
287
|
+
protected readonly charCount: import("@angular/core").Signal<number>;
|
|
288
|
+
/** @ignore Keeps a floating label raised once focus leaves. */
|
|
289
|
+
protected readonly isFilled: import("@angular/core").Signal<boolean>;
|
|
290
|
+
/** @ignore Over the maxlength (only reachable programmatically). */
|
|
291
|
+
protected readonly overLimit: import("@angular/core").Signal<boolean>;
|
|
292
|
+
/** @ignore The placeholder only shows while there is nothing to read. */
|
|
293
|
+
protected readonly showPlaceholder: import("@angular/core").Signal<boolean>;
|
|
294
|
+
/** @ignore The area is editable (a read-only editor keeps its caret but not its edits). */
|
|
295
|
+
protected readonly isEditable: import("@angular/core").Signal<boolean>;
|
|
296
|
+
/** @ignore Resolved toolbar entries (icon + accessible name + toggle state). */
|
|
297
|
+
protected readonly toolbar: import("@angular/core").Signal<{
|
|
298
|
+
tool: EditorTool;
|
|
299
|
+
index: number;
|
|
300
|
+
isSeparator: boolean;
|
|
301
|
+
select: EditorSelectTool | null;
|
|
302
|
+
buttonTool: EditorButtonTool | null;
|
|
303
|
+
meta: {
|
|
304
|
+
icon: string;
|
|
305
|
+
label: string;
|
|
306
|
+
} | null;
|
|
307
|
+
}[]>;
|
|
308
|
+
/** @ignore Text sizes offered by the `fontSize` dropdown. */
|
|
309
|
+
protected readonly sizes: readonly {
|
|
310
|
+
key: EditorSize;
|
|
311
|
+
className: string;
|
|
312
|
+
label: string;
|
|
313
|
+
}[];
|
|
314
|
+
/**
|
|
315
|
+
* @ignore Type families, labelled with the face each token actually resolves to.
|
|
316
|
+
*
|
|
317
|
+
* Read once the view exists, since the value comes from the computed style: a
|
|
318
|
+
* hardcoded "Inter" would lie as soon as a project rebinds the token.
|
|
319
|
+
*/
|
|
320
|
+
protected readonly fonts: import("@angular/core").WritableSignal<{
|
|
321
|
+
key: EditorFont;
|
|
322
|
+
className: string;
|
|
323
|
+
cssVar: string;
|
|
324
|
+
label: string;
|
|
325
|
+
}[]>;
|
|
326
|
+
/** @ignore `fontFamily` dropdown options ({@link UiSelect} `optionLabel`/`optionValue`). */
|
|
327
|
+
protected readonly fontFamilyOptions: import("@angular/core").Signal<{
|
|
328
|
+
value: EditorFont;
|
|
329
|
+
label: string;
|
|
330
|
+
}[]>;
|
|
331
|
+
/** @ignore `fontSize` dropdown options ({@link UiSelect} `optionLabel`/`optionValue`). */
|
|
332
|
+
protected readonly fontSizeOptions: import("@angular/core").Signal<{
|
|
333
|
+
value: EditorSize;
|
|
334
|
+
label: string;
|
|
335
|
+
}[]>;
|
|
336
|
+
/** @ignore Swatch entry backing the `textColor` button's color indicator. */
|
|
337
|
+
protected readonly currentTextColorSwatch: import("@angular/core").Signal<{
|
|
338
|
+
key: string;
|
|
339
|
+
className: string;
|
|
340
|
+
cssVar: string;
|
|
341
|
+
label: string;
|
|
342
|
+
} | undefined>;
|
|
343
|
+
/** @ignore Swatch entry backing the `highlightColor` button's color indicator. */
|
|
344
|
+
protected readonly currentHighlightColorSwatch: import("@angular/core").Signal<{
|
|
345
|
+
key: string;
|
|
346
|
+
className: string;
|
|
347
|
+
cssVar: string;
|
|
348
|
+
label: string;
|
|
349
|
+
} | undefined>;
|
|
350
|
+
/** @ignore The toolbar has at least one actionable entry. */
|
|
351
|
+
protected readonly hasToolbar: import("@angular/core").Signal<boolean>;
|
|
352
|
+
/**
|
|
353
|
+
* @ignore Index carrying the toolbar's single tab stop.
|
|
354
|
+
*
|
|
355
|
+
* Falls back to the first actionable tool, so a `tools` list opening on a
|
|
356
|
+
* separator still leaves the toolbar reachable with Tab.
|
|
357
|
+
*/
|
|
358
|
+
protected readonly tabStop: import("@angular/core").Signal<number>;
|
|
359
|
+
/** @ignore id of the character counter (for `aria-describedby`). */
|
|
360
|
+
protected readonly countId: import("@angular/core").Signal<string>;
|
|
361
|
+
/** @ignore `aria-describedby` combines the message and the counter, whichever are shown. */
|
|
362
|
+
protected readonly describedByIds: import("@angular/core").Signal<string | null>;
|
|
363
|
+
constructor();
|
|
364
|
+
/** @ignore Auto-generated ids read as `ui-editor-*`. */
|
|
365
|
+
protected uidPrefix(): string;
|
|
366
|
+
/** Focuses the editing area. */
|
|
367
|
+
focus(options?: FocusOptions): void;
|
|
368
|
+
/** @ignore Input: single source of the value (view → form). */
|
|
369
|
+
protected onInput(): void;
|
|
370
|
+
/**
|
|
371
|
+
* @ignore Enforces `maxlength` on the text, not the markup.
|
|
372
|
+
*
|
|
373
|
+
* Deletions and formatting must stay available once the limit is reached, so only
|
|
374
|
+
* the insertion intents are cancelled.
|
|
375
|
+
*/
|
|
376
|
+
protected onBeforeInput(event: InputEvent): void;
|
|
377
|
+
/** @ignore Paste is reduced to the editor's own tag whitelist. */
|
|
378
|
+
protected onPaste(event: ClipboardEvent): void;
|
|
379
|
+
/** @ignore The browser applies Ctrl/Cmd+B/I/U itself; we only mirror the state. */
|
|
380
|
+
protected onContentKeydown(event: KeyboardEvent): void;
|
|
381
|
+
/** @ignore */
|
|
382
|
+
protected onBlur(event: FocusEvent): void;
|
|
383
|
+
/** @ignore Recomputes the active formatting and notifies the consumer. */
|
|
384
|
+
protected refreshState(): void;
|
|
385
|
+
/** @ignore Keeps the caret position around for controls that steal the focus. */
|
|
386
|
+
private rememberSelection;
|
|
387
|
+
/** @ignore Puts the remembered caret back before running a command. */
|
|
388
|
+
private restoreSelection;
|
|
389
|
+
/** @ignore Runs a button tool against the selection the mousedown handler preserved. */
|
|
390
|
+
protected runTool(tool: EditorButtonTool, index: number, event?: MouseEvent): void;
|
|
391
|
+
/**
|
|
392
|
+
* @ignore `removeFormat` (the native command behind `clearFormat`) only
|
|
393
|
+
* strips inline formatting the browser itself applies — bold, italic,
|
|
394
|
+
* underline… — never the `<span class="ui-editor-*">` wrappers `fontFamily`/
|
|
395
|
+
* `fontSize`/`textColor`/`highlightColor` write, so those survived
|
|
396
|
+
* "Effacer le formatage" untouched. Run the native command, then unwrap
|
|
397
|
+
* those classes too, across whatever is currently selected.
|
|
398
|
+
*/
|
|
399
|
+
private clearFormat;
|
|
400
|
+
/**
|
|
401
|
+
* @ignore Trigger click for `textColor`/`highlightColor`: opens the matching
|
|
402
|
+
* `ui-swatch-picker` instead of applying a command directly — same
|
|
403
|
+
* "picker takes the focus, the caret is restored before the real command
|
|
404
|
+
* runs" pattern as {@link onSelectMenuTrigger}, but these two are button
|
|
405
|
+
* tools (a one-shot action button, not a value dropdown), so they run
|
|
406
|
+
* through `runTool` rather than `onSelectChange`.
|
|
407
|
+
*/
|
|
408
|
+
private onColorToolClick;
|
|
409
|
+
/**
|
|
410
|
+
* @ignore Applies the text color chosen in the `textColor` picker.
|
|
411
|
+
*
|
|
412
|
+
* The popup took the focus, so the caret is put back first. `foreColor`
|
|
413
|
+
* emits a legacy `<font>` element, immediately rewritten into a class.
|
|
414
|
+
*/
|
|
415
|
+
protected onTextColorSelect(swatch: UiSwatch | null): void;
|
|
416
|
+
/**
|
|
417
|
+
* @ignore Applies the highlight color chosen in the `highlightColor` picker.
|
|
418
|
+
*
|
|
419
|
+
* The popup took the focus, so the caret is put back first. `hiliteColor`
|
|
420
|
+
* emits a `<span style="background-color:…">`, immediately rewritten into a
|
|
421
|
+
* class (see {@link convertHighlightMarkers}).
|
|
422
|
+
*/
|
|
423
|
+
protected onHighlightColorSelect(swatch: UiSwatch | null): void;
|
|
424
|
+
/** @ignore Options for a `ui-select` dropdown ({@link UiSelect} `optionLabel`/`optionValue`). */
|
|
425
|
+
protected selectOptions(tool: EditorSelectTool): {
|
|
426
|
+
value: string;
|
|
427
|
+
label: string;
|
|
428
|
+
}[];
|
|
429
|
+
/**
|
|
430
|
+
* @ignore Current value of a `ui-select` dropdown, so it reflects the caret.
|
|
431
|
+
*
|
|
432
|
+
* Falls back to the value actually in force when no class was applied: text
|
|
433
|
+
* carrying no class really is rendered with `--fontfamily-base` at the
|
|
434
|
+
* default size, so naming it states a fact rather than a placeholder.
|
|
435
|
+
*/
|
|
436
|
+
protected selectValue(tool: EditorSelectTool): string;
|
|
437
|
+
/** @ignore Accessible name of a dropdown — spelled out, it is never truncated. */
|
|
438
|
+
protected selectLabel(tool: EditorSelectTool): string;
|
|
439
|
+
/**
|
|
440
|
+
* @ignore Applies the value chosen in a `ui-select` dropdown.
|
|
441
|
+
*
|
|
442
|
+
* `ui-select` opens its own overlay and takes the focus, so the caret is put
|
|
443
|
+
* back first — same reasoning as the color pickers. `fontName`/`fontSize`
|
|
444
|
+
* each emit a legacy `<font>` element, immediately rewritten into a class.
|
|
445
|
+
*/
|
|
446
|
+
protected onSelectValueChange(tool: EditorSelectTool, value: unknown, index: number): void;
|
|
447
|
+
/**
|
|
448
|
+
* @ignore v1 link flow: the native prompt.
|
|
449
|
+
*
|
|
450
|
+
* Deliberately minimal — a popover with a `ui-input` is the planned replacement,
|
|
451
|
+
* and it changes the component's overlay footprint, not this call site.
|
|
452
|
+
*/
|
|
453
|
+
private promptForLink;
|
|
454
|
+
/** @ignore Keeps the caret in the editing area when a tool is clicked. */
|
|
455
|
+
protected onToolbarMousedown(event: MouseEvent): void;
|
|
456
|
+
/** @ignore Roving tabindex: the toolbar is one tab stop, arrows move within it. */
|
|
457
|
+
protected onToolbarKeydown(event: KeyboardEvent): void;
|
|
458
|
+
/**
|
|
459
|
+
* @ignore Moves the DOM focus onto the control now holding the tab stop.
|
|
460
|
+
*
|
|
461
|
+
* Queried from the live toolbar rather than from the `ui-button` children:
|
|
462
|
+
* DOM order is the visual order, and every tool (buttons and select-menu
|
|
463
|
+
* triggers alike) renders as a `<button>`.
|
|
464
|
+
*/
|
|
465
|
+
private focusTool;
|
|
466
|
+
/**
|
|
467
|
+
* @ignore `var(--primitives-…)` for the `textColor`/`highlightColor`
|
|
468
|
+
* buttons' color indicator, or `null` for every other tool (no swatch
|
|
469
|
+
* active, or a tool the indicator does not apply to).
|
|
470
|
+
*/
|
|
471
|
+
protected colorIndicatorVar(tool: EditorButtonTool | null): string | null;
|
|
472
|
+
/**
|
|
473
|
+
* @ignore Native attributes forwarded to a tool button.
|
|
474
|
+
*
|
|
475
|
+
* `aria-pressed` only on the toggles: `link` and `clearFormat` are one-shot
|
|
476
|
+
* actions, and a permanently unpressed toggle would misreport them.
|
|
477
|
+
* `textColor`/`highlightColor` forward `aria-haspopup`/`aria-expanded`
|
|
478
|
+
* instead — they open a `ui-swatch-picker` popup, not a toggle.
|
|
479
|
+
*/
|
|
480
|
+
protected toolProps(tool: EditorTool): Record<string, string> | undefined;
|
|
481
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiEditor, never>;
|
|
482
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiEditor, "ui-editor", never, {
|
|
483
|
+
"tools": {
|
|
484
|
+
"alias": "tools";
|
|
485
|
+
"required": false;
|
|
486
|
+
"isSignal": true;
|
|
487
|
+
};
|
|
488
|
+
"placeholder": {
|
|
489
|
+
"alias": "placeholder";
|
|
490
|
+
"required": false;
|
|
491
|
+
"isSignal": true;
|
|
492
|
+
};
|
|
493
|
+
"minRows": {
|
|
494
|
+
"alias": "minRows";
|
|
495
|
+
"required": false;
|
|
496
|
+
"isSignal": true;
|
|
497
|
+
};
|
|
498
|
+
"maxlength": {
|
|
499
|
+
"alias": "maxlength";
|
|
500
|
+
"required": false;
|
|
501
|
+
"isSignal": true;
|
|
502
|
+
};
|
|
503
|
+
"showCount": {
|
|
504
|
+
"alias": "showCount";
|
|
505
|
+
"required": false;
|
|
506
|
+
"isSignal": true;
|
|
507
|
+
};
|
|
508
|
+
"toolbarPosition": {
|
|
509
|
+
"alias": "toolbarPosition";
|
|
510
|
+
"required": false;
|
|
511
|
+
"isSignal": true;
|
|
512
|
+
};
|
|
513
|
+
}, {
|
|
514
|
+
"valueChange": "valueChange";
|
|
515
|
+
"editorFocus": "editorFocus";
|
|
516
|
+
"editorBlur": "editorBlur";
|
|
517
|
+
"selectionChange": "selectionChange";
|
|
518
|
+
}, never, never, true, never>;
|
|
519
|
+
}
|