@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
@@ -5,8 +5,8 @@ import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
6
  import { o } from './style-map-CHOg6N_R.js';
7
7
  import { b as blocksFor, R as RichTextMentionController, a as RichTextAiController, c as RichTextSlashController, d as RichTextLinkController, e as RichTextBubbleController, f as RichTextBlockHandleController, B as BLOCKS, S as SET_VALUE_META, E as Editor, g as buildExtensions, h as activeTextStyle, m as marksFor } from './slash-controller-DAsDquPA.js';
8
- import { B as BaseInput } from './BaseInput-DtZH0fPJ.js';
9
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
8
+ import { B as BaseInput } from './BaseInput-DZp2O8Gh.js';
9
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
10
10
 
11
11
  /** The table commands offered while the caret is in a table. */
12
12
  const TABLE_ACTIONS = [
@@ -80,6 +80,8 @@ class RichTextInput extends BaseInput {
80
80
  this.debounce = 250;
81
81
  /** Hides the fixed toolbar; formatting stays available from the selection bubble, `/` and shortcuts. */
82
82
  this.hideToolbar = false;
83
+ /** Shows a "Read only" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`. */
84
+ this.showReadonlyBadge = false;
83
85
  /** Height of the empty editor, in lines. */
84
86
  this.rows = 4;
85
87
  /** Characters that start a mention, such as `"@"` or `"@#"`. Empty turns mentions off. */
@@ -464,18 +466,30 @@ class RichTextInput extends BaseInput {
464
466
  : A}
465
467
  ${this.renderTableTools(editor)} ${this.ai.toolbarButton()}`;
466
468
  }
469
+ /**
470
+ * The toolbar. A read-only or disabled editor shows no formatting tools, which could do
471
+ * nothing: only View source, and the "Read only" badge with `show-readonly-badge`.
472
+ */
467
473
  renderToolbar() {
468
474
  if (this.hideToolbar)
469
475
  return A;
470
476
  const { editor, i18n } = this;
477
+ const locked = this.disabled || this.readonly;
471
478
  return b `<wc-toolbar
472
479
  class="toolbar"
473
480
  variant="flat"
474
481
  aria-label=${i18n.t('formattingToolbar')}
475
482
  @mousedown=${this.keepSelection}
476
483
  >
477
- ${editor && !this.sourceView ? this.renderTools(editor) : A}
484
+ ${editor && !this.sourceView && !locked
485
+ ? this.renderTools(editor)
486
+ : A}
478
487
  <span class="toolbar-spacer" aria-hidden="true"></span>
488
+ ${locked && this.showReadonlyBadge
489
+ ? b `<span class="read-only-badge">
490
+ <wc-icon name="lock"></wc-icon>${i18n.t('readOnly')}
491
+ </span>`
492
+ : A}
479
493
  <wc-icon-button
480
494
  class="tool source-toggle"
481
495
  variant="text"
@@ -492,19 +506,6 @@ class RichTextInput extends BaseInput {
492
506
  ></wc-icon-button>
493
507
  </wc-toolbar>`;
494
508
  }
495
- renderStateTag() {
496
- if (this.disabled) {
497
- return b `<wc-tag class="state-tag" intent="danger"
498
- >${this.i18n.t('disabled')}</wc-tag
499
- >`;
500
- }
501
- if (this.readonly) {
502
- return b `<wc-tag class="state-tag" intent="danger"
503
- >${this.i18n.t('readOnlyTag')}</wc-tag
504
- >`;
505
- }
506
- return A;
507
- }
508
509
  /** The count below the field, with `maxlength`. */
509
510
  textCount() {
510
511
  const max = this.maxlength;
@@ -581,7 +582,6 @@ class RichTextInput extends BaseInput {
581
582
  ></wc-code-editor>
582
583
  </div>`
583
584
  : A}
584
- ${this.renderStateTag()}
585
585
  </div>
586
586
  </wc-field>
587
587
  ${this.renderPopups()}
@@ -618,6 +618,9 @@ __decorate([
618
618
  __decorate([
619
619
  n({ type: Boolean, attribute: 'hide-toolbar' })
620
620
  ], RichTextInput.prototype, "hideToolbar", void 0);
621
+ __decorate([
622
+ n({ type: Boolean, attribute: 'show-readonly-badge' })
623
+ ], RichTextInput.prototype, "showReadonlyBadge", void 0);
621
624
  __decorate([
622
625
  n({ type: Number, attribute: 'maxlength' })
623
626
  ], RichTextInput.prototype, "maxlength", void 0);
@@ -656,4 +659,4 @@ __decorate([
656
659
  ], RichTextInput.prototype, "editorRoot", void 0);
657
660
 
658
661
  export { RichTextInput as R };
659
- //# sourceMappingURL=rich-text-input-N_hqnXej.js.map
662
+ //# sourceMappingURL=rich-text-input-C4B9D6oD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-input-C4B9D6oD.js","sources":["../../src/__internal/rich-text/rich-text-input.ts"],"sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { Editor, type Content, type Extensions } from '@tiptap/core';\n\nimport BaseInput, { type ControlValidity } from '../../input/BaseInput.js';\nimport { I18nController } from '../i18n/i18n-controller.js';\nimport type { PeacockStrings } from '../i18n/strings.js';\nimport type { MentionSuggestion } from '../../mention-input/mention-model.js';\nimport { RichTextAiController } from './ai-controller.js';\nimport { RichTextBlockHandleController } from './block-handle-controller.js';\nimport { RichTextBubbleController } from './bubble-controller.js';\nimport {\n activeTextStyle,\n BLOCKS,\n blocksFor,\n marksFor,\n type BlockCommand,\n} from './commands.js';\nimport {\n buildExtensions,\n SET_VALUE_META,\n type RichTextProfile,\n} from './extensions.js';\nimport { RichTextLinkController } from './link-controller.js';\nimport {\n RichTextMentionController,\n type RichTextMentionHost,\n} from './mention-controller.js';\nimport { RichTextSlashController } from './slash-controller.js';\n\n/** What the editor's constructor takes as its first content. */\nexport interface RichTextContent {\n content: Content;\n contentType?: 'markdown' | 'html' | 'json';\n}\n\n/** The table commands offered while the caret is in a table. */\nconst TABLE_ACTIONS = [\n 'addRowBelow',\n 'addColumnAfter',\n 'deleteRow',\n 'deleteColumn',\n 'deleteTable',\n] as const;\n\ntype TableAction = (typeof TABLE_ACTIONS)[number];\n\n/**\n * The shared base of Peacock's rich-text fields (`wc-markdown-editor`, `wc-html-editor`,\n * `wc-comment-composer`): a form-associated Tiptap editor inside `wc-field`, with a fixed toolbar,\n * a selection bubble, a slash menu, a link editor, a block handle, mentions and a source view.\n *\n * Subclasses say what the value is: the editor `profile`, how to read the value from the editor and\n * write it back, and the source language. Everything else, including the events, is here:\n * - `input` with `{ value }`, `debounce` milliseconds after the content stops changing;\n * - `change` with `{ value }` when focus leaves after an edit;\n * - `search` and `mention`, as on `wc-mention-input`.\n *\n * With a provider that offers them (ADR-030002), the editors also get AI actions on the selection\n * (from the bubble and the toolbar), Continue writing and Summarize above in the slash menu, and,\n * with `ai-completion`, ghost text. Results show in a preview until the person accepts them.\n */\nexport default abstract class RichTextInput\n extends BaseInput\n implements RichTextMentionHost\n{\n // ── Properties ────────────────────────────────────────────────────────────\n\n /** The value: Markdown or HTML, depending on the editor. */\n @property({ type: String })\n value = '';\n\n /** Label shown above the editor. */\n @property({ type: String })\n label = '';\n\n /** Text shown while the editor is empty. Each editor has its own default. */\n @property({ type: String })\n placeholder = '';\n\n /** Visual style of the field. */\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n /** Size of the text: `sm` or `md`. */\n @property({ type: String, reflect: true })\n size: 'sm' | 'md' = 'md';\n\n /** Help shown below the editor. */\n @property({ type: String, attribute: 'helper-text' })\n helperText = '';\n\n /** Shows the error state. */\n @property({ type: Boolean })\n error = false;\n\n /** The error message shown with `error`. */\n @property({ type: String, attribute: 'error-text' })\n errorText = '';\n\n /** Milliseconds without typing before `input` fires. */\n @property({ type: Number })\n debounce = 250;\n\n /** Hides the fixed toolbar; formatting stays available from the selection bubble, `/` and shortcuts. */\n @property({ type: Boolean, attribute: 'hide-toolbar' })\n hideToolbar = false;\n\n /** Shows a \"Read only\" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`. */\n @property({ type: Boolean, attribute: 'show-readonly-badge' })\n showReadonlyBadge = false;\n\n /** Maximum number of characters of text. Typing stops there, and a count shows below. */\n @property({ type: Number, attribute: 'maxlength' })\n maxlength?: number;\n\n /** Height of the empty editor, in lines. */\n @property({ type: Number })\n rows = 4;\n\n /** Lines the editor grows to before it scrolls. Without it, it keeps growing. */\n @property({ type: Number, attribute: 'max-rows' })\n maxRows?: number;\n\n /** Characters that start a mention, such as `\"@\"` or `\"@#\"`. Empty turns mentions off. */\n @property({ type: String })\n triggers = '@';\n\n /** Suggestions for the mention being typed; set them in answer to `search`. */\n @property({ attribute: false })\n suggestions: MentionSuggestion[] = [];\n\n /** Shows a loading row in the mention list while the app looks for suggestions. */\n @property({ type: Boolean, attribute: 'suggestions-loading' })\n suggestionsLoading = false;\n\n /** Overrides Peacock's strings for this instance only. */\n @property({ attribute: false })\n strings?: Partial<PeacockStrings>;\n\n /**\n * Suggests how to go on after a pause in typing, as ghost text at the end of the paragraph: Tab\n * takes it, Mod+→ takes a word, Escape dismisses it. Needs a provider with `complete`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'ai-completion' })\n aiCompletion = false;\n\n /** Turns the AI actions and ghost text off for this editor, even when the page offers them. */\n @property({ type: Boolean, reflect: true, attribute: 'no-ai' })\n noAi = false;\n\n // ── State ─────────────────────────────────────────────────────────────────\n\n /** Whether the editor has focus. */\n @state() protected editorFocused = false;\n\n /** Whether the source view is showing. */\n @state() protected sourceView = false;\n\n // ── Queries ───────────────────────────────────────────────────────────────\n\n @query('.editor-root')\n private editorRoot?: HTMLElement;\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n /** The Tiptap editor, once created. */\n protected editor?: Editor;\n\n protected readonly i18n = new I18nController(this);\n\n protected readonly mentions = new RichTextMentionController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n });\n\n protected readonly ai = new RichTextAiController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n });\n\n protected readonly slash = new RichTextSlashController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n actions: () => this.ai.slashActions(),\n });\n\n protected readonly link = new RichTextLinkController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n });\n\n protected readonly bubble = new RichTextBubbleController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n allowed: () =>\n this.selectionBubble &&\n !this.sourceView &&\n !this.link.open &&\n !this.slash.visible &&\n !this.mentions.visible &&\n !this.ai.open,\n editLink: () => this.link.show(),\n extra: () => this.bubbleExtra(),\n });\n\n protected readonly blockHandle = new RichTextBlockHandleController(this, {\n editor: () => this.editor,\n i18n: this.i18n,\n allowed: () => !this.sourceView && this.showBlockHandle,\n insertAfter: position => this.slash.openAfterBlock(position),\n });\n\n // ── Private fields ────────────────────────────────────────────────────────\n\n private inputTimer?: number;\n\n private focusWithin = false;\n\n private valueAtFocus = '';\n\n // ── Abstract ──────────────────────────────────────────────────────────────\n\n /** Which nodes and marks the editor allows. */\n protected abstract readonly profile: RichTextProfile;\n\n /** The language of the source view. */\n protected abstract readonly sourceLanguage: 'markdown' | 'html';\n\n /** The icon of the source toggle. */\n protected abstract readonly sourceIcon: string;\n\n /** The value as the editor holds it now. */\n protected abstract readFromEditor(editor: Editor): string;\n\n /** The editor's content for a value. */\n protected abstract contentFor(value: string): RichTextContent;\n\n /** The placeholder when `placeholder` is empty. */\n protected abstract defaultPlaceholder(): string;\n\n /** Whether the block handle shows; the comment composer turns it off. */\n protected get showBlockHandle(): boolean {\n return true;\n }\n\n /** Whether `/` opens the block menu; the prompt input, which holds no blocks, turns it off. */\n protected get slashMenu(): boolean {\n return true;\n }\n\n /** Whether selecting text shows the selection bubble; the prompt input turns it off. */\n protected get selectionBubble(): boolean {\n return true;\n }\n\n /** Extensions a subclass adds, such as keyboard shortcuts. */\n protected extraExtensions(): Extensions {\n return [];\n }\n\n /** Buttons added to the selection bubble after the marks and link; Ask AI by default. */\n protected bubbleExtra(): TemplateResult | typeof nothing {\n return this.ai.bubbleButton();\n }\n\n /** The block tools in the toolbar: every block the schema allows except text styles. */\n protected toolbarBlocks(editor: Editor): BlockCommand[] {\n return blocksFor(editor).filter(block => !block.textStyle);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('focusin', this.onFocusIn);\n this.addEventListener('focusout', this.onFocusOut);\n }\n\n override connectedCallback() {\n super.connectedCallback();\n // Reconnected after a move: the editor was destroyed on disconnect.\n if (this.hasUpdated && !this.editor) this.createEditor();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.flushInput();\n this.destroyEditor();\n }\n\n protected override firstUpdated() {\n this.createEditor();\n }\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n // Load a new value before validity is computed in updated().\n const { editor } = this;\n if (!editor || !changed.has('value')) return;\n const current = this.normalizeValue(this.readFromEditor(editor));\n if (current === this.normalizeValue(this.value)) return;\n const { content, contentType } = this.contentFor(this.value);\n editor\n .chain()\n .setMeta(SET_VALUE_META, true)\n .setContent(content, { emitUpdate: false, contentType })\n .run();\n }\n\n protected override updated(changed: PropertyValues<this>) {\n super.updated(changed);\n const { editor } = this;\n if (!editor) return;\n\n if (changed.has('triggers') || changed.has('maxlength')) {\n this.destroyEditor();\n this.createEditor();\n return;\n }\n\n if (changed.has('disabled') || changed.has('readonly')) {\n editor.setEditable(!(this.disabled || this.readonly));\n }\n\n if (changed.has('placeholder') || changed.has('strings')) {\n // The placeholder is a decoration; an empty transaction redraws it.\n editor.view.dispatch(editor.state.tr.setMeta('placeholder', true));\n }\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n override focus(options?: Parameters<HTMLElement['focus']>[0]) {\n if (this.editor && !this.sourceView) this.editor.commands.focus();\n else super.focus(options);\n }\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n /** Line endings and trailing whitespace do not count as changes. */\n protected normalizeValue(value: string): string {\n return (value ?? '').replace(/\\r\\n/g, '\\n').replace(/\\s+$/, '');\n }\n\n protected override computeValidity(): ControlValidity {\n const base = super.computeValidity();\n if (Object.values(base.flags).some(Boolean)) return base;\n const max = this.maxlength;\n if (typeof max === 'number' && max >= 0 && this.characters() > max) {\n return {\n flags: { tooLong: true },\n message: this.i18n.t('richTextTooLong')(max),\n };\n }\n return base;\n }\n\n /** The number of characters of text, as `maxlength` counts them. */\n protected characters(): number {\n return this.editor?.state.doc.textContent.length ?? 0;\n }\n\n /** Whether the editor holds nothing: a single empty paragraph. */\n protected isEditorEmpty(editor: Editor): boolean {\n const { doc } = editor.state;\n const first = doc.firstChild;\n return (\n doc.childCount <= 1 &&\n (!first || (first.type.name === 'paragraph' && first.content.size === 0))\n );\n }\n\n /** Runs an editor command, unless the editor is disabled or read-only. */\n protected run(command: (editor: Editor) => void) {\n const { editor } = this;\n if (!editor || this.disabled || this.readonly) return;\n command(editor);\n }\n\n // ── Private methods: editor ───────────────────────────────────────────────\n\n private createEditor() {\n const root = this.editorRoot;\n if (!root || this.editor) return;\n const { content, contentType } = this.contentFor(this.value);\n this.editor = new Editor({\n element: root,\n extensions: buildExtensions(this.profile, {\n placeholder: () => this.placeholder || this.defaultPlaceholder(),\n maxlength: this.maxlength,\n mentions: this.triggers ? this.mentions.suggestionOptions() : [],\n extra: [\n this.ai.extension(),\n ...(this.slashMenu ? [this.slash.extension()] : []),\n this.link.extension(),\n this.blockHandle.extension(),\n ...this.extraExtensions(),\n ],\n }),\n content,\n contentType,\n editable: !(this.disabled || this.readonly),\n editorProps: {\n attributes: {\n role: 'textbox',\n 'aria-multiline': 'true',\n 'aria-label':\n this.label || this.placeholder || this.defaultPlaceholder(),\n },\n },\n onFocus: () => {\n this.editorFocused = true;\n },\n onBlur: () => {\n this.editorFocused = false;\n },\n onUpdate: () => this.onEditorUpdate(),\n onTransaction: () => this.requestUpdate(),\n });\n this.requestUpdate();\n }\n\n private destroyEditor() {\n this.editor?.destroy();\n this.editor = undefined;\n }\n\n private onEditorUpdate() {\n const { editor } = this;\n if (!editor) return;\n const next = this.normalizeValue(this.readFromEditor(editor));\n if (next === this.normalizeValue(this.value)) return;\n this.value = next;\n this.queueInput();\n }\n\n // ── Private methods: events ───────────────────────────────────────────────\n\n private emit(type: 'input' | 'change') {\n this.dispatchEvent(\n new CustomEvent(type, {\n detail: { value: this.value },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private queueInput() {\n window.clearTimeout(this.inputTimer);\n this.inputTimer = window.setTimeout(() => {\n this.inputTimer = undefined;\n this.emit('input');\n }, this.debounce);\n }\n\n /** Fires a pending `input` now. */\n private flushInput() {\n if (this.inputTimer === undefined) return;\n window.clearTimeout(this.inputTimer);\n this.inputTimer = undefined;\n this.emit('input');\n }\n\n private onFocusIn = () => {\n if (this.focusWithin) return;\n this.focusWithin = true;\n this.valueAtFocus = this.value;\n };\n\n private onFocusOut = (event: FocusEvent) => {\n // Focus moving between parts of the editor arrives retargeted to the host.\n const next = event.relatedTarget as Node | null;\n if (next && (next === this || this.contains(next))) return;\n this.focusWithin = false;\n this.flushInput();\n if (this.value === this.valueAtFocus) return;\n this.valueAtFocus = this.value;\n this.emit('change');\n };\n\n private onSourceInput = (event: CustomEvent<{ value: string }>) => {\n event.stopPropagation();\n const next = event.detail?.value ?? '';\n if (next === this.value) return;\n this.value = next;\n this.queueInput();\n };\n\n private toggleSource = () => {\n const { editor } = this;\n if (editor && !this.sourceView) {\n // Take the editor's latest value before showing it as source.\n this.value = this.normalizeValue(this.readFromEditor(editor));\n }\n this.sourceView = !this.sourceView;\n if (!this.sourceView) {\n this.updateComplete.then(() => this.editor?.commands.focus());\n }\n };\n\n private onTextStyle = (event: CustomEvent<{ item: HTMLElement }>) => {\n event.stopPropagation();\n const id = event.detail.item.getAttribute('value');\n const block: BlockCommand | undefined = BLOCKS.find(b => b.id === id);\n if (block) this.run(editor => block.run(editor.chain().focus()).run());\n };\n\n private onTableAction = (event: CustomEvent<{ item: HTMLElement }>) => {\n event.stopPropagation();\n const action = event.detail.item.getAttribute('value') as TableAction;\n this.run(editor => {\n const chain = editor.chain().focus();\n const commands: Record<TableAction, () => boolean> = {\n addRowBelow: () => chain.addRowAfter().run(),\n addColumnAfter: () => chain.addColumnAfter().run(),\n deleteRow: () => chain.deleteRow().run(),\n deleteColumn: () => chain.deleteColumn().run(),\n deleteTable: () => chain.deleteTable().run(),\n };\n commands[action]?.();\n });\n };\n\n // ── Render helpers ────────────────────────────────────────────────────────\n\n protected toolButton(\n icon: string,\n label: string,\n action: () => void,\n selected?: boolean,\n ): TemplateResult {\n return html`<wc-icon-button\n class=\"tool\"\n variant=\"text\"\n color=\"surface\"\n shape=\"round\"\n size=\"xs\"\n ?toggle=${selected !== undefined}\n ?selected=${!!selected}\n ?disabled=${this.disabled || this.readonly}\n aria-label=${label}\n tooltip=${label}\n @click=${action}\n ><wc-icon name=${icon}></wc-icon\n ></wc-icon-button>`;\n }\n\n private renderTextStyle(editor: Editor) {\n const styles = blocksFor(editor).filter(block => block.textStyle);\n if (styles.length < 2) return nothing;\n const active = activeTextStyle(editor);\n return html`<wc-dropdown-button\n class=\"text-style\"\n size=\"xs\"\n variant=\"text\"\n color=\"surface\"\n aria-label=${this.i18n.t('textStyle')}\n ?disabled=${this.disabled || this.readonly}\n @menu-item-activate=${this.onTextStyle}\n >\n ${this.i18n.t(active?.id ?? 'paragraph')}\n ${styles.map(\n block =>\n html`<wc-menu-item\n slot=\"menu\"\n type=\"radio\"\n value=${block.id}\n ?selected=${block === active}\n >${this.i18n.t(block.id)}</wc-menu-item\n >`,\n )}\n </wc-dropdown-button>\n <wc-divider orientation=\"vertical\"></wc-divider>`;\n }\n\n private renderTableTools(editor: Editor) {\n if (!editor.isActive('table')) return nothing;\n return html`<wc-divider orientation=\"vertical\"></wc-divider>\n <wc-dropdown-button\n class=\"table-tools\"\n size=\"xs\"\n variant=\"text\"\n color=\"surface\"\n ?disabled=${this.disabled || this.readonly}\n @menu-item-activate=${this.onTableAction}\n >\n ${this.i18n.t('table')}\n ${TABLE_ACTIONS.map(\n action =>\n html`<wc-menu-item slot=\"menu\" value=${action}\n >${this.i18n.t(action)}</wc-menu-item\n >`,\n )}\n </wc-dropdown-button>`;\n }\n\n /** The formatting tools: text style, marks, link, blocks, mention and table actions. */\n protected renderTools(editor: Editor): TemplateResult {\n const { i18n } = this;\n return html`${this.renderTextStyle(editor)}\n ${marksFor(editor).map(mark =>\n this.toolButton(\n mark.icon,\n i18n.t(mark.id),\n () => this.run(e => mark.run(e.chain().focus()).run()),\n editor.isActive(mark.mark),\n ),\n )}\n ${editor.schema.marks.link\n ? this.toolButton(\n 'link',\n i18n.t('link'),\n () => this.link.show(),\n editor.isActive('link'),\n )\n : nothing}\n <wc-divider orientation=\"vertical\"></wc-divider>\n ${this.toolbarBlocks(editor).map(block =>\n this.toolButton(\n block.icon,\n i18n.t(block.id),\n () => this.run(e => block.run(e.chain().focus()).run()),\n block.id === 'divider' || block.id === 'table'\n ? undefined\n : block.active(editor),\n ),\n )}\n ${this.triggers\n ? this.toolButton('alternate_email', i18n.t('mentionSomeone'), () =>\n this.mentions.insertTrigger(),\n )\n : nothing}\n ${this.renderTableTools(editor)} ${this.ai.toolbarButton()}`;\n }\n\n /** Keeps the editor's selection when a tool is pressed. */\n protected keepSelection = (event: MouseEvent) => {\n if (!this.sourceView) event.preventDefault();\n };\n\n /**\n * The toolbar. A read-only or disabled editor shows no formatting tools, which could do\n * nothing: only View source, and the \"Read only\" badge with `show-readonly-badge`.\n */\n private renderToolbar() {\n if (this.hideToolbar) return nothing;\n const { editor, i18n } = this;\n const locked = this.disabled || this.readonly;\n return html`<wc-toolbar\n class=\"toolbar\"\n variant=\"flat\"\n aria-label=${i18n.t('formattingToolbar')}\n @mousedown=${this.keepSelection}\n >\n ${editor && !this.sourceView && !locked\n ? this.renderTools(editor)\n : nothing}\n <span class=\"toolbar-spacer\" aria-hidden=\"true\"></span>\n ${locked && this.showReadonlyBadge\n ? html`<span class=\"read-only-badge\">\n <wc-icon name=\"lock\"></wc-icon>${i18n.t('readOnly')}\n </span>`\n : nothing}\n <wc-icon-button\n class=\"tool source-toggle\"\n variant=\"text\"\n color=\"surface\"\n shape=\"round\"\n size=\"xs\"\n toggle\n ?selected=${this.sourceView}\n ?disabled=${this.disabled}\n aria-label=${i18n.t('viewSource')}\n tooltip=${i18n.t('viewSource')}\n @click=${this.toggleSource}\n ><wc-icon name=${this.sourceIcon}></wc-icon\n ></wc-icon-button>\n </wc-toolbar>`;\n }\n\n /** The count below the field, with `maxlength`. */\n private textCount(): string {\n const max = this.maxlength;\n if (typeof max !== 'number' || max < 0) return '';\n return this.i18n.t('characterCount')(this.characters(), max);\n }\n\n /**\n * A block dragged with the handle drops anywhere in the area, padding included, by height. The\n * listeners capture, so ProseMirror's own drop handling never sees these drags. `dragenter` is\n * cancelled too: outside editable content the browser only drops where it was.\n */\n private readonly areaDragOver = {\n handleEvent: (event: DragEvent) => this.blockHandle.dragOver(event),\n capture: true,\n };\n\n private readonly areaDrop = {\n handleEvent: (event: DragEvent) => this.blockHandle.drop(event),\n capture: true,\n };\n\n /** The editable area: Tiptap mounts into `.editor-root`. */\n protected renderEditorArea(): TemplateResult {\n const lines: Record<string, string> = { '--_rows': String(this.rows) };\n if (this.maxRows) lines['--_max-rows'] = String(this.maxRows);\n return html`<div\n class=${classMap({\n 'editor-area': true,\n hidden: this.sourceView,\n 'with-handle': this.showBlockHandle && !this.disabled && !this.readonly,\n })}\n style=${styleMap(lines)}\n @input=${(event: Event) => event.stopPropagation()}\n @beforeinput=${(event: Event) => event.stopPropagation()}\n @dragenter=${this.areaDragOver}\n @dragover=${this.areaDragOver}\n @drop=${this.areaDrop}\n >\n <div class=\"editor-root\"></div>\n </div>`;\n }\n\n /** The mention list, slash menu, selection bubble, link editor and block handle. */\n protected renderPopups(): TemplateResult {\n return html`${this.mentions.render()}\n <span class=\"slash-anchor\" aria-hidden=\"true\"></span>\n ${this.slash.render()} ${this.bubble.render()} ${this.link.render()}\n ${this.blockHandle.render()} ${this.blockHandle.renderDropLine()}\n ${this.ai.render()}`;\n }\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n render() {\n const empty = !this.value || !this.value.trim();\n const { validationText } = this;\n return html`\n <wc-field\n class=${classMap({\n 'rich-text-field': true,\n 'max-rows': !!this.maxRows,\n })}\n label=${this.label}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?skeleton=${this.skeleton}\n ?focused=${this.editorFocused}\n ?error=${this.error || !!validationText}\n error-text=${this.error ? this.errorText : validationText}\n helper-text=${this.helperText}\n text-count=${this.textCount()}\n variant=${this.variant}\n ?populated=${!empty}\n .host=${this}\n >\n <div class=\"shell\">\n ${this.renderToolbar()} ${this.renderEditorArea()}\n ${this.sourceView\n ? html`<div class=\"source\">\n <wc-code-editor\n language=${this.sourceLanguage}\n size=${this.size}\n wrap\n .value=${this.value}\n ?readonly=${this.readonly}\n ?disabled=${this.disabled}\n @input=${this.onSourceInput}\n @change=${(event: Event) => event.stopPropagation()}\n ></wc-code-editor>\n </div>`\n : nothing}\n </div>\n </wc-field>\n ${this.renderPopups()}\n `;\n }\n}\n"],"names":["html","nothing","classMap","styleMap","property","state","query"],"mappings":";;;;;;;;;;AAsCA;AACA,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,cAAc;IACd,aAAa;CACL;AAIV;;;;;;;;;;;;;;AAcG;AACW,MAAgB,aAC5B,SAAQ,SAAS,CAAA;;AAmLjB,IAAA,IAAc,eAAe,GAAA;AAC3B,QAAA,OAAO,IAAI;IACb;;AAGA,IA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Ae,EAAE;AACjD,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAIrB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE;AACjD,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAKM,UAAA,CAAA;AAAlB,IAAAC,CAAK;AAAmC,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAGtB,UAAA,CAAA;AAAlB,IAAAA,CAAK;AAAgC,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAK9B,UAAA,CAAA;IADPC,CAAK,CAAC,cAAc;AACY,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { c as catalog, T as TEXT_VARIANTS, a as TEXT_TYPE } from './generative-view-BKlcuujw.js';
1
+ import { c as catalog, T as TEXT_VARIANTS, a as TEXT_TYPE } from './generative-view-CQ8-g1wY.js';
2
2
 
3
3
  function propSchema(spec) {
4
4
  const description = spec.description ? { description: spec.description } : {};
@@ -100,4 +100,4 @@ function generativeViewSchema(catalog$1 = catalog) {
100
100
  }
101
101
 
102
102
  export { generativeViewSchema as g };
103
- //# sourceMappingURL=schema-Dy0z-80u.js.map
103
+ //# sourceMappingURL=schema-CPhNrjrx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-Dy0z-80u.js","sources":["../../src/generative-view/schema.ts"],"sourcesContent":["import { catalog as defaultCatalog } from './catalog.generated.js';\nimport type { GenerativeCatalog, GenerativePropSpec } from './types.js';\nimport { TEXT_TYPE, TEXT_VARIANTS } from './validate.js';\n\ntype JsonSchema = Record<string, unknown>;\n\nfunction propSchema(spec: GenerativePropSpec): JsonSchema {\n const description = spec.description ? { description: spec.description } : {};\n if (spec.kind === 'enum')\n return { type: 'string', enum: spec.values ?? [], ...description };\n return { type: spec.kind, ...description };\n}\n\n/**\n * The JSON Schema (draft 2020-12) of what `wc-generative-view` renders: a node, or a list of nodes\n * and text, built from the components and props it allows. Give it to the model service as the\n * answer's structured-output schema, or describe it in the prompt; the view checks every answer\n * against the same catalog, so an answer that ignores the schema loses only what does not fit.\n */\nexport function generativeViewSchema(\n catalog: GenerativeCatalog = defaultCatalog,\n): JsonSchema {\n const defs: Record<string, JsonSchema> = {\n child: {\n description: 'A node, or plain text (never HTML or Markdown).',\n anyOf: [{ type: 'string' }, { $ref: '#/$defs/node' }],\n },\n [TEXT_TYPE]: {\n type: 'object',\n description:\n 'A heading or paragraph. Its children are plain text; `headline` and `title` are headings.',\n properties: {\n type: { const: TEXT_TYPE },\n props: {\n type: 'object',\n properties: {\n variant: { type: 'string', enum: [...TEXT_VARIANTS] },\n },\n additionalProperties: false,\n },\n slot: { type: 'string' },\n children: { type: 'array', items: { type: 'string' } },\n },\n required: ['type'],\n additionalProperties: false,\n },\n };\n\n for (const [type, entry] of Object.entries(catalog)) {\n const properties: Record<string, JsonSchema> = {\n type: { const: type },\n props: {\n type: 'object',\n properties: Object.fromEntries(\n Object.entries(entry.props).map(([name, spec]) => [\n name,\n propSchema(spec),\n ]),\n ),\n additionalProperties: false,\n },\n slot: {\n type: 'string',\n description: \"The parent's named slot this node goes in.\",\n },\n };\n if (entry.children || entry.slots.length) {\n const slots = entry.slots.length\n ? ` Children for a named slot set \\`slot\\` to one of: ${entry.slots.join(', ')}.`\n : '';\n properties.children = {\n type: 'array',\n items: { $ref: '#/$defs/child' },\n description: entry.children\n ? `Content of the ${type}.${slots}`\n : `Only children with a \\`slot\\`.${slots}`,\n };\n }\n if (entry.action) {\n properties.action = {\n type: 'string',\n description: `An id the app receives when the ${type} is ${entry.action === 'click' ? 'pressed' : 'selected'}. It does nothing by itself.`,\n };\n properties.payload = {\n description: 'Data sent with the action, such as a record id.',\n };\n }\n defs[type] = {\n type: 'object',\n description: entry.description,\n properties,\n required: ['type'],\n additionalProperties: false,\n };\n }\n\n defs.node = {\n anyOf: [TEXT_TYPE, ...Object.keys(catalog)].map(type => ({\n $ref: `#/$defs/${type}`,\n })),\n };\n\n return {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Peacock generative view',\n description:\n 'An answer shown as Peacock components: one node, or a list of nodes and text. Values come from the platform; the view only lays them out.',\n anyOf: [\n { $ref: '#/$defs/node' },\n { type: 'array', items: { $ref: '#/$defs/child' } },\n ],\n $defs: defs,\n };\n}\n"],"names":["catalog","defaultCatalog"],"mappings":";;AAMA,SAAS,UAAU,CAAC,IAAwB,EAAA;AAC1C,IAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;AAC7E,IAAA,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;AACtB,QAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE;IACpE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,WAAW,EAAE;AAC5C;AAEA;;;;;AAKG;AACG,SAAU,oBAAoB,CAClCA,SAAA,GAA6BC,OAAc,EAAA;AAE3C,IAAA,MAAM,IAAI,GAA+B;AACvC,QAAA,KAAK,EAAE;AACL,YAAA,WAAW,EAAE,iDAAiD;AAC9D,YAAA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;AACtD,SAAA;QACD,CAAC,SAAS,GAAG;AACX,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,WAAW,EACT,2FAA2F;AAC7F,YAAA,UAAU,EAAE;AACV,gBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE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W,EACT,2IAA2I;AAC7I,QAAA,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,cAAc,EAAE;YACxB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;AACpD,SAAA;AACD,QAAA,KAAK,EAAE,IAAI;KACZ;AACH;;;;"}
1
+ {"version":3,"file":"schema-CPhNrjrx.js","sources":["../../src/generative-view/schema.ts"],"sourcesContent":["import { catalog as defaultCatalog } from './catalog.generated.js';\nimport type { GenerativeCatalog, GenerativePropSpec } from './types.js';\nimport { TEXT_TYPE, TEXT_VARIANTS } from './validate.js';\n\ntype JsonSchema = Record<string, unknown>;\n\nfunction propSchema(spec: GenerativePropSpec): JsonSchema {\n const description = spec.description ? { description: spec.description } : {};\n if (spec.kind === 'enum')\n return { type: 'string', enum: spec.values ?? [], ...description };\n return { type: spec.kind, ...description };\n}\n\n/**\n * The JSON Schema (draft 2020-12) of what `wc-generative-view` renders: a node, or a list of nodes\n * and text, built from the components and props it allows. Give it to the model service as the\n * answer's structured-output schema, or describe it in the prompt; the view checks every answer\n * against the same catalog, so an answer that ignores the schema loses only what does not fit.\n */\nexport function generativeViewSchema(\n catalog: GenerativeCatalog = defaultCatalog,\n): JsonSchema {\n const defs: Record<string, JsonSchema> = {\n child: {\n description: 'A node, or plain text (never HTML or Markdown).',\n anyOf: [{ type: 'string' }, { $ref: '#/$defs/node' }],\n },\n [TEXT_TYPE]: {\n type: 'object',\n description:\n 'A heading or paragraph. Its children are plain text; `headline` and `title` are headings.',\n properties: {\n type: { const: TEXT_TYPE },\n props: {\n type: 'object',\n properties: {\n variant: { type: 'string', enum: [...TEXT_VARIANTS] },\n },\n additionalProperties: false,\n },\n slot: { type: 'string' },\n children: { type: 'array', items: { type: 'string' } },\n },\n required: ['type'],\n additionalProperties: false,\n },\n };\n\n for (const [type, entry] of Object.entries(catalog)) {\n const properties: Record<string, JsonSchema> = {\n type: { const: type },\n props: {\n type: 'object',\n properties: Object.fromEntries(\n Object.entries(entry.props).map(([name, spec]) => [\n name,\n propSchema(spec),\n ]),\n ),\n additionalProperties: false,\n },\n slot: {\n type: 'string',\n description: \"The parent's named slot this node goes in.\",\n },\n };\n if (entry.children || entry.slots.length) {\n const slots = entry.slots.length\n ? ` Children for a named slot set \\`slot\\` to one of: ${entry.slots.join(', ')}.`\n : '';\n properties.children = {\n type: 'array',\n items: { $ref: '#/$defs/child' },\n description: entry.children\n ? `Content of the ${type}.${slots}`\n : `Only children with a \\`slot\\`.${slots}`,\n };\n }\n if (entry.action) {\n properties.action = {\n type: 'string',\n description: `An id the app receives when the ${type} is ${entry.action === 'click' ? 'pressed' : 'selected'}. It does nothing by itself.`,\n };\n properties.payload = {\n description: 'Data sent with the action, such as a record id.',\n };\n }\n defs[type] = {\n type: 'object',\n description: entry.description,\n properties,\n required: ['type'],\n additionalProperties: false,\n };\n }\n\n defs.node = {\n anyOf: [TEXT_TYPE, ...Object.keys(catalog)].map(type => ({\n $ref: `#/$defs/${type}`,\n })),\n };\n\n return {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Peacock generative view',\n description:\n 'An answer shown as Peacock components: one node, or a list of nodes and text. Values come from the platform; the view only lays them out.',\n anyOf: [\n { $ref: '#/$defs/node' },\n { type: 'array', items: { $ref: '#/$defs/child' } },\n ],\n $defs: defs,\n };\n}\n"],"names":["catalog","defaultCatalog"],"mappings":";;AAMA,SAAS,UAAU,CAAC,IAAwB,EAAA;AAC1C,IAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;AAC7E,IAAA,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;AACtB,QAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE;IACpE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,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,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,UAAU;YACV,QAAQ,EAAE,CAAC,MAAM,CAAC;AAClB,YAAA,oBAAoB,EAAE,KAAK;SAC5B;IACH;IAEA,IAAI,CAAC,IAAI,GAAG;AACV,QAAA,KAAK,EAAE,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,IAAI,CAACA,SAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK;YACvD,IAAI,EAAE,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE;AACxB,SAAA,CAAC,CAAC;KACJ;IAED,OAAO;AACL,QAAA,OAAO,EAAE,8CAA8C;AACvD,QAAA,KAAK,EAAE,yBAAyB;AAChC,QAAA,WAAW,EACT,2IAA2I;AAC7I,QAAA,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,cAAc,EAAE;YACxB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;AACpD,SAAA;AACD,QAAA,KAAK,EAAE,IAAI;KACZ;AACH;;;;"}
package/dist/search.js CHANGED
@@ -4,14 +4,14 @@ 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
6
  import { l } from './live-D_5OfuGD.js';
7
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
7
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
8
8
  import { A as AiController } from './ai-controller-DR_Tg0sN.js';
9
9
  import { s as sparkle } from './sparkle-BmtM0vbq.js';
10
- import { B as BaseInput, n as nativeValidity } from './BaseInput-DtZH0fPJ.js';
10
+ import { B as BaseInput, n as nativeValidity } from './BaseInput-DZp2O8Gh.js';
11
11
  import './base-Cl6v8-BZ.js';
12
12
  import './directive-ZPhl09Yt.js';
13
13
  import './directive-helpers-Bx3mu42O.js';
14
- import './strings-DnYjGbbc.js';
14
+ import './strings-MXyrGrNs.js';
15
15
  import './locale-DEsJZCQG.js';
16
16
  import './element-internals-QME0yEz4.js';
17
17
  import './form-associated-BHbg72PG.js';
package/dist/select.js CHANGED
@@ -5,15 +5,15 @@ import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
6
  import { g as getFormValue } from './form-associated-BHbg72PG.js';
7
7
  import { s as spread } from './spread-B5cgadZl.js';
8
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
9
- import { p as peacockString } from './strings-DnYjGbbc.js';
10
- import { B as BaseField } from './BaseField-_unSNU5x.js';
8
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
9
+ import { p as peacockString } from './strings-MXyrGrNs.js';
10
+ import { B as BaseField } from './BaseField-CHBcjVc2.js';
11
11
  import { SelectOptionElement } from './option.js';
12
12
  import './base-Cl6v8-BZ.js';
13
13
  import './directive-ZPhl09Yt.js';
14
14
  import './element-internals-QME0yEz4.js';
15
15
  import './locale-DEsJZCQG.js';
16
- import './BaseInput-DtZH0fPJ.js';
16
+ import './BaseInput-DZp2O8Gh.js';
17
17
  import './suggestion-controller-7YRQqkaI.js';
18
18
  import './ai-controller-DR_Tg0sN.js';
19
19
  import './menu-item.js';
@@ -2,11 +2,11 @@ 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 { e } from './query-CHb9Ft_d.js';
4
4
  import { e as e$1 } from './class-map-NDIkZErE.js';
5
- import { I as I18nController } from './i18n-controller-DJHsE1YH.js';
5
+ import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
6
6
  import { O as OverlayController } from './overlay-controller-BOk-kfil.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`* {
@@ -3,13 +3,13 @@ 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 { g as getFormValue, a as getFormState } from './form-associated-BHbg72PG.js';
8
8
  import { o as observeThemeChange } from './observe-theme-change-CkSENG98.js';
9
- import { B as BaseInput } from './BaseInput-DtZH0fPJ.js';
9
+ import { B as BaseInput } from './BaseInput-DZp2O8Gh.js';
10
10
  import './base-Cl6v8-BZ.js';
11
11
  import './directive-ZPhl09Yt.js';
12
- import './strings-DnYjGbbc.js';
12
+ import './strings-MXyrGrNs.js';
13
13
  import './locale-DEsJZCQG.js';
14
14
  import './element-internals-QME0yEz4.js';
15
15
  import './suggestion-controller-7YRQqkaI.js';
@@ -0,0 +1,142 @@
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
+
4
+ var css_248z = i`* {
5
+ box-sizing: border-box;
6
+ -webkit-tap-highlight-color: transparent;
7
+ }
8
+
9
+ .screen-reader-only {
10
+ position: absolute !important;
11
+ inline-size: 1px !important;
12
+ block-size: 1px !important;
13
+ padding: 0 !important;
14
+ margin: -1px !important;
15
+ overflow: hidden !important;
16
+ clip-path: inset(50%) !important;
17
+ white-space: nowrap !important;
18
+ border: 0 !important;
19
+ }
20
+
21
+ [hidden] {
22
+ display: none !important;
23
+ }
24
+
25
+ @media (forced-colors: active) {
26
+ .selected,
27
+ [aria-selected=true],
28
+ [aria-pressed=true],
29
+ [aria-checked=true],
30
+ [aria-current]:not([aria-current=false]) {
31
+ outline: 2px solid Highlight;
32
+ outline-offset: -2px;
33
+ }
34
+ .disabled,
35
+ [aria-disabled=true] {
36
+ color: GrayText;
37
+ }
38
+ }
39
+ :host {
40
+ display: block;
41
+ min-inline-size: 0;
42
+ }
43
+
44
+ .title {
45
+ font-family: var(--typography-title-small-font-family) !important;
46
+ font-size: var(--typography-title-small-font-size) !important;
47
+ font-weight: var(--typography-title-small-font-weight) !important;
48
+ line-height: var(--typography-title-small-line-height) !important;
49
+ letter-spacing: var(--typography-title-small-letter-spacing) !important;
50
+ margin-block-end: var(--spacing-150);
51
+ color: var(--color-on-surface);
52
+ }
53
+
54
+ .links {
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: flex-start;
58
+ gap: var(--spacing-100);
59
+ }
60
+ .links ::slotted(a) {
61
+ font-family: var(--typography-body-medium-font-family);
62
+ font-size: var(--typography-body-medium-font-size);
63
+ font-weight: var(--typography-body-medium-font-weight);
64
+ line-height: var(--typography-body-medium-line-height);
65
+ letter-spacing: var(--typography-body-medium-letter-spacing);
66
+ color: var(--color-on-surface-variant);
67
+ text-decoration: none;
68
+ border-radius: var(--shape-corner-extra-small);
69
+ }
70
+ .links ::slotted(a:hover) {
71
+ color: var(--color-primary);
72
+ text-decoration: underline;
73
+ }
74
+ .links ::slotted(a:focus-visible) {
75
+ outline: 2px solid var(--color-primary);
76
+ outline-offset: 2px;
77
+ }
78
+
79
+ @container (max-width: 48rem) {
80
+ .links {
81
+ gap: 0;
82
+ }
83
+ .links ::slotted(a) {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ min-block-size: 2.75rem;
87
+ }
88
+ }`;
89
+
90
+ /**
91
+ * @label Site Footer Group
92
+ * @tag wc-site-footer-group
93
+ * @rawTag site-footer-group
94
+ *
95
+ * @summary A titled column of links in a site footer.
96
+ * @overview
97
+ * <p>A column of a <code>wc-site-footer</code>: a title and a list of links. The column is a
98
+ * navigation landmark named by its <code>label</code>, so a screen reader lists "Product",
99
+ * "Company" and so on among the page's landmarks.</p>
100
+ * <p>Put plain <code>&lt;a&gt;</code> elements or <code>wc-link</code> in it; the group lays them
101
+ * out and styles plain links.</p>
102
+ *
103
+ * @slot - The column's links.
104
+ *
105
+ * @csspart nav - The `<nav>` element.
106
+ * @csspart title - The column's title.
107
+ *
108
+ * @example
109
+ * ```html
110
+ * <wc-site-footer-group label="Developers">
111
+ * <a href="/docs">Docs</a>
112
+ * <a href="https://peacock.redvars.com">Peacock</a>
113
+ * </wc-site-footer-group>
114
+ * ```
115
+ * @tags navigation
116
+ */
117
+ let SiteFooterGroup = class SiteFooterGroup extends i$1 {
118
+ constructor() {
119
+ // ── Static ───────────────────────────────────────────────────────────────
120
+ super(...arguments);
121
+ // ── Properties ───────────────────────────────────────────────────────────
122
+ /** The column's title, also the name of its navigation landmark. */
123
+ this.label = '';
124
+ }
125
+ // ── Render ───────────────────────────────────────────────────────────────
126
+ render() {
127
+ return b `<nav class="nav" part="nav" aria-label=${this.label}>
128
+ <div class="title" part="title" aria-hidden="true">${this.label}</div>
129
+ <div class="links"><slot></slot></div>
130
+ </nav>`;
131
+ }
132
+ };
133
+ SiteFooterGroup.styles = [css_248z];
134
+ __decorate([
135
+ n()
136
+ ], SiteFooterGroup.prototype, "label", void 0);
137
+ SiteFooterGroup = __decorate([
138
+ IndividualComponent
139
+ ], SiteFooterGroup);
140
+
141
+ export { SiteFooterGroup };
142
+ //# sourceMappingURL=site-footer-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-footer-group.js","sources":["../../src/site-footer/site-footer-group.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './site-footer-group.scss';\n\n/**\n * @label Site Footer Group\n * @tag wc-site-footer-group\n * @rawTag site-footer-group\n *\n * @summary A titled column of links in a site footer.\n * @overview\n * <p>A column of a <code>wc-site-footer</code>: a title and a list of links. The column is a\n * navigation landmark named by its <code>label</code>, so a screen reader lists \"Product\",\n * \"Company\" and so on among the page's landmarks.</p>\n * <p>Put plain <code>&lt;a&gt;</code> elements or <code>wc-link</code> in it; the group lays them\n * out and styles plain links.</p>\n *\n * @slot - The column's links.\n *\n * @csspart nav - The `<nav>` element.\n * @csspart title - The column's title.\n *\n * @example\n * ```html\n * <wc-site-footer-group label=\"Developers\">\n * <a href=\"/docs\">Docs</a>\n * <a href=\"https://peacock.redvars.com\">Peacock</a>\n * </wc-site-footer-group>\n * ```\n * @tags navigation\n */\n@IndividualComponent\nexport class SiteFooterGroup extends LitElement {\n // ── Static ───────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** The column's title, also the name of its navigation landmark. */\n @property() label = '';\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n return html`<nav class=\"nav\" part=\"nav\" aria-label=${this.label}>\n <div class=\"title\" part=\"title\" aria-hidden=\"true\">${this.label}</div>\n <div class=\"links\"><slot></slot></div>\n </nav>`;\n }\n}\n"],"names":["LitElement","html","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQA,GAAU,CAAA;AAAxC,IAAA,WAAA,GAAA;;;;;QAQO,IAAA,CAAA,KAAK,GAAG,EAAE;IAUxB;;IANE,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA,CAAA,uCAAA,EAA0C,IAAI,CAAC,KAAK,CAAA;AACR,yDAAA,EAAA,IAAI,CAAC,KAAK,CAAA;;WAE1D;IACT;;AAdO,eAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAKZ,UAAA,CAAA;AAAX,IAAAC,CAAQ;AAAc,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AARZ,eAAe,GAAA,UAAA,CAAA;IAD3B;AACY,CAAA,EAAA,eAAe,CAkB3B;;;;"}