mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 14:28:20 +01:00
refactor: 🔥 Move Custom Emojis Structure to same page as extension
This commit is contained in:
parent
b0bd14411d
commit
d3a2d84a40
|
|
@ -23,7 +23,7 @@ This page lists changes since Working Draft 03. {{ className: 'lead' }}
|
||||||
- Added shared inboxes.
|
- Added shared inboxes.
|
||||||
- Added `remote` field to [ContentFormat](/structures/content-format).
|
- Added `remote` field to [ContentFormat](/structures/content-format).
|
||||||
- Switched to [ThumbHash](https://evanw.github.io/thumbhash/) from [BlurHash](https://blurha.sh/).
|
- Switched to [ThumbHash](https://evanw.github.io/thumbhash/) from [BlurHash](https://blurha.sh/).
|
||||||
- Added identification characters to [Custom Emojis](/structures/emoji).
|
- Added identification characters to [Custom Emojis](/extensions/custom-emoji).
|
||||||
- Added `manually_approves_followers` to [Users](/entities/user).
|
- Added `manually_approves_followers` to [Users](/entities/user).
|
||||||
- Removed `visibility` from [Notes](/entities/note).
|
- Removed `visibility` from [Notes](/entities/note).
|
||||||
- Made `subject` optional in [Notes](/entities/note).
|
- Made `subject` optional in [Notes](/entities/note).
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,42 @@ export const metadata = {
|
||||||
|
|
||||||
The Custom Emojis extension adds support for adding personalized emojis to federated data. {{ className: 'lead' }}
|
The Custom Emojis extension adds support for adding personalized emojis to federated data. {{ className: 'lead' }}
|
||||||
|
|
||||||
|
## Structure Definition
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<Properties>
|
||||||
|
<Property name="name" type="string" required={true}>
|
||||||
|
Emoji name, surrounded by identification characters (for example, colons: `:happy_face:`).
|
||||||
|
|
||||||
|
Name must match the regex `^[a-zA-Z0-9_-]+$`.
|
||||||
|
|
||||||
|
Identification characters must not match the name regex (must not be alphanumeric/underscore/hyphen). There may only be two identification characters, one at the beginning and one at the end.
|
||||||
|
</Property>
|
||||||
|
<Property name="content" type="ContentFormat" required={true} typeLink="/structures/content-format">
|
||||||
|
Emoji content. Must be an image format (`image/*`).
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col sticky>
|
||||||
|
|
||||||
|
```jsonc {{ 'title': 'Example Emoji' }}
|
||||||
|
{
|
||||||
|
"name": ":happy_face:",
|
||||||
|
"content": {
|
||||||
|
"image/webp": {
|
||||||
|
"content": "https://cdn.example.com/emojis/happy_face.webp",
|
||||||
|
"remote": true,
|
||||||
|
"description": "A happy emoji smiling.",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
## Rendering
|
## Rendering
|
||||||
|
|
||||||
To render custom emojis, clients **should** perform the following steps:
|
To render custom emojis, clients **should** perform the following steps:
|
||||||
|
|
@ -37,8 +73,8 @@ Custom Emojis can be added to any entity with text content. The extension ID is
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="emojis" type="CustomEmoji[]" required={true} typeLink="/structures/emoji">
|
<Property name="emojis" type="CustomEmoji[]" required={true} typeLink="/extensions/custom-emoji#structure-definition">
|
||||||
[Custom emojis](/structures/emoji) to be added to the note.
|
[Custom emojis](/extensions/custom-emoji#structure-definition) to be added to the note.
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
export const metadata = {
|
|
||||||
title: 'Emoji',
|
|
||||||
description: 'Definition of the Emoji structure',
|
|
||||||
}
|
|
||||||
|
|
||||||
# Custom Emoji
|
|
||||||
|
|
||||||
<Note>
|
|
||||||
This structure is part of the [Custom Emojis](/extensions/custom-emojis) extension. As such, it is not part of the core Versia specification.
|
|
||||||
|
|
||||||
If you are not implementing the Custom Emojis extension, you can ignore this structure.
|
|
||||||
</Note>
|
|
||||||
|
|
||||||
## Entity Definition
|
|
||||||
|
|
||||||
<Row>
|
|
||||||
<Col>
|
|
||||||
<Properties>
|
|
||||||
<Property name="name" type="string" required={true}>
|
|
||||||
Emoji name, surrounded by identification characters (for example, colons: `:happy_face:`).
|
|
||||||
|
|
||||||
Name must match the regex `^[a-zA-Z0-9_-]+$`.
|
|
||||||
|
|
||||||
Identification characters must not match the name regex (must not be alphanumeric/underscore/hyphen). There may only be two identification characters, one at the beginning and one at the end.
|
|
||||||
</Property>
|
|
||||||
<Property name="content" type="ContentFormat" required={true} typeLink="/structures/content-format">
|
|
||||||
Emoji content. Must be an image format (`image/*`).
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Col>
|
|
||||||
|
|
||||||
<Col sticky>
|
|
||||||
|
|
||||||
```jsonc {{ 'title': 'Example Emoji' }}
|
|
||||||
{
|
|
||||||
"name": ":happy_face:",
|
|
||||||
"content": {
|
|
||||||
"image/webp": {
|
|
||||||
"content": "https://cdn.example.com/emojis/happy_face.webp",
|
|
||||||
"remote": true,
|
|
||||||
"description": "A happy emoji smiling.",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
|
|
@ -268,7 +268,6 @@ export const navigation: NavGroup[] = [
|
||||||
links: [
|
links: [
|
||||||
{ title: "ContentFormat", href: "/structures/content-format" },
|
{ title: "ContentFormat", href: "/structures/content-format" },
|
||||||
{ title: "Collection", href: "/structures/collection" },
|
{ title: "Collection", href: "/structures/collection" },
|
||||||
{ title: "Custom Emoji", href: "/structures/emoji" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue