+8
.changeset/README.md
+8
.changeset/README.md
···
1
+
# Changesets
2
+
3
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+
We have a quick list of common questions to get you started engaging with this project in
8
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
+11
.changeset/config.json
+11
.changeset/config.json
···
1
+
{
2
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+
"changelog": "@changesets/cli/changelog",
4
+
"commit": false,
5
+
"fixed": [],
6
+
"linked": [],
7
+
"access": "restricted",
8
+
"baseBranch": "main",
9
+
"updateInternalDependencies": "patch",
10
+
"ignore": []
11
+
}
+5
.changeset/orange-ads-enjoy.md
+5
.changeset/orange-ads-enjoy.md
+64
.github/workflows/ci.yml
+64
.github/workflows/ci.yml
···
1
+
name: CI
2
+
3
+
on:
4
+
push:
5
+
branches:
6
+
- main
7
+
pull_request:
8
+
branches: ["main"]
9
+
10
+
11
+
concurrency:
12
+
group: ${{ github.workflow }}-${{ github.ref }}
13
+
cancel-in-progress: true
14
+
15
+
jobs:
16
+
lint:
17
+
runs-on: ubuntu-latest
18
+
steps:
19
+
- uses: actions/checkout@v4
20
+
- name: Install PNPM
21
+
uses: pnpm/action-setup@v4
22
+
with:
23
+
version: 10
24
+
- name: Setup Node
25
+
uses: actions/setup-node@v4
26
+
with:
27
+
cache: "pnpm"
28
+
- name: Install dependencies
29
+
run: pnpm install
30
+
- name: Lint
31
+
run: pnpm lint
32
+
test:
33
+
runs-on: ubuntu-latest
34
+
steps:
35
+
- uses: actions/checkout@v4
36
+
- name: Install PNPM
37
+
uses: pnpm/action-setup@v4
38
+
with:
39
+
version: 10
40
+
- name: Setup Node
41
+
uses: actions/setup-node@v4
42
+
with:
43
+
cache: "pnpm"
44
+
- name: Install dependencies
45
+
run: pnpm install
46
+
- name: Test
47
+
run: pnpm test
48
+
format:
49
+
needs: [lint, test]
50
+
runs-on: ubuntu-latest
51
+
steps:
52
+
- uses: actions/checkout@v4
53
+
- name: Install PNPM
54
+
uses: pnpm/action-setup@v4
55
+
with:
56
+
version: 10
57
+
- name: Setup Node
58
+
uses: actions/setup-node@v4
59
+
with:
60
+
cache: "pnpm"
61
+
- name: Install dependencies
62
+
run: pnpm install
63
+
- name: Lint
64
+
run: pnpm lint
-33
.github/workflows/lint.yml
-33
.github/workflows/lint.yml
···
1
-
name: Linting and Formatting
2
-
3
-
on:
4
-
push:
5
-
branches:
6
-
- main
7
-
pull_request:
8
-
branches: ["main"]
9
-
10
-
11
-
concurrency:
12
-
group: ${{ github.workflow }}-${{ github.ref }}
13
-
cancel-in-progress: true
14
-
15
-
jobs:
16
-
lint:
17
-
runs-on: ubuntu-latest
18
-
steps:
19
-
- uses: actions/checkout@v4
20
-
- name: Install PNPM
21
-
uses: pnpm/action-setup@v4
22
-
with:
23
-
version: 10
24
-
- name: Setup Node
25
-
uses: actions/setup-node@v4
26
-
with:
27
-
cache: "pnpm"
28
-
- name: Install dependencies
29
-
run: pnpm install
30
-
- name: Lint
31
-
run: pnpm lint
32
-
- name: Format
33
-
run: pnpm format
+34
.github/workflows/publish.yml
+34
.github/workflows/publish.yml
···
1
+
name: Publish
2
+
on:
3
+
workflow_run:
4
+
workflows: [CI]
5
+
branches: [main]
6
+
types: [completed]
7
+
8
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9
+
10
+
permissions:
11
+
contents: write
12
+
pull-requests: write
13
+
14
+
jobs:
15
+
publish:
16
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
17
+
runs-on: ubuntu-latest
18
+
steps:
19
+
- uses: actions/checkout@v4
20
+
- uses: pnpm/action-setup@v2
21
+
with:
22
+
version: 10
23
+
- uses: actions/setup-node@v4
24
+
with:
25
+
cache: "pnpm"
26
+
- run: pnpm install --frozen-lockfile
27
+
- name: Create Release Pull Request or Publish
28
+
id: changesets
29
+
uses: changesets/action@v1
30
+
with:
31
+
publish: pnpm run release
32
+
env:
33
+
GITHUB_TOKEN: ${{ secrets.GHA_TOKEN }}
34
+
NPM_TOKEN: ${{ secrets.LEAFLET_PUBLISHING_TOKEN }}
-31
.github/workflows/test.yml
-31
.github/workflows/test.yml
···
1
-
name: Testing
2
-
3
-
on:
4
-
push:
5
-
branches:
6
-
- main
7
-
pull_request:
8
-
branches: ["main"]
9
-
10
-
11
-
concurrency:
12
-
group: ${{ github.workflow }}-${{ github.ref }}
13
-
cancel-in-progress: true
14
-
15
-
jobs:
16
-
lint:
17
-
runs-on: ubuntu-latest
18
-
steps:
19
-
- uses: actions/checkout@v4
20
-
- name: Install PNPM
21
-
uses: pnpm/action-setup@v4
22
-
with:
23
-
version: 10
24
-
- name: Setup Node
25
-
uses: actions/setup-node@v4
26
-
with:
27
-
cache: "pnpm"
28
-
- name: Install dependencies
29
-
run: pnpm install
30
-
- name: Test
31
-
run: pnpm test
+44
CHANGELOG.md
+44
CHANGELOG.md
···
1
+
# leaflet-loader-astro
2
+
3
+
## 1.2.0
4
+
5
+
### Minor Changes
6
+
7
+
- f920153: Add support for blockquotes
8
+
9
+
### Patch Changes
10
+
11
+
- 8922bb1: Add JSDoc comments for available loader options for leafletStaticLoader and leafletLiveLoader
12
+
13
+
## 1.1.0
14
+
15
+
### Minor Changes
16
+
17
+
- 6d70cc6: Added support for these leaflet blocks:
18
+
19
+
- ul/li
20
+
- math
21
+
- code
22
+
- img
23
+
- hr
24
+
25
+
the only remaining block to implement is "website", though I haven't thought of a good way to output that yet. stay tuned for a further release
26
+
27
+
- 5524ce5: Added the ability to use a handle or did when specifying a repo for leafletStaticLoader and leafletLiveLoader
28
+
29
+
```ts
30
+
import { defineLiveCollection } from "astro:content";
31
+
import { leafletLiveLoader } from "leaflet-loader-astro";
32
+
33
+
const documents = defineLiveCollection({
34
+
loader: leafletLiveLoader({ repo: "dane.computer" }), // or repo: did:plc:qttsv4e7pu2jl3ilanfgc3zn, both work!
35
+
});
36
+
37
+
export const collections = { documents };
38
+
```
39
+
40
+
## 1.0.0
41
+
42
+
### Major Changes
43
+
44
+
- b4309c0: This is the initial release for `leaflet-loader-astro`
+218
-2
README.md
+218
-2
README.md
···
1
-
# An astro loader for leaflet.pub
1
+
# Leaflet Astro Loader
2
+
3
+
This loader is for [leaflet.pub](https://leaflet.pub/). It fetches leaflet document records from your personal data server to then be used on your astro site.
4
+
5
+
There are two different types of loaders you can use from this package:
6
+
7
+
- **Static Loader:** Fetches data at build time and is served statically on your website
8
+
- **Live Loader (experimental astro feature):** Fetches data on each request. **Note**: This package does not provide any caching mechanisms for the live loader. So to avoid slamming your PDS (or someone elses PDS) with requests it's probably a good idea to set up some sort of cache either using cache headers or some other means.
9
+
10
+
## Installation
11
+
12
+
```bash
13
+
npm install @nulfrost/leaflet-loader-astro
14
+
```
15
+
16
+
## Usage
17
+
18
+
<details>
19
+
<summary>Build-time loader: leafletStaticLoader **(recommended)**</summary>
20
+
21
+
```ts
22
+
// src/content.config.ts
23
+
import { defineCollection, z } from "astro:content";
24
+
import { leafletStaticLoader } from "@nulfrost/leaflet-loader-astro";
25
+
26
+
const documents = defineCollection({
27
+
loader: leafletStaticLoader({ repo: "did:plc:qttsv4e7pu2jl3ilanfgc3zn" }), // or repo: dane.is.extraordinarily.cool
28
+
});
29
+
30
+
export const collections = { documents };
31
+
```
2
32
3
-
TODO
33
+
```ts
34
+
// src/pages/index.astro
35
+
---
36
+
import { getCollection } from "astro:content";
37
+
38
+
const documents = await getCollection("documents");
39
+
---
40
+
41
+
<html lang="en">
42
+
<head>
43
+
<meta charset="utf-8" />
44
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
45
+
<meta name="viewport" content="width=device-width" />
46
+
<meta name="generator" content={Astro.generator} />
47
+
<title>Astro</title>
48
+
</head>
49
+
<body>
50
+
<h1>Astro + Leaflet.pub</h1>
51
+
<ul>
52
+
{documents.map(document => <li>
53
+
<a href={`/blogs/${document.id}`}>{document.data.title}</a>
54
+
</li>)}
55
+
</ul>
56
+
</body>
57
+
</html>
58
+
```
59
+
60
+
```ts
61
+
// src/pages/blog/[blog].astro
62
+
---
63
+
import { getCollection, getEntry } from "astro:content";
64
+
import { render } from "astro:content";
65
+
66
+
export async function getStaticPaths() {
67
+
const documents = await getCollection("documents");
68
+
return documents.map((document) => ({
69
+
params: { blog: document.id },
70
+
props: document,
71
+
}));
72
+
}
73
+
74
+
const document = await getEntry("documents", Astro.params.blog);
75
+
76
+
if (!document) {
77
+
throw new Error(`Document with id "${Astro.params.blog}" not found`);
78
+
}
79
+
80
+
const { Content } = await render(document);
81
+
---
82
+
83
+
<Content />
84
+
```
85
+
</details>
86
+
87
+
<details>
88
+
<summary>Live loader: leafletLiveLoader</summary>
89
+
90
+
```ts
91
+
// astro.config.mjs
92
+
93
+
// @ts-check
94
+
import { defineConfig } from "astro/config";
95
+
96
+
// https://astro.build/config
97
+
export default defineConfig({
98
+
experimental: {
99
+
liveContentCollections: true, // make sure to enable this
100
+
},
101
+
});
102
+
```
103
+
104
+
```ts
105
+
// src/live.config.ts
106
+
import { defineLiveCollection, z } from "astro:content";
107
+
import { leafletLiveLoader } from "@nulfrost/leaflet-loader-astro";
108
+
109
+
const documents = defineLiveCollection({
110
+
loader: leafletLiveLoader({ repo: "did:plc:qttsv4e7pu2jl3ilanfgc3zn" }), // or repo: dane.is.extraordinarily.cool
111
+
});
112
+
113
+
export const collections = { documents };
114
+
```
115
+
116
+
```ts
117
+
// src/pages/index.astro
118
+
---
119
+
import { getLiveCollection } from "astro:content";
120
+
121
+
export const prerender = false;
122
+
123
+
const documents = await getLiveCollection("documents");
124
+
---
125
+
126
+
<html lang="en">
127
+
<head>
128
+
<meta charset="utf-8" />
129
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
130
+
<meta name="viewport" content="width=device-width" />
131
+
<meta name="generator" content={Astro.generator} />
132
+
<title>Astro</title>
133
+
</head>
134
+
<body>
135
+
<h1>Astro + Leaflet.pub</h1>
136
+
<ul>
137
+
{documents.map(document => <li>
138
+
<a href={`/blogs/${document.id}`}>{document.data.title}</a>
139
+
</li>)}
140
+
</ul>
141
+
</body>
142
+
</html>
143
+
```
144
+
145
+
```ts
146
+
// src/pages/blog/[blog].astro
147
+
---
148
+
import { getLiveEntry } from "astro:content";
149
+
import { render } from "astro:content";
150
+
151
+
export const prerender = false;
152
+
153
+
const document = await getLiveEntry("documents", Astro.params.blog);
154
+
155
+
if (!document) {
156
+
throw new Error(`Document with id "${Astro.params.blog}" not found`);
157
+
}
158
+
159
+
const { Content } = await render(document?.entry);
160
+
---
161
+
162
+
<Content />
163
+
```
164
+
165
+
</details>
166
+
167
+
## Loader Options
168
+
169
+
### Static Loader
170
+
171
+
```ts
172
+
leafletStaticLoader()
173
+
```
174
+
175
+
`repo`: This can be either your DID (did:plc:qttsv4e7pu2jl3ilanfgc3zn) or your handle (dane.is.extraordinarily.cool)
176
+
177
+
`limit`: How many leaflet documents to return when calling `getCollection`. The default is 50 and the range is from 1 to 100.
178
+
179
+
`reverse`: Whether or not to return the leaflet documents in reverse order. By default this is false.
180
+
181
+
### Live Loader
182
+
183
+
```ts
184
+
leafletLiveLoader()
185
+
```
186
+
187
+
`repo`: This can be either your DID (did:plc:qttsv4e7pu2jl3ilanfgc3zn) or your handle (dane.is.extraordinarily.cool)
188
+
189
+
> [!NOTE]
190
+
> `getLiveCollection` supports a second argument where you can add additional filters, similar to the options you have access to for `leafletStaticLoader`
191
+
192
+
```ts
193
+
getLiveCollection()
194
+
```
195
+
196
+
`limit`: How many leaflet documents to return when calling `getCollection`. The default is 50 and the range is from 1 to 100.
197
+
198
+
`reverse`: Whether or not to return the leaflet documents in reverse order. By default this is false.
199
+
200
+
## Supported Leaflet Blocks
201
+
202
+
- [ ] Bluesky post
203
+
- [ ] Iframe
204
+
- [x] Horizontal Rule
205
+
- [x] Unordered List
206
+
- [x] Math
207
+
- [x] Code
208
+
- [ ] Website
209
+
- [x] Image
210
+
- [x] Blockquote
211
+
- [x] Text
212
+
- [x] Header
213
+
- [x] List Item
214
+
215
+
## License
216
+
217
+
MIT
218
+
219
+
For questions, contributions, and support, please open an issue on GitHub.
+1
-1
biome.json
+1
-1
biome.json
+6
lex.config.js
+6
lex.config.js
-73
lexicons/com/atproto/repo/createRecord.json
-73
lexicons/com/atproto/repo/createRecord.json
···
1
-
{
2
-
"lexicon": 1,
3
-
"id": "com.atproto.repo.createRecord",
4
-
"defs": {
5
-
"main": {
6
-
"type": "procedure",
7
-
"description": "Create a single new repository record. Requires auth, implemented by PDS.",
8
-
"input": {
9
-
"encoding": "application/json",
10
-
"schema": {
11
-
"type": "object",
12
-
"required": ["repo", "collection", "record"],
13
-
"properties": {
14
-
"repo": {
15
-
"type": "string",
16
-
"format": "at-identifier",
17
-
"description": "The handle or DID of the repo (aka, current account)."
18
-
},
19
-
"collection": {
20
-
"type": "string",
21
-
"format": "nsid",
22
-
"description": "The NSID of the record collection."
23
-
},
24
-
"rkey": {
25
-
"type": "string",
26
-
"format": "record-key",
27
-
"description": "The Record Key.",
28
-
"maxLength": 512
29
-
},
30
-
"validate": {
31
-
"type": "boolean",
32
-
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
33
-
},
34
-
"record": {
35
-
"type": "unknown",
36
-
"description": "The record itself. Must contain a $type field."
37
-
},
38
-
"swapCommit": {
39
-
"type": "string",
40
-
"format": "cid",
41
-
"description": "Compare and swap with the previous commit by CID."
42
-
}
43
-
}
44
-
}
45
-
},
46
-
"output": {
47
-
"encoding": "application/json",
48
-
"schema": {
49
-
"type": "object",
50
-
"required": ["uri", "cid"],
51
-
"properties": {
52
-
"uri": { "type": "string", "format": "at-uri" },
53
-
"cid": { "type": "string", "format": "cid" },
54
-
"commit": {
55
-
"type": "ref",
56
-
"ref": "com.atproto.repo.defs#commitMeta"
57
-
},
58
-
"validationStatus": {
59
-
"type": "string",
60
-
"knownValues": ["valid", "unknown"]
61
-
}
62
-
}
63
-
}
64
-
},
65
-
"errors": [
66
-
{
67
-
"name": "InvalidSwap",
68
-
"description": "Indicates that 'swapCommit' didn't match current repo commit."
69
-
}
70
-
]
71
-
}
72
-
}
73
-
}
-14
lexicons/com/atproto/repo/defs.json
-14
lexicons/com/atproto/repo/defs.json
-57
lexicons/com/atproto/repo/deleteRecord.json
-57
lexicons/com/atproto/repo/deleteRecord.json
···
1
-
{
2
-
"lexicon": 1,
3
-
"id": "com.atproto.repo.deleteRecord",
4
-
"defs": {
5
-
"main": {
6
-
"type": "procedure",
7
-
"description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",
8
-
"input": {
9
-
"encoding": "application/json",
10
-
"schema": {
11
-
"type": "object",
12
-
"required": ["repo", "collection", "rkey"],
13
-
"properties": {
14
-
"repo": {
15
-
"type": "string",
16
-
"format": "at-identifier",
17
-
"description": "The handle or DID of the repo (aka, current account)."
18
-
},
19
-
"collection": {
20
-
"type": "string",
21
-
"format": "nsid",
22
-
"description": "The NSID of the record collection."
23
-
},
24
-
"rkey": {
25
-
"type": "string",
26
-
"format": "record-key",
27
-
"description": "The Record Key."
28
-
},
29
-
"swapRecord": {
30
-
"type": "string",
31
-
"format": "cid",
32
-
"description": "Compare and swap with the previous record by CID."
33
-
},
34
-
"swapCommit": {
35
-
"type": "string",
36
-
"format": "cid",
37
-
"description": "Compare and swap with the previous commit by CID."
38
-
}
39
-
}
40
-
}
41
-
},
42
-
"output": {
43
-
"encoding": "application/json",
44
-
"schema": {
45
-
"type": "object",
46
-
"properties": {
47
-
"commit": {
48
-
"type": "ref",
49
-
"ref": "com.atproto.repo.defs#commitMeta"
50
-
}
51
-
}
52
-
}
53
-
},
54
-
"errors": [{ "name": "InvalidSwap" }]
55
-
}
56
-
}
57
-
}
-49
lexicons/com/atproto/repo/getRecord.json
-49
lexicons/com/atproto/repo/getRecord.json
···
1
-
{
2
-
"lexicon": 1,
3
-
"id": "com.atproto.repo.getRecord",
4
-
"defs": {
5
-
"main": {
6
-
"type": "query",
7
-
"description": "Get a single record from a repository. Does not require auth.",
8
-
"parameters": {
9
-
"type": "params",
10
-
"required": ["repo", "collection", "rkey"],
11
-
"properties": {
12
-
"repo": {
13
-
"type": "string",
14
-
"format": "at-identifier",
15
-
"description": "The handle or DID of the repo."
16
-
},
17
-
"collection": {
18
-
"type": "string",
19
-
"format": "nsid",
20
-
"description": "The NSID of the record collection."
21
-
},
22
-
"rkey": {
23
-
"type": "string",
24
-
"description": "The Record Key.",
25
-
"format": "record-key"
26
-
},
27
-
"cid": {
28
-
"type": "string",
29
-
"format": "cid",
30
-
"description": "The CID of the version of the record. If not specified, then return the most recent version."
31
-
}
32
-
}
33
-
},
34
-
"output": {
35
-
"encoding": "application/json",
36
-
"schema": {
37
-
"type": "object",
38
-
"required": ["uri", "value"],
39
-
"properties": {
40
-
"uri": { "type": "string", "format": "at-uri" },
41
-
"cid": { "type": "string", "format": "cid" },
42
-
"value": { "type": "unknown" }
43
-
}
44
-
}
45
-
},
46
-
"errors": [{ "name": "RecordNotFound" }]
47
-
}
48
-
}
49
-
}
-69
lexicons/com/atproto/repo/listRecords.json
-69
lexicons/com/atproto/repo/listRecords.json
···
1
-
{
2
-
"lexicon": 1,
3
-
"id": "com.atproto.repo.listRecords",
4
-
"defs": {
5
-
"main": {
6
-
"type": "query",
7
-
"description": "List a range of records in a repository, matching a specific collection. Does not require auth.",
8
-
"parameters": {
9
-
"type": "params",
10
-
"required": ["repo", "collection"],
11
-
"properties": {
12
-
"repo": {
13
-
"type": "string",
14
-
"format": "at-identifier",
15
-
"description": "The handle or DID of the repo."
16
-
},
17
-
"collection": {
18
-
"type": "string",
19
-
"format": "nsid",
20
-
"description": "The NSID of the record type."
21
-
},
22
-
"limit": {
23
-
"type": "integer",
24
-
"minimum": 1,
25
-
"maximum": 100,
26
-
"default": 50,
27
-
"description": "The number of records to return."
28
-
},
29
-
"cursor": { "type": "string" },
30
-
"rkeyStart": {
31
-
"type": "string",
32
-
"description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)"
33
-
},
34
-
"rkeyEnd": {
35
-
"type": "string",
36
-
"description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)"
37
-
},
38
-
"reverse": {
39
-
"type": "boolean",
40
-
"description": "Flag to reverse the order of the returned records."
41
-
}
42
-
}
43
-
},
44
-
"output": {
45
-
"encoding": "application/json",
46
-
"schema": {
47
-
"type": "object",
48
-
"required": ["records"],
49
-
"properties": {
50
-
"cursor": { "type": "string" },
51
-
"records": {
52
-
"type": "array",
53
-
"items": { "type": "ref", "ref": "#record" }
54
-
}
55
-
}
56
-
}
57
-
}
58
-
},
59
-
"record": {
60
-
"type": "object",
61
-
"required": ["uri", "cid", "value"],
62
-
"properties": {
63
-
"uri": { "type": "string", "format": "at-uri" },
64
-
"cid": { "type": "string", "format": "cid" },
65
-
"value": { "type": "unknown" }
66
-
}
67
-
}
68
-
}
69
-
}
-74
lexicons/com/atproto/repo/putRecord.json
-74
lexicons/com/atproto/repo/putRecord.json
···
1
-
{
2
-
"lexicon": 1,
3
-
"id": "com.atproto.repo.putRecord",
4
-
"defs": {
5
-
"main": {
6
-
"type": "procedure",
7
-
"description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",
8
-
"input": {
9
-
"encoding": "application/json",
10
-
"schema": {
11
-
"type": "object",
12
-
"required": ["repo", "collection", "rkey", "record"],
13
-
"nullable": ["swapRecord"],
14
-
"properties": {
15
-
"repo": {
16
-
"type": "string",
17
-
"format": "at-identifier",
18
-
"description": "The handle or DID of the repo (aka, current account)."
19
-
},
20
-
"collection": {
21
-
"type": "string",
22
-
"format": "nsid",
23
-
"description": "The NSID of the record collection."
24
-
},
25
-
"rkey": {
26
-
"type": "string",
27
-
"format": "record-key",
28
-
"description": "The Record Key.",
29
-
"maxLength": 512
30
-
},
31
-
"validate": {
32
-
"type": "boolean",
33
-
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
34
-
},
35
-
"record": {
36
-
"type": "unknown",
37
-
"description": "The record to write."
38
-
},
39
-
"swapRecord": {
40
-
"type": "string",
41
-
"format": "cid",
42
-
"description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"
43
-
},
44
-
"swapCommit": {
45
-
"type": "string",
46
-
"format": "cid",
47
-
"description": "Compare and swap with the previous commit by CID."
48
-
}
49
-
}
50
-
}
51
-
},
52
-
"output": {
53
-
"encoding": "application/json",
54
-
"schema": {
55
-
"type": "object",
56
-
"required": ["uri", "cid"],
57
-
"properties": {
58
-
"uri": { "type": "string", "format": "at-uri" },
59
-
"cid": { "type": "string", "format": "cid" },
60
-
"commit": {
61
-
"type": "ref",
62
-
"ref": "com.atproto.repo.defs#commitMeta"
63
-
},
64
-
"validationStatus": {
65
-
"type": "string",
66
-
"knownValues": ["valid", "unknown"]
67
-
}
68
-
}
69
-
}
70
-
},
71
-
"errors": [{ "name": "InvalidSwap" }]
72
-
}
73
-
}
74
-
}
+22
lexicons/pub/leaflet/blocks/blockquote.json
+22
lexicons/pub/leaflet/blocks/blockquote.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "pub.leaflet.blocks.blockquote",
4
+
"defs": {
5
+
"main": {
6
+
"type": "object",
7
+
"required": ["plaintext"],
8
+
"properties": {
9
+
"plaintext": {
10
+
"type": "string"
11
+
},
12
+
"facets": {
13
+
"type": "array",
14
+
"items": {
15
+
"type": "ref",
16
+
"ref": "pub.leaflet.richtext.facet"
17
+
}
18
+
}
19
+
}
20
+
}
21
+
}
22
+
}
+11
lexicons/pub/leaflet/blocks/horizontalRule.json
+11
lexicons/pub/leaflet/blocks/horizontalRule.json
+21
lexicons/pub/leaflet/blocks/iframe.json
+21
lexicons/pub/leaflet/blocks/iframe.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "pub.leaflet.blocks.iframe",
4
+
"defs": {
5
+
"main": {
6
+
"type": "object",
7
+
"required": ["url"],
8
+
"properties": {
9
+
"url": {
10
+
"type": "string",
11
+
"format": "uri"
12
+
},
13
+
"height": {
14
+
"type": "integer",
15
+
"minimum": 16,
16
+
"maximum": 1600
17
+
}
18
+
}
19
+
}
20
+
}
21
+
}
+2
lib/index.ts
+2
lib/index.ts
+139
lib/leaflet-live-loader.ts
+139
lib/leaflet-live-loader.ts
···
1
+
import { Client, simpleFetchHandler } from "@atcute/client";
2
+
import { isHandle } from "@atcute/lexicons/syntax";
3
+
import type { LiveLoader } from "astro/loaders";
4
+
import type {
5
+
CollectionFilter,
6
+
EntryFilter,
7
+
LeafletDocumentRecord,
8
+
LeafletDocumentView,
9
+
LiveLeafletLoaderOptions,
10
+
} from "./types.js";
11
+
import {
12
+
getLeafletDocuments,
13
+
getSingleLeafletDocument,
14
+
isPlcDid,
15
+
leafletBlocksToHTML,
16
+
leafletDocumentRecordToView,
17
+
LiveLoaderError,
18
+
resolveMiniDoc,
19
+
uriToRkey,
20
+
} from "./utils.js";
21
+
22
+
export function leafletLiveLoader(
23
+
options: LiveLeafletLoaderOptions,
24
+
): LiveLoader<
25
+
LeafletDocumentView,
26
+
EntryFilter,
27
+
CollectionFilter,
28
+
LiveLoaderError
29
+
> {
30
+
const { repo } = options;
31
+
32
+
if (!repo || typeof repo !== "string") {
33
+
throw new LiveLoaderError(
34
+
"missing or invalid did",
35
+
"MISSING_OR_INVALID_DID",
36
+
);
37
+
}
38
+
39
+
// not a valid handle, check if valid did
40
+
if (!isHandle(repo)) {
41
+
// not a valid handle or did, throw
42
+
if (!isPlcDid(repo)) {
43
+
throw new LiveLoaderError(
44
+
"invalid handle or did",
45
+
"INVALID_HANDLE_OR_DID",
46
+
);
47
+
}
48
+
}
49
+
50
+
return {
51
+
name: "leaflet-loader-astro",
52
+
loadCollection: async ({ filter }) => {
53
+
try {
54
+
const { pds, did } = await resolveMiniDoc(repo);
55
+
const handler = simpleFetchHandler({ service: pds });
56
+
const rpc = new Client({ handler });
57
+
58
+
const { documents } = await getLeafletDocuments({
59
+
rpc,
60
+
repo,
61
+
reverse: filter?.reverse,
62
+
cursor: filter?.cursor,
63
+
limit: filter?.limit,
64
+
});
65
+
66
+
return {
67
+
entries: documents.map((document) => {
68
+
const id = uriToRkey(document.uri);
69
+
return {
70
+
id,
71
+
data: leafletDocumentRecordToView({
72
+
uri: document.uri,
73
+
cid: document.cid,
74
+
value: document.value as unknown as LeafletDocumentRecord,
75
+
}),
76
+
rendered: {
77
+
html: leafletBlocksToHTML({
78
+
record: document.value as unknown as LeafletDocumentRecord,
79
+
did,
80
+
}),
81
+
},
82
+
};
83
+
}),
84
+
};
85
+
} catch {
86
+
return {
87
+
error: new LiveLoaderError(
88
+
"could not recover from error, please report on github",
89
+
"UNRECOVERABLE_ERROR",
90
+
),
91
+
};
92
+
}
93
+
},
94
+
loadEntry: async ({ filter }) => {
95
+
if (!filter.id) {
96
+
return {
97
+
error: new LiveLoaderError(
98
+
"must provide an id for specific document",
99
+
"MISSING_DOCUMENT_ID",
100
+
),
101
+
};
102
+
}
103
+
try {
104
+
const { pds, did } = await resolveMiniDoc(repo);
105
+
const handler = simpleFetchHandler({ service: pds });
106
+
const rpc = new Client({ handler });
107
+
const document = await getSingleLeafletDocument({
108
+
rpc,
109
+
id: filter.id,
110
+
repo,
111
+
});
112
+
113
+
const cid = document?.cid?.toString() ?? "";
114
+
115
+
return {
116
+
id: filter.id,
117
+
data: leafletDocumentRecordToView({
118
+
uri: document.uri,
119
+
cid,
120
+
value: document.value as unknown as LeafletDocumentRecord,
121
+
}),
122
+
rendered: {
123
+
html: leafletBlocksToHTML({
124
+
record: document.value as unknown as LeafletDocumentRecord,
125
+
did,
126
+
}),
127
+
},
128
+
};
129
+
} catch {
130
+
return {
131
+
error: new LiveLoaderError(
132
+
"could not recover from error, please report on github",
133
+
"UNRECOVERABLE_ERROR",
134
+
),
135
+
};
136
+
}
137
+
},
138
+
};
139
+
}
+111
lib/leaftlet-static-loader.ts
+111
lib/leaftlet-static-loader.ts
···
1
+
import { Client, simpleFetchHandler } from "@atcute/client";
2
+
import { isHandle } from "@atcute/lexicons/syntax";
3
+
import type { Loader, LoaderContext } from "astro/loaders";
4
+
import { LeafletDocumentSchema } from "schema.js";
5
+
import type {
6
+
LeafletDocumentRecord,
7
+
StaticLeafletLoaderOptions,
8
+
} from "types.js";
9
+
import {
10
+
getLeafletDocuments,
11
+
isPlcDid,
12
+
leafletBlocksToHTML,
13
+
leafletDocumentRecordToView,
14
+
LiveLoaderError,
15
+
resolveMiniDoc,
16
+
uriToRkey,
17
+
} from "utils.js";
18
+
19
+
export function leafletStaticLoader(
20
+
options: StaticLeafletLoaderOptions,
21
+
): Loader {
22
+
const { repo, limit, reverse } = options;
23
+
24
+
if (!repo || typeof repo !== "string") {
25
+
throw new LiveLoaderError(
26
+
"missing or invalid did",
27
+
"MISSING_OR_INVALID_DID",
28
+
);
29
+
}
30
+
31
+
// not a valid handle, check if valid did
32
+
if (!isHandle(repo)) {
33
+
// not a valid handle or did, throw
34
+
if (!isPlcDid(repo)) {
35
+
throw new LiveLoaderError(
36
+
"invalid handle or did",
37
+
"INVALID_HANDLE_OR_DID",
38
+
);
39
+
}
40
+
}
41
+
42
+
return {
43
+
name: "static-leaflet-loader-astro",
44
+
schema: LeafletDocumentSchema,
45
+
load: async ({
46
+
store,
47
+
logger,
48
+
generateDigest,
49
+
parseData,
50
+
}: LoaderContext) => {
51
+
try {
52
+
logger.info("fetching latest leaflet documents");
53
+
const { pds, did } = await resolveMiniDoc(repo);
54
+
const handler = simpleFetchHandler({ service: pds });
55
+
const rpc = new Client({ handler });
56
+
57
+
let cursor: string | undefined;
58
+
let count = 0;
59
+
60
+
fetching: do {
61
+
const { documents, cursor: documentsCursor } =
62
+
await getLeafletDocuments({
63
+
rpc,
64
+
repo,
65
+
cursor,
66
+
reverse,
67
+
limit: 50,
68
+
});
69
+
for (const document of documents) {
70
+
if (limit && count >= limit) {
71
+
count++;
72
+
break fetching;
73
+
}
74
+
count++;
75
+
76
+
const id = uriToRkey(document.uri);
77
+
const digest = generateDigest(document.value);
78
+
store.set({
79
+
id,
80
+
data: await parseData({
81
+
id,
82
+
data: JSON.parse(
83
+
JSON.stringify(
84
+
leafletDocumentRecordToView({
85
+
uri: document.uri,
86
+
cid: document.cid,
87
+
value: document.value as unknown as LeafletDocumentRecord,
88
+
}),
89
+
),
90
+
),
91
+
}),
92
+
digest,
93
+
rendered: {
94
+
html: leafletBlocksToHTML({
95
+
record: document.value as unknown as LeafletDocumentRecord,
96
+
did,
97
+
}),
98
+
},
99
+
});
100
+
}
101
+
cursor = documentsCursor;
102
+
logger.info(`Fetched ${count} posts`);
103
+
} while (cursor);
104
+
} catch (error) {
105
+
logger.error(
106
+
`There was an error fetching the leaflet documents: ${(error as Error).message}`,
107
+
);
108
+
}
109
+
},
110
+
};
111
+
}
+14
lib/lexicons/index.ts
+14
lib/lexicons/index.ts
···
1
+
export * as ComAtprotoRepoStrongRef from "./types/com/atproto/repo/strongRef.js";
2
+
export * as PubLeafletBlocksBlockquote from "./types/pub/leaflet/blocks/blockquote.js";
3
+
export * as PubLeafletBlocksCode from "./types/pub/leaflet/blocks/code.js";
4
+
export * as PubLeafletBlocksHeader from "./types/pub/leaflet/blocks/header.js";
5
+
export * as PubLeafletBlocksHorizontalRule from "./types/pub/leaflet/blocks/horizontalRule.js";
6
+
export * as PubLeafletBlocksIframe from "./types/pub/leaflet/blocks/iframe.js";
7
+
export * as PubLeafletBlocksImage from "./types/pub/leaflet/blocks/image.js";
8
+
export * as PubLeafletBlocksMath from "./types/pub/leaflet/blocks/math.js";
9
+
export * as PubLeafletBlocksText from "./types/pub/leaflet/blocks/text.js";
10
+
export * as PubLeafletBlocksUnorderedList from "./types/pub/leaflet/blocks/unorderedList.js";
11
+
export * as PubLeafletBlocksWebsite from "./types/pub/leaflet/blocks/website.js";
12
+
export * as PubLeafletDocument from "./types/pub/leaflet/document.js";
13
+
export * as PubLeafletPagesLinearDocument from "./types/pub/leaflet/pages/linearDocument.js";
14
+
export * as PubLeafletRichtextFacet from "./types/pub/leaflet/richtext/facet.js";
+18
lib/lexicons/types/com/atproto/repo/strongRef.ts
+18
lib/lexicons/types/com/atproto/repo/strongRef.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("com.atproto.repo.strongRef"),
7
+
),
8
+
cid: /*#__PURE__*/ v.cidString(),
9
+
uri: /*#__PURE__*/ v.resourceUriString(),
10
+
});
11
+
12
+
type main$schematype = typeof _mainSchema;
13
+
14
+
export interface mainSchema extends main$schematype {}
15
+
16
+
export const mainSchema = _mainSchema as mainSchema;
17
+
18
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+23
lib/lexicons/types/pub/leaflet/blocks/blockquote.ts
+23
lib/lexicons/types/pub/leaflet/blocks/blockquote.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import * as PubLeafletRichtextFacet from "../richtext/facet.js";
4
+
5
+
const _mainSchema = /*#__PURE__*/ v.object({
6
+
$type: /*#__PURE__*/ v.optional(
7
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.blockquote"),
8
+
),
9
+
get facets() {
10
+
return /*#__PURE__*/ v.optional(
11
+
/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema),
12
+
);
13
+
},
14
+
plaintext: /*#__PURE__*/ v.string(),
15
+
});
16
+
17
+
type main$schematype = typeof _mainSchema;
18
+
19
+
export interface mainSchema extends main$schematype {}
20
+
21
+
export const mainSchema = _mainSchema as mainSchema;
22
+
23
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+19
lib/lexicons/types/pub/leaflet/blocks/code.ts
+19
lib/lexicons/types/pub/leaflet/blocks/code.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.code"),
7
+
),
8
+
language: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
9
+
plaintext: /*#__PURE__*/ v.string(),
10
+
syntaxHighlightingTheme: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
11
+
});
12
+
13
+
type main$schematype = typeof _mainSchema;
14
+
15
+
export interface mainSchema extends main$schematype {}
16
+
17
+
export const mainSchema = _mainSchema as mainSchema;
18
+
19
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+28
lib/lexicons/types/pub/leaflet/blocks/header.ts
+28
lib/lexicons/types/pub/leaflet/blocks/header.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import * as PubLeafletRichtextFacet from "../richtext/facet.js";
4
+
5
+
const _mainSchema = /*#__PURE__*/ v.object({
6
+
$type: /*#__PURE__*/ v.optional(
7
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.header"),
8
+
),
9
+
get facets() {
10
+
return /*#__PURE__*/ v.optional(
11
+
/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema),
12
+
);
13
+
},
14
+
level: /*#__PURE__*/ v.optional(
15
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [
16
+
/*#__PURE__*/ v.integerRange(1, 6),
17
+
]),
18
+
),
19
+
plaintext: /*#__PURE__*/ v.string(),
20
+
});
21
+
22
+
type main$schematype = typeof _mainSchema;
23
+
24
+
export interface mainSchema extends main$schematype {}
25
+
26
+
export const mainSchema = _mainSchema as mainSchema;
27
+
28
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+16
lib/lexicons/types/pub/leaflet/blocks/horizontalRule.ts
+16
lib/lexicons/types/pub/leaflet/blocks/horizontalRule.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.horizontalRule"),
7
+
),
8
+
});
9
+
10
+
type main$schematype = typeof _mainSchema;
11
+
12
+
export interface mainSchema extends main$schematype {}
13
+
14
+
export const mainSchema = _mainSchema as mainSchema;
15
+
16
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+22
lib/lexicons/types/pub/leaflet/blocks/iframe.ts
+22
lib/lexicons/types/pub/leaflet/blocks/iframe.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.iframe"),
7
+
),
8
+
height: /*#__PURE__*/ v.optional(
9
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [
10
+
/*#__PURE__*/ v.integerRange(16, 1600),
11
+
]),
12
+
),
13
+
url: /*#__PURE__*/ v.genericUriString(),
14
+
});
15
+
16
+
type main$schematype = typeof _mainSchema;
17
+
18
+
export interface mainSchema extends main$schematype {}
19
+
20
+
export const mainSchema = _mainSchema as mainSchema;
21
+
22
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+32
lib/lexicons/types/pub/leaflet/blocks/image.ts
+32
lib/lexicons/types/pub/leaflet/blocks/image.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _aspectRatioSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.image#aspectRatio"),
7
+
),
8
+
height: /*#__PURE__*/ v.integer(),
9
+
width: /*#__PURE__*/ v.integer(),
10
+
});
11
+
const _mainSchema = /*#__PURE__*/ v.object({
12
+
$type: /*#__PURE__*/ v.optional(
13
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.image"),
14
+
),
15
+
alt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
16
+
get aspectRatio() {
17
+
return aspectRatioSchema;
18
+
},
19
+
image: /*#__PURE__*/ v.blob(),
20
+
});
21
+
22
+
type aspectRatio$schematype = typeof _aspectRatioSchema;
23
+
type main$schematype = typeof _mainSchema;
24
+
25
+
export interface aspectRatioSchema extends aspectRatio$schematype {}
26
+
export interface mainSchema extends main$schematype {}
27
+
28
+
export const aspectRatioSchema = _aspectRatioSchema as aspectRatioSchema;
29
+
export const mainSchema = _mainSchema as mainSchema;
30
+
31
+
export interface AspectRatio extends v.InferInput<typeof aspectRatioSchema> {}
32
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+17
lib/lexicons/types/pub/leaflet/blocks/math.ts
+17
lib/lexicons/types/pub/leaflet/blocks/math.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.math"),
7
+
),
8
+
tex: /*#__PURE__*/ v.string(),
9
+
});
10
+
11
+
type main$schematype = typeof _mainSchema;
12
+
13
+
export interface mainSchema extends main$schematype {}
14
+
15
+
export const mainSchema = _mainSchema as mainSchema;
16
+
17
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+23
lib/lexicons/types/pub/leaflet/blocks/text.ts
+23
lib/lexicons/types/pub/leaflet/blocks/text.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import * as PubLeafletRichtextFacet from "../richtext/facet.js";
4
+
5
+
const _mainSchema = /*#__PURE__*/ v.object({
6
+
$type: /*#__PURE__*/ v.optional(
7
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.text"),
8
+
),
9
+
get facets() {
10
+
return /*#__PURE__*/ v.optional(
11
+
/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema),
12
+
);
13
+
},
14
+
plaintext: /*#__PURE__*/ v.string(),
15
+
});
16
+
17
+
type main$schematype = typeof _mainSchema;
18
+
19
+
export interface mainSchema extends main$schematype {}
20
+
21
+
export const mainSchema = _mainSchema as mainSchema;
22
+
23
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+41
lib/lexicons/types/pub/leaflet/blocks/unorderedList.ts
+41
lib/lexicons/types/pub/leaflet/blocks/unorderedList.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import * as PubLeafletBlocksHeader from "./header.js";
4
+
import * as PubLeafletBlocksImage from "./image.js";
5
+
import * as PubLeafletBlocksText from "./text.js";
6
+
7
+
const _listItemSchema = /*#__PURE__*/ v.object({
8
+
$type: /*#__PURE__*/ v.optional(
9
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.unorderedList#listItem"),
10
+
),
11
+
get children() {
12
+
return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(listItemSchema));
13
+
},
14
+
get content() {
15
+
return /*#__PURE__*/ v.variant([
16
+
PubLeafletBlocksHeader.mainSchema,
17
+
PubLeafletBlocksImage.mainSchema,
18
+
PubLeafletBlocksText.mainSchema,
19
+
]);
20
+
},
21
+
});
22
+
const _mainSchema = /*#__PURE__*/ v.object({
23
+
$type: /*#__PURE__*/ v.optional(
24
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.unorderedList"),
25
+
),
26
+
get children() {
27
+
return /*#__PURE__*/ v.array(listItemSchema);
28
+
},
29
+
});
30
+
31
+
type listItem$schematype = typeof _listItemSchema;
32
+
type main$schematype = typeof _mainSchema;
33
+
34
+
export interface listItemSchema extends listItem$schematype {}
35
+
export interface mainSchema extends main$schematype {}
36
+
37
+
export const listItemSchema = _listItemSchema as listItemSchema;
38
+
export const mainSchema = _mainSchema as mainSchema;
39
+
40
+
export interface ListItem extends v.InferInput<typeof listItemSchema> {}
41
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+20
lib/lexicons/types/pub/leaflet/blocks/website.ts
+20
lib/lexicons/types/pub/leaflet/blocks/website.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _mainSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.blocks.website"),
7
+
),
8
+
description: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
9
+
previewImage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
10
+
src: /*#__PURE__*/ v.genericUriString(),
11
+
title: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
12
+
});
13
+
14
+
type main$schematype = typeof _mainSchema;
15
+
16
+
export interface mainSchema extends main$schematype {}
17
+
18
+
export const mainSchema = _mainSchema as mainSchema;
19
+
20
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+47
lib/lexicons/types/pub/leaflet/document.ts
+47
lib/lexicons/types/pub/leaflet/document.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import type {} from "@atcute/lexicons/ambient";
4
+
import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef.js";
5
+
import * as PubLeafletPagesLinearDocument from "./pages/linearDocument.js";
6
+
7
+
const _mainSchema = /*#__PURE__*/ v.record(
8
+
/*#__PURE__*/ v.tidString(),
9
+
/*#__PURE__*/ v.object({
10
+
$type: /*#__PURE__*/ v.literal("pub.leaflet.document"),
11
+
author: /*#__PURE__*/ v.actorIdentifierString(),
12
+
description: /*#__PURE__*/ v.optional(
13
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
14
+
/*#__PURE__*/ v.stringLength(0, 3000),
15
+
/*#__PURE__*/ v.stringGraphemes(0, 300),
16
+
]),
17
+
),
18
+
get pages() {
19
+
return /*#__PURE__*/ v.array(
20
+
/*#__PURE__*/ v.variant([PubLeafletPagesLinearDocument.mainSchema]),
21
+
);
22
+
},
23
+
get postRef() {
24
+
return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema);
25
+
},
26
+
publication: /*#__PURE__*/ v.resourceUriString(),
27
+
publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
28
+
title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
29
+
/*#__PURE__*/ v.stringLength(0, 1280),
30
+
/*#__PURE__*/ v.stringGraphemes(0, 128),
31
+
]),
32
+
}),
33
+
);
34
+
35
+
type main$schematype = typeof _mainSchema;
36
+
37
+
export interface mainSchema extends main$schematype {}
38
+
39
+
export const mainSchema = _mainSchema as mainSchema;
40
+
41
+
export interface Main extends v.InferInput<typeof mainSchema> {}
42
+
43
+
declare module "@atcute/lexicons/ambient" {
44
+
interface Records {
45
+
"pub.leaflet.document": mainSchema;
46
+
}
47
+
}
+74
lib/lexicons/types/pub/leaflet/pages/linearDocument.ts
+74
lib/lexicons/types/pub/leaflet/pages/linearDocument.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
import * as PubLeafletBlocksCode from "../blocks/code.js";
4
+
import * as PubLeafletBlocksHeader from "../blocks/header.js";
5
+
import * as PubLeafletBlocksImage from "../blocks/image.js";
6
+
import * as PubLeafletBlocksMath from "../blocks/math.js";
7
+
import * as PubLeafletBlocksText from "../blocks/text.js";
8
+
import * as PubLeafletBlocksUnorderedList from "../blocks/unorderedList.js";
9
+
import * as PubLeafletBlocksWebsite from "../blocks/website.js";
10
+
11
+
const _blockSchema = /*#__PURE__*/ v.object({
12
+
$type: /*#__PURE__*/ v.optional(
13
+
/*#__PURE__*/ v.literal("pub.leaflet.pages.linearDocument#block"),
14
+
),
15
+
alignment: /*#__PURE__*/ v.optional(
16
+
/*#__PURE__*/ v.string<
17
+
"#textAlignCenter" | "#textAlignLeft" | "#textAlignRight" | (string & {})
18
+
>(),
19
+
),
20
+
get block() {
21
+
return /*#__PURE__*/ v.variant([
22
+
PubLeafletBlocksCode.mainSchema,
23
+
PubLeafletBlocksHeader.mainSchema,
24
+
PubLeafletBlocksImage.mainSchema,
25
+
PubLeafletBlocksMath.mainSchema,
26
+
PubLeafletBlocksText.mainSchema,
27
+
PubLeafletBlocksUnorderedList.mainSchema,
28
+
PubLeafletBlocksWebsite.mainSchema,
29
+
]);
30
+
},
31
+
});
32
+
const _mainSchema = /*#__PURE__*/ v.object({
33
+
$type: /*#__PURE__*/ v.optional(
34
+
/*#__PURE__*/ v.literal("pub.leaflet.pages.linearDocument"),
35
+
),
36
+
get blocks() {
37
+
return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(blockSchema));
38
+
},
39
+
});
40
+
const _textAlignCenterSchema = /*#__PURE__*/ v.literal(
41
+
"pub.leaflet.pages.linearDocument#textAlignCenter",
42
+
);
43
+
const _textAlignLeftSchema = /*#__PURE__*/ v.literal(
44
+
"pub.leaflet.pages.linearDocument#textAlignLeft",
45
+
);
46
+
const _textAlignRightSchema = /*#__PURE__*/ v.literal(
47
+
"pub.leaflet.pages.linearDocument#textAlignRight",
48
+
);
49
+
50
+
type block$schematype = typeof _blockSchema;
51
+
type main$schematype = typeof _mainSchema;
52
+
type textAlignCenter$schematype = typeof _textAlignCenterSchema;
53
+
type textAlignLeft$schematype = typeof _textAlignLeftSchema;
54
+
type textAlignRight$schematype = typeof _textAlignRightSchema;
55
+
56
+
export interface blockSchema extends block$schematype {}
57
+
export interface mainSchema extends main$schematype {}
58
+
export interface textAlignCenterSchema extends textAlignCenter$schematype {}
59
+
export interface textAlignLeftSchema extends textAlignLeft$schematype {}
60
+
export interface textAlignRightSchema extends textAlignRight$schematype {}
61
+
62
+
export const blockSchema = _blockSchema as blockSchema;
63
+
export const mainSchema = _mainSchema as mainSchema;
64
+
export const textAlignCenterSchema =
65
+
_textAlignCenterSchema as textAlignCenterSchema;
66
+
export const textAlignLeftSchema = _textAlignLeftSchema as textAlignLeftSchema;
67
+
export const textAlignRightSchema =
68
+
_textAlignRightSchema as textAlignRightSchema;
69
+
70
+
export interface Block extends v.InferInput<typeof blockSchema> {}
71
+
export interface Main extends v.InferInput<typeof mainSchema> {}
72
+
export type TextAlignCenter = v.InferInput<typeof textAlignCenterSchema>;
73
+
export type TextAlignLeft = v.InferInput<typeof textAlignLeftSchema>;
74
+
export type TextAlignRight = v.InferInput<typeof textAlignRightSchema>;
+119
lib/lexicons/types/pub/leaflet/richtext/facet.ts
+119
lib/lexicons/types/pub/leaflet/richtext/facet.ts
···
1
+
import type {} from "@atcute/lexicons";
2
+
import * as v from "@atcute/lexicons/validations";
3
+
4
+
const _boldSchema = /*#__PURE__*/ v.object({
5
+
$type: /*#__PURE__*/ v.optional(
6
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#bold"),
7
+
),
8
+
});
9
+
const _byteSliceSchema = /*#__PURE__*/ v.object({
10
+
$type: /*#__PURE__*/ v.optional(
11
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#byteSlice"),
12
+
),
13
+
byteEnd: /*#__PURE__*/ v.integer(),
14
+
byteStart: /*#__PURE__*/ v.integer(),
15
+
});
16
+
const _codeSchema = /*#__PURE__*/ v.object({
17
+
$type: /*#__PURE__*/ v.optional(
18
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#code"),
19
+
),
20
+
});
21
+
const _highlightSchema = /*#__PURE__*/ v.object({
22
+
$type: /*#__PURE__*/ v.optional(
23
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#highlight"),
24
+
),
25
+
});
26
+
const _idSchema = /*#__PURE__*/ v.object({
27
+
$type: /*#__PURE__*/ v.optional(
28
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#id"),
29
+
),
30
+
id: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
31
+
});
32
+
const _italicSchema = /*#__PURE__*/ v.object({
33
+
$type: /*#__PURE__*/ v.optional(
34
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#italic"),
35
+
),
36
+
});
37
+
const _linkSchema = /*#__PURE__*/ v.object({
38
+
$type: /*#__PURE__*/ v.optional(
39
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#link"),
40
+
),
41
+
uri: /*#__PURE__*/ v.genericUriString(),
42
+
});
43
+
const _mainSchema = /*#__PURE__*/ v.object({
44
+
$type: /*#__PURE__*/ v.optional(
45
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet"),
46
+
),
47
+
get features() {
48
+
return /*#__PURE__*/ v.array(
49
+
/*#__PURE__*/ v.variant([
50
+
boldSchema,
51
+
codeSchema,
52
+
highlightSchema,
53
+
idSchema,
54
+
italicSchema,
55
+
linkSchema,
56
+
strikethroughSchema,
57
+
underlineSchema,
58
+
]),
59
+
);
60
+
},
61
+
get index() {
62
+
return byteSliceSchema;
63
+
},
64
+
});
65
+
const _strikethroughSchema = /*#__PURE__*/ v.object({
66
+
$type: /*#__PURE__*/ v.optional(
67
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#strikethrough"),
68
+
),
69
+
});
70
+
const _underlineSchema = /*#__PURE__*/ v.object({
71
+
$type: /*#__PURE__*/ v.optional(
72
+
/*#__PURE__*/ v.literal("pub.leaflet.richtext.facet#underline"),
73
+
),
74
+
});
75
+
76
+
type bold$schematype = typeof _boldSchema;
77
+
type byteSlice$schematype = typeof _byteSliceSchema;
78
+
type code$schematype = typeof _codeSchema;
79
+
type highlight$schematype = typeof _highlightSchema;
80
+
type id$schematype = typeof _idSchema;
81
+
type italic$schematype = typeof _italicSchema;
82
+
type link$schematype = typeof _linkSchema;
83
+
type main$schematype = typeof _mainSchema;
84
+
type strikethrough$schematype = typeof _strikethroughSchema;
85
+
type underline$schematype = typeof _underlineSchema;
86
+
87
+
export interface boldSchema extends bold$schematype {}
88
+
export interface byteSliceSchema extends byteSlice$schematype {}
89
+
export interface codeSchema extends code$schematype {}
90
+
export interface highlightSchema extends highlight$schematype {}
91
+
export interface idSchema extends id$schematype {}
92
+
export interface italicSchema extends italic$schematype {}
93
+
export interface linkSchema extends link$schematype {}
94
+
export interface mainSchema extends main$schematype {}
95
+
export interface strikethroughSchema extends strikethrough$schematype {}
96
+
export interface underlineSchema extends underline$schematype {}
97
+
98
+
export const boldSchema = _boldSchema as boldSchema;
99
+
export const byteSliceSchema = _byteSliceSchema as byteSliceSchema;
100
+
export const codeSchema = _codeSchema as codeSchema;
101
+
export const highlightSchema = _highlightSchema as highlightSchema;
102
+
export const idSchema = _idSchema as idSchema;
103
+
export const italicSchema = _italicSchema as italicSchema;
104
+
export const linkSchema = _linkSchema as linkSchema;
105
+
export const mainSchema = _mainSchema as mainSchema;
106
+
export const strikethroughSchema = _strikethroughSchema as strikethroughSchema;
107
+
export const underlineSchema = _underlineSchema as underlineSchema;
108
+
109
+
export interface Bold extends v.InferInput<typeof boldSchema> {}
110
+
export interface ByteSlice extends v.InferInput<typeof byteSliceSchema> {}
111
+
export interface Code extends v.InferInput<typeof codeSchema> {}
112
+
export interface Highlight extends v.InferInput<typeof highlightSchema> {}
113
+
export interface Id extends v.InferInput<typeof idSchema> {}
114
+
export interface Italic extends v.InferInput<typeof italicSchema> {}
115
+
export interface Link extends v.InferInput<typeof linkSchema> {}
116
+
export interface Main extends v.InferInput<typeof mainSchema> {}
117
+
export interface Strikethrough
118
+
extends v.InferInput<typeof strikethroughSchema> {}
119
+
export interface Underline extends v.InferInput<typeof underlineSchema> {}
+11
lib/schema.ts
+11
lib/schema.ts
+91
lib/types.ts
+91
lib/types.ts
···
1
+
import type { Client } from "@atcute/client";
2
+
import type { ActorIdentifier } from "@atcute/lexicons";
3
+
import type { XRPCProcedures, XRPCQueries } from "@atcute/lexicons/ambient";
4
+
import type { PubLeafletRichtextFacet } from "./lexicons/index.js";
5
+
6
+
export interface LiveLeafletLoaderOptions {
7
+
/**
8
+
* @description Your repo is your DID (did:plc... or did:web...) or handle (username.bsky.social). You can find this information using: https://pdsls.dev
9
+
*/
10
+
repo: string;
11
+
}
12
+
13
+
export interface StaticLeafletLoaderOptions {
14
+
/**
15
+
* @description Your repo is your DID (did:plc... or did:web...) or handle (username.bsky.social). You can find this information using: https://pdsls.dev
16
+
*/
17
+
repo: string;
18
+
/**
19
+
* @description The number of records leaflet records to return for getCollection, the default being 50. The range can be from 1 to 100.
20
+
* @default 50
21
+
*/
22
+
limit?: number;
23
+
/**
24
+
* @description Whether or not the records should be returned in reverse order.
25
+
* @default undefined
26
+
*/
27
+
reverse?: boolean;
28
+
}
29
+
30
+
export interface LeafletDocumentRecord {
31
+
$type: "pub.leaflet.document";
32
+
pages: { [x: string]: unknown };
33
+
title: string;
34
+
author: string;
35
+
description: string;
36
+
publication: string;
37
+
publishedAt: string;
38
+
}
39
+
40
+
export interface LeafletDocumentView {
41
+
rkey: string;
42
+
cid: string;
43
+
title: string;
44
+
description: string;
45
+
author: string;
46
+
publication: string;
47
+
publishedAt: string;
48
+
}
49
+
50
+
export interface MiniDoc {
51
+
did: string;
52
+
handle: string;
53
+
pds: string;
54
+
signing_key: string;
55
+
}
56
+
57
+
export interface CollectionFilter {
58
+
limit?: number;
59
+
reverse?: boolean;
60
+
cursor?: string;
61
+
}
62
+
63
+
export interface EntryFilter {
64
+
id?: string;
65
+
}
66
+
67
+
export interface GetLeafletDocumentsParams {
68
+
repo: ActorIdentifier;
69
+
rpc: Client<XRPCQueries, XRPCProcedures>;
70
+
cursor?: string;
71
+
limit?: number;
72
+
reverse?: boolean;
73
+
}
74
+
75
+
export interface GetSingleLeafletDocumentParams {
76
+
repo: ActorIdentifier;
77
+
rpc: Client<XRPCQueries, XRPCProcedures>;
78
+
id: string;
79
+
}
80
+
81
+
export interface Facet extends PubLeafletRichtextFacet.Main {}
82
+
export interface RichTextSegment {
83
+
text: string;
84
+
facet?: Exclude<Facet["features"], { $type: string }>;
85
+
}
86
+
87
+
// yoinked from: https://github.com/mary-ext/atcute/blob/trunk/packages/lexicons/lexicons/lib/syntax/handle.ts
88
+
/**
89
+
* represents a decentralized identifier (DID).
90
+
*/
91
+
export type Did<Method extends string = string> = `did:${Method}:${string}`;
+388
lib/utils.ts
+388
lib/utils.ts
···
1
+
import type {} from "@atcute/atproto";
2
+
import { is } from "@atcute/lexicons";
3
+
import { AtUri, UnicodeString } from "@atproto/api";
4
+
import katex from "katex";
5
+
import sanitizeHTML from "sanitize-html";
6
+
import {
7
+
PubLeafletBlocksBlockquote,
8
+
PubLeafletBlocksCode,
9
+
PubLeafletBlocksHeader,
10
+
PubLeafletBlocksHorizontalRule,
11
+
PubLeafletBlocksIframe,
12
+
PubLeafletBlocksImage,
13
+
PubLeafletBlocksMath,
14
+
PubLeafletBlocksText,
15
+
PubLeafletBlocksUnorderedList,
16
+
PubLeafletPagesLinearDocument,
17
+
} from "./lexicons/index.js";
18
+
import type {
19
+
Did,
20
+
Facet,
21
+
GetLeafletDocumentsParams,
22
+
GetSingleLeafletDocumentParams,
23
+
LeafletDocumentRecord,
24
+
LeafletDocumentView,
25
+
MiniDoc,
26
+
RichTextSegment,
27
+
} from "./types.js";
28
+
29
+
export class LiveLoaderError extends Error {
30
+
constructor(
31
+
message: string,
32
+
public code?: string,
33
+
) {
34
+
super(message);
35
+
this.name = "LiveLoaderError";
36
+
}
37
+
}
38
+
39
+
export function uriToRkey(uri: string): string {
40
+
const u = AtUri.make(uri);
41
+
if (!u.rkey) {
42
+
throw new Error("failed to get rkey");
43
+
}
44
+
return u.rkey;
45
+
}
46
+
47
+
export async function resolveMiniDoc(handleOrDid: string) {
48
+
try {
49
+
const response = await fetch(
50
+
`https://slingshot.microcosm.blue/xrpc/com.bad-example.identity.resolveMiniDoc?identifier=${handleOrDid}`,
51
+
);
52
+
53
+
if (!response.ok || response.status >= 300) {
54
+
throw new Error(
55
+
`could not resolve did doc due to invalid handle or did ${handleOrDid}`,
56
+
);
57
+
}
58
+
const data = (await response.json()) as MiniDoc;
59
+
60
+
return {
61
+
pds: data.pds,
62
+
did: data.did,
63
+
};
64
+
} catch {
65
+
throw new Error(`failed to resolve handle: ${handleOrDid}`);
66
+
}
67
+
}
68
+
69
+
export async function getLeafletDocuments({
70
+
repo,
71
+
reverse,
72
+
cursor,
73
+
rpc,
74
+
limit,
75
+
}: GetLeafletDocumentsParams) {
76
+
const { ok, data } = await rpc.get("com.atproto.repo.listRecords", {
77
+
params: {
78
+
collection: "pub.leaflet.document",
79
+
cursor,
80
+
reverse,
81
+
limit,
82
+
repo,
83
+
},
84
+
});
85
+
86
+
if (!ok) {
87
+
throw new LiveLoaderError(
88
+
"error fetching leaflet documents",
89
+
"DOCUMENT_FETCH_ERROR",
90
+
);
91
+
}
92
+
93
+
return {
94
+
documents: data?.records,
95
+
cursor: data?.cursor,
96
+
};
97
+
}
98
+
99
+
export async function getSingleLeafletDocument({
100
+
rpc,
101
+
repo,
102
+
id,
103
+
}: GetSingleLeafletDocumentParams) {
104
+
const { ok, data } = await rpc.get("com.atproto.repo.getRecord", {
105
+
params: {
106
+
collection: "pub.leaflet.document",
107
+
repo,
108
+
rkey: id,
109
+
},
110
+
});
111
+
112
+
if (!ok) {
113
+
throw new LiveLoaderError(
114
+
"error fetching single document",
115
+
"DOCUMENT_FETCH_ERROR",
116
+
);
117
+
}
118
+
119
+
return data;
120
+
}
121
+
122
+
export function leafletDocumentRecordToView({
123
+
uri,
124
+
cid,
125
+
value,
126
+
}: {
127
+
uri: string;
128
+
cid: string;
129
+
value: LeafletDocumentRecord;
130
+
}): LeafletDocumentView {
131
+
return {
132
+
rkey: uriToRkey(uri),
133
+
cid,
134
+
title: value.title,
135
+
description: value.description,
136
+
author: value.author,
137
+
publication: value.publication,
138
+
publishedAt: value.publishedAt,
139
+
};
140
+
}
141
+
142
+
export function leafletBlocksToHTML({
143
+
record,
144
+
did,
145
+
}: {
146
+
record: LeafletDocumentRecord;
147
+
did: string;
148
+
}) {
149
+
let html = "";
150
+
const firstPage = record.pages[0];
151
+
let blocks: PubLeafletPagesLinearDocument.Block[] = [];
152
+
153
+
if (is(PubLeafletPagesLinearDocument.mainSchema, firstPage)) {
154
+
blocks = firstPage.blocks || [];
155
+
}
156
+
157
+
for (const block of blocks) {
158
+
html += parseBlocks({ block, did });
159
+
}
160
+
161
+
return sanitizeHTML(html, {
162
+
allowedAttributes: {
163
+
"*": ["class", "style"],
164
+
img: ["src", "height", "width", "alt"],
165
+
a: ["href", "target", "rel"],
166
+
iframe: ["height", "allow", "loading", "src"],
167
+
},
168
+
allowedTags: [
169
+
"img",
170
+
"pre",
171
+
"code",
172
+
"p",
173
+
"a",
174
+
"b",
175
+
"s",
176
+
"ul",
177
+
"li",
178
+
"i",
179
+
"h1",
180
+
"h2",
181
+
"h3",
182
+
"h4",
183
+
"h5",
184
+
"h6",
185
+
"hr",
186
+
"div",
187
+
"span",
188
+
"blockquote",
189
+
"iframe",
190
+
],
191
+
selfClosing: ["img"],
192
+
});
193
+
}
194
+
195
+
export class RichText {
196
+
unicodeText: UnicodeString;
197
+
facets?: Facet[];
198
+
constructor(props: { text: string; facets: Facet[] }) {
199
+
this.unicodeText = new UnicodeString(props.text);
200
+
this.facets = props.facets;
201
+
if (this.facets) {
202
+
this.facets = this.facets
203
+
.filter((facet) => facet.index.byteStart <= facet.index.byteEnd)
204
+
.sort((a, b) => a.index.byteStart - b.index.byteStart);
205
+
}
206
+
}
207
+
208
+
*segments(): Generator<RichTextSegment, void, void> {
209
+
const facets = this.facets || [];
210
+
if (!facets.length) {
211
+
yield { text: this.unicodeText.utf16 };
212
+
return;
213
+
}
214
+
215
+
let textCursor = 0;
216
+
let facetCursor = 0;
217
+
do {
218
+
const currFacet = facets[facetCursor];
219
+
if (currFacet) {
220
+
if (textCursor < currFacet.index.byteStart) {
221
+
yield {
222
+
text: this.unicodeText.slice(textCursor, currFacet.index.byteStart),
223
+
};
224
+
} else if (textCursor > currFacet.index.byteStart) {
225
+
facetCursor++;
226
+
continue;
227
+
}
228
+
if (currFacet.index.byteStart < currFacet.index.byteEnd) {
229
+
const subtext = this.unicodeText.slice(
230
+
currFacet.index.byteStart,
231
+
currFacet.index.byteEnd,
232
+
);
233
+
if (!subtext.trim()) {
234
+
// dont empty string entities
235
+
yield { text: subtext };
236
+
} else {
237
+
yield { text: subtext, facet: currFacet.features };
238
+
}
239
+
}
240
+
textCursor = currFacet.index.byteEnd;
241
+
facetCursor++;
242
+
}
243
+
} while (facetCursor < facets.length);
244
+
if (textCursor < this.unicodeText.length) {
245
+
yield {
246
+
text: this.unicodeText.slice(textCursor, this.unicodeText.length),
247
+
};
248
+
}
249
+
}
250
+
}
251
+
252
+
export function parseTextBlock(block: PubLeafletBlocksText.Main) {
253
+
let html = "";
254
+
const rt = new RichText({
255
+
text: block.plaintext,
256
+
facets: block.facets || [],
257
+
});
258
+
const children = [];
259
+
for (const segment of rt.segments()) {
260
+
const link = segment.facet?.find(
261
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#link",
262
+
);
263
+
const isBold = segment.facet?.find(
264
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#bold",
265
+
);
266
+
const isCode = segment.facet?.find(
267
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#code",
268
+
);
269
+
const isStrikethrough = segment.facet?.find(
270
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#strikethrough",
271
+
);
272
+
const isUnderline = segment.facet?.find(
273
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#underline",
274
+
);
275
+
const isItalic = segment.facet?.find(
276
+
(segment) => segment.$type === "pub.leaflet.richtext.facet#italic",
277
+
);
278
+
if (isCode) {
279
+
children.push(`<pre><code>${segment.text}</code></pre>`);
280
+
} else if (link) {
281
+
children.push(
282
+
`<a href="${link.uri}" target="_blank" rel="noopener noreferrer">${segment.text}</a>`,
283
+
);
284
+
} else if (isBold) {
285
+
children.push(`<b>${segment.text}</b>`);
286
+
} else if (isStrikethrough) {
287
+
children.push(`<s>${segment.text}</s>`);
288
+
} else if (isUnderline) {
289
+
children.push(
290
+
`<span style="text-decoration:underline;">${segment.text}</span>`,
291
+
);
292
+
} else if (isItalic) {
293
+
children.push(`<i>${segment.text}</i>`);
294
+
} else {
295
+
children.push(`${segment.text}`);
296
+
}
297
+
}
298
+
html += `<p>${children.join("")}</p>`;
299
+
300
+
return html.trim();
301
+
}
302
+
303
+
export function parseBlocks({
304
+
block,
305
+
did,
306
+
}: {
307
+
block: PubLeafletPagesLinearDocument.Block;
308
+
did: string;
309
+
}): string {
310
+
let html = "";
311
+
312
+
if (is(PubLeafletBlocksText.mainSchema, block.block)) {
313
+
html += parseTextBlock(block.block);
314
+
}
315
+
316
+
if (is(PubLeafletBlocksHeader.mainSchema, block.block)) {
317
+
if (block.block.level === 1) {
318
+
html += `<h2>${block.block.plaintext}</h2>`;
319
+
}
320
+
}
321
+
if (is(PubLeafletBlocksHeader.mainSchema, block.block)) {
322
+
if (block.block.level === 2) {
323
+
html += `<h3>${block.block.plaintext}</h3>`;
324
+
}
325
+
}
326
+
if (is(PubLeafletBlocksHeader.mainSchema, block.block)) {
327
+
if (block.block.level === 3) {
328
+
html += `<h4>${block.block.plaintext}</h4>`;
329
+
}
330
+
}
331
+
if (is(PubLeafletBlocksHeader.mainSchema, block.block)) {
332
+
if (!block.block.level) {
333
+
html += `<h6>${block.block.plaintext}</h6>`;
334
+
}
335
+
}
336
+
337
+
if (is(PubLeafletBlocksHorizontalRule.mainSchema, block.block)) {
338
+
html += `<hr />`;
339
+
}
340
+
if (is(PubLeafletBlocksUnorderedList.mainSchema, block.block)) {
341
+
html += `<ul>${block.block.children.map((child) => renderListItem({ item: child, did })).join("")}</ul>`;
342
+
}
343
+
344
+
if (is(PubLeafletBlocksMath.mainSchema, block.block)) {
345
+
html += `<div>${katex.renderToString(block.block.tex, { displayMode: true, output: "html", throwOnError: false })}</div>`;
346
+
}
347
+
348
+
if (is(PubLeafletBlocksCode.mainSchema, block.block)) {
349
+
html += `<pre><code data-language=${block.block.language}>${block.block.plaintext}</code></pre>`;
350
+
}
351
+
352
+
if (is(PubLeafletBlocksImage.mainSchema, block.block)) {
353
+
// @ts-ignore
354
+
html += `<div><img src="https://cdn.bsky.app/img/feed_fullsize/plain/${did}/${block.block.image.ref.$link}@jpeg" height="${block.block.aspectRatio.height}" width="${block.block.aspectRatio.width}" alt="${block.block.alt}" /></div>`;
355
+
}
356
+
357
+
if (is(PubLeafletBlocksBlockquote.mainSchema, block.block)) {
358
+
html += `<blockquote>${parseTextBlock(block.block)}</blockquote>`;
359
+
}
360
+
361
+
if (is(PubLeafletBlocksIframe.mainSchema, block.block)) {
362
+
// @ts-ignore
363
+
html += `<iframe height="${block.block.height}" allow="fullscreen" loading="lazy" src="${block.block.url}"></iframe>`;
364
+
}
365
+
366
+
return html.trim();
367
+
}
368
+
369
+
export function renderListItem({
370
+
item,
371
+
did,
372
+
}: {
373
+
item: PubLeafletBlocksUnorderedList.ListItem;
374
+
did: string;
375
+
}): string {
376
+
const children: string | null = item.children?.length
377
+
? `<ul>${item.children.map((child) => renderListItem({ item: child, did }))}</ul>`
378
+
: "";
379
+
380
+
return `<li>${parseBlocks({ block: { block: item.content }, did })}${children}</li>`;
381
+
}
382
+
383
+
// yoinked from: https://github.com/mary-ext/atcute/blob/trunk/packages/lexicons/lexicons/lib/syntax/handle.ts
384
+
const PLC_DID_RE = /^did:plc:([a-z2-7]{24})$/;
385
+
386
+
export const isPlcDid = (input: string): input is Did<"plc"> => {
387
+
return input.length === 32 && PLC_DID_RE.test(input);
388
+
};
+21
-13
package.json
+21
-13
package.json
···
1
1
{
2
-
"name": "leaflet-loader-astro",
3
-
"version": "0.0.1",
2
+
"name": "@nulfrost/leaflet-loader-astro",
3
+
"version": "1.2.0",
4
4
"description": "A leaflet.pub astro collection loader",
5
5
"keywords": [
6
6
"astro",
···
12
12
"bugs": {
13
13
"url": "https://github.com/nulfrost/leaflet-loader-astro/issues"
14
14
},
15
-
"author": "Dane Miller",
15
+
"author": "Dane Miller <me@dane.computer>",
16
16
"repository": {
17
17
"type": "git",
18
18
"url": "git+https://github.com/nulfrost/leaflet-loader-astro.git"
19
19
},
20
20
"scripts": {
21
21
"lint": "biome lint",
22
-
"format": "biome format --write ./src",
22
+
"format": "biome format --write ./lib",
23
+
"lex": "lex-cli generate -c ./lex.config.js",
23
24
"test": "vitest --run",
24
-
"lex-gen": "lex gen-api ./src/leaflet/lexicons ./lexicons/pub/leaflet/* ./lexicons/pub/leaflet/*/* ./lexicons/com/atproto/*/* --yes",
25
25
"typecheck": "tsc",
26
-
"build": "rm -rf dist && tsup"
26
+
"release": "pnpm run build && changeset publish",
27
+
"build": "rm -rf dist && tsup --format esm --dts",
28
+
"pack": "rm -rf *.tgz && pnpm build && pnpm pack"
27
29
},
28
30
"license": "MIT",
29
31
"files": [
30
32
"dist"
31
33
],
34
+
"publishConfig": {
35
+
"access": "public"
36
+
},
32
37
"type": "module",
33
38
"main": "dist/index.js",
39
+
"module": "dist/index.js",
40
+
"types": "dist/index.d.ts",
34
41
"exports": {
35
42
".": {
36
43
"import": "./dist/index.js",
···
38
45
}
39
46
},
40
47
"devDependencies": {
41
-
"@atproto/lex-cli": "^0.9.1",
48
+
"@atcute/atproto": "^3.1.1",
49
+
"@atcute/lex-cli": "^2.1.1",
42
50
"@biomejs/biome": "2.1.3",
51
+
"@changesets/cli": "^2.29.5",
52
+
"@types/bun": "^1.2.19",
43
53
"@types/sanitize-html": "^2.16.0",
44
54
"astro": "^5.12.8",
45
55
"tsup": "^8.5.0",
···
47
57
"vitest": "^3.2.4"
48
58
},
49
59
"dependencies": {
50
-
"@atproto/api": "^0.16.1",
51
-
"@atproto/did": "^0.1.5",
52
-
"@atproto/lexicon": "^0.4.12",
53
-
"@atproto/syntax": "^0.4.0",
54
-
"@atproto/xrpc": "^0.7.1",
55
-
"multiformats": "^13.4.0",
60
+
"@atcute/client": "^4.0.3",
61
+
"@atcute/lexicons": "^1.1.0",
62
+
"@atproto/api": "^0.16.2",
63
+
"katex": "^0.16.22",
56
64
"sanitize-html": "^2.17.0"
57
65
}
58
66
}
+864
-134
pnpm-lock.yaml
+864
-134
pnpm-lock.yaml
···
8
8
9
9
.:
10
10
dependencies:
11
+
'@atcute/client':
12
+
specifier: ^4.0.3
13
+
version: 4.0.3
14
+
'@atcute/lexicons':
15
+
specifier: ^1.1.0
16
+
version: 1.1.0
11
17
'@atproto/api':
12
-
specifier: ^0.16.1
13
-
version: 0.16.1
14
-
'@atproto/did':
15
-
specifier: ^0.1.5
16
-
version: 0.1.5
17
-
'@atproto/lexicon':
18
-
specifier: ^0.4.12
19
-
version: 0.4.12
20
-
'@atproto/syntax':
21
-
specifier: ^0.4.0
22
-
version: 0.4.0
23
-
'@atproto/xrpc':
24
-
specifier: ^0.7.1
25
-
version: 0.7.1
26
-
multiformats:
27
-
specifier: ^13.4.0
28
-
version: 13.4.0
18
+
specifier: ^0.16.2
19
+
version: 0.16.2
20
+
katex:
21
+
specifier: ^0.16.22
22
+
version: 0.16.22
29
23
sanitize-html:
30
24
specifier: ^2.17.0
31
25
version: 2.17.0
32
26
devDependencies:
33
-
'@atproto/lex-cli':
34
-
specifier: ^0.9.1
35
-
version: 0.9.1
27
+
'@atcute/atproto':
28
+
specifier: ^3.1.1
29
+
version: 3.1.1
30
+
'@atcute/lex-cli':
31
+
specifier: ^2.1.1
32
+
version: 2.1.1
36
33
'@biomejs/biome':
37
34
specifier: 2.1.3
38
35
version: 2.1.3
36
+
'@changesets/cli':
37
+
specifier: ^2.29.5
38
+
version: 2.29.5
39
+
'@types/bun':
40
+
specifier: ^1.2.19
41
+
version: 1.2.19(@types/react@19.1.9)
39
42
'@types/sanitize-html':
40
43
specifier: ^2.16.0
41
44
version: 2.16.0
42
45
astro:
43
46
specifier: ^5.12.8
44
-
version: 5.12.8(@types/node@24.2.0)(rollup@4.46.2)(typescript@5.9.2)
47
+
version: 5.12.9(@types/node@24.2.1)(rollup@4.46.2)(typescript@5.9.2)
45
48
tsup:
46
49
specifier: ^8.5.0
47
50
version: 8.5.0(postcss@8.5.6)(typescript@5.9.2)
···
50
53
version: 5.9.2
51
54
vitest:
52
55
specifier: ^3.2.4
53
-
version: 3.2.4(@types/debug@4.1.12)(@types/node@24.2.0)
56
+
version: 3.2.4(@types/debug@4.1.12)(@types/node@24.2.1)
54
57
55
58
packages:
56
59
···
71
74
resolution: {integrity: sha512-UFBgfeldP06qu6khs/yY+q1cDAaArM2/7AEIqQ9Cuvf7B1hNLq0xDrZkct+QoIGyjq56y8IaE2I3CTvG99mlhQ==}
72
75
engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0}
73
76
74
-
'@atproto/api@0.16.1':
75
-
resolution: {integrity: sha512-w48BlTmzKym7nZETWxgiuUX/wwRXU3xsLLKORWo/xtGnwlvpchUFnHKI3k4ttYJ2/JQE59+/4C16BaLzDyiU2w==}
77
+
'@atcute/atproto@3.1.1':
78
+
resolution: {integrity: sha512-D+RLTIPF0xLu7BPZY8KSewAPemJFh+3n3zeQ3ROsLxbTtCHbrTDMAmAFexaVRAPGcPYrwXaBUlv7yZjScJolMg==}
76
79
77
-
'@atproto/common-web@0.4.2':
78
-
resolution: {integrity: sha512-vrXwGNoFGogodjQvJDxAeP3QbGtawgZute2ed1XdRO0wMixLk3qewtikZm06H259QDJVu6voKC5mubml+WgQUw==}
80
+
'@atcute/client@4.0.3':
81
+
resolution: {integrity: sha512-RIOZWFVLca/HiPAAUDqQPOdOreCxTbL5cb+WUf5yqQOKIu5yEAP3eksinmlLmgIrlr5qVOE7brazUUzaskFCfw==}
79
82
80
-
'@atproto/did@0.1.5':
81
-
resolution: {integrity: sha512-8+1D08QdGE5TF0bB0vV8HLVrVZJeLNITpRTUVEoABNMRaUS7CoYSVb0+JNQDeJIVmqMjOL8dOjvCUDkp3gEaGQ==}
83
+
'@atcute/identity@1.0.3':
84
+
resolution: {integrity: sha512-mNMxbKHFGys03A8JXKk0KfMBzdd0vrYMzZZWjpw1nYTs0+ea6bo5S1hwqVUZxHdo1gFHSe/t63jxQIF4yL9aKw==}
82
85
83
-
'@atproto/lex-cli@0.9.1':
84
-
resolution: {integrity: sha512-ftcUZd8rElHeUJq6pTcQkURnTEe7woCF4I1NK3j5GpT/itacEZtcppabjy5o2aUsbktZsALj3ch3xm7ZZ+Zp0w==}
85
-
engines: {node: '>=18.7.0'}
86
+
'@atcute/lex-cli@2.1.1':
87
+
resolution: {integrity: sha512-QaR0sOP8Z24opGHKsSfleDbP/ahUb6HECkVaOqSwG7ORZzbLK1w0265o1BRjCVr2dT6FxlsMUa2Ge85JMA9bxg==}
86
88
hasBin: true
87
89
90
+
'@atcute/lexicon-doc@1.0.3':
91
+
resolution: {integrity: sha512-U7rinsTOwXGGcrF6/s7GzTXargcQpDr4BTrj5ci/XTK+POEK5jpcI+Ag1fF932pBX3k97em6y4TWwTSO8M/McQ==}
92
+
93
+
'@atcute/lexicons@1.1.0':
94
+
resolution: {integrity: sha512-LFqwnria78xLYb62Ri/+WwQpUTgZp2DuyolNGIIOV1dpiKhFFFh//nscHMA6IExFLQRqWDs3tTjy7zv0h3sf1Q==}
95
+
96
+
'@atproto/api@0.16.2':
97
+
resolution: {integrity: sha512-sSTg31J8ws8DNaoiizp+/uJideRxRaJsq+Nyl8rnSxGw0w3oCvoeRU19iRWh2t0jZEmiRJAGkveGu23NKmPYEQ==}
98
+
99
+
'@atproto/common-web@0.4.2':
100
+
resolution: {integrity: sha512-vrXwGNoFGogodjQvJDxAeP3QbGtawgZute2ed1XdRO0wMixLk3qewtikZm06H259QDJVu6voKC5mubml+WgQUw==}
101
+
88
102
'@atproto/lexicon@0.4.12':
89
103
resolution: {integrity: sha512-fcEvEQ1GpQYF5igZ4IZjPWEoWVpsEF22L9RexxLS3ptfySXLflEyH384e7HITzO/73McDeaJx3lqHIuqn9ulnw==}
90
104
···
107
121
engines: {node: '>=6.0.0'}
108
122
hasBin: true
109
123
124
+
'@babel/runtime@7.28.2':
125
+
resolution: {integrity: sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA==}
126
+
engines: {node: '>=6.9.0'}
127
+
110
128
'@babel/types@7.28.2':
111
129
resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==}
112
130
engines: {node: '>=6.9.0'}
131
+
132
+
'@badrap/valita@0.4.6':
133
+
resolution: {integrity: sha512-4kdqcjyxo/8RQ8ayjms47HCWZIF5981oE5nIenbfThKDxWXtEHKipAOWlflpPJzZx9y/JWYQkp18Awr7VuepFg==}
134
+
engines: {node: '>= 18'}
113
135
114
136
'@biomejs/biome@2.1.3':
115
137
resolution: {integrity: sha512-KE/tegvJIxTkl7gJbGWSgun7G6X/n2M6C35COT6ctYrAy7SiPyNvi6JtoQERVK/VRbttZfgGq96j2bFmhmnH4w==}
···
167
189
'@capsizecss/unpack@2.4.0':
168
190
resolution: {integrity: sha512-GrSU71meACqcmIUxPYOJvGKF0yryjN/L1aCuE9DViCTJI7bfkjgYDPD1zbNDcINJwSSP6UaBZY9GAbYDO7re0Q==}
169
191
192
+
'@changesets/apply-release-plan@7.0.12':
193
+
resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==}
194
+
195
+
'@changesets/assemble-release-plan@6.0.9':
196
+
resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==}
197
+
198
+
'@changesets/changelog-git@0.2.1':
199
+
resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==}
200
+
201
+
'@changesets/cli@2.29.5':
202
+
resolution: {integrity: sha512-0j0cPq3fgxt2dPdFsg4XvO+6L66RC0pZybT9F4dG5TBrLA3jA/1pNkdTXH9IBBVHkgsKrNKenI3n1mPyPlIydg==}
203
+
hasBin: true
204
+
205
+
'@changesets/config@3.1.1':
206
+
resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==}
207
+
208
+
'@changesets/errors@0.2.0':
209
+
resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==}
210
+
211
+
'@changesets/get-dependents-graph@2.1.3':
212
+
resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==}
213
+
214
+
'@changesets/get-release-plan@4.0.13':
215
+
resolution: {integrity: sha512-DWG1pus72FcNeXkM12tx+xtExyH/c9I1z+2aXlObH3i9YA7+WZEVaiHzHl03thpvAgWTRaH64MpfHxozfF7Dvg==}
216
+
217
+
'@changesets/get-version-range-type@0.4.0':
218
+
resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==}
219
+
220
+
'@changesets/git@3.0.4':
221
+
resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==}
222
+
223
+
'@changesets/logger@0.1.1':
224
+
resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==}
225
+
226
+
'@changesets/parse@0.4.1':
227
+
resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==}
228
+
229
+
'@changesets/pre@2.0.2':
230
+
resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==}
231
+
232
+
'@changesets/read@0.6.5':
233
+
resolution: {integrity: sha512-UPzNGhsSjHD3Veb0xO/MwvasGe8eMyNrR/sT9gR8Q3DhOQZirgKhhXv/8hVsI0QpPjR004Z9iFxoJU6in3uGMg==}
234
+
235
+
'@changesets/should-skip-package@0.1.2':
236
+
resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==}
237
+
238
+
'@changesets/types@4.1.0':
239
+
resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==}
240
+
241
+
'@changesets/types@6.1.0':
242
+
resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==}
243
+
244
+
'@changesets/write@0.4.0':
245
+
resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==}
246
+
170
247
'@emnapi/runtime@1.4.5':
171
248
resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==}
172
249
···
326
403
cpu: [x64]
327
404
os: [win32]
328
405
406
+
'@externdefs/collider@0.3.0':
407
+
resolution: {integrity: sha512-x5CpeZ4c8n+1wMFthUMWSQKqCGcQo52/Qbda5ES+JFRRg/D8Ep6/JOvUUq5HExFuv/wW+6UYG2U/mXzw0IAd8Q==}
408
+
peerDependencies:
409
+
'@badrap/valita': ^0.4.4
410
+
329
411
'@img/sharp-darwin-arm64@0.33.5':
330
412
resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}
331
413
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
···
448
530
'@jridgewell/trace-mapping@0.3.29':
449
531
resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==}
450
532
533
+
'@manypkg/find-root@1.1.0':
534
+
resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==}
535
+
536
+
'@manypkg/get-packages@1.1.3':
537
+
resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==}
538
+
539
+
'@nodelib/fs.scandir@2.1.5':
540
+
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
541
+
engines: {node: '>= 8'}
542
+
543
+
'@nodelib/fs.stat@2.0.5':
544
+
resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
545
+
engines: {node: '>= 8'}
546
+
547
+
'@nodelib/fs.walk@1.2.8':
548
+
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
549
+
engines: {node: '>= 8'}
550
+
451
551
'@oslojs/encoding@1.1.0':
452
552
resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==}
453
553
···
588
688
'@swc/helpers@0.5.17':
589
689
resolution: {integrity: sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==}
590
690
591
-
'@ts-morph/common@0.25.0':
592
-
resolution: {integrity: sha512-kMnZz+vGGHi4GoHnLmMhGNjm44kGtKUXGnOvrKmMwAuvNjM/PgKVGfUnL7IDvK7Jb2QQ82jq3Zmp04Gy+r3Dkg==}
691
+
'@types/bun@1.2.19':
692
+
resolution: {integrity: sha512-d9ZCmrH3CJ2uYKXQIUuZ/pUnTqIvLDS0SK7pFmbx8ma+ziH/FRMoAq5bYpRG7y+w1gl+HgyNZbtqgMq4W4e2Lg==}
593
693
594
694
'@types/chai@5.2.2':
595
695
resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==}
···
618
718
'@types/nlcst@2.0.3':
619
719
resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==}
620
720
621
-
'@types/node@24.2.0':
622
-
resolution: {integrity: sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==}
721
+
'@types/node@12.20.55':
722
+
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
723
+
724
+
'@types/node@24.2.1':
725
+
resolution: {integrity: sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==}
726
+
727
+
'@types/react@19.1.9':
728
+
resolution: {integrity: sha512-WmdoynAX8Stew/36uTSVMcLJJ1KRh6L3IZRx1PZ7qJtBqT3dYTgyDTx8H1qoRghErydW7xw9mSJ3wS//tCRpFA==}
623
729
624
730
'@types/sanitize-html@2.16.0':
625
731
resolution: {integrity: sha512-l6rX1MUXje5ztPT0cAFtUayXF06DqPhRyfVXareEN5gGCFaP/iwsxIyKODr9XDhfxPpN6vXUFNfo5kZMXCxBtw==}
···
667
773
ansi-align@3.0.1:
668
774
resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==}
669
775
776
+
ansi-colors@4.1.3:
777
+
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
778
+
engines: {node: '>=6'}
779
+
670
780
ansi-regex@5.0.1:
671
781
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
672
782
engines: {node: '>=8'}
···
690
800
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
691
801
engines: {node: '>= 8'}
692
802
803
+
argparse@1.0.10:
804
+
resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}
805
+
693
806
argparse@2.0.1:
694
807
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
695
808
···
700
813
array-iterate@2.0.1:
701
814
resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==}
702
815
816
+
array-union@2.1.0:
817
+
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
818
+
engines: {node: '>=8'}
819
+
703
820
assertion-error@2.0.1:
704
821
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
705
822
engines: {node: '>=12'}
706
823
707
-
astro@5.12.8:
708
-
resolution: {integrity: sha512-KkJ7FR+c2SyZYlpakm48XBiuQcRsrVtdjG5LN5an0givI/tLik+ePJ4/g3qrAVhYMjJOxBA2YgFQxANPiWB+Mw==}
824
+
astro@5.12.9:
825
+
resolution: {integrity: sha512-cZ7kZ61jyE5nwSrFKSRyf5Gds+uJELqQxJFqMkcgiWQvhWZJUSShn8Uz3yc9WLyLw5Kim5P5un9SkJSGogfEZQ==}
709
826
engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
710
827
hasBin: true
711
828
···
728
845
base64-js@1.5.1:
729
846
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
730
847
848
+
better-path-resolve@1.0.0:
849
+
resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==}
850
+
engines: {node: '>=4'}
851
+
731
852
blob-to-buffer@1.2.9:
732
853
resolution: {integrity: sha512-BF033y5fN6OCofD3vgHmNtwZWRcq9NLyyxyILx9hfMy1sXYy4ojFl765hJ2lP0YaN2fuxPaLO2Vzzoxy0FLFFA==}
733
854
···
738
859
brace-expansion@2.0.2:
739
860
resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
740
861
862
+
braces@3.0.3:
863
+
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
864
+
engines: {node: '>=8'}
865
+
741
866
brotli@1.3.3:
742
867
resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==}
868
+
869
+
bun-types@1.2.19:
870
+
resolution: {integrity: sha512-uAOTaZSPuYsWIXRpj7o56Let0g/wjihKCkeRqUBhlLVM/Bt+Fj9xTo+LhC1OV1XDaGkz4hNC80et5xgy+9KTHQ==}
871
+
peerDependencies:
872
+
'@types/react': ^19
743
873
744
874
bundle-require@5.1.0:
745
875
resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==}
···
762
892
resolution: {integrity: sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==}
763
893
engines: {node: '>=18'}
764
894
765
-
chalk@4.1.2:
766
-
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
767
-
engines: {node: '>=10'}
768
-
769
895
chalk@5.5.0:
770
896
resolution: {integrity: sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg==}
771
897
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
···
779
905
character-entities@2.0.2:
780
906
resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==}
781
907
908
+
chardet@0.7.0:
909
+
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
910
+
782
911
check-error@2.1.1:
783
912
resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
784
913
engines: {node: '>= 16'}
···
787
916
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
788
917
engines: {node: '>= 14.16.0'}
789
918
919
+
ci-info@3.9.0:
920
+
resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==}
921
+
engines: {node: '>=8'}
922
+
790
923
ci-info@4.3.0:
791
924
resolution: {integrity: sha512-l+2bNRMiQgcfILUi33labAZYIWlH1kWDp+ecNo5iisRKrbm0xcRyCww71/YU0Fkw0mAFpz9bJayXPjey6vkmaQ==}
792
925
engines: {node: '>=8'}
···
802
935
clsx@2.1.1:
803
936
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
804
937
engines: {node: '>=6'}
805
-
806
-
code-block-writer@13.0.3:
807
-
resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==}
808
938
809
939
color-convert@2.0.1:
810
940
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
···
827
957
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
828
958
engines: {node: '>= 6'}
829
959
830
-
commander@9.5.0:
831
-
resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
832
-
engines: {node: ^12.20.0 || >=14}
960
+
commander@8.3.0:
961
+
resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
962
+
engines: {node: '>= 12'}
833
963
834
964
common-ancestor-path@1.0.1:
835
965
resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==}
···
866
996
resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
867
997
engines: {node: '>=4'}
868
998
hasBin: true
999
+
1000
+
csstype@3.1.3:
1001
+
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
869
1002
870
1003
debug@4.4.1:
871
1004
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
···
897
1030
destr@2.0.5:
898
1031
resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==}
899
1032
1033
+
detect-indent@6.1.0:
1034
+
resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==}
1035
+
engines: {node: '>=8'}
1036
+
900
1037
detect-libc@2.0.4:
901
1038
resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==}
902
1039
engines: {node: '>=8'}
···
917
1054
diff@5.2.0:
918
1055
resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==}
919
1056
engines: {node: '>=0.3.1'}
1057
+
1058
+
dir-glob@3.0.1:
1059
+
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
1060
+
engines: {node: '>=8'}
920
1061
921
1062
dlv@1.1.3:
922
1063
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
···
950
1091
emoji-regex@9.2.2:
951
1092
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
952
1093
1094
+
enquirer@2.4.1:
1095
+
resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==}
1096
+
engines: {node: '>=8.6'}
1097
+
953
1098
entities@4.5.0:
954
1099
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
955
1100
engines: {node: '>=0.12'}
···
974
1119
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
975
1120
engines: {node: '>=12'}
976
1121
1122
+
esm-env@1.2.2:
1123
+
resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==}
1124
+
1125
+
esprima@4.0.1:
1126
+
resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
1127
+
engines: {node: '>=4'}
1128
+
hasBin: true
1129
+
977
1130
estree-walker@2.0.2:
978
1131
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
979
1132
···
990
1143
extend@3.0.2:
991
1144
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
992
1145
1146
+
extendable-error@0.1.7:
1147
+
resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==}
1148
+
1149
+
external-editor@3.1.0:
1150
+
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
1151
+
engines: {node: '>=4'}
1152
+
993
1153
fast-deep-equal@3.1.3:
994
1154
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
995
1155
1156
+
fast-glob@3.3.3:
1157
+
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
1158
+
engines: {node: '>=8.6.0'}
1159
+
1160
+
fastq@1.19.1:
1161
+
resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
1162
+
996
1163
fdir@6.4.6:
997
1164
resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==}
998
1165
peerDependencies:
···
1001
1168
picomatch:
1002
1169
optional: true
1003
1170
1171
+
fill-range@7.1.1:
1172
+
resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
1173
+
engines: {node: '>=8'}
1174
+
1175
+
find-up@4.1.0:
1176
+
resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}
1177
+
engines: {node: '>=8'}
1178
+
1004
1179
fix-dts-default-cjs-exports@1.0.1:
1005
1180
resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==}
1006
1181
···
1018
1193
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
1019
1194
engines: {node: '>=14'}
1020
1195
1196
+
fs-extra@7.0.1:
1197
+
resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}
1198
+
engines: {node: '>=6 <7 || >=8'}
1199
+
1200
+
fs-extra@8.1.0:
1201
+
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
1202
+
engines: {node: '>=6 <7 || >=8'}
1203
+
1021
1204
fsevents@2.3.3:
1022
1205
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
1023
1206
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
···
1030
1213
github-slugger@2.0.0:
1031
1214
resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==}
1032
1215
1216
+
glob-parent@5.1.2:
1217
+
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
1218
+
engines: {node: '>= 6'}
1219
+
1033
1220
glob@10.4.5:
1034
1221
resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
1035
1222
hasBin: true
1036
1223
1224
+
globby@11.1.0:
1225
+
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
1226
+
engines: {node: '>=10'}
1227
+
1228
+
graceful-fs@4.2.11:
1229
+
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
1230
+
1037
1231
graphemer@1.4.0:
1038
1232
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
1039
1233
1040
1234
h3@1.15.4:
1041
1235
resolution: {integrity: sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==}
1042
-
1043
-
has-flag@4.0.0:
1044
-
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
1045
-
engines: {node: '>=8'}
1046
1236
1047
1237
hast-util-from-html@2.0.3:
1048
1238
resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==}
···
1086
1276
http-cache-semantics@4.2.0:
1087
1277
resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==}
1088
1278
1279
+
human-id@4.1.1:
1280
+
resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==}
1281
+
hasBin: true
1282
+
1283
+
iconv-lite@0.4.24:
1284
+
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
1285
+
engines: {node: '>=0.10.0'}
1286
+
1287
+
ignore@5.3.2:
1288
+
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
1289
+
engines: {node: '>= 4'}
1290
+
1089
1291
import-meta-resolve@4.1.0:
1090
1292
resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==}
1091
1293
···
1100
1302
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
1101
1303
hasBin: true
1102
1304
1305
+
is-extglob@2.1.1:
1306
+
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
1307
+
engines: {node: '>=0.10.0'}
1308
+
1103
1309
is-fullwidth-code-point@3.0.0:
1104
1310
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
1105
1311
engines: {node: '>=8'}
1106
1312
1313
+
is-glob@4.0.3:
1314
+
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
1315
+
engines: {node: '>=0.10.0'}
1316
+
1107
1317
is-inside-container@1.0.0:
1108
1318
resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
1109
1319
engines: {node: '>=14.16'}
1110
1320
hasBin: true
1111
1321
1322
+
is-number@7.0.0:
1323
+
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
1324
+
engines: {node: '>=0.12.0'}
1325
+
1112
1326
is-plain-obj@4.1.0:
1113
1327
resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}
1114
1328
engines: {node: '>=12'}
···
1117
1331
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
1118
1332
engines: {node: '>=0.10.0'}
1119
1333
1334
+
is-subdir@1.2.0:
1335
+
resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==}
1336
+
engines: {node: '>=4'}
1337
+
1338
+
is-windows@1.0.2:
1339
+
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==}
1340
+
engines: {node: '>=0.10.0'}
1341
+
1120
1342
is-wsl@3.1.0:
1121
1343
resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
1122
1344
engines: {node: '>=16'}
···
1137
1359
js-tokens@9.0.1:
1138
1360
resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==}
1139
1361
1362
+
js-yaml@3.14.1:
1363
+
resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}
1364
+
hasBin: true
1365
+
1140
1366
js-yaml@4.1.0:
1141
1367
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
1142
1368
hasBin: true
1143
1369
1370
+
jsonfile@4.0.0:
1371
+
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
1372
+
1373
+
katex@0.16.22:
1374
+
resolution: {integrity: sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==}
1375
+
hasBin: true
1376
+
1144
1377
kleur@3.0.3:
1145
1378
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
1146
1379
engines: {node: '>=6'}
···
1160
1393
resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}
1161
1394
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
1162
1395
1396
+
locate-path@5.0.0:
1397
+
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
1398
+
engines: {node: '>=8'}
1399
+
1163
1400
lodash.sortby@4.7.0:
1164
1401
resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
1402
+
1403
+
lodash.startcase@4.4.0:
1404
+
resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==}
1165
1405
1166
1406
longest-streak@3.1.0:
1167
1407
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
···
1223
1463
mdn-data@2.12.2:
1224
1464
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
1225
1465
1466
+
merge2@1.4.1:
1467
+
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
1468
+
engines: {node: '>= 8'}
1469
+
1226
1470
micromark-core-commonmark@2.0.3:
1227
1471
resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==}
1228
1472
···
1307
1551
micromark@4.0.2:
1308
1552
resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==}
1309
1553
1554
+
micromatch@4.0.8:
1555
+
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
1556
+
engines: {node: '>=8.6'}
1557
+
1310
1558
minimatch@9.0.5:
1311
1559
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
1312
1560
engines: {node: '>=16 || 14 >=14.17'}
···
1318
1566
mlly@1.7.4:
1319
1567
resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}
1320
1568
1569
+
mri@1.2.0:
1570
+
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
1571
+
engines: {node: '>=4'}
1572
+
1321
1573
mrmime@2.0.1:
1322
1574
resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
1323
1575
engines: {node: '>=10'}
1324
1576
1325
1577
ms@2.1.3:
1326
1578
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
1327
-
1328
-
multiformats@13.4.0:
1329
-
resolution: {integrity: sha512-Mkb/QcclrJxKC+vrcIFl297h52QcKh2Az/9A5vbWytbQt4225UWWWmIuSsKksdww9NkIeYcA7DkfftyLuC/JSg==}
1330
1579
1331
1580
multiformats@9.9.0:
1332
1581
resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==}
···
1381
1630
oniguruma-to-es@4.3.3:
1382
1631
resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==}
1383
1632
1633
+
os-tmpdir@1.0.2:
1634
+
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
1635
+
engines: {node: '>=0.10.0'}
1636
+
1637
+
outdent@0.5.0:
1638
+
resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==}
1639
+
1640
+
p-filter@2.1.0:
1641
+
resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==}
1642
+
engines: {node: '>=8'}
1643
+
1644
+
p-limit@2.3.0:
1645
+
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
1646
+
engines: {node: '>=6'}
1647
+
1384
1648
p-limit@6.2.0:
1385
1649
resolution: {integrity: sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==}
1386
1650
engines: {node: '>=18'}
1387
1651
1652
+
p-locate@4.1.0:
1653
+
resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
1654
+
engines: {node: '>=8'}
1655
+
1656
+
p-map@2.1.0:
1657
+
resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
1658
+
engines: {node: '>=6'}
1659
+
1388
1660
p-queue@8.1.0:
1389
1661
resolution: {integrity: sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw==}
1390
1662
engines: {node: '>=18'}
···
1393
1665
resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==}
1394
1666
engines: {node: '>=14.16'}
1395
1667
1668
+
p-try@2.2.0:
1669
+
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
1670
+
engines: {node: '>=6'}
1671
+
1396
1672
package-json-from-dist@1.0.1:
1397
1673
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
1674
+
1675
+
package-manager-detector@0.2.11:
1676
+
resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==}
1398
1677
1399
1678
package-manager-detector@1.3.0:
1400
1679
resolution: {integrity: sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ==}
···
1411
1690
parse5@7.3.0:
1412
1691
resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}
1413
1692
1414
-
path-browserify@1.0.1:
1415
-
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
1693
+
path-exists@4.0.0:
1694
+
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
1695
+
engines: {node: '>=8'}
1416
1696
1417
1697
path-key@3.1.1:
1418
1698
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
···
1421
1701
path-scurry@1.11.1:
1422
1702
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
1423
1703
engines: {node: '>=16 || 14 >=14.18'}
1704
+
1705
+
path-type@4.0.0:
1706
+
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
1707
+
engines: {node: '>=8'}
1424
1708
1425
1709
pathe@2.0.3:
1426
1710
resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
···
1440
1724
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
1441
1725
engines: {node: '>=12'}
1442
1726
1727
+
pify@4.0.1:
1728
+
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
1729
+
engines: {node: '>=6'}
1730
+
1443
1731
pirates@4.0.7:
1444
1732
resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==}
1445
1733
engines: {node: '>= 6'}
···
1469
1757
resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
1470
1758
engines: {node: ^10 || ^12 || >=14}
1471
1759
1760
+
prettier@2.8.8:
1761
+
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
1762
+
engines: {node: '>=10.13.0'}
1763
+
hasBin: true
1764
+
1472
1765
prettier@3.6.2:
1473
1766
resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==}
1474
1767
engines: {node: '>=14'}
···
1492
1785
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
1493
1786
engines: {node: '>=6'}
1494
1787
1788
+
quansync@0.2.10:
1789
+
resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==}
1790
+
1791
+
queue-microtask@1.2.3:
1792
+
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
1793
+
1495
1794
radix3@1.1.2:
1496
1795
resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==}
1796
+
1797
+
read-yaml-file@1.1.0:
1798
+
resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==}
1799
+
engines: {node: '>=6'}
1497
1800
1498
1801
readdirp@4.1.2:
1499
1802
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
···
1555
1858
retext@9.0.0:
1556
1859
resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==}
1557
1860
1861
+
reusify@1.1.0:
1862
+
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
1863
+
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
1864
+
1558
1865
rollup@4.46.2:
1559
1866
resolution: {integrity: sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==}
1560
1867
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
1561
1868
hasBin: true
1562
1869
1870
+
run-parallel@1.2.0:
1871
+
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
1872
+
1873
+
safer-buffer@2.1.2:
1874
+
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
1875
+
1563
1876
sanitize-html@2.17.0:
1564
1877
resolution: {integrity: sha512-dLAADUSS8rBwhaevT12yCezvioCA+bmUTPH/u57xKPT8d++voeYE6HeluA/bPbQ15TwDBG2ii+QZIEmYx8VdxA==}
1565
1878
···
1596
1909
sisteransi@1.0.5:
1597
1910
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
1598
1911
1599
-
smol-toml@1.4.1:
1600
-
resolution: {integrity: sha512-CxdwHXyYTONGHThDbq5XdwbFsuY4wlClRGejfE2NtwUtiHYsP1QtNsHb/hnj31jKYSchztJsaA8pSQoVzkfCFg==}
1912
+
slash@3.0.0:
1913
+
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
1914
+
engines: {node: '>=8'}
1915
+
1916
+
smol-toml@1.4.2:
1917
+
resolution: {integrity: sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==}
1601
1918
engines: {node: '>= 18'}
1602
1919
1603
1920
source-map-js@1.2.1:
···
1612
1929
space-separated-tokens@2.0.2:
1613
1930
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
1614
1931
1932
+
spawndamnit@3.0.1:
1933
+
resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==}
1934
+
1935
+
sprintf-js@1.0.3:
1936
+
resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==}
1937
+
1615
1938
stackback@0.0.2:
1616
1939
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
1617
1940
···
1641
1964
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
1642
1965
engines: {node: '>=12'}
1643
1966
1967
+
strip-bom@3.0.0:
1968
+
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
1969
+
engines: {node: '>=4'}
1970
+
1644
1971
strip-literal@3.0.0:
1645
1972
resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==}
1646
1973
···
1649
1976
engines: {node: '>=16 || 14 >=14.17'}
1650
1977
hasBin: true
1651
1978
1652
-
supports-color@7.2.0:
1653
-
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
1979
+
term-size@2.2.1:
1980
+
resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==}
1654
1981
engines: {node: '>=8'}
1655
1982
1656
1983
thenify-all@1.6.0:
···
1689
2016
resolution: {integrity: sha512-AldGGlDP0PNgwppe2quAvuBl18UcjuNtOnDuUkqhd6ipPqrYYBt3aTxK1QTsBVknk97lS2JcafWMghjGWFtunw==}
1690
2017
hasBin: true
1691
2018
2019
+
tmp@0.0.33:
2020
+
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
2021
+
engines: {node: '>=0.6.0'}
2022
+
2023
+
to-regex-range@5.0.1:
2024
+
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
2025
+
engines: {node: '>=8.0'}
2026
+
1692
2027
tr46@0.0.3:
1693
2028
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
1694
2029
···
1707
2042
1708
2043
ts-interface-checker@0.1.13:
1709
2044
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
1710
-
1711
-
ts-morph@24.0.0:
1712
-
resolution: {integrity: sha512-2OAOg/Ob5yx9Et7ZX4CvTCc0UFoZHwLEJ+dpDPSUi5TgwwlTlX47w+iFRrEwzUZwYACjq83cgjS/Da50Ga37uw==}
1713
2045
1714
2046
tsconfck@3.1.6:
1715
2047
resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==}
···
1806
2138
unist-util-visit@5.0.0:
1807
2139
resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==}
1808
2140
2141
+
universalify@0.1.2:
2142
+
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
2143
+
engines: {node: '>= 4.0.0'}
2144
+
1809
2145
unstorage@1.16.1:
1810
2146
resolution: {integrity: sha512-gdpZ3guLDhz+zWIlYP1UwQ259tG5T5vYRzDaHMkQ1bBY1SQPutvZnrRjTFaWUUpseErJIgAZS51h6NOcZVZiqQ==}
1811
2147
peerDependencies:
···
1919
2255
yaml:
1920
2256
optional: true
1921
2257
1922
-
vite@7.0.6:
1923
-
resolution: {integrity: sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==}
2258
+
vite@7.1.1:
2259
+
resolution: {integrity: sha512-yJ+Mp7OyV+4S+afWo+QyoL9jFWD11QFH0i5i7JypnfTcA1rmgxCbiA8WwAICDEtZ1Z1hzrVhN8R8rGTqkTY8ZQ==}
1924
2260
engines: {node: ^20.19.0 || >=22.12.0}
1925
2261
hasBin: true
1926
2262
peerDependencies:
···
2047
2383
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
2048
2384
engines: {node: '>=12'}
2049
2385
2050
-
yesno@0.4.0:
2051
-
resolution: {integrity: sha512-tdBxmHvbXPBKYIg81bMCB7bVeDmHkRzk5rVJyYYXurwKkHq/MCd8rz4HSJUP7hW0H2NlXiq8IFiWvYKEHhlotA==}
2052
-
2053
2386
yocto-queue@1.2.1:
2054
2387
resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==}
2055
2388
engines: {node: '>=12.20'}
···
2102
2435
remark-rehype: 11.1.2
2103
2436
remark-smartypants: 3.0.2
2104
2437
shiki: 3.9.2
2105
-
smol-toml: 1.4.1
2438
+
smol-toml: 1.4.2
2106
2439
unified: 11.0.5
2107
2440
unist-util-remove-position: 5.0.0
2108
2441
unist-util-visit: 5.0.0
···
2127
2460
transitivePeerDependencies:
2128
2461
- supports-color
2129
2462
2130
-
'@atproto/api@0.16.1':
2463
+
'@atcute/atproto@3.1.1':
2464
+
dependencies:
2465
+
'@atcute/lexicons': 1.1.0
2466
+
2467
+
'@atcute/client@4.0.3':
2468
+
dependencies:
2469
+
'@atcute/identity': 1.0.3
2470
+
'@atcute/lexicons': 1.1.0
2471
+
2472
+
'@atcute/identity@1.0.3':
2473
+
dependencies:
2474
+
'@atcute/lexicons': 1.1.0
2475
+
'@badrap/valita': 0.4.6
2476
+
2477
+
'@atcute/lex-cli@2.1.1':
2478
+
dependencies:
2479
+
'@atcute/lexicon-doc': 1.0.3
2480
+
'@badrap/valita': 0.4.6
2481
+
'@externdefs/collider': 0.3.0(@badrap/valita@0.4.6)
2482
+
picocolors: 1.1.1
2483
+
prettier: 3.6.2
2484
+
2485
+
'@atcute/lexicon-doc@1.0.3':
2486
+
dependencies:
2487
+
'@badrap/valita': 0.4.6
2488
+
2489
+
'@atcute/lexicons@1.1.0':
2490
+
dependencies:
2491
+
esm-env: 1.2.2
2492
+
2493
+
'@atproto/api@0.16.2':
2131
2494
dependencies:
2132
2495
'@atproto/common-web': 0.4.2
2133
2496
'@atproto/lexicon': 0.4.12
···
2145
2508
uint8arrays: 3.0.0
2146
2509
zod: 3.25.76
2147
2510
2148
-
'@atproto/did@0.1.5':
2149
-
dependencies:
2150
-
zod: 3.25.76
2151
-
2152
-
'@atproto/lex-cli@0.9.1':
2153
-
dependencies:
2154
-
'@atproto/lexicon': 0.4.12
2155
-
'@atproto/syntax': 0.4.0
2156
-
chalk: 4.1.2
2157
-
commander: 9.5.0
2158
-
prettier: 3.6.2
2159
-
ts-morph: 24.0.0
2160
-
yesno: 0.4.0
2161
-
zod: 3.25.76
2162
-
2163
2511
'@atproto/lexicon@0.4.12':
2164
2512
dependencies:
2165
2513
'@atproto/common-web': 0.4.2
···
2183
2531
dependencies:
2184
2532
'@babel/types': 7.28.2
2185
2533
2534
+
'@babel/runtime@7.28.2': {}
2535
+
2186
2536
'@babel/types@7.28.2':
2187
2537
dependencies:
2188
2538
'@babel/helper-string-parser': 7.27.1
2189
2539
'@babel/helper-validator-identifier': 7.27.1
2540
+
2541
+
'@badrap/valita@0.4.6': {}
2190
2542
2191
2543
'@biomejs/biome@2.1.3':
2192
2544
optionalDependencies:
···
2231
2583
transitivePeerDependencies:
2232
2584
- encoding
2233
2585
2586
+
'@changesets/apply-release-plan@7.0.12':
2587
+
dependencies:
2588
+
'@changesets/config': 3.1.1
2589
+
'@changesets/get-version-range-type': 0.4.0
2590
+
'@changesets/git': 3.0.4
2591
+
'@changesets/should-skip-package': 0.1.2
2592
+
'@changesets/types': 6.1.0
2593
+
'@manypkg/get-packages': 1.1.3
2594
+
detect-indent: 6.1.0
2595
+
fs-extra: 7.0.1
2596
+
lodash.startcase: 4.4.0
2597
+
outdent: 0.5.0
2598
+
prettier: 2.8.8
2599
+
resolve-from: 5.0.0
2600
+
semver: 7.7.2
2601
+
2602
+
'@changesets/assemble-release-plan@6.0.9':
2603
+
dependencies:
2604
+
'@changesets/errors': 0.2.0
2605
+
'@changesets/get-dependents-graph': 2.1.3
2606
+
'@changesets/should-skip-package': 0.1.2
2607
+
'@changesets/types': 6.1.0
2608
+
'@manypkg/get-packages': 1.1.3
2609
+
semver: 7.7.2
2610
+
2611
+
'@changesets/changelog-git@0.2.1':
2612
+
dependencies:
2613
+
'@changesets/types': 6.1.0
2614
+
2615
+
'@changesets/cli@2.29.5':
2616
+
dependencies:
2617
+
'@changesets/apply-release-plan': 7.0.12
2618
+
'@changesets/assemble-release-plan': 6.0.9
2619
+
'@changesets/changelog-git': 0.2.1
2620
+
'@changesets/config': 3.1.1
2621
+
'@changesets/errors': 0.2.0
2622
+
'@changesets/get-dependents-graph': 2.1.3
2623
+
'@changesets/get-release-plan': 4.0.13
2624
+
'@changesets/git': 3.0.4
2625
+
'@changesets/logger': 0.1.1
2626
+
'@changesets/pre': 2.0.2
2627
+
'@changesets/read': 0.6.5
2628
+
'@changesets/should-skip-package': 0.1.2
2629
+
'@changesets/types': 6.1.0
2630
+
'@changesets/write': 0.4.0
2631
+
'@manypkg/get-packages': 1.1.3
2632
+
ansi-colors: 4.1.3
2633
+
ci-info: 3.9.0
2634
+
enquirer: 2.4.1
2635
+
external-editor: 3.1.0
2636
+
fs-extra: 7.0.1
2637
+
mri: 1.2.0
2638
+
p-limit: 2.3.0
2639
+
package-manager-detector: 0.2.11
2640
+
picocolors: 1.1.1
2641
+
resolve-from: 5.0.0
2642
+
semver: 7.7.2
2643
+
spawndamnit: 3.0.1
2644
+
term-size: 2.2.1
2645
+
2646
+
'@changesets/config@3.1.1':
2647
+
dependencies:
2648
+
'@changesets/errors': 0.2.0
2649
+
'@changesets/get-dependents-graph': 2.1.3
2650
+
'@changesets/logger': 0.1.1
2651
+
'@changesets/types': 6.1.0
2652
+
'@manypkg/get-packages': 1.1.3
2653
+
fs-extra: 7.0.1
2654
+
micromatch: 4.0.8
2655
+
2656
+
'@changesets/errors@0.2.0':
2657
+
dependencies:
2658
+
extendable-error: 0.1.7
2659
+
2660
+
'@changesets/get-dependents-graph@2.1.3':
2661
+
dependencies:
2662
+
'@changesets/types': 6.1.0
2663
+
'@manypkg/get-packages': 1.1.3
2664
+
picocolors: 1.1.1
2665
+
semver: 7.7.2
2666
+
2667
+
'@changesets/get-release-plan@4.0.13':
2668
+
dependencies:
2669
+
'@changesets/assemble-release-plan': 6.0.9
2670
+
'@changesets/config': 3.1.1
2671
+
'@changesets/pre': 2.0.2
2672
+
'@changesets/read': 0.6.5
2673
+
'@changesets/types': 6.1.0
2674
+
'@manypkg/get-packages': 1.1.3
2675
+
2676
+
'@changesets/get-version-range-type@0.4.0': {}
2677
+
2678
+
'@changesets/git@3.0.4':
2679
+
dependencies:
2680
+
'@changesets/errors': 0.2.0
2681
+
'@manypkg/get-packages': 1.1.3
2682
+
is-subdir: 1.2.0
2683
+
micromatch: 4.0.8
2684
+
spawndamnit: 3.0.1
2685
+
2686
+
'@changesets/logger@0.1.1':
2687
+
dependencies:
2688
+
picocolors: 1.1.1
2689
+
2690
+
'@changesets/parse@0.4.1':
2691
+
dependencies:
2692
+
'@changesets/types': 6.1.0
2693
+
js-yaml: 3.14.1
2694
+
2695
+
'@changesets/pre@2.0.2':
2696
+
dependencies:
2697
+
'@changesets/errors': 0.2.0
2698
+
'@changesets/types': 6.1.0
2699
+
'@manypkg/get-packages': 1.1.3
2700
+
fs-extra: 7.0.1
2701
+
2702
+
'@changesets/read@0.6.5':
2703
+
dependencies:
2704
+
'@changesets/git': 3.0.4
2705
+
'@changesets/logger': 0.1.1
2706
+
'@changesets/parse': 0.4.1
2707
+
'@changesets/types': 6.1.0
2708
+
fs-extra: 7.0.1
2709
+
p-filter: 2.1.0
2710
+
picocolors: 1.1.1
2711
+
2712
+
'@changesets/should-skip-package@0.1.2':
2713
+
dependencies:
2714
+
'@changesets/types': 6.1.0
2715
+
'@manypkg/get-packages': 1.1.3
2716
+
2717
+
'@changesets/types@4.1.0': {}
2718
+
2719
+
'@changesets/types@6.1.0': {}
2720
+
2721
+
'@changesets/write@0.4.0':
2722
+
dependencies:
2723
+
'@changesets/types': 6.1.0
2724
+
fs-extra: 7.0.1
2725
+
human-id: 4.1.1
2726
+
prettier: 2.8.8
2727
+
2234
2728
'@emnapi/runtime@1.4.5':
2235
2729
dependencies:
2236
2730
tslib: 2.8.1
···
2313
2807
2314
2808
'@esbuild/win32-x64@0.25.8':
2315
2809
optional: true
2810
+
2811
+
'@externdefs/collider@0.3.0(@badrap/valita@0.4.6)':
2812
+
dependencies:
2813
+
'@badrap/valita': 0.4.6
2316
2814
2317
2815
'@img/sharp-darwin-arm64@0.33.5':
2318
2816
optionalDependencies:
···
2412
2910
'@jridgewell/resolve-uri': 3.1.2
2413
2911
'@jridgewell/sourcemap-codec': 1.5.4
2414
2912
2913
+
'@manypkg/find-root@1.1.0':
2914
+
dependencies:
2915
+
'@babel/runtime': 7.28.2
2916
+
'@types/node': 12.20.55
2917
+
find-up: 4.1.0
2918
+
fs-extra: 8.1.0
2919
+
2920
+
'@manypkg/get-packages@1.1.3':
2921
+
dependencies:
2922
+
'@babel/runtime': 7.28.2
2923
+
'@changesets/types': 4.1.0
2924
+
'@manypkg/find-root': 1.1.0
2925
+
fs-extra: 8.1.0
2926
+
globby: 11.1.0
2927
+
read-yaml-file: 1.1.0
2928
+
2929
+
'@nodelib/fs.scandir@2.1.5':
2930
+
dependencies:
2931
+
'@nodelib/fs.stat': 2.0.5
2932
+
run-parallel: 1.2.0
2933
+
2934
+
'@nodelib/fs.stat@2.0.5': {}
2935
+
2936
+
'@nodelib/fs.walk@1.2.8':
2937
+
dependencies:
2938
+
'@nodelib/fs.scandir': 2.1.5
2939
+
fastq: 1.19.1
2940
+
2415
2941
'@oslojs/encoding@1.1.0': {}
2416
2942
2417
2943
'@pkgjs/parseargs@0.11.0':
···
2522
3048
dependencies:
2523
3049
tslib: 2.8.1
2524
3050
2525
-
'@ts-morph/common@0.25.0':
3051
+
'@types/bun@1.2.19(@types/react@19.1.9)':
2526
3052
dependencies:
2527
-
minimatch: 9.0.5
2528
-
path-browserify: 1.0.1
2529
-
tinyglobby: 0.2.14
3053
+
bun-types: 1.2.19(@types/react@19.1.9)
3054
+
transitivePeerDependencies:
3055
+
- '@types/react'
2530
3056
2531
3057
'@types/chai@5.2.2':
2532
3058
dependencies:
···
2542
3068
2543
3069
'@types/fontkit@2.0.8':
2544
3070
dependencies:
2545
-
'@types/node': 24.2.0
3071
+
'@types/node': 24.2.1
2546
3072
2547
3073
'@types/hast@3.0.4':
2548
3074
dependencies:
···
2558
3084
dependencies:
2559
3085
'@types/unist': 3.0.3
2560
3086
2561
-
'@types/node@24.2.0':
3087
+
'@types/node@12.20.55': {}
3088
+
3089
+
'@types/node@24.2.1':
2562
3090
dependencies:
2563
3091
undici-types: 7.10.0
3092
+
3093
+
'@types/react@19.1.9':
3094
+
dependencies:
3095
+
csstype: 3.1.3
2564
3096
2565
3097
'@types/sanitize-html@2.16.0':
2566
3098
dependencies:
···
2578
3110
chai: 5.2.1
2579
3111
tinyrainbow: 2.0.0
2580
3112
2581
-
'@vitest/mocker@3.2.4(vite@7.0.6(@types/node@24.2.0))':
3113
+
'@vitest/mocker@3.2.4(vite@7.1.1(@types/node@24.2.1))':
2582
3114
dependencies:
2583
3115
'@vitest/spy': 3.2.4
2584
3116
estree-walker: 3.0.3
2585
3117
magic-string: 0.30.17
2586
3118
optionalDependencies:
2587
-
vite: 7.0.6(@types/node@24.2.0)
3119
+
vite: 7.1.1(@types/node@24.2.1)
2588
3120
2589
3121
'@vitest/pretty-format@3.2.4':
2590
3122
dependencies:
···
2618
3150
dependencies:
2619
3151
string-width: 4.2.3
2620
3152
3153
+
ansi-colors@4.1.3: {}
3154
+
2621
3155
ansi-regex@5.0.1: {}
2622
3156
2623
3157
ansi-regex@6.1.0: {}
···
2635
3169
normalize-path: 3.0.0
2636
3170
picomatch: 2.3.1
2637
3171
3172
+
argparse@1.0.10:
3173
+
dependencies:
3174
+
sprintf-js: 1.0.3
3175
+
2638
3176
argparse@2.0.1: {}
2639
3177
2640
3178
aria-query@5.3.2: {}
2641
3179
2642
3180
array-iterate@2.0.1: {}
2643
3181
3182
+
array-union@2.1.0: {}
3183
+
2644
3184
assertion-error@2.0.1: {}
2645
3185
2646
-
astro@5.12.8(@types/node@24.2.0)(rollup@4.46.2)(typescript@5.9.2):
3186
+
astro@5.12.9(@types/node@24.2.1)(rollup@4.46.2)(typescript@5.9.2):
2647
3187
dependencies:
2648
3188
'@astrojs/compiler': 2.12.2
2649
3189
'@astrojs/internal-helpers': 0.7.1
···
2690
3230
rehype: 13.0.2
2691
3231
semver: 7.7.2
2692
3232
shiki: 3.9.2
2693
-
smol-toml: 1.4.1
3233
+
smol-toml: 1.4.2
2694
3234
tinyexec: 0.3.2
2695
3235
tinyglobby: 0.2.14
2696
3236
tsconfck: 3.1.6(typescript@5.9.2)
···
2699
3239
unist-util-visit: 5.0.0
2700
3240
unstorage: 1.16.1
2701
3241
vfile: 6.0.3
2702
-
vite: 6.3.5(@types/node@24.2.0)
2703
-
vitefu: 1.1.1(vite@6.3.5(@types/node@24.2.0))
3242
+
vite: 6.3.5(@types/node@24.2.1)
3243
+
vitefu: 1.1.1(vite@6.3.5(@types/node@24.2.1))
2704
3244
xxhash-wasm: 1.1.0
2705
3245
yargs-parser: 21.1.1
2706
3246
yocto-spinner: 0.2.3
···
2756
3296
2757
3297
base64-js@1.5.1: {}
2758
3298
3299
+
better-path-resolve@1.0.0:
3300
+
dependencies:
3301
+
is-windows: 1.0.2
3302
+
2759
3303
blob-to-buffer@1.2.9: {}
2760
3304
2761
3305
boxen@8.0.1:
···
2772
3316
brace-expansion@2.0.2:
2773
3317
dependencies:
2774
3318
balanced-match: 1.0.2
3319
+
3320
+
braces@3.0.3:
3321
+
dependencies:
3322
+
fill-range: 7.1.1
2775
3323
2776
3324
brotli@1.3.3:
2777
3325
dependencies:
2778
3326
base64-js: 1.5.1
2779
3327
3328
+
bun-types@1.2.19(@types/react@19.1.9):
3329
+
dependencies:
3330
+
'@types/node': 24.2.1
3331
+
'@types/react': 19.1.9
3332
+
2780
3333
bundle-require@5.1.0(esbuild@0.25.8):
2781
3334
dependencies:
2782
3335
esbuild: 0.25.8
···
2796
3349
loupe: 3.2.0
2797
3350
pathval: 2.0.1
2798
3351
2799
-
chalk@4.1.2:
2800
-
dependencies:
2801
-
ansi-styles: 4.3.0
2802
-
supports-color: 7.2.0
2803
-
2804
3352
chalk@5.5.0: {}
2805
3353
2806
3354
character-entities-html4@2.1.0: {}
···
2809
3357
2810
3358
character-entities@2.0.2: {}
2811
3359
3360
+
chardet@0.7.0: {}
3361
+
2812
3362
check-error@2.1.1: {}
2813
3363
2814
3364
chokidar@4.0.3:
2815
3365
dependencies:
2816
3366
readdirp: 4.1.2
3367
+
3368
+
ci-info@3.9.0: {}
2817
3369
2818
3370
ci-info@4.3.0: {}
2819
3371
···
2823
3375
2824
3376
clsx@2.1.1: {}
2825
3377
2826
-
code-block-writer@13.0.3: {}
2827
-
2828
3378
color-convert@2.0.1:
2829
3379
dependencies:
2830
3380
color-name: 1.1.4
···
2847
3397
2848
3398
commander@4.1.1: {}
2849
3399
2850
-
commander@9.5.0: {}
3400
+
commander@8.3.0: {}
2851
3401
2852
3402
common-ancestor-path@1.0.1: {}
2853
3403
···
2882
3432
2883
3433
cssesc@3.0.0: {}
2884
3434
3435
+
csstype@3.1.3: {}
3436
+
2885
3437
debug@4.4.1:
2886
3438
dependencies:
2887
3439
ms: 2.1.3
···
2900
3452
2901
3453
destr@2.0.5: {}
2902
3454
3455
+
detect-indent@6.1.0: {}
3456
+
2903
3457
detect-libc@2.0.4:
2904
3458
optional: true
2905
3459
···
2917
3471
2918
3472
diff@5.2.0: {}
2919
3473
3474
+
dir-glob@3.0.1:
3475
+
dependencies:
3476
+
path-type: 4.0.0
3477
+
2920
3478
dlv@1.1.3: {}
2921
3479
2922
3480
dom-serializer@2.0.0:
···
2946
3504
emoji-regex@8.0.0: {}
2947
3505
2948
3506
emoji-regex@9.2.2: {}
3507
+
3508
+
enquirer@2.4.1:
3509
+
dependencies:
3510
+
ansi-colors: 4.1.3
3511
+
strip-ansi: 6.0.1
2949
3512
2950
3513
entities@4.5.0: {}
2951
3514
···
2986
3549
2987
3550
escape-string-regexp@5.0.0: {}
2988
3551
3552
+
esm-env@1.2.2: {}
3553
+
3554
+
esprima@4.0.1: {}
3555
+
2989
3556
estree-walker@2.0.2: {}
2990
3557
2991
3558
estree-walker@3.0.3:
···
2998
3565
2999
3566
extend@3.0.2: {}
3000
3567
3568
+
extendable-error@0.1.7: {}
3569
+
3570
+
external-editor@3.1.0:
3571
+
dependencies:
3572
+
chardet: 0.7.0
3573
+
iconv-lite: 0.4.24
3574
+
tmp: 0.0.33
3575
+
3001
3576
fast-deep-equal@3.1.3: {}
3577
+
3578
+
fast-glob@3.3.3:
3579
+
dependencies:
3580
+
'@nodelib/fs.stat': 2.0.5
3581
+
'@nodelib/fs.walk': 1.2.8
3582
+
glob-parent: 5.1.2
3583
+
merge2: 1.4.1
3584
+
micromatch: 4.0.8
3585
+
3586
+
fastq@1.19.1:
3587
+
dependencies:
3588
+
reusify: 1.1.0
3002
3589
3003
3590
fdir@6.4.6(picomatch@4.0.3):
3004
3591
optionalDependencies:
3005
3592
picomatch: 4.0.3
3006
3593
3594
+
fill-range@7.1.1:
3595
+
dependencies:
3596
+
to-regex-range: 5.0.1
3597
+
3598
+
find-up@4.1.0:
3599
+
dependencies:
3600
+
locate-path: 5.0.0
3601
+
path-exists: 4.0.0
3602
+
3007
3603
fix-dts-default-cjs-exports@1.0.1:
3008
3604
dependencies:
3009
3605
magic-string: 0.30.17
···
3034
3630
cross-spawn: 7.0.6
3035
3631
signal-exit: 4.1.0
3036
3632
3633
+
fs-extra@7.0.1:
3634
+
dependencies:
3635
+
graceful-fs: 4.2.11
3636
+
jsonfile: 4.0.0
3637
+
universalify: 0.1.2
3638
+
3639
+
fs-extra@8.1.0:
3640
+
dependencies:
3641
+
graceful-fs: 4.2.11
3642
+
jsonfile: 4.0.0
3643
+
universalify: 0.1.2
3644
+
3037
3645
fsevents@2.3.3:
3038
3646
optional: true
3039
3647
···
3041
3649
3042
3650
github-slugger@2.0.0: {}
3043
3651
3652
+
glob-parent@5.1.2:
3653
+
dependencies:
3654
+
is-glob: 4.0.3
3655
+
3044
3656
glob@10.4.5:
3045
3657
dependencies:
3046
3658
foreground-child: 3.3.1
···
3050
3662
package-json-from-dist: 1.0.1
3051
3663
path-scurry: 1.11.1
3052
3664
3665
+
globby@11.1.0:
3666
+
dependencies:
3667
+
array-union: 2.1.0
3668
+
dir-glob: 3.0.1
3669
+
fast-glob: 3.3.3
3670
+
ignore: 5.3.2
3671
+
merge2: 1.4.1
3672
+
slash: 3.0.0
3673
+
3674
+
graceful-fs@4.2.11: {}
3675
+
3053
3676
graphemer@1.4.0: {}
3054
3677
3055
3678
h3@1.15.4:
···
3063
3686
radix3: 1.1.2
3064
3687
ufo: 1.6.1
3065
3688
uncrypto: 0.1.3
3066
-
3067
-
has-flag@4.0.0: {}
3068
3689
3069
3690
hast-util-from-html@2.0.3:
3070
3691
dependencies:
···
3165
3786
entities: 4.5.0
3166
3787
3167
3788
http-cache-semantics@4.2.0: {}
3789
+
3790
+
human-id@4.1.1: {}
3791
+
3792
+
iconv-lite@0.4.24:
3793
+
dependencies:
3794
+
safer-buffer: 2.1.2
3795
+
3796
+
ignore@5.3.2: {}
3168
3797
3169
3798
import-meta-resolve@4.1.0: {}
3170
3799
···
3175
3804
3176
3805
is-docker@3.0.0: {}
3177
3806
3807
+
is-extglob@2.1.1: {}
3808
+
3178
3809
is-fullwidth-code-point@3.0.0: {}
3179
3810
3811
+
is-glob@4.0.3:
3812
+
dependencies:
3813
+
is-extglob: 2.1.1
3814
+
3180
3815
is-inside-container@1.0.0:
3181
3816
dependencies:
3182
3817
is-docker: 3.0.0
3818
+
3819
+
is-number@7.0.0: {}
3183
3820
3184
3821
is-plain-obj@4.1.0: {}
3185
3822
3186
3823
is-plain-object@5.0.0: {}
3187
3824
3825
+
is-subdir@1.2.0:
3826
+
dependencies:
3827
+
better-path-resolve: 1.0.0
3828
+
3829
+
is-windows@1.0.2: {}
3830
+
3188
3831
is-wsl@3.1.0:
3189
3832
dependencies:
3190
3833
is-inside-container: 1.0.0
···
3203
3846
3204
3847
js-tokens@9.0.1: {}
3205
3848
3849
+
js-yaml@3.14.1:
3850
+
dependencies:
3851
+
argparse: 1.0.10
3852
+
esprima: 4.0.1
3853
+
3206
3854
js-yaml@4.1.0:
3207
3855
dependencies:
3208
3856
argparse: 2.0.1
3209
3857
3858
+
jsonfile@4.0.0:
3859
+
optionalDependencies:
3860
+
graceful-fs: 4.2.11
3861
+
3862
+
katex@0.16.22:
3863
+
dependencies:
3864
+
commander: 8.3.0
3865
+
3210
3866
kleur@3.0.3: {}
3211
3867
3212
3868
kleur@4.1.5: {}
···
3216
3872
lines-and-columns@1.2.4: {}
3217
3873
3218
3874
load-tsconfig@0.2.5: {}
3875
+
3876
+
locate-path@5.0.0:
3877
+
dependencies:
3878
+
p-locate: 4.1.0
3219
3879
3220
3880
lodash.sortby@4.7.0: {}
3221
3881
3882
+
lodash.startcase@4.4.0: {}
3883
+
3222
3884
longest-streak@3.1.0: {}
3223
3885
3224
3886
loupe@3.2.0: {}
···
3358
4020
'@types/mdast': 4.0.4
3359
4021
3360
4022
mdn-data@2.12.2: {}
4023
+
4024
+
merge2@1.4.1: {}
3361
4025
3362
4026
micromark-core-commonmark@2.0.3:
3363
4027
dependencies:
···
3550
4214
transitivePeerDependencies:
3551
4215
- supports-color
3552
4216
4217
+
micromatch@4.0.8:
4218
+
dependencies:
4219
+
braces: 3.0.3
4220
+
picomatch: 2.3.1
4221
+
3553
4222
minimatch@9.0.5:
3554
4223
dependencies:
3555
4224
brace-expansion: 2.0.2
···
3563
4232
pkg-types: 1.3.1
3564
4233
ufo: 1.6.1
3565
4234
4235
+
mri@1.2.0: {}
4236
+
3566
4237
mrmime@2.0.1: {}
3567
4238
3568
4239
ms@2.1.3: {}
3569
-
3570
-
multiformats@13.4.0: {}
3571
4240
3572
4241
multiformats@9.9.0: {}
3573
4242
···
3613
4282
regex: 6.0.1
3614
4283
regex-recursion: 6.0.2
3615
4284
4285
+
os-tmpdir@1.0.2: {}
4286
+
4287
+
outdent@0.5.0: {}
4288
+
4289
+
p-filter@2.1.0:
4290
+
dependencies:
4291
+
p-map: 2.1.0
4292
+
4293
+
p-limit@2.3.0:
4294
+
dependencies:
4295
+
p-try: 2.2.0
4296
+
3616
4297
p-limit@6.2.0:
3617
4298
dependencies:
3618
4299
yocto-queue: 1.2.1
4300
+
4301
+
p-locate@4.1.0:
4302
+
dependencies:
4303
+
p-limit: 2.3.0
4304
+
4305
+
p-map@2.1.0: {}
3619
4306
3620
4307
p-queue@8.1.0:
3621
4308
dependencies:
···
3624
4311
3625
4312
p-timeout@6.1.4: {}
3626
4313
4314
+
p-try@2.2.0: {}
4315
+
3627
4316
package-json-from-dist@1.0.1: {}
4317
+
4318
+
package-manager-detector@0.2.11:
4319
+
dependencies:
4320
+
quansync: 0.2.10
3628
4321
3629
4322
package-manager-detector@1.3.0: {}
3630
4323
···
3645
4338
dependencies:
3646
4339
entities: 6.0.1
3647
4340
3648
-
path-browserify@1.0.1: {}
4341
+
path-exists@4.0.0: {}
3649
4342
3650
4343
path-key@3.1.1: {}
3651
4344
···
3654
4347
lru-cache: 10.4.3
3655
4348
minipass: 7.1.2
3656
4349
4350
+
path-type@4.0.0: {}
4351
+
3657
4352
pathe@2.0.3: {}
3658
4353
3659
4354
pathval@2.0.1: {}
···
3663
4358
picomatch@2.3.1: {}
3664
4359
3665
4360
picomatch@4.0.3: {}
4361
+
4362
+
pify@4.0.1: {}
3666
4363
3667
4364
pirates@4.0.7: {}
3668
4365
···
3684
4381
picocolors: 1.1.1
3685
4382
source-map-js: 1.2.1
3686
4383
4384
+
prettier@2.8.8: {}
4385
+
3687
4386
prettier@3.6.2: {}
3688
4387
3689
4388
prismjs@1.30.0: {}
···
3699
4398
3700
4399
punycode@2.3.1: {}
3701
4400
4401
+
quansync@0.2.10: {}
4402
+
4403
+
queue-microtask@1.2.3: {}
4404
+
3702
4405
radix3@1.1.2: {}
4406
+
4407
+
read-yaml-file@1.1.0:
4408
+
dependencies:
4409
+
graceful-fs: 4.2.11
4410
+
js-yaml: 3.14.1
4411
+
pify: 4.0.1
4412
+
strip-bom: 3.0.0
3703
4413
3704
4414
readdirp@4.1.2: {}
3705
4415
···
3808
4518
retext-stringify: 4.0.0
3809
4519
unified: 11.0.5
3810
4520
4521
+
reusify@1.1.0: {}
4522
+
3811
4523
rollup@4.46.2:
3812
4524
dependencies:
3813
4525
'@types/estree': 1.0.8
···
3834
4546
'@rollup/rollup-win32-x64-msvc': 4.46.2
3835
4547
fsevents: 2.3.3
3836
4548
4549
+
run-parallel@1.2.0:
4550
+
dependencies:
4551
+
queue-microtask: 1.2.3
4552
+
4553
+
safer-buffer@2.1.2: {}
4554
+
3837
4555
sanitize-html@2.17.0:
3838
4556
dependencies:
3839
4557
deepmerge: 4.3.1
···
3900
4618
3901
4619
sisteransi@1.0.5: {}
3902
4620
3903
-
smol-toml@1.4.1: {}
4621
+
slash@3.0.0: {}
4622
+
4623
+
smol-toml@1.4.2: {}
3904
4624
3905
4625
source-map-js@1.2.1: {}
3906
4626
···
3910
4630
3911
4631
space-separated-tokens@2.0.2: {}
3912
4632
4633
+
spawndamnit@3.0.1:
4634
+
dependencies:
4635
+
cross-spawn: 7.0.6
4636
+
signal-exit: 4.1.0
4637
+
4638
+
sprintf-js@1.0.3: {}
4639
+
3913
4640
stackback@0.0.2: {}
3914
4641
3915
4642
std-env@3.9.0: {}
···
3945
4672
dependencies:
3946
4673
ansi-regex: 6.1.0
3947
4674
4675
+
strip-bom@3.0.0: {}
4676
+
3948
4677
strip-literal@3.0.0:
3949
4678
dependencies:
3950
4679
js-tokens: 9.0.1
···
3959
4688
pirates: 4.0.7
3960
4689
ts-interface-checker: 0.1.13
3961
4690
3962
-
supports-color@7.2.0:
3963
-
dependencies:
3964
-
has-flag: 4.0.0
4691
+
term-size@2.2.1: {}
3965
4692
3966
4693
thenify-all@1.6.0:
3967
4694
dependencies:
···
3990
4717
3991
4718
tlds@1.259.0: {}
3992
4719
4720
+
tmp@0.0.33:
4721
+
dependencies:
4722
+
os-tmpdir: 1.0.2
4723
+
4724
+
to-regex-range@5.0.1:
4725
+
dependencies:
4726
+
is-number: 7.0.0
4727
+
3993
4728
tr46@0.0.3: {}
3994
4729
3995
4730
tr46@1.0.1:
···
4004
4739
4005
4740
ts-interface-checker@0.1.13: {}
4006
4741
4007
-
ts-morph@24.0.0:
4008
-
dependencies:
4009
-
'@ts-morph/common': 0.25.0
4010
-
code-block-writer: 13.0.3
4011
-
4012
4742
tsconfck@3.1.6(typescript@5.9.2):
4013
4743
optionalDependencies:
4014
4744
typescript: 5.9.2
···
4127
4857
unist-util-is: 6.0.0
4128
4858
unist-util-visit-parents: 6.0.1
4129
4859
4860
+
universalify@0.1.2: {}
4861
+
4130
4862
unstorage@1.16.1:
4131
4863
dependencies:
4132
4864
anymatch: 3.1.3
···
4153
4885
'@types/unist': 3.0.3
4154
4886
vfile-message: 4.0.3
4155
4887
4156
-
vite-node@3.2.4(@types/node@24.2.0):
4888
+
vite-node@3.2.4(@types/node@24.2.1):
4157
4889
dependencies:
4158
4890
cac: 6.7.14
4159
4891
debug: 4.4.1
4160
4892
es-module-lexer: 1.7.0
4161
4893
pathe: 2.0.3
4162
-
vite: 7.0.6(@types/node@24.2.0)
4894
+
vite: 7.1.1(@types/node@24.2.1)
4163
4895
transitivePeerDependencies:
4164
4896
- '@types/node'
4165
4897
- jiti
···
4174
4906
- tsx
4175
4907
- yaml
4176
4908
4177
-
vite@6.3.5(@types/node@24.2.0):
4909
+
vite@6.3.5(@types/node@24.2.1):
4178
4910
dependencies:
4179
4911
esbuild: 0.25.8
4180
4912
fdir: 6.4.6(picomatch@4.0.3)
···
4183
4915
rollup: 4.46.2
4184
4916
tinyglobby: 0.2.14
4185
4917
optionalDependencies:
4186
-
'@types/node': 24.2.0
4918
+
'@types/node': 24.2.1
4187
4919
fsevents: 2.3.3
4188
4920
4189
-
vite@7.0.6(@types/node@24.2.0):
4921
+
vite@7.1.1(@types/node@24.2.1):
4190
4922
dependencies:
4191
4923
esbuild: 0.25.8
4192
4924
fdir: 6.4.6(picomatch@4.0.3)
···
4195
4927
rollup: 4.46.2
4196
4928
tinyglobby: 0.2.14
4197
4929
optionalDependencies:
4198
-
'@types/node': 24.2.0
4930
+
'@types/node': 24.2.1
4199
4931
fsevents: 2.3.3
4200
4932
4201
-
vitefu@1.1.1(vite@6.3.5(@types/node@24.2.0)):
4933
+
vitefu@1.1.1(vite@6.3.5(@types/node@24.2.1)):
4202
4934
optionalDependencies:
4203
-
vite: 6.3.5(@types/node@24.2.0)
4935
+
vite: 6.3.5(@types/node@24.2.1)
4204
4936
4205
-
vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.2.0):
4937
+
vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.2.1):
4206
4938
dependencies:
4207
4939
'@types/chai': 5.2.2
4208
4940
'@vitest/expect': 3.2.4
4209
-
'@vitest/mocker': 3.2.4(vite@7.0.6(@types/node@24.2.0))
4941
+
'@vitest/mocker': 3.2.4(vite@7.1.1(@types/node@24.2.1))
4210
4942
'@vitest/pretty-format': 3.2.4
4211
4943
'@vitest/runner': 3.2.4
4212
4944
'@vitest/snapshot': 3.2.4
···
4224
4956
tinyglobby: 0.2.14
4225
4957
tinypool: 1.1.1
4226
4958
tinyrainbow: 2.0.0
4227
-
vite: 7.0.6(@types/node@24.2.0)
4228
-
vite-node: 3.2.4(@types/node@24.2.0)
4959
+
vite: 7.1.1(@types/node@24.2.1)
4960
+
vite-node: 3.2.4(@types/node@24.2.1)
4229
4961
why-is-node-running: 2.3.0
4230
4962
optionalDependencies:
4231
4963
'@types/debug': 4.1.12
4232
-
'@types/node': 24.2.0
4964
+
'@types/node': 24.2.1
4233
4965
transitivePeerDependencies:
4234
4966
- jiti
4235
4967
- less
···
4297
5029
xxhash-wasm@1.1.0: {}
4298
5030
4299
5031
yargs-parser@21.1.1: {}
4300
-
4301
-
yesno@0.4.0: {}
4302
5032
4303
5033
yocto-queue@1.2.1: {}
4304
5034
-5
pnpm-workspace.yaml
-5
pnpm-workspace.yaml
-1
src/index.ts
-1
src/index.ts
···
1
-
export { leafletLiveLoader } from "./leaflet-live-loader.js";
-283
src/leaflet/lexicons/index.ts
-283
src/leaflet/lexicons/index.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import {
5
-
XrpcClient,
6
-
type FetchHandler,
7
-
type FetchHandlerOptions,
8
-
} from '@atproto/xrpc'
9
-
import { schemas } from './lexicons.js'
10
-
import { CID } from 'multiformats/cid'
11
-
import { type OmitKey, type Un$Typed } from './util.js'
12
-
import * as PubLeafletDocument from './types/pub/leaflet/document.js'
13
-
import * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js'
14
-
import * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js'
15
-
import * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js'
16
-
import * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js'
17
-
import * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js'
18
-
import * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js'
19
-
import * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js'
20
-
import * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js'
21
-
import * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js'
22
-
import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord.js'
23
-
import * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs.js'
24
-
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord.js'
25
-
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord.js'
26
-
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords.js'
27
-
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord.js'
28
-
import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js'
29
-
30
-
export * as PubLeafletDocument from './types/pub/leaflet/document.js'
31
-
export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js'
32
-
export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js'
33
-
export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js'
34
-
export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js'
35
-
export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js'
36
-
export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js'
37
-
export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js'
38
-
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js'
39
-
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js'
40
-
export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord.js'
41
-
export * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs.js'
42
-
export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord.js'
43
-
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord.js'
44
-
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords.js'
45
-
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord.js'
46
-
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js'
47
-
48
-
export const PUB_LEAFLET_PAGES = {
49
-
LinearDocumentTextAlignLeft: 'pub.leaflet.pages.linearDocument#textAlignLeft',
50
-
LinearDocumentTextAlignCenter:
51
-
'pub.leaflet.pages.linearDocument#textAlignCenter',
52
-
LinearDocumentTextAlignRight:
53
-
'pub.leaflet.pages.linearDocument#textAlignRight',
54
-
}
55
-
56
-
export class AtpBaseClient extends XrpcClient {
57
-
pub: PubNS
58
-
com: ComNS
59
-
60
-
constructor(options: FetchHandler | FetchHandlerOptions) {
61
-
super(options, schemas)
62
-
this.pub = new PubNS(this)
63
-
this.com = new ComNS(this)
64
-
}
65
-
66
-
/** @deprecated use `this` instead */
67
-
get xrpc(): XrpcClient {
68
-
return this
69
-
}
70
-
}
71
-
72
-
export class PubNS {
73
-
_client: XrpcClient
74
-
leaflet: PubLeafletNS
75
-
76
-
constructor(client: XrpcClient) {
77
-
this._client = client
78
-
this.leaflet = new PubLeafletNS(client)
79
-
}
80
-
}
81
-
82
-
export class PubLeafletNS {
83
-
_client: XrpcClient
84
-
document: PubLeafletDocumentRecord
85
-
blocks: PubLeafletBlocksNS
86
-
pages: PubLeafletPagesNS
87
-
richtext: PubLeafletRichtextNS
88
-
89
-
constructor(client: XrpcClient) {
90
-
this._client = client
91
-
this.blocks = new PubLeafletBlocksNS(client)
92
-
this.pages = new PubLeafletPagesNS(client)
93
-
this.richtext = new PubLeafletRichtextNS(client)
94
-
this.document = new PubLeafletDocumentRecord(client)
95
-
}
96
-
}
97
-
98
-
export class PubLeafletBlocksNS {
99
-
_client: XrpcClient
100
-
101
-
constructor(client: XrpcClient) {
102
-
this._client = client
103
-
}
104
-
}
105
-
106
-
export class PubLeafletPagesNS {
107
-
_client: XrpcClient
108
-
109
-
constructor(client: XrpcClient) {
110
-
this._client = client
111
-
}
112
-
}
113
-
114
-
export class PubLeafletRichtextNS {
115
-
_client: XrpcClient
116
-
117
-
constructor(client: XrpcClient) {
118
-
this._client = client
119
-
}
120
-
}
121
-
122
-
export class PubLeafletDocumentRecord {
123
-
_client: XrpcClient
124
-
125
-
constructor(client: XrpcClient) {
126
-
this._client = client
127
-
}
128
-
129
-
async list(
130
-
params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
131
-
): Promise<{
132
-
cursor?: string
133
-
records: { uri: string; value: PubLeafletDocument.Record }[]
134
-
}> {
135
-
const res = await this._client.call('com.atproto.repo.listRecords', {
136
-
collection: 'pub.leaflet.document',
137
-
...params,
138
-
})
139
-
return res.data
140
-
}
141
-
142
-
async get(
143
-
params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
144
-
): Promise<{ uri: string; cid: string; value: PubLeafletDocument.Record }> {
145
-
const res = await this._client.call('com.atproto.repo.getRecord', {
146
-
collection: 'pub.leaflet.document',
147
-
...params,
148
-
})
149
-
return res.data
150
-
}
151
-
152
-
async create(
153
-
params: OmitKey<
154
-
ComAtprotoRepoCreateRecord.InputSchema,
155
-
'collection' | 'record'
156
-
>,
157
-
record: Un$Typed<PubLeafletDocument.Record>,
158
-
headers?: Record<string, string>,
159
-
): Promise<{ uri: string; cid: string }> {
160
-
const collection = 'pub.leaflet.document'
161
-
const res = await this._client.call(
162
-
'com.atproto.repo.createRecord',
163
-
undefined,
164
-
{ collection, ...params, record: { ...record, $type: collection } },
165
-
{ encoding: 'application/json', headers },
166
-
)
167
-
return res.data
168
-
}
169
-
170
-
async put(
171
-
params: OmitKey<
172
-
ComAtprotoRepoPutRecord.InputSchema,
173
-
'collection' | 'record'
174
-
>,
175
-
record: Un$Typed<PubLeafletDocument.Record>,
176
-
headers?: Record<string, string>,
177
-
): Promise<{ uri: string; cid: string }> {
178
-
const collection = 'pub.leaflet.document'
179
-
const res = await this._client.call(
180
-
'com.atproto.repo.putRecord',
181
-
undefined,
182
-
{ collection, ...params, record: { ...record, $type: collection } },
183
-
{ encoding: 'application/json', headers },
184
-
)
185
-
return res.data
186
-
}
187
-
188
-
async delete(
189
-
params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
190
-
headers?: Record<string, string>,
191
-
): Promise<void> {
192
-
await this._client.call(
193
-
'com.atproto.repo.deleteRecord',
194
-
undefined,
195
-
{ collection: 'pub.leaflet.document', ...params },
196
-
{ headers },
197
-
)
198
-
}
199
-
}
200
-
201
-
export class ComNS {
202
-
_client: XrpcClient
203
-
atproto: ComAtprotoNS
204
-
205
-
constructor(client: XrpcClient) {
206
-
this._client = client
207
-
this.atproto = new ComAtprotoNS(client)
208
-
}
209
-
}
210
-
211
-
export class ComAtprotoNS {
212
-
_client: XrpcClient
213
-
repo: ComAtprotoRepoNS
214
-
215
-
constructor(client: XrpcClient) {
216
-
this._client = client
217
-
this.repo = new ComAtprotoRepoNS(client)
218
-
}
219
-
}
220
-
221
-
export class ComAtprotoRepoNS {
222
-
_client: XrpcClient
223
-
224
-
constructor(client: XrpcClient) {
225
-
this._client = client
226
-
}
227
-
228
-
createRecord(
229
-
data?: ComAtprotoRepoCreateRecord.InputSchema,
230
-
opts?: ComAtprotoRepoCreateRecord.CallOptions,
231
-
): Promise<ComAtprotoRepoCreateRecord.Response> {
232
-
return this._client
233
-
.call('com.atproto.repo.createRecord', opts?.qp, data, opts)
234
-
.catch((e) => {
235
-
throw ComAtprotoRepoCreateRecord.toKnownErr(e)
236
-
})
237
-
}
238
-
239
-
deleteRecord(
240
-
data?: ComAtprotoRepoDeleteRecord.InputSchema,
241
-
opts?: ComAtprotoRepoDeleteRecord.CallOptions,
242
-
): Promise<ComAtprotoRepoDeleteRecord.Response> {
243
-
return this._client
244
-
.call('com.atproto.repo.deleteRecord', opts?.qp, data, opts)
245
-
.catch((e) => {
246
-
throw ComAtprotoRepoDeleteRecord.toKnownErr(e)
247
-
})
248
-
}
249
-
250
-
getRecord(
251
-
params?: ComAtprotoRepoGetRecord.QueryParams,
252
-
opts?: ComAtprotoRepoGetRecord.CallOptions,
253
-
): Promise<ComAtprotoRepoGetRecord.Response> {
254
-
return this._client
255
-
.call('com.atproto.repo.getRecord', params, undefined, opts)
256
-
.catch((e) => {
257
-
throw ComAtprotoRepoGetRecord.toKnownErr(e)
258
-
})
259
-
}
260
-
261
-
listRecords(
262
-
params?: ComAtprotoRepoListRecords.QueryParams,
263
-
opts?: ComAtprotoRepoListRecords.CallOptions,
264
-
): Promise<ComAtprotoRepoListRecords.Response> {
265
-
return this._client.call(
266
-
'com.atproto.repo.listRecords',
267
-
params,
268
-
undefined,
269
-
opts,
270
-
)
271
-
}
272
-
273
-
putRecord(
274
-
data?: ComAtprotoRepoPutRecord.InputSchema,
275
-
opts?: ComAtprotoRepoPutRecord.CallOptions,
276
-
): Promise<ComAtprotoRepoPutRecord.Response> {
277
-
return this._client
278
-
.call('com.atproto.repo.putRecord', opts?.qp, data, opts)
279
-
.catch((e) => {
280
-
throw ComAtprotoRepoPutRecord.toKnownErr(e)
281
-
})
282
-
}
283
-
}
-895
src/leaflet/lexicons/lexicons.ts
-895
src/leaflet/lexicons/lexicons.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import {
5
-
type LexiconDoc,
6
-
Lexicons,
7
-
ValidationError,
8
-
type ValidationResult,
9
-
} from '@atproto/lexicon'
10
-
import { type $Typed, is$typed, maybe$typed } from './util.js'
11
-
12
-
export const schemaDict = {
13
-
PubLeafletDocument: {
14
-
lexicon: 1,
15
-
id: 'pub.leaflet.document',
16
-
revision: 1,
17
-
description: 'A lexicon for long form rich media documents',
18
-
defs: {
19
-
main: {
20
-
type: 'record',
21
-
key: 'tid',
22
-
description: 'Record containing a document',
23
-
record: {
24
-
type: 'object',
25
-
required: ['pages', 'author', 'title', 'publication'],
26
-
properties: {
27
-
title: {
28
-
type: 'string',
29
-
maxLength: 1280,
30
-
maxGraphemes: 128,
31
-
},
32
-
postRef: {
33
-
type: 'ref',
34
-
ref: 'lex:com.atproto.repo.strongRef',
35
-
},
36
-
description: {
37
-
type: 'string',
38
-
maxLength: 3000,
39
-
maxGraphemes: 300,
40
-
},
41
-
publishedAt: {
42
-
type: 'string',
43
-
format: 'datetime',
44
-
},
45
-
publication: {
46
-
type: 'string',
47
-
format: 'at-uri',
48
-
},
49
-
author: {
50
-
type: 'string',
51
-
format: 'at-identifier',
52
-
},
53
-
pages: {
54
-
type: 'array',
55
-
items: {
56
-
type: 'union',
57
-
refs: ['lex:pub.leaflet.pages.linearDocument'],
58
-
},
59
-
},
60
-
},
61
-
},
62
-
},
63
-
},
64
-
},
65
-
PubLeafletBlocksCode: {
66
-
lexicon: 1,
67
-
id: 'pub.leaflet.blocks.code',
68
-
defs: {
69
-
main: {
70
-
type: 'object',
71
-
required: ['plaintext'],
72
-
properties: {
73
-
plaintext: {
74
-
type: 'string',
75
-
},
76
-
language: {
77
-
type: 'string',
78
-
},
79
-
syntaxHighlightingTheme: {
80
-
type: 'string',
81
-
},
82
-
},
83
-
},
84
-
},
85
-
},
86
-
PubLeafletBlocksHeader: {
87
-
lexicon: 1,
88
-
id: 'pub.leaflet.blocks.header',
89
-
defs: {
90
-
main: {
91
-
type: 'object',
92
-
required: ['plaintext'],
93
-
properties: {
94
-
level: {
95
-
type: 'integer',
96
-
minimum: 1,
97
-
maximum: 6,
98
-
},
99
-
plaintext: {
100
-
type: 'string',
101
-
},
102
-
facets: {
103
-
type: 'array',
104
-
items: {
105
-
type: 'ref',
106
-
ref: 'lex:pub.leaflet.richtext.facet',
107
-
},
108
-
},
109
-
},
110
-
},
111
-
},
112
-
},
113
-
PubLeafletBlocksImage: {
114
-
lexicon: 1,
115
-
id: 'pub.leaflet.blocks.image',
116
-
defs: {
117
-
main: {
118
-
type: 'object',
119
-
required: ['image', 'aspectRatio'],
120
-
properties: {
121
-
image: {
122
-
type: 'blob',
123
-
accept: ['image/*'],
124
-
maxSize: 1000000,
125
-
},
126
-
alt: {
127
-
type: 'string',
128
-
description:
129
-
'Alt text description of the image, for accessibility.',
130
-
},
131
-
aspectRatio: {
132
-
type: 'ref',
133
-
ref: 'lex:pub.leaflet.blocks.image#aspectRatio',
134
-
},
135
-
},
136
-
},
137
-
aspectRatio: {
138
-
type: 'object',
139
-
required: ['width', 'height'],
140
-
properties: {
141
-
width: {
142
-
type: 'integer',
143
-
},
144
-
height: {
145
-
type: 'integer',
146
-
},
147
-
},
148
-
},
149
-
},
150
-
},
151
-
PubLeafletBlocksMath: {
152
-
lexicon: 1,
153
-
id: 'pub.leaflet.blocks.math',
154
-
defs: {
155
-
main: {
156
-
type: 'object',
157
-
required: ['tex'],
158
-
properties: {
159
-
tex: {
160
-
type: 'string',
161
-
},
162
-
},
163
-
},
164
-
},
165
-
},
166
-
PubLeafletBlocksText: {
167
-
lexicon: 1,
168
-
id: 'pub.leaflet.blocks.text',
169
-
defs: {
170
-
main: {
171
-
type: 'object',
172
-
required: ['plaintext'],
173
-
properties: {
174
-
plaintext: {
175
-
type: 'string',
176
-
},
177
-
facets: {
178
-
type: 'array',
179
-
items: {
180
-
type: 'ref',
181
-
ref: 'lex:pub.leaflet.richtext.facet',
182
-
},
183
-
},
184
-
},
185
-
},
186
-
},
187
-
},
188
-
PubLeafletBlocksUnorderedList: {
189
-
lexicon: 1,
190
-
id: 'pub.leaflet.blocks.unorderedList',
191
-
defs: {
192
-
main: {
193
-
type: 'object',
194
-
required: ['children'],
195
-
properties: {
196
-
children: {
197
-
type: 'array',
198
-
items: {
199
-
type: 'ref',
200
-
ref: 'lex:pub.leaflet.blocks.unorderedList#listItem',
201
-
},
202
-
},
203
-
},
204
-
},
205
-
listItem: {
206
-
type: 'object',
207
-
required: ['content'],
208
-
properties: {
209
-
content: {
210
-
type: 'union',
211
-
refs: [
212
-
'lex:pub.leaflet.blocks.text',
213
-
'lex:pub.leaflet.blocks.header',
214
-
'lex:pub.leaflet.blocks.image',
215
-
],
216
-
},
217
-
children: {
218
-
type: 'array',
219
-
items: {
220
-
type: 'ref',
221
-
ref: 'lex:pub.leaflet.blocks.unorderedList#listItem',
222
-
},
223
-
},
224
-
},
225
-
},
226
-
},
227
-
},
228
-
PubLeafletBlocksWebsite: {
229
-
lexicon: 1,
230
-
id: 'pub.leaflet.blocks.website',
231
-
defs: {
232
-
main: {
233
-
type: 'object',
234
-
required: ['src'],
235
-
properties: {
236
-
previewImage: {
237
-
type: 'blob',
238
-
accept: ['image/*'],
239
-
maxSize: 1000000,
240
-
},
241
-
title: {
242
-
type: 'string',
243
-
},
244
-
description: {
245
-
type: 'string',
246
-
},
247
-
src: {
248
-
type: 'string',
249
-
format: 'uri',
250
-
},
251
-
},
252
-
},
253
-
},
254
-
},
255
-
PubLeafletPagesLinearDocument: {
256
-
lexicon: 1,
257
-
id: 'pub.leaflet.pages.linearDocument',
258
-
defs: {
259
-
main: {
260
-
type: 'object',
261
-
properties: {
262
-
blocks: {
263
-
type: 'array',
264
-
items: {
265
-
type: 'ref',
266
-
ref: 'lex:pub.leaflet.pages.linearDocument#block',
267
-
},
268
-
},
269
-
},
270
-
},
271
-
block: {
272
-
type: 'object',
273
-
required: ['block'],
274
-
properties: {
275
-
block: {
276
-
type: 'union',
277
-
refs: [
278
-
'lex:pub.leaflet.blocks.text',
279
-
'lex:pub.leaflet.blocks.header',
280
-
'lex:pub.leaflet.blocks.image',
281
-
'lex:pub.leaflet.blocks.unorderedList',
282
-
'lex:pub.leaflet.blocks.website',
283
-
'lex:pub.leaflet.blocks.math',
284
-
'lex:pub.leaflet.blocks.code',
285
-
],
286
-
},
287
-
alignment: {
288
-
type: 'string',
289
-
knownValues: [
290
-
'lex:pub.leaflet.pages.linearDocument#textAlignLeft',
291
-
'lex:pub.leaflet.pages.linearDocument#textAlignCenter',
292
-
'lex:pub.leaflet.pages.linearDocument#textAlignRight',
293
-
],
294
-
},
295
-
},
296
-
},
297
-
textAlignLeft: {
298
-
type: 'token',
299
-
},
300
-
textAlignCenter: {
301
-
type: 'token',
302
-
},
303
-
textAlignRight: {
304
-
type: 'token',
305
-
},
306
-
},
307
-
},
308
-
PubLeafletRichtextFacet: {
309
-
lexicon: 1,
310
-
id: 'pub.leaflet.richtext.facet',
311
-
defs: {
312
-
main: {
313
-
type: 'object',
314
-
description: 'Annotation of a sub-string within rich text.',
315
-
required: ['index', 'features'],
316
-
properties: {
317
-
index: {
318
-
type: 'ref',
319
-
ref: 'lex:pub.leaflet.richtext.facet#byteSlice',
320
-
},
321
-
features: {
322
-
type: 'array',
323
-
items: {
324
-
type: 'union',
325
-
refs: [
326
-
'lex:pub.leaflet.richtext.facet#link',
327
-
'lex:pub.leaflet.richtext.facet#code',
328
-
'lex:pub.leaflet.richtext.facet#highlight',
329
-
'lex:pub.leaflet.richtext.facet#underline',
330
-
'lex:pub.leaflet.richtext.facet#strikethrough',
331
-
'lex:pub.leaflet.richtext.facet#id',
332
-
'lex:pub.leaflet.richtext.facet#bold',
333
-
'lex:pub.leaflet.richtext.facet#italic',
334
-
],
335
-
},
336
-
},
337
-
},
338
-
},
339
-
byteSlice: {
340
-
type: 'object',
341
-
description:
342
-
'Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.',
343
-
required: ['byteStart', 'byteEnd'],
344
-
properties: {
345
-
byteStart: {
346
-
type: 'integer',
347
-
minimum: 0,
348
-
},
349
-
byteEnd: {
350
-
type: 'integer',
351
-
minimum: 0,
352
-
},
353
-
},
354
-
},
355
-
link: {
356
-
type: 'object',
357
-
description:
358
-
'Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.',
359
-
required: ['uri'],
360
-
properties: {
361
-
uri: {
362
-
type: 'string',
363
-
format: 'uri',
364
-
},
365
-
},
366
-
},
367
-
code: {
368
-
type: 'object',
369
-
description: 'Facet feature for inline code.',
370
-
required: [],
371
-
properties: {},
372
-
},
373
-
highlight: {
374
-
type: 'object',
375
-
description: 'Facet feature for highlighted text.',
376
-
required: [],
377
-
properties: {},
378
-
},
379
-
underline: {
380
-
type: 'object',
381
-
description: 'Facet feature for underline markup',
382
-
required: [],
383
-
properties: {},
384
-
},
385
-
strikethrough: {
386
-
type: 'object',
387
-
description: 'Facet feature for strikethrough markup',
388
-
required: [],
389
-
properties: {},
390
-
},
391
-
id: {
392
-
type: 'object',
393
-
description:
394
-
'Facet feature for an identifier. Used for linking to a segment',
395
-
required: [],
396
-
properties: {
397
-
id: {
398
-
type: 'string',
399
-
},
400
-
},
401
-
},
402
-
bold: {
403
-
type: 'object',
404
-
description: 'Facet feature for bold text',
405
-
required: [],
406
-
properties: {},
407
-
},
408
-
italic: {
409
-
type: 'object',
410
-
description: 'Facet feature for italic text',
411
-
required: [],
412
-
properties: {},
413
-
},
414
-
},
415
-
},
416
-
ComAtprotoRepoCreateRecord: {
417
-
lexicon: 1,
418
-
id: 'com.atproto.repo.createRecord',
419
-
defs: {
420
-
main: {
421
-
type: 'procedure',
422
-
description:
423
-
'Create a single new repository record. Requires auth, implemented by PDS.',
424
-
input: {
425
-
encoding: 'application/json',
426
-
schema: {
427
-
type: 'object',
428
-
required: ['repo', 'collection', 'record'],
429
-
properties: {
430
-
repo: {
431
-
type: 'string',
432
-
format: 'at-identifier',
433
-
description:
434
-
'The handle or DID of the repo (aka, current account).',
435
-
},
436
-
collection: {
437
-
type: 'string',
438
-
format: 'nsid',
439
-
description: 'The NSID of the record collection.',
440
-
},
441
-
rkey: {
442
-
type: 'string',
443
-
format: 'record-key',
444
-
description: 'The Record Key.',
445
-
maxLength: 512,
446
-
},
447
-
validate: {
448
-
type: 'boolean',
449
-
description:
450
-
"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
451
-
},
452
-
record: {
453
-
type: 'unknown',
454
-
description: 'The record itself. Must contain a $type field.',
455
-
},
456
-
swapCommit: {
457
-
type: 'string',
458
-
format: 'cid',
459
-
description:
460
-
'Compare and swap with the previous commit by CID.',
461
-
},
462
-
},
463
-
},
464
-
},
465
-
output: {
466
-
encoding: 'application/json',
467
-
schema: {
468
-
type: 'object',
469
-
required: ['uri', 'cid'],
470
-
properties: {
471
-
uri: {
472
-
type: 'string',
473
-
format: 'at-uri',
474
-
},
475
-
cid: {
476
-
type: 'string',
477
-
format: 'cid',
478
-
},
479
-
commit: {
480
-
type: 'ref',
481
-
ref: 'lex:com.atproto.repo.defs#commitMeta',
482
-
},
483
-
validationStatus: {
484
-
type: 'string',
485
-
knownValues: ['valid', 'unknown'],
486
-
},
487
-
},
488
-
},
489
-
},
490
-
errors: [
491
-
{
492
-
name: 'InvalidSwap',
493
-
description:
494
-
"Indicates that 'swapCommit' didn't match current repo commit.",
495
-
},
496
-
],
497
-
},
498
-
},
499
-
},
500
-
ComAtprotoRepoDefs: {
501
-
lexicon: 1,
502
-
id: 'com.atproto.repo.defs',
503
-
defs: {
504
-
commitMeta: {
505
-
type: 'object',
506
-
required: ['cid', 'rev'],
507
-
properties: {
508
-
cid: {
509
-
type: 'string',
510
-
format: 'cid',
511
-
},
512
-
rev: {
513
-
type: 'string',
514
-
format: 'tid',
515
-
},
516
-
},
517
-
},
518
-
},
519
-
},
520
-
ComAtprotoRepoDeleteRecord: {
521
-
lexicon: 1,
522
-
id: 'com.atproto.repo.deleteRecord',
523
-
defs: {
524
-
main: {
525
-
type: 'procedure',
526
-
description:
527
-
"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",
528
-
input: {
529
-
encoding: 'application/json',
530
-
schema: {
531
-
type: 'object',
532
-
required: ['repo', 'collection', 'rkey'],
533
-
properties: {
534
-
repo: {
535
-
type: 'string',
536
-
format: 'at-identifier',
537
-
description:
538
-
'The handle or DID of the repo (aka, current account).',
539
-
},
540
-
collection: {
541
-
type: 'string',
542
-
format: 'nsid',
543
-
description: 'The NSID of the record collection.',
544
-
},
545
-
rkey: {
546
-
type: 'string',
547
-
format: 'record-key',
548
-
description: 'The Record Key.',
549
-
},
550
-
swapRecord: {
551
-
type: 'string',
552
-
format: 'cid',
553
-
description:
554
-
'Compare and swap with the previous record by CID.',
555
-
},
556
-
swapCommit: {
557
-
type: 'string',
558
-
format: 'cid',
559
-
description:
560
-
'Compare and swap with the previous commit by CID.',
561
-
},
562
-
},
563
-
},
564
-
},
565
-
output: {
566
-
encoding: 'application/json',
567
-
schema: {
568
-
type: 'object',
569
-
properties: {
570
-
commit: {
571
-
type: 'ref',
572
-
ref: 'lex:com.atproto.repo.defs#commitMeta',
573
-
},
574
-
},
575
-
},
576
-
},
577
-
errors: [
578
-
{
579
-
name: 'InvalidSwap',
580
-
},
581
-
],
582
-
},
583
-
},
584
-
},
585
-
ComAtprotoRepoGetRecord: {
586
-
lexicon: 1,
587
-
id: 'com.atproto.repo.getRecord',
588
-
defs: {
589
-
main: {
590
-
type: 'query',
591
-
description:
592
-
'Get a single record from a repository. Does not require auth.',
593
-
parameters: {
594
-
type: 'params',
595
-
required: ['repo', 'collection', 'rkey'],
596
-
properties: {
597
-
repo: {
598
-
type: 'string',
599
-
format: 'at-identifier',
600
-
description: 'The handle or DID of the repo.',
601
-
},
602
-
collection: {
603
-
type: 'string',
604
-
format: 'nsid',
605
-
description: 'The NSID of the record collection.',
606
-
},
607
-
rkey: {
608
-
type: 'string',
609
-
description: 'The Record Key.',
610
-
format: 'record-key',
611
-
},
612
-
cid: {
613
-
type: 'string',
614
-
format: 'cid',
615
-
description:
616
-
'The CID of the version of the record. If not specified, then return the most recent version.',
617
-
},
618
-
},
619
-
},
620
-
output: {
621
-
encoding: 'application/json',
622
-
schema: {
623
-
type: 'object',
624
-
required: ['uri', 'value'],
625
-
properties: {
626
-
uri: {
627
-
type: 'string',
628
-
format: 'at-uri',
629
-
},
630
-
cid: {
631
-
type: 'string',
632
-
format: 'cid',
633
-
},
634
-
value: {
635
-
type: 'unknown',
636
-
},
637
-
},
638
-
},
639
-
},
640
-
errors: [
641
-
{
642
-
name: 'RecordNotFound',
643
-
},
644
-
],
645
-
},
646
-
},
647
-
},
648
-
ComAtprotoRepoListRecords: {
649
-
lexicon: 1,
650
-
id: 'com.atproto.repo.listRecords',
651
-
defs: {
652
-
main: {
653
-
type: 'query',
654
-
description:
655
-
'List a range of records in a repository, matching a specific collection. Does not require auth.',
656
-
parameters: {
657
-
type: 'params',
658
-
required: ['repo', 'collection'],
659
-
properties: {
660
-
repo: {
661
-
type: 'string',
662
-
format: 'at-identifier',
663
-
description: 'The handle or DID of the repo.',
664
-
},
665
-
collection: {
666
-
type: 'string',
667
-
format: 'nsid',
668
-
description: 'The NSID of the record type.',
669
-
},
670
-
limit: {
671
-
type: 'integer',
672
-
minimum: 1,
673
-
maximum: 100,
674
-
default: 50,
675
-
description: 'The number of records to return.',
676
-
},
677
-
cursor: {
678
-
type: 'string',
679
-
},
680
-
rkeyStart: {
681
-
type: 'string',
682
-
description:
683
-
'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
684
-
},
685
-
rkeyEnd: {
686
-
type: 'string',
687
-
description:
688
-
'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
689
-
},
690
-
reverse: {
691
-
type: 'boolean',
692
-
description: 'Flag to reverse the order of the returned records.',
693
-
},
694
-
},
695
-
},
696
-
output: {
697
-
encoding: 'application/json',
698
-
schema: {
699
-
type: 'object',
700
-
required: ['records'],
701
-
properties: {
702
-
cursor: {
703
-
type: 'string',
704
-
},
705
-
records: {
706
-
type: 'array',
707
-
items: {
708
-
type: 'ref',
709
-
ref: 'lex:com.atproto.repo.listRecords#record',
710
-
},
711
-
},
712
-
},
713
-
},
714
-
},
715
-
},
716
-
record: {
717
-
type: 'object',
718
-
required: ['uri', 'cid', 'value'],
719
-
properties: {
720
-
uri: {
721
-
type: 'string',
722
-
format: 'at-uri',
723
-
},
724
-
cid: {
725
-
type: 'string',
726
-
format: 'cid',
727
-
},
728
-
value: {
729
-
type: 'unknown',
730
-
},
731
-
},
732
-
},
733
-
},
734
-
},
735
-
ComAtprotoRepoPutRecord: {
736
-
lexicon: 1,
737
-
id: 'com.atproto.repo.putRecord',
738
-
defs: {
739
-
main: {
740
-
type: 'procedure',
741
-
description:
742
-
'Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.',
743
-
input: {
744
-
encoding: 'application/json',
745
-
schema: {
746
-
type: 'object',
747
-
required: ['repo', 'collection', 'rkey', 'record'],
748
-
nullable: ['swapRecord'],
749
-
properties: {
750
-
repo: {
751
-
type: 'string',
752
-
format: 'at-identifier',
753
-
description:
754
-
'The handle or DID of the repo (aka, current account).',
755
-
},
756
-
collection: {
757
-
type: 'string',
758
-
format: 'nsid',
759
-
description: 'The NSID of the record collection.',
760
-
},
761
-
rkey: {
762
-
type: 'string',
763
-
format: 'record-key',
764
-
description: 'The Record Key.',
765
-
maxLength: 512,
766
-
},
767
-
validate: {
768
-
type: 'boolean',
769
-
description:
770
-
"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
771
-
},
772
-
record: {
773
-
type: 'unknown',
774
-
description: 'The record to write.',
775
-
},
776
-
swapRecord: {
777
-
type: 'string',
778
-
format: 'cid',
779
-
description:
780
-
'Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation',
781
-
},
782
-
swapCommit: {
783
-
type: 'string',
784
-
format: 'cid',
785
-
description:
786
-
'Compare and swap with the previous commit by CID.',
787
-
},
788
-
},
789
-
},
790
-
},
791
-
output: {
792
-
encoding: 'application/json',
793
-
schema: {
794
-
type: 'object',
795
-
required: ['uri', 'cid'],
796
-
properties: {
797
-
uri: {
798
-
type: 'string',
799
-
format: 'at-uri',
800
-
},
801
-
cid: {
802
-
type: 'string',
803
-
format: 'cid',
804
-
},
805
-
commit: {
806
-
type: 'ref',
807
-
ref: 'lex:com.atproto.repo.defs#commitMeta',
808
-
},
809
-
validationStatus: {
810
-
type: 'string',
811
-
knownValues: ['valid', 'unknown'],
812
-
},
813
-
},
814
-
},
815
-
},
816
-
errors: [
817
-
{
818
-
name: 'InvalidSwap',
819
-
},
820
-
],
821
-
},
822
-
},
823
-
},
824
-
ComAtprotoRepoStrongRef: {
825
-
lexicon: 1,
826
-
id: 'com.atproto.repo.strongRef',
827
-
description: 'A URI with a content-hash fingerprint.',
828
-
defs: {
829
-
main: {
830
-
type: 'object',
831
-
required: ['uri', 'cid'],
832
-
properties: {
833
-
uri: {
834
-
type: 'string',
835
-
format: 'at-uri',
836
-
},
837
-
cid: {
838
-
type: 'string',
839
-
format: 'cid',
840
-
},
841
-
},
842
-
},
843
-
},
844
-
},
845
-
} as const satisfies Record<string, LexiconDoc>
846
-
export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
847
-
export const lexicons: Lexicons = new Lexicons(schemas)
848
-
849
-
export function validate<T extends { $type: string }>(
850
-
v: unknown,
851
-
id: string,
852
-
hash: string,
853
-
requiredType: true,
854
-
): ValidationResult<T>
855
-
export function validate<T extends { $type?: string }>(
856
-
v: unknown,
857
-
id: string,
858
-
hash: string,
859
-
requiredType?: false,
860
-
): ValidationResult<T>
861
-
export function validate(
862
-
v: unknown,
863
-
id: string,
864
-
hash: string,
865
-
requiredType?: boolean,
866
-
): ValidationResult {
867
-
return (requiredType ? is$typed : maybe$typed)(v, id, hash)
868
-
? lexicons.validate(`${id}#${hash}`, v)
869
-
: {
870
-
success: false,
871
-
error: new ValidationError(
872
-
`Must be an object with "${hash === 'main' ? id : `${id}#${hash}`}" $type property`,
873
-
),
874
-
}
875
-
}
876
-
877
-
export const ids = {
878
-
PubLeafletDocument: 'pub.leaflet.document',
879
-
PubLeafletBlocksCode: 'pub.leaflet.blocks.code',
880
-
PubLeafletBlocksHeader: 'pub.leaflet.blocks.header',
881
-
PubLeafletBlocksImage: 'pub.leaflet.blocks.image',
882
-
PubLeafletBlocksMath: 'pub.leaflet.blocks.math',
883
-
PubLeafletBlocksText: 'pub.leaflet.blocks.text',
884
-
PubLeafletBlocksUnorderedList: 'pub.leaflet.blocks.unorderedList',
885
-
PubLeafletBlocksWebsite: 'pub.leaflet.blocks.website',
886
-
PubLeafletPagesLinearDocument: 'pub.leaflet.pages.linearDocument',
887
-
PubLeafletRichtextFacet: 'pub.leaflet.richtext.facet',
888
-
ComAtprotoRepoCreateRecord: 'com.atproto.repo.createRecord',
889
-
ComAtprotoRepoDefs: 'com.atproto.repo.defs',
890
-
ComAtprotoRepoDeleteRecord: 'com.atproto.repo.deleteRecord',
891
-
ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',
892
-
ComAtprotoRepoListRecords: 'com.atproto.repo.listRecords',
893
-
ComAtprotoRepoPutRecord: 'com.atproto.repo.putRecord',
894
-
ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
895
-
} as const
-68
src/leaflet/lexicons/types/com/atproto/repo/createRecord.ts
-68
src/leaflet/lexicons/types/com/atproto/repo/createRecord.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
-
import { CID } from 'multiformats/cid'
7
-
import { validate as _validate } from '../../../../lexicons'
8
-
import {
9
-
type $Typed,
10
-
is$typed as _is$typed,
11
-
type OmitKey,
12
-
} from '../../../../util'
13
-
import type * as ComAtprotoRepoDefs from './defs.js'
14
-
15
-
const is$typed = _is$typed,
16
-
validate = _validate
17
-
const id = 'com.atproto.repo.createRecord'
18
-
19
-
export type QueryParams = {}
20
-
21
-
export interface InputSchema {
22
-
/** The handle or DID of the repo (aka, current account). */
23
-
repo: string
24
-
/** The NSID of the record collection. */
25
-
collection: string
26
-
/** The Record Key. */
27
-
rkey?: string
28
-
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
29
-
validate?: boolean
30
-
/** The record itself. Must contain a $type field. */
31
-
record: { [_ in string]: unknown }
32
-
/** Compare and swap with the previous commit by CID. */
33
-
swapCommit?: string
34
-
}
35
-
36
-
export interface OutputSchema {
37
-
uri: string
38
-
cid: string
39
-
commit?: ComAtprotoRepoDefs.CommitMeta
40
-
validationStatus?: 'valid' | 'unknown' | (string & {})
41
-
}
42
-
43
-
export interface CallOptions {
44
-
signal?: AbortSignal
45
-
headers?: HeadersMap
46
-
qp?: QueryParams
47
-
encoding?: 'application/json'
48
-
}
49
-
50
-
export interface Response {
51
-
success: boolean
52
-
headers: HeadersMap
53
-
data: OutputSchema
54
-
}
55
-
56
-
export class InvalidSwapError extends XRPCError {
57
-
constructor(src: XRPCError) {
58
-
super(src.status, src.error, src.message, src.headers, { cause: src })
59
-
}
60
-
}
61
-
62
-
export function toKnownErr(e: any) {
63
-
if (e instanceof XRPCError) {
64
-
if (e.error === 'InvalidSwap') return new InvalidSwapError(e)
65
-
}
66
-
67
-
return e
68
-
}
-31
src/leaflet/lexicons/types/com/atproto/repo/defs.ts
-31
src/leaflet/lexicons/types/com/atproto/repo/defs.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'com.atproto.repo.defs'
16
-
17
-
export interface CommitMeta {
18
-
$type?: 'com.atproto.repo.defs#commitMeta'
19
-
cid: string
20
-
rev: string
21
-
}
22
-
23
-
const hashCommitMeta = 'commitMeta'
24
-
25
-
export function isCommitMeta<V>(v: V) {
26
-
return is$typed(v, id, hashCommitMeta)
27
-
}
28
-
29
-
export function validateCommitMeta<V>(v: V) {
30
-
return validate<CommitMeta & V>(v, id, hashCommitMeta)
31
-
}
-63
src/leaflet/lexicons/types/com/atproto/repo/deleteRecord.ts
-63
src/leaflet/lexicons/types/com/atproto/repo/deleteRecord.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
-
import { CID } from 'multiformats/cid'
7
-
import { validate as _validate } from '../../../../lexicons'
8
-
import {
9
-
type $Typed,
10
-
is$typed as _is$typed,
11
-
type OmitKey,
12
-
} from '../../../../util'
13
-
import type * as ComAtprotoRepoDefs from './defs.js'
14
-
15
-
const is$typed = _is$typed,
16
-
validate = _validate
17
-
const id = 'com.atproto.repo.deleteRecord'
18
-
19
-
export type QueryParams = {}
20
-
21
-
export interface InputSchema {
22
-
/** The handle or DID of the repo (aka, current account). */
23
-
repo: string
24
-
/** The NSID of the record collection. */
25
-
collection: string
26
-
/** The Record Key. */
27
-
rkey: string
28
-
/** Compare and swap with the previous record by CID. */
29
-
swapRecord?: string
30
-
/** Compare and swap with the previous commit by CID. */
31
-
swapCommit?: string
32
-
}
33
-
34
-
export interface OutputSchema {
35
-
commit?: ComAtprotoRepoDefs.CommitMeta
36
-
}
37
-
38
-
export interface CallOptions {
39
-
signal?: AbortSignal
40
-
headers?: HeadersMap
41
-
qp?: QueryParams
42
-
encoding?: 'application/json'
43
-
}
44
-
45
-
export interface Response {
46
-
success: boolean
47
-
headers: HeadersMap
48
-
data: OutputSchema
49
-
}
50
-
51
-
export class InvalidSwapError extends XRPCError {
52
-
constructor(src: XRPCError) {
53
-
super(src.status, src.error, src.message, src.headers, { cause: src })
54
-
}
55
-
}
56
-
57
-
export function toKnownErr(e: any) {
58
-
if (e instanceof XRPCError) {
59
-
if (e.error === 'InvalidSwap') return new InvalidSwapError(e)
60
-
}
61
-
62
-
return e
63
-
}
-59
src/leaflet/lexicons/types/com/atproto/repo/getRecord.ts
-59
src/leaflet/lexicons/types/com/atproto/repo/getRecord.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
-
import { CID } from 'multiformats/cid'
7
-
import { validate as _validate } from '../../../../lexicons'
8
-
import {
9
-
type $Typed,
10
-
is$typed as _is$typed,
11
-
type OmitKey,
12
-
} from '../../../../util'
13
-
14
-
const is$typed = _is$typed,
15
-
validate = _validate
16
-
const id = 'com.atproto.repo.getRecord'
17
-
18
-
export type QueryParams = {
19
-
/** The handle or DID of the repo. */
20
-
repo: string
21
-
/** The NSID of the record collection. */
22
-
collection: string
23
-
/** The Record Key. */
24
-
rkey: string
25
-
/** The CID of the version of the record. If not specified, then return the most recent version. */
26
-
cid?: string
27
-
}
28
-
export type InputSchema = undefined
29
-
30
-
export interface OutputSchema {
31
-
uri: string
32
-
cid?: string
33
-
value: { [_ in string]: unknown }
34
-
}
35
-
36
-
export interface CallOptions {
37
-
signal?: AbortSignal
38
-
headers?: HeadersMap
39
-
}
40
-
41
-
export interface Response {
42
-
success: boolean
43
-
headers: HeadersMap
44
-
data: OutputSchema
45
-
}
46
-
47
-
export class RecordNotFoundError extends XRPCError {
48
-
constructor(src: XRPCError) {
49
-
super(src.status, src.error, src.message, src.headers, { cause: src })
50
-
}
51
-
}
52
-
53
-
export function toKnownErr(e: any) {
54
-
if (e instanceof XRPCError) {
55
-
if (e.error === 'RecordNotFound') return new RecordNotFoundError(e)
56
-
}
57
-
58
-
return e
59
-
}
-70
src/leaflet/lexicons/types/com/atproto/repo/listRecords.ts
-70
src/leaflet/lexicons/types/com/atproto/repo/listRecords.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
-
import { CID } from 'multiformats/cid'
7
-
import { validate as _validate } from '../../../../lexicons'
8
-
import {
9
-
type $Typed,
10
-
is$typed as _is$typed,
11
-
type OmitKey,
12
-
} from '../../../../util'
13
-
14
-
const is$typed = _is$typed,
15
-
validate = _validate
16
-
const id = 'com.atproto.repo.listRecords'
17
-
18
-
export type QueryParams = {
19
-
/** The handle or DID of the repo. */
20
-
repo: string
21
-
/** The NSID of the record type. */
22
-
collection: string
23
-
/** The number of records to return. */
24
-
limit?: number
25
-
cursor?: string
26
-
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
27
-
rkeyStart?: string
28
-
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
29
-
rkeyEnd?: string
30
-
/** Flag to reverse the order of the returned records. */
31
-
reverse?: boolean
32
-
}
33
-
export type InputSchema = undefined
34
-
35
-
export interface OutputSchema {
36
-
cursor?: string
37
-
records: Record[]
38
-
}
39
-
40
-
export interface CallOptions {
41
-
signal?: AbortSignal
42
-
headers?: HeadersMap
43
-
}
44
-
45
-
export interface Response {
46
-
success: boolean
47
-
headers: HeadersMap
48
-
data: OutputSchema
49
-
}
50
-
51
-
export function toKnownErr(e: any) {
52
-
return e
53
-
}
54
-
55
-
export interface Record {
56
-
$type?: 'com.atproto.repo.listRecords#record'
57
-
uri: string
58
-
cid: string
59
-
value: { [_ in string]: unknown }
60
-
}
61
-
62
-
const hashRecord = 'record'
63
-
64
-
export function isRecord<V>(v: V) {
65
-
return is$typed(v, id, hashRecord)
66
-
}
67
-
68
-
export function validateRecord<V>(v: V) {
69
-
return validate<Record & V>(v, id, hashRecord)
70
-
}
-70
src/leaflet/lexicons/types/com/atproto/repo/putRecord.ts
-70
src/leaflet/lexicons/types/com/atproto/repo/putRecord.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
-
import { CID } from 'multiformats/cid'
7
-
import { validate as _validate } from '../../../../lexicons'
8
-
import {
9
-
type $Typed,
10
-
is$typed as _is$typed,
11
-
type OmitKey,
12
-
} from '../../../../util'
13
-
import type * as ComAtprotoRepoDefs from './defs.js'
14
-
15
-
const is$typed = _is$typed,
16
-
validate = _validate
17
-
const id = 'com.atproto.repo.putRecord'
18
-
19
-
export type QueryParams = {}
20
-
21
-
export interface InputSchema {
22
-
/** The handle or DID of the repo (aka, current account). */
23
-
repo: string
24
-
/** The NSID of the record collection. */
25
-
collection: string
26
-
/** The Record Key. */
27
-
rkey: string
28
-
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
29
-
validate?: boolean
30
-
/** The record to write. */
31
-
record: { [_ in string]: unknown }
32
-
/** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */
33
-
swapRecord?: string | null
34
-
/** Compare and swap with the previous commit by CID. */
35
-
swapCommit?: string
36
-
}
37
-
38
-
export interface OutputSchema {
39
-
uri: string
40
-
cid: string
41
-
commit?: ComAtprotoRepoDefs.CommitMeta
42
-
validationStatus?: 'valid' | 'unknown' | (string & {})
43
-
}
44
-
45
-
export interface CallOptions {
46
-
signal?: AbortSignal
47
-
headers?: HeadersMap
48
-
qp?: QueryParams
49
-
encoding?: 'application/json'
50
-
}
51
-
52
-
export interface Response {
53
-
success: boolean
54
-
headers: HeadersMap
55
-
data: OutputSchema
56
-
}
57
-
58
-
export class InvalidSwapError extends XRPCError {
59
-
constructor(src: XRPCError) {
60
-
super(src.status, src.error, src.message, src.headers, { cause: src })
61
-
}
62
-
}
63
-
64
-
export function toKnownErr(e: any) {
65
-
if (e instanceof XRPCError) {
66
-
if (e.error === 'InvalidSwap') return new InvalidSwapError(e)
67
-
}
68
-
69
-
return e
70
-
}
-31
src/leaflet/lexicons/types/com/atproto/repo/strongRef.ts
-31
src/leaflet/lexicons/types/com/atproto/repo/strongRef.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'com.atproto.repo.strongRef'
16
-
17
-
export interface Main {
18
-
$type?: 'com.atproto.repo.strongRef'
19
-
uri: string
20
-
cid: string
21
-
}
22
-
23
-
const hashMain = 'main'
24
-
25
-
export function isMain<V>(v: V) {
26
-
return is$typed(v, id, hashMain)
27
-
}
28
-
29
-
export function validateMain<V>(v: V) {
30
-
return validate<Main & V>(v, id, hashMain)
31
-
}
-32
src/leaflet/lexicons/types/pub/leaflet/blocks/code.ts
-32
src/leaflet/lexicons/types/pub/leaflet/blocks/code.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'pub.leaflet.blocks.code'
16
-
17
-
export interface Main {
18
-
$type?: 'pub.leaflet.blocks.code'
19
-
plaintext: string
20
-
language?: string
21
-
syntaxHighlightingTheme?: string
22
-
}
23
-
24
-
const hashMain = 'main'
25
-
26
-
export function isMain<V>(v: V) {
27
-
return is$typed(v, id, hashMain)
28
-
}
29
-
30
-
export function validateMain<V>(v: V) {
31
-
return validate<Main & V>(v, id, hashMain)
32
-
}
-33
src/leaflet/lexicons/types/pub/leaflet/blocks/header.ts
-33
src/leaflet/lexicons/types/pub/leaflet/blocks/header.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
import type * as PubLeafletRichtextFacet from '../richtext/facet.js'
13
-
14
-
const is$typed = _is$typed,
15
-
validate = _validate
16
-
const id = 'pub.leaflet.blocks.header'
17
-
18
-
export interface Main {
19
-
$type?: 'pub.leaflet.blocks.header'
20
-
level?: number
21
-
plaintext: string
22
-
facets?: PubLeafletRichtextFacet.Main[]
23
-
}
24
-
25
-
const hashMain = 'main'
26
-
27
-
export function isMain<V>(v: V) {
28
-
return is$typed(v, id, hashMain)
29
-
}
30
-
31
-
export function validateMain<V>(v: V) {
32
-
return validate<Main & V>(v, id, hashMain)
33
-
}
-49
src/leaflet/lexicons/types/pub/leaflet/blocks/image.ts
-49
src/leaflet/lexicons/types/pub/leaflet/blocks/image.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'pub.leaflet.blocks.image'
16
-
17
-
export interface Main {
18
-
$type?: 'pub.leaflet.blocks.image'
19
-
image: BlobRef
20
-
/** Alt text description of the image, for accessibility. */
21
-
alt?: string
22
-
aspectRatio: AspectRatio
23
-
}
24
-
25
-
const hashMain = 'main'
26
-
27
-
export function isMain<V>(v: V) {
28
-
return is$typed(v, id, hashMain)
29
-
}
30
-
31
-
export function validateMain<V>(v: V) {
32
-
return validate<Main & V>(v, id, hashMain)
33
-
}
34
-
35
-
export interface AspectRatio {
36
-
$type?: 'pub.leaflet.blocks.image#aspectRatio'
37
-
width: number
38
-
height: number
39
-
}
40
-
41
-
const hashAspectRatio = 'aspectRatio'
42
-
43
-
export function isAspectRatio<V>(v: V) {
44
-
return is$typed(v, id, hashAspectRatio)
45
-
}
46
-
47
-
export function validateAspectRatio<V>(v: V) {
48
-
return validate<AspectRatio & V>(v, id, hashAspectRatio)
49
-
}
-30
src/leaflet/lexicons/types/pub/leaflet/blocks/math.ts
-30
src/leaflet/lexicons/types/pub/leaflet/blocks/math.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'pub.leaflet.blocks.math'
16
-
17
-
export interface Main {
18
-
$type?: 'pub.leaflet.blocks.math'
19
-
tex: string
20
-
}
21
-
22
-
const hashMain = 'main'
23
-
24
-
export function isMain<V>(v: V) {
25
-
return is$typed(v, id, hashMain)
26
-
}
27
-
28
-
export function validateMain<V>(v: V) {
29
-
return validate<Main & V>(v, id, hashMain)
30
-
}
-32
src/leaflet/lexicons/types/pub/leaflet/blocks/text.ts
-32
src/leaflet/lexicons/types/pub/leaflet/blocks/text.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
import type * as PubLeafletRichtextFacet from '../richtext/facet.js'
13
-
14
-
const is$typed = _is$typed,
15
-
validate = _validate
16
-
const id = 'pub.leaflet.blocks.text'
17
-
18
-
export interface Main {
19
-
$type?: 'pub.leaflet.blocks.text'
20
-
plaintext: string
21
-
facets?: PubLeafletRichtextFacet.Main[]
22
-
}
23
-
24
-
const hashMain = 'main'
25
-
26
-
export function isMain<V>(v: V) {
27
-
return is$typed(v, id, hashMain)
28
-
}
29
-
30
-
export function validateMain<V>(v: V) {
31
-
return validate<Main & V>(v, id, hashMain)
32
-
}
-53
src/leaflet/lexicons/types/pub/leaflet/blocks/unorderedList.ts
-53
src/leaflet/lexicons/types/pub/leaflet/blocks/unorderedList.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
import type * as PubLeafletBlocksText from './text.js'
13
-
import type * as PubLeafletBlocksHeader from './header.js'
14
-
import type * as PubLeafletBlocksImage from './image.js'
15
-
16
-
const is$typed = _is$typed,
17
-
validate = _validate
18
-
const id = 'pub.leaflet.blocks.unorderedList'
19
-
20
-
export interface Main {
21
-
$type?: 'pub.leaflet.blocks.unorderedList'
22
-
children: ListItem[]
23
-
}
24
-
25
-
const hashMain = 'main'
26
-
27
-
export function isMain<V>(v: V) {
28
-
return is$typed(v, id, hashMain)
29
-
}
30
-
31
-
export function validateMain<V>(v: V) {
32
-
return validate<Main & V>(v, id, hashMain)
33
-
}
34
-
35
-
export interface ListItem {
36
-
$type?: 'pub.leaflet.blocks.unorderedList#listItem'
37
-
content:
38
-
| $Typed<PubLeafletBlocksText.Main>
39
-
| $Typed<PubLeafletBlocksHeader.Main>
40
-
| $Typed<PubLeafletBlocksImage.Main>
41
-
| { $type: string }
42
-
children?: ListItem[]
43
-
}
44
-
45
-
const hashListItem = 'listItem'
46
-
47
-
export function isListItem<V>(v: V) {
48
-
return is$typed(v, id, hashListItem)
49
-
}
50
-
51
-
export function validateListItem<V>(v: V) {
52
-
return validate<ListItem & V>(v, id, hashListItem)
53
-
}
-33
src/leaflet/lexicons/types/pub/leaflet/blocks/website.ts
-33
src/leaflet/lexicons/types/pub/leaflet/blocks/website.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'pub.leaflet.blocks.website'
16
-
17
-
export interface Main {
18
-
$type?: 'pub.leaflet.blocks.website'
19
-
previewImage?: BlobRef
20
-
title?: string
21
-
description?: string
22
-
src: string
23
-
}
24
-
25
-
const hashMain = 'main'
26
-
27
-
export function isMain<V>(v: V) {
28
-
return is$typed(v, id, hashMain)
29
-
}
30
-
31
-
export function validateMain<V>(v: V) {
32
-
return validate<Main & V>(v, id, hashMain)
33
-
}
-35
src/leaflet/lexicons/types/pub/leaflet/document.ts
-35
src/leaflet/lexicons/types/pub/leaflet/document.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../lexicons'
7
-
import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util'
8
-
import type * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef.js'
9
-
import type * as PubLeafletPagesLinearDocument from './pages/linearDocument.js'
10
-
11
-
const is$typed = _is$typed,
12
-
validate = _validate
13
-
const id = 'pub.leaflet.document'
14
-
15
-
export interface Record {
16
-
$type: 'pub.leaflet.document'
17
-
title: string
18
-
postRef?: ComAtprotoRepoStrongRef.Main
19
-
description?: string
20
-
publishedAt?: string
21
-
publication: string
22
-
author: string
23
-
pages: ($Typed<PubLeafletPagesLinearDocument.Main> | { $type: string })[]
24
-
[k: string]: unknown
25
-
}
26
-
27
-
const hashRecord = 'main'
28
-
29
-
export function isRecord<V>(v: V) {
30
-
return is$typed(v, id, hashRecord)
31
-
}
32
-
33
-
export function validateRecord<V>(v: V) {
34
-
return validate<Record & V>(v, id, hashRecord, true)
35
-
}
-69
src/leaflet/lexicons/types/pub/leaflet/pages/linearDocument.ts
-69
src/leaflet/lexicons/types/pub/leaflet/pages/linearDocument.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
import type * as PubLeafletBlocksText from '../blocks/text.js'
13
-
import type * as PubLeafletBlocksHeader from '../blocks/header.js'
14
-
import type * as PubLeafletBlocksImage from '../blocks/image.js'
15
-
import type * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js'
16
-
import type * as PubLeafletBlocksWebsite from '../blocks/website.js'
17
-
import type * as PubLeafletBlocksMath from '../blocks/math.js'
18
-
import type * as PubLeafletBlocksCode from '../blocks/code.js'
19
-
20
-
const is$typed = _is$typed,
21
-
validate = _validate
22
-
const id = 'pub.leaflet.pages.linearDocument'
23
-
24
-
export interface Main {
25
-
$type?: 'pub.leaflet.pages.linearDocument'
26
-
blocks?: Block[]
27
-
}
28
-
29
-
const hashMain = 'main'
30
-
31
-
export function isMain<V>(v: V) {
32
-
return is$typed(v, id, hashMain)
33
-
}
34
-
35
-
export function validateMain<V>(v: V) {
36
-
return validate<Main & V>(v, id, hashMain)
37
-
}
38
-
39
-
export interface Block {
40
-
$type?: 'pub.leaflet.pages.linearDocument#block'
41
-
block:
42
-
| $Typed<PubLeafletBlocksText.Main>
43
-
| $Typed<PubLeafletBlocksHeader.Main>
44
-
| $Typed<PubLeafletBlocksImage.Main>
45
-
| $Typed<PubLeafletBlocksUnorderedList.Main>
46
-
| $Typed<PubLeafletBlocksWebsite.Main>
47
-
| $Typed<PubLeafletBlocksMath.Main>
48
-
| $Typed<PubLeafletBlocksCode.Main>
49
-
| { $type: string }
50
-
alignment?:
51
-
| 'lex:pub.leaflet.pages.linearDocument#textAlignLeft'
52
-
| 'lex:pub.leaflet.pages.linearDocument#textAlignCenter'
53
-
| 'lex:pub.leaflet.pages.linearDocument#textAlignRight'
54
-
| (string & {})
55
-
}
56
-
57
-
const hashBlock = 'block'
58
-
59
-
export function isBlock<V>(v: V) {
60
-
return is$typed(v, id, hashBlock)
61
-
}
62
-
63
-
export function validateBlock<V>(v: V) {
64
-
return validate<Block & V>(v, id, hashBlock)
65
-
}
66
-
67
-
export const TEXTALIGNLEFT = `${id}#textAlignLeft`
68
-
export const TEXTALIGNCENTER = `${id}#textAlignCenter`
69
-
export const TEXTALIGNRIGHT = `${id}#textAlignRight`
-181
src/leaflet/lexicons/types/pub/leaflet/richtext/facet.ts
-181
src/leaflet/lexicons/types/pub/leaflet/richtext/facet.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
-
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../lexicons'
7
-
import {
8
-
type $Typed,
9
-
is$typed as _is$typed,
10
-
type OmitKey,
11
-
} from '../../../../util'
12
-
13
-
const is$typed = _is$typed,
14
-
validate = _validate
15
-
const id = 'pub.leaflet.richtext.facet'
16
-
17
-
/** Annotation of a sub-string within rich text. */
18
-
export interface Main {
19
-
$type?: 'pub.leaflet.richtext.facet'
20
-
index: ByteSlice
21
-
features: (
22
-
| $Typed<Link>
23
-
| $Typed<Code>
24
-
| $Typed<Highlight>
25
-
| $Typed<Underline>
26
-
| $Typed<Strikethrough>
27
-
| $Typed<Id>
28
-
| $Typed<Bold>
29
-
| $Typed<Italic>
30
-
| { $type: string }
31
-
)[]
32
-
}
33
-
34
-
const hashMain = 'main'
35
-
36
-
export function isMain<V>(v: V) {
37
-
return is$typed(v, id, hashMain)
38
-
}
39
-
40
-
export function validateMain<V>(v: V) {
41
-
return validate<Main & V>(v, id, hashMain)
42
-
}
43
-
44
-
/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */
45
-
export interface ByteSlice {
46
-
$type?: 'pub.leaflet.richtext.facet#byteSlice'
47
-
byteStart: number
48
-
byteEnd: number
49
-
}
50
-
51
-
const hashByteSlice = 'byteSlice'
52
-
53
-
export function isByteSlice<V>(v: V) {
54
-
return is$typed(v, id, hashByteSlice)
55
-
}
56
-
57
-
export function validateByteSlice<V>(v: V) {
58
-
return validate<ByteSlice & V>(v, id, hashByteSlice)
59
-
}
60
-
61
-
/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */
62
-
export interface Link {
63
-
$type?: 'pub.leaflet.richtext.facet#link'
64
-
uri: string
65
-
}
66
-
67
-
const hashLink = 'link'
68
-
69
-
export function isLink<V>(v: V) {
70
-
return is$typed(v, id, hashLink)
71
-
}
72
-
73
-
export function validateLink<V>(v: V) {
74
-
return validate<Link & V>(v, id, hashLink)
75
-
}
76
-
77
-
/** Facet feature for inline code. */
78
-
export interface Code {
79
-
$type?: 'pub.leaflet.richtext.facet#code'
80
-
}
81
-
82
-
const hashCode = 'code'
83
-
84
-
export function isCode<V>(v: V) {
85
-
return is$typed(v, id, hashCode)
86
-
}
87
-
88
-
export function validateCode<V>(v: V) {
89
-
return validate<Code & V>(v, id, hashCode)
90
-
}
91
-
92
-
/** Facet feature for highlighted text. */
93
-
export interface Highlight {
94
-
$type?: 'pub.leaflet.richtext.facet#highlight'
95
-
}
96
-
97
-
const hashHighlight = 'highlight'
98
-
99
-
export function isHighlight<V>(v: V) {
100
-
return is$typed(v, id, hashHighlight)
101
-
}
102
-
103
-
export function validateHighlight<V>(v: V) {
104
-
return validate<Highlight & V>(v, id, hashHighlight)
105
-
}
106
-
107
-
/** Facet feature for underline markup */
108
-
export interface Underline {
109
-
$type?: 'pub.leaflet.richtext.facet#underline'
110
-
}
111
-
112
-
const hashUnderline = 'underline'
113
-
114
-
export function isUnderline<V>(v: V) {
115
-
return is$typed(v, id, hashUnderline)
116
-
}
117
-
118
-
export function validateUnderline<V>(v: V) {
119
-
return validate<Underline & V>(v, id, hashUnderline)
120
-
}
121
-
122
-
/** Facet feature for strikethrough markup */
123
-
export interface Strikethrough {
124
-
$type?: 'pub.leaflet.richtext.facet#strikethrough'
125
-
}
126
-
127
-
const hashStrikethrough = 'strikethrough'
128
-
129
-
export function isStrikethrough<V>(v: V) {
130
-
return is$typed(v, id, hashStrikethrough)
131
-
}
132
-
133
-
export function validateStrikethrough<V>(v: V) {
134
-
return validate<Strikethrough & V>(v, id, hashStrikethrough)
135
-
}
136
-
137
-
/** Facet feature for an identifier. Used for linking to a segment */
138
-
export interface Id {
139
-
$type?: 'pub.leaflet.richtext.facet#id'
140
-
id?: string
141
-
}
142
-
143
-
const hashId = 'id'
144
-
145
-
export function isId<V>(v: V) {
146
-
return is$typed(v, id, hashId)
147
-
}
148
-
149
-
export function validateId<V>(v: V) {
150
-
return validate<Id & V>(v, id, hashId)
151
-
}
152
-
153
-
/** Facet feature for bold text */
154
-
export interface Bold {
155
-
$type?: 'pub.leaflet.richtext.facet#bold'
156
-
}
157
-
158
-
const hashBold = 'bold'
159
-
160
-
export function isBold<V>(v: V) {
161
-
return is$typed(v, id, hashBold)
162
-
}
163
-
164
-
export function validateBold<V>(v: V) {
165
-
return validate<Bold & V>(v, id, hashBold)
166
-
}
167
-
168
-
/** Facet feature for italic text */
169
-
export interface Italic {
170
-
$type?: 'pub.leaflet.richtext.facet#italic'
171
-
}
172
-
173
-
const hashItalic = 'italic'
174
-
175
-
export function isItalic<V>(v: V) {
176
-
return is$typed(v, id, hashItalic)
177
-
}
178
-
179
-
export function validateItalic<V>(v: V) {
180
-
return validate<Italic & V>(v, id, hashItalic)
181
-
}
-82
src/leaflet/lexicons/util.ts
-82
src/leaflet/lexicons/util.ts
···
1
-
/**
2
-
* GENERATED CODE - DO NOT MODIFY
3
-
*/
4
-
5
-
import { type ValidationResult } from '@atproto/lexicon'
6
-
7
-
export type OmitKey<T, K extends keyof T> = {
8
-
[K2 in keyof T as K2 extends K ? never : K2]: T[K2]
9
-
}
10
-
11
-
export type $Typed<V, T extends string = string> = V & { $type: T }
12
-
export type Un$Typed<V extends { $type?: string }> = OmitKey<V, '$type'>
13
-
14
-
export type $Type<Id extends string, Hash extends string> = Hash extends 'main'
15
-
? Id
16
-
: `${Id}#${Hash}`
17
-
18
-
function isObject<V>(v: V): v is V & object {
19
-
return v != null && typeof v === 'object'
20
-
}
21
-
22
-
function is$type<Id extends string, Hash extends string>(
23
-
$type: unknown,
24
-
id: Id,
25
-
hash: Hash,
26
-
): $type is $Type<Id, Hash> {
27
-
return hash === 'main'
28
-
? $type === id
29
-
: // $type === `${id}#${hash}`
30
-
typeof $type === 'string' &&
31
-
$type.length === id.length + 1 + hash.length &&
32
-
$type.charCodeAt(id.length) === 35 /* '#' */ &&
33
-
$type.startsWith(id) &&
34
-
$type.endsWith(hash)
35
-
}
36
-
37
-
export type $TypedObject<
38
-
V,
39
-
Id extends string,
40
-
Hash extends string,
41
-
> = V extends {
42
-
$type: $Type<Id, Hash>
43
-
}
44
-
? V
45
-
: V extends { $type?: string }
46
-
? V extends { $type?: infer T extends $Type<Id, Hash> }
47
-
? V & { $type: T }
48
-
: never
49
-
: V & { $type: $Type<Id, Hash> }
50
-
51
-
export function is$typed<V, Id extends string, Hash extends string>(
52
-
v: V,
53
-
id: Id,
54
-
hash: Hash,
55
-
): v is $TypedObject<V, Id, Hash> {
56
-
return isObject(v) && '$type' in v && is$type(v.$type, id, hash)
57
-
}
58
-
59
-
export function maybe$typed<V, Id extends string, Hash extends string>(
60
-
v: V,
61
-
id: Id,
62
-
hash: Hash,
63
-
): v is V & object & { $type?: $Type<Id, Hash> } {
64
-
return (
65
-
isObject(v) &&
66
-
('$type' in v ? v.$type === undefined || is$type(v.$type, id, hash) : true)
67
-
)
68
-
}
69
-
70
-
export type Validator<R = unknown> = (v: unknown) => ValidationResult<R>
71
-
export type ValidatorParam<V extends Validator> =
72
-
V extends Validator<infer R> ? R : never
73
-
74
-
/**
75
-
* Utility function that allows to convert a "validate*" utility function into a
76
-
* type predicate.
77
-
*/
78
-
export function asPredicate<V extends Validator>(validate: V) {
79
-
return function <T>(v: T): v is T & ValidatorParam<V> {
80
-
return validate(v).success
81
-
}
82
-
}
-130
src/leaflet-live-loader.ts
-130
src/leaflet-live-loader.ts
···
1
-
import { Agent } from "@atproto/api";
2
-
import { isDid } from "@atproto/did";
3
-
import { isValidHandle } from "@atproto/syntax";
4
-
import type { LiveLoader } from "astro/loaders";
5
-
import type {
6
-
CollectionFilter,
7
-
EntryFilter,
8
-
LeafletDocumentRecord,
9
-
LeafletDocumentView,
10
-
LeafletLoaderOptions,
11
-
} from "./types.js";
12
-
import {
13
-
getLeafletDocuments,
14
-
getSingleLeafletDocument,
15
-
leafletDocumentRecordToView,
16
-
resolveMiniDoc,
17
-
uriToRkey,
18
-
} from "./utils.js";
19
-
20
-
export class LiveLoaderError extends Error {
21
-
constructor(
22
-
message: string,
23
-
public code?: string,
24
-
) {
25
-
super(message);
26
-
this.name = "LiveLoaderError";
27
-
}
28
-
}
29
-
30
-
export function leafletLiveLoader(
31
-
options: LeafletLoaderOptions,
32
-
): LiveLoader<
33
-
LeafletDocumentView,
34
-
EntryFilter,
35
-
CollectionFilter,
36
-
LiveLoaderError
37
-
> {
38
-
const { repo } = options;
39
-
40
-
if (!repo || typeof repo !== "string") {
41
-
throw new LiveLoaderError(
42
-
"missing or invalid handle or did",
43
-
"MISSING_OR_INVALID_HANDLE_OR_DID",
44
-
);
45
-
}
46
-
47
-
if (!isValidHandle(repo)) {
48
-
// not a valid handle, let's check if it's a valid did
49
-
if (!isDid(repo)) {
50
-
throw new LiveLoaderError(
51
-
"invalid handle or did",
52
-
"INVALID_HANDLE_OR_DID",
53
-
);
54
-
}
55
-
}
56
-
57
-
return {
58
-
name: "leaflet-loader-astro",
59
-
loadCollection: async ({ filter }) => {
60
-
try {
61
-
const pds_url = await resolveMiniDoc(repo);
62
-
const agent = new Agent({ service: pds_url });
63
-
64
-
const documents = await getLeafletDocuments({
65
-
agent,
66
-
repo,
67
-
reverse: filter?.reverse,
68
-
cursor: filter?.cursor,
69
-
limit: filter?.limit,
70
-
});
71
-
72
-
return {
73
-
entries: documents.map((document) => {
74
-
const id = uriToRkey(document.uri);
75
-
return {
76
-
id,
77
-
data: leafletDocumentRecordToView({
78
-
uri: document.uri,
79
-
cid: document.cid,
80
-
value: document.value as unknown as LeafletDocumentRecord,
81
-
}),
82
-
};
83
-
}),
84
-
};
85
-
} catch {
86
-
return {
87
-
error: new LiveLoaderError(
88
-
"could not recover from error, please report on github",
89
-
"UNRECOVERABLE_ERROR",
90
-
),
91
-
};
92
-
}
93
-
},
94
-
loadEntry: async ({ filter }) => {
95
-
try {
96
-
if (!filter.id) {
97
-
return {
98
-
error: new LiveLoaderError(
99
-
"must provide an id for specific document",
100
-
"MISSING_DOCUMENT_ID",
101
-
),
102
-
};
103
-
}
104
-
const pds_url = await resolveMiniDoc(repo);
105
-
const agent = new Agent({ service: pds_url });
106
-
const document = await getSingleLeafletDocument({
107
-
agent,
108
-
id: filter.id,
109
-
repo,
110
-
});
111
-
112
-
return {
113
-
id: filter.id,
114
-
data: leafletDocumentRecordToView({
115
-
uri: document.uri,
116
-
cid: document.cid?.toString() ?? "",
117
-
value: document.value as unknown as LeafletDocumentRecord,
118
-
}),
119
-
};
120
-
} catch {
121
-
return {
122
-
error: new LiveLoaderError(
123
-
"could not recover from error, please report on github",
124
-
"UNRECOVERABLE_ERROR",
125
-
),
126
-
};
127
-
}
128
-
},
129
-
};
130
-
}
-14
src/tests/uri-to-rkey.test.ts
-14
src/tests/uri-to-rkey.test.ts
···
1
-
import { expect, test } from "vitest";
2
-
import { uriToRkey } from "../utils";
3
-
4
-
test("should throw if invalid at uri is passed in", () => {
5
-
expect(() => uriToRkey("test")).toThrowError("get rkey");
6
-
});
7
-
8
-
test("should pass if valid at uri is passed in", () => {
9
-
expect(
10
-
uriToRkey(
11
-
"at://did:plc:qttsv4e7pu2jl3ilanfgc3zn/pub.leaflet.document/3lvl7m6jd4s2e",
12
-
),
13
-
).toBe("3lvl7m6jd4s2e");
14
-
});
-67
src/types.ts
-67
src/types.ts
···
1
-
import type { Agent } from "@atproto/api";
2
-
import type { PubLeafletRichtextFacet } from "./leaflet/lexicons/index.js";
3
-
4
-
export interface LeafletLoaderOptions {
5
-
/**
6
-
* @description Your repo is either your handle (@you.some.url) or your DID (did:plc... or did:web...). You can find this information using: https://pdsls.dev
7
-
*/
8
-
repo: string;
9
-
}
10
-
11
-
export interface LeafletDocumentRecord {
12
-
$type: "pub.leaflet.document";
13
-
pages: { [x: string]: unknown };
14
-
title: string;
15
-
author: string;
16
-
description: string;
17
-
publication: string;
18
-
publishedAt: string;
19
-
}
20
-
21
-
export interface LeafletDocumentView {
22
-
rkey: string;
23
-
cid: string;
24
-
title: string;
25
-
pages: { [x: string]: unknown };
26
-
description: string;
27
-
author: string;
28
-
publication: string;
29
-
publishedAt: string;
30
-
}
31
-
32
-
export interface MiniDoc {
33
-
did: string;
34
-
handle: string;
35
-
pds: string;
36
-
signing_key: string;
37
-
}
38
-
39
-
export interface CollectionFilter {
40
-
limit?: number;
41
-
reverse?: boolean;
42
-
cursor?: string;
43
-
}
44
-
45
-
export interface EntryFilter {
46
-
id?: string;
47
-
}
48
-
49
-
export interface GetLeafletDocumentsParams {
50
-
repo: string;
51
-
agent: Agent;
52
-
cursor?: string;
53
-
limit?: number;
54
-
reverse?: boolean;
55
-
}
56
-
57
-
export interface GetSingleLeafletDocumentParams {
58
-
repo: string;
59
-
agent: Agent;
60
-
id: string;
61
-
}
62
-
63
-
export interface Facet extends PubLeafletRichtextFacet.Main {}
64
-
export interface RichTextSegment {
65
-
text: string;
66
-
facet?: Exclude<Facet["features"], { $type: string }>;
67
-
}
-261
src/utils.ts
-261
src/utils.ts
···
1
-
import { AtUri, UnicodeString } from "@atproto/api";
2
-
import sanitizeHTML from "sanitize-html";
3
-
import {
4
-
PubLeafletBlocksHeader,
5
-
PubLeafletBlocksText,
6
-
type PubLeafletDocument,
7
-
PubLeafletPagesLinearDocument,
8
-
PubLeafletRichtextFacet,
9
-
} from "./leaflet/lexicons/index.js";
10
-
import { LiveLoaderError } from "./leaflet-live-loader.js";
11
-
import type {
12
-
Facet,
13
-
GetLeafletDocumentsParams,
14
-
GetSingleLeafletDocumentParams,
15
-
LeafletDocumentRecord,
16
-
LeafletDocumentView,
17
-
MiniDoc,
18
-
RichTextSegment,
19
-
} from "./types.js";
20
-
21
-
export function uriToRkey(uri: string): string {
22
-
const u = AtUri.make(uri);
23
-
if (!u.rkey) {
24
-
throw new Error("Failed to get rkey from uri.");
25
-
}
26
-
return u.rkey;
27
-
}
28
-
29
-
export async function resolveMiniDoc(handleOrDid: string) {
30
-
try {
31
-
const response = await fetch(
32
-
`https://slingshot.microcosm.blue/xrpc/com.bad-example.identity.resolveMiniDoc?identifier=${handleOrDid}`,
33
-
);
34
-
35
-
if (!response.ok || response.status >= 300) {
36
-
throw new Error(
37
-
`could not resolve did doc due to invalid handle or did ${handleOrDid}`,
38
-
);
39
-
}
40
-
const data = (await response.json()) as MiniDoc;
41
-
42
-
return data.pds;
43
-
} catch {
44
-
throw new Error(`failed to resolve handle: ${handleOrDid}`);
45
-
}
46
-
}
47
-
48
-
export async function getLeafletDocuments({
49
-
repo,
50
-
reverse,
51
-
cursor,
52
-
agent,
53
-
limit,
54
-
}: GetLeafletDocumentsParams) {
55
-
const response = await agent.com.atproto.repo.listRecords({
56
-
repo,
57
-
collection: "pub.leaflet.document",
58
-
cursor,
59
-
reverse,
60
-
limit,
61
-
});
62
-
63
-
if (response.success === false) {
64
-
throw new LiveLoaderError(
65
-
"Could not fetch leaflet documents",
66
-
"FETCH_FAILED",
67
-
);
68
-
}
69
-
70
-
return response?.data?.records;
71
-
}
72
-
73
-
export async function getSingleLeafletDocument({
74
-
agent,
75
-
repo,
76
-
id,
77
-
}: GetSingleLeafletDocumentParams) {
78
-
const response = await agent.com.atproto.repo.getRecord({
79
-
repo,
80
-
collection: "pub.leaflet.document",
81
-
rkey: id,
82
-
});
83
-
84
-
if (response.success === false) {
85
-
throw new LiveLoaderError(
86
-
"error fetching document",
87
-
"DOCUMENT_FETCH_ERROR",
88
-
);
89
-
}
90
-
91
-
return response?.data;
92
-
}
93
-
94
-
export function leafletDocumentRecordToView({
95
-
uri,
96
-
cid,
97
-
value,
98
-
}: {
99
-
uri: string;
100
-
cid: string;
101
-
value: LeafletDocumentRecord;
102
-
}): LeafletDocumentView {
103
-
return {
104
-
rkey: uriToRkey(uri),
105
-
cid,
106
-
title: value.title,
107
-
pages: value.pages,
108
-
description: value.description,
109
-
author: value.author,
110
-
publication: value.publication,
111
-
publishedAt: value.publishedAt,
112
-
};
113
-
}
114
-
115
-
export function leafletBlocksToHTML(record: {
116
-
id: string;
117
-
uri: string;
118
-
cid: string;
119
-
value: PubLeafletDocument.Record;
120
-
}) {
121
-
let html = "";
122
-
const firstPage = record.value.pages[0];
123
-
let blocks: PubLeafletPagesLinearDocument.Block[] = [];
124
-
if (PubLeafletPagesLinearDocument.isMain(firstPage)) {
125
-
blocks = firstPage.blocks || [];
126
-
}
127
-
128
-
for (const block of blocks) {
129
-
if (PubLeafletBlocksText.isMain(block.block)) {
130
-
const rt = new RichText({
131
-
text: block.block.plaintext,
132
-
facets: block.block.facets || [],
133
-
});
134
-
const children = [];
135
-
for (const segment of rt.segments()) {
136
-
const link = segment.facet?.find(PubLeafletRichtextFacet.isLink);
137
-
const isBold = segment.facet?.find(PubLeafletRichtextFacet.isBold);
138
-
const isCode = segment.facet?.find(PubLeafletRichtextFacet.isCode);
139
-
const isStrikethrough = segment.facet?.find(
140
-
PubLeafletRichtextFacet.isStrikethrough,
141
-
);
142
-
const isUnderline = segment.facet?.find(
143
-
PubLeafletRichtextFacet.isUnderline,
144
-
);
145
-
const isItalic = segment.facet?.find(PubLeafletRichtextFacet.isItalic);
146
-
if (isCode) {
147
-
children.push(` <code>
148
-
${segment.text}
149
-
</code>`);
150
-
} else if (link) {
151
-
children.push(
152
-
` <a
153
-
href="${link.uri}"
154
-
target="_blank"
155
-
>
156
-
${segment.text}
157
-
</a>`,
158
-
);
159
-
} else if (isBold) {
160
-
children.push(`<b>${segment.text}</b>`);
161
-
} else if (isStrikethrough) {
162
-
children.push(`<s>${segment.text}</s>`);
163
-
} else if (isUnderline) {
164
-
children.push(
165
-
`<span style="text-decoration:underline;">${segment.text}</span>`,
166
-
);
167
-
} else if (isItalic) {
168
-
children.push(`<i>${segment.text}</i>`);
169
-
} else {
170
-
children.push(
171
-
`
172
-
${segment.text}
173
-
`,
174
-
);
175
-
}
176
-
}
177
-
html += `<p>${children.join("\n")}</p>`;
178
-
}
179
-
180
-
if (PubLeafletBlocksHeader.isMain(block.block)) {
181
-
if (block.block.level === 1) {
182
-
html += `<h2>${block.block.plaintext}</h2>`;
183
-
}
184
-
}
185
-
if (PubLeafletBlocksHeader.isMain(block.block)) {
186
-
if (block.block.level === 2) {
187
-
html += `<h3>${block.block.plaintext}</h3>`;
188
-
}
189
-
}
190
-
if (PubLeafletBlocksHeader.isMain(block.block)) {
191
-
if (block.block.level === 3) {
192
-
html += `<h4>${block.block.plaintext}</h4>`;
193
-
}
194
-
}
195
-
if (PubLeafletBlocksHeader.isMain(block.block)) {
196
-
if (!block.block.level) {
197
-
html += `<h6>${block.block.plaintext}</h6>`;
198
-
}
199
-
}
200
-
}
201
-
202
-
return sanitizeHTML(html);
203
-
}
204
-
205
-
export class RichText {
206
-
unicodeText: UnicodeString;
207
-
facets?: Facet[];
208
-
209
-
constructor(props: { text: string; facets: Facet[] }) {
210
-
this.unicodeText = new UnicodeString(props.text);
211
-
this.facets = props.facets;
212
-
if (this.facets) {
213
-
this.facets = this.facets
214
-
.filter((facet) => facet.index.byteStart <= facet.index.byteEnd)
215
-
.sort((a, b) => a.index.byteStart - b.index.byteStart);
216
-
}
217
-
}
218
-
219
-
*segments(): Generator<RichTextSegment, void, void> {
220
-
const facets = this.facets || [];
221
-
if (!facets.length) {
222
-
yield { text: this.unicodeText.utf16 };
223
-
return;
224
-
}
225
-
226
-
let textCursor = 0;
227
-
let facetCursor = 0;
228
-
do {
229
-
const currFacet = facets[facetCursor];
230
-
if (currFacet) {
231
-
if (textCursor < currFacet.index.byteStart) {
232
-
yield {
233
-
text: this.unicodeText.slice(textCursor, currFacet.index.byteStart),
234
-
};
235
-
} else if (textCursor > currFacet.index.byteStart) {
236
-
facetCursor++;
237
-
continue;
238
-
}
239
-
if (currFacet.index.byteStart < currFacet.index.byteEnd) {
240
-
const subtext = this.unicodeText.slice(
241
-
currFacet.index.byteStart,
242
-
currFacet.index.byteEnd,
243
-
);
244
-
if (!subtext.trim()) {
245
-
// dont empty string entities
246
-
yield { text: subtext };
247
-
} else {
248
-
yield { text: subtext, facet: currFacet.features };
249
-
}
250
-
}
251
-
textCursor = currFacet.index.byteEnd;
252
-
facetCursor++;
253
-
}
254
-
} while (facetCursor < facets.length);
255
-
if (textCursor < this.unicodeText.length) {
256
-
yield {
257
-
text: this.unicodeText.slice(textCursor, this.unicodeText.length),
258
-
};
259
-
}
260
-
}
261
-
}
+189
tests/parse-blocks.test.ts
+189
tests/parse-blocks.test.ts
···
1
+
import { expect, test } from "vitest";
2
+
import { parseBlocks } from "../lib/utils";
3
+
4
+
test("should correctly parse an h1 block to an h2 tag", () => {
5
+
const html = parseBlocks({
6
+
block: {
7
+
$type: "pub.leaflet.pages.linearDocument#block",
8
+
block: {
9
+
$type: "pub.leaflet.blocks.header",
10
+
level: 1,
11
+
facets: [],
12
+
plaintext: "heading 1",
13
+
},
14
+
},
15
+
did: "did:plc:qttsv4e7pu2jl3ilanfgc3zn",
16
+
});
17
+
18
+
expect(html).toMatchInlineSnapshot(`"<h2>heading 1</h2>"`);
19
+
});
20
+
21
+
test("should correctly parse an h2 block to an h3 tag", () => {
22
+
const html = parseBlocks({
23
+
block: {
24
+
$type: "pub.leaflet.pages.linearDocument#block",
25
+
block: {
26
+
$type: "pub.leaflet.blocks.header",
27
+
level: 2,
28
+
facets: [],
29
+
plaintext: "heading 2",
30
+
},
31
+
},
32
+
did: "did:plc:qttsv4e7pu2jl3ilanfgc3zn",
33
+
});
34
+
35
+
expect(html).toMatchInlineSnapshot(`"<h3>heading 2</h3>"`);
36
+
});
37
+
38
+
test("should correctly parse an h3 block to an h4 tag", () => {
39
+
const html = parseBlocks({
40
+
block: {
41
+
$type: "pub.leaflet.pages.linearDocument#block",
42
+
block: {
43
+
$type: "pub.leaflet.blocks.header",
44
+
level: 3,
45
+
facets: [],
46
+
plaintext: "heading 3",
47
+
},
48
+
},
49
+
did: "did:plc:qttsv4e7pu2jl3ilanfgc3zn",
50
+
});
51
+
52
+
expect(html).toMatchInlineSnapshot(`"<h4>heading 3</h4>"`);
53
+
});
54
+
55
+
test("should correctly parse a block with no level to an h6 tag", () => {
56
+
const html = parseBlocks({
57
+
block: {
58
+
$type: "pub.leaflet.pages.linearDocument#block",
59
+
block: {
60
+
$type: "pub.leaflet.blocks.header",
61
+
facets: [],
62
+
plaintext: "heading 6",
63
+
},
64
+
},
65
+
did: "did:plc:qttsv4e7pu2jl3ilanfgc3zn",
66
+
});
67
+
68
+
expect(html).toMatchInlineSnapshot(`"<h6>heading 6</h6>"`);
69
+
});
70
+
71
+
test("should correctly parse an unordered list block", () => {
72
+
const html = parseBlocks({
73
+
block: {
74
+
$type: "pub.leaflet.pages.linearDocument#block",
75
+
block: {
76
+
$type: "pub.leaflet.blocks.unorderedList",
77
+
children: [
78
+
{
79
+
$type: "pub.leaflet.blocks.unorderedList#listItem",
80
+
content: {
81
+
$type: "pub.leaflet.blocks.text",
82
+
facets: [
83
+
{
84
+
index: {
85
+
byteEnd: 18,
86
+
byteStart: 0,
87
+
},
88
+
features: [
89
+
{
90
+
uri: "https://pdsls.dev/",
91
+
$type: "pub.leaflet.richtext.facet#link",
92
+
},
93
+
],
94
+
},
95
+
{
96
+
index: {
97
+
byteEnd: 28,
98
+
byteStart: 22,
99
+
},
100
+
features: [
101
+
{
102
+
uri: "https://bsky.app/profile/juli.ee",
103
+
$type: "pub.leaflet.richtext.facet#link",
104
+
},
105
+
],
106
+
},
107
+
],
108
+
plaintext: "https://pdsls.dev/ by Juliet",
109
+
},
110
+
children: [],
111
+
},
112
+
{
113
+
$type: "pub.leaflet.blocks.unorderedList#listItem",
114
+
content: {
115
+
$type: "pub.leaflet.blocks.text",
116
+
facets: [
117
+
{
118
+
index: {
119
+
byteEnd: 34,
120
+
byteStart: 0,
121
+
},
122
+
features: [
123
+
{
124
+
uri: "https://github.com/mary-ext/atcute",
125
+
$type: "pub.leaflet.richtext.facet#link",
126
+
},
127
+
],
128
+
},
129
+
{
130
+
index: {
131
+
byteEnd: 42,
132
+
byteStart: 38,
133
+
},
134
+
features: [
135
+
{
136
+
uri: "https://bsky.app/profile/mary.my.id",
137
+
$type: "pub.leaflet.richtext.facet#link",
138
+
},
139
+
],
140
+
},
141
+
],
142
+
plaintext: "https://github.com/mary-ext/atcute by mary",
143
+
},
144
+
children: [],
145
+
},
146
+
{
147
+
$type: "pub.leaflet.blocks.unorderedList#listItem",
148
+
content: {
149
+
$type: "pub.leaflet.blocks.text",
150
+
facets: [
151
+
{
152
+
index: {
153
+
byteEnd: 27,
154
+
byteStart: 0,
155
+
},
156
+
features: [
157
+
{
158
+
uri: "https://www.microcosm.blue/",
159
+
$type: "pub.leaflet.richtext.facet#link",
160
+
},
161
+
],
162
+
},
163
+
{
164
+
index: {
165
+
byteEnd: 35,
166
+
byteStart: 31,
167
+
},
168
+
features: [
169
+
{
170
+
uri: "https://bsky.app/profile/bad-example.com",
171
+
$type: "pub.leaflet.richtext.facet#link",
172
+
},
173
+
],
174
+
},
175
+
],
176
+
plaintext: "https://www.microcosm.blue/ by phil",
177
+
},
178
+
children: [],
179
+
},
180
+
],
181
+
},
182
+
},
183
+
did: "did:plc:qttsv4e7pu2jl3ilanfgc3zn",
184
+
});
185
+
186
+
expect(html).toMatchInlineSnapshot(
187
+
`"<ul><li><p><a href="https://pdsls.dev/" target="_blank" rel="noopener noreferrer">https://pdsls.dev/</a> by <a href="https://bsky.app/profile/juli.ee" target="_blank" rel="noopener noreferrer">Juliet</a></p></li><li><p><a href="https://github.com/mary-ext/atcute" target="_blank" rel="noopener noreferrer">https://github.com/mary-ext/atcute</a> by <a href="https://bsky.app/profile/mary.my.id" target="_blank" rel="noopener noreferrer">mary</a></p></li><li><p><a href="https://www.microcosm.blue/" target="_blank" rel="noopener noreferrer">https://www.microcosm.blue/</a> by <a href="https://bsky.app/profile/bad-example.com" target="_blank" rel="noopener noreferrer">phil</a></p></li></ul>"`,
188
+
);
189
+
});
+133
tests/parse-text-blocks.test.ts
+133
tests/parse-text-blocks.test.ts
···
1
+
import { expect, test } from "vitest";
2
+
import { parseTextBlock } from "../lib/utils";
3
+
4
+
test("should correctly parse a text block without facets", () => {
5
+
const html = parseTextBlock({
6
+
$type: "pub.leaflet.blocks.text",
7
+
facets: [],
8
+
plaintext: "just plaintext no facets",
9
+
});
10
+
11
+
expect(html).toMatchInlineSnapshot(`"<p>just plaintext no facets</p>"`);
12
+
});
13
+
14
+
test("should correctly parse a text block with bolded text", () => {
15
+
const html = parseTextBlock({
16
+
$type: "pub.leaflet.blocks.text",
17
+
facets: [
18
+
{
19
+
index: {
20
+
byteEnd: 11,
21
+
byteStart: 0,
22
+
},
23
+
features: [
24
+
{
25
+
$type: "pub.leaflet.richtext.facet#bold",
26
+
},
27
+
],
28
+
},
29
+
],
30
+
plaintext: "bolded text with some plaintext",
31
+
});
32
+
33
+
expect(html).toMatchInlineSnapshot(
34
+
`"<p><b>bolded text</b> with some plaintext</p>"`,
35
+
);
36
+
});
37
+
38
+
test("should correctly parse a text block with an inline link", () => {
39
+
const html = parseTextBlock({
40
+
$type: "pub.leaflet.blocks.text",
41
+
facets: [
42
+
{
43
+
index: {
44
+
byteEnd: 27,
45
+
byteStart: 0,
46
+
},
47
+
features: [
48
+
{
49
+
uri: "https://blacksky.community/",
50
+
$type: "pub.leaflet.richtext.facet#link",
51
+
},
52
+
],
53
+
},
54
+
],
55
+
plaintext: "https://blacksky.community/",
56
+
});
57
+
58
+
expect(html).toMatchInlineSnapshot(
59
+
`"<p><a href="https://blacksky.community/" target="_blank" rel="noopener noreferrer">https://blacksky.community/</a></p>"`,
60
+
);
61
+
});
62
+
63
+
test("should correctly parse a text block with strikethrough text", () => {
64
+
const html = parseTextBlock({
65
+
$type: "pub.leaflet.blocks.text",
66
+
facets: [
67
+
{
68
+
index: {
69
+
byteEnd: 13,
70
+
byteStart: 0,
71
+
},
72
+
features: [
73
+
{
74
+
$type: "pub.leaflet.richtext.facet#strikethrough",
75
+
},
76
+
],
77
+
},
78
+
],
79
+
plaintext: "strikethrough text with some plaintext",
80
+
});
81
+
82
+
expect(html).toMatchInlineSnapshot(
83
+
`"<p><s>strikethrough</s> text with some plaintext</p>"`,
84
+
);
85
+
});
86
+
87
+
test("should correctly parse a text block with underlined text", () => {
88
+
const html = parseTextBlock({
89
+
$type: "pub.leaflet.blocks.text",
90
+
facets: [
91
+
{
92
+
index: {
93
+
byteEnd: 10,
94
+
byteStart: 0,
95
+
},
96
+
features: [
97
+
{
98
+
$type: "pub.leaflet.richtext.facet#underline",
99
+
},
100
+
],
101
+
},
102
+
],
103
+
plaintext: "underlined text with some plaintext",
104
+
});
105
+
106
+
expect(html).toMatchInlineSnapshot(
107
+
`"<p><span style="text-decoration:underline;">underlined</span> text with some plaintext</p>"`,
108
+
);
109
+
});
110
+
111
+
test("should correctly parse a text block with italicized text", () => {
112
+
const html = parseTextBlock({
113
+
$type: "pub.leaflet.blocks.text",
114
+
facets: [
115
+
{
116
+
index: {
117
+
byteEnd: 10,
118
+
byteStart: 0,
119
+
},
120
+
features: [
121
+
{
122
+
$type: "pub.leaflet.richtext.facet#italic",
123
+
},
124
+
],
125
+
},
126
+
],
127
+
plaintext: "italicized text with some plaintext",
128
+
});
129
+
130
+
expect(html).toMatchInlineSnapshot(
131
+
`"<p><i>italicized</i> text with some plaintext</p>"`,
132
+
);
133
+
});
+18
tests/uri-to-rkey.test.ts
+18
tests/uri-to-rkey.test.ts
···
1
+
import { expect, test } from "vitest";
2
+
import { uriToRkey } from "../lib/utils";
3
+
4
+
test("should throw if invalid at uri is passed in", () => {
5
+
expect(() => uriToRkey("test")).toThrowError("get rkey");
6
+
});
7
+
8
+
test("should pass if valid at uri is passed in", () => {
9
+
expect(
10
+
uriToRkey(
11
+
"at://did:plc:qttsv4e7pu2jl3ilanfgc3zn/pub.leaflet.document/3lvl7m6jd4s2e",
12
+
),
13
+
).toBe("3lvl7m6jd4s2e");
14
+
});
15
+
16
+
test("should not pass if invalid uri is passed in", () => {
17
+
expect(() => uriToRkey("invalid")).toThrowError(/failed to get rkey/i);
18
+
});
+6
-6
tsconfig.json
+6
-6
tsconfig.json
···
11
11
"strict": true,
12
12
"noUncheckedIndexedAccess": true,
13
13
"noImplicitOverride": true,
14
-
"module": "esnext",
15
-
"baseUrl": "./src",
14
+
"module": "nodenext",
15
+
"baseUrl": "lib",
16
16
"outDir": "dist",
17
-
"moduleResolution": "bundler",
18
-
"rootDir": "src",
17
+
"moduleResolution": "nodenext",
18
+
"rootDir": "lib",
19
19
"sourceMap": true,
20
20
"noEmit": true,
21
21
"declaration": true
22
22
},
23
-
"include": ["./src"],
24
-
"exclude": ["node_modules", "dist"]
23
+
"include": ["lib"],
24
+
"exclude": ["node_modules", "dist", "**/*.test.ts"]
25
25
}