@redvars/peacock 4.2.0 → 4.3.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 (256) hide show
  1. package/dist/{BaseField-_unSNU5x.js → BaseField-CHBcjVc2.js} +3 -3
  2. package/dist/{BaseField-_unSNU5x.js.map → BaseField-CHBcjVc2.js.map} +1 -1
  3. package/dist/{BaseInput-DtZH0fPJ.js → BaseInput-DZp2O8Gh.js} +2 -2
  4. package/dist/{BaseInput-DtZH0fPJ.js.map → BaseInput-DZp2O8Gh.js.map} +1 -1
  5. package/dist/ai-badge.js +2 -2
  6. package/dist/ai-summary.js +2 -2
  7. package/dist/alert.js +2 -2
  8. package/dist/anchor-nav.js +2 -2
  9. package/dist/app-shell.js +2 -2
  10. package/dist/assistant-panel.js +2 -2
  11. package/dist/assistant-step.js +2 -2
  12. package/dist/assistant-steps.js +2 -2
  13. package/dist/avatar-group.js +2 -2
  14. package/dist/banner.js +2 -2
  15. package/dist/{base-progress-D7Nmfh1s.js → base-progress-CKQ32Ruw.js} +2 -2
  16. package/dist/{base-progress-D7Nmfh1s.js.map → base-progress-CKQ32Ruw.js.map} +1 -1
  17. package/dist/bottom-sheet.js +2 -2
  18. package/dist/breadcrumb.js +2 -2
  19. package/dist/calendar.js +2 -2
  20. package/dist/{canvas-base-CWQ4rQ2s.js → canvas-base-BoKef3yr.js} +2 -2
  21. package/dist/{canvas-base-CWQ4rQ2s.js.map → canvas-base-BoKef3yr.js.map} +1 -1
  22. package/dist/carousel.js +644 -0
  23. package/dist/carousel.js.map +1 -0
  24. package/dist/{cartesian-chart-CS5yRLfE.js → cartesian-chart-DqZxnoG1.js} +2 -2
  25. package/dist/{cartesian-chart-CS5yRLfE.js.map → cartesian-chart-DqZxnoG1.js.map} +1 -1
  26. package/dist/{cb-group-base-CO30uFQZ.js → cb-group-base-Bf7iOIGS.js} +2 -2
  27. package/dist/{cb-group-base-CO30uFQZ.js.map → cb-group-base-Bf7iOIGS.js.map} +1 -1
  28. package/dist/cb-group.js +3 -3
  29. package/dist/cb-rule.js +3 -3
  30. package/dist/chart-area.js +4 -4
  31. package/dist/chart-bar.js +4 -4
  32. package/dist/{chart-base-C_XKVyhf.js → chart-base-ByCJM_9C.js} +2 -2
  33. package/dist/{chart-base-C_XKVyhf.js.map → chart-base-ByCJM_9C.js.map} +1 -1
  34. package/dist/chart-doughnut.js +3 -3
  35. package/dist/chart-line.js +4 -4
  36. package/dist/chart-pie.js +3 -3
  37. package/dist/chat-event.js +2 -2
  38. package/dist/chat-message.js +2 -2
  39. package/dist/chat-thread.js +2 -2
  40. package/dist/checkbox-group.js +3 -3
  41. package/dist/checkbox.js +3 -3
  42. package/dist/chip-set.js +2 -2
  43. package/dist/chip.js +2 -2
  44. package/dist/circular-progress.js +3 -3
  45. package/dist/citation.js +2 -2
  46. package/dist/code-editor.js +3 -3
  47. package/dist/code-highlighter.js +2 -2
  48. package/dist/color-field.js +4 -4
  49. package/dist/color-picker.js +2 -2
  50. package/dist/command-palette.js +2 -2
  51. package/dist/comment-composer.js +24 -12
  52. package/dist/comment-composer.js.map +1 -1
  53. package/dist/condition-builder.js +3 -3
  54. package/dist/confirm-dialog.js +2 -2
  55. package/dist/copy-button.js +2 -2
  56. package/dist/currency-field.js +4 -4
  57. package/dist/custom-elements-jsdocs.json +936 -56
  58. package/dist/custom-elements.json +3486 -554
  59. package/dist/date-field.js +5 -5
  60. package/dist/date-picker.js +2 -2
  61. package/dist/date-range-field.js +5 -5
  62. package/dist/datetime-field.js +5 -5
  63. package/dist/dependency-map.js +3 -3
  64. package/dist/description-item.js +2 -2
  65. package/dist/description-list.js +2 -2
  66. package/dist/{diagram-Va096vj9.js → diagram-Cnrj-4y3.js} +2 -2
  67. package/dist/{diagram-Va096vj9.js.map → diagram-Cnrj-4y3.js.map} +1 -1
  68. package/dist/diagram-controls.js +2 -2
  69. package/dist/diagram-minimap.js +2 -2
  70. package/dist/diagram.js +4 -4
  71. package/dist/diff-viewer.js +2 -2
  72. package/dist/discussion-activity.js +2 -2
  73. package/dist/discussion-comment.js +2 -2
  74. package/dist/discussion.js +4 -4
  75. package/dist/{document-editor-Dc8JeFVB.js → document-editor-C8ThjDQ7.js} +22 -10
  76. package/dist/{document-editor-Dc8JeFVB.js.map → document-editor-C8ThjDQ7.js.map} +1 -1
  77. package/dist/document-editor.js +3 -3
  78. package/dist/draft-card.js +2 -2
  79. package/dist/erd.js +3 -3
  80. package/dist/file-upload.js +3 -3
  81. package/dist/filter-bar.js +2 -2
  82. package/dist/flow.js +4 -4
  83. package/dist/form.js +2 -2
  84. package/dist/{generative-view-BKlcuujw.js → generative-view-CQ8-g1wY.js} +2 -2
  85. package/dist/{generative-view-BKlcuujw.js.map → generative-view-CQ8-g1wY.js.map} +1 -1
  86. package/dist/generative-view.js +3 -3
  87. package/dist/highlight-Be0wu7kh.js +252 -0
  88. package/dist/highlight-Be0wu7kh.js.map +1 -0
  89. package/dist/highlight.js +6 -0
  90. package/dist/highlight.js.map +1 -0
  91. package/dist/html-editor.js +29 -12
  92. package/dist/html-editor.js.map +1 -1
  93. package/dist/{i18n-controller-DJHsE1YH.js → i18n-controller-DLJcJ5gO.js} +2 -2
  94. package/dist/{i18n-controller-DJHsE1YH.js.map → i18n-controller-DLJcJ5gO.js.map} +1 -1
  95. package/dist/image.js +2 -2
  96. package/dist/index.js +26 -16
  97. package/dist/index.js.map +1 -1
  98. package/dist/inline-edit.js +2 -2
  99. package/dist/input.js +3 -3
  100. package/dist/json-viewer.js +2 -2
  101. package/dist/kanban.js +2 -2
  102. package/dist/kbd.js +2 -2
  103. package/dist/linear-progress.js +3 -3
  104. package/dist/listbox.js +2 -2
  105. package/dist/loader-full.js +19 -9
  106. package/dist/loader-full.js.map +1 -1
  107. package/dist/loader.js +46 -9
  108. package/dist/loader.js.map +1 -1
  109. package/dist/markdown-editor.js +29 -12
  110. package/dist/markdown-editor.js.map +1 -1
  111. package/dist/mention-input.js +4 -4
  112. package/dist/modal.js +2 -2
  113. package/dist/navigation-bar.js +2 -2
  114. package/dist/navigation-drawer.js +2 -2
  115. package/dist/navigation-rail.js +2 -2
  116. package/dist/notification-center.js +2 -2
  117. package/dist/number-field.js +4 -4
  118. package/dist/page-header.js +2 -2
  119. package/dist/pagination.js +2 -2
  120. package/dist/password-field.js +4 -4
  121. package/dist/password-rules.js +2 -2
  122. package/dist/phone-field.js +4 -4
  123. package/dist/{picker-field-CUI05sWc.js → picker-field-B5xOFc3-.js} +3 -3
  124. package/dist/{picker-field-CUI05sWc.js.map → picker-field-B5xOFc3-.js.map} +1 -1
  125. package/dist/pin-input.js +4 -4
  126. package/dist/presence-indicator.js +2 -2
  127. package/dist/prompt-input.js +24 -12
  128. package/dist/prompt-input.js.map +1 -1
  129. package/dist/radio.js +3 -3
  130. package/dist/rating.js +3 -3
  131. package/dist/redvars-loader.js +2 -2
  132. package/dist/relative-time.js +2 -2
  133. package/dist/resizable-panels.js +2 -2
  134. package/dist/{rich-text-input-N_hqnXej.js → rich-text-input-C4B9D6oD.js} +21 -18
  135. package/dist/rich-text-input-C4B9D6oD.js.map +1 -0
  136. package/dist/{schema-Dy0z-80u.js → schema-CPhNrjrx.js} +2 -2
  137. package/dist/{schema-Dy0z-80u.js.map → schema-CPhNrjrx.js.map} +1 -1
  138. package/dist/search.js +3 -3
  139. package/dist/select.js +4 -4
  140. package/dist/side-sheet.js +2 -2
  141. package/dist/signature-pad.js +3 -3
  142. package/dist/site-footer-group.js +142 -0
  143. package/dist/site-footer-group.js.map +1 -0
  144. package/dist/site-footer.js +338 -0
  145. package/dist/site-footer.js.map +1 -0
  146. package/dist/site-header.js +774 -0
  147. package/dist/site-header.js.map +1 -0
  148. package/dist/site-nav-group.js +123 -0
  149. package/dist/site-nav-group.js.map +1 -0
  150. package/dist/site-nav-link.js +321 -0
  151. package/dist/site-nav-link.js.map +1 -0
  152. package/dist/site-nav-menu.js +506 -0
  153. package/dist/site-nav-menu.js.map +1 -0
  154. package/dist/site-nav-shared-BDR2HG8e.js +23 -0
  155. package/dist/site-nav-shared-BDR2HG8e.js.map +1 -0
  156. package/dist/slider.js +3 -3
  157. package/dist/snackbar.js +2 -2
  158. package/dist/sparkline.js +2 -2
  159. package/dist/split-button.js +2 -2
  160. package/dist/src/__internal/i18n/strings.d.ts +24 -1
  161. package/dist/src/__internal/rich-text/rich-text-input.d.ts +6 -1
  162. package/dist/src/carousel/carousel.d.ts +135 -0
  163. package/dist/src/carousel/index.d.ts +1 -0
  164. package/dist/src/highlight/highlight.d.ts +56 -0
  165. package/dist/src/highlight/index.d.ts +2 -0
  166. package/dist/src/highlight/matches.d.ts +9 -0
  167. package/dist/src/html-editor/html-editor.d.ts +5 -0
  168. package/dist/src/index.d.ts +9 -0
  169. package/dist/src/markdown-editor/markdown-editor.d.ts +5 -0
  170. package/dist/src/site-footer/index.d.ts +2 -0
  171. package/dist/src/site-footer/site-footer-group.d.ts +34 -0
  172. package/dist/src/site-footer/site-footer.d.ts +74 -0
  173. package/dist/src/site-header/index.d.ts +4 -0
  174. package/dist/src/site-header/site-header.d.ts +170 -0
  175. package/dist/src/site-header/site-nav-group.d.ts +32 -0
  176. package/dist/src/site-header/site-nav-link.d.ts +65 -0
  177. package/dist/src/site-header/site-nav-menu.d.ts +104 -0
  178. package/dist/src/site-header/site-nav-shared.d.ts +13 -0
  179. package/dist/src/video/index.d.ts +2 -0
  180. package/dist/src/video/video-source.d.ts +12 -0
  181. package/dist/src/video/video.d.ts +80 -0
  182. package/dist/stat.js +2 -2
  183. package/dist/status-indicator.js +2 -2
  184. package/dist/step.js +2 -2
  185. package/dist/stepper.js +2 -2
  186. package/dist/{strings-DnYjGbbc.js → strings-MXyrGrNs.js} +28 -2
  187. package/dist/strings-MXyrGrNs.js.map +1 -0
  188. package/dist/svg.js +2 -2
  189. package/dist/switch.js +3 -3
  190. package/dist/table.js +2 -2
  191. package/dist/test/carousel.test.d.ts +1 -0
  192. package/dist/test/highlight.test.d.ts +1 -0
  193. package/dist/test/site-footer.test.d.ts +1 -0
  194. package/dist/test/site-header.test.d.ts +1 -0
  195. package/dist/test/video.test.d.ts +1 -0
  196. package/dist/textarea.js +4 -4
  197. package/dist/time-field.js +5 -5
  198. package/dist/time-picker.js +2 -2
  199. package/dist/timeline-item.js +2 -2
  200. package/dist/timeline.js +2 -2
  201. package/dist/{toggle-base-CXmFSp3b.js → toggle-base-I1wE_fVe.js} +2 -2
  202. package/dist/{toggle-base-CXmFSp3b.js.map → toggle-base-I1wE_fVe.js.map} +1 -1
  203. package/dist/tour.js +2 -2
  204. package/dist/transfer-list.js +3 -3
  205. package/dist/tree-chart.js +3 -3
  206. package/dist/tree-item.js +2 -2
  207. package/dist/tree.js +2 -2
  208. package/dist/tsconfig.tsbuildinfo +1 -1
  209. package/dist/typing-indicator.js +2 -2
  210. package/dist/url-field.js +4 -4
  211. package/dist/user-menu.js +2 -2
  212. package/dist/video-IwNmHyft.js +509 -0
  213. package/dist/video-IwNmHyft.js.map +1 -0
  214. package/dist/video.js +12 -0
  215. package/dist/video.js.map +1 -0
  216. package/dist/virtual-list.js +2 -2
  217. package/dist/workflow-timeline.js +2 -2
  218. package/dist/workflow.js +3 -3
  219. package/dist/workspace-switcher.js +2 -2
  220. package/package.json +1 -1
  221. package/readme.md +5 -0
  222. package/src/__internal/i18n/strings.ts +31 -1
  223. package/src/__internal/rich-text/editor-chrome.scss +27 -10
  224. package/src/__internal/rich-text/rich-text-input.ts +17 -16
  225. package/src/carousel/carousel.scss +124 -0
  226. package/src/carousel/carousel.ts +547 -0
  227. package/src/carousel/index.ts +1 -0
  228. package/src/highlight/highlight.scss +25 -0
  229. package/src/highlight/highlight.ts +123 -0
  230. package/src/highlight/index.ts +2 -0
  231. package/src/highlight/matches.ts +94 -0
  232. package/src/html-editor/html-editor.ts +5 -0
  233. package/src/index.ts +18 -0
  234. package/src/loader.ts +36 -0
  235. package/src/markdown-editor/markdown-editor.ts +5 -0
  236. package/src/site-footer/index.ts +2 -0
  237. package/src/site-footer/site-footer-group.scss +53 -0
  238. package/src/site-footer/site-footer-group.ts +52 -0
  239. package/src/site-footer/site-footer.scss +171 -0
  240. package/src/site-footer/site-footer.ts +151 -0
  241. package/src/site-header/index.ts +8 -0
  242. package/src/site-header/site-header.scss +238 -0
  243. package/src/site-header/site-header.ts +565 -0
  244. package/src/site-header/site-nav-group.scss +29 -0
  245. package/src/site-header/site-nav-group.ts +57 -0
  246. package/src/site-header/site-nav-link.scss +154 -0
  247. package/src/site-header/site-nav-link.ts +140 -0
  248. package/src/site-header/site-nav-menu.scss +182 -0
  249. package/src/site-header/site-nav-menu.ts +336 -0
  250. package/src/site-header/site-nav-shared.ts +27 -0
  251. package/src/video/index.ts +2 -0
  252. package/src/video/video-source.ts +80 -0
  253. package/src/video/video.scss +183 -0
  254. package/src/video/video.ts +246 -0
  255. package/dist/rich-text-input-N_hqnXej.js.map +0 -1
  256. package/dist/strings-DnYjGbbc.js.map +0 -1
@@ -0,0 +1,252 @@
1
+ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-BK7XZjE2.js';
2
+ import { n } from './property-B2TG3KEE.js';
3
+ import { r } from './state-BCeDVCI9.js';
4
+ import { r as resolveLocale } from './locale-DEsJZCQG.js';
5
+
6
+ /**
7
+ * Folds text for matching: lower case in the locale, accents and other combining marks removed.
8
+ * Returns the folded text and, for each of its code units, the original text's range it came from,
9
+ * so a match in the folded text maps back to the original even when folding changes lengths.
10
+ */
11
+ function fold(text, locale) {
12
+ let folded = '';
13
+ const starts = [];
14
+ const ends = [];
15
+ let offset = 0;
16
+ for (const char of text) {
17
+ const piece = char
18
+ .normalize('NFD')
19
+ .replace(/\p{M}/gu, '')
20
+ .toLocaleLowerCase(locale);
21
+ for (let i = 0; i < piece.length; i += 1) {
22
+ starts.push(offset);
23
+ ends.push(offset + char.length);
24
+ }
25
+ // A mark that folds away, such as a combining accent, belongs to the letter before it.
26
+ if (!piece && ends.length)
27
+ ends[ends.length - 1] = offset + char.length;
28
+ folded += piece;
29
+ offset += char.length;
30
+ }
31
+ return { folded, starts, ends };
32
+ }
33
+ /**
34
+ * The words of a query to look for, longest first so a longer word wins where two overlap.
35
+ * One-letter words are left out when the query has longer ones, so "reset a password" does not
36
+ * mark every "a".
37
+ */
38
+ function queryWords(query, locale) {
39
+ const words = Array.from(new Set(fold(query, locale)
40
+ .folded.split(/[\s\p{P}]+/u)
41
+ .filter(Boolean)));
42
+ const long = words.filter(word => [...word].length > 1);
43
+ return (long.length ? long : words).sort((a, b) => b.length - a.length);
44
+ }
45
+ /** Sorts ranges and merges the ones that touch or overlap. */
46
+ function mergeRanges(ranges, length) {
47
+ const sorted = ranges
48
+ .map(([start, end]) => [
49
+ Math.max(0, Math.min(start, length)),
50
+ Math.max(0, Math.min(end, length)),
51
+ ])
52
+ .filter(([start, end]) => end > start)
53
+ .sort((a, b) => a[0] - b[0]);
54
+ const merged = [];
55
+ for (const range of sorted) {
56
+ const last = merged[merged.length - 1];
57
+ if (last && range[0] <= last[1])
58
+ last[1] = Math.max(last[1], range[1]);
59
+ else
60
+ merged.push([range[0], range[1]]);
61
+ }
62
+ return merged;
63
+ }
64
+ /**
65
+ * Where the words of `query` occur in `text`, each word on its own, ignoring case and accents.
66
+ * Ranges are sorted and do not overlap.
67
+ */
68
+ function findMatches(text, query, locale = 'en') {
69
+ const words = queryWords(query, locale);
70
+ if (!text || !words.length)
71
+ return [];
72
+ const { folded, starts, ends } = fold(text, locale);
73
+ const taken = new Array(folded.length).fill(false);
74
+ const ranges = [];
75
+ for (const word of words) {
76
+ let from = folded.indexOf(word);
77
+ while (from !== -1) {
78
+ const to = from + word.length;
79
+ if (!taken.slice(from, to).some(Boolean)) {
80
+ taken.fill(true, from, to);
81
+ ranges.push([starts[from], ends[to - 1]]);
82
+ }
83
+ from = folded.indexOf(word, to);
84
+ }
85
+ }
86
+ return mergeRanges(ranges, text.length);
87
+ }
88
+
89
+ var css_248z = i`* {
90
+ box-sizing: border-box;
91
+ -webkit-tap-highlight-color: transparent;
92
+ }
93
+
94
+ .screen-reader-only {
95
+ position: absolute !important;
96
+ inline-size: 1px !important;
97
+ block-size: 1px !important;
98
+ padding: 0 !important;
99
+ margin: -1px !important;
100
+ overflow: hidden !important;
101
+ clip-path: inset(50%) !important;
102
+ white-space: nowrap !important;
103
+ border: 0 !important;
104
+ }
105
+
106
+ [hidden] {
107
+ display: none !important;
108
+ }
109
+
110
+ @media (forced-colors: active) {
111
+ .selected,
112
+ [aria-selected=true],
113
+ [aria-pressed=true],
114
+ [aria-checked=true],
115
+ [aria-current]:not([aria-current=false]) {
116
+ outline: 2px solid Highlight;
117
+ outline-offset: -2px;
118
+ }
119
+ .disabled,
120
+ [aria-disabled=true] {
121
+ color: GrayText;
122
+ }
123
+ }
124
+ :host {
125
+ display: inline;
126
+ }
127
+
128
+ mark {
129
+ border-radius: var(--shape-corner-extra-small);
130
+ padding-inline: 0.0625rem;
131
+ background-color: var(--highlight-background, var(--color-tertiary-container));
132
+ color: var(--highlight-color, var(--color-on-tertiary-container));
133
+ box-decoration-break: clone;
134
+ }
135
+
136
+ @media (forced-colors: active) {
137
+ mark {
138
+ background-color: Mark;
139
+ color: MarkText;
140
+ }
141
+ }`;
142
+
143
+ /**
144
+ * @label Highlight
145
+ * @tag wc-highlight
146
+ * @rawTag highlight
147
+ *
148
+ * @summary Marks the words of a search query in a piece of text.
149
+ * @overview
150
+ * <p>Highlight shows its text with each word of <code>query</code> marked, for search results in a
151
+ * knowledge base, a site search or a filtered list. Words match on their own, in any order,
152
+ * ignoring case and accents, so "resume" marks "Résumé".</p>
153
+ * <p>It reads its children as plain text and never parses HTML, so text from records or a search
154
+ * index is safe to put in it. When the server already knows where the matches are, set
155
+ * <code>ranges</code> instead of <code>query</code>.</p>
156
+ * <p>Marks use the tertiary container colour, so they differ from links and from the selection.</p>
157
+ *
158
+ * @slot - The text. Only its text content is used; markup in it is not rendered.
159
+ *
160
+ * @csspart mark - Each marked run of text, a `<mark>` element.
161
+ *
162
+ * @cssprop --highlight-background - Background of the marks. Defaults to `--color-tertiary-container`.
163
+ * @cssprop --highlight-color - Text colour of the marks. Defaults to `--color-on-tertiary-container`.
164
+ *
165
+ * @example
166
+ * ```html
167
+ * <wc-highlight query="reset password">
168
+ * If you forgot your password, choose Forgot password and reset it from the link we email you.
169
+ * </wc-highlight>
170
+ * ```
171
+ * @tags display search
172
+ */
173
+ let Highlight = class Highlight extends i$1 {
174
+ constructor() {
175
+ // ── Static ───────────────────────────────────────────────────────────────
176
+ super(...arguments);
177
+ // ── Properties ───────────────────────────────────────────────────────────
178
+ /** The search query whose words are marked. */
179
+ this.query = '';
180
+ // ── State ────────────────────────────────────────────────────────────────
181
+ /** The element's text content. */
182
+ this.text = '';
183
+ // ── Private fields ───────────────────────────────────────────────────────
184
+ /** Watches the text, so the marks follow when it changes. */
185
+ this.textObserver = new MutationObserver(() => this.syncText());
186
+ }
187
+ // ── Lifecycle ────────────────────────────────────────────────────────────
188
+ connectedCallback() {
189
+ super.connectedCallback();
190
+ this.syncText();
191
+ this.textObserver.observe(this, {
192
+ childList: true,
193
+ characterData: true,
194
+ subtree: true,
195
+ });
196
+ }
197
+ disconnectedCallback() {
198
+ this.textObserver.disconnect();
199
+ super.disconnectedCallback();
200
+ }
201
+ willUpdate(changed) {
202
+ super.willUpdate(changed);
203
+ this.syncText();
204
+ }
205
+ // ── Private methods ──────────────────────────────────────────────────────
206
+ /** The runs to mark, as `[start, end)` offsets in the text. */
207
+ get marks() {
208
+ if (this.ranges)
209
+ return mergeRanges(this.ranges, this.text.length);
210
+ return findMatches(this.text, this.query, resolveLocale(this.locale, this));
211
+ }
212
+ syncText() {
213
+ // Kept as is, so `ranges` offsets match the text; CSS collapses the whitespace when it renders.
214
+ const text = this.textContent ?? '';
215
+ if (text !== this.text)
216
+ this.text = text;
217
+ }
218
+ // ── Render ───────────────────────────────────────────────────────────────
219
+ render() {
220
+ const { text } = this;
221
+ const pieces = [];
222
+ let at = 0;
223
+ for (const [start, end] of this.marks) {
224
+ if (start > at)
225
+ pieces.push(text.slice(at, start));
226
+ pieces.push(b `<mark part="mark">${text.slice(start, end)}</mark>`);
227
+ at = end;
228
+ }
229
+ if (at < text.length)
230
+ pieces.push(text.slice(at));
231
+ return b `${pieces}`;
232
+ }
233
+ };
234
+ Highlight.styles = [css_248z];
235
+ __decorate([
236
+ n({ reflect: true })
237
+ ], Highlight.prototype, "query", void 0);
238
+ __decorate([
239
+ n({ attribute: false })
240
+ ], Highlight.prototype, "ranges", void 0);
241
+ __decorate([
242
+ n({ reflect: true })
243
+ ], Highlight.prototype, "locale", void 0);
244
+ __decorate([
245
+ r()
246
+ ], Highlight.prototype, "text", void 0);
247
+ Highlight = __decorate([
248
+ IndividualComponent
249
+ ], Highlight);
250
+
251
+ export { Highlight as H, findMatches as f };
252
+ //# sourceMappingURL=highlight-Be0wu7kh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-Be0wu7kh.js","sources":["../../src/highlight/matches.ts","../../src/highlight/highlight.ts"],"sourcesContent":["/** A run of marked text: `[start, end)` in UTF-16 code units of the original text. */\nexport type HighlightRange = [start: number, end: number];\n\n/**\n * Folds text for matching: lower case in the locale, accents and other combining marks removed.\n * Returns the folded text and, for each of its code units, the original text's range it came from,\n * so a match in the folded text maps back to the original even when folding changes lengths.\n */\nfunction fold(text: string, locale: string) {\n let folded = '';\n const starts: number[] = [];\n const ends: number[] = [];\n let offset = 0;\n for (const char of text) {\n const piece = char\n .normalize('NFD')\n .replace(/\\p{M}/gu, '')\n .toLocaleLowerCase(locale);\n for (let i = 0; i < piece.length; i += 1) {\n starts.push(offset);\n ends.push(offset + char.length);\n }\n // A mark that folds away, such as a combining accent, belongs to the letter before it.\n if (!piece && ends.length) ends[ends.length - 1] = offset + char.length;\n folded += piece;\n offset += char.length;\n }\n return { folded, starts, ends };\n}\n\n/**\n * The words of a query to look for, longest first so a longer word wins where two overlap.\n * One-letter words are left out when the query has longer ones, so \"reset a password\" does not\n * mark every \"a\".\n */\nfunction queryWords(query: string, locale: string): string[] {\n const words = Array.from(\n new Set(\n fold(query, locale)\n .folded.split(/[\\s\\p{P}]+/u)\n .filter(Boolean),\n ),\n );\n const long = words.filter(word => [...word].length > 1);\n return (long.length ? long : words).sort((a, b) => b.length - a.length);\n}\n\n/** Sorts ranges and merges the ones that touch or overlap. */\nexport function mergeRanges(ranges: readonly HighlightRange[], length: number) {\n const sorted = ranges\n .map(\n ([start, end]): HighlightRange => [\n Math.max(0, Math.min(start, length)),\n Math.max(0, Math.min(end, length)),\n ],\n )\n .filter(([start, end]) => end > start)\n .sort((a, b) => a[0] - b[0]);\n const merged: HighlightRange[] = [];\n for (const range of sorted) {\n const last = merged[merged.length - 1];\n if (last && range[0] <= last[1]) last[1] = Math.max(last[1], range[1]);\n else merged.push([range[0], range[1]]);\n }\n return merged;\n}\n\n/**\n * Where the words of `query` occur in `text`, each word on its own, ignoring case and accents.\n * Ranges are sorted and do not overlap.\n */\nexport function findMatches(\n text: string,\n query: string,\n locale = 'en',\n): HighlightRange[] {\n const words = queryWords(query, locale);\n if (!text || !words.length) return [];\n const { folded, starts, ends } = fold(text, locale);\n const taken = new Array<boolean>(folded.length).fill(false);\n const ranges: HighlightRange[] = [];\n for (const word of words) {\n let from = folded.indexOf(word);\n while (from !== -1) {\n const to = from + word.length;\n if (!taken.slice(from, to).some(Boolean)) {\n taken.fill(true, from, to);\n ranges.push([starts[from], ends[to - 1]]);\n }\n from = folded.indexOf(word, to);\n }\n }\n return mergeRanges(ranges, text.length);\n}\n","import { html, LitElement, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { resolveLocale } from '@/__internal/i18n/locale.js';\nimport { findMatches, type HighlightRange, mergeRanges } from './matches.js';\nimport styles from './highlight.scss';\n\nexport type { HighlightRange } from './matches.js';\n\n/**\n * @label Highlight\n * @tag wc-highlight\n * @rawTag highlight\n *\n * @summary Marks the words of a search query in a piece of text.\n * @overview\n * <p>Highlight shows its text with each word of <code>query</code> marked, for search results in a\n * knowledge base, a site search or a filtered list. Words match on their own, in any order,\n * ignoring case and accents, so \"resume\" marks \"Résumé\".</p>\n * <p>It reads its children as plain text and never parses HTML, so text from records or a search\n * index is safe to put in it. When the server already knows where the matches are, set\n * <code>ranges</code> instead of <code>query</code>.</p>\n * <p>Marks use the tertiary container colour, so they differ from links and from the selection.</p>\n *\n * @slot - The text. Only its text content is used; markup in it is not rendered.\n *\n * @csspart mark - Each marked run of text, a `<mark>` element.\n *\n * @cssprop --highlight-background - Background of the marks. Defaults to `--color-tertiary-container`.\n * @cssprop --highlight-color - Text colour of the marks. Defaults to `--color-on-tertiary-container`.\n *\n * @example\n * ```html\n * <wc-highlight query=\"reset password\">\n * If you forgot your password, choose Forgot password and reset it from the link we email you.\n * </wc-highlight>\n * ```\n * @tags display search\n */\n@IndividualComponent\nexport class Highlight extends LitElement {\n // ── Static ───────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** The search query whose words are marked. */\n @property({ reflect: true })\n query = '';\n\n /**\n * Runs to mark, as `[start, end)` offsets in the element's `textContent`, for matches the server\n * already found. When set, `query` is ignored.\n */\n @property({ attribute: false })\n ranges?: HighlightRange[];\n\n /** The language to fold case in. Defaults to the nearest `lang`, else the browser's. */\n @property({ reflect: true })\n locale?: string;\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** The element's text content. */\n @state() private text = '';\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** Watches the text, so the marks follow when it changes. */\n private readonly textObserver = new MutationObserver(() => this.syncText());\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n override connectedCallback() {\n super.connectedCallback();\n this.syncText();\n this.textObserver.observe(this, {\n childList: true,\n characterData: true,\n subtree: true,\n });\n }\n\n override disconnectedCallback() {\n this.textObserver.disconnect();\n super.disconnectedCallback();\n }\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n this.syncText();\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n /** The runs to mark, as `[start, end)` offsets in the text. */\n private get marks(): HighlightRange[] {\n if (this.ranges) return mergeRanges(this.ranges, this.text.length);\n return findMatches(this.text, this.query, resolveLocale(this.locale, this));\n }\n\n private syncText() {\n // Kept as is, so `ranges` offsets match the text; CSS collapses the whitespace when it renders.\n const text = this.textContent ?? '';\n if (text !== this.text) this.text = text;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n const { text } = this;\n const pieces = [];\n let at = 0;\n for (const [start, end] of this.marks) {\n if (start > at) pieces.push(text.slice(at, start));\n pieces.push(html`<mark part=\"mark\">${text.slice(start, end)}</mark>`);\n at = end;\n }\n if (at < text.length) pieces.push(text.slice(at));\n return html`${pieces}`;\n }\n}\n"],"names":["LitElement","html","styles","property","state"],"mappings":";;;;;AAGA;;;;AAIG;AACH,SAAS,IAAI,CAAC,IAAY,EAAE,MAAc,EAAA;IACxC,IAAI,MAAM,GAAG,EAAE;IACf,MAAM,MAAM,GAAa,EAAE;IAC3B,MAAM,IAAI,GAAa,EAAE;IACzB,IAAI,MAAM,GAAG,CAAC;AACd,IAAA,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;QACvB,MAAM,KAAK,GAAG;aACX,SAAS,CAAC,KAAK;AACf,aAAA,OAAO,CAAC,SAAS,EAAE,EAAE;aACrB,iBAAiB,CAAC,MAAM,CAAC;AAC5B,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AACxC,YAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACjC;;AAEA,QAAA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM;AAAE,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,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AAM,CAAC;AAMxB,UAAA,CAAA;AADC,IAAAC,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAOX,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;AACJ,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAI1B,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AACX,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAKC,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAAqB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAzBhB,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CAkFrB;;;;"}
@@ -0,0 +1,6 @@
1
+ import './IndividualComponent-BK7XZjE2.js';
2
+ import './property-B2TG3KEE.js';
3
+ import './state-BCeDVCI9.js';
4
+ import './locale-DEsJZCQG.js';
5
+ export { H as Highlight } from './highlight-Be0wu7kh.js';
6
+ //# sourceMappingURL=highlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,5 +1,5 @@
1
1
  import { i, _ as __decorate, I as IndividualComponent } from './IndividualComponent-BK7XZjE2.js';
2
- import { R as RichTextInput } from './rich-text-input-N_hqnXej.js';
2
+ import { R as RichTextInput } from './rich-text-input-C4B9D6oD.js';
3
3
  import './property-B2TG3KEE.js';
4
4
  import './state-BCeDVCI9.js';
5
5
  import './query-CHb9Ft_d.js';
@@ -17,12 +17,12 @@ import './floating-controller-CABF4tBT.js';
17
17
  import './overlay-controller-BOk-kfil.js';
18
18
  import './mention--NNhafc7.js';
19
19
  import './url-BFUh__RO.js';
20
- import './BaseInput-DtZH0fPJ.js';
20
+ import './BaseInput-DZp2O8Gh.js';
21
21
  import './element-internals-QME0yEz4.js';
22
22
  import './form-associated-BHbg72PG.js';
23
- import './strings-DnYjGbbc.js';
23
+ import './strings-MXyrGrNs.js';
24
24
  import './suggestion-controller-7YRQqkaI.js';
25
- import './i18n-controller-DJHsE1YH.js';
25
+ import './i18n-controller-DLJcJ5gO.js';
26
26
 
27
27
  var css_248z = i`* {
28
28
  box-sizing: border-box;
@@ -251,6 +251,22 @@ img.ProseMirror-separator {
251
251
  flex: 1;
252
252
  }
253
253
 
254
+ .read-only-badge {
255
+ display: inline-flex;
256
+ align-items: center;
257
+ gap: var(--spacing-050, 0.25rem);
258
+ padding: 0 var(--spacing-100, 0.5rem);
259
+ color: var(--color-on-surface-variant);
260
+ font-family: var(--typography-label-small-font-family) !important;
261
+ font-size: var(--typography-label-small-font-size) !important;
262
+ font-weight: var(--typography-label-small-font-weight) !important;
263
+ line-height: var(--typography-label-small-line-height) !important;
264
+ letter-spacing: var(--typography-label-small-letter-spacing) !important;
265
+ }
266
+ .read-only-badge wc-icon {
267
+ --icon-size: 0.875rem;
268
+ }
269
+
254
270
  .editor-area {
255
271
  --_pad: var(--spacing-150, 0.75rem);
256
272
  position: relative;
@@ -500,9 +516,12 @@ img.ProseMirror-separator {
500
516
  border-radius: 0;
501
517
  }
502
518
 
519
+ :host([disabled]) .toolbar,
520
+ :host([disabled]) .editor-area {
521
+ opacity: var(--state-disabled-content-opacity, 0.38);
522
+ }
503
523
  :host([disabled]) .editor-area {
504
524
  cursor: not-allowed;
505
- opacity: 0.6;
506
525
  }
507
526
 
508
527
  :host([readonly]) .editor-area {
@@ -516,13 +535,6 @@ img.ProseMirror-separator {
516
535
  padding-block: var(--spacing-100, 0.5rem);
517
536
  }
518
537
 
519
- .state-tag {
520
- position: absolute;
521
- inset-block-start: var(--spacing-050, 0.25rem);
522
- inset-inline-end: var(--spacing-050, 0.25rem);
523
- z-index: 1;
524
- }
525
-
526
538
  .slash-anchor,
527
539
  .bubble-anchor,
528
540
  .link-anchor {
@@ -981,6 +993,11 @@ img.ProseMirror-separator {
981
993
  * <code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,
982
994
  * <code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>
983
995
  *
996
+ * <p><strong>Read-only and disabled.</strong> <code>readonly</code> keeps the text at full contrast
997
+ * and leaves only <strong>View source</strong> in the toolbar, which shows the HTML read-only.
998
+ * <code>disabled</code> dims the toolbar and the text. <code>show-readonly-badge</code> adds a
999
+ * lock badge to the toolbar in either state.</p>
1000
+ *
984
1001
  * @cssprop --rich-text-editor-background - Background behind the text.
985
1002
  * @cssprop --prose-link-color - Color of links.
986
1003
  * @cssprop --prose-mention-background - Background of mention chips.
@@ -1 +1 @@
1
- {"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A rich-text field whose value is HTML, with the same toolbar and mentions as the Markdown editor.\n * @overview\n * <p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n * <code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\n * mentions and a <strong>View source</strong> button that shows the HTML in\n * <code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\n * Markdown cannot, so the HTML editor offers them.</p>\n *\n * <p>Get and set the HTML through <code>value</code>; an empty editor has the value\n * <code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\n * value are dropped when it loads.</p>\n *\n * <p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\n * default) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n * <code>suggestions</code>. A mention is stored as\n * <code>&lt;span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\"&gt;@Ana Lima&lt;/span&gt;</code>.</p>\n *\n * <p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n * <code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n * <code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>\n *\n * @cssprop --rich-text-editor-background - Background behind the text.\n * @cssprop --prose-link-color - Color of links.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --prose-code-background - Background of inline code and code blocks.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n * @cssprop --mention-list-max-height - Maximum height of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves the editor after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-html-editor\n * label=\"Email body\"\n * value=\"<p>Hello <strong>world</strong></p>\"\n * ></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'html' as const;\n\n protected readonly sourceLanguage = 'html' as const;\n\n protected readonly sourceIcon = 'html';\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getHTML();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'html' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('enterTextPlaceholder');\n }\n}\n"],"names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AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,aAAa,CAAA;AAAtC,IAAA,WAAA,GAAA;;;;QAOc,IAAA,CAAA,OAAO,GAAG,MAAe;QAEzB,IAAA,CAAA,cAAc,GAAG,MAAe;QAEhC,IAAA,CAAA,UAAU,GAAG,MAAM;IAexC;;AAXY,IAAA,cAAc,CAAC,MAAc,EAAA;AACrC,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE;IAC3D;AAEU,IAAA,UAAU,CAAC,KAAa,EAAA;QAChC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;IACtD;IAEU,kBAAkB,GAAA;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC5C;;AAtBO,UAAA,CAAA,MAAM,GAAG,CAACA,QAAM,CAAC;AAHb,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA0BtB;;;;"}
1
+ {"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A rich-text field whose value is HTML, with the same toolbar and mentions as the Markdown editor.\n * @overview\n * <p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n * <code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\n * mentions and a <strong>View source</strong> button that shows the HTML in\n * <code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\n * Markdown cannot, so the HTML editor offers them.</p>\n *\n * <p>Get and set the HTML through <code>value</code>; an empty editor has the value\n * <code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\n * value are dropped when it loads.</p>\n *\n * <p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\n * default) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n * <code>suggestions</code>. A mention is stored as\n * <code>&lt;span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\"&gt;@Ana Lima&lt;/span&gt;</code>.</p>\n *\n * <p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n * <code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n * <code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>\n *\n * <p><strong>Read-only and disabled.</strong> <code>readonly</code> keeps the text at full contrast\n * and leaves only <strong>View source</strong> in the toolbar, which shows the HTML read-only.\n * <code>disabled</code> dims the toolbar and the text. <code>show-readonly-badge</code> adds a\n * lock badge to the toolbar in either state.</p>\n *\n * @cssprop --rich-text-editor-background - Background behind the text.\n * @cssprop --prose-link-color - Color of links.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --prose-code-background - Background of inline code and code blocks.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n * @cssprop --mention-list-max-height - Maximum height of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves the editor after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-html-editor\n * label=\"Email body\"\n * value=\"<p>Hello <strong>world</strong></p>\"\n * ></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'html' as const;\n\n protected readonly sourceLanguage = 'html' as const;\n\n protected readonly sourceIcon = 'html';\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getHTML();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'html' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('enterTextPlaceholder');\n }\n}\n"],"names":["styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,aAAa,CAAA;AAAtC,IAAA,WAAA,GAAA;;;;QAOc,IAAA,CAAA,OAAO,GAAG,MAAe;QAEzB,IAAA,CAAA,cAAc,GAAG,MAAe;QAEhC,IAAA,CAAA,UAAU,GAAG,MAAM;IAexC;;AAXY,IAAA,cAAc,CAAC,MAAc,EAAA;AACrC,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE;IAC3D;AAEU,IAAA,UAAU,CAAC,KAAa,EAAA;QAChC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;IACtD;IAEU,kBAAkB,GAAA;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC5C;;AAtBO,UAAA,CAAA,MAAM,GAAG,CAACA,QAAM,CAAC;AAHb,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA0BtB;;;;"}
@@ -1,4 +1,4 @@
1
- import { o as onPeacockStringsChange, p as peacockString } from './strings-DnYjGbbc.js';
1
+ import { o as onPeacockStringsChange, p as peacockString } from './strings-MXyrGrNs.js';
2
2
  import { r as resolveLocale } from './locale-DEsJZCQG.js';
3
3
 
4
4
  /**
@@ -33,4 +33,4 @@ class I18nController {
33
33
  }
34
34
 
35
35
  export { I18nController as I };
36
- //# sourceMappingURL=i18n-controller-DJHsE1YH.js.map
36
+ //# sourceMappingURL=i18n-controller-DLJcJ5gO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-controller-DJHsE1YH.js","sources":["../../src/__internal/i18n/i18n-controller.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport {\n onPeacockStringsChange,\n peacockString,\n type PeacockStringKey,\n type PeacockStrings,\n} from './strings.js';\nimport { resolveLocale } from './locale.js';\n\ntype Host = ReactiveControllerHost &\n HTMLElement & {\n /** Per-instance string overrides, on components that render many strings. */\n strings?: Partial<PeacockStrings>;\n /** The component's own locale, on components that format numbers or dates. */\n locale?: string;\n };\n\n/**\n * Gives a component its strings and locale, and re-renders it when the app calls\n * `setPeacockStrings()`.\n *\n * @example\n * private readonly i18n = new I18nController(this);\n * // in render(): aria-label=${this.i18n.t('dismiss')}\n */\nexport class I18nController implements ReactiveController {\n private readonly host: Host;\n\n private stopListening?: () => void;\n\n constructor(host: Host) {\n this.host = host;\n host.addController(this);\n }\n\n hostConnected() {\n this.stopListening = onPeacockStringsChange(() =>\n this.host.requestUpdate(),\n );\n }\n\n hostDisconnected() {\n this.stopListening?.();\n this.stopListening = undefined;\n }\n\n /** The string for `key`: the instance's override, else the app's, else the English default. */\n t<K extends PeacockStringKey>(key: K): PeacockStrings[K] {\n const override = this.host.strings?.[key];\n return (override ?? peacockString(key)) as PeacockStrings[K];\n }\n\n /** The locale to format with: the host's `locale`, else the nearest `lang`, else the browser's. */\n get locale(): string {\n return resolveLocale(this.host.locale, this.host);\n }\n}\n"],"names":[],"mappings":";;;AAiBA;;;;;;;AAOG;MACU,cAAc,CAAA;AAKzB,IAAA,WAAA,CAAY,IAAU,EAAA;AACpB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;IAC1B;IAEA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,GAAG,sBAAsB,CAAC,MAC1C,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAC1B;IACH;IAEA,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,aAAa,IAAI;AACtB,QAAA,IAAI,CAAC,aAAa,GAAG,SAAS;IAChC;;AAGA,IAAA,CAAC,CAA6B,GAAM,EAAA;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACzC,QAAQ,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC;IACxC;;AAGA,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IACnD;AACD;;;;"}
1
+ {"version":3,"file":"i18n-controller-DLJcJ5gO.js","sources":["../../src/__internal/i18n/i18n-controller.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport {\n onPeacockStringsChange,\n peacockString,\n type PeacockStringKey,\n type PeacockStrings,\n} from './strings.js';\nimport { resolveLocale } from './locale.js';\n\ntype Host = ReactiveControllerHost &\n HTMLElement & {\n /** Per-instance string overrides, on components that render many strings. */\n strings?: Partial<PeacockStrings>;\n /** The component's own locale, on components that format numbers or dates. */\n locale?: string;\n };\n\n/**\n * Gives a component its strings and locale, and re-renders it when the app calls\n * `setPeacockStrings()`.\n *\n * @example\n * private readonly i18n = new I18nController(this);\n * // in render(): aria-label=${this.i18n.t('dismiss')}\n */\nexport class I18nController implements ReactiveController {\n private readonly host: Host;\n\n private stopListening?: () => void;\n\n constructor(host: Host) {\n this.host = host;\n host.addController(this);\n }\n\n hostConnected() {\n this.stopListening = onPeacockStringsChange(() =>\n this.host.requestUpdate(),\n );\n }\n\n hostDisconnected() {\n this.stopListening?.();\n this.stopListening = undefined;\n }\n\n /** The string for `key`: the instance's override, else the app's, else the English default. */\n t<K extends PeacockStringKey>(key: K): PeacockStrings[K] {\n const override = this.host.strings?.[key];\n return (override ?? peacockString(key)) as PeacockStrings[K];\n }\n\n /** The locale to format with: the host's `locale`, else the nearest `lang`, else the browser's. */\n get locale(): string {\n return resolveLocale(this.host.locale, this.host);\n }\n}\n"],"names":[],"mappings":";;;AAiBA;;;;;;;AAOG;MACU,cAAc,CAAA;AAKzB,IAAA,WAAA,CAAY,IAAU,EAAA;AACpB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;IAC1B;IAEA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,GAAG,sBAAsB,CAAC,MAC1C,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAC1B;IACH;IAEA,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,aAAa,IAAI;AACtB,QAAA,IAAI,CAAC,aAAa,GAAG,SAAS;IAChC;;AAGA,IAAA,CAAC,CAA6B,GAAM,EAAA;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACzC,QAAQ,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC;IACxC;;AAGA,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IACnD;AACD;;;;"}
package/dist/image.js CHANGED
@@ -3,9 +3,9 @@ import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
5
  import { o as observeThemeChange } from './observe-theme-change-CkSENG98.js';
6
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
6
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
7
7
  import './base-Cl6v8-BZ.js';
8
- import './strings-DnYjGbbc.js';
8
+ import './strings-MXyrGrNs.js';
9
9
  import './locale-DEsJZCQG.js';
10
10
 
11
11
  /**
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { d as defaultStrings, s as setPeacockStrings } from './strings-DnYjGbbc.js';
1
+ export { d as defaultStrings, s as setPeacockStrings } from './strings-MXyrGrNs.js';
2
2
  export { Icon } from './icon.js';
3
3
  export { s as setIconBase } from './datasource-OwvH7SVq.js';
4
4
  export { Avatar } from './avatar.js';
@@ -63,7 +63,7 @@ export { MarkdownEditor } from './markdown-editor.js';
63
63
  export { Markdown } from './markdown.js';
64
64
  export { e as extractMentions } from './markdown-lexer-Bx4Vkpu6.js';
65
65
  export { m as mentionToMarkdown } from './mention--NNhafc7.js';
66
- export { D as DocumentEditor, e as emptyDocument, n as normalizeDocument } from './document-editor-Dc8JeFVB.js';
66
+ export { D as DocumentEditor, e as emptyDocument, n as normalizeDocument } from './document-editor-C8ThjDQ7.js';
67
67
  export { Image } from './image.js';
68
68
  export { Svg } from './svg.js';
69
69
  export { Tab } from './tab.js';
@@ -103,6 +103,15 @@ export { NavigationBarItem } from './navigation-bar-item.js';
103
103
  export { NavigationDrawer } from './navigation-drawer.js';
104
104
  export { NavigationDrawerItem } from './navigation-drawer-item.js';
105
105
  export { NavigationDrawerGroup } from './navigation-drawer-group.js';
106
+ export { SiteHeader } from './site-header.js';
107
+ export { SiteNavMenu } from './site-nav-menu.js';
108
+ export { SiteNavGroup } from './site-nav-group.js';
109
+ export { SiteNavLink } from './site-nav-link.js';
110
+ export { SiteFooter } from './site-footer.js';
111
+ export { SiteFooterGroup } from './site-footer-group.js';
112
+ export { Carousel } from './carousel.js';
113
+ export { V as Video, p as parseVideoSource } from './video-IwNmHyft.js';
114
+ export { H as Highlight, f as findMatches } from './highlight-Be0wu7kh.js';
106
115
  export { Listbox } from './listbox.js';
107
116
  export { ListboxOption } from './listbox-option.js';
108
117
  export { PinInput } from './pin-input.js';
@@ -161,8 +170,8 @@ export { AssistantSteps } from './assistant-steps.js';
161
170
  export { AssistantStep } from './assistant-step.js';
162
171
  export { DraftCard } from './draft-card.js';
163
172
  export { AiSummary } from './ai-summary.js';
164
- export { G as GenerativeView, p as parsePartialJson } from './generative-view-BKlcuujw.js';
165
- export { g as generativeViewSchema } from './schema-Dy0z-80u.js';
173
+ export { G as GenerativeView, p as parsePartialJson } from './generative-view-CQ8-g1wY.js';
174
+ export { g as generativeViewSchema } from './schema-CPhNrjrx.js';
166
175
  export { AssistantPanel } from './assistant-panel.js';
167
176
  export { HoverCard } from './hover-card.js';
168
177
  export { Kanban, applyKanbanMove } from './kanban.js';
@@ -178,7 +187,7 @@ export { I as Illustration, i as illustrationNames, r as registerIllustration }
178
187
  export { Calendar } from './calendar.js';
179
188
  export { CalendarColumnView } from './calendar-column-view.js';
180
189
  export { CalendarMonthView } from './calendar-month-view.js';
181
- export { D as Diagram } from './diagram-Va096vj9.js';
190
+ export { D as Diagram } from './diagram-Cnrj-4y3.js';
182
191
  export { Flow } from './flow.js';
183
192
  export { DiagramControls } from './diagram-controls.js';
184
193
  export { Workflow } from './workflow.js';
@@ -189,7 +198,7 @@ export { Erd } from './erd.js';
189
198
  export { DiagramMinimap } from './diagram-minimap.js';
190
199
  export { ConditionBuilder } from './condition-builder.js';
191
200
  export { CbGroup } from './cb-group.js';
192
- export { C as CbRule } from './cb-group-base-CO30uFQZ.js';
201
+ export { C as CbRule } from './cb-group-base-Bf7iOIGS.js';
193
202
  export { CbDivider } from './cb-divider.js';
194
203
  export { W as WORKFLOW_LOGIC_STEPS } from './workflow-model-CauduOG2.js';
195
204
  import './IndividualComponent-BK7XZjE2.js';
@@ -215,38 +224,38 @@ import './warn-once-BNxX1Y98.js';
215
224
  import './form-associated-BHbg72PG.js';
216
225
  import './is-link-Dk2OV3PM.js';
217
226
  import './hyperlink-DycWPKwU.js';
218
- import './i18n-controller-DJHsE1YH.js';
227
+ import './i18n-controller-DLJcJ5gO.js';
219
228
  import './menu-trigger-controller-CEJq1ugC.js';
220
229
  import './attachable-controller-DofeyflD.js';
221
230
  import './query-assigned-elements-BJaGSqM0.js';
222
231
  import './roving-focus-controller-fm95JkZJ.js';
223
232
  import './NativeHyperlinkMixin-WdY0fM-H.js';
224
233
  import './spread-B5cgadZl.js';
225
- import './BaseInput-DtZH0fPJ.js';
234
+ import './BaseInput-DZp2O8Gh.js';
226
235
  import './suggestion-controller-7YRQqkaI.js';
227
236
  import './style-map-CHOg6N_R.js';
228
- import './base-progress-D7Nmfh1s.js';
229
- import './BaseField-_unSNU5x.js';
237
+ import './base-progress-CKQ32Ruw.js';
238
+ import './BaseField-CHBcjVc2.js';
230
239
  import './date-vFrYT1S9.js';
231
240
  import './utils-D92ldd1V.js';
232
- import './picker-field-CUI05sWc.js';
241
+ import './picker-field-B5xOFc3-.js';
233
242
  import './range-utils-BoKOhxVX.js';
234
- import './toggle-base-CXmFSp3b.js';
243
+ import './toggle-base-I1wE_fVe.js';
235
244
  import './floating-controller-CABF4tBT.js';
236
245
  import './placement-C4GO0JP9.js';
237
246
  import './overlay-controller-BOk-kfil.js';
238
247
  import './query-all-ThKhg-Lp.js';
239
248
  import './token-colors-DEO6rvEu.js';
240
249
  import './observe-theme-change-CkSENG98.js';
241
- import './rich-text-input-N_hqnXej.js';
250
+ import './rich-text-input-C4B9D6oD.js';
242
251
  import './slash-controller-DAsDquPA.js';
243
252
  import './diff-CT416thw.js';
244
253
  import './sparkle-BmtM0vbq.js';
245
254
  import './url-BFUh__RO.js';
246
255
  import './transform-CxeQFXXB.js';
247
- import './chart-base-C_XKVyhf.js';
256
+ import './chart-base-ByCJM_9C.js';
248
257
  import './path-CJ0Arqcy.js';
249
- import './cartesian-chart-CS5yRLfE.js';
258
+ import './cartesian-chart-DqZxnoG1.js';
250
259
  import './repeat-D_ERDRYT.js';
251
260
  import './directive-helpers-Bx3mu42O.js';
252
261
  import './virtual-window-5OYyIqZh.js';
@@ -254,12 +263,13 @@ import './modal-B78gUfEO.js';
254
263
  import './live-D_5OfuGD.js';
255
264
  import './navigation-item-base-kUrvJgCx.js';
256
265
  import './indicator-navigation-item-CmyhsOmy.js';
266
+ import './site-nav-shared-BDR2HG8e.js';
257
267
  import './platform-BUuoTAmr.js';
258
268
  import './relative-time-BNxqvEbg.js';
259
269
  import './discussion-time-DqykqvNy.js';
260
270
  import './calendar-event-_OYdAT3c.js';
261
271
  import './event-manager-CWAWPOUE.js';
262
- import './canvas-base-CWQ4rQ2s.js';
272
+ import './canvas-base-BoKef3yr.js';
263
273
  import './geometry-INg82Lxq.js';
264
274
  import './host-CZK7xhzh.js';
265
275
  import './measure-controller-Dmc5hZKg.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,10 +3,10 @@ import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
6
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
7
7
  import './base-Cl6v8-BZ.js';
8
8
  import './directive-ZPhl09Yt.js';
9
- import './strings-DnYjGbbc.js';
9
+ import './strings-MXyrGrNs.js';
10
10
  import './locale-DEsJZCQG.js';
11
11
 
12
12
  var css_248z = i`* {
package/dist/input.js CHANGED
@@ -2,12 +2,12 @@ import { i, _ as __decorate, I as IndividualComponent, A, b } from './Individual
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { e } from './query-CHb9Ft_d.js';
4
4
  import { s as spread } from './spread-B5cgadZl.js';
5
- import { B as BaseField } from './BaseField-_unSNU5x.js';
6
- import { n as nativeValidity } from './BaseInput-DtZH0fPJ.js';
5
+ import { B as BaseField } from './BaseField-CHBcjVc2.js';
6
+ import { n as nativeValidity } from './BaseInput-DZp2O8Gh.js';
7
7
  import './base-Cl6v8-BZ.js';
8
8
  import './directive-ZPhl09Yt.js';
9
9
  import './state-BCeDVCI9.js';
10
- import './strings-DnYjGbbc.js';
10
+ import './strings-MXyrGrNs.js';
11
11
  import './element-internals-QME0yEz4.js';
12
12
  import './form-associated-BHbg72PG.js';
13
13
  import './suggestion-controller-7YRQqkaI.js';
@@ -2,12 +2,12 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { c } from './repeat-D_ERDRYT.js';
5
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
5
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
6
6
  import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
7
7
  import { w as writeClipboardText } from './clipboard-C7hBdUXP.js';
8
8
  import './directive-ZPhl09Yt.js';
9
9
  import './directive-helpers-Bx3mu42O.js';
10
- import './strings-DnYjGbbc.js';
10
+ import './strings-MXyrGrNs.js';
11
11
  import './locale-DEsJZCQG.js';
12
12
 
13
13
  /** Keys that JSONPath can write with dot notation. */
package/dist/kanban.js CHANGED
@@ -2,11 +2,11 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, D, A, b } from
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { c } from './repeat-D_ERDRYT.js';
5
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
5
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
6
6
  import { i as isRtl } from './locale-DEsJZCQG.js';
7
7
  import './directive-ZPhl09Yt.js';
8
8
  import './directive-helpers-Bx3mu42O.js';
9
- import './strings-DnYjGbbc.js';
9
+ import './strings-MXyrGrNs.js';
10
10
 
11
11
  var css_248z = i`* {
12
12
  box-sizing: border-box;