@redvars/peacock 4.2.1 → 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.
- package/dist/{BaseField-D8ByB0l3.js → BaseField-CHBcjVc2.js} +3 -3
- package/dist/{BaseField-D8ByB0l3.js.map → BaseField-CHBcjVc2.js.map} +1 -1
- package/dist/{BaseInput-xCHvT4AN.js → BaseInput-DZp2O8Gh.js} +2 -2
- package/dist/{BaseInput-xCHvT4AN.js.map → BaseInput-DZp2O8Gh.js.map} +1 -1
- package/dist/ai-badge.js +2 -2
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-progress-DxNgAQtw.js → base-progress-CKQ32Ruw.js} +2 -2
- package/dist/{base-progress-DxNgAQtw.js.map → base-progress-CKQ32Ruw.js.map} +1 -1
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/calendar.js +2 -2
- package/dist/{canvas-base-DHKf2CmA.js → canvas-base-BoKef3yr.js} +2 -2
- package/dist/{canvas-base-DHKf2CmA.js.map → canvas-base-BoKef3yr.js.map} +1 -1
- package/dist/carousel.js +644 -0
- package/dist/carousel.js.map +1 -0
- package/dist/{cartesian-chart-G6VX1aKk.js → cartesian-chart-DqZxnoG1.js} +2 -2
- package/dist/{cartesian-chart-G6VX1aKk.js.map → cartesian-chart-DqZxnoG1.js.map} +1 -1
- package/dist/{cb-group-base-CZLzCnXK.js → cb-group-base-Bf7iOIGS.js} +2 -2
- package/dist/{cb-group-base-CZLzCnXK.js.map → cb-group-base-Bf7iOIGS.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +4 -4
- package/dist/chart-bar.js +4 -4
- package/dist/{chart-base-DREru2P0.js → chart-base-ByCJM_9C.js} +2 -2
- package/dist/{chart-base-DREru2P0.js.map → chart-base-ByCJM_9C.js.map} +1 -1
- package/dist/chart-doughnut.js +3 -3
- package/dist/chart-line.js +4 -4
- package/dist/chart-pie.js +3 -3
- package/dist/chat-event.js +2 -2
- package/dist/chat-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +3 -3
- package/dist/checkbox.js +3 -3
- package/dist/chip-set.js +2 -2
- package/dist/chip.js +2 -2
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +3 -3
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +4 -4
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +4 -4
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +4 -4
- package/dist/custom-elements-jsdocs.json +902 -74
- package/dist/custom-elements.json +2842 -1
- package/dist/date-field.js +5 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-field.js +5 -5
- package/dist/datetime-field.js +5 -5
- package/dist/dependency-map.js +3 -3
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/{diagram-CHF70xTL.js → diagram-Cnrj-4y3.js} +2 -2
- package/dist/{diagram-CHF70xTL.js.map → diagram-Cnrj-4y3.js.map} +1 -1
- package/dist/diagram-controls.js +2 -2
- package/dist/diagram-minimap.js +2 -2
- package/dist/diagram.js +4 -4
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +4 -4
- package/dist/{document-editor-Cb9fCxvA.js → document-editor-C8ThjDQ7.js} +2 -2
- package/dist/{document-editor-Cb9fCxvA.js.map → document-editor-C8ThjDQ7.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- package/dist/erd.js +3 -3
- package/dist/file-upload.js +3 -3
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +4 -4
- package/dist/form.js +2 -2
- package/dist/{generative-view-C4fJ2zI7.js → generative-view-CQ8-g1wY.js} +2 -2
- package/dist/{generative-view-C4fJ2zI7.js.map → generative-view-CQ8-g1wY.js.map} +1 -1
- package/dist/generative-view.js +3 -3
- package/dist/highlight-Be0wu7kh.js +252 -0
- package/dist/highlight-Be0wu7kh.js.map +1 -0
- package/dist/highlight.js +6 -0
- package/dist/highlight.js.map +1 -0
- package/dist/html-editor.js +4 -4
- package/dist/{i18n-controller-CH4e9sju.js → i18n-controller-DLJcJ5gO.js} +2 -2
- package/dist/{i18n-controller-CH4e9sju.js.map → i18n-controller-DLJcJ5gO.js.map} +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +3 -3
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/listbox.js +2 -2
- package/dist/loader-full.js +19 -9
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +46 -9
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +4 -4
- package/dist/mention-input.js +4 -4
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +2 -2
- package/dist/number-field.js +4 -4
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +4 -4
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +4 -4
- package/dist/{picker-field-loXW-xrW.js → picker-field-B5xOFc3-.js} +3 -3
- package/dist/{picker-field-loXW-xrW.js.map → picker-field-B5xOFc3-.js.map} +1 -1
- package/dist/pin-input.js +4 -4
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +4 -4
- package/dist/radio.js +3 -3
- package/dist/rating.js +3 -3
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-B5j0eqCJ.js → rich-text-input-C4B9D6oD.js} +3 -3
- package/dist/{rich-text-input-B5j0eqCJ.js.map → rich-text-input-C4B9D6oD.js.map} +1 -1
- package/dist/{schema-BJzlGRP1.js → schema-CPhNrjrx.js} +2 -2
- package/dist/{schema-BJzlGRP1.js.map → schema-CPhNrjrx.js.map} +1 -1
- package/dist/search.js +3 -3
- package/dist/select.js +4 -4
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +3 -3
- package/dist/site-footer-group.js +142 -0
- package/dist/site-footer-group.js.map +1 -0
- package/dist/site-footer.js +338 -0
- package/dist/site-footer.js.map +1 -0
- package/dist/site-header.js +774 -0
- package/dist/site-header.js.map +1 -0
- package/dist/site-nav-group.js +123 -0
- package/dist/site-nav-group.js.map +1 -0
- package/dist/site-nav-link.js +321 -0
- package/dist/site-nav-link.js.map +1 -0
- package/dist/site-nav-menu.js +506 -0
- package/dist/site-nav-menu.js.map +1 -0
- package/dist/site-nav-shared-BDR2HG8e.js +23 -0
- package/dist/site-nav-shared-BDR2HG8e.js.map +1 -0
- package/dist/slider.js +3 -3
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/i18n/strings.d.ts +24 -0
- package/dist/src/carousel/carousel.d.ts +135 -0
- package/dist/src/carousel/index.d.ts +1 -0
- package/dist/src/highlight/highlight.d.ts +56 -0
- package/dist/src/highlight/index.d.ts +2 -0
- package/dist/src/highlight/matches.d.ts +9 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/site-footer/index.d.ts +2 -0
- package/dist/src/site-footer/site-footer-group.d.ts +34 -0
- package/dist/src/site-footer/site-footer.d.ts +74 -0
- package/dist/src/site-header/index.d.ts +4 -0
- package/dist/src/site-header/site-header.d.ts +170 -0
- package/dist/src/site-header/site-nav-group.d.ts +32 -0
- package/dist/src/site-header/site-nav-link.d.ts +65 -0
- package/dist/src/site-header/site-nav-menu.d.ts +104 -0
- package/dist/src/site-header/site-nav-shared.d.ts +13 -0
- package/dist/src/video/index.d.ts +2 -0
- package/dist/src/video/video-source.d.ts +12 -0
- package/dist/src/video/video.d.ts +80 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-o6v6Hrmn.js → strings-MXyrGrNs.js} +28 -1
- package/dist/strings-MXyrGrNs.js.map +1 -0
- package/dist/svg.js +2 -2
- package/dist/switch.js +3 -3
- package/dist/table.js +2 -2
- package/dist/test/carousel.test.d.ts +1 -0
- package/dist/test/highlight.test.d.ts +1 -0
- package/dist/test/site-footer.test.d.ts +1 -0
- package/dist/test/site-header.test.d.ts +1 -0
- package/dist/test/video.test.d.ts +1 -0
- package/dist/textarea.js +4 -4
- package/dist/time-field.js +5 -5
- package/dist/time-picker.js +2 -2
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-BSzBnLZN.js → toggle-base-I1wE_fVe.js} +2 -2
- package/dist/{toggle-base-BSzBnLZN.js.map → toggle-base-I1wE_fVe.js.map} +1 -1
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +3 -3
- package/dist/tree-chart.js +3 -3
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +4 -4
- package/dist/user-menu.js +2 -2
- package/dist/video-IwNmHyft.js +509 -0
- package/dist/video-IwNmHyft.js.map +1 -0
- package/dist/video.js +12 -0
- package/dist/video.js.map +1 -0
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-timeline.js +2 -2
- package/dist/workflow.js +3 -3
- package/dist/workspace-switcher.js +2 -2
- package/package.json +1 -1
- package/readme.md +5 -0
- package/src/__internal/i18n/strings.ts +31 -0
- package/src/carousel/carousel.scss +124 -0
- package/src/carousel/carousel.ts +547 -0
- package/src/carousel/index.ts +1 -0
- package/src/highlight/highlight.scss +25 -0
- package/src/highlight/highlight.ts +123 -0
- package/src/highlight/index.ts +2 -0
- package/src/highlight/matches.ts +94 -0
- package/src/index.ts +18 -0
- package/src/loader.ts +36 -0
- package/src/site-footer/index.ts +2 -0
- package/src/site-footer/site-footer-group.scss +53 -0
- package/src/site-footer/site-footer-group.ts +52 -0
- package/src/site-footer/site-footer.scss +171 -0
- package/src/site-footer/site-footer.ts +151 -0
- package/src/site-header/index.ts +8 -0
- package/src/site-header/site-header.scss +238 -0
- package/src/site-header/site-header.ts +565 -0
- package/src/site-header/site-nav-group.scss +29 -0
- package/src/site-header/site-nav-group.ts +57 -0
- package/src/site-header/site-nav-link.scss +154 -0
- package/src/site-header/site-nav-link.ts +140 -0
- package/src/site-header/site-nav-menu.scss +182 -0
- package/src/site-header/site-nav-menu.ts +336 -0
- package/src/site-header/site-nav-shared.ts +27 -0
- package/src/video/index.ts +2 -0
- package/src/video/video-source.ts +80 -0
- package/src/video/video.scss +183 -0
- package/src/video/video.ts +246 -0
- package/dist/strings-o6v6Hrmn.js.map +0 -1
package/dist/password-field.js
CHANGED
|
@@ -4,13 +4,13 @@ import { r } from './state-BCeDVCI9.js';
|
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { a as ALWAYS_SENSITIVE } from './ai-controller-DR_Tg0sN.js';
|
|
6
6
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
7
|
-
import { I as I18nController } from './i18n-controller-
|
|
8
|
-
import { B as BaseField } from './BaseField-
|
|
9
|
-
import { n as nativeValidity } from './BaseInput-
|
|
7
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
8
|
+
import { B as BaseField } from './BaseField-CHBcjVc2.js';
|
|
9
|
+
import { n as nativeValidity } from './BaseInput-DZp2O8Gh.js';
|
|
10
10
|
import './base-Cl6v8-BZ.js';
|
|
11
11
|
import './locale-DEsJZCQG.js';
|
|
12
12
|
import './directive-ZPhl09Yt.js';
|
|
13
|
-
import './strings-
|
|
13
|
+
import './strings-MXyrGrNs.js';
|
|
14
14
|
import './element-internals-QME0yEz4.js';
|
|
15
15
|
import './form-associated-BHbg72PG.js';
|
|
16
16
|
import './suggestion-controller-7YRQqkaI.js';
|
package/dist/password-rules.js
CHANGED
|
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './Ind
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './class-map-NDIkZErE.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
6
6
|
import './directive-ZPhl09Yt.js';
|
|
7
|
-
import './strings-
|
|
7
|
+
import './strings-MXyrGrNs.js';
|
|
8
8
|
import './locale-DEsJZCQG.js';
|
|
9
9
|
|
|
10
10
|
var css_248z = i`* {
|
package/dist/phone-field.js
CHANGED
|
@@ -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 { s as spread } from './spread-B5cgadZl.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
7
|
-
import { B as BaseField } from './BaseField-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
7
|
+
import { B as BaseField } from './BaseField-CHBcjVc2.js';
|
|
8
8
|
import './base-Cl6v8-BZ.js';
|
|
9
9
|
import './directive-ZPhl09Yt.js';
|
|
10
|
-
import './strings-
|
|
10
|
+
import './strings-MXyrGrNs.js';
|
|
11
11
|
import './locale-DEsJZCQG.js';
|
|
12
|
-
import './BaseInput-
|
|
12
|
+
import './BaseInput-DZp2O8Gh.js';
|
|
13
13
|
import './element-internals-QME0yEz4.js';
|
|
14
14
|
import './form-associated-BHbg72PG.js';
|
|
15
15
|
import './suggestion-controller-7YRQqkaI.js';
|
|
@@ -3,8 +3,8 @@ 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 { s as spread } from './spread-B5cgadZl.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
7
|
-
import { B as BaseField } from './BaseField-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
7
|
+
import { B as BaseField } from './BaseField-CHBcjVc2.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Base for text fields that open a picker in a popover: `wc-date-field`, `wc-time-field` and
|
|
@@ -294,4 +294,4 @@ __decorate([
|
|
|
294
294
|
], PickerField.prototype, "pickerElement", void 0);
|
|
295
295
|
|
|
296
296
|
export { PickerField as P };
|
|
297
|
-
//# sourceMappingURL=picker-field-
|
|
297
|
+
//# sourceMappingURL=picker-field-B5xOFc3-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker-field-loXW-xrW.js","sources":["../../src/__internal/picker-field.ts"],"sourcesContent":["import { html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\n\nimport { spread } from '@/__internal/directive/spread.js';\nimport { I18nController } from '@/__internal/i18n/i18n-controller.js';\nimport BaseField from '../input/BaseField.js';\nimport type { ControlValidity } from '../input/BaseInput.js';\nimport type { Popover } from '../popover/popover.js';\n\n/** A picker hosted in a field's popover: it takes focus when the popover opens. */\ninterface FocusablePicker extends HTMLElement {\n focus(): void;\n}\n\n/** Why a parsed value is not allowed: the validity flag it sets and the message to show. */\nexport interface ValueProblem {\n flag: 'rangeUnderflow' | 'rangeOverflow' | 'badInput';\n message: string;\n}\n\n/**\n * Base for text fields that open a picker in a popover: `wc-date-field`, `wc-time-field` and\n * `wc-datetime-field`.\n *\n * The field keeps the typed text in `draft` and parses it on blur or Enter. Valid text becomes\n * `value` (always ISO, so forms submit a locale-independent value) and fires `change`; text that\n * does not parse, or falls outside `min`/`max`, keeps the draft, shows an error and makes the\n * field invalid (`badInput`, `rangeUnderflow` or `rangeOverflow`). Values picked in the popover\n * fire `input` while they change and `change` once committed.\n *\n * Subclasses supply the parsing, formatting, validation and the picker itself.\n */\nexport default abstract class PickerField extends BaseField {\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** The value as an ISO string; empty when there is none. */\n @property({ type: String }) value = '';\n\n /** BCP 47 locale for display and typed input; defaults to the page language. */\n @property({ type: String }) locale = '';\n\n /** Where the picker opens, relative to the field. */\n @property({ type: String }) placement: Popover['placement'] = 'bottom-start';\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** Text in the input; differs from the formatted `value` while the person is typing. */\n @state() protected draft = '';\n\n @state() protected pickerOpen = false;\n\n /** Message for typed text that could not be used; empty when the text is fine. */\n @state() protected invalidText = '';\n\n /** The validity flag `invalidText` stands for. */\n @state() protected invalidFlag: ValueProblem['flag'] = 'badInput';\n\n // ── Queries ──────────────────────────────────────────────────────────────\n\n @query('wc-popover') protected popoverElement?: Popover;\n\n @query('.input') protected inputElement?: HTMLInputElement;\n\n @query('.picker') protected pickerElement?: FocusablePicker;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** The last value announced with `change`; closing the popover commits anything newer. */\n private lastCommitted = '';\n\n /** Whether to move focus back to the input when the popover closes. */\n private restoreFocus = false;\n\n /** Peacock's strings and the locale values are shown in. */\n protected readonly i18n = new I18nController(this);\n\n // ── Abstract members ─────────────────────────────────────────────────────\n\n /** Material icon name for the button that opens the picker. */\n protected abstract readonly pickerIcon: string;\n\n /** Accessible name for the button that opens the picker. */\n protected abstract get pickerLabel(): string;\n\n /** Whether a value committed in the picker closes the popover. */\n protected abstract closeOnCommit(value: string): boolean;\n\n /** Parses typed text to an ISO value, or returns null when it cannot be read. */\n protected abstract parseText(text: string): string | null;\n\n /** Formats an ISO value as display text. */\n protected abstract formatValue(value: string): string;\n\n /** The format hint used for the placeholder and the error message. */\n protected abstract formatHint(): string;\n\n /** Returns the problem when a parsed value is not allowed (outside min/max), else null. */\n protected abstract validateValue(value: string): ValueProblem | null;\n\n /** Renders the picker inside the popover. It must carry the `picker` class. */\n protected abstract renderPicker(): TemplateResult;\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n override connectedCallback() {\n super.connectedCallback();\n this.lastCommitted = this.value;\n }\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (changed.has('value') || changed.has('locale')) {\n this.draft = this.formatValue(this.value);\n this.invalidText = '';\n }\n }\n\n // ── Public methods ───────────────────────────────────────────────────────\n\n override focus() {\n this.inputElement?.focus();\n }\n\n override blur() {\n this.inputElement?.blur();\n }\n\n /** Opens the picker and moves focus into it. */\n showPicker() {\n if (this.disabled || this.readonly) return;\n this.popoverElement?.show();\n this.updateComplete.then(() => {\n requestAnimationFrame(() => this.pickerElement?.focus());\n });\n }\n\n /** Closes the picker. */\n hidePicker() {\n this.popoverElement?.hide();\n }\n\n // ── Protected methods ────────────────────────────────────────────────────\n\n protected get resolvedLocale(): string {\n return this.i18n.locale;\n }\n\n protected override computeValidity(): ControlValidity {\n if (this.invalidText && !this.disabled) {\n return {\n flags: { [this.invalidFlag]: true },\n message: this.invalidText,\n };\n }\n return super.computeValidity();\n }\n\n protected override validityAnchor() {\n return this.inputElement;\n }\n\n /** Sets the value and fires `change`. */\n protected commit(value: string) {\n this.value = value;\n this.lastCommitted = value;\n this.emitValue('change');\n }\n\n /** Sets the value and fires `input`, for a change that is not committed yet. */\n protected preview(value: string) {\n this.value = value;\n this.emitValue('input');\n }\n\n protected override clearValue() {\n this.preview('');\n this.commit('');\n }\n\n protected handlePickerInput(event: CustomEvent<{ value: string }>) {\n event.stopPropagation();\n this.preview(event.detail.value);\n }\n\n protected handlePickerChange(event: CustomEvent<{ value: string }>) {\n event.stopPropagation();\n this.commit(event.detail.value);\n if (this.closeOnCommit(event.detail.value)) {\n this.restoreFocus = true;\n this.hidePicker();\n }\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n private handleTextInput(event: InputEvent) {\n // The native event escapes the shadow root; the field fires its own `input` from the picker.\n event.stopPropagation();\n this.draft = (event.target as HTMLInputElement).value;\n this.invalidText = '';\n }\n\n private handleTextChange(event?: Event) {\n event?.stopPropagation();\n const text = this.draft.trim();\n if (!text) {\n this.invalidText = '';\n if (this.value) this.commit('');\n return;\n }\n const parsed = this.parseText(text);\n if (parsed === null) {\n this.invalidFlag = 'badInput';\n this.invalidText = this.i18n.t('enterFormat')(this.formatHint());\n return;\n }\n const problem = this.validateValue(parsed);\n if (problem) {\n this.invalidFlag = problem.flag;\n this.invalidText = problem.message;\n return;\n }\n if (parsed !== this.value) this.commit(parsed);\n // The value may be unchanged while the text differs (`6/11/26` for `06/11/2026`).\n this.draft = this.formatValue(parsed);\n }\n\n private handleTextKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') this.handleTextChange();\n if (event.key === 'ArrowDown' && event.altKey) {\n event.preventDefault();\n this.showPicker();\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.pickerOpen) {\n event.stopPropagation();\n this.restoreFocus = true;\n this.hidePicker();\n }\n }\n\n private handleButtonClick(event: MouseEvent) {\n // Keep the field from moving focus to the text input.\n event.stopPropagation();\n if (this.pickerOpen) this.hidePicker();\n else this.showPicker();\n }\n\n /**\n * The popover's `open`/`close` (and those of anything inside it) are internal: they bubble and\n * are composed, so stop them here, or consumers listening on the field would hear them.\n */\n private handleOverlayEvent = (event: Event) => {\n event.stopPropagation();\n if (event.target !== this.popoverElement) return;\n if (event.type === 'open') this.handlePopoverOpen();\n else this.handlePopoverClose();\n };\n\n private handlePopoverOpen() {\n this.pickerOpen = true;\n }\n\n private handlePopoverClose() {\n this.pickerOpen = false;\n if (this.value !== this.lastCommitted) this.commit(this.value);\n if (this.restoreFocus) {\n this.restoreFocus = false;\n this.focus();\n }\n }\n\n // ── Render helpers ───────────────────────────────────────────────────────\n\n private renderPickerButton() {\n return html`<wc-icon-button\n slot=\"field-end\"\n class=\"picker-button\"\n shape=\"round\"\n variant=\"text\"\n color=\"secondary\"\n size=\"sm\"\n aria-label=${this.pickerLabel}\n aria-haspopup=\"dialog\"\n aria-expanded=${String(this.pickerOpen)}\n ?disabled=${this.disabled || this.readonly}\n @click=${this.handleButtonClick}\n >\n <wc-icon name=${this.pickerIcon}></wc-icon>\n </wc-icon-button>`;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n return html`\n <wc-popover\n class=\"popover\"\n trigger=\"manual\"\n placement=${this.placement}\n offset=\"4\"\n @keydown=${this.handleKeyDown}\n @open=${this.handleOverlayEvent}\n @close=${this.handleOverlayEvent}\n >\n ${this.renderField(\n html`<input\n class=\"input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n placeholder=${this.placeholder || this.formatHint()}\n .value=${this.draft}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n @input=${this.handleTextInput}\n @change=${this.handleTextChange}\n @keydown=${this.handleTextKeyDown}\n @focus=${this.handleFieldFocus}\n @blur=${this.handleFieldFocus}\n ${spread(this.fieldAria(this.invalidText))}\n />`,\n {\n populated: !!this.draft,\n focused: this.focused || this.pickerOpen,\n controlError: this.invalidText,\n end: this.renderPickerButton(),\n },\n )}\n <wc-popover-content\n class=\"picker-panel\"\n role=\"dialog\"\n aria-label=${this.pickerLabel}\n >\n ${this.renderPicker()}\n </wc-popover-content>\n </wc-popover>\n `;\n }\n}\n"],"names":["html","property","state","query"],"mappings":";;;;;;;;AAoBA;;;;;;;;;;;AAWG;AACW,MAAgB,WAAY,SAAQ,SAAS,CAAA;AAA3D,IAA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AA,MAAA,CAAA;AAInC,UAAA,CAAA;IAA9BC,CAAK,CAAC,YAAY;AAAqC,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAE7B,UAAA,CAAA;IAA1BA,CAAK,CAAC,QAAQ;AAA4C,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAE/B,UAAA,CAAA;IAA3BA,CAAK,CAAC,SAAS;AAA4C,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"picker-field-B5xOFc3-.js","sources":["../../src/__internal/picker-field.ts"],"sourcesContent":["import { html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\n\nimport { spread } from '@/__internal/directive/spread.js';\nimport { I18nController } from '@/__internal/i18n/i18n-controller.js';\nimport BaseField from '../input/BaseField.js';\nimport type { ControlValidity } from '../input/BaseInput.js';\nimport type { Popover } from '../popover/popover.js';\n\n/** A picker hosted in a field's popover: it takes focus when the popover opens. */\ninterface FocusablePicker extends HTMLElement {\n focus(): void;\n}\n\n/** Why a parsed value is not allowed: the validity flag it sets and the message to show. */\nexport interface ValueProblem {\n flag: 'rangeUnderflow' | 'rangeOverflow' | 'badInput';\n message: string;\n}\n\n/**\n * Base for text fields that open a picker in a popover: `wc-date-field`, `wc-time-field` and\n * `wc-datetime-field`.\n *\n * The field keeps the typed text in `draft` and parses it on blur or Enter. Valid text becomes\n * `value` (always ISO, so forms submit a locale-independent value) and fires `change`; text that\n * does not parse, or falls outside `min`/`max`, keeps the draft, shows an error and makes the\n * field invalid (`badInput`, `rangeUnderflow` or `rangeOverflow`). Values picked in the popover\n * fire `input` while they change and `change` once committed.\n *\n * Subclasses supply the parsing, formatting, validation and the picker itself.\n */\nexport default abstract class PickerField extends BaseField {\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** The value as an ISO string; empty when there is none. */\n @property({ type: String }) value = '';\n\n /** BCP 47 locale for display and typed input; defaults to the page language. */\n @property({ type: String }) locale = '';\n\n /** Where the picker opens, relative to the field. */\n @property({ type: String }) placement: Popover['placement'] = 'bottom-start';\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** Text in the input; differs from the formatted `value` while the person is typing. */\n @state() protected draft = '';\n\n @state() protected pickerOpen = false;\n\n /** Message for typed text that could not be used; empty when the text is fine. */\n @state() protected invalidText = '';\n\n /** The validity flag `invalidText` stands for. */\n @state() protected invalidFlag: ValueProblem['flag'] = 'badInput';\n\n // ── Queries ──────────────────────────────────────────────────────────────\n\n @query('wc-popover') protected popoverElement?: Popover;\n\n @query('.input') protected inputElement?: HTMLInputElement;\n\n @query('.picker') protected pickerElement?: FocusablePicker;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** The last value announced with `change`; closing the popover commits anything newer. */\n private lastCommitted = '';\n\n /** Whether to move focus back to the input when the popover closes. */\n private restoreFocus = false;\n\n /** Peacock's strings and the locale values are shown in. */\n protected readonly i18n = new I18nController(this);\n\n // ── Abstract members ─────────────────────────────────────────────────────\n\n /** Material icon name for the button that opens the picker. */\n protected abstract readonly pickerIcon: string;\n\n /** Accessible name for the button that opens the picker. */\n protected abstract get pickerLabel(): string;\n\n /** Whether a value committed in the picker closes the popover. */\n protected abstract closeOnCommit(value: string): boolean;\n\n /** Parses typed text to an ISO value, or returns null when it cannot be read. */\n protected abstract parseText(text: string): string | null;\n\n /** Formats an ISO value as display text. */\n protected abstract formatValue(value: string): string;\n\n /** The format hint used for the placeholder and the error message. */\n protected abstract formatHint(): string;\n\n /** Returns the problem when a parsed value is not allowed (outside min/max), else null. */\n protected abstract validateValue(value: string): ValueProblem | null;\n\n /** Renders the picker inside the popover. It must carry the `picker` class. */\n protected abstract renderPicker(): TemplateResult;\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n override connectedCallback() {\n super.connectedCallback();\n this.lastCommitted = this.value;\n }\n\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (changed.has('value') || changed.has('locale')) {\n this.draft = this.formatValue(this.value);\n this.invalidText = '';\n }\n }\n\n // ── Public methods ───────────────────────────────────────────────────────\n\n override focus() {\n this.inputElement?.focus();\n }\n\n override blur() {\n this.inputElement?.blur();\n }\n\n /** Opens the picker and moves focus into it. */\n showPicker() {\n if (this.disabled || this.readonly) return;\n this.popoverElement?.show();\n this.updateComplete.then(() => {\n requestAnimationFrame(() => this.pickerElement?.focus());\n });\n }\n\n /** Closes the picker. */\n hidePicker() {\n this.popoverElement?.hide();\n }\n\n // ── Protected methods ────────────────────────────────────────────────────\n\n protected get resolvedLocale(): string {\n return this.i18n.locale;\n }\n\n protected override computeValidity(): ControlValidity {\n if (this.invalidText && !this.disabled) {\n return {\n flags: { [this.invalidFlag]: true },\n message: this.invalidText,\n };\n }\n return super.computeValidity();\n }\n\n protected override validityAnchor() {\n return this.inputElement;\n }\n\n /** Sets the value and fires `change`. */\n protected commit(value: string) {\n this.value = value;\n this.lastCommitted = value;\n this.emitValue('change');\n }\n\n /** Sets the value and fires `input`, for a change that is not committed yet. */\n protected preview(value: string) {\n this.value = value;\n this.emitValue('input');\n }\n\n protected override clearValue() {\n this.preview('');\n this.commit('');\n }\n\n protected handlePickerInput(event: CustomEvent<{ value: string }>) {\n event.stopPropagation();\n this.preview(event.detail.value);\n }\n\n protected handlePickerChange(event: CustomEvent<{ value: string }>) {\n event.stopPropagation();\n this.commit(event.detail.value);\n if (this.closeOnCommit(event.detail.value)) {\n this.restoreFocus = true;\n this.hidePicker();\n }\n }\n\n // ── Private methods ──────────────────────────────────────────────────────\n\n private handleTextInput(event: InputEvent) {\n // The native event escapes the shadow root; the field fires its own `input` from the picker.\n event.stopPropagation();\n this.draft = (event.target as HTMLInputElement).value;\n this.invalidText = '';\n }\n\n private handleTextChange(event?: Event) {\n event?.stopPropagation();\n const text = this.draft.trim();\n if (!text) {\n this.invalidText = '';\n if (this.value) this.commit('');\n return;\n }\n const parsed = this.parseText(text);\n if (parsed === null) {\n this.invalidFlag = 'badInput';\n this.invalidText = this.i18n.t('enterFormat')(this.formatHint());\n return;\n }\n const problem = this.validateValue(parsed);\n if (problem) {\n this.invalidFlag = problem.flag;\n this.invalidText = problem.message;\n return;\n }\n if (parsed !== this.value) this.commit(parsed);\n // The value may be unchanged while the text differs (`6/11/26` for `06/11/2026`).\n this.draft = this.formatValue(parsed);\n }\n\n private handleTextKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') this.handleTextChange();\n if (event.key === 'ArrowDown' && event.altKey) {\n event.preventDefault();\n this.showPicker();\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.pickerOpen) {\n event.stopPropagation();\n this.restoreFocus = true;\n this.hidePicker();\n }\n }\n\n private handleButtonClick(event: MouseEvent) {\n // Keep the field from moving focus to the text input.\n event.stopPropagation();\n if (this.pickerOpen) this.hidePicker();\n else this.showPicker();\n }\n\n /**\n * The popover's `open`/`close` (and those of anything inside it) are internal: they bubble and\n * are composed, so stop them here, or consumers listening on the field would hear them.\n */\n private handleOverlayEvent = (event: Event) => {\n event.stopPropagation();\n if (event.target !== this.popoverElement) return;\n if (event.type === 'open') this.handlePopoverOpen();\n else this.handlePopoverClose();\n };\n\n private handlePopoverOpen() {\n this.pickerOpen = true;\n }\n\n private handlePopoverClose() {\n this.pickerOpen = false;\n if (this.value !== this.lastCommitted) this.commit(this.value);\n if (this.restoreFocus) {\n this.restoreFocus = false;\n this.focus();\n }\n }\n\n // ── Render helpers ───────────────────────────────────────────────────────\n\n private renderPickerButton() {\n return html`<wc-icon-button\n slot=\"field-end\"\n class=\"picker-button\"\n shape=\"round\"\n variant=\"text\"\n color=\"secondary\"\n size=\"sm\"\n aria-label=${this.pickerLabel}\n aria-haspopup=\"dialog\"\n aria-expanded=${String(this.pickerOpen)}\n ?disabled=${this.disabled || this.readonly}\n @click=${this.handleButtonClick}\n >\n <wc-icon name=${this.pickerIcon}></wc-icon>\n </wc-icon-button>`;\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n render() {\n return html`\n <wc-popover\n class=\"popover\"\n trigger=\"manual\"\n placement=${this.placement}\n offset=\"4\"\n @keydown=${this.handleKeyDown}\n @open=${this.handleOverlayEvent}\n @close=${this.handleOverlayEvent}\n >\n ${this.renderField(\n html`<input\n class=\"input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n placeholder=${this.placeholder || this.formatHint()}\n .value=${this.draft}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n @input=${this.handleTextInput}\n @change=${this.handleTextChange}\n @keydown=${this.handleTextKeyDown}\n @focus=${this.handleFieldFocus}\n @blur=${this.handleFieldFocus}\n ${spread(this.fieldAria(this.invalidText))}\n />`,\n {\n populated: !!this.draft,\n focused: this.focused || this.pickerOpen,\n controlError: this.invalidText,\n end: this.renderPickerButton(),\n },\n )}\n <wc-popover-content\n class=\"picker-panel\"\n role=\"dialog\"\n aria-label=${this.pickerLabel}\n >\n ${this.renderPicker()}\n </wc-popover-content>\n </wc-popover>\n `;\n }\n}\n"],"names":["html","property","state","query"],"mappings":";;;;;;;;AAoBA;;;;;;;;;;;AAWG;AACW,MAAgB,WAAY,SAAQ,SAAS,CAAA;AAA3D,IAAA,WAAA,GAAA;;;;QAI8B,IAAA,CAAA,KAAK,GAAG,EAAE;;QAGV,IAAA,CAAA,MAAM,GAAG,EAAE;;QAGX,IAAA,CAAA,SAAS,GAAyB,cAAc;;;QAKzD,IAAA,CAAA,KAAK,GAAG,EAAE;QAEV,IAAA,CAAA,UAAU,GAAG,KAAK;;QAGlB,IAAA,CAAA,WAAW,GAAG,EAAE;;QAGhB,IAAA,CAAA,WAAW,GAAyB,UAAU;;;QAazD,IAAA,CAAA,aAAa,GAAG,EAAE;;QAGlB,IAAA,CAAA,YAAY,GAAG,KAAK;;AAGT,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC;AA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.js';
|
|
|
4
4
|
import { l } from './live-D_5OfuGD.js';
|
|
5
5
|
import { a as ALWAYS_SENSITIVE } from './ai-controller-DR_Tg0sN.js';
|
|
6
6
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
7
|
-
import { I as I18nController } from './i18n-controller-
|
|
8
|
-
import { B as BaseField } from './BaseField-
|
|
7
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
8
|
+
import { B as BaseField } from './BaseField-CHBcjVc2.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
11
|
import './directive-helpers-Bx3mu42O.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
|
-
import './strings-
|
|
13
|
+
import './strings-MXyrGrNs.js';
|
|
14
14
|
import './state-BCeDVCI9.js';
|
|
15
|
-
import './BaseInput-
|
|
15
|
+
import './BaseInput-DZp2O8Gh.js';
|
|
16
16
|
import './element-internals-QME0yEz4.js';
|
|
17
17
|
import './form-associated-BHbg72PG.js';
|
|
18
18
|
import './suggestion-controller-7YRQqkaI.js';
|
|
@@ -2,9 +2,9 @@ import { i, w, _ 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 { e } from './class-map-NDIkZErE.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
6
6
|
import './directive-ZPhl09Yt.js';
|
|
7
|
-
import './strings-
|
|
7
|
+
import './strings-MXyrGrNs.js';
|
|
8
8
|
import './locale-DEsJZCQG.js';
|
|
9
9
|
|
|
10
10
|
var css_248z = i`* {
|
package/dist/prompt-input.js
CHANGED
|
@@ -2,7 +2,7 @@ import { i, _ as __decorate, I as IndividualComponent, b, A } from './Individual
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { e } from './class-map-NDIkZErE.js';
|
|
4
4
|
import { i as Extension } from './slash-controller-DAsDquPA.js';
|
|
5
|
-
import { R as RichTextInput } from './rich-text-input-
|
|
5
|
+
import { R as RichTextInput } from './rich-text-input-C4B9D6oD.js';
|
|
6
6
|
import { e as extractMentions } from './markdown-lexer-Bx4Vkpu6.js';
|
|
7
7
|
import './directive-ZPhl09Yt.js';
|
|
8
8
|
import './diff-CT416thw.js';
|
|
@@ -18,12 +18,12 @@ import './state-BCeDVCI9.js';
|
|
|
18
18
|
import './query-CHb9Ft_d.js';
|
|
19
19
|
import './base-Cl6v8-BZ.js';
|
|
20
20
|
import './style-map-CHOg6N_R.js';
|
|
21
|
-
import './BaseInput-
|
|
21
|
+
import './BaseInput-DZp2O8Gh.js';
|
|
22
22
|
import './element-internals-QME0yEz4.js';
|
|
23
23
|
import './form-associated-BHbg72PG.js';
|
|
24
|
-
import './strings-
|
|
24
|
+
import './strings-MXyrGrNs.js';
|
|
25
25
|
import './suggestion-controller-7YRQqkaI.js';
|
|
26
|
-
import './i18n-controller-
|
|
26
|
+
import './i18n-controller-DLJcJ5gO.js';
|
|
27
27
|
|
|
28
28
|
var css_248z = i`* {
|
|
29
29
|
box-sizing: border-box;
|
package/dist/radio.js
CHANGED
|
@@ -2,15 +2,15 @@ import { i, _ as __decorate, I as IndividualComponent, b } from './IndividualCom
|
|
|
2
2
|
import { r } from './state-BCeDVCI9.js';
|
|
3
3
|
import { e } from './class-map-NDIkZErE.js';
|
|
4
4
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
5
|
-
import { p as peacockString } from './strings-
|
|
6
|
-
import { T as ToggleBase } from './toggle-base-
|
|
5
|
+
import { p as peacockString } from './strings-MXyrGrNs.js';
|
|
6
|
+
import { T as ToggleBase } from './toggle-base-I1wE_fVe.js';
|
|
7
7
|
import './property-B2TG3KEE.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
9
|
import './query-CHb9Ft_d.js';
|
|
10
10
|
import './base-Cl6v8-BZ.js';
|
|
11
11
|
import './form-associated-BHbg72PG.js';
|
|
12
12
|
import './element-internals-QME0yEz4.js';
|
|
13
|
-
import './BaseInput-
|
|
13
|
+
import './BaseInput-DZp2O8Gh.js';
|
|
14
14
|
import './suggestion-controller-7YRQqkaI.js';
|
|
15
15
|
import './ai-controller-DR_Tg0sN.js';
|
|
16
16
|
import './locale-DEsJZCQG.js';
|
package/dist/rating.js
CHANGED
|
@@ -4,13 +4,13 @@ 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 { o } from './style-map-CHOg6N_R.js';
|
|
7
|
-
import { I as I18nController } from './i18n-controller-
|
|
7
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
8
8
|
import { i as isRtl } from './locale-DEsJZCQG.js';
|
|
9
9
|
import { g as getFormValue } from './form-associated-BHbg72PG.js';
|
|
10
|
-
import { B as BaseInput } from './BaseInput-
|
|
10
|
+
import { B as BaseInput } from './BaseInput-DZp2O8Gh.js';
|
|
11
11
|
import './base-Cl6v8-BZ.js';
|
|
12
12
|
import './directive-ZPhl09Yt.js';
|
|
13
|
-
import './strings-
|
|
13
|
+
import './strings-MXyrGrNs.js';
|
|
14
14
|
import './element-internals-QME0yEz4.js';
|
|
15
15
|
import './suggestion-controller-7YRQqkaI.js';
|
|
16
16
|
import './ai-controller-DR_Tg0sN.js';
|
package/dist/redvars-loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, w, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { o } from './style-map-CHOg6N_R.js';
|
|
4
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
5
5
|
import './directive-ZPhl09Yt.js';
|
|
6
|
-
import './strings-
|
|
6
|
+
import './strings-MXyrGrNs.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = i`* {
|
package/dist/relative-time.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { I as I18nController } from './i18n-controller-
|
|
3
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
4
4
|
import { p as parseDatetime, w as watchRelativeTime, d as parseDuration, f as formatAbsoluteTime, b as formatTime } from './relative-time-BNxqvEbg.js';
|
|
5
|
-
import './strings-
|
|
5
|
+
import './strings-MXyrGrNs.js';
|
|
6
6
|
import './locale-DEsJZCQG.js';
|
|
7
7
|
|
|
8
8
|
var css_248z = i`* {
|
package/dist/resizable-panels.js
CHANGED
|
@@ -3,12 +3,12 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { r as r$1 } from './query-all-ThKhg-Lp.js';
|
|
5
5
|
import { e } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-DLJcJ5gO.js';
|
|
7
7
|
import { i as isRtl } from './locale-DEsJZCQG.js';
|
|
8
8
|
import { Panel } from './panel.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
|
-
import './strings-
|
|
11
|
+
import './strings-MXyrGrNs.js';
|
|
12
12
|
|
|
13
13
|
var css_248z = i`* {
|
|
14
14
|
box-sizing: border-box;
|
|
@@ -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-
|
|
9
|
-
import { I as I18nController } from './i18n-controller-
|
|
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 = [
|
|
@@ -659,4 +659,4 @@ __decorate([
|
|
|
659
659
|
], RichTextInput.prototype, "editorRoot", void 0);
|
|
660
660
|
|
|
661
661
|
export { RichTextInput as R };
|
|
662
|
-
//# sourceMappingURL=rich-text-input-
|
|
662
|
+
//# sourceMappingURL=rich-text-input-C4B9D6oD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-input-B5j0eqCJ.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,CAA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,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,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
|
+
{"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;AA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AAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,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-
|
|
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-
|
|
103
|
+
//# sourceMappingURL=schema-CPhNrjrx.js.map
|