nuxt-bluesky-comments 0.1.0 → 0.1.1
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/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as AtProtoAPI from "@atproto/api";
|
|
2
2
|
import type { FlattenedComment } from "../types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Parse a Bluesky web URL into handle/DID and rkey.
|
|
@@ -23,4 +23,4 @@ export type ProcessRepliesOptions = {
|
|
|
23
23
|
*/
|
|
24
24
|
flattenSameAuthorThreads?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export declare function processReplies(replies: AppBskyFeedDefs.ThreadViewPost["replies"], parentAuthorDid?: string, depth?: number, options?: ProcessRepliesOptions): FlattenedComment[];
|
|
26
|
+
export declare function processReplies(replies: AtProtoAPI.AppBskyFeedDefs.ThreadViewPost["replies"], parentAuthorDid?: string, depth?: number, options?: ProcessRepliesOptions): FlattenedComment[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as AtProtoAPI from "@atproto/api";
|
|
2
|
+
const { AppBskyFeedDefs } = AtProtoAPI;
|
|
2
3
|
export function parseBlueskyUrl(url) {
|
|
3
4
|
const match = url.match(/https?:\/\/bsky\.app\/profile\/([^/]+)\/post\/([^/?#]+)/);
|
|
4
5
|
if (!match) return null;
|
|
5
|
-
const
|
|
6
|
+
const identifier = match[1];
|
|
7
|
+
const rkey = match[2];
|
|
8
|
+
if (!identifier || !rkey) return null;
|
|
6
9
|
return { identifier, rkey };
|
|
7
10
|
}
|
|
8
11
|
export function uriToUrl(uri, handle) {
|