@ngstarter-ui/components 22.2.3 → 22.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/ai/component-registry.json +97 -8
  2. package/content-editor/BLOCK_FORMAT.md +182 -0
  3. package/data-view/API.md +262 -0
  4. package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
  5. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs +35 -0
  7. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map +1 -0
  8. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs} +3 -4
  9. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs.map → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs} +4 -4
  11. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs} +2 -2
  13. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs.map → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs.map} +1 -1
  14. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs} +16 -39
  15. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs.map +1 -0
  16. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs} +5 -6
  17. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs.map → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs} +8 -5
  19. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs.map +1 -0
  20. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs +113 -0
  21. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs.map +1 -0
  22. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs} +4 -4
  23. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs.map → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs.map} +1 -1
  24. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs} +4 -4
  25. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs.map +1 -0
  26. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs} +2089 -1521
  27. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs.map +1 -0
  28. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs} +4 -4
  29. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs.map} +1 -1
  30. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs} +4 -4
  31. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs.map} +1 -1
  32. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs} +4 -4
  33. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs.map → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs.map} +1 -1
  34. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs} +3 -4
  35. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs.map → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map} +1 -1
  36. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +19 -0
  37. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs +134 -0
  39. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map +1 -0
  40. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  41. package/fesm2022/ngstarter-ui-components-core.mjs +46 -1
  42. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
  44. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
  46. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
  48. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-form-builder.mjs +1 -1
  50. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +58 -1
  52. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
  54. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
  56. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-menu.mjs +17 -4
  58. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
  60. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
  62. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-phone-input.mjs +1 -1
  64. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
  66. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
  68. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
  70. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/styles/_common.scss +2 -1
  73. package/styles/_tokens.scss +32 -1
  74. package/styles/themes/default.scss +1 -1
  75. package/types/ngstarter-ui-components-content-editor.d.ts +211 -11
  76. package/types/ngstarter-ui-components-core.d.ts +4 -1
  77. package/types/ngstarter-ui-components-data-view.d.ts +204 -11
  78. package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
  79. package/types/ngstarter-ui-components-headless-editor.d.ts +6 -1
  80. package/types/ngstarter-ui-components-menu.d.ts +5 -1
  81. package/types/ngstarter-ui-components-sort.d.ts +1 -0
  82. package/types/ngstarter-ui-components-table.d.ts +2 -0
  83. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs +0 -54
  84. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs.map +0 -1
  85. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs +0 -47
  86. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs.map +0 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs.map +0 -1
  88. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs.map +0 -1
  89. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs +0 -169
  90. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs.map +0 -1
  91. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs.map +0 -1
  92. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs.map +0 -1
  93. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs +0 -29
  94. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs.map +0 -1
  95. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs +0 -201
  96. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs.map +0 -1
@@ -2,9 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';
4
4
  import { SlideToggle } from '@ngstarter-ui/components/slide-toggle';
5
- import { C as ContentEditorBlockBase } from './ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs';
6
- import { C as ContentEditorNestedBlocks } from './ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs';
7
- import { d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs';
5
+ import { g as ContentEditorBlockBase, d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
6
+ import { C as ContentEditorNestedBlocks } from './ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs';
8
7
 
9
8
  class ContentEditorToggleBlock extends ContentEditorBlockBase {
10
9
  changeTitle(title) { this.save({ ...this.latestContent(), title }); }
@@ -18,4 +17,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
18
17
  }] });
19
18
 
20
19
  export { ContentEditorToggleBlock };
21
- //# sourceMappingURL=ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs.map
20
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs","sources":["../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.ts","../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';\nimport { SlideToggle } from '@ngstarter-ui/components/slide-toggle';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorNestedBlocks } from '../nested-blocks/nested-blocks';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorText, ContentEditorToggleContent, ContentEditorToggleSettings } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-toggle-block',\n imports: [ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle, SlideToggle, ContentEditorNestedBlocks, ContentEditorContentEditableDirective],\n templateUrl: './toggle-block.html', styleUrl: './toggle-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorToggleBlock extends ContentEditorBlockBase<ContentEditorToggleContent, ContentEditorToggleSettings> {\n changeTitle(title: ContentEditorText): void { this.save({ ...this.latestContent(), title }); }\n changeExpanded(expanded: boolean): void { this.save(this.latestContent(), { ...this.settings(), expanded }); }\n}\n","<ngs-expansion-panel [expanded]=\"true\">\n <ngs-expansion-panel-header><ngs-expansion-panel-title>\n <div [ngsContentEditorContentEditable]=\"content().title\" (contentChanged)=\"changeTitle($event)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\" data-empty-placeholder=\"Toggle title…\"></div>\n </ngs-expansion-panel-title></ngs-expansion-panel-header>\n <div class=\"flex flex-col gap-3 py-3\">\n <ngs-slide-toggle [checked]=\"settings().expanded\" (change)=\"changeExpanded($event.checked)\">Expanded by default</ngs-slide-toggle>\n <ngs-content-editor-nested-blocks [scope]=\"{parentId: id()}\"/>\n </div>\n</ngs-expansion-panel>\n"],"names":[],"mappings":";;;;;;;;AAaM,MAAO,wBAAyB,SAAQ,sBAA+E,CAAA;AAC3H,IAAA,WAAW,CAAC,KAAwB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7F,cAAc,CAAC,QAAiB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAA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,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,gGAAE,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGvI,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,yBAAyB,EAAE,qCAAqC,CAAC,EAAA,eAAA,EAC7D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,0pBAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs","sources":["../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.ts","../../../projects/components/content-editor/src/_builder/toggle-block/toggle-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle } from '@ngstarter-ui/components/expansion';\nimport { SlideToggle } from '@ngstarter-ui/components/slide-toggle';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorNestedBlocks } from '../nested-blocks/nested-blocks';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorText, ContentEditorToggleContent, ContentEditorToggleSettings } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-toggle-block',\n imports: [ExpansionPanel, ExpansionPanelHeader, ExpansionPanelTitle, SlideToggle, ContentEditorNestedBlocks, ContentEditorContentEditableDirective],\n templateUrl: './toggle-block.html', styleUrl: './toggle-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorToggleBlock extends ContentEditorBlockBase<ContentEditorToggleContent, ContentEditorToggleSettings> {\n changeTitle(title: ContentEditorText): void { this.save({ ...this.latestContent(), title }); }\n changeExpanded(expanded: boolean): void { this.save(this.latestContent(), { ...this.settings(), expanded }); }\n}\n","<ngs-expansion-panel [expanded]=\"true\">\n <ngs-expansion-panel-header><ngs-expansion-panel-title>\n <div [ngsContentEditorContentEditable]=\"content().title\" (contentChanged)=\"changeTitle($event)\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\" data-empty-placeholder=\"Toggle title…\"></div>\n </ngs-expansion-panel-title></ngs-expansion-panel-header>\n <div class=\"flex flex-col gap-3 py-3\">\n <ngs-slide-toggle [checked]=\"settings().expanded\" (change)=\"changeExpanded($event.checked)\">Expanded by default</ngs-slide-toggle>\n <ngs-content-editor-nested-blocks [scope]=\"{parentId: id()}\"/>\n </div>\n</ngs-expansion-panel>\n"],"names":[],"mappings":";;;;;;;AAaM,MAAO,wBAAyB,SAAQ,sBAA+E,CAAA;AAC3H,IAAA,WAAW,CAAC,KAAwB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7F,cAAc,CAAC,QAAiB,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;uGAFlG,wBAAwB,EAAA,IAAA,EAAA,I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AAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,gGAAE,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGvI,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,WAClC,CAAC,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,yBAAyB,EAAE,qCAAqC,CAAC,EAAA,eAAA,EAC7D,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,srBAAA,EAAA,MAAA,EAAA,CAAA,0pBAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,19 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { Alert } from '@ngstarter-ui/components/alert';
4
+ import { Button } from '@ngstarter-ui/components/button';
5
+ import { ProgressBar } from '@ngstarter-ui/components/progress-bar';
6
+
7
+ class ContentEditorUploadStatus {
8
+ task = input.required(/* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "task" }] : /* istanbul ignore next */ []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorUploadStatus, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorUploadStatus, isStandalone: true, selector: "ngs-content-editor-upload-status", inputs: { task: { classPropertyName: "task", publicName: "task", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (task().uploading()) {\n <div class=\"flex flex-col gap-2\" role=\"status\" aria-live=\"polite\">\n <ngs-progress-bar [mode]=\"task().progress() === null ? 'indeterminate' : 'determinate'\" [value]=\"task().progress() ?? 0\"/>\n <div class=\"flex items-center justify-between gap-3\">\n <span class=\"text-sm\">Uploading{{ task().progress() === null ? '\u2026' : ' ' + task().progress()!.toFixed(0) + '%' }}</span>\n <button ngsButton type=\"button\" (click)=\"task().cancel()\">Cancel upload</button>\n </div>\n </div>\n}\n@if (task().error()) {\n <ngs-alert variant=\"negative\">\n <div class=\"flex flex-wrap items-center justify-between gap-3\">\n <span>{{ task().error() }}</span>\n @if (task().canRetry()) { <button ngsButton type=\"button\" (click)=\"task().retry()\">Retry upload</button> }\n </div>\n </ngs-alert>\n}\n", dependencies: [{ kind: "component", type: Alert, selector: "ngs-alert", inputs: ["autoClose", "bordered", "variant"], outputs: ["closed"], exportAs: ["ngsAlert"] }, { 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: ProgressBar, selector: "ngs-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["ngsProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorUploadStatus, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'ngs-content-editor-upload-status', imports: [Alert, Button, ProgressBar], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (task().uploading()) {\n <div class=\"flex flex-col gap-2\" role=\"status\" aria-live=\"polite\">\n <ngs-progress-bar [mode]=\"task().progress() === null ? 'indeterminate' : 'determinate'\" [value]=\"task().progress() ?? 0\"/>\n <div class=\"flex items-center justify-between gap-3\">\n <span class=\"text-sm\">Uploading{{ task().progress() === null ? '\u2026' : ' ' + task().progress()!.toFixed(0) + '%' }}</span>\n <button ngsButton type=\"button\" (click)=\"task().cancel()\">Cancel upload</button>\n </div>\n </div>\n}\n@if (task().error()) {\n <ngs-alert variant=\"negative\">\n <div class=\"flex flex-wrap items-center justify-between gap-3\">\n <span>{{ task().error() }}</span>\n @if (task().canRetry()) { <button ngsButton type=\"button\" (click)=\"task().retry()\">Retry upload</button> }\n </div>\n </ngs-alert>\n}\n" }]
16
+ }], propDecorators: { task: [{ type: i0.Input, args: [{ isSignal: true, alias: "task", required: true }] }] } });
17
+
18
+ export { ContentEditorUploadStatus as C };
19
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs","sources":["../../../projects/components/content-editor/src/_builder/upload-status/upload-status.ts","../../../projects/components/content-editor/src/_builder/upload-status/upload-status.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { Alert } from '@ngstarter-ui/components/alert';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { ProgressBar } from '@ngstarter-ui/components/progress-bar';\nimport { ContentEditorUploadTask } from '../../upload-task';\n\n@Component({\n selector: 'ngs-content-editor-upload-status',\n imports: [Alert, Button, ProgressBar],\n templateUrl: './upload-status.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorUploadStatus { readonly task = input.required<ContentEditorUploadTask>(); }\n","@if (task().uploading()) {\n <div class=\"flex flex-col gap-2\" role=\"status\" aria-live=\"polite\">\n <ngs-progress-bar [mode]=\"task().progress() === null ? 'indeterminate' : 'determinate'\" [value]=\"task().progress() ?? 0\"/>\n <div class=\"flex items-center justify-between gap-3\">\n <span class=\"text-sm\">Uploading{{ task().progress() === null ? '…' : ' ' + task().progress()!.toFixed(0) + '%' }}</span>\n <button ngsButton type=\"button\" (click)=\"task().cancel()\">Cancel upload</button>\n </div>\n </div>\n}\n@if (task().error()) {\n <ngs-alert variant=\"negative\">\n <div class=\"flex flex-wrap items-center justify-between gap-3\">\n <span>{{ task().error() }}</span>\n @if (task().canRetry()) { <button ngsButton type=\"button\" (click)=\"task().retry()\">Retry upload</button> }\n </div>\n </ngs-alert>\n}\n"],"names":[],"mappings":";;;;;;MAYa,yBAAyB,CAAA;IAAY,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAA2B;uGAArF,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,4NCZtC,w2BAiBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDTY,KAAK,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,MAAM,0SAAE,WAAW,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;+BACE,kCAAkC,EAAA,OAAA,EACnC,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,w2BAAA,EAAA;;;;;"}
@@ -0,0 +1,134 @@
1
+ import { f as ContentEditorUploadBlockBase, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
2
+ import { C as ContentEditorUploadStatus } from './ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs';
3
+ import * as i0 from '@angular/core';
4
+ import { signal, model, viewChild, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import { UploadArea, UploadTriggerDirective } from '@ngstarter-ui/components/upload';
6
+ import { FormField, Label } from '@ngstarter-ui/components/form-field';
7
+ import { Input } from '@ngstarter-ui/components/input';
8
+ import * as i1 from '@angular/forms';
9
+ import { FormsModule } from '@angular/forms';
10
+ import { ResizableContainer } from '@ngstarter-ui/components/resizable-container';
11
+
12
+ class VideoBlockComponent extends ContentEditorUploadBlockBase {
13
+ _src = signal('', /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "_src" }] : /* istanbul ignore next */ []));
15
+ _caption = model('', /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "_caption" }] : /* istanbul ignore next */ []));
17
+ _orientation = signal('landscape', /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "_orientation" }] : /* istanbul ignore next */ []));
19
+ _settings = model({}, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "_settings" }] : /* istanbul ignore next */ []));
21
+ videoElement = viewChild('videoPlayer', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "videoElement" }] : /* istanbul ignore next */ []));
23
+ _aspectRatio = 16 / 9;
24
+ constructor() {
25
+ super();
26
+ effect(() => {
27
+ const content = this.content();
28
+ const settings = this.settings();
29
+ untracked(() => {
30
+ this._src.set(content.src);
31
+ this._caption.set(content.caption);
32
+ this._orientation.set(content.orientation || 'landscape');
33
+ this._settings.set({ ...settings });
34
+ });
35
+ });
36
+ }
37
+ ngOnInit() {
38
+ this._src.set(this.content().src);
39
+ this._caption.set(this.content().caption);
40
+ this._orientation.set(this.content().orientation || 'landscape');
41
+ this._settings.set(this.settings() || {});
42
+ }
43
+ focus() {
44
+ if (this._src()) {
45
+ this.builder.focusBlock(this.id());
46
+ }
47
+ }
48
+ getData() {
49
+ return {
50
+ content: {
51
+ src: this._src(),
52
+ caption: this._caption(),
53
+ orientation: this._orientation()
54
+ },
55
+ settings: {
56
+ ...this._settings(),
57
+ }
58
+ };
59
+ }
60
+ isEmpty() {
61
+ const src = this.getData().content.src;
62
+ return typeof src === 'string' ? src.trim().length === 0 : !src;
63
+ }
64
+ onFileSelected(event) {
65
+ return this.uploadFiles('video', { files: event.files.slice(0, 1), accept: file => file.type.startsWith('video/'), apply: results => {
66
+ this._src.set(results[0].url);
67
+ this.update();
68
+ } });
69
+ }
70
+ _onCaptionChange() {
71
+ this.update();
72
+ }
73
+ _onVideoResized(event) {
74
+ let width = event.width;
75
+ if (width > 704) {
76
+ width = 704;
77
+ }
78
+ const height = Math.round(width / this._aspectRatio);
79
+ this._settings.update(s => ({
80
+ ...s,
81
+ width,
82
+ height
83
+ }));
84
+ this.update();
85
+ }
86
+ _onVideoLoaded(event) {
87
+ const video = event.target;
88
+ this._aspectRatio = video.videoWidth / video.videoHeight;
89
+ }
90
+ handleKeyPress(event) {
91
+ if (event.key === 'Enter') {
92
+ event.preventDefault();
93
+ event.stopPropagation();
94
+ this.builder.insertEmptyBlock(this.index());
95
+ }
96
+ }
97
+ update() {
98
+ this.store.updateBlock(this.id(), { ...this.getData(), isEmpty: this.isEmpty() });
99
+ this.builder.emitContentChangeEvent();
100
+ }
101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: VideoBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
102
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: VideoBlockComponent, isStandalone: true, selector: "ngs-video-block", inputs: { _caption: { classPropertyName: "_caption", publicName: "_caption", isSignal: true, isRequired: false, transformFunction: null }, _settings: { classPropertyName: "_settings", publicName: "_settings", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { _caption: "_captionChange", _settings: "_settingsChange" }, host: { listeners: { "keypress": "handleKeyPress($event)" }, classAttribute: "block" }, providers: [
103
+ {
104
+ provide: CONTENT_EDITOR_BLOCK,
105
+ useExisting: forwardRef(() => VideoBlockComponent),
106
+ multi: true
107
+ }
108
+ ], viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["videoPlayer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n@if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else if (!uploading()) {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n", styles: [":host{display:block}:host ngs-upload-area{--ngs-upload-area-padding: calc(var(--spacing, .25rem) * 6) calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: ContentEditorUploadStatus, selector: "ngs-content-editor-upload-status", inputs: ["task"] }, { kind: "component", type: UploadArea, selector: "ngs-upload-area", inputs: ["accept", "allowHover", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadArea"] }, { kind: "directive", type: UploadTriggerDirective, selector: "[ngsUploadTrigger]", inputs: ["accept", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadTrigger"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "component", type: ResizableContainer, selector: "ngs-resizable-container", inputs: ["minWidth"], outputs: ["resized"], exportAs: ["ngsResizableContainer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: VideoBlockComponent, decorators: [{
111
+ type: Component,
112
+ args: [{ selector: 'ngs-video-block', imports: [
113
+ ContentEditorUploadStatus,
114
+ UploadArea,
115
+ UploadTriggerDirective,
116
+ FormField,
117
+ Input,
118
+ FormsModule,
119
+ Label,
120
+ ResizableContainer
121
+ ], providers: [
122
+ {
123
+ provide: CONTENT_EDITOR_BLOCK,
124
+ useExisting: forwardRef(() => VideoBlockComponent),
125
+ multi: true
126
+ }
127
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
128
+ '(keypress)': 'handleKeyPress($event)',
129
+ 'class': 'block'
130
+ }, template: "<ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n@if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else if (!uploading()) {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n", styles: [":host{display:block}:host ngs-upload-area{--ngs-upload-area-padding: calc(var(--spacing, .25rem) * 6) calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
131
+ }], ctorParameters: () => [], propDecorators: { _caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "_caption", required: false }] }, { type: i0.Output, args: ["_captionChange"] }], _settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "_settings", required: false }] }, { type: i0.Output, args: ["_settingsChange"] }], videoElement: [{ type: i0.ViewChild, args: ['videoPlayer', { isSignal: true }] }] } });
132
+
133
+ export { VideoBlockComponent };
134
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs","sources":["../../../projects/components/content-editor/src/_builder/video-block/video-block.component.ts","../../../projects/components/content-editor/src/_builder/video-block/video-block.component.html"],"sourcesContent":["import { ContentEditorUploadBlockBase } from '../upload-block-base';\nimport { ContentEditorUploadStatus } from '../upload-status/upload-status';\nimport { ChangeDetectionStrategy, Component, effect, untracked, forwardRef, model, OnInit, signal, viewChild, ElementRef } from '@angular/core';\nimport { UploadArea, UploadFileSelectedEvent, UploadTriggerDirective } from '@ngstarter-ui/components/upload';\nimport {\n CONTENT_EDITOR_BLOCK,\n ContentEditorVideoBlockSettings,\n ContentEditorVideoContent\n} from '../../types';\nimport { FormField, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { FormsModule } from '@angular/forms';\nimport { ResizableContainer } from '@ngstarter-ui/components/resizable-container';\n\n@Component({\n selector: 'ngs-video-block',\n imports: [\n ContentEditorUploadStatus,\n UploadArea,\n UploadTriggerDirective,\n FormField,\n Input,\n FormsModule,\n Label,\n ResizableContainer\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => VideoBlockComponent),\n multi: true\n }\n ],\n templateUrl: './video-block.component.html',\n styleUrl: './video-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keypress)': 'handleKeyPress($event)',\n 'class': 'block'\n }\n})\nexport class VideoBlockComponent extends ContentEditorUploadBlockBase<ContentEditorVideoContent, ContentEditorVideoBlockSettings> implements OnInit {\n\n protected _src = signal<string>('');\n protected _caption = model<string>('');\n protected _orientation = signal<'portrait' | 'landscape'>('landscape');\n protected _settings = model<ContentEditorVideoBlockSettings>({});\n\n readonly videoElement = viewChild<ElementRef<HTMLVideoElement>>('videoPlayer');\n\n private _aspectRatio = 16 / 9;\n\n constructor() {\n super();\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n this._src.set(content.src);\n this._caption.set(content.caption);\n this._orientation.set(content.orientation || 'landscape');\n this._settings.set({ ...settings });\n });\n });\n }\n\n ngOnInit() {\n this._src.set(this.content().src);\n this._caption.set(this.content().caption);\n this._orientation.set(this.content().orientation || 'landscape');\n this._settings.set(this.settings() || {});\n }\n\n override focus() {\n if (this._src()) {\n this.builder.focusBlock(this.id());\n }\n }\n\n override getData(): any {\n return {\n content: {\n src: this._src(),\n caption: this._caption(),\n orientation: this._orientation()\n },\n settings: {\n ...this._settings(),\n }\n };\n }\n\n override isEmpty(): boolean {\n const src = this.getData().content.src;\n return typeof src === 'string' ? src.trim().length === 0 : !src;\n }\n\n protected onFileSelected(event: UploadFileSelectedEvent): Promise<void> {\n return this.uploadFiles('video', { files: event.files.slice(0, 1), accept: file => file.type.startsWith('video/'), apply: results => {\n this._src.set(results[0].url);\n this.update();\n } });\n }\n\n protected _onCaptionChange() {\n this.update();\n }\n\n protected _onVideoResized(event: { width: number }) {\n let width = event.width;\n if (width > 704) {\n width = 704;\n }\n const height = Math.round(width / this._aspectRatio);\n\n this._settings.update(s => ({\n ...s,\n width,\n height\n }));\n\n this.update();\n }\n\n protected _onVideoLoaded(event: any) {\n const video = event.target as HTMLVideoElement;\n this._aspectRatio = video.videoWidth / video.videoHeight;\n }\n\n protected handleKeyPress(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.builder.insertEmptyBlock(this.index());\n }\n }\n\n private update() {\n this.store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this.builder.emitContentChangeEvent();\n }\n}\n","<ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n@if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else if (!uploading()) {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAyCM,MAAO,mBAAoB,SAAQ,4BAAwF,CAAA;IAErH,IAAI,GAAG,MAAM,CAAS,EAAE;6EAAC;IACzB,QAAQ,GAAG,KAAK,CAAS,EAAE;iFAAC;IAC5B,YAAY,GAAG,MAAM,CAA2B,WAAW;qFAAC;IAC5D,SAAS,GAAG,KAAK,CAAkC,EAAE;kFAAC;IAEvD,YAAY,GAAG,SAAS,CAA+B,aAAa;qFAAC;AAEtE,IAAA,YAAY,GAAG,EAAE,GAAG,CAAC;AAE7B,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QACP,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,OAAO,GAAG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AA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,YAAY,EAAE,wBAAwB;AACtC,wBAAA,OAAO,EAAE;AACV,qBAAA,EAAA,QAAA,EAAA,01CAAA,EAAA,MAAA,EAAA,CAAA,+MAAA,CAAA,EAAA;qYAS+D,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -1,2 +1,2 @@
1
- export { B as BlockSelectionDirective, a as CONTENT_BUILDER, e as CONTENT_EDITOR_BLOCK, o as CONTENT_EDITOR_BLOCK_RENDERERS, p as CONTENT_EDITOR_CALLOUT_HTML_STYLES, q as CONTENT_EDITOR_CONFIG, s as CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS, t as CONTENT_EDITOR_DEFAULT_RENDERERS, u as CONTENT_EDITOR_GALLERY_HTML_STYLES, v as CONTENT_EDITOR_GRID_HTML_STYLES, w as CommandBarComponent, x as ContentBuilderComponent, y as ContentEditorAttachmentRenderer, z as ContentEditorCalloutRenderer, A as ContentEditorCodeRenderer, D as ContentEditorDividerRenderer, E as ContentEditorEmbedRenderer, F as ContentEditorGalleryRenderer, G as ContentEditorGridRenderer, H as ContentEditorHeadingRenderer, I as ContentEditorHtmlSerializer, J as ContentEditorImageRenderer, K as ContentEditorImportError, L as ContentEditorImporter, M as ContentEditorListRenderer, N as ContentEditorParagraphRenderer, O as ContentEditorQuoteRenderer, P as ContentEditorRenderer, Q as ContentEditorTableRenderer, R as ContentEditorToggleRenderer, S as ContentEditorVideoRenderer, T as TextSelectionPopupDirective, c as cloneContentEditorValue, U as contentEditorAttachmentToHtml, V as contentEditorBlockToHtml, l as contentEditorBlockView, W as contentEditorCalloutToHtml, m as contentEditorChildCollections, X as contentEditorCodeToHtml, k as contentEditorCollection, Y as contentEditorDividerToHtml, Z as contentEditorEmbedToHtml, _ as contentEditorFromHtml, $ as contentEditorFromJson, a0 as contentEditorGalleryToHtml, a1 as contentEditorGridToHtml, a2 as contentEditorHeadingToHtml, a3 as contentEditorImageToHtml, a4 as contentEditorListToHtml, a5 as contentEditorNativeBlock, a6 as contentEditorParagraphToHtml, a7 as contentEditorQuoteToHtml, a8 as contentEditorTableToHtml, b as contentEditorText, a9 as contentEditorToHtml, aa as contentEditorToggleToHtml, ab as contentEditorVideoToHtml, h as findContentEditorBlock, n as isContentEditorBlockEmpty, ac as mergeContentEditorConfig, ad as provideContentEditor, ae as provideContentEditorConfig, af as provideContentEditorRenderer, ag as provideContentEditorRenderers, ah as replaceContentEditorCollection } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs';
1
+ export { B as BlockSelectionDirective, a as CONTENT_BUILDER, e as CONTENT_EDITOR_BLOCK, p as CONTENT_EDITOR_BLOCK_RENDERERS, q as CONTENT_EDITOR_CALLOUT_HTML_STYLES, r as CONTENT_EDITOR_CONFIG, s as CONTENT_EDITOR_CONVERTIBLE_BLOCKS, t as CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS, u as CONTENT_EDITOR_DEFAULT_RENDERERS, v as CONTENT_EDITOR_GALLERY_HTML_STYLES, w as CONTENT_EDITOR_GRID_HTML_STYLES, x as CONTENT_EDITOR_RENDER_CONFIG, y as CommandBarComponent, z as ContentBuilderComponent, A as ContentEditorAttachmentRenderer, g as ContentEditorBlockBase, D as ContentEditorCalloutRenderer, E as ContentEditorCodeRenderer, F as ContentEditorDividerRenderer, G as ContentEditorDraftController, H as ContentEditorEmbedRenderer, I as ContentEditorGalleryRenderer, J as ContentEditorGridRenderer, K as ContentEditorHeadingRenderer, L as ContentEditorHtmlSerializer, M as ContentEditorImageRenderer, N as ContentEditorImportError, O as ContentEditorImporter, P as ContentEditorListRenderer, Q as ContentEditorParagraphRenderer, R as ContentEditorQuoteRenderer, S as ContentEditorRenderer, T as ContentEditorRendererBase, U as ContentEditorTableRenderer, V as ContentEditorToggleRenderer, f as ContentEditorUploadBlockBase, W as ContentEditorUploadTask, X as ContentEditorVideoRenderer, Y as TextSelectionPopupDirective, c as cloneContentEditorValue, Z as contentEditorAttachmentToHtml, _ as contentEditorBlockScope, $ as contentEditorBlockToHtml, n as contentEditorBlockView, a0 as contentEditorCalloutToHtml, o as contentEditorChildCollections, a1 as contentEditorCodeToHtml, m as contentEditorCollection, a2 as contentEditorConvertBlock, a3 as contentEditorCopyBlocks, a4 as contentEditorDividerToHtml, a5 as contentEditorEmbedToHtml, h as contentEditorFileSize, a6 as contentEditorFromHtml, a7 as contentEditorFromJson, a8 as contentEditorGalleryToHtml, a9 as contentEditorGridToHtml, aa as contentEditorHeadingToHtml, ab as contentEditorImageToHtml, ac as contentEditorListToHtml, ad as contentEditorNativeBlock, ae as contentEditorParagraphToHtml, af as contentEditorQuoteToHtml, i as contentEditorResourceUrl, ag as contentEditorSliceText, ah as contentEditorTableToHtml, b as contentEditorText, ai as contentEditorToHtml, aj as contentEditorToggleToHtml, ak as contentEditorVideoToHtml, k as findContentEditorBlock, al as isContentEditorBlockEmpty, am as mergeContentEditorConfig, an as provideContentEditor, ao as provideContentEditorConfig, ap as provideContentEditorRenderer, aq as provideContentEditorRenderers, ar as readContentEditorFile, as as replaceContentEditorCollection } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
2
2
  //# sourceMappingURL=ngstarter-ui-components-content-editor.mjs.map
@@ -1471,6 +1471,51 @@ function getNgsThemePresetCssText(preset = 'default', colorScheme = 'light') {
1471
1471
  .join('\n');
1472
1472
  }
1473
1473
 
1474
+ /** Mirrors NgStarter tokens into a detached overlay and follows ancestor theme changes. */
1475
+ function bindNgsOverlayTheme(source, target) {
1476
+ const view = source.ownerDocument.defaultView;
1477
+ if (!view || target.contains(source))
1478
+ return () => { };
1479
+ const previous = new Map();
1480
+ const apply = () => {
1481
+ const styles = view.getComputedStyle(source);
1482
+ const current = new Set();
1483
+ for (let index = 0; index < styles.length; index++) {
1484
+ const name = styles.item(index);
1485
+ if (!name.startsWith('--ngs-'))
1486
+ continue;
1487
+ current.add(name);
1488
+ if (!previous.has(name))
1489
+ previous.set(name, target.style.getPropertyValue(name));
1490
+ target.style.setProperty(name, styles.getPropertyValue(name));
1491
+ }
1492
+ for (const [name, value] of previous)
1493
+ if (!current.has(name)) {
1494
+ if (value)
1495
+ target.style.setProperty(name, value);
1496
+ else
1497
+ target.style.removeProperty(name);
1498
+ }
1499
+ };
1500
+ apply();
1501
+ const observer = new MutationObserver(apply);
1502
+ for (let ancestor = source; ancestor; ancestor = ancestor.parentElement) {
1503
+ observer.observe(ancestor, { attributes: true, attributeFilter: ['style', 'class', 'data-ngs-theme', 'data-ngs-color-scheme', 'data-ngs-density', 'data-ngs-radius'] });
1504
+ }
1505
+ const media = view.matchMedia('(prefers-color-scheme: dark)');
1506
+ media.addEventListener('change', apply);
1507
+ return () => {
1508
+ observer.disconnect();
1509
+ media.removeEventListener('change', apply);
1510
+ for (const [name, value] of previous) {
1511
+ if (value)
1512
+ target.style.setProperty(name, value);
1513
+ else
1514
+ target.style.removeProperty(name);
1515
+ }
1516
+ };
1517
+ }
1518
+
1474
1519
  /** Provider for managing the error state of a form control. */
1475
1520
  class ErrorStateMatcher {
1476
1521
  /**
@@ -1529,5 +1574,5 @@ function typedFromEvent(target, event, options) {
1529
1574
  * Generated bundle index. Do not edit.
1530
1575
  */
1531
1576
 
1532
- export { AUTOFOCUSABLE, AnalyticsService, AutoFocusDirective, DebounceTimeDirective, ENVIRONMENT, EnvironmentService, ErrorStateMatcher, FilterByPropertyPipe, FocusElementDirective, FormatFileSizePipe, GlobalStore, InactivityTrackerService, InitialsPipe, MutationObserverService, NGS_THEME_COLOR_PRESETS, NGS_THEME_COLOR_PRESET_IDS, NGS_THEME_OPTIONS, NGS_THEME_PRESET_PROPERTY_NAMES, OrderByPipe, PageTitleStrategyService, RIPPLE_GLOBAL_OPTIONS, ResizeObserverService, Ripple, RippleRef, RippleRenderer, RippleState, SafeHtmlPipe, SafeResourceUrlPipe, ScreenLoaderService, SearchByPropertyPipe, SeoService, ShowOnDirtyErrorStateMatcher, SoundEffectDirective, TextareaAutoSize, ThemeManagerService, arrayShallowEquals, defaultRippleAnimationConfig, getActualTarget, getNgsThemePreset, getNgsThemePresetCssText, getNgsThemePresetProperties, injectElement, isElement, provideNgsTheme, px, typedFromEvent, zonefreeScheduler };
1577
+ export { AUTOFOCUSABLE, AnalyticsService, AutoFocusDirective, DebounceTimeDirective, ENVIRONMENT, EnvironmentService, ErrorStateMatcher, FilterByPropertyPipe, FocusElementDirective, FormatFileSizePipe, GlobalStore, InactivityTrackerService, InitialsPipe, MutationObserverService, NGS_THEME_COLOR_PRESETS, NGS_THEME_COLOR_PRESET_IDS, NGS_THEME_OPTIONS, NGS_THEME_PRESET_PROPERTY_NAMES, OrderByPipe, PageTitleStrategyService, RIPPLE_GLOBAL_OPTIONS, ResizeObserverService, Ripple, RippleRef, RippleRenderer, RippleState, SafeHtmlPipe, SafeResourceUrlPipe, ScreenLoaderService, SearchByPropertyPipe, SeoService, ShowOnDirtyErrorStateMatcher, SoundEffectDirective, TextareaAutoSize, ThemeManagerService, arrayShallowEquals, bindNgsOverlayTheme, defaultRippleAnimationConfig, getActualTarget, getNgsThemePreset, getNgsThemePresetCssText, getNgsThemePresetProperties, injectElement, isElement, provideNgsTheme, px, typedFromEvent, zonefreeScheduler };
1533
1578
  //# sourceMappingURL=ngstarter-ui-components-core.mjs.map