nxt-highlightjs 19.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/README.md +64 -0
- package/extras/code-file-location.d.ts +12 -0
- package/extras/code-from-url.d.ts +10 -0
- package/extras/code-loader.d.ts +22 -0
- package/extras/gist.d.ts +20 -0
- package/extras/gist.model.d.ts +95 -0
- package/extras/highlight-extras.module.d.ts +8 -0
- package/extras/index.d.ts +5 -0
- package/extras/public_api.d.ts +5 -0
- package/fesm2022/nxt-highlightjs-extras.mjs +203 -0
- package/fesm2022/nxt-highlightjs-extras.mjs.map +1 -0
- package/fesm2022/nxt-highlightjs-line-numbers.mjs +311 -0
- package/fesm2022/nxt-highlightjs-line-numbers.mjs.map +1 -0
- package/fesm2022/nxt-highlightjs.mjs +389 -0
- package/fesm2022/nxt-highlightjs.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/highlight-auto.d.ts +27 -0
- package/lib/highlight-base.d.ts +27 -0
- package/lib/highlight.d.ts +30 -0
- package/lib/highlight.loader.d.ts +28 -0
- package/lib/highlight.model.d.ts +22 -0
- package/lib/highlight.module.d.ts +8 -0
- package/lib/highlight.service.d.ts +64 -0
- package/lib/loader-errors.d.ts +7 -0
- package/lib/trusted-types.d.ts +1 -0
- package/line-numbers/index.d.ts +5 -0
- package/line-numbers/line-numbers-lib.d.ts +6 -0
- package/line-numbers/line-numbers.d.ts +12 -0
- package/line-numbers/public_api.d.ts +2 -0
- package/package.json +52 -0
- package/public-api.d.ts +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Angular Highlight.js directives
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Liquid-JS/nxt-components/blob/master/LICENSE)
|
|
4
|
+
[](https://www.npmjs.com/package/nxt-highlightjs)
|
|
5
|
+
[](https://www.npmjs.com/package/nxt-highlightjs)
|
|
6
|
+
|
|
7
|
+
Angular code highlighting directives with optional line numbers and support for SSR.
|
|
8
|
+
|
|
9
|
+
## Quick links
|
|
10
|
+
|
|
11
|
+
- [Demo](https://liquid-js.github.io/nxt-components/demo/highlightjs)
|
|
12
|
+
- [Getting started](https://liquid-js.github.io/nxt-components/demo/highlightjs/getting-started)
|
|
13
|
+
- [Extras](https://liquid-js.github.io/nxt-components/demo/highlightjs/extras)
|
|
14
|
+
- [API docs](https://liquid-js.github.io/nxt-components/nxt-highlightjs)
|
|
15
|
+
|
|
16
|
+
### Installing
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install --save nxt-highlightjs highlight.js
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Load and configure Highlight.js
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { ApplicationConfig } from '@angular/core'
|
|
26
|
+
import { provideHighlightOptions } from 'nxt-highlightjs'
|
|
27
|
+
|
|
28
|
+
export const appConfig: ApplicationConfig = {
|
|
29
|
+
providers: [
|
|
30
|
+
provideHighlightOptions({
|
|
31
|
+
fullLibraryLoader: () => import('highlight.js')
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Above code loads the entire Highlight.js library. To improve performance you might want to load only the core library and neccesary languages.
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { ApplicationConfig } from '@angular/core'
|
|
41
|
+
import { provideHighlightOptions } from 'nxt-highlightjs'
|
|
42
|
+
|
|
43
|
+
export const appConfig: ApplicationConfig = {
|
|
44
|
+
providers: [
|
|
45
|
+
provideHighlightOptions({
|
|
46
|
+
coreLibraryLoader: () => import('highlight.js/lib/core'),
|
|
47
|
+
lineNumbersLoader: () => import('nxt-highlightjs/line-numbers'), // Optional, add line numbers if needed
|
|
48
|
+
languages: {
|
|
49
|
+
typescript: () => import('highlight.js/lib/languages/typescript'),
|
|
50
|
+
css: () => import('highlight.js/lib/languages/css'),
|
|
51
|
+
xml: () => import('highlight.js/lib/languages/xml')
|
|
52
|
+
},
|
|
53
|
+
themePath: 'path-to-theme.css' // Optional, useful for dynamic theme changes
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Use it in a template
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<pre><code [nxtHighlight]="code"
|
|
63
|
+
language="html"></code></pre>
|
|
64
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Injection token used to provide the current location to `codeFromUrl` pipe.
|
|
4
|
+
* Used to handle server-side rendering and to stub out during unit tests.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NXT_HIGHLIGHT_FILE_LOCATION: InjectionToken<CodeFileLocation>;
|
|
7
|
+
export interface CodeFileLocation {
|
|
8
|
+
formatPathname: (path: string) => string;
|
|
9
|
+
}
|
|
10
|
+
export declare function CODE_FILE_LOCATION_FACTORY(): {
|
|
11
|
+
formatPathname: (path: string) => string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CodeFromUrlPipe implements PipeTransform {
|
|
5
|
+
private readonly location;
|
|
6
|
+
private readonly loader;
|
|
7
|
+
transform(url: string): Observable<string>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeFromUrlPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CodeFromUrlPipe, "codeFromUrl", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Gist } from './gist.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CodeLoader {
|
|
5
|
+
private readonly http;
|
|
6
|
+
private readonly options;
|
|
7
|
+
/**
|
|
8
|
+
* Get plus code
|
|
9
|
+
*
|
|
10
|
+
* @param id Gist ID
|
|
11
|
+
*/
|
|
12
|
+
getCodeFromGist(id: string): Observable<Gist>;
|
|
13
|
+
/**
|
|
14
|
+
* Get code by URL
|
|
15
|
+
*
|
|
16
|
+
* @param url File raw link
|
|
17
|
+
*/
|
|
18
|
+
getCodeFromUrl(url: string): Observable<string>;
|
|
19
|
+
private fetchFile;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeLoader, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CodeLoader>;
|
|
22
|
+
}
|
package/extras/gist.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, PipeTransform } from '@angular/core';
|
|
2
|
+
import { Gist, GistFile } from './gist.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class GistDirective implements OnDestroy {
|
|
5
|
+
private readonly loader;
|
|
6
|
+
private readonly pendingTasks;
|
|
7
|
+
private readonly cdRef;
|
|
8
|
+
private subscription?;
|
|
9
|
+
set gist(value: string);
|
|
10
|
+
gistLoad: EventEmitter<Gist>;
|
|
11
|
+
gistError: EventEmitter<any>;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GistDirective, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GistDirective, "[nxtGist]", never, { "gist": { "alias": "nxtGist"; "required": false; }; }, { "gistLoad": "gistLoad"; "gistError": "gistError"; }, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
export declare class GistFilePipe implements PipeTransform {
|
|
17
|
+
transform(gist?: Gist | null, fileName?: string | null): GistFile | undefined;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GistFilePipe, never>;
|
|
19
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<GistFilePipe, "gistFile", true>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
export declare function isUrl(url: string): boolean;
|
|
3
|
+
export interface GistOptions {
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientSecret: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const NXT_GIST_OPTIONS: InjectionToken<GistOptions>;
|
|
8
|
+
export declare function provideGistOptions(options: GistOptions): Provider[];
|
|
9
|
+
interface Owner {
|
|
10
|
+
login: string;
|
|
11
|
+
id: number;
|
|
12
|
+
node_id: string;
|
|
13
|
+
avatar_url: string;
|
|
14
|
+
gravatar_id: string;
|
|
15
|
+
url: string;
|
|
16
|
+
html_url: string;
|
|
17
|
+
followers_url: string;
|
|
18
|
+
following_url: string;
|
|
19
|
+
gists_url: string;
|
|
20
|
+
starred_url: string;
|
|
21
|
+
subscriptions_url: string;
|
|
22
|
+
organizations_url: string;
|
|
23
|
+
repos_url: string;
|
|
24
|
+
events_url: string;
|
|
25
|
+
received_events_url: string;
|
|
26
|
+
type: string;
|
|
27
|
+
site_admin: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface User {
|
|
30
|
+
login: string;
|
|
31
|
+
id: number;
|
|
32
|
+
node_id: string;
|
|
33
|
+
avatar_url: string;
|
|
34
|
+
gravatar_id: string;
|
|
35
|
+
url: string;
|
|
36
|
+
html_url: string;
|
|
37
|
+
followers_url: string;
|
|
38
|
+
following_url: string;
|
|
39
|
+
gists_url: string;
|
|
40
|
+
starred_url: string;
|
|
41
|
+
subscriptions_url: string;
|
|
42
|
+
organizations_url: string;
|
|
43
|
+
repos_url: string;
|
|
44
|
+
events_url: string;
|
|
45
|
+
received_events_url: string;
|
|
46
|
+
type: string;
|
|
47
|
+
site_admin: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface ChangeStatus {
|
|
50
|
+
total: number;
|
|
51
|
+
additions: number;
|
|
52
|
+
deletions: number;
|
|
53
|
+
}
|
|
54
|
+
interface History {
|
|
55
|
+
user: User;
|
|
56
|
+
version: string;
|
|
57
|
+
committed_at: Date;
|
|
58
|
+
change_status: ChangeStatus;
|
|
59
|
+
url: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GistFile {
|
|
62
|
+
filename: string;
|
|
63
|
+
type: string;
|
|
64
|
+
language: string;
|
|
65
|
+
raw_url: string;
|
|
66
|
+
size: number;
|
|
67
|
+
truncated: boolean;
|
|
68
|
+
content: string;
|
|
69
|
+
}
|
|
70
|
+
interface Files {
|
|
71
|
+
[fileName: string]: GistFile;
|
|
72
|
+
}
|
|
73
|
+
export interface Gist {
|
|
74
|
+
url: string;
|
|
75
|
+
forks_url: string;
|
|
76
|
+
commits_url: string;
|
|
77
|
+
id: string;
|
|
78
|
+
node_id: string;
|
|
79
|
+
git_pull_url: string;
|
|
80
|
+
git_push_url: string;
|
|
81
|
+
html_url: string;
|
|
82
|
+
files: Files;
|
|
83
|
+
public: boolean;
|
|
84
|
+
created_at: Date;
|
|
85
|
+
updated_at: Date;
|
|
86
|
+
description: string;
|
|
87
|
+
comments: number;
|
|
88
|
+
user?: any;
|
|
89
|
+
comments_url: string;
|
|
90
|
+
owner: Owner;
|
|
91
|
+
forks: any[];
|
|
92
|
+
history: History[];
|
|
93
|
+
truncated: boolean;
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./gist";
|
|
3
|
+
import * as i2 from "./code-from-url";
|
|
4
|
+
export declare class HighlightExstrasModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightExstrasModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HighlightExstrasModule, never, [typeof i1.GistDirective, typeof i1.GistFilePipe, typeof i2.CodeFromUrlPipe], [typeof i1.GistDirective, typeof i1.GistFilePipe, typeof i2.CodeFromUrlPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HighlightExstrasModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, Pipe, PendingTasks, ChangeDetectorRef, EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, APP_BASE_HREF } from '@angular/common';
|
|
4
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
5
|
+
import { shareReplay, EMPTY } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Injection token used to provide the current location to `codeFromUrl` pipe.
|
|
9
|
+
* Used to handle server-side rendering and to stub out during unit tests.
|
|
10
|
+
*/
|
|
11
|
+
const NXT_HIGHLIGHT_FILE_LOCATION = new InjectionToken('NXT_HIGHLIGHT_FILE_LOCATION', {
|
|
12
|
+
providedIn: 'root',
|
|
13
|
+
factory: CODE_FILE_LOCATION_FACTORY
|
|
14
|
+
});
|
|
15
|
+
function CODE_FILE_LOCATION_FACTORY() {
|
|
16
|
+
const location = inject(DOCUMENT)?.location;
|
|
17
|
+
const base = inject(APP_BASE_HREF, { optional: true })?.replace(/\/+$/igm, '');
|
|
18
|
+
return {
|
|
19
|
+
// Note that this needs to be a function, rather than a property, because Angular
|
|
20
|
+
// will only resolve it once, but we want the current path on each call.
|
|
21
|
+
// getPathname: () => (location ? location.pathname + location.search : ''),
|
|
22
|
+
formatPathname: (path) => {
|
|
23
|
+
const origin = (location ? location.origin : '').replace(/\/+$/igm, '');
|
|
24
|
+
if (path.startsWith('/'))
|
|
25
|
+
return origin + path;
|
|
26
|
+
let prefix = base ?? origin;
|
|
27
|
+
if (prefix)
|
|
28
|
+
prefix += '/';
|
|
29
|
+
return prefix + path;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isUrl(url) {
|
|
35
|
+
const regExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!]))?/;
|
|
36
|
+
return regExp.test(url);
|
|
37
|
+
}
|
|
38
|
+
const NXT_GIST_OPTIONS = new InjectionToken('NXT_GIST_OPTIONS');
|
|
39
|
+
function provideGistOptions(options) {
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
provide: NXT_GIST_OPTIONS,
|
|
43
|
+
useValue: options
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
class CodeLoader {
|
|
49
|
+
constructor() {
|
|
50
|
+
this.http = inject(HttpClient);
|
|
51
|
+
this.options = inject(NXT_GIST_OPTIONS, { optional: true });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get plus code
|
|
55
|
+
*
|
|
56
|
+
* @param id Gist ID
|
|
57
|
+
*/
|
|
58
|
+
getCodeFromGist(id) {
|
|
59
|
+
let params;
|
|
60
|
+
if (this.options?.clientId && this.options?.clientSecret) {
|
|
61
|
+
params = new HttpParams().set('client_id', this.options.clientId).set('client_secret', this.options.clientSecret);
|
|
62
|
+
}
|
|
63
|
+
return this.fetchFile(`https://api.github.com/gists/${id}`, { params, responseType: 'json' });
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get code by URL
|
|
67
|
+
*
|
|
68
|
+
* @param url File raw link
|
|
69
|
+
*/
|
|
70
|
+
getCodeFromUrl(url) {
|
|
71
|
+
return this.fetchFile(url, { responseType: 'text' });
|
|
72
|
+
}
|
|
73
|
+
fetchFile(url, options) {
|
|
74
|
+
// Check if URL is valid
|
|
75
|
+
if (isUrl(url)) {
|
|
76
|
+
return this.http.get(url, options).pipe(
|
|
77
|
+
// Catch response
|
|
78
|
+
shareReplay(1));
|
|
79
|
+
}
|
|
80
|
+
return EMPTY;
|
|
81
|
+
}
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CodeLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
83
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CodeLoader, providedIn: 'root' }); }
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CodeLoader, decorators: [{
|
|
86
|
+
type: Injectable,
|
|
87
|
+
args: [{
|
|
88
|
+
providedIn: 'root'
|
|
89
|
+
}]
|
|
90
|
+
}] });
|
|
91
|
+
|
|
92
|
+
class CodeFromUrlPipe {
|
|
93
|
+
constructor() {
|
|
94
|
+
this.location = inject(NXT_HIGHLIGHT_FILE_LOCATION);
|
|
95
|
+
this.loader = inject(CodeLoader);
|
|
96
|
+
}
|
|
97
|
+
transform(url) {
|
|
98
|
+
return this.loader.getCodeFromUrl(isUrl(url) ? url : this.location.formatPathname(url));
|
|
99
|
+
}
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CodeFromUrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
101
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: CodeFromUrlPipe, isStandalone: true, name: "codeFromUrl" }); }
|
|
102
|
+
}
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CodeFromUrlPipe, decorators: [{
|
|
104
|
+
type: Pipe,
|
|
105
|
+
args: [{
|
|
106
|
+
name: 'codeFromUrl'
|
|
107
|
+
}]
|
|
108
|
+
}] });
|
|
109
|
+
|
|
110
|
+
class GistDirective {
|
|
111
|
+
constructor() {
|
|
112
|
+
this.loader = inject(CodeLoader);
|
|
113
|
+
this.pendingTasks = inject(PendingTasks);
|
|
114
|
+
this.cdRef = inject(ChangeDetectorRef);
|
|
115
|
+
this.gistLoad = new EventEmitter();
|
|
116
|
+
this.gistError = new EventEmitter();
|
|
117
|
+
}
|
|
118
|
+
set gist(value) {
|
|
119
|
+
this.subscription?.unsubscribe();
|
|
120
|
+
this.subscription = undefined;
|
|
121
|
+
if (value) {
|
|
122
|
+
const done = this.pendingTasks.add();
|
|
123
|
+
this.subscription = this.loader.getCodeFromGist(value).subscribe({
|
|
124
|
+
next: (gist) => {
|
|
125
|
+
this.gistLoad.emit(gist);
|
|
126
|
+
this.cdRef.detectChanges();
|
|
127
|
+
done();
|
|
128
|
+
},
|
|
129
|
+
error: (err) => {
|
|
130
|
+
this.gistError.emit(err);
|
|
131
|
+
this.cdRef.detectChanges();
|
|
132
|
+
done();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
ngOnDestroy() {
|
|
138
|
+
this.subscription?.unsubscribe();
|
|
139
|
+
this.subscription = undefined;
|
|
140
|
+
}
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: GistDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
142
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: GistDirective, isStandalone: true, selector: "[nxtGist]", inputs: { gist: ["nxtGist", "gist"] }, outputs: { gistLoad: "gistLoad", gistError: "gistError" }, ngImport: i0 }); }
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: GistDirective, decorators: [{
|
|
145
|
+
type: Directive,
|
|
146
|
+
args: [{
|
|
147
|
+
selector: '[nxtGist]'
|
|
148
|
+
}]
|
|
149
|
+
}], propDecorators: { gist: [{
|
|
150
|
+
type: Input,
|
|
151
|
+
args: ['nxtGist']
|
|
152
|
+
}], gistLoad: [{
|
|
153
|
+
type: Output
|
|
154
|
+
}], gistError: [{
|
|
155
|
+
type: Output
|
|
156
|
+
}] } });
|
|
157
|
+
class GistFilePipe {
|
|
158
|
+
transform(gist, fileName) {
|
|
159
|
+
if (!fileName)
|
|
160
|
+
return;
|
|
161
|
+
return gist?.files?.[fileName];
|
|
162
|
+
}
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: GistFilePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
164
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: GistFilePipe, isStandalone: true, name: "gistFile" }); }
|
|
165
|
+
}
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: GistFilePipe, decorators: [{
|
|
167
|
+
type: Pipe,
|
|
168
|
+
args: [{
|
|
169
|
+
name: 'gistFile'
|
|
170
|
+
}]
|
|
171
|
+
}] });
|
|
172
|
+
|
|
173
|
+
class HighlightExstrasModule {
|
|
174
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HighlightExstrasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
175
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: HighlightExstrasModule, imports: [GistDirective,
|
|
176
|
+
GistFilePipe,
|
|
177
|
+
CodeFromUrlPipe], exports: [GistDirective,
|
|
178
|
+
GistFilePipe,
|
|
179
|
+
CodeFromUrlPipe] }); }
|
|
180
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HighlightExstrasModule }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HighlightExstrasModule, decorators: [{
|
|
183
|
+
type: NgModule,
|
|
184
|
+
args: [{
|
|
185
|
+
imports: [
|
|
186
|
+
GistDirective,
|
|
187
|
+
GistFilePipe,
|
|
188
|
+
CodeFromUrlPipe
|
|
189
|
+
],
|
|
190
|
+
exports: [
|
|
191
|
+
GistDirective,
|
|
192
|
+
GistFilePipe,
|
|
193
|
+
CodeFromUrlPipe
|
|
194
|
+
]
|
|
195
|
+
}]
|
|
196
|
+
}] });
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Generated bundle index. Do not edit.
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
export { CodeFromUrlPipe, CodeLoader, GistDirective, GistFilePipe, HighlightExstrasModule, NXT_GIST_OPTIONS, isUrl, provideGistOptions };
|
|
203
|
+
//# sourceMappingURL=nxt-highlightjs-extras.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nxt-highlightjs-extras.mjs","sources":["../../../packages/highlightjs/extras/src/code-file-location.ts","../../../packages/highlightjs/extras/src/gist.model.ts","../../../packages/highlightjs/extras/src/code-loader.ts","../../../packages/highlightjs/extras/src/code-from-url.ts","../../../packages/highlightjs/extras/src/gist.ts","../../../packages/highlightjs/extras/src/highlight-extras.module.ts","../../../packages/highlightjs/extras/src/nxt-highlightjs-extras.ts"],"sourcesContent":["import { APP_BASE_HREF, DOCUMENT } from '@angular/common'\r\nimport { inject, InjectionToken } from '@angular/core'\r\n\r\n/**\r\n * Injection token used to provide the current location to `codeFromUrl` pipe.\r\n * Used to handle server-side rendering and to stub out during unit tests.\r\n */\r\nexport const NXT_HIGHLIGHT_FILE_LOCATION = new InjectionToken<CodeFileLocation>('NXT_HIGHLIGHT_FILE_LOCATION', {\r\n providedIn: 'root',\r\n factory: CODE_FILE_LOCATION_FACTORY\r\n})\r\n\r\nexport interface CodeFileLocation {\r\n formatPathname: (path: string) => string\r\n}\r\n\r\nexport function CODE_FILE_LOCATION_FACTORY() {\r\n const location = inject(DOCUMENT)?.location\r\n const base = inject(APP_BASE_HREF, { optional: true })?.replace(/\\/+$/igm, '')\r\n\r\n return {\r\n // Note that this needs to be a function, rather than a property, because Angular\r\n // will only resolve it once, but we want the current path on each call.\r\n // getPathname: () => (location ? location.pathname + location.search : ''),\r\n formatPathname: (path: string) => {\r\n const origin = (location ? location.origin : '').replace(/\\/+$/igm, '')\r\n if (path.startsWith('/'))\r\n return origin + path\r\n\r\n let prefix = base ?? origin\r\n if (prefix)\r\n prefix += '/'\r\n\r\n return prefix + path\r\n }\r\n }\r\n}\r\n","import { InjectionToken, Provider } from '@angular/core'\r\n\r\nexport function isUrl(url: string): boolean {\r\n const regExp: RegExp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!]))?/\r\n return regExp.test(url)\r\n}\r\n\r\nexport interface GistOptions {\r\n clientId: string\r\n clientSecret: string\r\n}\r\n\r\nexport const NXT_GIST_OPTIONS = new InjectionToken<GistOptions>('NXT_GIST_OPTIONS')\r\n\r\nexport function provideGistOptions(options: GistOptions): Provider[] {\r\n return [\r\n {\r\n provide: NXT_GIST_OPTIONS,\r\n useValue: options\r\n }\r\n ]\r\n}\r\n\r\ninterface Owner {\r\n login: string\r\n id: number\r\n node_id: string\r\n avatar_url: string\r\n gravatar_id: string\r\n url: string\r\n html_url: string\r\n followers_url: string\r\n following_url: string\r\n gists_url: string\r\n starred_url: string\r\n subscriptions_url: string\r\n organizations_url: string\r\n repos_url: string\r\n events_url: string\r\n received_events_url: string\r\n type: string\r\n site_admin: boolean\r\n}\r\n\r\ninterface User {\r\n login: string\r\n id: number\r\n node_id: string\r\n avatar_url: string\r\n gravatar_id: string\r\n url: string\r\n html_url: string\r\n followers_url: string\r\n following_url: string\r\n gists_url: string\r\n starred_url: string\r\n subscriptions_url: string\r\n organizations_url: string\r\n repos_url: string\r\n events_url: string\r\n received_events_url: string\r\n type: string\r\n site_admin: boolean\r\n}\r\n\r\ninterface ChangeStatus {\r\n total: number\r\n additions: number\r\n deletions: number\r\n}\r\n\r\ninterface History {\r\n user: User\r\n version: string\r\n committed_at: Date\r\n change_status: ChangeStatus\r\n url: string\r\n}\r\n\r\nexport interface GistFile {\r\n filename: string\r\n type: string\r\n language: string\r\n raw_url: string\r\n size: number\r\n truncated: boolean\r\n content: string\r\n}\r\n\r\ninterface Files {\r\n [fileName: string]: GistFile\r\n}\r\n\r\nexport interface Gist {\r\n url: string\r\n forks_url: string\r\n commits_url: string\r\n id: string\r\n node_id: string\r\n git_pull_url: string\r\n git_push_url: string\r\n html_url: string\r\n files: Files\r\n public: boolean\r\n created_at: Date\r\n updated_at: Date\r\n description: string\r\n comments: number\r\n user?: any\r\n comments_url: string\r\n owner: Owner\r\n forks: any[]\r\n history: History[]\r\n truncated: boolean\r\n}\r\n\r\n","import { HttpClient, HttpParams } from '@angular/common/http'\r\nimport { inject, Injectable } from '@angular/core'\r\nimport { EMPTY, Observable, shareReplay } from 'rxjs'\r\nimport { Gist, isUrl, NXT_GIST_OPTIONS } from './gist.model'\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CodeLoader {\r\n\r\n private readonly http = inject(HttpClient)\r\n private readonly options = inject(NXT_GIST_OPTIONS, { optional: true })\r\n\r\n /**\r\n * Get plus code\r\n *\r\n * @param id Gist ID\r\n */\r\n getCodeFromGist(id: string): Observable<Gist> {\r\n let params: HttpParams | undefined\r\n if (this.options?.clientId && this.options?.clientSecret) {\r\n params = new HttpParams().set('client_id', this.options.clientId).set('client_secret', this.options.clientSecret)\r\n }\r\n return this.fetchFile(`https://api.github.com/gists/${id}`, { params, responseType: 'json' })\r\n }\r\n\r\n /**\r\n * Get code by URL\r\n *\r\n * @param url File raw link\r\n */\r\n getCodeFromUrl(url: string): Observable<string> {\r\n return this.fetchFile(url, { responseType: 'text' })\r\n }\r\n\r\n private fetchFile(url: string, options: any): Observable<any> {\r\n // Check if URL is valid\r\n if (isUrl(url)) {\r\n return this.http.get(url, options).pipe(\r\n // Catch response\r\n shareReplay(1)\r\n )\r\n }\r\n return EMPTY\r\n }\r\n\r\n}\r\n","import { inject, Pipe, PipeTransform } from '@angular/core'\r\nimport { Observable } from 'rxjs'\r\nimport { NXT_HIGHLIGHT_FILE_LOCATION } from './code-file-location'\r\nimport { CodeLoader } from './code-loader'\r\nimport { isUrl } from './gist.model'\r\n\r\n@Pipe({\r\n name: 'codeFromUrl'\r\n})\r\nexport class CodeFromUrlPipe implements PipeTransform {\r\n\r\n private readonly location = inject(NXT_HIGHLIGHT_FILE_LOCATION)\r\n private readonly loader = inject(CodeLoader)\r\n\r\n transform(url: string): Observable<string> {\r\n return this.loader.getCodeFromUrl(isUrl(url) ? url : this.location.formatPathname(url))\r\n }\r\n}\r\n","import { ChangeDetectorRef, Directive, EventEmitter, inject, Input, OnDestroy, Output, PendingTasks, Pipe, PipeTransform } from '@angular/core'\r\nimport { Subscription } from 'rxjs'\r\nimport { CodeLoader } from './code-loader'\r\nimport { Gist, GistFile } from './gist.model'\r\n\r\n@Directive({\r\n selector: '[nxtGist]'\r\n})\r\nexport class GistDirective implements OnDestroy {\r\n\r\n private readonly loader = inject(CodeLoader)\r\n private readonly pendingTasks = inject(PendingTasks)\r\n private readonly cdRef = inject(ChangeDetectorRef)\r\n private subscription?: Subscription\r\n\r\n @Input('nxtGist')\r\n set gist(value: string) {\r\n this.subscription?.unsubscribe()\r\n this.subscription = undefined\r\n\r\n if (value) {\r\n const done = this.pendingTasks.add()\r\n this.subscription = this.loader.getCodeFromGist(value).subscribe({\r\n next: (gist: Gist) => {\r\n this.gistLoad.emit(gist)\r\n this.cdRef.detectChanges()\r\n done()\r\n },\r\n error: (err) => {\r\n this.gistError.emit(err)\r\n this.cdRef.detectChanges()\r\n done()\r\n }\r\n })\r\n }\r\n }\r\n\r\n @Output() gistLoad: EventEmitter<Gist> = new EventEmitter<Gist>()\r\n\r\n @Output() gistError: EventEmitter<any> = new EventEmitter<any>()\r\n\r\n ngOnDestroy(): void {\r\n this.subscription?.unsubscribe()\r\n this.subscription = undefined\r\n }\r\n}\r\n\r\n@Pipe({\r\n name: 'gistFile'\r\n})\r\nexport class GistFilePipe implements PipeTransform {\r\n transform(gist?: Gist | null, fileName?: string | null): GistFile | undefined {\r\n if (!fileName)\r\n return\r\n return gist?.files?.[fileName]\r\n }\r\n}\r\n","import { NgModule } from '@angular/core'\r\nimport { CodeFromUrlPipe } from './code-from-url'\r\nimport { GistDirective, GistFilePipe } from './gist'\r\n\r\n@NgModule({\r\n imports: [\r\n GistDirective,\r\n GistFilePipe,\r\n CodeFromUrlPipe\r\n ],\r\n exports: [\r\n GistDirective,\r\n GistFilePipe,\r\n CodeFromUrlPipe\r\n ]\r\n})\r\nexport class HighlightExstrasModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAGA;;;AAGG;AACI,MAAM,2BAA2B,GAAG,IAAI,cAAc,CAAmB,6BAA6B,EAAE;AAC3G,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE;AACZ,CAAA,CAAC;SAMc,0BAA0B,GAAA;IACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;AAC3C,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;IAE9E,OAAO;;;;AAIH,QAAA,cAAc,EAAE,CAAC,IAAY,KAAI;YAC7B,MAAM,MAAM,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,GAAG,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;AACvE,YAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;gBACpB,OAAO,MAAM,GAAG,IAAI;AAExB,YAAA,IAAI,MAAM,GAAG,IAAI,IAAI,MAAM;AAC3B,YA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