@foblex/m-render 3.0.1 → 3.0.5
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/assets/styles/_code-group.scss +10 -0
- package/assets/styles/_code-highlight.scss +28 -28
- package/assets/styles/_preview-group.scss +9 -0
- package/assets/styles/_variables.scss +1 -1
- package/assets/styles/styles.scss +12 -12
- package/fesm2022/foblex-m-render.mjs +173 -14
- package/fesm2022/foblex-m-render.mjs.map +1 -1
- package/package.json +1 -1
- package/types/foblex-m-render.d.ts +36 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foblex/m-render",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "MRender is a static site generator designed for creating fast and user-friendly documentation sites based on Markdown files. MarkEngine supports extended Markdown syntax and can render Angular components directly from Markdown files.",
|
|
5
5
|
"author": "Siarhei Huzarevich",
|
|
6
6
|
"license": "MIT",
|
|
@@ -630,9 +630,14 @@ interface IMarkdownPageLayoutOptions {
|
|
|
630
630
|
hideTableOfContent: boolean;
|
|
631
631
|
expandContentWithoutTableOfContent: boolean;
|
|
632
632
|
}
|
|
633
|
+
interface IMarkdownOriginData {
|
|
634
|
+
url: string;
|
|
635
|
+
label: string;
|
|
636
|
+
}
|
|
633
637
|
interface IMarkdownFrontMatterData {
|
|
634
638
|
layout: IMarkdownPageLayoutOptions;
|
|
635
639
|
seo: ISeoOverrides | null;
|
|
640
|
+
origin: IMarkdownOriginData | null;
|
|
636
641
|
}
|
|
637
642
|
interface IMarkdownFrontMatterParseResult {
|
|
638
643
|
markdown: string;
|
|
@@ -648,8 +653,10 @@ declare class MarkdownService {
|
|
|
648
653
|
private readonly _provider;
|
|
649
654
|
private readonly _pageLayout;
|
|
650
655
|
private readonly _pageSeo;
|
|
656
|
+
private readonly _pageOrigin;
|
|
651
657
|
readonly pageLayout: i0.Signal<IMarkdownPageLayoutOptions>;
|
|
652
658
|
readonly pageSeo: i0.Signal<ISeoOverrides | null>;
|
|
659
|
+
readonly pageOrigin: i0.Signal<IMarkdownOriginData | null>;
|
|
653
660
|
constructor();
|
|
654
661
|
parseUrl(src: string): Observable<SafeHtml>;
|
|
655
662
|
parseText(value: string): Observable<SafeHtml>;
|
|
@@ -666,6 +673,10 @@ declare class MarkdownService {
|
|
|
666
673
|
private _parseBoolean;
|
|
667
674
|
private _applyLayoutKey;
|
|
668
675
|
private _applySeoKey;
|
|
676
|
+
private _applyOriginKey;
|
|
677
|
+
private _normalizeOriginUrl;
|
|
678
|
+
private _resolveOrigin;
|
|
679
|
+
private _getOriginLabel;
|
|
669
680
|
private _parseNumberOrDefault;
|
|
670
681
|
private _applyPageContext;
|
|
671
682
|
private _resetPageContext;
|
|
@@ -744,6 +755,7 @@ declare function parseSingleBracketText(line: string): string | null;
|
|
|
744
755
|
|
|
745
756
|
declare class MarkdownRenderer implements OnInit, OnDestroy {
|
|
746
757
|
readonly value: i0.InputSignal<SafeHtml | undefined>;
|
|
758
|
+
readonly origin: i0.InputSignal<IMarkdownOriginData | null>;
|
|
747
759
|
private readonly _hostElement;
|
|
748
760
|
private readonly _router;
|
|
749
761
|
private readonly _injector;
|
|
@@ -762,7 +774,7 @@ declare class MarkdownRenderer implements OnInit, OnDestroy {
|
|
|
762
774
|
protected _onDocumentClick(event: MouseEvent): void;
|
|
763
775
|
ngOnDestroy(): void;
|
|
764
776
|
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownRenderer, never>;
|
|
765
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownRenderer, "markdown-renderer", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
777
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownRenderer, "markdown-renderer", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "origin": { "alias": "origin"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
766
778
|
}
|
|
767
779
|
|
|
768
780
|
declare class MarkdownRouter {
|
|
@@ -772,6 +784,7 @@ declare class MarkdownRouter {
|
|
|
772
784
|
private readonly _dataProvider;
|
|
773
785
|
private readonly _metaService;
|
|
774
786
|
protected readonly emptyNavigation: boolean;
|
|
787
|
+
protected readonly pageOrigin: i0.Signal<_foblex_m_render.IMarkdownOriginData | null>;
|
|
775
788
|
protected readonly shouldExpandContent: i0.Signal<boolean>;
|
|
776
789
|
private readonly _path$;
|
|
777
790
|
protected readonly html: i0.Signal<SafeHtml | undefined>;
|
|
@@ -1009,15 +1022,26 @@ declare const DOCUMENTATION_ROUTES: Routes;
|
|
|
1009
1022
|
declare function provideHeader(...configuration: Partial<IHeaderConfiguration>[]): Partial<IHasHeaderConfiguration>;
|
|
1010
1023
|
interface IHeaderConfiguration {
|
|
1011
1024
|
search?: boolean;
|
|
1025
|
+
searchConfiguration?: IHeaderSearchConfiguration;
|
|
1012
1026
|
navigation?: IHeaderMenuLink[];
|
|
1013
1027
|
mediaLinks?: IMediaLink[];
|
|
1014
1028
|
}
|
|
1015
1029
|
interface IHasHeaderConfiguration {
|
|
1016
1030
|
header?: IHeaderConfiguration;
|
|
1017
1031
|
}
|
|
1032
|
+
interface IHeaderSearchConfiguration {
|
|
1033
|
+
appId: string;
|
|
1034
|
+
apiKey: string;
|
|
1035
|
+
indexName: string;
|
|
1036
|
+
placeholder?: string;
|
|
1037
|
+
insights?: boolean;
|
|
1038
|
+
searchParameters?: Record<string, unknown>;
|
|
1039
|
+
}
|
|
1018
1040
|
|
|
1019
1041
|
declare function provideHeaderSearch(search?: boolean): Partial<IHeaderConfiguration>;
|
|
1020
1042
|
|
|
1043
|
+
declare function provideHeaderSearchAlgolia(configuration: IHeaderSearchConfiguration): Partial<IHeaderConfiguration>;
|
|
1044
|
+
|
|
1021
1045
|
declare function provideHeaderMediaLinks(mediaLinks: IMediaLink[]): Partial<IHeaderConfiguration>;
|
|
1022
1046
|
|
|
1023
1047
|
declare function provideHeaderNavigation(navigation: IHeaderMenuLink[]): Partial<IHeaderConfiguration>;
|
|
@@ -1302,9 +1326,16 @@ declare class FBrandLinkComponent {
|
|
|
1302
1326
|
static ɵcmp: i0.ɵɵComponentDeclaration<FBrandLinkComponent, "f-brand-link", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "logo": { "alias": "logo"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "logoAlt": { "alias": "logoAlt"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1303
1327
|
}
|
|
1304
1328
|
|
|
1305
|
-
declare class FSearchButtonComponent {
|
|
1329
|
+
declare class FSearchButtonComponent implements AfterViewInit, OnDestroy {
|
|
1330
|
+
readonly configuration: i0.InputSignal<IHeaderSearchConfiguration | undefined>;
|
|
1331
|
+
private readonly _isBrowser;
|
|
1332
|
+
private readonly _document;
|
|
1333
|
+
private readonly _containerRef;
|
|
1334
|
+
private _instance;
|
|
1335
|
+
ngAfterViewInit(): Promise<void>;
|
|
1336
|
+
ngOnDestroy(): void;
|
|
1306
1337
|
static ɵfac: i0.ɵɵFactoryDeclaration<FSearchButtonComponent, never>;
|
|
1307
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FSearchButtonComponent, "f-search-button", never, {}, {}, never, never, true, never>;
|
|
1338
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FSearchButtonComponent, "f-search-button", never, { "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1308
1339
|
}
|
|
1309
1340
|
|
|
1310
1341
|
declare class FCheckboxComponent {
|
|
@@ -1358,5 +1389,5 @@ declare class ThemeButtonComponent implements OnInit {
|
|
|
1358
1389
|
|
|
1359
1390
|
declare function provideTheme(): Provider[];
|
|
1360
1391
|
|
|
1361
|
-
export { AVAILABLE_LANGUAGES, ActivateTocByHash, ActivateTocByHashRequest, CalculateAbsoluteTopToContainer, CalculateAbsoluteTopToContainerRequest, CalculateHashFromScrollPosition, CalculateTableOfContent, CalculateTableOfContentRequest, CodeGroup, CodeView, DEFAULT_MARKDOWN_PAGE_LAYOUT_OPTIONS, DOCUMENTATION_CONFIGURATION, DOCUMENTATION_ROUTES, DOCUMENT_ELEMENT, DYNAMIC_COMPONENTS_MODULE_PROVIDERS, Documentation, DocumentationStore, DropdownMenu, DynamicComponentsStore, EMarkdownContainerType, EParsedContainerType, EXTERNAL_COMPONENT_PROVIDER, ExternalComponent, FBrandLinkComponent, FCheckboxComponent, FHomePageButtonsRowComponent, FHomePageFeaturesComponent, FHomePageFooterComponent, FHomePageHeaderComponent, FHomePageHeroComponent, FHomePageMembershipsComponent, FMetaService, FNavigationItemComponent, FRadioButtonComponent, FSearchButtonComponent, F_PREVIEW_NAVIGATION_PROVIDER, FooterNavigationButton, GTAG_CONFIG, GTagService, GetPreviousNextPageNavigationHandler, GetPreviousNextPageNavigationRequest, GetPreviousNextPageNavigationResponse, HEADER_CONFIGURATION_PROVIDER, HOME_PAGE_CONFIGURATION, HOME_ROUTES, HamburgerButton, HandleNavigationLinksHandler, HandleNavigationLinksRequest, HeaderComponent, HeaderMenuBase, Highlight, HighlightService, HomeRootComponent, HomeStore, IS_BROWSER_PLATFORM, InlineMenu, LOCAL_STORAGE, LOCATION, MEDIA_LINKS_PROVIDER, MExecution, MarkCodeFocusedBlocksPostProcessor, MarkdownFooter, MarkdownRenderer, MarkdownRouter, MarkdownService, MediaLinks, Mediatr, NavigationGroupComponent, NavigationPanelComponent, ParseAlerts, ParseAngularExampleWithCodeLinks, ParseGroupedCodeItems, ParsePreviewGroup, ParseShowcase, ParseSingleCodeItem, PopoverService, PreviewActionBar, PreviewCard, PreviewCardBase, PreviewGroupService, RenderDynamicComponent, RenderDynamicComponentRequest, RenderExternalComponent, RenderExternalComponentRequest, RenderInternalComponents, RenderInternalComponentsRequest, SCROLLABLE_CONTAINER, SHOWCASE_DATA, ScrollToElementInContainer, ScrollToElementInContainerRequest, ScrollableContainer, Showcase, ShowcaseItem, TABLE_OF_CONTENT_MODULE_PROVIDERS, TOGGLE_NAVIGATION_COMPONENT, TableOfContent, TableOfContentData, TableOfContentItemsComponent, ThemeButtonComponent, ThemeService, UNIVERSAL_THEME, WINDOW, calculateMarkdownUrl, coerceComponentHeight, copyToClipboard, defineLazyComponent, defineNavigationGroup, encodeDataAttr, extractComponent, getContent, getLanguageLoader, isClosingToken, isOpeningToken, parseComponentTag, parseFileLinkLine, parseIframeUrl, parseSingleBracketText, provide404Markdown, provideBackground, provideComponents, provideDirectory, provideDocumentation, provideFooterNavigation, provideGTag, provideHeader, provideHeaderMediaLinks, provideHeaderNavigation, provideHeaderSearch, provideHero, provideHomeButtons, provideHomeFeatures, provideHomeFooter, provideHomePage, provideImage, provideLanguage, provideLogo, provideMeta, provideNavigation, provideShowcase, provideTableOfContent, provideTheme, provideTitle, resolveHighlightLanguage };
|
|
1362
|
-
export type { ConsentState, GTagConfig, HighlightLanguage, IDocumentationConfiguration, IDocumentationFooterConfiguration, IDynamicComponentInstance, IDynamicComponentItem, IExampleViewData, IExecution, IHandler, IHasHeaderConfiguration, IHeaderConfiguration, IHeaderConfigurationStore, IHeaderMenuLink, IHomePageConfiguration, IHomePageFeature, IHomePageFooter, IHomePageHero, IHomePageLink, IHomePageMembership, ILanguageConfiguration, ILink, ILogoConfiguration, IMarkdownContainerData, IMarkdownFooterLink, IMarkdownFooterNavigation, IMarkdownFrontMatterData, IMarkdownFrontMatterParseResult, IMarkdownItToken, IMarkdownPageLayoutOptions, IMediaLink, IMediaLinksProvider, IMetaData, INavigationGroup, INavigationItem, INavigationItemBadge, IParsedContainerData, IPreviewNavigationGroup, IPreviewNavigationService, IScrollableContainer, ISeoOverrides, IShowcaseItem, ITableOfContent, ITableOfContentItem, ITitleConfiguration, IToggleNavigationComponent };
|
|
1392
|
+
export { AVAILABLE_LANGUAGES, ActivateTocByHash, ActivateTocByHashRequest, CalculateAbsoluteTopToContainer, CalculateAbsoluteTopToContainerRequest, CalculateHashFromScrollPosition, CalculateTableOfContent, CalculateTableOfContentRequest, CodeGroup, CodeView, DEFAULT_MARKDOWN_PAGE_LAYOUT_OPTIONS, DOCUMENTATION_CONFIGURATION, DOCUMENTATION_ROUTES, DOCUMENT_ELEMENT, DYNAMIC_COMPONENTS_MODULE_PROVIDERS, Documentation, DocumentationStore, DropdownMenu, DynamicComponentsStore, EMarkdownContainerType, EParsedContainerType, EXTERNAL_COMPONENT_PROVIDER, ExternalComponent, FBrandLinkComponent, FCheckboxComponent, FHomePageButtonsRowComponent, FHomePageFeaturesComponent, FHomePageFooterComponent, FHomePageHeaderComponent, FHomePageHeroComponent, FHomePageMembershipsComponent, FMetaService, FNavigationItemComponent, FRadioButtonComponent, FSearchButtonComponent, F_PREVIEW_NAVIGATION_PROVIDER, FooterNavigationButton, GTAG_CONFIG, GTagService, GetPreviousNextPageNavigationHandler, GetPreviousNextPageNavigationRequest, GetPreviousNextPageNavigationResponse, HEADER_CONFIGURATION_PROVIDER, HOME_PAGE_CONFIGURATION, HOME_ROUTES, HamburgerButton, HandleNavigationLinksHandler, HandleNavigationLinksRequest, HeaderComponent, HeaderMenuBase, Highlight, HighlightService, HomeRootComponent, HomeStore, IS_BROWSER_PLATFORM, InlineMenu, LOCAL_STORAGE, LOCATION, MEDIA_LINKS_PROVIDER, MExecution, MarkCodeFocusedBlocksPostProcessor, MarkdownFooter, MarkdownRenderer, MarkdownRouter, MarkdownService, MediaLinks, Mediatr, NavigationGroupComponent, NavigationPanelComponent, ParseAlerts, ParseAngularExampleWithCodeLinks, ParseGroupedCodeItems, ParsePreviewGroup, ParseShowcase, ParseSingleCodeItem, PopoverService, PreviewActionBar, PreviewCard, PreviewCardBase, PreviewGroupService, RenderDynamicComponent, RenderDynamicComponentRequest, RenderExternalComponent, RenderExternalComponentRequest, RenderInternalComponents, RenderInternalComponentsRequest, SCROLLABLE_CONTAINER, SHOWCASE_DATA, ScrollToElementInContainer, ScrollToElementInContainerRequest, ScrollableContainer, Showcase, ShowcaseItem, TABLE_OF_CONTENT_MODULE_PROVIDERS, TOGGLE_NAVIGATION_COMPONENT, TableOfContent, TableOfContentData, TableOfContentItemsComponent, ThemeButtonComponent, ThemeService, UNIVERSAL_THEME, WINDOW, calculateMarkdownUrl, coerceComponentHeight, copyToClipboard, defineLazyComponent, defineNavigationGroup, encodeDataAttr, extractComponent, getContent, getLanguageLoader, isClosingToken, isOpeningToken, parseComponentTag, parseFileLinkLine, parseIframeUrl, parseSingleBracketText, provide404Markdown, provideBackground, provideComponents, provideDirectory, provideDocumentation, provideFooterNavigation, provideGTag, provideHeader, provideHeaderMediaLinks, provideHeaderNavigation, provideHeaderSearch, provideHeaderSearchAlgolia, provideHero, provideHomeButtons, provideHomeFeatures, provideHomeFooter, provideHomePage, provideImage, provideLanguage, provideLogo, provideMeta, provideNavigation, provideShowcase, provideTableOfContent, provideTheme, provideTitle, resolveHighlightLanguage };
|
|
1393
|
+
export type { ConsentState, GTagConfig, HighlightLanguage, IDocumentationConfiguration, IDocumentationFooterConfiguration, IDynamicComponentInstance, IDynamicComponentItem, IExampleViewData, IExecution, IHandler, IHasHeaderConfiguration, IHeaderConfiguration, IHeaderConfigurationStore, IHeaderMenuLink, IHeaderSearchConfiguration, IHomePageConfiguration, IHomePageFeature, IHomePageFooter, IHomePageHero, IHomePageLink, IHomePageMembership, ILanguageConfiguration, ILink, ILogoConfiguration, IMarkdownContainerData, IMarkdownFooterLink, IMarkdownFooterNavigation, IMarkdownFrontMatterData, IMarkdownFrontMatterParseResult, IMarkdownItToken, IMarkdownOriginData, IMarkdownPageLayoutOptions, IMediaLink, IMediaLinksProvider, IMetaData, INavigationGroup, INavigationItem, INavigationItemBadge, IParsedContainerData, IPreviewNavigationGroup, IPreviewNavigationService, IScrollableContainer, ISeoOverrides, IShowcaseItem, ITableOfContent, ITableOfContentItem, ITitleConfiguration, IToggleNavigationComponent };
|