@atcute/bluemoji 1.0.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/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2
+ of this software and associated documentation files (the "Software"), to deal
3
+ in the Software without restriction, including without limitation the rights
4
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5
+ copies of the Software, and to permit persons to whom the Software is
6
+ furnished to do so, subject to the following conditions:
7
+
8
+ The above copyright notice and this permission notice shall be included in all
9
+ copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # @atcute/bluemoji
2
+
3
+ [Bluemoji](https://github.com/aendra-rininsland/bluemoji) type definitions for `@atcute/client`, a lightweight and cute API client for AT Protocol.
4
+
5
+ import the lexicons module to start using it.
6
+
7
+ ```ts
8
+ import '@atcute/bluemoji/lexicons';
9
+ ```
@@ -0,0 +1,206 @@
1
+ /**
2
+ * @module
3
+ * Contains type declarations for WhiteWind lexicons
4
+ */
5
+ import '@atcute/client/lexicons';
6
+ import '@atcute/bluesky/lexicons';
7
+ declare module '@atcute/client/lexicons' {
8
+ namespace BlueMojiCollectionDefs {
9
+ interface CollectionView {
10
+ [Brand.Type]?: 'blue.moji.collection.defs#collectionView';
11
+ cid: At.CID;
12
+ creator: AppBskyActorDefs.ProfileView;
13
+ indexedAt: string;
14
+ /**
15
+ * Minimum string length: 1 \
16
+ * Maximum string length: 64
17
+ */
18
+ name: string;
19
+ uri: At.Uri;
20
+ avatar?: string;
21
+ /** Minimum: 0 */
22
+ collectionItemCount?: number;
23
+ /**
24
+ * Maximum string length: 3000 \
25
+ * Maximum grapheme length: 300
26
+ */
27
+ description?: string;
28
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
29
+ labels?: ComAtprotoLabelDefs.Label[];
30
+ }
31
+ interface ItemView {
32
+ [Brand.Type]?: 'blue.moji.collection.defs#itemView';
33
+ assets: BlueMojiCollectionItem.Formats_v0;
34
+ name: string;
35
+ /** @default false */
36
+ adultOnly?: boolean;
37
+ alt?: string;
38
+ createdAt?: string;
39
+ }
40
+ }
41
+ namespace BlueMojiCollectionItem {
42
+ interface Record {
43
+ createdAt: string;
44
+ /** Open union to allow for future formats */
45
+ formats: Brand.Union<Formats_v0>;
46
+ /** Should be in the format :emoji: */
47
+ name: string;
48
+ /** @default false */
49
+ adultOnly?: boolean;
50
+ alt?: string;
51
+ copyOf?: At.Uri;
52
+ /** Self-label values for this emoji. Effectively content warnings. */
53
+ labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
54
+ }
55
+ /** Limiting blobs to 256kb because there may be many on page and these get optimised by ImgProxy anyway */
56
+ type Blob_v0 = At.Blob;
57
+ /** 64kb should be enough for anybody */
58
+ type Bytes_v0 = At.Bytes;
59
+ interface Formats_v0 {
60
+ [Brand.Type]?: 'blue.moji.collection.item#formats_v0';
61
+ apng_128?: Bytes_v0;
62
+ gif_128?: Blob_v0;
63
+ lottie?: Bytes_v0;
64
+ original?: At.Blob;
65
+ png_128?: Blob_v0;
66
+ webp_128?: Blob_v0;
67
+ }
68
+ }
69
+ namespace BlueMojiPackDefs {
70
+ interface BluemojiPackView {
71
+ [Brand.Type]?: 'blue.moji.pack.defs#bluemojiPackView';
72
+ cid: At.CID;
73
+ creator: AppBskyActorDefs.ProfileViewBasic;
74
+ indexedAt: string;
75
+ record: unknown;
76
+ uri: At.Uri;
77
+ items?: ListViewBasic;
78
+ labels?: ComAtprotoLabelDefs.Label[];
79
+ /** Maximum array length: 12 */
80
+ listItemsSample?: ListItemView[];
81
+ }
82
+ interface ListItemView {
83
+ [Brand.Type]?: 'blue.moji.pack.defs#listItemView';
84
+ subject: BlueMojiCollectionDefs.ItemView;
85
+ uri: At.Uri;
86
+ }
87
+ interface ListView {
88
+ [Brand.Type]?: 'blue.moji.pack.defs#listView';
89
+ cid: At.CID;
90
+ creator: AppBskyActorDefs.ProfileViewBasic;
91
+ indexedAt: string;
92
+ /**
93
+ * Minimum string length: 1 \
94
+ * Maximum string length: 64
95
+ */
96
+ name: string;
97
+ uri: At.Uri;
98
+ avatar?: string;
99
+ /**
100
+ * Maximum string length: 3000 \
101
+ * Maximum grapheme length: 300
102
+ */
103
+ description?: string;
104
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
105
+ labels?: ComAtprotoLabelDefs.Label[];
106
+ /** Minimum: 0 */
107
+ listItemCount?: number;
108
+ }
109
+ interface ListViewBasic {
110
+ [Brand.Type]?: 'blue.moji.pack.defs#listViewBasic';
111
+ cid: At.CID;
112
+ /**
113
+ * Minimum string length: 1 \
114
+ * Maximum string length: 64
115
+ */
116
+ name: string;
117
+ uri: At.Uri;
118
+ avatar?: string;
119
+ indexedAt?: string;
120
+ labels?: ComAtprotoLabelDefs.Label[];
121
+ /** Minimum: 0 */
122
+ listItemCount?: number;
123
+ }
124
+ }
125
+ /** Gets a view of a Bluemoji pack */
126
+ namespace BlueMojiPackGetPack {
127
+ interface Params {
128
+ /** Reference (AT-URI) of the Bluemoji pack record */
129
+ bluemojiPack: At.Uri;
130
+ }
131
+ type Input = undefined;
132
+ interface Output {
133
+ bluemojiPack: BlueMojiPackDefs.BluemojiPackView;
134
+ }
135
+ }
136
+ namespace BlueMojiPackListitem {
137
+ interface Record {
138
+ createdAt: string;
139
+ /** Reference (AT-URI) to the pack record (blue.moji.pack) */
140
+ list: At.Uri;
141
+ /** The emoji which is included in the pack */
142
+ subject: BlueMojiCollectionDefs.ItemView;
143
+ }
144
+ }
145
+ namespace BlueMojiPackRecord {
146
+ interface Record {
147
+ createdAt: string;
148
+ items: BlueMojiCollectionDefs.ItemView[];
149
+ /**
150
+ * Minimum string length: 1 \
151
+ * Maximum string length: 64
152
+ */
153
+ name: string;
154
+ /** @default false */
155
+ adultOnly?: boolean;
156
+ /**
157
+ * Maximum string length: 3000 \
158
+ * Maximum grapheme length: 300
159
+ */
160
+ description?: string;
161
+ descriptionFacets?: BlueMojiRichtextFacet.Main[];
162
+ icon?: At.Blob;
163
+ /** Self-label values for this emoji. Effectively content warnings. */
164
+ labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
165
+ }
166
+ }
167
+ namespace BlueMojiRichtextFacet {
168
+ interface Main {
169
+ [Brand.Type]?: 'blue.moji.richtext.facet';
170
+ /** DID of the user posting the Bluemoji */
171
+ did: string;
172
+ formats: Brand.Union<Formats_v0>;
173
+ /** Name of the Bluemoji in :emoji: format */
174
+ name: string;
175
+ /** @default false */
176
+ adultOnly?: boolean;
177
+ alt?: string;
178
+ /** Self-label values for this emoji. Effectively content warnings. */
179
+ labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
180
+ }
181
+ /** On the facet, only the CID is provided as this can be combined with the DID to create CDN URLs for non-animated blobs. For APNG and dotLottie, raw Bytes are served and require a com.atproto.repo.getRecord roundtrip on render so are marked with a boolean */
182
+ interface Formats_v0 {
183
+ [Brand.Type]?: 'blue.moji.richtext.facet#formats_v0';
184
+ /** @default false */
185
+ apng_128?: boolean;
186
+ gif_128?: At.CID;
187
+ /** @default false */
188
+ lottie?: boolean;
189
+ png_128?: At.CID;
190
+ webp_128?: At.CID;
191
+ }
192
+ }
193
+ interface Records {
194
+ 'blue.moji.collection.item': BlueMojiCollectionItem.Record;
195
+ 'blue.moji.pack.listitem': BlueMojiPackListitem.Record;
196
+ 'blue.moji.pack.record': BlueMojiPackRecord.Record;
197
+ }
198
+ interface Queries {
199
+ 'blue.moji.pack.getPack': {
200
+ params: BlueMojiPackGetPack.Params;
201
+ output: BlueMojiPackGetPack.Output;
202
+ };
203
+ }
204
+ interface Procedures {
205
+ }
206
+ }
@@ -0,0 +1,9 @@
1
+ /* eslint-disable */
2
+ // This file is automatically generated, do not edit!
3
+ /**
4
+ * @module
5
+ * Contains type declarations for WhiteWind lexicons
6
+ */
7
+ import '@atcute/client/lexicons';
8
+ import '@atcute/bluesky/lexicons';
9
+ //# sourceMappingURL=lexicons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicons.js","sourceRoot":"","sources":["../lib/lexicons.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,qDAAqD;AAErD;;;GAGG;AAEH,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "type": "module",
3
+ "name": "@atcute/bluemoji",
4
+ "version": "1.0.0",
5
+ "description": "Bluemoji type definitions for atcute",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "url": "https://codeberg.org/mary-ext/atcute"
9
+ },
10
+ "files": [
11
+ "dist/"
12
+ ],
13
+ "exports": {
14
+ "./lexicons": "./dist/lexicons.js"
15
+ },
16
+ "peerDependencies": {
17
+ "@atcute/bluesky": "^1.0.0",
18
+ "@atcute/client": "^1.0.0"
19
+ },
20
+ "devDependencies": {
21
+ "@atcute/bluesky": "^1.0.0",
22
+ "@atcute/client": "^1.0.0",
23
+ "@atcute/lex-cli": "^1.0.0"
24
+ },
25
+ "scripts": {
26
+ "build": "tsc",
27
+ "generate": "./scripts/generate-lexicons.sh",
28
+ "prepublish": "rm -rf dist; pnpm run build"
29
+ }
30
+ }