@foblex/m-render 3.0.0 → 3.0.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foblex/m-render",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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",
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
4
4
  import * as _angular_cdk_overlay from '@angular/cdk/overlay';
5
5
  import { ConnectedPosition } from '@angular/cdk/overlay';
6
6
  import * as _foblex_m_render from '@foblex/m-render';
7
- import { SafeHtml } from '@angular/platform-browser';
7
+ import { SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
8
8
  import MarkdownIt from 'markdown-it';
9
9
  import container from 'markdown-it-container';
10
10
  import { Router, Routes } from '@angular/router';
@@ -283,6 +283,7 @@ declare function parseComponentTag(html: string): string | null;
283
283
  declare class ExternalComponent implements OnInit {
284
284
  readonly data: i0.InputSignalWithTransform<IExampleViewData, IParsedContainerData>;
285
285
  protected readonly iframeUrl: i0.Signal<string | undefined>;
286
+ protected readonly iframeResourceUrl: i0.Signal<SafeResourceUrl | undefined>;
286
287
  protected readonly hasContent: i0.Signal<boolean>;
287
288
  protected readonly canToggleFullscreen: i0.Signal<boolean>;
288
289
  protected readonly fullscreenLabel: i0.Signal<"Exit full screen" | "Full screen">;
@@ -292,6 +293,7 @@ declare class ExternalComponent implements OnInit {
292
293
  private readonly _isBrowser;
293
294
  private readonly _mediatr;
294
295
  private readonly _viewContainerRef;
296
+ private readonly _sanitizer;
295
297
  ngOnInit(): void;
296
298
  protected toggleFullscreen(): Promise<void>;
297
299
  protected onFullscreenChange(): void;
@@ -628,9 +630,14 @@ interface IMarkdownPageLayoutOptions {
628
630
  hideTableOfContent: boolean;
629
631
  expandContentWithoutTableOfContent: boolean;
630
632
  }
633
+ interface IMarkdownOriginData {
634
+ url: string;
635
+ label: string;
636
+ }
631
637
  interface IMarkdownFrontMatterData {
632
638
  layout: IMarkdownPageLayoutOptions;
633
639
  seo: ISeoOverrides | null;
640
+ origin: IMarkdownOriginData | null;
634
641
  }
635
642
  interface IMarkdownFrontMatterParseResult {
636
643
  markdown: string;
@@ -646,8 +653,10 @@ declare class MarkdownService {
646
653
  private readonly _provider;
647
654
  private readonly _pageLayout;
648
655
  private readonly _pageSeo;
656
+ private readonly _pageOrigin;
649
657
  readonly pageLayout: i0.Signal<IMarkdownPageLayoutOptions>;
650
658
  readonly pageSeo: i0.Signal<ISeoOverrides | null>;
659
+ readonly pageOrigin: i0.Signal<IMarkdownOriginData | null>;
651
660
  constructor();
652
661
  parseUrl(src: string): Observable<SafeHtml>;
653
662
  parseText(value: string): Observable<SafeHtml>;
@@ -664,6 +673,10 @@ declare class MarkdownService {
664
673
  private _parseBoolean;
665
674
  private _applyLayoutKey;
666
675
  private _applySeoKey;
676
+ private _applyOriginKey;
677
+ private _normalizeOriginUrl;
678
+ private _resolveOrigin;
679
+ private _getOriginLabel;
667
680
  private _parseNumberOrDefault;
668
681
  private _applyPageContext;
669
682
  private _resetPageContext;
@@ -742,6 +755,7 @@ declare function parseSingleBracketText(line: string): string | null;
742
755
 
743
756
  declare class MarkdownRenderer implements OnInit, OnDestroy {
744
757
  readonly value: i0.InputSignal<SafeHtml | undefined>;
758
+ readonly origin: i0.InputSignal<IMarkdownOriginData | null>;
745
759
  private readonly _hostElement;
746
760
  private readonly _router;
747
761
  private readonly _injector;
@@ -760,7 +774,7 @@ declare class MarkdownRenderer implements OnInit, OnDestroy {
760
774
  protected _onDocumentClick(event: MouseEvent): void;
761
775
  ngOnDestroy(): void;
762
776
  static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownRenderer, never>;
763
- 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>;
764
778
  }
765
779
 
766
780
  declare class MarkdownRouter {
@@ -770,6 +784,7 @@ declare class MarkdownRouter {
770
784
  private readonly _dataProvider;
771
785
  private readonly _metaService;
772
786
  protected readonly emptyNavigation: boolean;
787
+ protected readonly pageOrigin: i0.Signal<_foblex_m_render.IMarkdownOriginData | null>;
773
788
  protected readonly shouldExpandContent: i0.Signal<boolean>;
774
789
  private readonly _path$;
775
790
  protected readonly html: i0.Signal<SafeHtml | undefined>;
@@ -1357,4 +1372,4 @@ declare class ThemeButtonComponent implements OnInit {
1357
1372
  declare function provideTheme(): Provider[];
1358
1373
 
1359
1374
  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 };
1360
- 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 };
1375
+ 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, IMarkdownOriginData, IMarkdownPageLayoutOptions, IMediaLink, IMediaLinksProvider, IMetaData, INavigationGroup, INavigationItem, INavigationItemBadge, IParsedContainerData, IPreviewNavigationGroup, IPreviewNavigationService, IScrollableContainer, ISeoOverrides, IShowcaseItem, ITableOfContent, ITableOfContentItem, ITitleConfiguration, IToggleNavigationComponent };