···11+---
22+'@atcute/bluesky-richtext-builder': patch
33+---
44+55+change `substr` param name to `text`
+14-14
packages/bluesky/richtext-builder/lib/index.ts
···64646565 /**
6666 * Add plain text to the rich text
6767- * @param substr The plain text
6767+ * @param text The plain text
6868 * @returns The builder instance, for chaining
6969 */
7070- addText(substr: string): this {
7070+ addText(text: string): this {
7171 const segments = this.#segments;
7272- segments[segments.length - 1] += substr;
7272+ segments[segments.length - 1] += text;
73737474 return this;
7575 }
76767777 /**
7878 * Add decorated text to the rich text
7979- * @param substr The text itself
7979+ * @param text The text itself
8080 * @param feature Feature to imbue on the text
8181 * @returns The builder instance, for chaining
8282 */
8383- addDecoratedText(substr: string, feature: FacetFeature): this {
8383+ addDecoratedText(text: string, feature: FacetFeature): this {
8484 const segments = this.#segments;
8585 const last = segments.length - 1;
8686···9292 start += (segments[last - 1] as Facet).index.byteEnd;
9393 }
94949595- const byteLength = getUtf8Length(substr);
9595+ const byteLength = getUtf8Length(text);
96969797 const facet: Facet = {
9898 index: {
···102102 features: [feature],
103103 };
104104105105- segments[last] += substr;
105105+ segments[last] += text;
106106 segments.push(facet, '');
107107 return this;
108108 }
109109110110 /**
111111 * Add link to the rich text
112112- * @param substr Text of the link
112112+ * @param text Text of the link
113113 * @param uri Valid URL, for example: https://example.com
114114 * @returns The builder instance, for chaining
115115 */
116116- addLink(substr: string, uri: GenericUri): this {
117117- return this.addDecoratedText(substr, { $type: 'app.bsky.richtext.facet#link', uri: uri });
116116+ addLink(text: string, uri: GenericUri): this {
117117+ return this.addDecoratedText(text, { $type: 'app.bsky.richtext.facet#link', uri: uri });
118118 }
119119120120 /**
121121- * Mentions a user in rich text
122122- * @param substr Text of the mention, this is usually in the form of `@handle`
121121+ * Mention a user in rich text
122122+ * @param text Text of the mention, usually in the form of `@handle`
123123 * @param did Valid DID, for example: did:plc:ia76kvnndjutgedggx2ibrem
124124 * @returns The builder instance, for chaining
125125 */
126126- addMention(substr: string, did: Did): this {
127127- return this.addDecoratedText(substr, { $type: 'app.bsky.richtext.facet#mention', did: did });
126126+ addMention(text: string, did: Did): this {
127127+ return this.addDecoratedText(text, { $type: 'app.bsky.richtext.facet#mention', did: did });
128128 }
129129130130 /**