@ngstarter-ui/components 22.0.6 → 22.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,19 +4,41 @@ import { input, booleanAttribute, ChangeDetectionStrategy, Component } from '@an
4
4
  class Skeleton {
5
5
  roundedFull = input(false, { ...(ngDevMode ? { debugName: "roundedFull" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6
6
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: Skeleton, isStandalone: true, selector: "ngs-skeleton", inputs: { roundedFull: { classPropertyName: "roundedFull", publicName: "roundedFull", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.rounded-full": "roundedFull" }, classAttribute: "ngs-skeleton" }, exportAs: ["ngsSkeleton"], ngImport: i0, template: '', isInline: true, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: Skeleton, isStandalone: true, selector: "ngs-skeleton", inputs: { roundedFull: { classPropertyName: "roundedFull", publicName: "roundedFull", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.rounded-full": "roundedFull()" }, classAttribute: "ngs-skeleton" }, exportAs: ["ngsSkeleton"], ngImport: i0, template: '', isInline: true, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}:host.rounded-full{--ngs-skeleton-item-border-radius: var(--ngs-radius-full)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
8
  }
9
9
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Skeleton, decorators: [{
10
10
  type: Component,
11
- args: [{ selector: 'ngs-skeleton', exportAs: 'ngsSkeleton', imports: [], template: '', changeDetection: ChangeDetectionStrategy.Eager, host: {
11
+ args: [{ selector: 'ngs-skeleton', exportAs: 'ngsSkeleton', imports: [], template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: {
12
12
  class: 'ngs-skeleton',
13
- '[class.rounded-full]': 'roundedFull'
14
- }, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
13
+ '[class.rounded-full]': 'roundedFull()'
14
+ }, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}:host.rounded-full{--ngs-skeleton-item-border-radius: var(--ngs-radius-full)}\n"] }]
15
15
  }], propDecorators: { roundedFull: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundedFull", required: false }] }] } });
16
16
 
17
+ class SkeletonCircle {
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SkeletonCircle, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: SkeletonCircle, isStandalone: true, selector: "ngs-skeleton-circle", host: { classAttribute: "ngs-skeleton ngs-skeleton-circle" }, exportAs: ["ngsSkeletonCircle"], ngImport: i0, template: '', isInline: true, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}:host{--ngs-skeleton-item-border-radius: var(--ngs-radius-full);aspect-ratio:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SkeletonCircle, decorators: [{
22
+ type: Component,
23
+ args: [{ selector: 'ngs-skeleton-circle', exportAs: 'ngsSkeletonCircle', template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: {
24
+ class: 'ngs-skeleton ngs-skeleton-circle'
25
+ }, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}:host{--ngs-skeleton-item-border-radius: var(--ngs-radius-full);aspect-ratio:1}\n"] }]
26
+ }] });
27
+
28
+ class SkeletonRectangle {
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SkeletonRectangle, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: SkeletonRectangle, isStandalone: true, selector: "ngs-skeleton-rectangle", host: { classAttribute: "ngs-skeleton ngs-skeleton-rectangle" }, exportAs: ["ngsSkeletonRectangle"], ngImport: i0, template: '', isInline: true, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SkeletonRectangle, decorators: [{
33
+ type: Component,
34
+ args: [{ selector: 'ngs-skeleton-rectangle', exportAs: 'ngsSkeletonRectangle', template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: {
35
+ class: 'ngs-skeleton ngs-skeleton-rectangle'
36
+ }, styles: [":host{--ngs-skeleton-item-border-radius: var(--ngs-radius-xl);--ngs-skeleton-from-bg: var(--ngs-color-neutral-200);--ngs-skeleton-to-bg: var(--ngs-color-neutral-300);display:block;background:linear-gradient(90deg,var(--ngs-skeleton-from-bg),var(--ngs-skeleton-to-bg));border-radius:var(--ngs-skeleton-item-border-radius);flex:none;animation:ngs-skeleton-loading 1s linear infinite alternate}@keyframes ngs-skeleton-loading{0%{background:var(--ngs-skeleton-from-bg)}to{background:var(--ngs-skeleton-to-bg)}}:host-context(html.dark){--ngs-skeleton-from-bg: var(--ngs-color-neutral-500);--ngs-skeleton-to-bg: var(--ngs-color-neutral-600)}\n"] }]
37
+ }] });
38
+
17
39
  /**
18
40
  * Generated bundle index. Do not edit.
19
41
  */
20
42
 
21
- export { Skeleton };
43
+ export { Skeleton, SkeletonCircle, SkeletonRectangle };
22
44
  //# sourceMappingURL=ngstarter-ui-components-skeleton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-skeleton.mjs","sources":["../../../projects/components/skeleton/src/skeleton/skeleton.ts","../../../projects/components/skeleton/ngstarter-ui-components-skeleton.ts"],"sourcesContent":["import { booleanAttribute, Component, input, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-skeleton',\n exportAs: 'ngsSkeleton',\n imports: [],\n template: '',\n styleUrl: './skeleton.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n class: 'ngs-skeleton',\n '[class.rounded-full]': 'roundedFull'\n }\n})\nexport class Skeleton {\n roundedFull = input(false, {\n transform: booleanAttribute\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAca,QAAQ,CAAA;IACnB,WAAW,GAAG,KAAK,CAAC,KAAK,mFACvB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;uGAHS,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,wVART,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6oBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA;;2FAQD,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAZpB,SAAS;+BACE,cAAc,EAAA,QAAA,EACd,aAAa,EAAA,OAAA,EACd,EAAE,EAAA,QAAA,EACD,EAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,KAAK,EAAA,IAAA,EACxC;AACJ,wBAAA,KAAK,EAAE,cAAc;AACrB,wBAAA,sBAAsB,EAAE;AACzB,qBAAA,EAAA,MAAA,EAAA,CAAA,6oBAAA,CAAA,EAAA;;;ACZH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-skeleton.mjs","sources":["../../../projects/components/skeleton/src/skeleton/skeleton.ts","../../../projects/components/skeleton/src/skeleton-circle/skeleton-circle.ts","../../../projects/components/skeleton/src/skeleton-rectangle/skeleton-rectangle.ts","../../../projects/components/skeleton/ngstarter-ui-components-skeleton.ts"],"sourcesContent":["import { booleanAttribute, Component, input, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-skeleton',\n exportAs: 'ngsSkeleton',\n imports: [],\n template: '',\n styleUrl: './skeleton.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngs-skeleton',\n '[class.rounded-full]': 'roundedFull()'\n }\n})\nexport class Skeleton {\n roundedFull = input(false, {\n transform: booleanAttribute\n });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ngs-skeleton-circle',\n exportAs: 'ngsSkeletonCircle',\n template: '',\n styleUrl: './skeleton-circle.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngs-skeleton ngs-skeleton-circle'\n }\n})\nexport class SkeletonCircle {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'ngs-skeleton-rectangle',\n exportAs: 'ngsSkeletonRectangle',\n template: '',\n styleUrl: './skeleton-rectangle.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngs-skeleton ngs-skeleton-rectangle'\n }\n})\nexport class SkeletonRectangle {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAca,QAAQ,CAAA;IACnB,WAAW,GAAG,KAAK,CAAC,KAAK,mFACvB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;uGAHS,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,0VART,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4sBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAQD,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAZpB,SAAS;+BACE,cAAc,EAAA,QAAA,EACd,aAAa,EAAA,OAAA,EACd,EAAE,EAAA,QAAA,EACD,EAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;AACrB,wBAAA,sBAAsB,EAAE;AACzB,qBAAA,EAAA,MAAA,EAAA,CAAA,4sBAAA,CAAA,EAAA;;;MCAU,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,8KAPf,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8sBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAOD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;+BACE,qBAAqB,EAAA,QAAA,EACrB,mBAAmB,EAAA,QAAA,EACnB,EAAE,mBAEK,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE;AACR,qBAAA,EAAA,MAAA,EAAA,CAAA,8sBAAA,CAAA,EAAA;;;MCEU,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,uLAPlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+nBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAOD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;+BACE,wBAAwB,EAAA,QAAA,EACxB,sBAAsB,EAAA,QAAA,EACtB,EAAE,mBAEK,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE;AACR,qBAAA,EAAA,MAAA,EAAA,CAAA,+nBAAA,CAAA,EAAA;;;ACVH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngstarter-ui/components",
3
3
  "description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
4
- "version": "22.0.6",
4
+ "version": "22.1.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/elementarlabsdev/ngstarter.git"
@@ -55,20 +55,6 @@
55
55
  "@ngrx/signals": "^22.0.1",
56
56
  "@tailwindcss/postcss": "^4.2.2",
57
57
  "@tailwindcss/typography": "^0.5.19",
58
- "@tiptap/core": "2.10.2",
59
- "@tiptap/extension-bubble-menu": "2.10.2",
60
- "@tiptap/extension-code-block": "2.10.2",
61
- "@tiptap/extension-dropcursor": "2.10.2",
62
- "@tiptap/extension-floating-menu": "2.10.2",
63
- "@tiptap/extension-history": "2.10.2",
64
- "@tiptap/extension-horizontal-rule": "2.10.3",
65
- "@tiptap/extension-image": "2.10.2",
66
- "@tiptap/extension-link": "2.10.4",
67
- "@tiptap/extension-list-item": "2.10.2",
68
- "@tiptap/extension-ordered-list": "2.10.2",
69
- "@tiptap/extension-placeholder": "2.10.2",
70
- "@tiptap/extension-youtube": "2.10.2",
71
- "@tiptap/pm": "2.10.2",
72
58
  "@uiw/codemirror-theme-github": "^4.25.9",
73
59
  "@viselect/vanilla": "^3.9.0",
74
60
  "autoprefixer": "^10.4.17",
@@ -303,6 +289,10 @@
303
289
  "types": "./types/ngstarter-ui-components-guided-tour.d.ts",
304
290
  "default": "./fesm2022/ngstarter-ui-components-guided-tour.mjs"
305
291
  },
292
+ "./headless-editor": {
293
+ "types": "./types/ngstarter-ui-components-headless-editor.d.ts",
294
+ "default": "./fesm2022/ngstarter-ui-components-headless-editor.mjs"
295
+ },
306
296
  "./headless-stepper": {
307
297
  "types": "./types/ngstarter-ui-components-headless-stepper.d.ts",
308
298
  "default": "./fesm2022/ngstarter-ui-components-headless-stepper.mjs"
@@ -555,10 +545,6 @@
555
545
  "types": "./types/ngstarter-ui-components-tabs.d.ts",
556
546
  "default": "./fesm2022/ngstarter-ui-components-tabs.mjs"
557
547
  },
558
- "./text-editor": {
559
- "types": "./types/ngstarter-ui-components-text-editor.d.ts",
560
- "default": "./fesm2022/ngstarter-ui-components-text-editor.mjs"
561
- },
562
548
  "./thumbnail-maker": {
563
549
  "types": "./types/ngstarter-ui-components-thumbnail-maker.d.ts",
564
550
  "default": "./fesm2022/ngstarter-ui-components-thumbnail-maker.mjs"
@@ -1,5 +1,9 @@
1
+ // Base tokens are declared on every theme scope, not only on :root. Custom
2
+ // properties that reference other tokens (var(...)) are resolved where they are
3
+ // declared, so a nested [data-ngs-theme='chalk'] scope must re-declare them to
4
+ // pick up its own palette instead of inheriting values resolved for :root.
1
5
  :root,
2
- [data-ngs-theme='default'] {
6
+ [data-ngs-theme] {
3
7
  color-scheme: light;
4
8
  --ngs-font-family-base: "DM Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
5
9
  --ngs-font-size-xs: 0.75rem;
@@ -222,7 +226,7 @@
222
226
  --ngs-overlay-backdrop-bg: rgba(18, 32, 59, 0.30);
223
227
  --ngs-overlay-backdrop-blur: 3px;
224
228
  --ngs-table-bg: var(--ngs-color-surface);
225
- --ngs-table-border-color: #dce2eb;
229
+ --ngs-table-border-color: var(--ngs-color-border);
226
230
  --ngs-table-header-color: var(--ngs-color-on-surface-variant);
227
231
  --ngs-table-header-bg: var(--ngs-color-surface);
228
232
  --ngs-table-row-bg: var(--ngs-color-surface);
@@ -285,6 +289,17 @@
285
289
  --ngs-nav-divider-height: 1px;
286
290
  --ngs-nav-divider-margin: --spacing(6) 0;
287
291
  --ngs-sidebar-width: var(--ngs-sidenav-width, 17.5rem);
292
+
293
+ --ngs-loader-overlay-bg: var(--ngs-color-surface-loading);
294
+ --ngs-chip-radius: var(--ngs-radius-full);
295
+ --ngs-chip-selected-background: var(--ngs-color-primary-container);
296
+ --ngs-chip-selected-color: var(--ngs-color-primary);
297
+ --ngs-segmented-bg: var(--ngs-color-surface-container-high);
298
+ --ngs-segmented-button-selected-bg: var(--ngs-color-surface);
299
+ --ngs-segmented-button-selected-shadow: var(--ngs-shadow-sm);
300
+ --ngs-card-bg: var(--ngs-color-surface);
301
+ --ngs-card-border-color: var(--ngs-color-border);
302
+ --ngs-card-radius: var(--ngs-radius-lg);
288
303
  }
289
304
 
290
305
  :root,
@@ -189,6 +189,7 @@
189
189
  --ngs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
190
190
  --ngs-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.42);
191
191
  --ngs-shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.56);
192
+ --ngs-dialog-shadow: var(--ngs-shadow-lg);
192
193
 
193
194
  --ngs-color-primary-seed: #edf16e;
194
195
  --ngs-color-primary: #edf16e;
@@ -1,73 +1,114 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, OnInit, OnDestroy } from '@angular/core';
3
- import { Editor } from '@tiptap/core';
2
+ import { InjectionToken } from '@angular/core';
3
+ import { NgsHeadlessEditor, NgsHeadlessEditorDocument, NgsHeadlessEditorMarkAttributes, NgsHeadlessEditorPlugin, NgsHeadlessEditorCommand, NgsHeadlessEditorBlock } from '@ngstarter-ui/components/headless-editor';
4
4
  import * as i1 from '@ngstarter-ui/components/upload';
5
5
  import { UploadFileSelectedEvent } from '@ngstarter-ui/components/upload';
6
6
 
7
7
  interface CommentEditorInterface {
8
- api: CommentEditorAPI;
8
+ readonly api: CommentEditorAPI;
9
9
  }
10
10
  interface CommentEditorAPI {
11
- isCommandDisabled: (command: string) => boolean | null;
12
- isActive: (command: string) => boolean | null;
13
- runCommand: (command: string) => void;
14
- editor: () => Editor;
15
- isToolbarActive: () => boolean;
16
- toggleToolbar: () => void;
17
- isEditorActivated: () => boolean;
18
- showToolbar: () => void;
19
- hideToolbar: () => void;
20
- showFullView: () => void;
21
- hideFullView: () => void;
22
- insertText: (text: string) => void;
23
- clear: () => void;
24
- }
25
- declare const COMMENT_EDITOR: InjectionToken<unknown>;
11
+ isCommandDisabled(command: string): boolean | null;
12
+ isActive(command: string): boolean;
13
+ runCommand(command: string): void;
14
+ editor(): NgsHeadlessEditor;
15
+ document(): NgsHeadlessEditorDocument;
16
+ isToolbarActive(): boolean;
17
+ toggleToolbar(): void;
18
+ showToolbar(): void;
19
+ hideToolbar(): void;
20
+ isEditorActivated(): boolean;
21
+ showFullView(): void;
22
+ hideFullView(): void;
23
+ insertText(text: string): void;
24
+ insertImage(file: File): void;
25
+ insertYoutube(url: string): boolean;
26
+ getMarkAttributes(type: string): NgsHeadlessEditorMarkAttributes | undefined;
27
+ setTextColor(color: string): boolean;
28
+ unsetTextColor(): boolean;
29
+ setBackgroundColor(color: string): boolean;
30
+ unsetBackgroundColor(): boolean;
31
+ setLink(url: string): boolean;
32
+ unsetLink(): boolean;
33
+ clear(): void;
34
+ focus(): void;
35
+ }
36
+ declare const COMMENT_EDITOR: InjectionToken<CommentEditorInterface>;
26
37
  declare const COMMENT_EDITOR_BUBBLE_MENU: InjectionToken<unknown>;
27
38
 
28
- declare class CommentEditor implements OnInit, OnDestroy {
29
- private _platformId;
30
- private _document;
31
- private _cdr;
32
- private _injector;
33
- private _content;
34
- private _bubbleMenu;
35
- private _imageBubbleMenu;
36
- protected _value: string;
37
- protected editor: Editor;
38
- protected isToolbarVisible: boolean;
39
- protected isFullViewVisible: boolean;
40
- contentMaxHeight: i0.InputSignal<number | undefined>;
41
- buttonCancelLabel: i0.InputSignal<string>;
42
- buttonSendLabel: i0.InputSignal<string>;
43
- placeholder: i0.InputSignal<string>;
44
- toolbarAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
45
- fullViewMode: i0.InputSignalWithTransform<boolean, unknown>;
46
- cancelButtonAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
47
- allowEmptyContent: i0.InputSignalWithTransform<boolean, unknown>;
48
- autoClear: i0.InputSignalWithTransform<boolean, unknown>;
49
- loading: i0.InputSignal<boolean>;
50
- imageUploadFn: i0.InputSignal<((file: Blob) => Promise<string>) | undefined>;
39
+ declare class CommentEditor {
40
+ readonly editor: NgsHeadlessEditor;
41
+ private readonly host;
42
+ private readonly renderer;
43
+ private readonly documentRef;
44
+ private readonly destroyRef;
45
+ private readonly surface;
46
+ private readonly bubbleMenuLayer;
47
+ private readonly basicPlugin;
48
+ private readonly colorPlugin;
49
+ private readonly commentPlugin;
50
+ private readonly toolbarActive;
51
+ private readonly fullViewActive;
52
+ private bubbleMenuFrame;
53
+ readonly value: i0.ModelSignal<NgsHeadlessEditorDocument>;
54
+ readonly plugins: i0.InputSignal<readonly NgsHeadlessEditorPlugin[]>;
55
+ readonly contentMaxHeight: i0.InputSignal<number | undefined>;
56
+ readonly buttonCancelLabel: i0.InputSignal<string>;
57
+ readonly buttonSendLabel: i0.InputSignal<string>;
58
+ readonly buttonSubmitLabel: i0.InputSignal<string | undefined>;
59
+ readonly placeholder: i0.InputSignal<string>;
60
+ readonly ariaLabel: i0.InputSignal<string>;
61
+ readonly toolbarAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
62
+ readonly fullViewMode: i0.InputSignalWithTransform<boolean, unknown>;
63
+ readonly cancelButtonAlwaysVisible: i0.InputSignalWithTransform<boolean, unknown>;
64
+ readonly allowEmptyContent: i0.InputSignalWithTransform<boolean, unknown>;
65
+ readonly allowEmpty: i0.InputSignalWithTransform<boolean, unknown>;
66
+ readonly autoClear: i0.InputSignalWithTransform<boolean, unknown>;
67
+ readonly loading: i0.InputSignalWithTransform<boolean, unknown>;
68
+ readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
69
+ readonly readOnly: i0.InputSignalWithTransform<boolean, unknown>;
70
+ readonly imageUploadFn: i0.InputSignal<((file: Blob) => Promise<string>) | undefined>;
71
+ readonly submitted: i0.OutputEmitterRef<NgsHeadlessEditorDocument>;
51
72
  readonly sent: i0.OutputEmitterRef<string>;
52
73
  readonly canceled: i0.OutputEmitterRef<void>;
53
- ngOnInit(): void;
54
- get api(): CommentEditorAPI;
74
+ readonly isEditorActivated: i0.Signal<boolean>;
75
+ readonly isToolbarVisible: i0.Signal<boolean>;
76
+ readonly isBubbleMenuVisible: i0.Signal<boolean>;
77
+ readonly isCancelVisible: i0.Signal<boolean>;
78
+ readonly sendLabel: i0.Signal<string>;
79
+ readonly sendDisabled: i0.Signal<boolean>;
80
+ private readonly commands;
81
+ readonly api: CommentEditorAPI;
82
+ constructor();
55
83
  insertText(text: string): void;
56
84
  isCommandDisabled(command: string): boolean | null;
57
- ngOnDestroy(): void;
58
- send(event: MouseEvent): void;
85
+ isActive(command: string): boolean;
86
+ runCommand(command: string): void;
87
+ send(event?: Event): void;
88
+ submit(event?: Event): void;
89
+ cancel(event?: Event): void;
59
90
  clear(): void;
60
- activateFullView(event?: MouseEvent): void;
91
+ activateFullView(event?: Event): void;
61
92
  showFullView(): void;
62
93
  hideFullView(): void;
63
94
  toggleToolbar(): void;
64
95
  showToolbar(): void;
65
96
  hideToolbar(): void;
66
- cancel(event: MouseEvent): void;
67
- private _runCommand;
68
- private _init;
97
+ focus(): void;
98
+ setLink(url: string): boolean;
99
+ setTextColor(color: string): boolean;
100
+ unsetTextColor(): boolean;
101
+ setBackgroundColor(color: string): boolean;
102
+ unsetBackgroundColor(): boolean;
103
+ unsetLink(): boolean;
104
+ insertYoutube(url: string): boolean;
105
+ insertImage(file: File): void;
106
+ private currentBlockIsEmpty;
107
+ private readFile;
108
+ private scheduleBubbleMenuPosition;
109
+ private positionBubbleMenu;
69
110
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditor, never>;
70
- static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditor, "ngs-comment-editor", ["ngsCommentEditor"], { "contentMaxHeight": { "alias": "contentMaxHeight"; "required": false; "isSignal": true; }; "buttonCancelLabel": { "alias": "buttonCancelLabel"; "required": false; "isSignal": true; }; "buttonSendLabel": { "alias": "buttonSendLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "toolbarAlwaysVisible": { "alias": "toolbarAlwaysVisible"; "required": false; "isSignal": true; }; "fullViewMode": { "alias": "fullViewMode"; "required": false; "isSignal": true; }; "cancelButtonAlwaysVisible": { "alias": "cancelButtonAlwaysVisible"; "required": false; "isSignal": true; }; "allowEmptyContent": { "alias": "allowEmptyContent"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "imageUploadFn": { "alias": "imageUploadFn"; "required": false; "isSignal": true; }; }, { "sent": "sent"; "canceled": "canceled"; }, never, ["ngs-comment-editor-toolbar", "*", "ngs-comment-editor-footer-bar", "ngs-comment-editor-bubble-menu"], true, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditor, "ngs-comment-editor", ["ngsCommentEditor"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "contentMaxHeight": { "alias": "contentMaxHeight"; "required": false; "isSignal": true; }; "buttonCancelLabel": { "alias": "buttonCancelLabel"; "required": false; "isSignal": true; }; "buttonSendLabel": { "alias": "buttonSendLabel"; "required": false; "isSignal": true; }; "buttonSubmitLabel": { "alias": "buttonSubmitLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "toolbarAlwaysVisible": { "alias": "toolbarAlwaysVisible"; "required": false; "isSignal": true; }; "fullViewMode": { "alias": "fullViewMode"; "required": false; "isSignal": true; }; "cancelButtonAlwaysVisible": { "alias": "cancelButtonAlwaysVisible"; "required": false; "isSignal": true; }; "allowEmptyContent": { "alias": "allowEmptyContent"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "imageUploadFn": { "alias": "imageUploadFn"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "submitted": "submitted"; "sent": "sent"; "canceled": "canceled"; }, never, ["ngs-comment-editor-toolbar", "*", "ngs-comment-editor-footer-bar", "ngs-comment-editor-bubble-menu"], true, never>;
71
112
  }
72
113
 
73
114
  declare class CommentEditorDivider {
@@ -81,7 +122,7 @@ declare class CommentEditorToolbar {
81
122
  }
82
123
 
83
124
  declare class CommentEditorBubbleMenu {
84
- protected commentEditor: CommentEditorInterface;
125
+ protected readonly commentEditor: CommentEditorInterface;
85
126
  getLinkUrl(): string | null;
86
127
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorBubbleMenu, never>;
87
128
  static ɵcmp: i0.ɵɵComponentDeclaration<CommentEditorBubbleMenu, "ngs-comment-editor-bubble-menu", ["ngsCommentEditorBubbleMenu"], {}, {}, never, ["[ngsCommentEditorCommandEditLink],[ngsCommentEditorCommandUnsetLink]", "[ngsCommentEditorCommand],ngs-comment-editor-divider"], true, never>;
@@ -97,113 +138,123 @@ declare class CommentEditorCommandDirective {
97
138
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandDirective, "[ngsCommentEditorCommand]", never, {}, {}, never, never, true, never>;
98
139
  }
99
140
 
100
- declare class CommentEditorCommandBoldDirective {
101
- protected commentEditor: CommentEditorInterface;
102
- protected onClick(): void;
141
+ declare abstract class CommentEditorCommandBase {
142
+ protected readonly commentEditor: CommentEditorInterface;
143
+ protected preserveSelection(event: MouseEvent): void;
144
+ protected run(command: string, event?: Event): void;
145
+ }
146
+
147
+ declare class CommentEditorCommandBoldDirective extends CommentEditorCommandBase {
103
148
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBoldDirective, never>;
104
149
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBoldDirective, "[ngsCommentEditorCommandBold]", ["ngsCommentEditorCommandBold"], {}, {}, never, never, true, never>;
105
150
  }
106
151
 
107
- declare class CommentEditorCommandItalicDirective {
108
- protected commentEditor: CommentEditorInterface;
109
- protected onClick(): void;
152
+ declare class CommentEditorCommandItalicDirective extends CommentEditorCommandBase {
110
153
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandItalicDirective, never>;
111
154
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandItalicDirective, "[ngsCommentEditorCommandItalic]", never, {}, {}, never, never, true, never>;
112
155
  }
113
156
 
114
- declare class CommentEditorCommandStrikeDirective {
115
- protected commentEditor: CommentEditorInterface;
116
- protected onClick(): void;
157
+ declare class CommentEditorCommandStrikeDirective extends CommentEditorCommandBase {
117
158
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandStrikeDirective, never>;
118
159
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandStrikeDirective, "[ngsCommentEditorCommandStrike]", never, {}, {}, never, never, true, never>;
119
160
  }
120
161
 
121
- declare class CommentEditorCommandBulletListDirective {
122
- protected commentEditor: CommentEditorInterface;
123
- protected onClick(): void;
162
+ declare class CommentEditorCommandBulletListDirective extends CommentEditorCommandBase {
124
163
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBulletListDirective, never>;
125
164
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBulletListDirective, "[ngsCommentEditorCommandBulletList]", never, {}, {}, never, never, true, never>;
126
165
  }
127
166
 
128
- declare class CommentEditorCommandOrderedListDirective {
129
- protected commentEditor: CommentEditorInterface;
130
- protected onClick(): void;
167
+ declare class CommentEditorCommandOrderedListDirective extends CommentEditorCommandBase {
131
168
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandOrderedListDirective, never>;
132
169
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandOrderedListDirective, "[ngsCommentEditorCommandOrderedList]", never, {}, {}, never, never, true, never>;
133
170
  }
134
171
 
135
- declare class CommentEditorCommandBlockquoteDirective {
136
- protected commentEditor: CommentEditorInterface;
137
- protected onClick(): void;
172
+ declare class CommentEditorCommandBlockquoteDirective extends CommentEditorCommandBase {
138
173
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandBlockquoteDirective, never>;
139
174
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandBlockquoteDirective, "[ngsCommentEditorCommandBlockquote]", never, {}, {}, never, never, true, never>;
140
175
  }
141
176
 
142
- declare class CommentEditorCommandCodeBlockDirective {
143
- protected commentEditor: CommentEditorInterface;
144
- protected onClick(): void;
177
+ declare class CommentEditorCommandCodeBlockDirective extends CommentEditorCommandBase {
145
178
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandCodeBlockDirective, never>;
146
179
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandCodeBlockDirective, "[ngsCommentEditorCommandCodeBlock]", never, {}, {}, never, never, true, never>;
147
180
  }
148
181
 
149
182
  declare class CommentEditorCommandImageDirective {
150
- protected commentEditor: CommentEditorInterface;
151
- protected onImageSelected(event: UploadFileSelectedEvent): void;
183
+ protected readonly commentEditor: CommentEditorInterface;
184
+ protected selectImage(event: UploadFileSelectedEvent): void;
152
185
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandImageDirective, never>;
153
186
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandImageDirective, "[ngsCommentEditorCommandImage]", never, {}, {}, never, never, true, [{ directive: typeof i1.UploadTriggerDirective; inputs: {}; outputs: { "fileSelected": "fileSelected"; }; }]>;
154
187
  }
155
188
 
156
189
  declare class CommentEditorCommandYoutubeDirective {
157
- protected commentEditor: CommentEditorInterface;
158
- private _dialog;
159
- private _destroyRef;
160
- protected onClick(): void;
190
+ private readonly destroyRef;
191
+ private readonly dialog;
192
+ protected readonly commentEditor: CommentEditorInterface;
193
+ protected preserveSelection(event: MouseEvent): void;
194
+ protected open(event: Event): void;
161
195
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandYoutubeDirective, never>;
162
196
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandYoutubeDirective, "[ngsCommentEditorCommandYoutube]", never, {}, {}, never, never, true, never>;
163
197
  }
164
198
 
165
199
  declare class CommentEditorCommandLinkDirective {
166
- private _destroyRef;
167
- private _dialog;
168
- protected commentEditor: CommentEditorInterface;
169
- protected setLinkActive: boolean;
170
- protected onClick(): void;
171
- private _setLink;
200
+ private readonly destroyRef;
201
+ private readonly dialog;
202
+ protected readonly commentEditor: CommentEditorInterface;
203
+ protected preserveSelection(event: MouseEvent): void;
204
+ protected open(event: Event): void;
172
205
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandLinkDirective, never>;
173
206
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandLinkDirective, "[ngsCommentEditorCommandLink]", never, {}, {}, never, never, true, never>;
174
207
  }
175
208
 
176
- declare class CommentEditorCommandCodeDirective {
177
- protected commentEditor: CommentEditorInterface;
178
- protected onClick(): void;
209
+ declare class CommentEditorCommandCodeDirective extends CommentEditorCommandBase {
179
210
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandCodeDirective, never>;
180
211
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandCodeDirective, "[ngsCommentEditorCommandCode]", never, {}, {}, never, never, true, never>;
181
212
  }
182
213
 
183
214
  declare class CommentEditorCommandEditLinkDirective {
184
- private _destroyRef;
185
- private _dialog;
186
- protected commentEditor: CommentEditorInterface;
187
- protected setLinkActive: boolean;
188
- protected onClick(): void;
189
- private _setLink;
215
+ private readonly destroyRef;
216
+ private readonly dialog;
217
+ protected readonly commentEditor: CommentEditorInterface;
218
+ protected preserveSelection(event: MouseEvent): void;
219
+ protected open(event: Event): void;
190
220
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandEditLinkDirective, never>;
191
221
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandEditLinkDirective, "[ngsCommentEditorCommandEditLink]", never, {}, {}, never, never, true, never>;
192
222
  }
193
223
 
194
224
  declare class CommentEditorCommandUnsetLinkDirective {
195
- protected commentEditor: CommentEditorInterface;
196
- protected onClick(): void;
225
+ protected readonly commentEditor: CommentEditorInterface;
226
+ protected preserveSelection(event: MouseEvent): void;
227
+ protected unset(event: Event): void;
197
228
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandUnsetLinkDirective, never>;
198
229
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandUnsetLinkDirective, "[ngsCommentEditorCommandUnsetLink]", never, {}, {}, never, never, true, never>;
199
230
  }
200
231
 
201
232
  declare class CommentEditorCommandToggleToolbarDirective {
202
- protected commentEditor: CommentEditorInterface;
203
- protected onClick(): void;
233
+ protected readonly commentEditor: CommentEditorInterface;
234
+ protected preserveSelection(event: MouseEvent): void;
235
+ protected toggle(event: Event): void;
204
236
  static ɵfac: i0.ɵɵFactoryDeclaration<CommentEditorCommandToggleToolbarDirective, never>;
205
237
  static ɵdir: i0.ɵɵDirectiveDeclaration<CommentEditorCommandToggleToolbarDirective, "[ngsCommentEditorCommandToggleToolbar]", never, {}, {}, never, never, true, never>;
206
238
  }
207
239
 
208
- export { COMMENT_EDITOR, COMMENT_EDITOR_BUBBLE_MENU, CommentEditor, CommentEditorBubbleMenu, CommentEditorCommandBlockquoteDirective, CommentEditorCommandBoldDirective, CommentEditorCommandBulletListDirective, CommentEditorCommandCodeBlockDirective, CommentEditorCommandCodeDirective, CommentEditorCommandDirective, CommentEditorCommandEditLinkDirective, CommentEditorCommandImageDirective, CommentEditorCommandItalicDirective, CommentEditorCommandLinkDirective, CommentEditorCommandOrderedListDirective, CommentEditorCommandStrikeDirective, CommentEditorCommandToggleToolbarDirective, CommentEditorCommandUnsetLinkDirective, CommentEditorCommandYoutubeDirective, CommentEditorDivider, CommentEditorFooterBar, CommentEditorToolbar };
209
- export type { CommentEditorAPI, CommentEditorInterface };
240
+ interface CommentEditorMediaAttributes {
241
+ readonly src: string;
242
+ readonly alt?: string;
243
+ readonly status?: 'uploading' | 'error';
244
+ readonly error?: string;
245
+ }
246
+ declare const NGS_COMMENT_EDITOR_TOGGLE_BLOCKQUOTE: NgsHeadlessEditorCommand<void>;
247
+ declare const NGS_COMMENT_EDITOR_TOGGLE_CODE_BLOCK: NgsHeadlessEditorCommand<void>;
248
+ declare const NGS_COMMENT_EDITOR_TOGGLE_BULLET_LIST: NgsHeadlessEditorCommand<void>;
249
+ declare const NGS_COMMENT_EDITOR_TOGGLE_ORDERED_LIST: NgsHeadlessEditorCommand<void>;
250
+ declare const NGS_COMMENT_EDITOR_SET_LINK: NgsHeadlessEditorCommand<string>;
251
+ declare const NGS_COMMENT_EDITOR_UNSET_LINK: NgsHeadlessEditorCommand<void>;
252
+ declare function commentEditorPlugin(): NgsHeadlessEditorPlugin;
253
+ declare function createCommentEditorMediaBlock(type: 'image' | 'imageUpload' | 'youtube', attrs: CommentEditorMediaAttributes): NgsHeadlessEditorBlock<null>;
254
+ declare function normalizeLinkUrl(value: string): string;
255
+ declare function normalizeYoutubeUrl(value: string): string | null;
256
+
257
+ declare function serializeCommentEditorDocument(document: NgsHeadlessEditorDocument): string;
258
+
259
+ export { COMMENT_EDITOR, COMMENT_EDITOR_BUBBLE_MENU, CommentEditor, CommentEditorBubbleMenu, CommentEditorCommandBlockquoteDirective, CommentEditorCommandBoldDirective, CommentEditorCommandBulletListDirective, CommentEditorCommandCodeBlockDirective, CommentEditorCommandCodeDirective, CommentEditorCommandDirective, CommentEditorCommandEditLinkDirective, CommentEditorCommandImageDirective, CommentEditorCommandItalicDirective, CommentEditorCommandLinkDirective, CommentEditorCommandOrderedListDirective, CommentEditorCommandStrikeDirective, CommentEditorCommandToggleToolbarDirective, CommentEditorCommandUnsetLinkDirective, CommentEditorCommandYoutubeDirective, CommentEditorDivider, CommentEditorFooterBar, CommentEditorToolbar, NGS_COMMENT_EDITOR_SET_LINK, NGS_COMMENT_EDITOR_TOGGLE_BLOCKQUOTE, NGS_COMMENT_EDITOR_TOGGLE_BULLET_LIST, NGS_COMMENT_EDITOR_TOGGLE_CODE_BLOCK, NGS_COMMENT_EDITOR_TOGGLE_ORDERED_LIST, NGS_COMMENT_EDITOR_UNSET_LINK, commentEditorPlugin, createCommentEditorMediaBlock, normalizeLinkUrl, normalizeYoutubeUrl, serializeCommentEditorDocument };
260
+ export type { CommentEditorAPI, CommentEditorInterface, CommentEditorMediaAttributes };