@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
package/README.md CHANGED
@@ -64,6 +64,13 @@ import { EpButton, EpTheme, themes } from '@samtv12345/etherpad-webcomponents';
64
64
  | `<ep-toast-container>` / `<ep-toast-item>` | `EpToastContainer` / `EpToastItem` | `position`, `type`, `message`, `duration` | — |
65
65
  | `<ep-toolbar-select>` | `EpToolbarSelect` | `options[]`, `value`, `icon-class`, `label`, `placeholder` | `ep-toolbar-select:change` |
66
66
  | `<ep-user-badge>` | `EpUserBadge` | `name`, `color`, `size`, `online` | — |
67
+ | `<ep-avatar>` | `EpAvatar` | `name`, `color`, `src`, `size`, `status` (`online`/`idle`/`offline`) | — |
68
+ | `<ep-toolbar>` / `<ep-toolbar-button>` / `<ep-toolbar-separator>` | `EpToolbar` / `EpToolbarButton` / `EpToolbarSeparator` | toolbar: `label`, `breakpoint`, `more-label`, slot `end`; button: `key`, `label`, `toggle`, `pressed`, `active`, `expanded`, `badge`, `priority="low"` | `ep-toolbar-action` |
69
+ | `<ep-user-list>` | `EpUserList` | `.users` (`{ id, name, color, self, status }`), `heading`, `selectable`, `readonly` | `ep-user-rename`, `ep-user-color-request`, `ep-user-select` |
70
+ | `<ep-chat-panel>` | `EpChatPanel` | `.messages` or slotted `<ep-chat-message slot="messages">`, `show-close`, `show-sticky`, `sticky`, `has-more`, `loading`, `readonly`, `floating` | `ep-chat-send`, `ep-chat-close`, `ep-chat-sticky`, `ep-chat-load-more` |
71
+ | `<ep-popup>` | `EpPopup` | `open`, `heading`, `anchor`, `align`, `persistent`, slot `footer`; `show()`/`hide()`/`toggle()` | `ep-popup-open`, `ep-popup-close` |
72
+ | `<ep-settings-section>` / `<ep-settings-row>` | `EpSettingsSection` / `EpSettingsRow` | section: `heading`, `description`; row: `label`, `description`, `stacked`, `divided`, `disabled` | — |
73
+ | `<ep-segmented>` | `EpSegmented` | `.options` (`{ value, label, icon?, disabled? }`), `value`, `label` | `ep-change` |
67
74
  | `<ep-tabs>` / `<ep-tab>` | `EpTabs` / `EpTab` | `value`, `variant` (`underline`/`pills`); tab: `value`, `label`, `disabled` | `ep-tab-change` |
68
75
  | `<ep-theme>` | `EpTheme` | `name` (incl. `auto`), `light`, `dark`, `.tokens` — applies a token set to its subtree | `ep-theme-change` |
69
76
  | `<ep-editor>` | `EpEditor` | `content`, `readonly`, `wrap`, `author-id` | `ready`, `content-changed`, `selection-changed` |
@@ -107,6 +114,10 @@ defineTheme('acme-dark', { '--primary-color': '#a78bfa' }, 'colibris-dark');
107
114
 
108
115
  `@samtv12345/etherpad-webcomponents/themes.js` contains only these functions and the token sets, without any custom element.
109
116
 
117
+ ### Pad building blocks
118
+
119
+ The pad, timeslider and sheet pages are put together from `ep-toolbar`, `ep-popup` + `ep-settings-*`, `ep-user-list` and `ep-chat-panel`; the story **Pad/Layout** shows them together. All of them only emit events – the app decides what a toolbar action, a sent chat message or a rename does. Every visible text is an attribute, so pages can pass in their translations. Toolbar colours can be set separately via `--toolbar-bg-color`, `--toolbar-text-color`, `--toolbar-border-color`, `--toolbar-hover-color`, `--toolbar-active-color` and `--toolbar-active-text-color`.
120
+
110
121
  ### The editor (`<ep-editor>`)
111
122
 
112
123
  `<ep-editor>` embeds Etherpad's Ace editor engine (under `src/editor/`: `Changeset`, `AttributePool`, `changesettracker`, content collector, op assemblers, etc.) as a self-contained element. It supports bold/italic/underline/strikethrough, ordered & unordered lists, indentation, undo/redo, and changeset-based collaboration.
@@ -0,0 +1,25 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * Round user avatar: a picture if `src` is set and loads, otherwise the
4
+ * initials on the author colour (with readable text colour).
5
+ */
6
+ export declare class EpAvatar extends LitElement {
7
+ static styles: import("lit").CSSResult;
8
+ name: string;
9
+ /** Background colour (author colour). */
10
+ color: string;
11
+ /** Optional picture URL. */
12
+ src: string;
13
+ size: 'small' | 'medium' | 'large';
14
+ /** Small status dot: `online`, `idle`, `offline` or empty for none. */
15
+ status: '' | 'online' | 'idle' | 'offline';
16
+ private _imgFailed;
17
+ updated(changed: Map<string, unknown>): void;
18
+ render(): import("lit-html").TemplateResult<1>;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'ep-avatar': EpAvatar;
23
+ }
24
+ }
25
+ //# sourceMappingURL=EpAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpAvatar.d.ts","sourceRoot":"","sources":["../src/EpAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD;;;GAGG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,0BA4CX;IAEU,IAAI,SAAM;IACtB,yCAAyC;IAC7B,KAAK,SAAM;IACvB,4BAA4B;IAChB,GAAG,SAAM;IACQ,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAC3E,uEAAuE;IAC1C,MAAM,EAAE,EAAE,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAM;IAEpE,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAIrC,MAAM;CAeP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,115 @@
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, state } from 'lit/decorators.js';
9
+ import { styleMap } from 'lit/directives/style-map.js';
10
+ import { initialsOf, readableTextOn, safeColor } from './internal/color.js';
11
+ /**
12
+ * Round user avatar: a picture if `src` is set and loads, otherwise the
13
+ * initials on the author colour (with readable text colour).
14
+ */
15
+ let EpAvatar = class EpAvatar extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.name = '';
19
+ /** Background colour (author colour). */
20
+ this.color = '';
21
+ /** Optional picture URL. */
22
+ this.src = '';
23
+ this.size = 'medium';
24
+ /** Small status dot: `online`, `idle`, `offline` or empty for none. */
25
+ this.status = '';
26
+ this._imgFailed = false;
27
+ }
28
+ updated(changed) {
29
+ if (changed.has('src'))
30
+ this._imgFailed = false;
31
+ }
32
+ render() {
33
+ const color = safeColor(this.color);
34
+ const bg = color || 'var(--text-soft-color, #576273)';
35
+ const fg = color ? readableTextOn(color) : 'var(--bg-color, #ffffff)';
36
+ const showImg = this.src && !this._imgFailed;
37
+ return html `
38
+ <div class="circle" part="circle" role="img" aria-label=${this.name || nothing}
39
+ style=${styleMap({ background: bg, color: fg })}>
40
+ ${showImg
41
+ ? html `<img src=${this.src} alt="" @error=${() => { this._imgFailed = true; }} />`
42
+ : html `<span aria-hidden="true">${initialsOf(this.name)}</span>`}
43
+ </div>
44
+ ${this.status ? html `<span class="status ${this.status}" part="status"></span>` : nothing}
45
+ `;
46
+ }
47
+ };
48
+ EpAvatar.styles = css `
49
+ :host {
50
+ --ep-avatar-size: 28px;
51
+ display: inline-block;
52
+ position: relative;
53
+ width: var(--ep-avatar-size);
54
+ height: var(--ep-avatar-size);
55
+ flex-shrink: 0;
56
+ font-family: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
57
+ }
58
+ :host([size="small"]) { --ep-avatar-size: 20px; }
59
+ :host([size="large"]) { --ep-avatar-size: 40px; }
60
+
61
+ .circle {
62
+ width: 100%;
63
+ height: 100%;
64
+ border-radius: 50%;
65
+ overflow: hidden;
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ font-weight: 700;
70
+ font-size: calc(var(--ep-avatar-size) * 0.4);
71
+ line-height: 1;
72
+ user-select: none;
73
+ box-sizing: border-box;
74
+ }
75
+ img { width: 100%; height: 100%; object-fit: cover; display: block; }
76
+
77
+ .status {
78
+ position: absolute;
79
+ right: -1px;
80
+ bottom: -1px;
81
+ width: calc(var(--ep-avatar-size) * 0.3);
82
+ height: calc(var(--ep-avatar-size) * 0.3);
83
+ min-width: 7px;
84
+ min-height: 7px;
85
+ border-radius: 50%;
86
+ border: 2px solid var(--bg-color, #ffffff);
87
+ box-sizing: content-box;
88
+ }
89
+ .status.online { background: var(--success-color, var(--primary-color, #64d29b)); }
90
+ .status.idle { background: var(--warning-color, #d4a72c); }
91
+ .status.offline { background: var(--middle-color, #d2d2d2); }
92
+ `;
93
+ __decorate([
94
+ property()
95
+ ], EpAvatar.prototype, "name", void 0);
96
+ __decorate([
97
+ property()
98
+ ], EpAvatar.prototype, "color", void 0);
99
+ __decorate([
100
+ property()
101
+ ], EpAvatar.prototype, "src", void 0);
102
+ __decorate([
103
+ property({ reflect: true })
104
+ ], EpAvatar.prototype, "size", void 0);
105
+ __decorate([
106
+ property({ reflect: true })
107
+ ], EpAvatar.prototype, "status", void 0);
108
+ __decorate([
109
+ state()
110
+ ], EpAvatar.prototype, "_imgFailed", void 0);
111
+ EpAvatar = __decorate([
112
+ customElement('ep-avatar')
113
+ ], EpAvatar);
114
+ export { EpAvatar };
115
+ //# sourceMappingURL=EpAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpAvatar.js","sourceRo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EpChatMessage.d.ts","sourceRoot":"","sources":["../src/EpChatMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAK5C,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAmCX;IAEU,MAAM,SAAM;IACiB,WAAW,SAAM;IAC9C,IAAI,SAAM;IACsB,GAAG,UAAS;IAExD,MAAM;CAKP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -6,6 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { LitElement, html, css } from 'lit';
8
8
  import { customElement, property } from 'lit/decorators.js';
9
+ import { styleMap } from 'lit/directives/style-map.js';
10
+ import { safeColor } from './internal/color.js';
9
11
  let EpChatMessage = class EpChatMessage extends LitElement {
10
12
  constructor() {
11
13
  super(...arguments);
@@ -16,7 +18,7 @@ let EpChatMessage = class EpChatMessage extends LitElement {
16
18
  }
17
19
  render() {
18
20
  return html `
19
- <b class="author" style="${this.authorColor ? `color: ${this.authorColor}` : ''}">${this.author}</b>${this.time ? html `<span class="time">${this.time}</span>` : html `<span class="time"></span>`}<span class="body"><slot></slot></span>
21
+ <b class="author" style=${styleMap({ color: safeColor(this.authorColor) })}>${this.author}</b>${this.time ? html `<span class="time">${this.time}</span>` : html `<span class="time"></span>`}<span class="body"><slot></slot></span>
20
22
  `;
21
23
  }
22
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EpChatMessage.js","sourceRoot":"","sources":["../src/EpChatMessage.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;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AsCO,WAAM,GAAG,EAAE,CAAC;QACiB,gBAAW,GAAG,EAAE,CAAC;QAC9C,SAAI,GAAG,EAAE,CAAC;QACsB,QAAG,GAAG,KAAK,CAAC;IAO1D,CAAC;IALC,MAAM;QACJ,OAAO,IAAI,CAAA;gCACiB,QAAQ,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,4BAA4B;KAC5L,CAAC;IACJ,CAAC;;AA9CM,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmClB,AAnCY,CAmCX;AAEU;IAAX,QAAQ,EAAE;6CAAa;AACiB;IAAxC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;kDAAkB;AAC9C;IAAX,QAAQ,EAAE;2CAAW;AACsB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAa;AAzC7C,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAgDzB"}
@@ -0,0 +1,81 @@
1
+ import { LitElement } from 'lit';
2
+ import './EpChatMessage.js';
3
+ export interface EpChatEntry {
4
+ id?: string;
5
+ author: string;
6
+ authorColor?: string;
7
+ time?: string;
8
+ text: string;
9
+ own?: boolean;
10
+ }
11
+ /**
12
+ * Chat box: header, scrolling message list and input.
13
+ *
14
+ * Messages come either from the `messages` property or as
15
+ * `<ep-chat-message>` children (slot `messages`), whatever suits the app.
16
+ * The list stays at the bottom when new messages arrive, unless the user
17
+ * scrolled up.
18
+ *
19
+ * Events: `ep-chat-send` (detail `{ text }`), `ep-chat-close`,
20
+ * `ep-chat-sticky` (detail `{ sticky }`), `ep-chat-load-more` (scrolled to
21
+ * the top while `has-more` is set).
22
+ */
23
+ export declare class EpChatPanel extends LitElement {
24
+ static styles: import("lit").CSSResult;
25
+ heading: string;
26
+ messages: EpChatEntry[];
27
+ placeholder: string;
28
+ sendLabel: string;
29
+ closeLabel: string;
30
+ stickyLabel: string;
31
+ emptyLabel: string;
32
+ loadingLabel: string;
33
+ /** Shows the sticky (pin) button and its state. */
34
+ sticky: boolean;
35
+ showSticky: boolean;
36
+ showClose: boolean;
37
+ /** Card look with shadow, for a floating chat box. */
38
+ floating: boolean;
39
+ /** Older messages can be loaded (`ep-chat-load-more` at the top). */
40
+ hasMore: boolean;
41
+ /** Set while older messages are loading. */
42
+ loading: boolean;
43
+ /** Hides the input (read-only pad or chat disabled). */
44
+ readonly: boolean;
45
+ maxlength: number;
46
+ private _log;
47
+ private _input?;
48
+ private _atBottom;
49
+ private _loadingOlder;
50
+ private _resize?;
51
+ /** Message that stays in place while the reader is scrolled up. */
52
+ private _anchor?;
53
+ private _slotted;
54
+ /** Focuses the input. */
55
+ focus(options?: FocusOptions): void;
56
+ /** Scrolls to the newest message. */
57
+ scrollToBottom(): void;
58
+ protected firstUpdated(): void;
59
+ disconnectedCallback(): void;
60
+ protected updated(changed: Map<string, unknown>): void;
61
+ /** Waits until the message elements have rendered, then keeps position. */
62
+ private _afterRender;
63
+ private _messageElements;
64
+ /** At the bottom: follow new messages. Scrolled up: keep the anchor still. */
65
+ private _keepPosition;
66
+ private _offsetOf;
67
+ private _recordAnchor;
68
+ private _onSlotChange;
69
+ private _onScroll;
70
+ private _send;
71
+ private _onKeydown;
72
+ private _autosize;
73
+ private _toggleSticky;
74
+ render(): import("lit-html").TemplateResult<1>;
75
+ }
76
+ declare global {
77
+ interface HTMLElementTagNameMap {
78
+ 'ep-chat-panel': EpChatPanel;
79
+ }
80
+ }
81
+ //# sourceMappingURL=EpChatPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpChatPanel.d.ts","sourceR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AAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,2EAA2E;YAC7D,YAAY;IAM1B,OAAO,CAAC,gBAAgB;IAMxB,8EAA8E;IAC9E,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,aAAa;IAOrB,MAAM;CA0CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
@@ -0,0 +1,368 @@
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, query, state } from 'lit/decorators.js';
9
+ import { repeat } from 'lit/directives/repeat.js';
10
+ import './EpChatMessage.js';
11
+ /**
12
+ * Chat box: header, scrolling message list and input.
13
+ *
14
+ * Messages come either from the `messages` property or as
15
+ * `<ep-chat-message>` children (slot `messages`), whatever suits the app.
16
+ * The list stays at the bottom when new messages arrive, unless the user
17
+ * scrolled up.
18
+ *
19
+ * Events: `ep-chat-send` (detail `{ text }`), `ep-chat-close`,
20
+ * `ep-chat-sticky` (detail `{ sticky }`), `ep-chat-load-more` (scrolled to
21
+ * the top while `has-more` is set).
22
+ */
23
+ let EpChatPanel = class EpChatPanel extends LitElement {
24
+ constructor() {
25
+ super(...arguments);
26
+ this.heading = 'Chat';
27
+ this.messages = [];
28
+ this.placeholder = 'Write a message';
29
+ this.sendLabel = 'Send';
30
+ this.closeLabel = 'Close';
31
+ this.stickyLabel = 'Keep chat open';
32
+ this.emptyLabel = '';
33
+ this.loadingLabel = 'Loading…';
34
+ /** Shows the sticky (pin) button and its state. */
35
+ this.sticky = false;
36
+ this.showSticky = false;
37
+ this.showClose = false;
38
+ /** Card look with shadow, for a floating chat box. */
39
+ this.floating = false;
40
+ /** Older messages can be loaded (`ep-chat-load-more` at the top). */
41
+ this.hasMore = false;
42
+ /** Set while older messages are loading. */
43
+ this.loading = false;
44
+ /** Hides the input (read-only pad or chat disabled). */
45
+ this.readonly = false;
46
+ this.maxlength = 1000;
47
+ this._atBottom = true;
48
+ this._loadingOlder = false;
49
+ this._slotted = 0;
50
+ }
51
+ /** Focuses the input. */
52
+ focus(options) {
53
+ this._input?.focus(options);
54
+ }
55
+ /** Scrolls to the newest message. */
56
+ scrollToBottom() {
57
+ if (this._log)
58
+ this._log.scrollTop = this._log.scrollHeight;
59
+ this._atBottom = true;
60
+ this._anchor = undefined;
61
+ }
62
+ firstUpdated() {
63
+ if (typeof ResizeObserver === 'function') {
64
+ // Any height change of the content (new, older or re-rendered
65
+ // messages, loading row, fonts) goes through _keepPosition.
66
+ this._resize = new ResizeObserver(() => this._keepPosition());
67
+ this._resize.observe(this.renderRoot.querySelector('.items'));
68
+ }
69
+ }
70
+ disconnectedCallback() {
71
+ super.disconnectedCallback();
72
+ this._resize?.disconnect();
73
+ this._resize = undefined;
74
+ }
75
+ updated(changed) {
76
+ if (changed.has('messages') || changed.has('hasMore'))
77
+ this._loadingOlder = false;
78
+ if (changed.has('loading') && !this.loading)
79
+ this._loadingOlder = false;
80
+ void this._afterRender();
81
+ }
82
+ /** Waits until the message elements have rendered, then keeps position. */
83
+ async _afterRender() {
84
+ const items = this._messageElements();
85
+ await Promise.all(items.map((m) => m.updateComplete));
86
+ this._keepPosition();
87
+ }
88
+ _messageElements() {
89
+ const own = Array.from(this.renderRoot.querySelectorAll('.items > ep-chat-message'));
90
+ const slot = this.renderRoot.querySelector('slot[name="messages"]');
91
+ return own.concat(slot?.assignedElements({ flatten: true }) ?? []);
92
+ }
93
+ /** At the bottom: follow new messages. Scrolled up: keep the anchor still. */
94
+ _keepPosition() {
95
+ const log = this._log;
96
+ if (!log)
97
+ return;
98
+ if (this._atBottom) {
99
+ log.scrollTop = log.scrollHeight;
100
+ return;
101
+ }
102
+ const a = this._anchor;
103
+ if (a && a.el.isConnected) {
104
+ const delta = this._offsetOf(a.el) - a.offset;
105
+ if (delta !== 0)
106
+ log.scrollTop += delta;
107
+ }
108
+ this._recordAnchor();
109
+ }
110
+ _offsetOf(el) {
111
+ return el.getBoundingClientRect().top - this._log.getBoundingClientRect().top;
112
+ }
113
+ _recordAnchor() {
114
+ const top = this._log.getBoundingClientRect().top;
115
+ const el = this._messageElements().find((m) => m.getBoundingClientRect().bottom > top);
116
+ this._anchor = el ? { el, offset: this._offsetOf(el) } : undefined;
117
+ }
118
+ _onSlotChange(e) {
119
+ this._slotted = e.target.assignedElements({ flatten: true }).length;
120
+ this._loadingOlder = false;
121
+ void this._afterRender();
122
+ }
123
+ _onScroll() {
124
+ const log = this._log;
125
+ this._atBottom = log.scrollHeight - log.scrollTop - log.clientHeight < 24;
126
+ if (!this._atBottom)
127
+ this._recordAnchor();
128
+ if (log.scrollTop < 20 && this.hasMore && !this.loading && !this._loadingOlder) {
129
+ this._loadingOlder = true;
130
+ this.dispatchEvent(new CustomEvent('ep-chat-load-more', { bubbles: true, composed: true }));
131
+ }
132
+ }
133
+ _send(e) {
134
+ e?.preventDefault();
135
+ const input = this._input;
136
+ if (!input)
137
+ return;
138
+ const text = input.value.trim();
139
+ if (!text)
140
+ return;
141
+ this.dispatchEvent(new CustomEvent('ep-chat-send', {
142
+ bubbles: true, composed: true, detail: { text },
143
+ }));
144
+ input.value = '';
145
+ this._autosize();
146
+ this._atBottom = true;
147
+ this.requestUpdate();
148
+ }
149
+ _onKeydown(e) {
150
+ if (e.key === 'Enter' && !e.shiftKey && !e.isComposing)
151
+ this._send(e);
152
+ }
153
+ _autosize() {
154
+ const t = this._input;
155
+ if (!t)
156
+ return;
157
+ t.style.height = 'auto';
158
+ t.style.height = `${Math.min(t.scrollHeight, 120)}px`;
159
+ }
160
+ _toggleSticky() {
161
+ this.sticky = !this.sticky;
162
+ this.dispatchEvent(new CustomEvent('ep-chat-sticky', {
163
+ bubbles: true, composed: true, detail: { sticky: this.sticky },
164
+ }));
165
+ }
166
+ render() {
167
+ const empty = !this.messages.length && !this._slotted;
168
+ return html `
169
+ <header part="header">
170
+ <h2 id="heading"><slot name="heading">${this.heading}</slot></h2>
171
+ <slot name="actions"></slot>
172
+ ${this.showSticky ? html `
173
+ <button class="icon-btn" part="sticky-button" type="button"
174
+ title=${this.stickyLabel} aria-label=${this.stickyLabel}
175
+ aria-pressed=${String(this.sticky)} @click=${this._toggleSticky}>
176
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.8 1.2a.75.75 0 0 1 1.06 0l3.94 3.94a.75.75 0 0 1 0 1.06l-1.1 1.1a.75.75 0 0 1-.83.16l-1.45 1.45.4 2.4a.75.75 0 0 1-.21.65l-.87.87a.75.75 0 0 1-1.06 0L7.4 10.56l-3.62 3.62a.75.75 0 1 1-1.06-1.06L6.34 9.5 4.07 7.23a.75.75 0 0 1 0-1.06l.87-.87a.75.75 0 0 1 .65-.21l2.4.4 1.45-1.45a.75.75 0 0 1 .16-.83z"/></svg>
177
+ </button>` : nothing}
178
+ ${this.showClose ? html `
179
+ <button class="icon-btn" part="close-button" type="button"
180
+ title=${this.closeLabel} aria-label=${this.closeLabel}
181
+ @click=${() => this.dispatchEvent(new CustomEvent('ep-chat-close', { bubbles: true, composed: true }))}>
182
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06z"/></svg>
183
+ </button>` : nothing}
184
+ </header>
185
+ <div class="log" part="log" role="log" aria-live="polite" aria-labelledby="heading"
186
+ tabindex="0" @scroll=${this._onScroll}>
187
+ <div class="items">
188
+ ${this.loading ? html `<div class="more">${this.loadingLabel}</div>` : nothing}
189
+ ${repeat(this.messages, (m, i) => m.id ?? i, (m) => html `<ep-chat-message author=${m.author} author-color=${m.authorColor ?? ''}
190
+ time=${m.time ?? ''} ?own=${!!m.own}>${m.text}</ep-chat-message>`)}
191
+ <slot name="messages" @slotchange=${this._onSlotChange}></slot>
192
+ ${empty && this.emptyLabel ? html `<div class="empty" part="empty">${this.emptyLabel}</div>` : nothing}
193
+ </div>
194
+ </div>
195
+ ${this.readonly ? nothing : html `
196
+ <form part="form" @submit=${this._send}>
197
+ <textarea part="input" rows="1" placeholder=${this.placeholder}
198
+ aria-label=${this.placeholder} maxlength=${this.maxlength}
199
+ @keydown=${this._onKeydown} @input=${this._autosize}></textarea>
200
+ <button class="send" part="send-button" type="submit">${this.sendLabel}</button>
201
+ </form>`}
202
+ `;
203
+ }
204
+ };
205
+ EpChatPanel.styles = css `
206
+ :host {
207
+ display: flex;
208
+ flex-direction: column;
209
+ min-height: 0;
210
+ height: 100%;
211
+ box-sizing: border-box;
212
+ background: var(--bg-color, #ffffff);
213
+ color: var(--text-color, #485365);
214
+ font-family: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
215
+ font-size: 14px;
216
+ }
217
+ :host([floating]) {
218
+ border-radius: var(--radius-large, 5px);
219
+ box-shadow: var(--shadow, 0 0 0 1px rgba(99, 114, 130, 0.16), 0 8px 16px rgba(27, 39, 51, 0.08));
220
+ overflow: hidden;
221
+ }
222
+ header {
223
+ display: flex;
224
+ align-items: center;
225
+ gap: 4px;
226
+ padding: 8px 10px 8px 14px;
227
+ border-bottom: 1px solid var(--middle-color, #d2d2d2);
228
+ flex-shrink: 0;
229
+ }
230
+ h2 {
231
+ flex: 1;
232
+ margin: 0;
233
+ font-size: 14px;
234
+ font-weight: 700;
235
+ }
236
+ .icon-btn {
237
+ display: inline-flex;
238
+ align-items: center;
239
+ justify-content: center;
240
+ width: 28px;
241
+ height: 28px;
242
+ padding: 0;
243
+ border: none;
244
+ border-radius: var(--radius, 4px);
245
+ background: transparent;
246
+ color: var(--text-soft-color, #576273);
247
+ cursor: pointer;
248
+ }
249
+ .icon-btn:hover { background: var(--bg-soft-color, #f2f3f4); color: var(--text-color, #485365); }
250
+ .icon-btn[aria-pressed="true"] { color: var(--primary-color, #64d29b); }
251
+ .icon-btn:focus-visible, textarea:focus-visible, .send:focus-visible {
252
+ outline: 2px solid var(--focus-color, var(--dark-color, #576273));
253
+ outline-offset: 1px;
254
+ }
255
+ .log {
256
+ flex: 1;
257
+ min-height: 0;
258
+ overflow-y: auto;
259
+ overscroll-behavior: contain;
260
+ }
261
+ .more {
262
+ text-align: center;
263
+ padding: 6px;
264
+ font-size: 12px;
265
+ color: var(--text-soft-color, #576273);
266
+ }
267
+ .empty {
268
+ padding: 16px 14px;
269
+ color: var(--text-soft-color, #576273);
270
+ }
271
+ form {
272
+ display: flex;
273
+ align-items: flex-end;
274
+ gap: 6px;
275
+ padding: 8px;
276
+ border-top: 1px solid var(--middle-color, #d2d2d2);
277
+ flex-shrink: 0;
278
+ }
279
+ textarea {
280
+ flex: 1;
281
+ min-width: 0;
282
+ resize: none;
283
+ font: inherit;
284
+ color: inherit;
285
+ line-height: 1.4;
286
+ max-height: 120px;
287
+ padding: 6px 8px;
288
+ box-sizing: border-box;
289
+ background: var(--bg-soft-color, #f2f3f4);
290
+ border: 1px solid var(--middle-color, #d2d2d2);
291
+ border-radius: calc(var(--radius, 4px) - 1px);
292
+ }
293
+ .send {
294
+ flex-shrink: 0;
295
+ height: 32px;
296
+ padding: 0 12px;
297
+ border: none;
298
+ border-radius: var(--radius, 4px);
299
+ background: var(--primary-color, #64d29b);
300
+ color: var(--primary-text-color, #ffffff);
301
+ font: inherit;
302
+ font-weight: 700;
303
+ cursor: pointer;
304
+ }
305
+ .send:disabled { opacity: 0.4; cursor: not-allowed; }
306
+ `;
307
+ __decorate([
308
+ property()
309
+ ], EpChatPanel.prototype, "heading", void 0);
310
+ __decorate([
311
+ property({ attribute: false })
312
+ ], EpChatPanel.prototype, "messages", void 0);
313
+ __decorate([
314
+ property()
315
+ ], EpChatPanel.prototype, "placeholder", void 0);
316
+ __decorate([
317
+ property({ attribute: 'send-label' })
318
+ ], EpChatPanel.prototype, "sendLabel", void 0);
319
+ __decorate([
320
+ property({ attribute: 'close-label' })
321
+ ], EpChatPanel.prototype, "closeLabel", void 0);
322
+ __decorate([
323
+ property({ attribute: 'sticky-label' })
324
+ ], EpChatPanel.prototype, "stickyLabel", void 0);
325
+ __decorate([
326
+ property({ attribute: 'empty-label' })
327
+ ], EpChatPanel.prototype, "emptyLabel", void 0);
328
+ __decorate([
329
+ property({ attribute: 'loading-label' })
330
+ ], EpChatPanel.prototype, "loadingLabel", void 0);
331
+ __decorate([
332
+ property({ type: Boolean, reflect: true })
333
+ ], EpChatPanel.prototype, "sticky", void 0);
334
+ __decorate([
335
+ property({ type: Boolean, attribute: 'show-sticky' })
336
+ ], EpChatPanel.prototype, "showSticky", void 0);
337
+ __decorate([
338
+ property({ type: Boolean, attribute: 'show-close' })
339
+ ], EpChatPanel.prototype, "showClose", void 0);
340
+ __decorate([
341
+ property({ type: Boolean, reflect: true })
342
+ ], EpChatPanel.prototype, "floating", void 0);
343
+ __decorate([
344
+ property({ type: Boolean, attribute: 'has-more' })
345
+ ], EpChatPanel.prototype, "hasMore", void 0);
346
+ __decorate([
347
+ property({ type: Boolean })
348
+ ], EpChatPanel.prototype, "loading", void 0);
349
+ __decorate([
350
+ property({ type: Boolean, reflect: true })
351
+ ], EpChatPanel.prototype, "readonly", void 0);
352
+ __decorate([
353
+ property({ type: Number })
354
+ ], EpChatPanel.prototype, "maxlength", void 0);
355
+ __decorate([
356
+ query('.log')
357
+ ], EpChatPanel.prototype, "_log", void 0);
358
+ __decorate([
359
+ query('textarea')
360
+ ], EpChatPanel.prototype, "_input", void 0);
361
+ __decorate([
362
+ state()
363
+ ], EpChatPanel.prototype, "_slotted", void 0);
364
+ EpChatPanel = __decorate([
365
+ customElement('ep-chat-panel')
366
+ ], EpChatPanel);
367
+ export { EpChatPanel };
368
+ //# sourceMappingURL=EpChatPanel.js.map