@samtv12345/etherpad-webcomponents 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +11 -0
  2. package/dist/EpAvatar.d.ts +25 -0
  3. package/dist/EpAvatar.d.ts.map +1 -0
  4. package/dist/EpAvatar.js +115 -0
  5. package/dist/EpAvatar.js.map +1 -0
  6. package/dist/EpChatMessage.d.ts.map +1 -1
  7. package/dist/EpChatMessage.js +3 -1
  8. package/dist/EpChatMessage.js.map +1 -1
  9. package/dist/EpChatPanel.d.ts +81 -0
  10. package/dist/EpChatPanel.d.ts.map +1 -0
  11. package/dist/EpChatPanel.js +368 -0
  12. package/dist/EpChatPanel.js.map +1 -0
  13. package/dist/EpCheckbox.d.ts +3 -0
  14. package/dist/EpCheckbox.d.ts.map +1 -1
  15. package/dist/EpCheckbox.js +9 -1
  16. package/dist/EpCheckbox.js.map +1 -1
  17. package/dist/EpPopup.d.ts +57 -0
  18. package/dist/EpPopup.d.ts.map +1 -0
  19. package/dist/EpPopup.js +323 -0
  20. package/dist/EpPopup.js.map +1 -0
  21. package/dist/EpSegmented.d.ts +35 -0
  22. package/dist/EpSegmented.d.ts.map +1 -0
  23. package/dist/EpSegmented.js +149 -0
  24. package/dist/EpSegmented.js.map +1 -0
  25. package/dist/EpSettings.d.ts +47 -0
  26. package/dist/EpSettings.d.ts.map +1 -0
  27. package/dist/EpSettings.js +226 -0
  28. package/dist/EpSettings.js.map +1 -0
  29. package/dist/EpToolbar.d.ts +90 -0
  30. package/dist/EpToolbar.d.ts.map +1 -0
  31. package/dist/EpToolbar.js +431 -0
  32. package/dist/EpToolbar.js.map +1 -0
  33. package/dist/EpUserBadge.d.ts.map +1 -1
  34. package/dist/EpUserBadge.js +3 -1
  35. package/dist/EpUserBadge.js.map +1 -1
  36. package/dist/EpUserList.d.ts +52 -0
  37. package/dist/EpUserList.d.ts.map +1 -0
  38. package/dist/EpUserList.js +225 -0
  39. package/dist/EpUserList.js.map +1 -0
  40. package/dist/index.d.ts +10 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +7 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/internal/color.d.ts +15 -0
  45. package/dist/internal/color.d.ts.map +1 -0
  46. package/dist/internal/color.js +44 -0
  47. package/dist/internal/color.js.map +1 -0
  48. package/package.json +8 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpSegmented.js","sourceRoot":"","sources":["../src/EpSegmented.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAazD;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QA4C2B,YAAO,GAAwB,EAAE,CAAC;QACrC,UAAK,GAAG,EAAE,CAAC;QACI,aAAQ,GAAG,KAAK,CAAC;QAC7D,oCAAoC;QACxB,UAAK,GAAG,EAAE,CAAC;IA0DzB,CAAC;IAxDS,OAAO,CAAC,KAAa,EAAE,KAAK,GAAG,KAAK;QAC1C,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,WAAW,EAAE;gBAC9C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE;aACjD,CAAC,CAAC,CAAC;QACN,CAAC;QACD,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAA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O,CAAC,CAAC,CAAC,KAAK,CAAC;gBAClC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,KAAK;sBAC9C,CAAC;QACf,CAAC,CAAC;;KAEL,CAAC;IACJ,CAAC;;AAxGM,kBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyClB,AAzCY,CAyCX;AAE8B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4CAAmC;AACrC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAY;AACI;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAkB;AAEjD;IAAX,QAAQ,EAAE;0CAAY;AAhDZ,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA0GvB"}
@@ -0,0 +1,47 @@
1
+ import { LitElement } from 'lit';
2
+ /** Group of settings rows with a heading. */
3
+ export declare class EpSettingsSection extends LitElement {
4
+ static styles: import("lit").CSSResult;
5
+ heading: string;
6
+ description: string;
7
+ render(): import("lit-html").TemplateResult<1>;
8
+ }
9
+ /**
10
+ * One setting: label (and optional description) on the left, the control
11
+ * (slotted, e.g. `<ep-checkbox>`, `<ep-select>`, `<ep-segmented>`) on the
12
+ * right. `stacked` puts the control below the label.
13
+ *
14
+ * Clicking the label activates a slotted `ep-checkbox` or focuses the
15
+ * control.
16
+ */
17
+ export declare class EpSettingsRow extends LitElement {
18
+ static styles: import("lit").CSSResult;
19
+ label: string;
20
+ description: string;
21
+ stacked: boolean;
22
+ divided: boolean;
23
+ disabled: boolean;
24
+ private _control;
25
+ updated(): void;
26
+ private _syncControl;
27
+ /**
28
+ * Gives the control the row label as accessible name. Names set by the row
29
+ * are marked with `data-ep-row-label` so they follow label changes (e.g. a
30
+ * language switch); names set by the page are left alone.
31
+ */
32
+ private _nameControl;
33
+ /**
34
+ * A disabled row disables its control too (keyboard included). Controls
35
+ * that were disabled by the page stay disabled when the row is enabled.
36
+ */
37
+ private _disableControl;
38
+ private _onLabelClick;
39
+ render(): import("lit-html").TemplateResult<1>;
40
+ }
41
+ declare global {
42
+ interface HTMLElementTagNameMap {
43
+ 'ep-settings-section': EpSettingsSection;
44
+ 'ep-settings-row': EpSettingsRow;
45
+ }
46
+ }
47
+ //# sourceMappingURL=EpSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpSettings.d.ts","sourceRoot":"","sources":["../src/EpSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD,6CAA6C;AAC7C,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,MAAM,CAAC,MAAM,0BAyBX;IAEU,OAAO,SAAM;IACb,WAAW,SAAM;IAE7B,MAAM;CASP;AAED;;;;;;;GAOG;AACH,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAqCX;IAEU,KAAK,SAAM;IACX,WAAW,SAAM;IACe,OAAO,UAAS;IAChB,OAAO,UAAS;IAChB,QAAQ,UAAS;IAE7D,OAAO,CAAC,QAAQ;IAKhB,OAAO;IAIP,OAAO,CAAC,YAAY;IAOpB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAmBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,aAAa;IAWrB,MAAM;CASP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;QACzC,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -0,0 +1,226 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css, nothing } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ /** Group of settings rows with a heading. */
10
+ let EpSettingsSection = class EpSettingsSection extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.heading = '';
14
+ this.description = '';
15
+ }
16
+ render() {
17
+ return html `
18
+ <section part="section" aria-labelledby=${this.heading ? 'h' : nothing}>
19
+ ${this.heading ? html `<h3 id="h" part="heading">${this.heading}</h3>` : nothing}
20
+ ${this.description ? html `<p class="description" part="description">${this.description}</p>` : nothing}
21
+ <div class="rows" part="rows"><slot></slot></div>
22
+ </section>
23
+ `;
24
+ }
25
+ };
26
+ EpSettingsSection.styles = css `
27
+ :host {
28
+ display: block;
29
+ font-family: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
30
+ color: var(--text-color, #485365);
31
+ }
32
+ :host([hidden]) { display: none; }
33
+ :host(:not(:first-of-type)) { margin-top: 20px; }
34
+ h3 {
35
+ margin: 0 0 4px;
36
+ font-size: 12px;
37
+ font-weight: 700;
38
+ text-transform: uppercase;
39
+ letter-spacing: 0.04em;
40
+ color: var(--text-soft-color, #576273);
41
+ }
42
+ .description {
43
+ margin: 0 0 8px;
44
+ font-size: 13px;
45
+ color: var(--text-soft-color, #576273);
46
+ }
47
+ .rows {
48
+ display: flex;
49
+ flex-direction: column;
50
+ }
51
+ `;
52
+ __decorate([
53
+ property()
54
+ ], EpSettingsSection.prototype, "heading", void 0);
55
+ __decorate([
56
+ property()
57
+ ], EpSettingsSection.prototype, "description", void 0);
58
+ EpSettingsSection = __decorate([
59
+ customElement('ep-settings-section')
60
+ ], EpSettingsSection);
61
+ export { EpSettingsSection };
62
+ /**
63
+ * One setting: label (and optional description) on the left, the control
64
+ * (slotted, e.g. `<ep-checkbox>`, `<ep-select>`, `<ep-segmented>`) on the
65
+ * right. `stacked` puts the control below the label.
66
+ *
67
+ * Clicking the label activates a slotted `ep-checkbox` or focuses the
68
+ * control.
69
+ */
70
+ let EpSettingsRow = class EpSettingsRow extends LitElement {
71
+ constructor() {
72
+ super(...arguments);
73
+ this.label = '';
74
+ this.description = '';
75
+ this.stacked = false;
76
+ this.divided = false;
77
+ this.disabled = false;
78
+ }
79
+ _control() {
80
+ const slot = this.renderRoot.querySelector('slot:not([name])');
81
+ return slot?.assignedElements({ flatten: true })[0];
82
+ }
83
+ updated() {
84
+ this._syncControl();
85
+ }
86
+ _syncControl() {
87
+ const control = this._control();
88
+ if (!control)
89
+ return;
90
+ this._nameControl(control);
91
+ this._disableControl(control);
92
+ }
93
+ /**
94
+ * Gives the control the row label as accessible name. Names set by the row
95
+ * are marked with `data-ep-row-label` so they follow label changes (e.g. a
96
+ * language switch); names set by the page are left alone.
97
+ */
98
+ _nameControl(control) {
99
+ const ours = control.hasAttribute('data-ep-row-label');
100
+ const label = this.label;
101
+ const set = (attr) => {
102
+ if (label)
103
+ control.setAttribute(attr, label);
104
+ else
105
+ control.removeAttribute(attr);
106
+ if (label)
107
+ control.setAttribute('data-ep-row-label', attr);
108
+ else
109
+ control.removeAttribute('data-ep-row-label');
110
+ };
111
+ if (control.tagName === 'EP-CHECKBOX') {
112
+ if (ours || (!control.getAttribute('label') && !control.getAttribute('accessible-name')))
113
+ set('accessible-name');
114
+ }
115
+ else if (control.tagName === 'EP-SEGMENTED') {
116
+ // Its radiogroup takes the name from the label property.
117
+ if (ours || !control.getAttribute('label'))
118
+ set('label');
119
+ }
120
+ else if (ours || (!control.hasAttribute('aria-label') && !control.hasAttribute('aria-labelledby'))) {
121
+ set('aria-label');
122
+ }
123
+ }
124
+ /**
125
+ * A disabled row disables its control too (keyboard included). Controls
126
+ * that were disabled by the page stay disabled when the row is enabled.
127
+ */
128
+ _disableControl(control) {
129
+ const el = control;
130
+ const ours = control.hasAttribute('data-ep-row-disabled');
131
+ if (this.disabled) {
132
+ if (!el.disabled && !control.hasAttribute('disabled')) {
133
+ if ('disabled' in el)
134
+ el.disabled = true;
135
+ else
136
+ control.setAttribute('disabled', '');
137
+ control.setAttribute('data-ep-row-disabled', '');
138
+ }
139
+ }
140
+ else if (ours) {
141
+ if ('disabled' in el)
142
+ el.disabled = false;
143
+ control.removeAttribute('disabled');
144
+ control.removeAttribute('data-ep-row-disabled');
145
+ }
146
+ }
147
+ _onLabelClick() {
148
+ const control = this._control();
149
+ if (!control)
150
+ return;
151
+ if (control.tagName === 'EP-CHECKBOX') {
152
+ const input = control.shadowRoot?.querySelector('input');
153
+ if (input)
154
+ input.click();
155
+ return;
156
+ }
157
+ control.focus();
158
+ }
159
+ render() {
160
+ return html `
161
+ <div class="text" part="text" @click=${this._onLabelClick}>
162
+ <div class="label" part="label"><slot name="label">${this.label}</slot></div>
163
+ ${this.description ? html `<div class="description" part="description">${this.description}</div>` : nothing}
164
+ </div>
165
+ <div class="control" part="control"><slot @slotchange=${this._syncControl}></slot></div>
166
+ `;
167
+ }
168
+ };
169
+ EpSettingsRow.styles = css `
170
+ :host {
171
+ display: flex;
172
+ align-items: center;
173
+ gap: 16px;
174
+ padding: 8px 0;
175
+ min-height: 32px;
176
+ font-family: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
177
+ font-size: 14px;
178
+ color: var(--text-color, #485365);
179
+ }
180
+ :host([hidden]) { display: none; }
181
+ :host([divided]) { border-top: 1px solid var(--middle-color, #d2d2d2); }
182
+ :host([stacked]) {
183
+ flex-direction: column;
184
+ align-items: stretch;
185
+ gap: 6px;
186
+ }
187
+ :host([disabled]) { opacity: 0.5; pointer-events: none; }
188
+ .text {
189
+ flex: 1;
190
+ min-width: 0;
191
+ cursor: default;
192
+ }
193
+ .label { font-weight: 600; }
194
+ .description {
195
+ margin-top: 2px;
196
+ font-size: 12px;
197
+ color: var(--text-soft-color, #576273);
198
+ }
199
+ .control {
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: flex-end;
203
+ flex-shrink: 0;
204
+ }
205
+ :host([stacked]) .control { justify-content: flex-start; }
206
+ `;
207
+ __decorate([
208
+ property()
209
+ ], EpSettingsRow.prototype, "label", void 0);
210
+ __decorate([
211
+ property()
212
+ ], EpSettingsRow.prototype, "description", void 0);
213
+ __decorate([
214
+ property({ type: Boolean, reflect: true })
215
+ ], EpSettingsRow.prototype, "stacked", void 0);
216
+ __decorate([
217
+ property({ type: Boolean, reflect: true })
218
+ ], EpSettingsRow.prototype, "divided", void 0);
219
+ __decorate([
220
+ property({ type: Boolean, reflect: true })
221
+ ], EpSettingsRow.prototype, "disabled", void 0);
222
+ EpSettingsRow = __decorate([
223
+ customElement('ep-settings-row')
224
+ ], EpSettingsRow);
225
+ export { EpSettingsRow };
226
+ //# sourceMappingURL=EpSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpSettings.js","sourceRoot":"","sources":["../src/EpSettings.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,6CAA6C;AAEtC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAA1C;;QA4BO,YAAO,GAAG,EAAE,CAAC;QACb,gBAAW,GAAG,EAAE,CAAC;IAW/B,CAAC;IATC,MAAM;QACJ,OAAO,IAAI,CAAA;gDACiC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO;UAClE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,6BAA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AEU;IAAX,QAAQ,EAAE;4CAAY;AACX;IAAX,QAAQ,EAAE;kDAAkB;AACe;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAiB;AAChB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAiB;AAChB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB;AA5ClD,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA8HzB"}
@@ -0,0 +1,90 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * Button for `<ep-toolbar>`. Put an icon (SVG, icon font element, …) inside;
4
+ * `label` becomes tooltip and accessible name.
5
+ *
6
+ * Fires a normal `click`, and `ep-toolbar-action` (detail: `{ key }`) when
7
+ * it has a `key`.
8
+ */
9
+ export declare class EpToolbarButton extends LitElement {
10
+ static styles: import("lit").CSSResult;
11
+ /** Tooltip and accessible name. */
12
+ label: string;
13
+ /** Identifier reported by `ep-toolbar-action`. */
14
+ key: string;
15
+ /** Makes the button a toggle; reflects `pressed` as aria-pressed. */
16
+ toggle: boolean;
17
+ pressed: boolean;
18
+ /** Highlights the button without toggle semantics (e.g. open popup). */
19
+ active: boolean;
20
+ disabled: boolean;
21
+ /** Shows the label next to the icon. */
22
+ showLabel: boolean;
23
+ /**
24
+ * For buttons that open something: `true` / `false` becomes aria-expanded,
25
+ * empty leaves it out.
26
+ */
27
+ expanded: '' | 'true' | 'false';
28
+ /** Small counter (e.g. users online). Empty hides it. */
29
+ badge: string;
30
+ /** `low` items move into the overflow row on narrow toolbars. */
31
+ priority: 'normal' | 'low';
32
+ /** @internal roving tabindex managed by the toolbar. */
33
+ rovingTabIndex: number;
34
+ focus(options?: FocusOptions): void;
35
+ private _onClick;
36
+ render(): import("lit-html").TemplateResult<1>;
37
+ }
38
+ /** Vertical divider between toolbar groups. */
39
+ export declare class EpToolbarSeparator extends LitElement {
40
+ static styles: import("lit").CSSResult;
41
+ connectedCallback(): void;
42
+ }
43
+ /**
44
+ * Editor toolbar. Default slot: left side (formatting), slot `end`: right
45
+ * side (actions). Arrow keys, Home and End move between the buttons; only
46
+ * one button is in the tab order.
47
+ *
48
+ * Below `breakpoint` pixels the toolbar becomes `compact`: buttons with
49
+ * `priority="low"` move into a second row that a "more" button opens.
50
+ */
51
+ export declare class EpToolbar extends LitElement {
52
+ static styles: import("lit").CSSResult;
53
+ /** Accessible name of the toolbar. */
54
+ label: string;
55
+ /** Width in px below which the toolbar turns compact. 0 disables it. */
56
+ breakpoint: number;
57
+ /** Label of the "more" button. */
58
+ moreLabel: string;
59
+ compact: boolean;
60
+ expanded: boolean;
61
+ private _focusIndex;
62
+ private _resize?;
63
+ private _mutation?;
64
+ connectedCallback(): void;
65
+ disconnectedCallback(): void;
66
+ firstUpdated(): void;
67
+ updated(changed: Map<string, unknown>): void;
68
+ private _measure;
69
+ /** In compact mode low-priority buttons go to the overflow slot. */
70
+ private _placeItems;
71
+ private get _more();
72
+ /**
73
+ * Buttons in visual order, without hidden or collapsed ones. In compact
74
+ * mode the "more" button follows the `end` items.
75
+ */
76
+ get items(): EpToolbarButton[];
77
+ private _updateRoving;
78
+ private _onFocusIn;
79
+ private _onKeydown;
80
+ private _toggleMore;
81
+ render(): import("lit-html").TemplateResult<1>;
82
+ }
83
+ declare global {
84
+ interface HTMLElementTagNameMap {
85
+ 'ep-toolbar': EpToolbar;
86
+ 'ep-toolbar-button': EpToolbarButton;
87
+ 'ep-toolbar-separator': EpToolbarSeparator;
88
+ }
89
+ }
90
+ //# sourceMappingURL=EpToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpToolbar.d.ts","sourceRoot":"","sources":["../src/EpToolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAA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