@ngstarter-ui/components 1.0.23 → 1.0.25
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/fesm2022/ngstarter-ui-components-code-highlighter.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +59 -7
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +10 -8
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +5 -5
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-text-editor.mjs +6 -1
- package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngstarter-ui-components-comment-editor.d.ts +2 -1
- package/types/ngstarter-ui-components-sidebar.d.ts +1 -1
- package/types/ngstarter-ui-components-text-editor.d.ts +1 -0
|
@@ -328,7 +328,7 @@ class CodeHighlighter {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CodeHighlighter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CodeHighlighter, isStandalone: true, selector: "ngs-code-highlighter", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, diff: { classPropertyName: "diff", publicName: "diff", isSignal: true, isRequired: false, transformFunction: null }, highlightLines: { classPropertyName: "highlightLines", publicName: "highlightLines", isSignal: true, isRequired: false, transformFunction: null }, showLanguage: { classPropertyName: "showLanguage", publicName: "showLanguage", isSignal: true, isRequired: false, transformFunction: null }, showCopyButton: { classPropertyName: "showCopyButton", publicName: "showCopyButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.appearance-bordered": "appearance() === \"bordered\"", "class.appearance-none": "appearance() === \"none\"" }, classAttribute: "ngs-code-highlighter not-prose" }, exportAs: ["ngsCodeHighlighter"], usesOnChanges: true, ngImport: i0, template: "<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading\u2026</div>\n }\n </div>\n </div>\n</figure>\n", styles: [":host{--ngs-code-highlighter-bg: var(--color-background);--ngs-code-highlighter-radius: 1rem;--ngs-code-highlighter-padding: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-border: 1px solid var(--color-border);--ngs-code-highlighter-title-padding: calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 1) calc(var(--spacing, .25rem) * 3);--ngs-code-highlighter-title-color: var(--color-neutral-500);display:block;
|
|
331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CodeHighlighter, isStandalone: true, selector: "ngs-code-highlighter", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, diff: { classPropertyName: "diff", publicName: "diff", isSignal: true, isRequired: false, transformFunction: null }, highlightLines: { classPropertyName: "highlightLines", publicName: "highlightLines", isSignal: true, isRequired: false, transformFunction: null }, showLanguage: { classPropertyName: "showLanguage", publicName: "showLanguage", isSignal: true, isRequired: false, transformFunction: null }, showCopyButton: { classPropertyName: "showCopyButton", publicName: "showCopyButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.appearance-bordered": "appearance() === \"bordered\"", "class.appearance-none": "appearance() === \"none\"" }, classAttribute: "ngs-code-highlighter not-prose" }, exportAs: ["ngsCodeHighlighter"], usesOnChanges: true, ngImport: i0, template: "<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading\u2026</div>\n }\n </div>\n </div>\n</figure>\n", styles: [":host{--ngs-code-highlighter-bg: var(--color-background);--ngs-code-highlighter-radius: 1rem;--ngs-code-highlighter-padding: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-margin: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-border: 1px solid var(--color-border);--ngs-code-highlighter-title-padding: calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 1) calc(var(--spacing, .25rem) * 3);--ngs-code-highlighter-title-color: var(--color-neutral-500);display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}:host figcaption{font-size:.75rem;font-weight:500;padding:var(--ngs-code-highlighter-title-padding);background:var(--ngs-code-highlighter-bg);color:var(--ngs-code-highlighter-title-color);position:relative;z-index:1}:host figcaption:after{content:\"\";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--ngs-code-highlighter-bg)}:host .languageName{font-size:.875rem;font-weight:600;padding:0 calc(var(--spacing, .25rem) * 6);width:max-content;margin-bottom:calc(var(--spacing, .25rem) * 4);margin-top:calc(calc(var(--spacing, .25rem) * 1) * -1);position:relative}:host ::ng-deep pre{padding:var(--ngs-code-highlighter-padding) 0;line-height:1.75;font-size:.875rem;position:relative}:host ::ng-deep pre code{display:grid}:host ::ng-deep pre .line{padding-left:calc(var(--spacing, .25rem) * 6);padding-right:var(--ngs-code-highlighter-padding);min-height:1.75em}:host ::ng-deep pre .line.diff.remove{background-color:color-mix(in srgb,oklch(63.7% .237 25.331),transparent 85%);display:inline-block;width:100%}:host ::ng-deep pre .line.diff.remove:before{content:\"-\";color:#fb2c36;position:absolute;left:calc(var(--spacing, .25rem) * 2)}:host ::ng-deep pre .line.diff.add{background-color:color-mix(in srgb,oklch(72.3% .219 149.579),transparent 85%);display:inline-block;width:100%}:host ::ng-deep pre .line.diff.add:before{content:\"+\";color:#00c65a;color:oklch(72.3% .219 149.579);position:absolute;left:calc(var(--spacing, .25rem) * 2)}:host ::ng-deep pre .line.highlighted{background-color:var(--color-primary);display:inline-block;width:100%}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep pre .line.highlighted{background-color:color-mix(in srgb,var(--color-primary),transparent 92%)}}:host ::ng-deep code{white-space:pre}:host .content{overflow:auto;background:var(--ngs-code-highlighter-bg)}:host .content button{color:inherit}:host .content button ngs-icon.text-green-500{color:#00a447!important;color:oklch(62.7% .194 149.214)!important}:host.appearance-bordered figcaption{border:var(--ngs-code-highlighter-border);border-bottom:none;border-top-left-radius:.75rem;border-top-right-radius:.75rem;width:max-content}:host.appearance-bordered .content{border:var(--ngs-code-highlighter-border);border-radius:var(--ngs-code-highlighter-radius);z-index:0}:host.appearance-bordered:has(figcaption) .content{border-top-left-radius:0}:host.appearance-none .content{border:none;background-color:transparent!important;border-radius:0}:host.appearance-none ::ng-deep pre{padding-left:0;padding-right:0}:host.loading{opacity:.6}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
332
332
|
}
|
|
333
333
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CodeHighlighter, decorators: [{
|
|
334
334
|
type: Component,
|
|
@@ -336,7 +336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
336
336
|
'class': 'ngs-code-highlighter not-prose',
|
|
337
337
|
'[class.appearance-bordered]': 'appearance() === "bordered"',
|
|
338
338
|
'[class.appearance-none]': 'appearance() === "none"',
|
|
339
|
-
}, template: "<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading\u2026</div>\n }\n </div>\n </div>\n</figure>\n", styles: [":host{--ngs-code-highlighter-bg: var(--color-background);--ngs-code-highlighter-radius: 1rem;--ngs-code-highlighter-padding: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-border: 1px solid var(--color-border);--ngs-code-highlighter-title-padding: calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 1) calc(var(--spacing, .25rem) * 3);--ngs-code-highlighter-title-color: var(--color-neutral-500);display:block;
|
|
339
|
+
}, template: "<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading\u2026</div>\n }\n </div>\n </div>\n</figure>\n", styles: [":host{--ngs-code-highlighter-bg: var(--color-background);--ngs-code-highlighter-radius: 1rem;--ngs-code-highlighter-padding: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-margin: calc(var(--spacing, .25rem) * 5);--ngs-code-highlighter-border: 1px solid var(--color-border);--ngs-code-highlighter-title-padding: calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 1) calc(var(--spacing, .25rem) * 3);--ngs-code-highlighter-title-color: var(--color-neutral-500);display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}:host figcaption{font-size:.75rem;font-weight:500;padding:var(--ngs-code-highlighter-title-padding);background:var(--ngs-code-highlighter-bg);color:var(--ngs-code-highlighter-title-color);position:relative;z-index:1}:host figcaption:after{content:\"\";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--ngs-code-highlighter-bg)}:host .languageName{font-size:.875rem;font-weight:600;padding:0 calc(var(--spacing, .25rem) * 6);width:max-content;margin-bottom:calc(var(--spacing, .25rem) * 4);margin-top:calc(calc(var(--spacing, .25rem) * 1) * -1);position:relative}:host ::ng-deep pre{padding:var(--ngs-code-highlighter-padding) 0;line-height:1.75;font-size:.875rem;position:relative}:host ::ng-deep pre code{display:grid}:host ::ng-deep pre .line{padding-left:calc(var(--spacing, .25rem) * 6);padding-right:var(--ngs-code-highlighter-padding);min-height:1.75em}:host ::ng-deep pre .line.diff.remove{background-color:color-mix(in srgb,oklch(63.7% .237 25.331),transparent 85%);display:inline-block;width:100%}:host ::ng-deep pre .line.diff.remove:before{content:\"-\";color:#fb2c36;position:absolute;left:calc(var(--spacing, .25rem) * 2)}:host ::ng-deep pre .line.diff.add{background-color:color-mix(in srgb,oklch(72.3% .219 149.579),transparent 85%);display:inline-block;width:100%}:host ::ng-deep pre .line.diff.add:before{content:\"+\";color:#00c65a;color:oklch(72.3% .219 149.579);position:absolute;left:calc(var(--spacing, .25rem) * 2)}:host ::ng-deep pre .line.highlighted{background-color:var(--color-primary);display:inline-block;width:100%}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep pre .line.highlighted{background-color:color-mix(in srgb,var(--color-primary),transparent 92%)}}:host ::ng-deep code{white-space:pre}:host .content{overflow:auto;background:var(--ngs-code-highlighter-bg)}:host .content button{color:inherit}:host .content button ngs-icon.text-green-500{color:#00a447!important;color:oklch(62.7% .194 149.214)!important}:host.appearance-bordered figcaption{border:var(--ngs-code-highlighter-border);border-bottom:none;border-top-left-radius:.75rem;border-top-right-radius:.75rem;width:max-content}:host.appearance-bordered .content{border:var(--ngs-code-highlighter-border);border-radius:var(--ngs-code-highlighter-radius);z-index:0}:host.appearance-bordered:has(figcaption) .content{border-top-left-radius:0}:host.appearance-none .content{border:none;background-color:transparent!important;border-radius:0}:host.appearance-none ::ng-deep pre{padding-left:0;padding-right:0}:host.loading{opacity:.6}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
340
340
|
}], propDecorators: { code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: true }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], diff: [{ type: i0.Input, args: [{ isSignal: true, alias: "diff", required: false }] }], highlightLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightLines", required: false }] }], showLanguage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLanguage", required: false }] }], showCopyButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCopyButton", required: false }] }] } });
|
|
341
341
|
|
|
342
342
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-code-highlighter.mjs","sources":["../../../projects/components/code-highlighter/src/code-highlighter/code-highlighter.ts","../../../projects/components/code-highlighter/src/code-highlighter/code-highlighter.html","../../../projects/components/code-highlighter/ngstarter-ui-components-code-highlighter.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, OnChanges, SimpleChanges, signal, computed, inject, booleanAttribute } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { codeToHtml, ShikiTransformer } from 'shiki';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Icon } from '@ngstarter-ui/components/icon';\n\nconst removeDiffPrefix = (node: any) => {\n if (!node.children || node.children.length === 0) return;\n\n const firstChild = node.children[0];\n if (firstChild.type === 'element' && firstChild.children && firstChild.children.length > 0) {\n const textNode = firstChild.children[0];\n if (textNode.type === 'text' && (textNode.value.startsWith('+') || textNode.value.startsWith('-'))) {\n textNode.value = textNode.value.slice(1);\n if (textNode.value === '' && firstChild.children.length === 1) {\n node.children.shift();\n }\n }\n } else if (firstChild.type === 'text' && (firstChild.value.startsWith('+') || firstChild.value.startsWith('-'))) {\n firstChild.value = firstChild.value.slice(1);\n if (firstChild.value === '') {\n node.children.shift();\n }\n }\n};\n\nconst diffTransformer: ShikiTransformer = {\n line(node, line) {\n if (this.options.lang === 'diff' || (this.options as any).diff) {\n const lineTokens = this.tokens[line - 1];\n const text = lineTokens.map(token => token.content).join('');\n if (text.startsWith('+')) {\n this.addClassToHast(node, 'diff add');\n removeDiffPrefix(node);\n } else if (text.startsWith('-')) {\n this.addClassToHast(node, 'diff remove');\n removeDiffPrefix(node);\n }\n }\n }\n};\n\n@Component({\n selector: 'ngs-code-highlighter',\n standalone: true,\n imports: [Button, Icon],\n exportAs: 'ngsCodeHighlighter',\n templateUrl: './code-highlighter.html',\n styleUrl: './code-highlighter.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-code-highlighter not-prose',\n '[class.appearance-bordered]': 'appearance() === \"bordered\"',\n '[class.appearance-none]': 'appearance() === \"none\"',\n }\n})\nexport class CodeHighlighter implements OnChanges {\n private sanitizer = inject(DomSanitizer);\n\n code = input.required<string>();\n language = input<string>('none');\n theme = input<string>('github-light');\n title = input<string | null>(null);\n appearance = input<'none' | 'bordered'>('bordered');\n diff = input<boolean>(false);\n highlightLines = input<number[] | number[][]>([]);\n showLanguage = input(false, { transform: booleanAttribute });\n showCopyButton = input(false, { transform: booleanAttribute });\n\n readonly content = signal<SafeHtml | null>(null);\n readonly isLoading = signal<boolean>(false);\n\n readonly displayedLanguage = computed(() => {\n const lang = this.language();\n if (!lang || lang === 'none') return '';\n\n const langMap: Record<string, string> = {\n '1c': '1C',\n 'abap': 'ABAP',\n 'actionscript-3': 'ActionScript 3',\n 'ada': 'Ada',\n 'apache': 'Apache',\n 'apex': 'Apex',\n 'apl': 'APL',\n 'applescript': 'AppleScript',\n 'ara': 'Ara',\n 'asm': 'Assembly',\n 'astro': 'Astro',\n 'awk': 'AWK',\n 'ballerina': 'Ballerina',\n 'bash': 'Bash',\n 'sh': 'Bash',\n 'batch': 'Batch',\n 'berry': 'Berry',\n 'bibtex': 'BibTeX',\n 'bicep': 'Bicep',\n 'blade': 'Blade',\n 'c': 'C',\n 'cadence': 'Cadence',\n 'clarity': 'Clarity',\n 'clojure': 'Clojure',\n 'clj': 'Clojure',\n 'cmake': 'CMake',\n 'cobol': 'COBOL',\n 'codeql': 'CodeQL',\n 'coffee': 'CoffeeScript',\n 'cpp': 'C++',\n 'csharp': 'C#',\n 'cs': 'C#',\n 'css': 'CSS',\n 'cue': 'CUE',\n 'cypher': 'Cypher',\n 'd': 'D',\n 'dart': 'Dart',\n 'dax': 'DAX',\n 'diff': 'Diff',\n 'docker': 'Docker',\n 'dockerfile': 'Dockerfile',\n 'dream-maker': 'Dream Maker',\n 'elixir': 'Elixir',\n 'elm': 'Elm',\n 'erb': 'ERB',\n 'erlang': 'Erlang',\n 'fish': 'Fish',\n 'fsharp': 'F#',\n 'fs': 'F#',\n 'gdresource': 'GDResource',\n 'gdscript': 'GDScript',\n 'gdshader': 'GDShader',\n 'gherkin': 'Gherkin',\n 'git-commit': 'Git Commit',\n 'git-rebase': 'Git Rebase',\n 'glimmer-js': 'Glimmer JS',\n 'gljs': 'Glimmer JS',\n 'glsl': 'GLSL',\n 'gnuplot': 'Gnuplot',\n 'go': 'Go',\n 'graphql': 'GraphQL',\n 'groovy': 'Groovy',\n 'hack': 'Hack',\n 'haml': 'Haml',\n 'handlebars': 'Handlebars',\n 'hbs': 'Handlebars',\n 'haskell': 'Haskell',\n 'hs': 'Haskell',\n 'hcl': 'HCL',\n 'hjson': 'Hjson',\n 'hlsl': 'HLSL',\n 'html': 'HTML',\n 'http': 'HTTP',\n 'imba': 'Imba',\n 'ini': 'INI',\n 'java': 'Java',\n 'javascript': 'JavaScript',\n 'js': 'JavaScript',\n 'jinja-html': 'Jinja HTML',\n 'jjson': 'JJSON',\n 'json': 'JSON',\n 'json5': 'JSON5',\n 'jsonc': 'JSONC',\n 'jsonnet': 'Jsonnet',\n 'jssm': 'JSSM',\n 'jsx': 'JSX',\n 'julia': 'Julia',\n 'kotlin': 'Kotlin',\n 'kt': 'Kotlin',\n 'kts': 'Kotlin',\n 'kusto': 'Kusto',\n 'latex': 'LaTeX',\n 'lat': 'LaTeX',\n 'tex': 'LaTeX',\n 'lean': 'Lean',\n 'less': 'Less',\n 'liquid': 'Liquid',\n 'lisp': 'Lisp',\n 'logo': 'Logo',\n 'lua': 'Lua',\n 'make': 'Make',\n 'makefile': 'Makefile',\n 'markdown': 'Markdown',\n 'md': 'Markdown',\n 'marko': 'Marko',\n 'matlab': 'MATLAB',\n 'mdx': 'MDX',\n 'mermaid': 'Mermaid',\n 'mipsasm': 'MIPS Assembly',\n 'mips': 'MIPS Assembly',\n 'mojolicious': 'Mojolicious',\n 'move': 'Move',\n 'narrat': 'Narrat',\n 'nextflow': 'Nextflow',\n 'nginx': 'Nginx',\n 'nim': 'Nim',\n 'nix': 'Nix',\n 'objective-c': 'Objective-C',\n 'objc': 'Objective-C',\n 'objective-cpp': 'Objective-C++',\n 'ocaml': 'OCaml',\n 'pascal': 'Pascal',\n 'perl': 'Perl',\n 'pl': 'Perl',\n 'php': 'PHP',\n 'plsql': 'PL/SQL',\n 'postcss': 'PostCSS',\n 'powerquery': 'PowerQuery',\n 'powershell': 'PowerShell',\n 'ps1': 'PowerShell',\n 'prisma': 'Prisma',\n 'prolog': 'Prolog',\n 'proto': 'Protocol Buffers',\n 'pug': 'Pug',\n 'jade': 'Pug',\n 'puppet': 'Puppet',\n 'purescript': 'PureScript',\n 'python': 'Python',\n 'py': 'Python',\n 'r': 'R',\n 'raku': 'Raku',\n 'razor': 'Razor',\n 'reg': 'Registry',\n 'rel': 'Rel',\n 'riscv': 'RISC-V',\n 'rst': 'reStructuredText',\n 'ruby': 'Ruby',\n 'rb': 'Ruby',\n 'rust': 'Rust',\n 'rs': 'Rust',\n 'sas': 'SAS',\n 'sass': 'Sass',\n 'scala': 'Scala',\n 'scheme': 'Scheme',\n 'scss': 'SCSS',\n 'shaderlab': 'ShaderLab',\n 'shader': 'ShaderLab',\n 'shell': 'Shell',\n 'shellscript': 'Shell',\n 'smalltalk': 'Smalltalk',\n 'solidity': 'Solidity',\n 'sparql': 'SPARQL',\n 'sql': 'SQL',\n 'ssh-config': 'SSH Config',\n 'stata': 'Stata',\n 'stylus': 'Stylus',\n 'styl': 'Stylus',\n 'svelte': 'Svelte',\n 'swift': 'Swift',\n 'system-verilog': 'SystemVerilog',\n 'tasl': 'Tasl',\n 'tcl': 'Tcl',\n 'terraform': 'Terraform',\n 'tf': 'Terraform',\n 'toml': 'TOML',\n 'tsx': 'TSX',\n 'turtle': 'Turtle',\n 'twig': 'Twig',\n 'typescript': 'TypeScript',\n 'ts': 'TypeScript',\n 'v': 'V',\n 'vb': 'Visual Basic',\n 'verilog': 'Verilog',\n 'vhdl': 'VHDL',\n 'viml': 'VimL',\n 'vim': 'VimL',\n 'vue': 'Vue',\n 'vyper': 'Vyper',\n 'wasm': 'WebAssembly',\n 'wenyan': 'Wenyan',\n 'wgsl': 'WGSL',\n 'wolfram': 'Wolfram',\n 'xml': 'XML',\n 'xsl': 'XSL',\n 'yaml': 'YAML',\n 'yml': 'YAML',\n 'zenscript': 'ZenScript',\n 'zig': 'Zig',\n 'zsh': 'Zsh',\n };\n\n return langMap[lang.toLowerCase()] || lang;\n });\n\n private getHighlightTransformer(): ShikiTransformer {\n const highlights = this.highlightLines();\n if (!highlights || (Array.isArray(highlights) && highlights.length === 0)) {\n return {};\n }\n\n const isHighlighted = (line: number): boolean => {\n if (Array.isArray(highlights[0])) {\n return (highlights as number[][]).some(([start, end]) => line >= start && line <= end);\n } else {\n const [start, end] = highlights as number[];\n return line >= start && line <= end;\n }\n };\n\n return {\n line(node, line) {\n if (isHighlighted(line)) {\n this.addClassToHast(node, 'highlighted');\n }\n }\n };\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (!this.code()) {\n this.content.set(null);\n return;\n }\n this.isLoading.set(true);\n try {\n const highlighted = await codeToHtml(\n this.code(),\n {\n lang: this.language(),\n theme: this.theme(),\n transformers: [diffTransformer, this.getHighlightTransformer()],\n diff: this.diff()\n } as any\n );\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(highlighted));\n } catch (e) {\n // Fallback: raw code escaped inside pre\n const escaped = this.code()\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n const fallback = `<pre class=\"shiki\"><code>${escaped}</code></pre>`;\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(fallback));\n console.error('CodeHighlighter error:', e);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n copied = signal(false);\n private copyTimeout?: any;\n\n copyCode() {\n if (this.code()) {\n navigator.clipboard.writeText(this.code());\n this.copied.set(true);\n\n if (this.copyTimeout) {\n clearTimeout(this.copyTimeout);\n }\n\n this.copyTimeout = setTimeout(() => {\n this.copied.set(false);\n this.copyTimeout = undefined;\n }, 2000);\n }\n }\n}\n","<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading…</div>\n }\n </div>\n </div>\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,gBAAgB,GAAG,CAAC,IAAS,KAAI;IACrC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE;IAElD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnC,IAAA,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1F,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvC,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,KAAK,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;YAClG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACxC,YAAA,IAAI,QAAQ,CAAC,KAAK,KAAK,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC7D,gBAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;YACvB;QACF;IACF;SAAO,IAAI,UAAU,CAAC,IAAI,KAAK,M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AA,cAAA,EAAA,gCAAA,EAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxD5B,42BAqCA,EAAA,MAAA,EAAA,CAAA,qqGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDQY,MAAM,0SAAE,IAAI,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAWX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,OAAA,EACP,CAAC,MAAM,EAAE,IAAI,CAAC,EAAA,QAAA,EACb,oBAAoB,EAAA,eAAA,EAGb,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,gCAAgC;AACzC,wBAAA,6BAA6B,EAAE,6BAA6B;AAC5D,wBAAA,yBAAyB,EAAE,yBAAyB;AACrD,qBAAA,EAAA,QAAA,EAAA,42BAAA,EAAA,MAAA,EAAA,CAAA,qqGAAA,CAAA,EAAA;;;AEtDH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-code-highlighter.mjs","sources":["../../../projects/components/code-highlighter/src/code-highlighter/code-highlighter.ts","../../../projects/components/code-highlighter/src/code-highlighter/code-highlighter.html","../../../projects/components/code-highlighter/ngstarter-ui-components-code-highlighter.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, OnChanges, SimpleChanges, signal, computed, inject, booleanAttribute } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { codeToHtml, ShikiTransformer } from 'shiki';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Icon } from '@ngstarter-ui/components/icon';\n\nconst removeDiffPrefix = (node: any) => {\n if (!node.children || node.children.length === 0) return;\n\n const firstChild = node.children[0];\n if (firstChild.type === 'element' && firstChild.children && firstChild.children.length > 0) {\n const textNode = firstChild.children[0];\n if (textNode.type === 'text' && (textNode.value.startsWith('+') || textNode.value.startsWith('-'))) {\n textNode.value = textNode.value.slice(1);\n if (textNode.value === '' && firstChild.children.length === 1) {\n node.children.shift();\n }\n }\n } else if (firstChild.type === 'text' && (firstChild.value.startsWith('+') || firstChild.value.startsWith('-'))) {\n firstChild.value = firstChild.value.slice(1);\n if (firstChild.value === '') {\n node.children.shift();\n }\n }\n};\n\nconst diffTransformer: ShikiTransformer = {\n line(node, line) {\n if (this.options.lang === 'diff' || (this.options as any).diff) {\n const lineTokens = this.tokens[line - 1];\n const text = lineTokens.map(token => token.content).join('');\n if (text.startsWith('+')) {\n this.addClassToHast(node, 'diff add');\n removeDiffPrefix(node);\n } else if (text.startsWith('-')) {\n this.addClassToHast(node, 'diff remove');\n removeDiffPrefix(node);\n }\n }\n }\n};\n\n@Component({\n selector: 'ngs-code-highlighter',\n standalone: true,\n imports: [Button, Icon],\n exportAs: 'ngsCodeHighlighter',\n templateUrl: './code-highlighter.html',\n styleUrl: './code-highlighter.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-code-highlighter not-prose',\n '[class.appearance-bordered]': 'appearance() === \"bordered\"',\n '[class.appearance-none]': 'appearance() === \"none\"',\n }\n})\nexport class CodeHighlighter implements OnChanges {\n private sanitizer = inject(DomSanitizer);\n\n code = input.required<string>();\n language = input<string>('none');\n theme = input<string>('github-light');\n title = input<string | null>(null);\n appearance = input<'none' | 'bordered'>('bordered');\n diff = input<boolean>(false);\n highlightLines = input<number[] | number[][]>([]);\n showLanguage = input(false, { transform: booleanAttribute });\n showCopyButton = input(false, { transform: booleanAttribute });\n\n readonly content = signal<SafeHtml | null>(null);\n readonly isLoading = signal<boolean>(false);\n\n readonly displayedLanguage = computed(() => {\n const lang = this.language();\n if (!lang || lang === 'none') return '';\n\n const langMap: Record<string, string> = {\n '1c': '1C',\n 'abap': 'ABAP',\n 'actionscript-3': 'ActionScript 3',\n 'ada': 'Ada',\n 'apache': 'Apache',\n 'apex': 'Apex',\n 'apl': 'APL',\n 'applescript': 'AppleScript',\n 'ara': 'Ara',\n 'asm': 'Assembly',\n 'astro': 'Astro',\n 'awk': 'AWK',\n 'ballerina': 'Ballerina',\n 'bash': 'Bash',\n 'sh': 'Bash',\n 'batch': 'Batch',\n 'berry': 'Berry',\n 'bibtex': 'BibTeX',\n 'bicep': 'Bicep',\n 'blade': 'Blade',\n 'c': 'C',\n 'cadence': 'Cadence',\n 'clarity': 'Clarity',\n 'clojure': 'Clojure',\n 'clj': 'Clojure',\n 'cmake': 'CMake',\n 'cobol': 'COBOL',\n 'codeql': 'CodeQL',\n 'coffee': 'CoffeeScript',\n 'cpp': 'C++',\n 'csharp': 'C#',\n 'cs': 'C#',\n 'css': 'CSS',\n 'cue': 'CUE',\n 'cypher': 'Cypher',\n 'd': 'D',\n 'dart': 'Dart',\n 'dax': 'DAX',\n 'diff': 'Diff',\n 'docker': 'Docker',\n 'dockerfile': 'Dockerfile',\n 'dream-maker': 'Dream Maker',\n 'elixir': 'Elixir',\n 'elm': 'Elm',\n 'erb': 'ERB',\n 'erlang': 'Erlang',\n 'fish': 'Fish',\n 'fsharp': 'F#',\n 'fs': 'F#',\n 'gdresource': 'GDResource',\n 'gdscript': 'GDScript',\n 'gdshader': 'GDShader',\n 'gherkin': 'Gherkin',\n 'git-commit': 'Git Commit',\n 'git-rebase': 'Git Rebase',\n 'glimmer-js': 'Glimmer JS',\n 'gljs': 'Glimmer JS',\n 'glsl': 'GLSL',\n 'gnuplot': 'Gnuplot',\n 'go': 'Go',\n 'graphql': 'GraphQL',\n 'groovy': 'Groovy',\n 'hack': 'Hack',\n 'haml': 'Haml',\n 'handlebars': 'Handlebars',\n 'hbs': 'Handlebars',\n 'haskell': 'Haskell',\n 'hs': 'Haskell',\n 'hcl': 'HCL',\n 'hjson': 'Hjson',\n 'hlsl': 'HLSL',\n 'html': 'HTML',\n 'http': 'HTTP',\n 'imba': 'Imba',\n 'ini': 'INI',\n 'java': 'Java',\n 'javascript': 'JavaScript',\n 'js': 'JavaScript',\n 'jinja-html': 'Jinja HTML',\n 'jjson': 'JJSON',\n 'json': 'JSON',\n 'json5': 'JSON5',\n 'jsonc': 'JSONC',\n 'jsonnet': 'Jsonnet',\n 'jssm': 'JSSM',\n 'jsx': 'JSX',\n 'julia': 'Julia',\n 'kotlin': 'Kotlin',\n 'kt': 'Kotlin',\n 'kts': 'Kotlin',\n 'kusto': 'Kusto',\n 'latex': 'LaTeX',\n 'lat': 'LaTeX',\n 'tex': 'LaTeX',\n 'lean': 'Lean',\n 'less': 'Less',\n 'liquid': 'Liquid',\n 'lisp': 'Lisp',\n 'logo': 'Logo',\n 'lua': 'Lua',\n 'make': 'Make',\n 'makefile': 'Makefile',\n 'markdown': 'Markdown',\n 'md': 'Markdown',\n 'marko': 'Marko',\n 'matlab': 'MATLAB',\n 'mdx': 'MDX',\n 'mermaid': 'Mermaid',\n 'mipsasm': 'MIPS Assembly',\n 'mips': 'MIPS Assembly',\n 'mojolicious': 'Mojolicious',\n 'move': 'Move',\n 'narrat': 'Narrat',\n 'nextflow': 'Nextflow',\n 'nginx': 'Nginx',\n 'nim': 'Nim',\n 'nix': 'Nix',\n 'objective-c': 'Objective-C',\n 'objc': 'Objective-C',\n 'objective-cpp': 'Objective-C++',\n 'ocaml': 'OCaml',\n 'pascal': 'Pascal',\n 'perl': 'Perl',\n 'pl': 'Perl',\n 'php': 'PHP',\n 'plsql': 'PL/SQL',\n 'postcss': 'PostCSS',\n 'powerquery': 'PowerQuery',\n 'powershell': 'PowerShell',\n 'ps1': 'PowerShell',\n 'prisma': 'Prisma',\n 'prolog': 'Prolog',\n 'proto': 'Protocol Buffers',\n 'pug': 'Pug',\n 'jade': 'Pug',\n 'puppet': 'Puppet',\n 'purescript': 'PureScript',\n 'python': 'Python',\n 'py': 'Python',\n 'r': 'R',\n 'raku': 'Raku',\n 'razor': 'Razor',\n 'reg': 'Registry',\n 'rel': 'Rel',\n 'riscv': 'RISC-V',\n 'rst': 'reStructuredText',\n 'ruby': 'Ruby',\n 'rb': 'Ruby',\n 'rust': 'Rust',\n 'rs': 'Rust',\n 'sas': 'SAS',\n 'sass': 'Sass',\n 'scala': 'Scala',\n 'scheme': 'Scheme',\n 'scss': 'SCSS',\n 'shaderlab': 'ShaderLab',\n 'shader': 'ShaderLab',\n 'shell': 'Shell',\n 'shellscript': 'Shell',\n 'smalltalk': 'Smalltalk',\n 'solidity': 'Solidity',\n 'sparql': 'SPARQL',\n 'sql': 'SQL',\n 'ssh-config': 'SSH Config',\n 'stata': 'Stata',\n 'stylus': 'Stylus',\n 'styl': 'Stylus',\n 'svelte': 'Svelte',\n 'swift': 'Swift',\n 'system-verilog': 'SystemVerilog',\n 'tasl': 'Tasl',\n 'tcl': 'Tcl',\n 'terraform': 'Terraform',\n 'tf': 'Terraform',\n 'toml': 'TOML',\n 'tsx': 'TSX',\n 'turtle': 'Turtle',\n 'twig': 'Twig',\n 'typescript': 'TypeScript',\n 'ts': 'TypeScript',\n 'v': 'V',\n 'vb': 'Visual Basic',\n 'verilog': 'Verilog',\n 'vhdl': 'VHDL',\n 'viml': 'VimL',\n 'vim': 'VimL',\n 'vue': 'Vue',\n 'vyper': 'Vyper',\n 'wasm': 'WebAssembly',\n 'wenyan': 'Wenyan',\n 'wgsl': 'WGSL',\n 'wolfram': 'Wolfram',\n 'xml': 'XML',\n 'xsl': 'XSL',\n 'yaml': 'YAML',\n 'yml': 'YAML',\n 'zenscript': 'ZenScript',\n 'zig': 'Zig',\n 'zsh': 'Zsh',\n };\n\n return langMap[lang.toLowerCase()] || lang;\n });\n\n private getHighlightTransformer(): ShikiTransformer {\n const highlights = this.highlightLines();\n if (!highlights || (Array.isArray(highlights) && highlights.length === 0)) {\n return {};\n }\n\n const isHighlighted = (line: number): boolean => {\n if (Array.isArray(highlights[0])) {\n return (highlights as number[][]).some(([start, end]) => line >= start && line <= end);\n } else {\n const [start, end] = highlights as number[];\n return line >= start && line <= end;\n }\n };\n\n return {\n line(node, line) {\n if (isHighlighted(line)) {\n this.addClassToHast(node, 'highlighted');\n }\n }\n };\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (!this.code()) {\n this.content.set(null);\n return;\n }\n this.isLoading.set(true);\n try {\n const highlighted = await codeToHtml(\n this.code(),\n {\n lang: this.language(),\n theme: this.theme(),\n transformers: [diffTransformer, this.getHighlightTransformer()],\n diff: this.diff()\n } as any\n );\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(highlighted));\n } catch (e) {\n // Fallback: raw code escaped inside pre\n const escaped = this.code()\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n const fallback = `<pre class=\"shiki\"><code>${escaped}</code></pre>`;\n this.content.set(this.sanitizer.bypassSecurityTrustHtml(fallback));\n console.error('CodeHighlighter error:', e);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n copied = signal(false);\n private copyTimeout?: any;\n\n copyCode() {\n if (this.code()) {\n navigator.clipboard.writeText(this.code());\n this.copied.set(true);\n\n if (this.copyTimeout) {\n clearTimeout(this.copyTimeout);\n }\n\n this.copyTimeout = setTimeout(() => {\n this.copied.set(false);\n this.copyTimeout = undefined;\n }, 2000);\n }\n }\n}\n","<figure>\n @if (title()) {\n <figcaption>\n @if (title()) {\n <span class=\"title\">{{ title() }}</span>\n }\n </figcaption>\n }\n\n <div class=\"content relative\">\n @if (showLanguage()) {\n <div class=\"languageName\">{{ displayedLanguage() }}</div>\n }\n\n @if (showCopyButton()) {\n <span class=\"absolute top-2 right-2\">\n <button\n ngsIconButton\n (click)=\"copyCode()\"\n >\n <ngs-icon\n [name]=\"copied() ? 'fluent:checkmark-24-regular' : 'fluent:copy-24-regular'\"\n [class.text-green-500]=\"copied()\"\n />\n </button>\n </span>\n }\n\n <div>\n @if (content()) {\n <div [innerHTML]=\"content()\"></div>\n } @else {\n <div class=\"loading\">Loading…</div>\n }\n </div>\n </div>\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,gBAAgB,GAAG,CAAC,IAAS,KAAI;IACrC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE;IAElD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnC,IAAA,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1F,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvC,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,KAAK,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;YAClG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACxC,YAAA,IAAI,QAAQ,CAAC,KAAK,KAAK,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC7D,gBAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;YACvB;QACF;IACF;SAAO,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,KAAK,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;QAC/G,UAAU,CAAC,KAAK,GAA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,EAAA,CAAA,4rGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDQY,MAAM,0SAAE,IAAI,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAWX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,OAAA,EACP,CAAC,MAAM,EAAE,IAAI,CAAC,EAAA,QAAA,EACb,oBAAoB,EAAA,eAAA,EAGb,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,gCAAgC;AACzC,wBAAA,6BAA6B,EAAE,6BAA6B;AAC5D,wBAAA,yBAAyB,EAAE,yBAAyB;AACrD,qBAAA,EAAA,QAAA,EAAA,42BAAA,EAAA,MAAA,EAAA,CAAA,4rGAAA,CAAA,EAAA;;;AEtDH;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, ApplicationRef, createComponent, ElementRef, input, Component, inject, PLATFORM_ID, DOCUMENT, ChangeDetectorRef, Injector, viewChild, booleanAttribute, output, forwardRef, Directive, DestroyRef } from '@angular/core';
|
|
3
|
-
import { NodeView, Node, mergeAttributes, Editor } from '@tiptap/core';
|
|
3
|
+
import { NodeView, Node, mergeAttributes, Mark, Editor } from '@tiptap/core';
|
|
4
4
|
import Document from '@tiptap/extension-document';
|
|
5
5
|
import Paragraph from '@tiptap/extension-paragraph';
|
|
6
6
|
import Text from '@tiptap/extension-text';
|
|
@@ -304,6 +304,28 @@ const ImageUploadingPlaceholderExtension = (injector, options) => {
|
|
|
304
304
|
});
|
|
305
305
|
};
|
|
306
306
|
|
|
307
|
+
const SingleEmoji = Mark.create({
|
|
308
|
+
name: 'singleEmoji',
|
|
309
|
+
inclusive: false,
|
|
310
|
+
addOptions() {
|
|
311
|
+
return {
|
|
312
|
+
HTMLAttributes: {
|
|
313
|
+
class: 'single-emoji',
|
|
314
|
+
},
|
|
315
|
+
};
|
|
316
|
+
},
|
|
317
|
+
parseHTML() {
|
|
318
|
+
return [
|
|
319
|
+
{
|
|
320
|
+
tag: 'span.single-emoji',
|
|
321
|
+
},
|
|
322
|
+
];
|
|
323
|
+
},
|
|
324
|
+
renderHTML({ HTMLAttributes }) {
|
|
325
|
+
return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
|
|
307
329
|
class CommentEditor {
|
|
308
330
|
_platformId = inject(PLATFORM_ID);
|
|
309
331
|
_document = inject(DOCUMENT);
|
|
@@ -323,6 +345,7 @@ class CommentEditor {
|
|
|
323
345
|
toolbarAlwaysVisible = input(false, { ...(ngDevMode ? { debugName: "toolbarAlwaysVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
324
346
|
fullViewMode = input(false, { ...(ngDevMode ? { debugName: "fullViewMode" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
325
347
|
cancelButtonAlwaysVisible = input(false, { ...(ngDevMode ? { debugName: "cancelButtonAlwaysVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
348
|
+
allowEmptyContent = input(false, { ...(ngDevMode ? { debugName: "allowEmptyContent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
326
349
|
imageUploadFn = input(...(ngDevMode ? [undefined, { debugName: "imageUploadFn" }] : /* istanbul ignore next */ []));
|
|
327
350
|
sent = output();
|
|
328
351
|
canceled = output();
|
|
@@ -345,8 +368,26 @@ class CommentEditor {
|
|
|
345
368
|
if (!this.editor) {
|
|
346
369
|
return;
|
|
347
370
|
}
|
|
371
|
+
const isOnlyEmoji = (str) => {
|
|
372
|
+
if (!str) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
const emojiRegex = /^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+$/;
|
|
376
|
+
return emojiRegex.test(str.trim());
|
|
377
|
+
};
|
|
348
378
|
if (this.editor.isFocused) {
|
|
349
|
-
this.editor.
|
|
379
|
+
const { selection } = this.editor.state;
|
|
380
|
+
const isParentEmpty = selection.$from.parent.content.size === 0;
|
|
381
|
+
if (isOnlyEmoji(text) && isParentEmpty) {
|
|
382
|
+
this.editor.chain().focus().insertContent({
|
|
383
|
+
type: 'text',
|
|
384
|
+
text,
|
|
385
|
+
marks: [{ type: 'singleEmoji' }]
|
|
386
|
+
}).run();
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
this.editor.chain().focus().insertContent(text).run();
|
|
390
|
+
}
|
|
350
391
|
}
|
|
351
392
|
else {
|
|
352
393
|
const content = this.editor.getText();
|
|
@@ -356,8 +397,18 @@ class CommentEditor {
|
|
|
356
397
|
}
|
|
357
398
|
const lastNode = this.editor.state.doc.lastChild;
|
|
358
399
|
if (lastNode && lastNode.type.name === 'paragraph') {
|
|
400
|
+
const isLastNodeEmpty = lastNode.content.size === 0;
|
|
359
401
|
const pos = this.editor.state.doc.content.size - 1;
|
|
360
|
-
|
|
402
|
+
if (isOnlyEmoji(text) && isLastNodeEmpty) {
|
|
403
|
+
this.editor.chain().focus().insertContentAt(pos, {
|
|
404
|
+
type: 'text',
|
|
405
|
+
text,
|
|
406
|
+
marks: [{ type: 'singleEmoji' }]
|
|
407
|
+
}).run();
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
this.editor.chain().focus().insertContentAt(pos, textToInsert).run();
|
|
411
|
+
}
|
|
361
412
|
}
|
|
362
413
|
else {
|
|
363
414
|
this.editor.chain().focus().insertContentAt(this.editor.state.doc.content.size, textToInsert).run();
|
|
@@ -446,6 +497,7 @@ class CommentEditor {
|
|
|
446
497
|
inline: true,
|
|
447
498
|
allowBase64: true
|
|
448
499
|
}),
|
|
500
|
+
SingleEmoji,
|
|
449
501
|
Link.configure({
|
|
450
502
|
openOnClick: false,
|
|
451
503
|
defaultProtocol: 'https',
|
|
@@ -487,12 +539,12 @@ class CommentEditor {
|
|
|
487
539
|
this._cdr.detectChanges();
|
|
488
540
|
}
|
|
489
541
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
490
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CommentEditor, isStandalone: true, selector: "ngs-comment-editor", inputs: { contentMaxHeight: { classPropertyName: "contentMaxHeight", publicName: "contentMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, buttonCancelLabel: { classPropertyName: "buttonCancelLabel", publicName: "buttonCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, buttonSendLabel: { classPropertyName: "buttonSendLabel", publicName: "buttonSendLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, toolbarAlwaysVisible: { classPropertyName: "toolbarAlwaysVisible", publicName: "toolbarAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, fullViewMode: { classPropertyName: "fullViewMode", publicName: "fullViewMode", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonAlwaysVisible: { classPropertyName: "cancelButtonAlwaysVisible", publicName: "cancelButtonAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, imageUploadFn: { classPropertyName: "imageUploadFn", publicName: "imageUploadFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sent: "sent", canceled: "canceled" }, host: { listeners: { "click": "activateFullView()" }, properties: { "class.full-view": "fullView || fullViewMode()" }, classAttribute: "ngs-comment-editor" }, providers: [
|
|
542
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CommentEditor, isStandalone: true, selector: "ngs-comment-editor", inputs: { contentMaxHeight: { classPropertyName: "contentMaxHeight", publicName: "contentMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, buttonCancelLabel: { classPropertyName: "buttonCancelLabel", publicName: "buttonCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, buttonSendLabel: { classPropertyName: "buttonSendLabel", publicName: "buttonSendLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, toolbarAlwaysVisible: { classPropertyName: "toolbarAlwaysVisible", publicName: "toolbarAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, fullViewMode: { classPropertyName: "fullViewMode", publicName: "fullViewMode", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonAlwaysVisible: { classPropertyName: "cancelButtonAlwaysVisible", publicName: "cancelButtonAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, allowEmptyContent: { classPropertyName: "allowEmptyContent", publicName: "allowEmptyContent", isSignal: true, isRequired: false, transformFunction: null }, imageUploadFn: { classPropertyName: "imageUploadFn", publicName: "imageUploadFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sent: "sent", canceled: "canceled" }, host: { listeners: { "click": "activateFullView()" }, properties: { "class.full-view": "fullView || fullViewMode()" }, classAttribute: "ngs-comment-editor" }, providers: [
|
|
491
543
|
{
|
|
492
544
|
provide: COMMENT_EDITOR,
|
|
493
545
|
useExisting: forwardRef(() => CommentEditor)
|
|
494
546
|
}
|
|
495
|
-
], viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "_bubbleMenu", first: true, predicate: ["bubbleMenu"], descendants: true, isSignal: true }, { propertyName: "_imageBubbleMenu", first: true, predicate: ["imageBubbleMenu"], descendants: true, isSignal: true }], exportAs: ["ngsCommentEditor"], ngImport: i0, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\"
|
|
547
|
+
], viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "_bubbleMenu", first: true, predicate: ["bubbleMenu"], descendants: true, isSignal: true }, { propertyName: "_imageBubbleMenu", first: true, predicate: ["imageBubbleMenu"], descendants: true, isSignal: true }], exportAs: ["ngsCommentEditor"], ngImport: i0, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\"/>\n </div>\n}\n<div #content class=\"content prose dark:prose-invert max-w-full\"></div>\n<div class=\"editor-content\">\n <ng-content/>\n</div>\n<div class=\"footer\">\n <div class=\"flex items-center gap-0.5 grow pe-3\">\n <ng-content select=\"ngs-comment-editor-footer-bar\"/>\n </div>\n <div class=\"flex items-center gap-2\">\n @if ((fullView && !fullViewMode()) || cancelButtonAlwaysVisible()) {\n <button ngsButton (click)=\"cancel($event)\">{{ buttonCancelLabel() }}</button>\n }\n <button ngsButton=\"filled\"\n [disabled]=\"(!allowEmptyContent() && !_value) || null\"\n (click)=\"send($event)\">{{ buttonSendLabel() }}\n </button>\n </div>\n</div>\n<div #imageBubbleMenu class=\"ngs-comment-editor-bubble-menu\">\n</div>\n<div #bubbleMenu>\n <ng-content select=\"ngs-comment-editor-bubble-menu\"/>\n</div>\n<!--<div #floatingMenu class=\"floating-menu\">-->\n<!-- @if (editor) {-->\n<!-- <div class=\"flex items-center gap-1.5\">-->\n<!-- <button class=\"button\"-->\n<!-- [disabled]=\"isCommandDisabled('toggleCodeBlock')\"-->\n<!-- [class.active]=\"editor && editor.isActive('codeBlock')\"-->\n<!-- (click)=\"onButtonClick('toggleCodeBlock')\">-->\n<!-- <ngs-icon name=\"fluent:code-24-regular\"/>-->\n<!-- </button>-->\n<!-- <button class=\"button\">-->\n<!-- <ngs-icon name=\"fluent:image-24-regular\"/>-->\n<!-- </button>-->\n<!-- </div>-->\n<!-- }-->\n<!--</div>-->\n", styles: [":host{--ngs-comment-editor-bg: transparent;--ngs-comment-editor-content-max-height: 9999px;display:block;position:relative;overflow:hidden;background:var(--ngs-comment-editor-bg)}:host .floating-menu{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--dropdown-bg);padding-top:calc(var(--spacing, .25rem) * 1.5);padding-bottom:calc(var(--spacing, .25rem) * 1.5);padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2);border:1px solid var(--color-border);border-radius:calc(infinity * 1px)}:host .floating-menu .button:hover{color:var(--color-primary);border-radius:calc(infinity * 1px)}:host .floating-menu .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .floating-menu .button:disabled{pointer-events:none;opacity:70%}:host .content{position:absolute;inset:0;height:calc(var(--spacing, .25rem) * 14)}:host .content ::ng-deep .single-emoji{font-size:1.875rem}:host .content ::ng-deep .tiptap{padding:calc(var(--spacing, .25rem) * 4);min-height:calc(var(--spacing, .25rem) * 10)}:host .content ::ng-deep .tiptap:focus{outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video]{cursor:move;background:var(--color-neutral-100);padding:calc(var(--spacing, .25rem) * 6);display:flex;align-items:center;justify-content:center}:host .content ::ng-deep .tiptap div[data-youtube-video] iframe{width:100%;aspect-ratio:16/9;border:none;display:block;min-height:200px;min-width:200px;outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video].ProseMirror-selectednode iframe{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap img{display:block;height:auto;margin:calc(var(--spacing, .25rem) * 6) 0;max-width:100%}:host .content ::ng-deep .tiptap img.ProseMirror-selectednode{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep .tiptap.ProseMirror-focused p.is-editor-empty:first-child:before{content:none}:host .content ::ng-deep .tiptap p.is-empty:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep p:first-child,:host .content ::ng-deep pre:first-child{margin-top:0}:host .content ::ng-deep p:last-child,:host .content ::ng-deep pre:last-child{margin-bottom:0}:host .editor-content{padding:0 calc(var(--spacing, .25rem) * 4)}:host .editor-content:empty{display:none}:host.full-view .content{position:static;height:auto;min-height:calc(var(--spacing, .25rem) * 12);max-height:var(--ngs-comment-editor-content-max-height);overflow-y:auto}:host .footer{height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;justify-content:space-between}:host .toolbar{border-bottom:1px solid var(--color-border);height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}:host .button.active,:host ::ng-deep .button.active{background:var(--color-neutral-200)}:host-context(html.dark) .button.active,:host-context(html.dark) ::ng-deep .button.active{background:var(--color-neutral-650);color:var(--color-neutral-200)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }] });
|
|
496
548
|
}
|
|
497
549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditor, decorators: [{
|
|
498
550
|
type: Component,
|
|
@@ -507,8 +559,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
507
559
|
'class': 'ngs-comment-editor',
|
|
508
560
|
'[class.full-view]': 'fullView || fullViewMode()',
|
|
509
561
|
'(click)': 'activateFullView()'
|
|
510
|
-
}, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\"
|
|
511
|
-
}], propDecorators: { _content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], _bubbleMenu: [{ type: i0.ViewChild, args: ['bubbleMenu', { isSignal: true }] }], _imageBubbleMenu: [{ type: i0.ViewChild, args: ['imageBubbleMenu', { isSignal: true }] }], contentMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentMaxHeight", required: false }] }], buttonCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonCancelLabel", required: false }] }], buttonSendLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonSendLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], toolbarAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbarAlwaysVisible", required: false }] }], fullViewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullViewMode", required: false }] }], cancelButtonAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonAlwaysVisible", required: false }] }], imageUploadFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUploadFn", required: false }] }], sent: [{ type: i0.Output, args: ["sent"] }], canceled: [{ type: i0.Output, args: ["canceled"] }] } });
|
|
562
|
+
}, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\"/>\n </div>\n}\n<div #content class=\"content prose dark:prose-invert max-w-full\"></div>\n<div class=\"editor-content\">\n <ng-content/>\n</div>\n<div class=\"footer\">\n <div class=\"flex items-center gap-0.5 grow pe-3\">\n <ng-content select=\"ngs-comment-editor-footer-bar\"/>\n </div>\n <div class=\"flex items-center gap-2\">\n @if ((fullView && !fullViewMode()) || cancelButtonAlwaysVisible()) {\n <button ngsButton (click)=\"cancel($event)\">{{ buttonCancelLabel() }}</button>\n }\n <button ngsButton=\"filled\"\n [disabled]=\"(!allowEmptyContent() && !_value) || null\"\n (click)=\"send($event)\">{{ buttonSendLabel() }}\n </button>\n </div>\n</div>\n<div #imageBubbleMenu class=\"ngs-comment-editor-bubble-menu\">\n</div>\n<div #bubbleMenu>\n <ng-content select=\"ngs-comment-editor-bubble-menu\"/>\n</div>\n<!--<div #floatingMenu class=\"floating-menu\">-->\n<!-- @if (editor) {-->\n<!-- <div class=\"flex items-center gap-1.5\">-->\n<!-- <button class=\"button\"-->\n<!-- [disabled]=\"isCommandDisabled('toggleCodeBlock')\"-->\n<!-- [class.active]=\"editor && editor.isActive('codeBlock')\"-->\n<!-- (click)=\"onButtonClick('toggleCodeBlock')\">-->\n<!-- <ngs-icon name=\"fluent:code-24-regular\"/>-->\n<!-- </button>-->\n<!-- <button class=\"button\">-->\n<!-- <ngs-icon name=\"fluent:image-24-regular\"/>-->\n<!-- </button>-->\n<!-- </div>-->\n<!-- }-->\n<!--</div>-->\n", styles: [":host{--ngs-comment-editor-bg: transparent;--ngs-comment-editor-content-max-height: 9999px;display:block;position:relative;overflow:hidden;background:var(--ngs-comment-editor-bg)}:host .floating-menu{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--dropdown-bg);padding-top:calc(var(--spacing, .25rem) * 1.5);padding-bottom:calc(var(--spacing, .25rem) * 1.5);padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2);border:1px solid var(--color-border);border-radius:calc(infinity * 1px)}:host .floating-menu .button:hover{color:var(--color-primary);border-radius:calc(infinity * 1px)}:host .floating-menu .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .floating-menu .button:disabled{pointer-events:none;opacity:70%}:host .content{position:absolute;inset:0;height:calc(var(--spacing, .25rem) * 14)}:host .content ::ng-deep .single-emoji{font-size:1.875rem}:host .content ::ng-deep .tiptap{padding:calc(var(--spacing, .25rem) * 4);min-height:calc(var(--spacing, .25rem) * 10)}:host .content ::ng-deep .tiptap:focus{outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video]{cursor:move;background:var(--color-neutral-100);padding:calc(var(--spacing, .25rem) * 6);display:flex;align-items:center;justify-content:center}:host .content ::ng-deep .tiptap div[data-youtube-video] iframe{width:100%;aspect-ratio:16/9;border:none;display:block;min-height:200px;min-width:200px;outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video].ProseMirror-selectednode iframe{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap img{display:block;height:auto;margin:calc(var(--spacing, .25rem) * 6) 0;max-width:100%}:host .content ::ng-deep .tiptap img.ProseMirror-selectednode{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep .tiptap.ProseMirror-focused p.is-editor-empty:first-child:before{content:none}:host .content ::ng-deep .tiptap p.is-empty:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep p:first-child,:host .content ::ng-deep pre:first-child{margin-top:0}:host .content ::ng-deep p:last-child,:host .content ::ng-deep pre:last-child{margin-bottom:0}:host .editor-content{padding:0 calc(var(--spacing, .25rem) * 4)}:host .editor-content:empty{display:none}:host.full-view .content{position:static;height:auto;min-height:calc(var(--spacing, .25rem) * 12);max-height:var(--ngs-comment-editor-content-max-height);overflow-y:auto}:host .footer{height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;justify-content:space-between}:host .toolbar{border-bottom:1px solid var(--color-border);height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}:host .button.active,:host ::ng-deep .button.active{background:var(--color-neutral-200)}:host-context(html.dark) .button.active,:host-context(html.dark) ::ng-deep .button.active{background:var(--color-neutral-650);color:var(--color-neutral-200)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
563
|
+
}], propDecorators: { _content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], _bubbleMenu: [{ type: i0.ViewChild, args: ['bubbleMenu', { isSignal: true }] }], _imageBubbleMenu: [{ type: i0.ViewChild, args: ['imageBubbleMenu', { isSignal: true }] }], contentMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentMaxHeight", required: false }] }], buttonCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonCancelLabel", required: false }] }], buttonSendLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonSendLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], toolbarAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbarAlwaysVisible", required: false }] }], fullViewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullViewMode", required: false }] }], cancelButtonAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonAlwaysVisible", required: false }] }], allowEmptyContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmptyContent", required: false }] }], imageUploadFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUploadFn", required: false }] }], sent: [{ type: i0.Output, args: ["sent"] }], canceled: [{ type: i0.Output, args: ["canceled"] }] } });
|
|
512
564
|
|
|
513
565
|
class CommentEditorDivider {
|
|
514
566
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|