@daffodil/design 0.90.0 → 0.92.3-rc.0

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 (277) hide show
  1. package/accordion/README.md +26 -38
  2. package/accordion/index.d.ts +9 -6
  3. package/article/README.md +66 -46
  4. package/article/index.d.ts +41 -0
  5. package/article/src/article-theme.scss +22 -0
  6. package/breadcrumb/README.md +6 -1
  7. package/breadcrumb/index.d.ts +65 -11
  8. package/breadcrumb/src/breadcrumb-theme.scss +1 -1
  9. package/button/README.md +36 -33
  10. package/button/index.d.ts +27 -6
  11. package/button/src/button/basic/button-theme.scss +4 -2
  12. package/button/src/button/button-base.scss +29 -6
  13. package/button/src/button/icon/icon-theme.scss +10 -6
  14. package/button/src/button/raised/raised-theme.scss +6 -4
  15. package/callout/README.md +15 -27
  16. package/card/README.md +36 -69
  17. package/card/index.d.ts +7 -41
  18. package/card/src/card-base-theme.scss +2 -5
  19. package/card/src/card-base.scss +2 -2
  20. package/checkbox/README.md +0 -0
  21. package/checkbox/index.d.ts +177 -0
  22. package/container/README.md +18 -23
  23. package/fesm2022/daffodil-design-accordion.mjs +34 -25
  24. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  25. package/fesm2022/daffodil-design-article.mjs +283 -17
  26. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  27. package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
  28. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  29. package/fesm2022/daffodil-design-button.mjs +90 -45
  30. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  31. package/fesm2022/daffodil-design-callout.mjs +23 -23
  32. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  33. package/fesm2022/daffodil-design-card.mjs +43 -90
  34. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  35. package/fesm2022/daffodil-design-checkbox.mjs +317 -0
  36. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -0
  37. package/fesm2022/daffodil-design-container.mjs +8 -8
  38. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  39. package/fesm2022/daffodil-design-form-field.mjs +56 -86
  40. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  41. package/fesm2022/daffodil-design-form.mjs +62 -0
  42. package/fesm2022/daffodil-design-form.mjs.map +1 -0
  43. package/fesm2022/daffodil-design-hero.mjs +23 -23
  44. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  45. package/fesm2022/daffodil-design-image.mjs +19 -11
  46. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  47. package/fesm2022/daffodil-design-input.mjs +18 -14
  48. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  49. package/fesm2022/daffodil-design-link-set.mjs +25 -17
  50. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  51. package/fesm2022/daffodil-design-list.mjs +16 -16
  52. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  53. package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
  54. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  55. package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
  56. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  57. package/fesm2022/daffodil-design-menu.mjs +223 -60
  58. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  59. package/fesm2022/daffodil-design-modal.mjs +86 -83
  60. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  61. package/fesm2022/daffodil-design-native-select.mjs +47 -41
  62. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  63. package/fesm2022/daffodil-design-navbar.mjs +25 -21
  64. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-notification.mjs +28 -64
  66. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-paginator.mjs +11 -16
  68. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
  70. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-quantity-field.mjs +19 -18
  72. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-radio.mjs +27 -56
  74. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-select.mjs +6 -6
  76. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  77. package/fesm2022/daffodil-design-sidebar.mjs +30 -60
  78. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  79. package/fesm2022/daffodil-design-spinner.mjs +99 -0
  80. package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
  81. package/fesm2022/daffodil-design-switch.mjs +49 -106
  82. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  83. package/fesm2022/daffodil-design-tabs.mjs +35 -27
  84. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  85. package/fesm2022/daffodil-design-tag.mjs +7 -7
  86. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  87. package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
  88. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  89. package/fesm2022/daffodil-design-textarea.mjs +6 -3
  90. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  91. package/fesm2022/daffodil-design-toast.mjs +79 -80
  92. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  93. package/fesm2022/daffodil-design-tree.mjs +152 -112
  94. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  95. package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
  96. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  97. package/fesm2022/daffodil-design.mjs +559 -711
  98. package/fesm2022/daffodil-design.mjs.map +1 -1
  99. package/form/README.md +75 -0
  100. package/form/index.d.ts +27 -0
  101. package/form-field/README.md +74 -99
  102. package/form-field/index.d.ts +64 -42
  103. package/hero/README.md +5 -5
  104. package/image/README.md +27 -19
  105. package/image/index.d.ts +6 -1
  106. package/index.d.ts +282 -447
  107. package/input/README.md +36 -16
  108. package/input/index.d.ts +4 -3
  109. package/link-set/index.d.ts +9 -1
  110. package/list/README.md +2 -2
  111. package/loading-icon/README.md +1 -1
  112. package/loading-icon/index.d.ts +1 -1
  113. package/media-gallery/README.md +3 -3
  114. package/menu/README.md +107 -10
  115. package/menu/index.d.ts +143 -11
  116. package/modal/README.md +107 -17
  117. package/modal/index.d.ts +72 -35
  118. package/native-select/README.md +52 -15
  119. package/native-select/index.d.ts +8 -7
  120. package/navbar/README.md +23 -17
  121. package/navbar/index.d.ts +12 -2
  122. package/navbar/src/navbar-theme.scss +4 -46
  123. package/notification/README.md +4 -4
  124. package/notification/index.d.ts +7 -38
  125. package/package.json +1 -1
  126. package/paginator/README.md +42 -6
  127. package/paginator/index.d.ts +5 -9
  128. package/progress-bar/README.md +3 -3
  129. package/quantity-field/README.md +4 -4
  130. package/quantity-field/index.d.ts +4 -1
  131. package/radio/README.md +1 -1
  132. package/radio/index.d.ts +0 -16
  133. package/scss/layout/_breakpoint.scss +1 -1
  134. package/scss/theme.scss +9 -5
  135. package/scss/theming/_color-palettes.scss +19 -11
  136. package/scss/theming/_configure-theme.scss +11 -10
  137. package/scss/theming/_daff-theme.scss +5 -14
  138. package/scss/theming/_get-base-color.scss +2 -2
  139. package/scss/theming/_get-palette.scss +2 -2
  140. package/scss/theming/_get-theme-mode.scss +3 -3
  141. package/scss/theming/_index.scss +2 -1
  142. package/scss/theming/contrast/max-contrast/max-contrast.scss +3 -3
  143. package/scss/theming/contrast/text-contrast/text-contrast.scss +22 -16
  144. package/scss/theming/contrast/text-contrast/text-contrast.spec.scss +57 -0
  145. package/scss/theming/create-theme/_create-theme.scss +330 -0
  146. package/scss/theming/create-theme/_create-theme.spec.scss +122 -0
  147. package/scss/theming/create-theme/_index.scss +1 -0
  148. package/scss/theming/get-font-colors/_get-font-colors.scss +36 -0
  149. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +72 -0
  150. package/scss/typography/mixins/_font-weight.scss +8 -14
  151. package/select/README.md +107 -4
  152. package/sidebar/README.md +6 -14
  153. package/sidebar/index.d.ts +3 -15
  154. package/spinner/README.md +57 -0
  155. package/spinner/index.d.ts +53 -0
  156. package/spinner/src/spinner-theme.scss +62 -0
  157. package/switch/README.md +21 -29
  158. package/switch/index.d.ts +18 -48
  159. package/switch/src/switch-theme.scss +26 -18
  160. package/tabs/README.md +1 -1
  161. package/tabs/index.d.ts +8 -5
  162. package/tag/README.md +24 -30
  163. package/tag/index.d.ts +1 -1
  164. package/tag/src/tag-theme.scss +11 -9
  165. package/text-snippet/README.md +1 -1
  166. package/text-snippet/src/text-snippet-theme.scss +12 -0
  167. package/textarea/README.md +36 -6
  168. package/textarea/index.d.ts +4 -4
  169. package/toast/README.md +4 -4
  170. package/tree/README.md +39 -22
  171. package/tree/index.d.ts +57 -96
  172. package/tree/src/tree-theme.scss +0 -4
  173. package/accordion/examples/index.d.ts +0 -20
  174. package/article/examples/index.d.ts +0 -50
  175. package/breadcrumb/examples/index.d.ts +0 -10
  176. package/button/examples/index.d.ts +0 -67
  177. package/callout/examples/index.d.ts +0 -41
  178. package/card/examples/index.d.ts +0 -62
  179. package/card/src/card/raised/raised-theme.scss +0 -28
  180. package/checkbox/examples/index.d.ts +0 -32
  181. package/container/examples/index.d.ts +0 -16
  182. package/fesm2022/daffodil-design-accordion-examples.mjs +0 -50
  183. package/fesm2022/daffodil-design-accordion-examples.mjs.map +0 -1
  184. package/fesm2022/daffodil-design-article-examples.mjs +0 -134
  185. package/fesm2022/daffodil-design-article-examples.mjs.map +0 -1
  186. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +0 -46
  187. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +0 -1
  188. package/fesm2022/daffodil-design-button-examples.mjs +0 -178
  189. package/fesm2022/daffodil-design-button-examples.mjs.map +0 -1
  190. package/fesm2022/daffodil-design-callout-examples.mjs +0 -116
  191. package/fesm2022/daffodil-design-callout-examples.mjs.map +0 -1
  192. package/fesm2022/daffodil-design-card-examples.mjs +0 -168
  193. package/fesm2022/daffodil-design-card-examples.mjs.map +0 -1
  194. package/fesm2022/daffodil-design-checkbox-examples.mjs +0 -76
  195. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +0 -1
  196. package/fesm2022/daffodil-design-container-examples.mjs +0 -41
  197. package/fesm2022/daffodil-design-container-examples.mjs.map +0 -1
  198. package/fesm2022/daffodil-design-form-field-examples.mjs +0 -96
  199. package/fesm2022/daffodil-design-form-field-examples.mjs.map +0 -1
  200. package/fesm2022/daffodil-design-hero-examples.mjs +0 -121
  201. package/fesm2022/daffodil-design-hero-examples.mjs.map +0 -1
  202. package/fesm2022/daffodil-design-image-examples.mjs +0 -58
  203. package/fesm2022/daffodil-design-image-examples.mjs.map +0 -1
  204. package/fesm2022/daffodil-design-input-examples.mjs +0 -108
  205. package/fesm2022/daffodil-design-input-examples.mjs.map +0 -1
  206. package/fesm2022/daffodil-design-list-examples.mjs +0 -77
  207. package/fesm2022/daffodil-design-list-examples.mjs.map +0 -1
  208. package/fesm2022/daffodil-design-loading-icon-examples.mjs +0 -44
  209. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +0 -1
  210. package/fesm2022/daffodil-design-media-gallery-examples.mjs +0 -104
  211. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +0 -1
  212. package/fesm2022/daffodil-design-menu-examples.mjs +0 -50
  213. package/fesm2022/daffodil-design-menu-examples.mjs.map +0 -1
  214. package/fesm2022/daffodil-design-modal-examples.mjs +0 -51
  215. package/fesm2022/daffodil-design-modal-examples.mjs.map +0 -1
  216. package/fesm2022/daffodil-design-native-select-examples.mjs +0 -71
  217. package/fesm2022/daffodil-design-native-select-examples.mjs.map +0 -1
  218. package/fesm2022/daffodil-design-navbar-examples.mjs +0 -88
  219. package/fesm2022/daffodil-design-navbar-examples.mjs.map +0 -1
  220. package/fesm2022/daffodil-design-notification-examples.mjs +0 -102
  221. package/fesm2022/daffodil-design-notification-examples.mjs.map +0 -1
  222. package/fesm2022/daffodil-design-paginator-examples.mjs +0 -59
  223. package/fesm2022/daffodil-design-paginator-examples.mjs.map +0 -1
  224. package/fesm2022/daffodil-design-progress-bar-examples.mjs +0 -57
  225. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +0 -1
  226. package/fesm2022/daffodil-design-quantity-field-examples.mjs +0 -85
  227. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +0 -1
  228. package/fesm2022/daffodil-design-radio-examples.mjs +0 -34
  229. package/fesm2022/daffodil-design-radio-examples.mjs.map +0 -1
  230. package/fesm2022/daffodil-design-select-examples.mjs +0 -117
  231. package/fesm2022/daffodil-design-select-examples.mjs.map +0 -1
  232. package/fesm2022/daffodil-design-sidebar-examples.mjs +0 -109
  233. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +0 -1
  234. package/fesm2022/daffodil-design-sticky-examples.mjs +0 -25
  235. package/fesm2022/daffodil-design-sticky-examples.mjs.map +0 -1
  236. package/fesm2022/daffodil-design-switch-examples.mjs +0 -110
  237. package/fesm2022/daffodil-design-switch-examples.mjs.map +0 -1
  238. package/fesm2022/daffodil-design-tabs-examples.mjs +0 -115
  239. package/fesm2022/daffodil-design-tabs-examples.mjs.map +0 -1
  240. package/fesm2022/daffodil-design-tag-examples.mjs +0 -125
  241. package/fesm2022/daffodil-design-tag-examples.mjs.map +0 -1
  242. package/fesm2022/daffodil-design-text-snippet-examples.mjs +0 -25
  243. package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +0 -1
  244. package/fesm2022/daffodil-design-textarea-examples.mjs +0 -66
  245. package/fesm2022/daffodil-design-textarea-examples.mjs.map +0 -1
  246. package/fesm2022/daffodil-design-toast-examples.mjs +0 -147
  247. package/fesm2022/daffodil-design-toast-examples.mjs.map +0 -1
  248. package/fesm2022/daffodil-design-tree-examples.mjs +0 -104
  249. package/fesm2022/daffodil-design-tree-examples.mjs.map +0 -1
  250. package/form-field/examples/index.d.ts +0 -18
  251. package/hero/examples/index.d.ts +0 -45
  252. package/image/examples/index.d.ts +0 -10
  253. package/input/examples/index.d.ts +0 -10
  254. package/list/examples/index.d.ts +0 -29
  255. package/loading-icon/examples/index.d.ts +0 -16
  256. package/media-gallery/examples/index.d.ts +0 -38
  257. package/menu/examples/index.d.ts +0 -20
  258. package/modal/examples/index.d.ts +0 -15
  259. package/native-select/examples/index.d.ts +0 -10
  260. package/navbar/examples/index.d.ts +0 -31
  261. package/notification/examples/index.d.ts +0 -12
  262. package/paginator/examples/index.d.ts +0 -26
  263. package/progress-bar/examples/index.d.ts +0 -10
  264. package/quantity-field/examples/index.d.ts +0 -30
  265. package/radio/examples/index.d.ts +0 -13
  266. package/select/examples/index.d.ts +0 -28
  267. package/sidebar/examples/index.d.ts +0 -10
  268. package/sticky/examples/index.d.ts +0 -10
  269. package/switch/examples/index.d.ts +0 -46
  270. package/tabs/examples/index.d.ts +0 -12
  271. package/tag/examples/index.d.ts +0 -50
  272. package/text-snippet/examples/index.d.ts +0 -10
  273. package/textarea/examples/index.d.ts +0 -10
  274. package/toast/examples/index.d.ts +0 -56
  275. package/tree/examples/index.d.ts +0 -18
  276. /package/{form-field → form}/src/error-message/error-message-theme.scss +0 -0
  277. /package/{form-field → form}/src/hint/hint-theme.scss +0 -0
@@ -1,29 +1,295 @@
1
- import { CommonModule } from '@angular/common';
1
+ import { DOCUMENT, isPlatformBrowser, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, NgModule } from '@angular/core';
3
+ import { input, signal, inject, NgZone, ChangeDetectionStrategy, Component, Injectable, PLATFORM_ID, ElementRef, ViewContainerRef, afterEveryRender, DestroyRef, ViewEncapsulation, Directive, NgModule } from '@angular/core';
4
+ import { FaIconComponent } from '@fortawesome/angular-fontawesome';
5
+ import { faCopy, faCheck, faLink } from '@fortawesome/free-solid-svg-icons';
6
+ import * as i1 from '@daffodil/design/button';
7
+ import { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';
8
+ import { Router, RouterLink } from '@angular/router';
9
+ import * as i1$1 from '@daffodil/design';
10
+ import { DaffArticleEncapsulatedDirective } from '@daffodil/design';
11
+
12
+ /**
13
+ * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.
14
+ * It provides visual feedback by changing the icon when content is successfully copied.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <daff-article-copy-button [content]="codeSnippet" />
19
+ * ```
20
+ */
21
+ class DaffArticleCopyButtonComponent {
22
+ constructor() {
23
+ // Content to be copied to clipboard
24
+ this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : []));
25
+ this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
26
+ this.faCopy = faCopy; // default copy icon
27
+ this.faCheck = faCheck; // check icon for copied state
28
+ this._ngZone = inject(NgZone);
29
+ }
30
+ ngOnDestroy() {
31
+ if (this.timeoutId) {
32
+ clearTimeout(this.timeoutId);
33
+ }
34
+ }
35
+ async copyToClipboard() {
36
+ try {
37
+ // Write content to clipboard
38
+ await navigator.clipboard.writeText(this.content());
39
+ this.copied.set(true);
40
+ clearTimeout(this.timeoutId);
41
+ this._ngZone.runOutsideAngular(() => {
42
+ this.timeoutId = setTimeout(() => {
43
+ this._ngZone.run(() => this.copied.set(false));
44
+ }, 1500);
45
+ });
46
+ }
47
+ catch (err) {
48
+ console.error('Failed to copy text: ', err);
49
+ }
50
+ }
51
+ get ariaLabel() {
52
+ return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';
53
+ }
54
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleCopyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
55
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffArticleCopyButtonComponent, isStandalone: true, selector: "daff-article-copy-button", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n", styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: i1.DaffIconButtonComponent, selector: "button[daff-icon-button],a[daff-icon-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
56
+ }
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleCopyButtonComponent, decorators: [{
58
+ type: Component,
59
+ args: [{ selector: 'daff-article-copy-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
60
+ FaIconComponent,
61
+ DAFF_ICON_BUTTON_COMPONENTS,
62
+ ], template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n", styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"] }]
63
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }] } });
64
+
65
+ class DaffArticleCopyButtonService {
66
+ constructor() {
67
+ this.buttons = [];
68
+ }
69
+ /**
70
+ * Finds all code blocks and adds copy buttons to them.
71
+ * Skips code blocks with the `nocopy` attribute.
72
+ * @param hostElement - The host element to search for code blocks.
73
+ * @param viewContainerRef - The view container to create the copy button components.
74
+ */
75
+ addCopyButtonsToCodeBlocks(hostElement, viewContainerRef) {
76
+ const codeBlocks = hostElement.querySelectorAll('pre');
77
+ const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));
78
+ codeBlocks.forEach((pre) => {
79
+ const code = pre.querySelector('code');
80
+ if (!code) {
81
+ return;
82
+ }
83
+ // Skip if nocopy attribute is present
84
+ if (pre.hasAttribute('nocopy')) {
85
+ return;
86
+ }
87
+ // Skip if inside an article-encapsulated component
88
+ if (encapsulatedElements.some(ee => ee.contains(pre))) {
89
+ return;
90
+ }
91
+ // Skip if already has a copy button
92
+ if (pre.querySelector('daff-article-copy-button')) {
93
+ return;
94
+ }
95
+ const textContent = code.textContent || '';
96
+ // Create the copy button component
97
+ const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);
98
+ buttonRef.setInput('content', textContent);
99
+ // Insert button into pre before the code element
100
+ pre.insertBefore(buttonRef.location.nativeElement, code);
101
+ this.buttons.push({
102
+ buttonRef,
103
+ preElement: pre,
104
+ });
105
+ });
106
+ }
107
+ /**
108
+ * Cleanup copy button references
109
+ */
110
+ cleanup() {
111
+ this.buttons.forEach(({ buttonRef }) => {
112
+ buttonRef.destroy();
113
+ });
114
+ this.buttons = [];
115
+ }
116
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleCopyButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleCopyButtonService }); }
118
+ }
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleCopyButtonService, decorators: [{
120
+ type: Injectable
121
+ }] });
122
+
123
+ class DaffArticleHeadingLinkComponent {
124
+ constructor() {
125
+ this.fragment = input.required(...(ngDevMode ? [{ debugName: "fragment" }] : []));
126
+ this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
127
+ this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
128
+ this.faLink = faLink; // default link icon
129
+ this.faCheck = faCheck; // check icon for copied state
130
+ this._ngZone = inject(NgZone);
131
+ this._router = inject(Router);
132
+ this._platformId = inject(PLATFORM_ID);
133
+ this._document = inject(DOCUMENT);
134
+ }
135
+ ngOnDestroy() {
136
+ if (this.timeoutId) {
137
+ clearTimeout(this.timeoutId);
138
+ }
139
+ }
140
+ async copyLink() {
141
+ if (!isPlatformBrowser(this._platformId)) {
142
+ return;
143
+ }
144
+ try {
145
+ // Get the URL to fragment
146
+ const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any
147
+ const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;
148
+ // Write full URL to clipboard
149
+ await navigator.clipboard.writeText(fullUrl);
150
+ this.copied.set(true);
151
+ clearTimeout(this.timeoutId);
152
+ this._ngZone.runOutsideAngular(() => {
153
+ this.timeoutId = setTimeout(() => {
154
+ this._ngZone.run(() => this.copied.set(false));
155
+ }, 1500);
156
+ });
157
+ }
158
+ catch (err) {
159
+ console.error('Failed to copy text: ', err);
160
+ }
161
+ }
162
+ get ariaLabel() {
163
+ return this.copied() ? 'Copied link to clipboard' : 'Copy link to clipboard';
164
+ }
165
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleHeadingLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
166
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffArticleHeadingLinkComponent, isStandalone: true, selector: "daff-article-heading-link", inputs: { fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: i1$1.DaffArticleEncapsulatedDirective }], ngImport: i0, template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}:host:hover .daff-article-heading-link__button{opacity:1}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
167
+ }
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleHeadingLinkComponent, decorators: [{
169
+ type: Component,
170
+ args: [{ selector: 'daff-article-heading-link', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
171
+ { directive: DaffArticleEncapsulatedDirective },
172
+ ], imports: [
173
+ RouterLink,
174
+ FaIconComponent,
175
+ DAFF_ICON_BUTTON_COMPONENTS,
176
+ ], template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}:host:hover .daff-article-heading-link__button{opacity:1}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"] }]
177
+ }], propDecorators: { fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
178
+
179
+ class DaffArticleHeadingLinkService {
180
+ constructor() {
181
+ this.links = [];
182
+ }
183
+ /**
184
+ * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.
185
+ * @param hostElement - The host element to search for heading elements.
186
+ * @param viewContainerRef - The view container to create the heading link components.
187
+ */
188
+ addLinksToHeadings(hostElement, viewContainerRef) {
189
+ const headings = hostElement.querySelectorAll('h2, h3, h4');
190
+ const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));
191
+ headings.forEach((heading) => {
192
+ if (heading.querySelector('daff-article-heading-link')) {
193
+ return;
194
+ }
195
+ // Skip if nolink attribute is present
196
+ if (heading.hasAttribute('nolink')) {
197
+ return;
198
+ }
199
+ // Skip if inside an article-encapsulated component
200
+ if (encapsulatedElements.some(ee => ee.contains(heading))) {
201
+ return;
202
+ }
203
+ const textContent = heading.textContent?.trim() || '';
204
+ const fragment = heading.id || this.generateFragment(textContent);
205
+ // Set the id on the heading if it doesn't have one
206
+ if (!heading.id) {
207
+ heading.id = fragment;
208
+ }
209
+ // Create the heading link component and set its inputs
210
+ const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);
211
+ linkRef.setInput('fragment', fragment);
212
+ linkRef.setInput('label', textContent);
213
+ // Clear the heading's content and append the link component
214
+ heading.innerHTML = '';
215
+ heading.appendChild(linkRef.location.nativeElement);
216
+ this.links.push({
217
+ linkRef,
218
+ headingElement: heading,
219
+ });
220
+ });
221
+ }
222
+ /**
223
+ * Cleanup heading link references
224
+ */
225
+ cleanup() {
226
+ this.links.forEach(({ linkRef }) => {
227
+ linkRef.destroy();
228
+ });
229
+ this.links = [];
230
+ }
231
+ /**
232
+ * Generates a URL-friendly fragment from heading text
233
+ */
234
+ generateFragment(text) {
235
+ return text
236
+ .toLowerCase()
237
+ .replace(/[^\w\s-]/g, '')
238
+ .replace(/\s+/g, '-')
239
+ .replace(/-+/g, '-')
240
+ .trim();
241
+ }
242
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleHeadingLinkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
243
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleHeadingLinkService }); }
244
+ }
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleHeadingLinkService, decorators: [{
246
+ type: Injectable
247
+ }] });
4
248
 
5
- /* eslint-disable quote-props */
6
249
  /**
7
250
  * A component for creating articles within your page.
8
251
  */
9
252
  class DaffArticleComponent {
10
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;font-size:.875rem;line-height:1.5rem;margin:1.5rem 0;padding:1.5rem;overflow-x:auto}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{padding:0}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
253
+ constructor(copyButtonService, headingLinkService) {
254
+ this.copyButtonService = copyButtonService;
255
+ this.headingLinkService = headingLinkService;
256
+ const elementRef = inject((ElementRef));
257
+ const viewContainerRef = inject(ViewContainerRef);
258
+ afterEveryRender({
259
+ write: () => {
260
+ this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);
261
+ this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);
262
+ },
263
+ });
264
+ const destroyRef = inject(DestroyRef);
265
+ destroyRef.onDestroy(() => {
266
+ this.copyButtonService.cleanup();
267
+ this.headingLinkService.cleanup();
268
+ });
269
+ }
270
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleComponent, deps: [{ token: DaffArticleCopyButtonService }, { token: DaffArticleHeadingLinkService }], target: i0.ɵɵFactoryTarget.Component }); }
271
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, providers: [
272
+ DaffArticleCopyButtonService,
273
+ DaffArticleHeadingLinkService,
274
+ ], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
12
275
  }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleComponent, decorators: [{
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleComponent, decorators: [{
14
277
  type: Component,
15
278
  args: [{ selector: 'daff-article', template: '<ng-content></ng-content>', host: {
16
- 'class': 'daff-article',
17
- 'role': 'article',
18
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;word-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media (min-width: 768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media (min-width: 768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.25rem;font-size:.875rem;line-height:1.5rem;margin:1.5rem 0;padding:1.5rem;overflow-x:auto}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{padding:0}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media (min-width: 768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
19
- }] });
279
+ class: 'daff-article',
280
+ role: 'article',
281
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
282
+ DaffArticleCopyButtonService,
283
+ DaffArticleHeadingLinkService,
284
+ ], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
285
+ }], ctorParameters: () => [{ type: DaffArticleCopyButtonService }, { type: DaffArticleHeadingLinkService }] });
20
286
 
21
287
  /* eslint-disable quote-props */
22
288
  class DaffArticleMetaDirective {
23
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleMetaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
24
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffArticleMetaDirective, isStandalone: true, selector: "[daffArticleMeta]", host: { classAttribute: "daff-article__meta" }, ngImport: i0 }); }
289
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleMetaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
290
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffArticleMetaDirective, isStandalone: true, selector: "[daffArticleMeta]", host: { classAttribute: "daff-article__meta" }, ngImport: i0 }); }
25
291
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleMetaDirective, decorators: [{
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleMetaDirective, decorators: [{
27
293
  type: Directive,
28
294
  args: [{
29
295
  selector: '[daffArticleMeta]',
@@ -37,14 +303,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
37
303
  * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
38
304
  */
39
305
  class DaffArticleModule {
40
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleModule, imports: [CommonModule,
306
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
307
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleModule, imports: [CommonModule,
42
308
  DaffArticleComponent,
43
309
  DaffArticleMetaDirective], exports: [DaffArticleComponent,
44
310
  DaffArticleMetaDirective] }); }
45
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleModule, imports: [CommonModule] }); }
311
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleModule, imports: [CommonModule] }); }
46
312
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffArticleModule, decorators: [{
313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffArticleModule, decorators: [{
48
314
  type: NgModule,
49
315
  args: [{
50
316
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrls: ['./article.component.scss'],\n host: {\n 'class': 'daff-article',\n 'role': 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffArticleComponent {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AAOA;;AAEG;MAYU,oBAAoB,CAAA;iIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,qJATrB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+0GAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAS1B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACE,cAAc,EAAA,QAAA,EACd,2BAA2B,EAAA,IAAA,EAE/B;AACJ,wBAAA,OAAO,EAAE,cAAc;AACvB,wBAAA,MAAM,EAAE,SAAS;AAClB,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,+0GAAA,CAAA,EAAA;;;ACnBjD;MASa,wBAAwB,CAAA;iIAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,oBAAA,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odil-design-article.mjs","sources":["../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.ts","../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.html","../../../libs/design/article/src/article-copy-button/service/copy-button.service.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.html","../../../libs/design/article/src/article-heading-link/service/heading-link.service.ts","../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["import {\n Component,\n NgZone,\n ChangeDetectionStrategy,\n input,\n signal,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faCheck,\n faCopy,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n/**\n * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.\n * It provides visual feedback by changing the icon when content is successfully copied.\n *\n * @example\n * ```html\n * <daff-article-copy-button [content]=\"codeSnippet\" />\n * ```\n */\n@Component({\n selector: 'daff-article-copy-button',\n templateUrl: './copy-button.component.html',\n styleUrl: './copy-button.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleCopyButtonComponent implements OnDestroy {\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n // Content to be copied to clipboard\n content = input.required<string>();\n\n protected copied = signal(false);\n\n protected readonly faCopy = faCopy; // default copy icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyToClipboard(): Promise<void> {\n try {\n // Write content to clipboard\n await navigator.clipboard.writeText(this.content());\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';\n }\n}\n","<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonComponent } from '../copy-button/copy-button.component';\n\ninterface ButtonEntry {\n buttonRef: ComponentRef<DaffArticleCopyButtonComponent>;\n preElement: HTMLPreElement;\n}\n\n@Injectable()\nexport class DaffArticleCopyButtonService {\n private buttons: Array<ButtonEntry> = [];\n\n /**\n * Finds all code blocks and adds copy buttons to them.\n * Skips code blocks with the `nocopy` attribute.\n * @param hostElement - The host element to search for code blocks.\n * @param viewContainerRef - The view container to create the copy button components.\n */\n addCopyButtonsToCodeBlocks(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const codeBlocks = hostElement.querySelectorAll('pre');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n codeBlocks.forEach((pre: HTMLPreElement) => {\n const code = pre.querySelector('code');\n if (!code) {\n return;\n }\n\n // Skip if nocopy attribute is present\n if (pre.hasAttribute('nocopy')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(pre))) {\n return;\n }\n\n // Skip if already has a copy button\n if (pre.querySelector('daff-article-copy-button')) {\n return;\n }\n\n const textContent = code.textContent || '';\n\n // Create the copy button component\n const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);\n buttonRef.setInput('content', textContent);\n\n // Insert button into pre before the code element\n pre.insertBefore(buttonRef.location.nativeElement, code);\n\n this.buttons.push({\n buttonRef,\n preElement: pre,\n });\n });\n }\n\n /**\n * Cleanup copy button references\n */\n cleanup(): void {\n this.buttons.forEach(({ buttonRef }) => {\n buttonRef.destroy();\n });\n this.buttons = [];\n }\n}\n","import {\n DOCUMENT,\n isPlatformBrowser,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n NgZone,\n OnDestroy,\n signal,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n Router,\n RouterLink,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faLink,\n faCheck,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-article-heading-link',\n templateUrl: './heading-link.component.html',\n styleUrl: './heading-link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n imports: [\n RouterLink,\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleHeadingLinkComponent implements OnDestroy {\n fragment = input.required<string>();\n label = input.required<string>();\n\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n protected copied = signal(false);\n\n protected readonly faLink = faLink; // default link icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n private _router = inject(Router);\n private _platformId = inject(PLATFORM_ID);\n private _document = inject(DOCUMENT);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyLink(): Promise<void> {\n if (!isPlatformBrowser(this._platformId)) {\n return;\n }\n\n try {\n // Get the URL to fragment\n const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any\n const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;\n\n // Write full URL to clipboard\n await navigator.clipboard.writeText(fullUrl);\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied link to clipboard' : 'Copy link to clipboard';\n }\n}\n","<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleHeadingLinkComponent } from '../heading-link/heading-link.component';\n\ninterface LinkEntry {\n linkRef: ComponentRef<DaffArticleHeadingLinkComponent>;\n headingElement: HTMLHeadingElement;\n}\n\n@Injectable()\nexport class DaffArticleHeadingLinkService {\n private links: Array<LinkEntry> = [];\n\n /**\n * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.\n * @param hostElement - The host element to search for heading elements.\n * @param viewContainerRef - The view container to create the heading link components.\n */\n addLinksToHeadings(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const headings = hostElement.querySelectorAll('h2, h3, h4');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n headings.forEach((heading: HTMLHeadingElement) => {\n if (heading.querySelector('daff-article-heading-link')) {\n return;\n }\n\n // Skip if nolink attribute is present\n if (heading.hasAttribute('nolink')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(heading))) {\n return;\n }\n\n const textContent = heading.textContent?.trim() || '';\n const fragment = heading.id || this.generateFragment(textContent);\n\n // Set the id on the heading if it doesn't have one\n if (!heading.id) {\n heading.id = fragment;\n }\n\n // Create the heading link component and set its inputs\n const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);\n linkRef.setInput('fragment', fragment);\n linkRef.setInput('label', textContent);\n\n // Clear the heading's content and append the link component\n heading.innerHTML = '';\n heading.appendChild(linkRef.location.nativeElement);\n\n this.links.push({\n linkRef,\n headingElement: heading,\n });\n });\n }\n\n /**\n * Cleanup heading link references\n */\n cleanup(): void {\n this.links.forEach(({ linkRef }) => {\n linkRef.destroy();\n });\n this.links = [];\n }\n\n /**\n * Generates a URL-friendly fragment from heading text\n */\n private generateFragment(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/\\s+/g, '-')\n .replace(/-+/g, '-')\n .trim();\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ViewContainerRef,\n inject,\n DestroyRef,\n afterEveryRender,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonService } from '../article-copy-button/service/copy-button.service';\nimport { DaffArticleHeadingLinkService } from '../article-heading-link/service/heading-link.service';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrl: './article.component.scss',\n host: {\n class: 'daff-article',\n role: 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffArticleCopyButtonService,\n DaffArticleHeadingLinkService,\n ],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n private headingLinkService: DaffArticleHeadingLinkService,\n ) {\n const elementRef = inject(ElementRef<HTMLElement>);\n const viewContainerRef = inject(ViewContainerRef);\n\n afterEveryRender({\n write: () => {\n this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);\n this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n this.headingLinkService.cleanup();\n });\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.DaffArticleCopyButtonService","i2.DaffArticleHeadingLinkService"],"mappings":";;;;;;;;;;;AAiBA;;;;;;;;AAQG;MAWU,8BAA8B,CAAA;AAV3C,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAU;AAExB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,kDAAC;AAEb,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC;AAChB,QAAA,IAAA,CAAA,OAAO,GAAG,OAAO,CAAC;AAC7B,QA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