@vite-hub/comments 0.8.0 → 0.9.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/anchor.d.ts +2 -2
- package/dist/anchor.js +0 -1
- package/dist/{client-files-lC6X7XyS.js → client-files-CMPJEd21.js} +0 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -5
- package/dist/database.js +1 -1
- package/dist/{define-C-LUOouq.js → define-hs9Z38io.js} +0 -1
- package/dist/hosted/hosted-comments/frame.js +4 -4
- package/dist/hosted/hosted-comments/tools.js +59 -56
- package/dist/{index-d6NsDxu9.d.ts → index-CbXek64X.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -6
- package/dist/{install-BueV_fJY.js → install--HecUN5c.js} +2 -19
- package/dist/{install-F-_O7zDr.d.ts → install-C3CW6Vvw.d.ts} +4 -4
- package/dist/{migrate-oseJAYbm.js → migrate-cxoJK4JQ.js} +0 -18
- package/dist/{operations-jaihyWw2.d.ts → operations-D0EO1pzL.d.ts} +3 -7
- package/dist/{operations-0llC5kKO.js → operations-DHXmbtb3.js} +3 -30
- package/dist/operations.d.ts +2 -2
- package/dist/operations.js +2 -2
- package/dist/overlay/client-BszZKIf8.js +4 -0
- package/dist/overlay/overlay.js +38 -35
- package/dist/page/loader.js +14 -11
- package/dist/{page-CDhmXO-y.js → page-CJz1K67L.js} +1 -1
- package/dist/{page-BgvzzsJb.d.ts → page-DRM1j84-.d.ts} +1 -1
- package/dist/{path-8yqMd8zR.js → path-sv8kjq3i.js} +0 -4
- package/dist/{plugin-DGUqlc3C.js → plugin-DczA2K-y.js} +3 -3
- package/dist/realtime.d.ts +5 -5
- package/dist/realtime.js +2 -2
- package/dist/{rpc-kkxzQ3Qy.js → rpc-51X1TWKb.js} +1 -1
- package/dist/{rpc-D-eqtyfh.d.ts → rpc-DZB3yU0z.d.ts} +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +1 -1
- package/dist/runtime/auth.d.ts +1 -1
- package/dist/runtime/console.js +2 -2
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +8 -30
- package/dist/server.d.ts +7 -7
- package/dist/server.js +6 -6
- package/dist/{service-DaMq8TBw.js → service-DFMwCr60.js} +2 -12
- package/dist/{service-CMVA_Ryv.d.ts → service-qaMuJ7UX.d.ts} +2 -2
- package/dist/{session-B7GDrqsK.js → session-1SI3_wLJ.js} +11 -30
- package/dist/{session-EzQqBeE8.d.ts → session-CK3Rnjto.d.ts} +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +0 -1
- package/dist/{tokens-Bx4lZ0yt.js → tokens-WRh__ppm.js} +0 -1
- package/dist/{types-BX3vH18p.d.ts → types-BmzTyGt-.d.ts} +4 -0
- package/dist/{types-qzJKgWYS.d.ts → types-VSVs4jIw.d.ts} +1 -1
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +2 -33
- package/package.json +7 -7
- package/dist/overlay/client-ZBsUybIe.js +0 -4
package/dist/anchor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ElementAnchor } from "./types-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { A as ElementAnchor } from "./types-BmzTyGt-.js";
|
|
2
|
+
import "./types-VSVs4jIw.js";
|
|
3
3
|
/** The anchor of a pin that the overlay drops: an element anchor with every hint that `placeAnchor()` uses. */
|
|
4
4
|
export type PinAnchor = ElementAnchor & Required<Pick<ElementAnchor, "label" | "page" | "viewport">>;
|
|
5
5
|
/** The attribute that Content's `contentField()` writes on an element that renders a field. */
|
package/dist/anchor.js
CHANGED
|
@@ -82,7 +82,6 @@ function query(selector) {
|
|
|
82
82
|
function sameLabel(element, label) {
|
|
83
83
|
return labelOf(element) === label;
|
|
84
84
|
}
|
|
85
|
-
/** An element of the same tag whose label matches, for anchors whose CSS path moved. */
|
|
86
85
|
function findByLabel(label) {
|
|
87
86
|
const tag = label.split(" ", 1)[0];
|
|
88
87
|
if (!tag || tag === label) return;
|
|
@@ -8,7 +8,6 @@ async function base64(file) {
|
|
|
8
8
|
for (let index = 0; index < bytes.length; index += 32768) binary += String.fromCharCode(...bytes.subarray(index, index + 32768));
|
|
9
9
|
return btoa(binary);
|
|
10
10
|
}
|
|
11
|
-
/** A `File` keeps its name. A plain `Blob` gets `file` and the extension of its media type, such as `file.png`. */
|
|
12
11
|
function fileName(file) {
|
|
13
12
|
if (file instanceof File && file.name) return file.name;
|
|
14
13
|
const extension = /^[a-z]+\/([a-z0-9]+)/i.exec(file.type)?.[1];
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ElementAnchor, C as CommentStatusInput, D as CommentUser, E as CommentUploadInput, M as PageAnchor, N as TextAnchor, O as CommentUsersInput, S as CommentStatus, T as CommentThread, _ as CommentListCursor, a as CommentBuild, b as CommentMetadata, c as CommentCreateInput, d as CommentDeliveryError, f as CommentEditInput, g as CommentGetInput, h as CommentForgeLink, i as CommentAttachment, j as ImageAnchor, k as CommentsTransport, l as CommentDeleteInput, m as CommentFiles, n as CommentActor, o as CommentComponent, p as CommentEvent, r as CommentAnchor, s as CommentContext, t as AreaAnchor, u as CommentDelivery, v as CommentListQuery, w as CommentSubject, x as CommentReplyInput, y as CommentMessage } from "./types-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { A as ElementAnchor, C as CommentStatusInput, D as CommentUser, E as CommentUploadInput, M as PageAnchor, N as TextAnchor, O as CommentUsersInput, S as CommentStatus, T as CommentThread, _ as CommentListCursor, a as CommentBuild, b as CommentMetadata, c as CommentCreateInput, d as CommentDeliveryError, f as CommentEditInput, g as CommentGetInput, h as CommentForgeLink, i as CommentAttachment, j as ImageAnchor, k as CommentsTransport, l as CommentDeleteInput, m as CommentFiles, n as CommentActor, o as CommentComponent, p as CommentEvent, r as CommentAnchor, s as CommentContext, t as AreaAnchor, u as CommentDelivery, v as CommentListQuery, w as CommentSubject, x as CommentReplyInput, y as CommentMessage } from "./types-BmzTyGt-.js";
|
|
2
|
+
import "./types-VSVs4jIw.js";
|
|
3
3
|
/** A page event that a client store reacts to. */
|
|
4
4
|
type BrowserEvent = "online" | "offline" | "visible" | "hidden";
|
|
5
5
|
/** What a client store needs from the browser: page events, one sender across tabs, and messages between tabs. Tests pass a fake one. */
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as commentsUnansweredError, r as commentsClientDiagnostics, t as commentsAnswerError } from "./client-diagnostics-DoXqdnBd.js";
|
|
2
|
-
import { i as withCommentFiles, n as outboxAccountHeader, r as retryAfterOf, t as failedCommentPreparation } from "./client-files-
|
|
2
|
+
import { i as withCommentFiles, n as outboxAccountHeader, r as retryAfterOf, t as failedCommentPreparation } from "./client-files-CMPJEd21.js";
|
|
3
3
|
import { t as replyMessageId } from "./reply-id-Cm9FGOBs.js";
|
|
4
|
-
import { s as commentsRoute } from "./page-
|
|
4
|
+
import { s as commentsRoute } from "./page-CJz1K67L.js";
|
|
5
5
|
import { n as isRecordOrFunction } from "./object-CAK6UYR5.js";
|
|
6
6
|
import { t as commentsErrorDiagnostics } from "./errors-DeSEHzRf.js";
|
|
7
7
|
import { t as foldName } from "./fold-name-g-xg0mQk.js";
|
|
@@ -1588,7 +1588,6 @@ function boundary(nodes, offset, end) {
|
|
|
1588
1588
|
function visible(rect) {
|
|
1589
1589
|
return rect.width > 0 || rect.height > 0;
|
|
1590
1590
|
}
|
|
1591
|
-
/** The nearest block around an element, such as the paragraph around a `<strong>`: its right edge is the pin's gutter. */
|
|
1592
1591
|
function blockOf(element) {
|
|
1593
1592
|
const view = ownerDocument(element)?.defaultView;
|
|
1594
1593
|
for (let node = element; node; node = node.parentElement) {
|
|
@@ -1597,9 +1596,7 @@ function blockOf(element) {
|
|
|
1597
1596
|
}
|
|
1598
1597
|
return element;
|
|
1599
1598
|
}
|
|
1600
|
-
/** The space between a text block and its 28px pin, as in Drop. */
|
|
1601
1599
|
const PIN_GUTTER = 8;
|
|
1602
|
-
/** The room that a pin takes right of its spot at the screen's edge: the pin and 2px. */
|
|
1603
1600
|
const PIN_ROOM = 30;
|
|
1604
1601
|
function resolveText(anchor, element) {
|
|
1605
1602
|
const nodes = textNodes(element);
|
package/dist/database.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as commentCounters, c as commentForge, l as commentMessages, u as commentThreads, t as commentsMigrationSql, d as commentsSchema, r as commentsSchemaState, f as commentsSqliteTables, o as commentsTables, i as liveThreadsBackup, a as migrateComments } from "./migrate-
|
|
1
|
+
export { s as commentCounters, c as commentForge, l as commentMessages, u as commentThreads, t as commentsMigrationSql, d as commentsSchema, r as commentsSchemaState, f as commentsSqliteTables, o as commentsTables, i as liveThreadsBackup, a as migrateComments } from "./migrate-cxoJK4JQ.js";
|
|
@@ -27,7 +27,6 @@ const builtinCommentSubjects = [defineCommentSubject({
|
|
|
27
27
|
kind: "content",
|
|
28
28
|
scope: () => "site"
|
|
29
29
|
})];
|
|
30
|
-
/** The roles of a user: the comma-separated `role`, such as the roles of the Site access cookie or of Better Auth's `admin()` plugin. */
|
|
31
30
|
function rolesOf(user) {
|
|
32
31
|
const role = user?.role;
|
|
33
32
|
return typeof role === "string" ? role.split(",").map((name) => name.trim()) : [];
|