From e14cc8589036a25dd740f4d2e190bf0d08f5f19c Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 22 Apr 2024 13:55:10 -1000 Subject: [PATCH] docs: :sparkles: Add new Groups system --- .vitepress/config.mts | 233 +++++++++++++++++-------------- biome.json | 20 +++ bun.lockb | Bin 61216 -> 64788 bytes docs/extensions/microblogging.md | 12 +- docs/groups.md | 69 +++++++++ package.json | 20 +-- 6 files changed, 237 insertions(+), 117 deletions(-) create mode 100644 biome.json create mode 100644 docs/groups.md diff --git a/.vitepress/config.mts b/.vitepress/config.mts index eb7d8c4..10e6e43 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,108 +1,137 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from "vitepress"; // https://vitepress.dev/reference/site-config export default defineConfig({ - title: "Lysand Documentation", - description: "Documentation for Lysand, a new federated protocol", - srcDir: 'docs', - themeConfig: { - // https://vitepress.dev/reference/default-theme-config - nav: [ - { text: 'Home', link: '/' }, - { text: 'Specification', link: '/spec' }, - ], + title: "Lysand Documentation", + description: "Documentation for Lysand, a new federated protocol", + srcDir: "docs", + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: "Home", link: "/" }, + { text: "Specification", link: "/spec" }, + ], - sidebar: [ - { - text: 'Spec Details', - items: [ - { text: 'Spec', link: '/spec' }, - ] - }, - { - text: "Structures", - items: [ - { text: "Content Format", link: '/structures/content-format' }, - { text: "Custom Emoji", link: '/structures/custom-emoji' }, - { text: "Collection", link: '/structures/collection' }, - ] - }, - { - text: "Cryptography", - items: [ - { text: "Keys", link: "/cryptography/keys" }, - { text: "Signing", link: "/cryptography/signing" }, - ] - }, - { - text: "Objects", - link: "/objects", - items: [ - { - text: "Publications", link: "/objects/publications", items: [ - { text: "Note", link: "/objects/note" }, - { text: "Patch", link: "/objects/patch" }, - ] - }, - { - text: "Actors", link: "/objects/actors", items: [ - { text: "User", link: "/objects/user" }, - ] - }, - { - text: "Actions", link: "/objects/actions", items: [ - { text: "Like", link: "/objects/like" }, - { text: "Dislike", link: "/objects/dislike" }, - { text: "Follow", link: "/objects/follow" }, - { text: "FollowAccept", link: "/objects/follow-accept" }, - { text: "FollowReject", link: "/objects/follow-reject" }, - { text: "Announce", link: "/objects/announce" }, - { text: "Undo", link: "/objects/undo" }, - ] - }, - { text: "Server Metadata", link: "/objects/server-metadata" } - ] - }, - { - text: "Federation", - items: [ - { text: "Endpoints", link: "/federation/endpoints" }, - { text: "User Discovery", link: "/federation/user-discovery" }, - { text: "Server Actors", link: "/federation/server-actor" }, - ] - }, - { - text: "Extensions", - link: "/extensions", - items: [ - { text: "Custom Emojis", link: "/extensions/custom-emojis" }, - { text: "Reactions", link: "/extensions/reactions" }, - { text: "Polls", link: "/extensions/polls" }, - { text: "Is Cat", link: "/extensions/is-cat" }, - { text: "Server Endorsements", link: "/extensions/server-endorsement" }, - { text: "Events", link: "/extensions/events" }, - { text: "Reports", link: "/extensions/reports" }, - { text: "Vanity", link: "/extensions/vanity" }, - ] - } - ], + sidebar: [ + { + text: "Spec Details", + items: [{ text: "Spec", link: "/spec" }], + }, + { + text: "Structures", + items: [ + { + text: "Content Format", + link: "/structures/content-format", + }, + { text: "Custom Emoji", link: "/structures/custom-emoji" }, + { text: "Collection", link: "/structures/collection" }, + ], + }, + { + text: "Groups", + link: "/groups", + }, + { + text: "Cryptography", + items: [ + { text: "Keys", link: "/cryptography/keys" }, + { text: "Signing", link: "/cryptography/signing" }, + ], + }, + { + text: "Objects", + link: "/objects", + items: [ + { + text: "Publications", + link: "/objects/publications", + items: [ + { text: "Note", link: "/objects/note" }, + { text: "Patch", link: "/objects/patch" }, + ], + }, + { + text: "Actors", + link: "/objects/actors", + items: [{ text: "User", link: "/objects/user" }], + }, + { + text: "Actions", + link: "/objects/actions", + items: [ + { text: "Like", link: "/objects/like" }, + { text: "Dislike", link: "/objects/dislike" }, + { text: "Follow", link: "/objects/follow" }, + { + text: "FollowAccept", + link: "/objects/follow-accept", + }, + { + text: "FollowReject", + link: "/objects/follow-reject", + }, + { text: "Announce", link: "/objects/announce" }, + { text: "Undo", link: "/objects/undo" }, + ], + }, + { + text: "Server Metadata", + link: "/objects/server-metadata", + }, + ], + }, + { + text: "Federation", + items: [ + { text: "Endpoints", link: "/federation/endpoints" }, + { + text: "User Discovery", + link: "/federation/user-discovery", + }, + { text: "Server Actors", link: "/federation/server-actor" }, + ], + }, + { + text: "Extensions", + link: "/extensions", + items: [ + { + text: "Custom Emojis", + link: "/extensions/custom-emojis", + }, + { + text: "Microblogging", + link: "/extensions/microblogging", + }, + { text: "Reactions", link: "/extensions/reactions" }, + { text: "Polls", link: "/extensions/polls" }, + { text: "Is Cat", link: "/extensions/is-cat" }, + { + text: "Server Endorsements", + link: "/extensions/server-endorsement", + }, + { text: "Events", link: "/extensions/events" }, + { text: "Reports", link: "/extensions/reports" }, + { text: "Vanity", link: "/extensions/vanity" }, + ], + }, + ], - socialLinks: [ - { icon: 'github', link: 'https://github.com/lysand-org/' } - ], - search: { - provider: "local", + socialLinks: [ + { icon: "github", link: "https://github.com/lysand-org/" }, + ], + search: { + provider: "local", + }, + editLink: { + pattern: "https://github.com/lysand-org/docs/edit/main/docs/:path", + }, + logo: "/logo.png", }, - editLink: { - pattern: "https://github.com/lysand-org/docs/edit/main/docs/:path" - }, - logo: "/logo.png", - }, - lastUpdated: true, - cleanUrls: true, - titleTemplate: ":title · Lysand 2.0 Docs", - head: [ - ['link', { rel: 'icon', href: '/favicon.png', type: 'image/png' }] - ], - lang: 'en-US', -}) + lastUpdated: true, + cleanUrls: true, + titleTemplate: ":title · Lysand 2.0 Docs", + head: [["link", { rel: "icon", href: "/favicon.png", type: "image/png" }]], + lang: "en-US", +}); diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..ef6b12d --- /dev/null +++ b/biome.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.6.4/schema.json", + "organizeImports": { + "enabled": true, + "ignore": ["node_modules", "dist", "cache"] + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + }, + "ignore": ["node_modules", "dist", "cache"] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 4, + "ignore": ["node_modules", "dist", "cache"] + } +} diff --git a/bun.lockb b/bun.lockb index d8a9601a4d7f8b8520656d09f55ebb38307a192a..e9a9c040931ce6de1da67bca355faa9c84b0aa52 100755 GIT binary patch delta 10469 zcmeHNcU)9g+P)VU1QAe*I1WY#MG>h(5kW@O#1e&Au^Uv-K@fq#STlphh^vX3qcLCu z6BVo|8e1%=F=mYg{cv5Q5VMM60xCw0in`Bx3j={~cazPxzweK|zj^QTp0}NIPkC=S zlUruG;+g3(U$0e%(*3XBIo*Eq#&aX5FYmGP$xVJy^A&cMGyDB8)UoE1weQz*!tvSi z*!JG5^2CDiYy;Mk;|$YM(sdKk)49<+$62F1XnCHKex(V=IiT2% z3ot^Gw*|hA@^cH0YY)68;SnJDtryCA&M+SgRWKQd78ynX>56{cUGeGTGqgz)xoC6? z^-MTU_P`E6>On_I&P(NLbSLSr0US(W0m4fan5W0QKl)Lvmc&6yL;j z?jZzJ*2RqtLO^c74fS%3r7CX9cXHl;56$hlk zM_fazfizPdLQnp$Pi>tj1NQ?3mkOCJ1sl}^+RIvd_ z6;GD*gGgUAKyk^e&xSQg`Kc#7cMM(Hecq0KKe!#tiEq<;MdAsKPk}|^)z|Lbda9ms z)6LZ6@U}i0=h!amZ6B`sq(%@9!JmBjNNv%b#U?H=o04Aybs@jX`5?!6)R}2 zQD~7rd$8o@;TBuLMWA+=__N%OmP~7<;k{Ual}1s7eAl0Cw+dIZM237*;D*(4JHYi3 zwaBMkiR1e*FKdnE5|n!&qzMbK4&~3W0&A+a(psa4MMmu<_-q3wM&yxAdkEe=S*49e zF%xA$!=GVVTMe3Bfb#-YiE}ygYN_EpnYN`y;f-ZJiY2!US9}0&gus>8$+}{Z4i;n| zf*T`ncfn}|Zg2~Zixap#;6!aJYmSQ-WYfWo6S&ekE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>`D`>6Uc8C|BUC=~b}f9`5OKEPn9J>ZhBl!r?)`9dS7G*&4j&cv_jB79)5o%` zTkvXVl|(1n67We$UCJ6>CCc8=Dp8gYno-v9DpB?%+FHh|_G+3{E?3FY@`hK5a?|P0~M0TD~VN&b(CF8`Ahyam+c$Lqy~K%o~@x_YTI^L9^4vJ$m}nIALpo(QFaiuGy?M z!wvG&t>#tIvBWEtJsvFU z@3!}%D=1|IHGY$~2q~4im`9E`^*Hl#Dl`1_)oD96w{zz(udh~DA31+|UHWpjT@G0e93Q59;DEmpM%nd6_HvUZ_brK~E~o%n96(x~>|?Wy#4 z)~?#nlcKA1r+NLB7ZLnUzx}&g28huZW*$NFX79|5n)O!~CH>iL`B(Co*Kr4IbNW7+ z7I@g0QM{p-4H4>@MPje+8&)a [!WARNING] > -> Before Lysand 3.0, microblogging was directly integrated into the core spec. As of Lysand 3.0, microblogging has been moved to an extension, as part of a larger effort to modularization. This document describes the new microblogging extension. +> Before Lysand 3.0, microblogging was directly integrated into the core spec. As of Lysand 3.0, microblogging has been moved to an extension, as part of a larger modularization effort. This document describes the new microblogging extension. The Microblogging extension allows users to perform certain tasks related to microblogging, such as "boosting" (reposting) posts. @@ -35,7 +35,7 @@ Here's an example of an `Announce` action: | :----- | :----- | :------- | | author | String | Yes | -URI of the [Actor](../objects/actors) who initiated the action. +URI of the [Actor](./actors) who initiated the action. #### Object @@ -43,9 +43,9 @@ URI of the [Actor](../objects/actors) who initiated the action. | :----- | :----- | :------- | | object | String | Yes | -URI of the object being announced. Must be of type [Note](../objects/note) +URI of the object being announced. Must be of type [Note](./note) -### Implementation +#### Implementation When a [Note](../objects/note) object is announced, the client **SHOULD** display the original note with an indicator that it has been announced. The client **SHOULD** also display the number of times the note has been announced, such as a number next to a small icon like such on [Mastodon](https://joinmastodon.org/): @@ -57,8 +57,8 @@ Furthermore, users should be notified when their notes are announced by other us ## Types ```typescript -interface Announce extends Entity { - type: "Announce"; +interface Announce extends Extension { + extension_type: "org.lysand:microblogging/Announce"; author: string; object: string; } diff --git a/docs/groups.md b/docs/groups.md new file mode 100644 index 0000000..f212bdb --- /dev/null +++ b/docs/groups.md @@ -0,0 +1,69 @@ +# Groups + +Groups are a way to organize the visibility of objects on the server. Groups can be thought of as something similar to a Matrix room or a Discord channel, while also being similar to a Mastodon list. + +> [!NOTE] +> Groups replace the old "visibility" system for Notes, which was designed for a microblogging context. Groups are more flexible and can be used for any application. +> +> Notes can still use visibility in cases where groups are not needed with the `followers` and `public` group URIs. + +# Group Entity + +The group entity encapsulates the details of a group. It adheres to the following structure: + +```json5 +{ + "type": "Group", + "id": "ed480922-b095-4f09-9da5-c995be8f5960", + "uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960", + "name": { + "text/html": { + "content": "The Woozy fan club" + } + }, + "description": { + "text/plain": { + "content": "A group for fans of the Woozy emoji." + } + }, + "members": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960/members", +} +``` + +## Fields + +### Name + +| Name | Type | Required | +| :--- | :------------ | :------- | +| name | ContentFormat | No | + +The name of the group. This field is optional. Can contain custom emojis, like most other text fields. + +### Description + +| Name | Type | Required | +| :---------- | :------------ | :------- | +| description | ContentFormat | No | + +A description of the group. This field is optional. Can contain custom emojis, like most other text fields. + +### Members + +| Name | Type | Required | +| :------ | :----- | :------- | +| members | String | Yes | + +The URI of the group's members list. This field is required. Resolves to a [Collection](./structures/collection) of [User](./objects/user) objects. + +## Implementation + +`Note` objects can be posted to groups by setting the `group` field to the URI of the group. If there is no `group` field, the note is posted to whoever is mentioned in the `to` field. + +Other values for `group` are: +- `public` for public notes, which can be seen by anyone. +- `followers` for notes that can be seen by the author's followers only. + +If the `group` field is empty, and nobody is mentioned in the `to` field, the note is only visible to the author. + +--> To finish \ No newline at end of file diff --git a/package.json b/package.json index 1e5ec50..952c10e 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,12 @@ { - "scripts": { - "docs:dev": "vitepress dev", - "docs:build": "vitepress build", - "docs:preview": "vitepress preview" - }, - "devDependencies": { - "vitepress": "^1.1.0" - } -} \ No newline at end of file + "scripts": { + "docs:dev": "vitepress dev", + "docs:build": "vitepress build", + "docs:preview": "vitepress preview" + }, + "devDependencies": { + "@biomejs/biome": "^1.7.1", + "vitepress": "^1.1.0" + }, + "trustedDependencies": ["@biomejs/biome"] +}