@life-cockpit/angular-ui-kit 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6732,6 +6732,10 @@ interface MarkdownLinkClick {
|
|
|
6732
6732
|
interface MarkdownRendered {
|
|
6733
6733
|
headings: MarkdownHeading[];
|
|
6734
6734
|
}
|
|
6735
|
+
interface MarkdownChangesHighlighted {
|
|
6736
|
+
/** Number of changed/added blocks highlighted in the current render. */
|
|
6737
|
+
changedBlocks: number;
|
|
6738
|
+
}
|
|
6735
6739
|
interface RenderPart {
|
|
6736
6740
|
type: 'html' | 'code' | 'mermaid';
|
|
6737
6741
|
index: number;
|
|
@@ -6745,16 +6749,27 @@ interface RenderPart {
|
|
|
6745
6749
|
* Renders GitHub-Flavored Markdown (GFM) to sanitized HTML with
|
|
6746
6750
|
* optional syntax highlighting via `<lc-code-block>`.
|
|
6747
6751
|
*
|
|
6752
|
+
* Optionally highlights *changed* blocks in place: pass the pre-edit markdown as
|
|
6753
|
+
* `previousContent` and set `highlightChanges` — added/edited blocks (diffed at
|
|
6754
|
+
* block / list-item level) gain a left accent bar + subtle tint, can auto-fade
|
|
6755
|
+
* (`changeHighlightFadeMs`) and scroll into view (`scrollToFirstChange`).
|
|
6756
|
+
*
|
|
6748
6757
|
* @example
|
|
6749
6758
|
* ```html
|
|
6750
6759
|
* <lc-markdown [content]="'# Hello World'" />
|
|
6751
6760
|
* <lc-markdown [src]="'/docs/readme.md'" />
|
|
6761
|
+
* <lc-markdown
|
|
6762
|
+
* [content]="current" [previousContent]="prev"
|
|
6763
|
+
* [highlightChanges]="true" [changeHighlightFadeMs]="3000" />
|
|
6752
6764
|
* ```
|
|
6753
6765
|
*/
|
|
6754
6766
|
declare class MarkdownComponent implements OnDestroy {
|
|
6755
6767
|
private readonly sanitizer;
|
|
6756
6768
|
private readonly http;
|
|
6769
|
+
private readonly host;
|
|
6757
6770
|
private httpSub?;
|
|
6771
|
+
private fadeTimer?;
|
|
6772
|
+
private scrollTimer?;
|
|
6758
6773
|
private mermaidApiPromise?;
|
|
6759
6774
|
private mermaidInitialized;
|
|
6760
6775
|
private mermaidRenderRun;
|
|
@@ -6774,14 +6789,39 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6774
6789
|
readonly showHeadingAnchors: _angular_core.InputSignal<boolean>;
|
|
6775
6790
|
/** Base URL for resolving relative links/images */
|
|
6776
6791
|
readonly baseUrl: _angular_core.InputSignal<string | undefined>;
|
|
6792
|
+
/** Enable change highlighting (requires `previousContent` to compute a diff). */
|
|
6793
|
+
readonly highlightChanges: _angular_core.InputSignal<boolean>;
|
|
6794
|
+
/**
|
|
6795
|
+
* The prior Markdown. When it differs from `content`, the changed/added blocks
|
|
6796
|
+
* in `content` are highlighted. The caller passes the pre-edit markdown.
|
|
6797
|
+
*/
|
|
6798
|
+
readonly previousContent: _angular_core.InputSignal<string | undefined>;
|
|
6799
|
+
/** Auto-fade the highlight after N ms. 0 / undefined ⇒ persist until content changes. */
|
|
6800
|
+
readonly changeHighlightFadeMs: _angular_core.InputSignal<number | undefined>;
|
|
6801
|
+
/** Scroll the first changed block into view when highlights appear. */
|
|
6802
|
+
readonly scrollToFirstChange: _angular_core.InputSignal<boolean>;
|
|
6777
6803
|
/** Emitted when a link is clicked */
|
|
6778
6804
|
readonly linkClick: _angular_core.OutputEmitterRef<MarkdownLinkClick>;
|
|
6779
6805
|
/** Emitted after rendering with heading TOC */
|
|
6780
6806
|
readonly rendered: _angular_core.OutputEmitterRef<MarkdownRendered>;
|
|
6807
|
+
/** Emitted after a render that produced change highlights. */
|
|
6808
|
+
readonly changesHighlighted: _angular_core.OutputEmitterRef<MarkdownChangesHighlighted>;
|
|
6781
6809
|
/** Internal resolved markdown source */
|
|
6782
6810
|
protected resolvedMarkdown: _angular_core.WritableSignal<string>;
|
|
6783
6811
|
/** Parsed result (computed once from resolvedMarkdown) */
|
|
6784
6812
|
private parsed;
|
|
6813
|
+
/**
|
|
6814
|
+
* Rendered HTML after applying change highlights. When highlighting is off (or
|
|
6815
|
+
* there is no differing `previousContent`) this returns the parsed HTML
|
|
6816
|
+
* unchanged, so the non-highlight path is byte-for-byte identical to before.
|
|
6817
|
+
*/
|
|
6818
|
+
private readonly highlightResult;
|
|
6819
|
+
/** Number of changed/added blocks highlighted in the current render. */
|
|
6820
|
+
protected readonly changedCount: _angular_core.Signal<number>;
|
|
6821
|
+
/** Visually-hidden polite summary announced when highlights appear. */
|
|
6822
|
+
protected readonly changeSummary: _angular_core.Signal<string>;
|
|
6823
|
+
/** Whether the current highlights have faded out (after `changeHighlightFadeMs`). */
|
|
6824
|
+
protected readonly highlightsFaded: _angular_core.WritableSignal<boolean>;
|
|
6785
6825
|
/** Computed render parts (HTML chunks + code blocks interleaved) */
|
|
6786
6826
|
protected renderParts: _angular_core.Signal<RenderPart[]>;
|
|
6787
6827
|
protected containerClasses: _angular_core.Signal<string>;
|
|
@@ -6791,6 +6831,25 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6791
6831
|
constructor();
|
|
6792
6832
|
ngOnDestroy(): void;
|
|
6793
6833
|
protected onLinkClick(event: MouseEvent): void;
|
|
6834
|
+
/** Side-effects for a render: emit, (re)arm the fade timer, optional scroll. */
|
|
6835
|
+
private onHighlightResult;
|
|
6836
|
+
private scrollToFirstChanged;
|
|
6837
|
+
/**
|
|
6838
|
+
* Wraps the changed/added top-level blocks of `html` with
|
|
6839
|
+
* `.lc-markdown__block--changed`. A block is "changed" when its normalized
|
|
6840
|
+
* text is not present among the blocks of `prevMarkdown`. Lists are diffed
|
|
6841
|
+
* per `<li>` and tables per `<tr>` so a single edited item highlights alone.
|
|
6842
|
+
*/
|
|
6843
|
+
private applyChangeHighlights;
|
|
6844
|
+
/** Normalized text set of the logical blocks within an HTML fragment. */
|
|
6845
|
+
private collectBlockKeys;
|
|
6846
|
+
/**
|
|
6847
|
+
* Visits each diffable block under `root`: top-level elements, but descending
|
|
6848
|
+
* into `<ul>`/`<ol>` (per `<li>`) and `<table>` (per `<tr>`).
|
|
6849
|
+
*/
|
|
6850
|
+
private eachLogicalBlock;
|
|
6851
|
+
private blockTextKey;
|
|
6852
|
+
private htmlToElement;
|
|
6794
6853
|
private loadFromUrl;
|
|
6795
6854
|
private splitIntoParts;
|
|
6796
6855
|
private parseMarkdown;
|
|
@@ -6801,7 +6860,7 @@ declare class MarkdownComponent implements OnDestroy {
|
|
|
6801
6860
|
private renderMermaidParts;
|
|
6802
6861
|
private getMermaidApi;
|
|
6803
6862
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownComponent, never>;
|
|
6804
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownComponent, "lc-markdown", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; "sanitize": { "alias": "sanitize"; "required": false; "isSignal": true; }; "syntaxHighlight": { "alias": "syntaxHighlight"; "required": false; "isSignal": true; }; "showHeadingAnchors": { "alias": "showHeadingAnchors"; "required": false; "isSignal": true; }; "baseUrl": { "alias": "baseUrl"; "required": false; "isSignal": true; }; }, { "linkClick": "linkClick"; "rendered": "rendered"; }, never, never, true, never>;
|
|
6863
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownComponent, "lc-markdown", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; "sanitize": { "alias": "sanitize"; "required": false; "isSignal": true; }; "syntaxHighlight": { "alias": "syntaxHighlight"; "required": false; "isSignal": true; }; "showHeadingAnchors": { "alias": "showHeadingAnchors"; "required": false; "isSignal": true; }; "baseUrl": { "alias": "baseUrl"; "required": false; "isSignal": true; }; "highlightChanges": { "alias": "highlightChanges"; "required": false; "isSignal": true; }; "previousContent": { "alias": "previousContent"; "required": false; "isSignal": true; }; "changeHighlightFadeMs": { "alias": "changeHighlightFadeMs"; "required": false; "isSignal": true; }; "scrollToFirstChange": { "alias": "scrollToFirstChange"; "required": false; "isSignal": true; }; }, { "linkClick": "linkClick"; "rendered": "rendered"; "changesHighlighted": "changesHighlighted"; }, never, never, true, never>;
|
|
6805
6864
|
}
|
|
6806
6865
|
|
|
6807
6866
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
@@ -7171,4 +7230,4 @@ declare class StageListComponent {
|
|
|
7171
7230
|
}
|
|
7172
7231
|
|
|
7173
7232
|
export { AccordionComponent, AccordionGroupComponent, AlertComponent, AnimationDurationFast, AnimationEasingEaseIn, AnimationEasingEaseInOut, AnimationEasingEaseOut, AreaChartComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BarChartComponent, BorderRadius2xl, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CalloutComponent, CardComponent, ChatComponent, CheckboxComponent, ChipComponent, CodeBlockComponent, ColorAccentOrange, ColorAccentPurple, ColorAccentRed, ColorAccentRust, ColorAccentViolet, ColorBackgroundDark, ColorErrorDark, ColorErrorDefault, ColorErrorLight, ColorInfoDark, ColorInfoDefault, ColorInfoLight, ColorNeutral100, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorPickerComponent, ColorPrimary100, ColorPrimary200, ColorPrimary300, ColorPrimary400, ColorPrimary50, ColorPrimary500, ColorPrimary600, ColorPrimary700, ColorPrimary800, ColorPrimary900, ColorSecondary100, ColorSecondary200, ColorSecondary300, ColorSecondary400, ColorSecondary50, ColorSecondary500, ColorSecondary600, ColorSecondary700, ColorSecondary800, ColorSecondary900, ColorSuccessDark, ColorSuccessDefault, ColorSuccessLight, ColorSurfaceDarkBase, ColorSurfaceDarkRaised, ColorSurfaceDarkSunken, ColorTextDarkPrimary, ColorTextDarkSecondary, ColorTextDarkTertiary, ColorWarningDark, ColorWarningDefault, ColorWarningLight, ComboboxComponent, ConfirmDialogComponent, ConfirmService, ContainerComponent, DateRangePickerComponent, DatepickerComponent, DependencyViewerComponent, DiffViewerComponent, DividerComponent, DocumentViewerComponent, DonutChartComponent, DrawerComponent, Elevation1, Elevation2, Elevation3, Elevation4, EmailInputComponent, EmptyStateComponent, ErrorDisplayComponent, FILE_FALLBACK_ICON, FOLDER_ICON, FOLDER_OPEN_ICON, FieldGroupComponent, FileUploadComponent, FilterBarComponent, FooterComponent, FunnelChartComponent, GalleryComponent, GanttChartComponent, GaugeComponent, HeaderComponent, HeatmapComponent, HeroComponent, IconComponent, InputComponent, KanbanBoardComponent, LC_LOGO_BASE_PATH, LineChartComponent, ListComponent, ListItemTemplateDirective, LogViewerComponent, LogoComponent, MarkdownComponent, MenuComponent, ModalComponent, NotificationCenterComponent, NumberInputComponent, PageHeaderComponent, PageLayoutComponent, PaginationComponent, PasswordInputComponent, PieChartComponent, PopoverComponent, ProgressBarComponent, ProgressRingComponent, RadarChartComponent, RadioComponent, RatingComponent, RichTextEditorComponent, ScatterPlotComponent, SearchInputComponent, SectionComponent, SelectComponent, SidenavComponent, SizeInteractiveLgFontSize, SizeInteractiveLgHeight, SizeInteractiveLgPadding, SizeInteractiveMdFontSize, SizeInteractiveMdHeight, SizeInteractiveMdPadding, SizeInteractiveSmFontSize, SizeInteractiveSmHeight, SizeInteractiveSmPadding, SizeInteractiveXsFontSize, SizeInteractiveXsHeight, SizeInteractiveXsPadding, SizeMinTouchHeight, SizeMinTouchWidth, SkeletonComponent, SliderComponent, SpacerComponent, Spacing0, Spacing05, Spacing1, Spacing10, Spacing11, Spacing12, Spacing14, Spacing15, Spacing16, Spacing2, Spacing25, Spacing3, Spacing35, Spacing4, Spacing5, Spacing6, Spacing7, Spacing8, Spacing9, SparklineComponent, SpinnerComponent, StackComponent, StackedBarChartComponent, StageListComponent, StatTrendComponent, StepperComponent, SwitchComponent, TabComponent, TableCellDirective, TableComponent, TabsComponent, TagInputComponent, TextareaComponent, ThemeService, TimelineComponent, ToastComponent, ToastService, ToggleGroupComponent, ToolbarComponent, TooltipContentComponent, TooltipDirective, TreeViewComponent, TypographyComponent, TypographyFontFamilyBase, TypographyFontFamilyMono, TypographyFontSize2xl, TypographyFontSize3xl, TypographyFontSize4xl, TypographyFontSize5xl, TypographyFontSize6xl, TypographyFontSizeBase, TypographyFontSizeLg, TypographyFontSizeSm, TypographyFontSizeXl, TypographyFontSizeXs, TypographyFontWeightBold, TypographyFontWeightMedium, TypographyFontWeightNormal, TypographyFontWeightSemibold, TypographyLineHeightNormal, TypographyLineHeightRelaxed, TypographyLineHeightTight, VerificationCodeInputComponent, WaterfallChartComponent, resolveFileIcon };
|
|
7174
|
-
export type { ActionClickEvent, AlertVariant, AreaChartSeries, AvatarGroupItem, AvatarSize, AvatarStatus, BadgeSize, BadgeVariant, BarChartItem, BarChartOrientation, BreadcrumbItem, BreadcrumbSize, ButtonSize, ButtonType, ButtonVariant, CalendarEvent, CalendarView, CalloutVariant, CellEditEvent, ChatAttachment, ChatFileAttachEvent, ChatMessage, ChatMessageRole, ChatMessageStatus, ChatRenderMarkdown, ChatSendEvent, CheckboxSize, ChipSize, ChipVariant, CodeBlockLanguage, ComboboxOption, ComboboxSize, ComboboxValue, ConfirmDialogVariant, ConfirmOptions, ContainerSize, DateRange, DateValue, DependencyDirection, DependencyEdgeDef, DependencyNode, DependencyNodeStatus, DependencyRelation, DiffViewMode, DividerOrientation, DividerSpacing, DividerVariant, DocumentType, DonutChartSize, DonutSegment, DrawerPosition, DrawerSize, EmptyStateSize, ErrorSeverity, FileUploadFile, FilterConfig, FilterOption, FilterValues, FooterLink, FooterSection, FooterVariant, FunnelStep, GalleryItem, GalleryLayout, GallerySize, GanttDependency, GanttTask, GaugeColor, GaugeSize, HeatmapCell, HeroColor, HeroSize, HeroVariant, IconSize, IconVariant, KanbanCard, KanbanColumn, KanbanLabel, KanbanMoveEvent, LineChartSeries, ListItem, ListOrientation, ListSize, ListVariant, LogLevel, LogLine, LogViewerVariant, MarkdownHeading, MarkdownLinkClick, MarkdownRendered, MenuItem, ModalSize, NavigationItem, Notification, NotificationPriority, NotificationType, PageLayoutFill, PaginationSize, PasswordRequirement, PasswordStrength, PieChartSize, PieSegment, PopoverPosition, PopoverTrigger, ProgressBarColor, ProgressBarSize, ProgressBarVariant, ProgressRingColor, ProgressRingSize, RadarChartSeries, RadioSize, RatingSize, RenderPart, RequireTextConfig, RichTextEditorMode, RowToggleEvent, ScatterPoint, ScatterSeries, SearchInputSize, SectionBackground, SectionSpacing, SelectOption, SelectOptionGroup, SelectValue, SelectionChangeEvent, SidenavMode, SidenavPosition, SkeletonVariant, SortEvent, SpacerSize, SparklineColor, SparklineCurve, SpinnerSize, StackAlign, StackDirection, StackGap, StackJustify, StackedBarCategory, StackedBarLegend, StackedBarOrientation, StageItem, StageListSize, StatTrendDirection, StepState, StepperStep, TabOrientation, TableAction, TableActionsAlign, TableColumn, TableSize, TableTreeConfig, TableVariant, ThemeConfig, ThemeMode, ThemeState, TimelineItem, TimelineOrientation, Toast, ToastAction, ToastConfig, ToastPosition, ToastVariant, ToggleOption, ToolbarAction, ToolbarConfig, TooltipPosition, TreeNode, TreeNodeType, WaterfallItem };
|
|
7233
|
+
export type { ActionClickEvent, AlertVariant, AreaChartSeries, AvatarGroupItem, AvatarSize, AvatarStatus, BadgeSize, BadgeVariant, BarChartItem, BarChartOrientation, BreadcrumbItem, BreadcrumbSize, ButtonSize, ButtonType, ButtonVariant, CalendarEvent, CalendarView, CalloutVariant, CellEditEvent, ChatAttachment, ChatFileAttachEvent, ChatMessage, ChatMessageRole, ChatMessageStatus, ChatRenderMarkdown, ChatSendEvent, CheckboxSize, ChipSize, ChipVariant, CodeBlockLanguage, ComboboxOption, ComboboxSize, ComboboxValue, ConfirmDialogVariant, ConfirmOptions, ContainerSize, DateRange, DateValue, DependencyDirection, DependencyEdgeDef, DependencyNode, DependencyNodeStatus, DependencyRelation, DiffViewMode, DividerOrientation, DividerSpacing, DividerVariant, DocumentType, DonutChartSize, DonutSegment, DrawerPosition, DrawerSize, EmptyStateSize, ErrorSeverity, FileUploadFile, FilterConfig, FilterOption, FilterValues, FooterLink, FooterSection, FooterVariant, FunnelStep, GalleryItem, GalleryLayout, GallerySize, GanttDependency, GanttTask, GaugeColor, GaugeSize, HeatmapCell, HeroColor, HeroSize, HeroVariant, IconSize, IconVariant, KanbanCard, KanbanColumn, KanbanLabel, KanbanMoveEvent, LineChartSeries, ListItem, ListOrientation, ListSize, ListVariant, LogLevel, LogLine, LogViewerVariant, MarkdownChangesHighlighted, MarkdownHeading, MarkdownLinkClick, MarkdownRendered, MenuItem, ModalSize, NavigationItem, Notification, NotificationPriority, NotificationType, PageLayoutFill, PaginationSize, PasswordRequirement, PasswordStrength, PieChartSize, PieSegment, PopoverPosition, PopoverTrigger, ProgressBarColor, ProgressBarSize, ProgressBarVariant, ProgressRingColor, ProgressRingSize, RadarChartSeries, RadioSize, RatingSize, RenderPart, RequireTextConfig, RichTextEditorMode, RowToggleEvent, ScatterPoint, ScatterSeries, SearchInputSize, SectionBackground, SectionSpacing, SelectOption, SelectOptionGroup, SelectValue, SelectionChangeEvent, SidenavMode, SidenavPosition, SkeletonVariant, SortEvent, SpacerSize, SparklineColor, SparklineCurve, SpinnerSize, StackAlign, StackDirection, StackGap, StackJustify, StackedBarCategory, StackedBarLegend, StackedBarOrientation, StageItem, StageListSize, StatTrendDirection, StepState, StepperStep, TabOrientation, TableAction, TableActionsAlign, TableColumn, TableSize, TableTreeConfig, TableVariant, ThemeConfig, ThemeMode, ThemeState, TimelineItem, TimelineOrientation, Toast, ToastAction, ToastConfig, ToastPosition, ToastVariant, ToggleOption, ToolbarAction, ToolbarConfig, TooltipPosition, TreeNode, TreeNodeType, WaterfallItem };
|