@aparte/core 0.18.0 → 0.19.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/client/aparte-client.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +15 -0
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/custom-elements.json +8614 -8585
- package/dist/{dialog-triggers-Dad9V_ag.js → dialog-triggers-xA3T--rt.js} +16 -4
- package/dist/dialog-triggers-xA3T--rt.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +41 -2
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -1
- package/dist/types/models.d.ts +10 -0
- package/dist/types/models.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/dialog-triggers-Dad9V_ag.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as resolveConfig, a9 as eventOrigin, aa as activeElementIn, a6 as subscribeConfigChange, a3 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, L as escapeAttr, H as cssEscape, ab as mergeSegmentUpdate, M as escapeHtml, ac as writeStreamedMarkdown, U as isSafeUrl, C as copyText, P as getSegmentRenderer, Q as installDefaultRenderersOnce, r as AparteMessageRepository, ad as stampSegmentActivity, ae as stampSegmentOnInsert, af as stampSegmentOnUpdate, ag as renumberSegments, ah as openSegmentIds, ai as isTerminalStatus, aj as adoptMessageSegments, S as isAwaitingReply, Y as populateBubbleFromMessage, a8 as uuid, a2 as revokeAttachmentUrls, X as parseMarkdownToSegments, ak as APARTE_DERIVED_SEGMENTS, e as APARTE_DEFAULT_LOCALE, al as chatBoundaryOf, am as rootOf, R as installDialogTriggersOnce } from "./dialog-triggers-
|
|
2
|
-
import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, F, G, I, J, K, N, O, T, V, W, Z, _, $, a0, a4, a5, a7 } from "./dialog-triggers-
|
|
1
|
+
import { a1 as resolveConfig, a9 as eventOrigin, aa as activeElementIn, a6 as subscribeConfigChange, a3 as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, L as escapeAttr, H as cssEscape, ab as mergeSegmentUpdate, M as escapeHtml, ac as writeStreamedMarkdown, U as isSafeUrl, C as copyText, P as getSegmentRenderer, Q as installDefaultRenderersOnce, r as AparteMessageRepository, ad as stampSegmentActivity, ae as stampSegmentOnInsert, af as stampSegmentOnUpdate, ag as renumberSegments, ah as openSegmentIds, ai as isTerminalStatus, aj as adoptMessageSegments, S as isAwaitingReply, Y as populateBubbleFromMessage, a8 as uuid, a2 as revokeAttachmentUrls, X as parseMarkdownToSegments, ak as APARTE_DERIVED_SEGMENTS, e as APARTE_DEFAULT_LOCALE, al as chatBoundaryOf, am as rootOf, R as installDialogTriggersOnce } from "./dialog-triggers-xA3T--rt.js";
|
|
2
|
+
import { A, a, b, c, d, f, g, h, i, j, k, l, m, n, p, q, s, t, u, v, y, z, B, D, E, F, G, I, J, K, N, O, T, V, W, Z, _, $, a0, a4, a5, a7 } from "./dialog-triggers-xA3T--rt.js";
|
|
3
3
|
function presenceOn(value) {
|
|
4
4
|
return value === "" ? true : Boolean(value);
|
|
5
5
|
}
|
|
@@ -5450,6 +5450,7 @@ class AparteConversationList extends HTMLElement {
|
|
|
5450
5450
|
this.addEventListener("click", this._onClick);
|
|
5451
5451
|
this.addEventListener("keydown", this._onKeydown);
|
|
5452
5452
|
this.addEventListener("focusout", this._onFocusOut);
|
|
5453
|
+
this.addEventListener("pointerdown", this._onPress);
|
|
5453
5454
|
this._render();
|
|
5454
5455
|
window.addEventListener("aparte-config-change", this._onConfigChange);
|
|
5455
5456
|
}
|
|
@@ -5458,6 +5459,11 @@ class AparteConversationList extends HTMLElement {
|
|
|
5458
5459
|
this.removeEventListener("click", this._onClick);
|
|
5459
5460
|
this.removeEventListener("keydown", this._onKeydown);
|
|
5460
5461
|
this.removeEventListener("focusout", this._onFocusOut);
|
|
5462
|
+
this.removeEventListener("pointerdown", this._onPress);
|
|
5463
|
+
window.removeEventListener("pointerup", this._onRelease, true);
|
|
5464
|
+
window.removeEventListener("pointercancel", this._onRelease, true);
|
|
5465
|
+
this._pressed = false;
|
|
5466
|
+
this._renderAfterPress = false;
|
|
5461
5467
|
window.removeEventListener("aparte-config-change", this._onConfigChange);
|
|
5462
5468
|
}
|
|
5463
5469
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
@@ -5490,7 +5496,40 @@ class AparteConversationList extends HTMLElement {
|
|
|
5490
5496
|
return this._conversations;
|
|
5491
5497
|
}
|
|
5492
5498
|
// ─── Rendering ────────────────────────────────────────────────────────
|
|
5499
|
+
/**
|
|
5500
|
+
* A press holds every render until its click has landed. The host re-assigns
|
|
5501
|
+
* `conversations` on every manager change (a save moves a row, a select marks one),
|
|
5502
|
+
* and a row replaced between `mousedown` and `mouseup` lost its click: Chromium sent
|
|
5503
|
+
* it to the list, where the delegated handler matched nothing, and WebKit sent none.
|
|
5504
|
+
* A conversation clicked while the list settled did not open. Keeping the row node
|
|
5505
|
+
* would not have saved it: a row moved to its new place leaves the document on the
|
|
5506
|
+
* way, and the row that moves is often the one pressed (the conversation just
|
|
5507
|
+
* saved). So nothing changes under a pointer that is down, and the render runs once,
|
|
5508
|
+
* after the click.
|
|
5509
|
+
*/
|
|
5510
|
+
_pressed = false;
|
|
5511
|
+
_renderAfterPress = false;
|
|
5512
|
+
_onPress = () => {
|
|
5513
|
+
if (this._pressed) return;
|
|
5514
|
+
this._pressed = true;
|
|
5515
|
+
window.addEventListener("pointerup", this._onRelease, true);
|
|
5516
|
+
window.addEventListener("pointercancel", this._onRelease, true);
|
|
5517
|
+
};
|
|
5518
|
+
_onRelease = () => {
|
|
5519
|
+
window.removeEventListener("pointerup", this._onRelease, true);
|
|
5520
|
+
window.removeEventListener("pointercancel", this._onRelease, true);
|
|
5521
|
+
setTimeout(() => {
|
|
5522
|
+
this._pressed = false;
|
|
5523
|
+
if (!this._renderAfterPress) return;
|
|
5524
|
+
this._renderAfterPress = false;
|
|
5525
|
+
if (this.isConnected) this._render();
|
|
5526
|
+
}, 0);
|
|
5527
|
+
};
|
|
5493
5528
|
_render() {
|
|
5529
|
+
if (this._pressed) {
|
|
5530
|
+
this._renderAfterPress = true;
|
|
5531
|
+
return;
|
|
5532
|
+
}
|
|
5494
5533
|
this._closeMenu();
|
|
5495
5534
|
this._renaming = null;
|
|
5496
5535
|
const focused = activeElementIn(this);
|