@mathstack/app-kit 0.0.1-beta.0 → 0.0.1-beta.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.
@@ -1,41 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export interface AdkNestedObject {
3
- [key: string]: string | AdkNestedObject;
4
- }
5
- export interface AdkDocumentationNavigationSiblings {
6
- previous: string | undefined;
7
- next: string | undefined;
8
- }
9
- export declare class AdkDocumentationConfigParser {
10
- basePath: string;
11
- /**
12
- * This method takes a path from the application and a configuration object, and returns a path to a file that will be fetched.
13
- *
14
- * This assumes that the pathFromApp matches a path through the keys of the Nested Object.
15
- *
16
- * If the path is 'viz/content/items/bars', the config object might look like this:
17
- * viz: {
18
- * content: {
19
- * items: {
20
- * bars: 'bars.md'
21
- * }
22
- * }
23
- * }
24
- *
25
- * @param pathFromApp a string representing the path from the application, for example 'viz/content/items/bars'
26
- * @param config a nested object representing the configuration
27
- * @returns a string representing the file path
28
- */
29
- getPathToFile(pathFromApp: string, config: AdkNestedObject, basePath: string): string;
30
- /**
31
- *
32
- * @param pathParts a string array of path parts, for example ['viz', 'content', 'items', 'bars]
33
- * @param config a nested object representing the configuration
34
- * @returns a string representing the file name
35
- */
36
- private getFileNameFromPath;
37
- findPreviousAndNextByPath(obj: AdkNestedObject, targetPath: string): AdkDocumentationNavigationSiblings;
38
- flattenObjectWithPath(obj: AdkNestedObject, prefix?: string): string[];
39
- static ɵfac: i0.ɵɵFactoryDeclaration<AdkDocumentationConfigParser, never>;
40
- static ɵprov: i0.ɵɵInjectableDeclaration<AdkDocumentationConfigParser>;
41
- }
@@ -1,50 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { AdkAssetsService } from '../assets/assets-service';
3
- import { AdkMarkdownParser, AdkMarkdownParsingOptions, AdkParsedContentSection } from '../content-parsing';
4
- import { AdkDocumentationConfigParser, AdkDocumentationNavigationSiblings, AdkNestedObject } from './documentation-config-parser';
5
- import * as i0 from "@angular/core";
6
- export interface AdkDocsConfig {
7
- title: string;
8
- items: AdkFilesConfig;
9
- }
10
- export interface AdkFilesConfig {
11
- [key: string]: AdkFilesItem;
12
- }
13
- export type AdkFilesItem = string | null | AdkFilesConfig;
14
- export interface AdkParsedMarkdownFile<Content = string> {
15
- sections: AdkParsedContentSection<Content>[];
16
- headings: AdkHtmlHeader[];
17
- }
18
- export interface AdkParsedDocumentation<Content = string> extends AdkParsedMarkdownFile<Content> {
19
- siblings: AdkDocumentationNavigationSiblings;
20
- }
21
- export interface AdkHtmlHeader {
22
- id: string;
23
- level: number;
24
- text: string;
25
- }
26
- export interface AdkDocumentationContentOptions {
27
- fileConfig: AdkNestedObject;
28
- basePath: string;
29
- parsingOptions?: AdkMarkdownParsingOptions;
30
- }
31
- export declare class AdkDocumentationContentService {
32
- private assetsService;
33
- private docsConfigParser;
34
- private markdownParser;
35
- private files;
36
- constructor(assetsService: AdkAssetsService, docsConfigParser: AdkDocumentationConfigParser, markdownParser: AdkMarkdownParser);
37
- /**
38
- * This service requires the consuming app to provide the AdkDocumentationDisplayService, the AdkAssetsService, and the AdkDocumentationConfigParser at the level at which this service is configured.
39
- *
40
- * OPTIONAL: If the consuming app wants to use a different assets directory, they can pass it in here.
41
- */
42
- initialize(assetsDirectory?: string): void;
43
- /**
44
- * Assumes that the content path matches
45
- */
46
- getContentForCurrentContentPath(contentPath$: Observable<string>, options: AdkDocumentationContentOptions): Observable<AdkParsedDocumentation>;
47
- private getParsedMarkdownFile;
48
- static ɵfac: i0.ɵɵFactoryDeclaration<AdkDocumentationContentService, never>;
49
- static ɵprov: i0.ɵɵInjectableDeclaration<AdkDocumentationContentService>;
50
- }
@@ -1,39 +0,0 @@
1
- import { AfterViewInit, DestroyRef, ElementRef, EventEmitter, NgZone, OnInit, TemplateRef } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { ShikiTheme } from '../content-parsing';
4
- import { AdkActiveHeadingTracker } from './active-heading-tracker';
5
- import { AdkNestedObject } from './documentation-config-parser';
6
- import { AdkDocumentationContentService, AdkHtmlHeader, AdkParsedDocumentation } from './documentation-content-service';
7
- import * as i0 from "@angular/core";
8
- export declare class AdkDocumentationDisplayComponent implements OnInit, AfterViewInit {
9
- private content;
10
- private activeHeading;
11
- private destroyRef;
12
- private zone;
13
- private document;
14
- /**
15
- * Observable that emits the current content path
16
- */
17
- contentPath$: Observable<string>;
18
- fileConfig: AdkNestedObject;
19
- highlightTheme: ShikiTheme;
20
- pathFromAssetsToFile: string;
21
- showPrevNextNavigation: boolean;
22
- nextDoc: EventEmitter<string>;
23
- file: ElementRef<HTMLDivElement>;
24
- content$: Observable<AdkParsedDocumentation>;
25
- escapedContentTemplateRef: TemplateRef<unknown>;
26
- constructor(content: AdkDocumentationContentService, activeHeading: AdkActiveHeadingTracker, destroyRef: DestroyRef, zone: NgZone, document: Document);
27
- ngOnInit(): void;
28
- ngAfterViewInit(): void;
29
- setContent(): void;
30
- scrollToHeading(update: {
31
- heading: AdkHtmlHeader;
32
- event: KeyboardEvent | PointerEvent | MouseEvent | Event;
33
- }): void;
34
- scrollToItemById(item: HTMLHeadingElement, needsChangeDetection?: boolean): void;
35
- scrollToItem(top: number): void;
36
- navigateToDoc(sibling: string): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<AdkDocumentationDisplayComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<AdkDocumentationDisplayComponent, "hsi-adk-documentation-display", never, { "contentPath$": { "alias": "contentPath$"; "required": false; }; "fileConfig": { "alias": "fileConfig"; "required": false; }; "highlightTheme": { "alias": "highlightTheme"; "required": false; }; "pathFromAssetsToFile": { "alias": "pathFromAssetsToFile"; "required": false; }; "showPrevNextNavigation": { "alias": "showPrevNextNavigation"; "required": false; }; }, { "nextDoc": "nextDoc"; }, ["escapedContentTemplateRef"], never, true, never>;
39
- }
@@ -1,6 +0,0 @@
1
- export * from './active-heading-tracker';
2
- export * from './document-index/document-index.component';
3
- export * from './documentation-config-parser';
4
- export * from './documentation-content-service';
5
- export * from './documentation-display.component';
6
- export * from './navigation-siblings/navigation-siblings.component';
@@ -1,18 +0,0 @@
1
- import { TitleCasePipe } from '@angular/common';
2
- import { EventEmitter, OnChanges } from '@angular/core';
3
- import { AdkDocumentationNavigationSiblings } from '../documentation-config-parser';
4
- import * as i0 from "@angular/core";
5
- export declare class NavigationSiblingsComponent implements OnChanges {
6
- private titleCase;
7
- siblings: AdkDocumentationNavigationSiblings;
8
- nextDoc: EventEmitter<string>;
9
- previous: string;
10
- next: string;
11
- constructor(titleCase: TitleCasePipe);
12
- ngOnChanges(): void;
13
- setDisplayNames(): void;
14
- getDisplayName(path: string): string;
15
- navigateToDoc(sibling: string): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<NavigationSiblingsComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<NavigationSiblingsComponent, "hsi-adk-navigation-siblings", never, { "siblings": { "alias": "siblings"; "required": false; }; }, { "nextDoc": "nextDoc"; }, never, never, true, never>;
18
- }
@@ -1,2 +0,0 @@
1
- export * from './ng-on-changes';
2
- export * from './run-ng-change-detection-then';
@@ -1,22 +0,0 @@
1
- import { SimpleChanges } from '@angular/core';
2
- /**
3
- * A utility class for detecting changes to objects in Angular's ngOnChanges lifecycle hook.
4
- */
5
- export declare class NgOnChangesUtilities {
6
- /**
7
- * Checks if an input object has changed since the first change.
8
- * @param changes - The SimpleChanges object containing the changes.
9
- * @param inputName - The name of the input property to check.
10
- * @param property - Optional specific property to check within the input object.
11
- * @returns True if the input object has changed since the first change, otherwise false.
12
- */
13
- static inputObjectChangedNotFirstTime(changes: SimpleChanges, inputName: string, property?: string): boolean;
14
- /**
15
- * Checks if an input object has changed.
16
- * @param changes - The SimpleChanges object containing the changes.
17
- * @param inputName - The name of the input property to check.
18
- * @param property - Optional specific property to check within the input object.
19
- * @returns True if the input object has changed, otherwise false.
20
- */
21
- static inputObjectChanged(changes: SimpleChanges, inputName: string, property?: string): boolean;
22
- }
@@ -1,22 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- /**
4
- *
5
- * @param zone: NgZone
6
- * @returns (source: Observable<T>) => Observable<void>
7
- *
8
- * A custom RxJS operator that runs an Angular change detection cycle after the source observable emits, and waits until the change detection cycle is complete before emitting the next value.
9
- *
10
- * Note that this is not intended to be used frequently. It is a workaround for cases where you need to ensure that Angular has completed change detection before continuing with the next operation, for example when you need to access a DOM element that is being created through multiple levels of content projection.
11
- *
12
- * @example
13
- * ```ts
14
- * this.myObservable.pipe(
15
- * runNgChangeDetectionThen(this.zone),
16
- * subscribe(() => {
17
- * console.log('a change detection cycle has completed');
18
- * })
19
- * );
20
- * ```
21
- */
22
- export declare function runNgChangeDetectionThen<T>(zone: NgZone): (source: Observable<T>) => Observable<void>;
package/public-api.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './lib/assets';
2
- export * from './lib/content-parsing';
3
- export * from './lib/core/utilities/index';
4
- export * from './lib/documentation-display';
5
- export * from './lib/ng-utilities';
6
- export declare const STYLES_PATH = "./lib/styles/_index.scss";