@atcute/leaflet 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +108 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lexicons/index.d.ts +8 -0
  7. package/dist/lexicons/index.js +9 -0
  8. package/dist/lexicons/index.js.map +1 -0
  9. package/dist/lexicons/types/pub/leaflet/blocks/header.d.ts +15 -0
  10. package/dist/lexicons/types/pub/leaflet/blocks/header.js +13 -0
  11. package/dist/lexicons/types/pub/leaflet/blocks/header.js.map +1 -0
  12. package/dist/lexicons/types/pub/leaflet/blocks/image.d.ts +25 -0
  13. package/dist/lexicons/types/pub/leaflet/blocks/image.js +17 -0
  14. package/dist/lexicons/types/pub/leaflet/blocks/image.js.map +1 -0
  15. package/dist/lexicons/types/pub/leaflet/blocks/text.d.ts +14 -0
  16. package/dist/lexicons/types/pub/leaflet/blocks/text.js +11 -0
  17. package/dist/lexicons/types/pub/leaflet/blocks/text.js.map +1 -0
  18. package/dist/lexicons/types/pub/leaflet/blocks/unorderedList.d.ts +26 -0
  19. package/dist/lexicons/types/pub/leaflet/blocks/unorderedList.js +26 -0
  20. package/dist/lexicons/types/pub/leaflet/blocks/unorderedList.js.map +1 -0
  21. package/dist/lexicons/types/pub/leaflet/document.d.ts +23 -0
  22. package/dist/lexicons/types/pub/leaflet/document.js +24 -0
  23. package/dist/lexicons/types/pub/leaflet/document.js.map +1 -0
  24. package/dist/lexicons/types/pub/leaflet/pages/linearDocument.d.ts +45 -0
  25. package/dist/lexicons/types/pub/leaflet/pages/linearDocument.js +33 -0
  26. package/dist/lexicons/types/pub/leaflet/pages/linearDocument.js.map +1 -0
  27. package/dist/lexicons/types/pub/leaflet/publication.d.ts +20 -0
  28. package/dist/lexicons/types/pub/leaflet/publication.js +13 -0
  29. package/dist/lexicons/types/pub/leaflet/publication.js.map +1 -0
  30. package/dist/lexicons/types/pub/leaflet/richtext/facet.d.ts +79 -0
  31. package/dist/lexicons/types/pub/leaflet/richtext/facet.js +51 -0
  32. package/dist/lexicons/types/pub/leaflet/richtext/facet.js.map +1 -0
  33. package/lib/index.ts +1 -0
  34. package/lib/lexicons/index.ts +8 -0
  35. package/lib/lexicons/types/pub/leaflet/blocks/header.ts +22 -0
  36. package/lib/lexicons/types/pub/leaflet/blocks/image.ts +28 -0
  37. package/lib/lexicons/types/pub/leaflet/blocks/text.ts +19 -0
  38. package/lib/lexicons/types/pub/leaflet/blocks/unorderedList.ts +37 -0
  39. package/lib/lexicons/types/pub/leaflet/document.ts +41 -0
  40. package/lib/lexicons/types/pub/leaflet/pages/linearDocument.ts +54 -0
  41. package/lib/lexicons/types/pub/leaflet/publication.ts +30 -0
  42. package/lib/lexicons/types/pub/leaflet/richtext/facet.ts +81 -0
  43. package/package.json +40 -0
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2
+ of this software and associated documentation files (the "Software"), to deal
3
+ in the Software without restriction, including without limitation the rights
4
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5
+ copies of the Software, and to permit persons to whom the Software is
6
+ furnished to do so, subject to the following conditions:
7
+
8
+ The above copyright notice and this permission notice shall be included in all
9
+ copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @atcute/leaflet
2
+
3
+ [Leaflet](https://leaflet.pub/) (pub.leaflet.\*) schema definitions
4
+
5
+ ## usage
6
+
7
+ ```ts
8
+ import { PubLeafletDocument } from '@atcute/leaflet';
9
+ import { is } from '@atcute/lexicons';
10
+
11
+ const document: PubLeafletDocument.Main = {
12
+ $type: 'pub.leaflet.document',
13
+ title: 'Article title',
14
+ author: 'did:plc:ia76kvnndjutgedggx2ibrem',
15
+ description: 'Article description',
16
+ publication: 'at://did:plc:ia76kvnndjutgedggx2ibrem/pub.leaflet.publication/3lpyvgcwc722m',
17
+ publishedAt: '2025-05-25T14:44:37.870Z',
18
+ pages: [
19
+ {
20
+ $type: 'pub.leaflet.pages.linearDocument',
21
+ blocks: [
22
+ {
23
+ $type: 'pub.leaflet.pages.linearDocument#block',
24
+ block: {
25
+ $type: 'pub.leaflet.blocks.text',
26
+ facets: [{ index: { byteEnd: 12, byteStart: 0 }, features: [] }],
27
+ plaintext: 'Hello world!',
28
+ },
29
+ },
30
+ {
31
+ $type: 'pub.leaflet.pages.linearDocument#block',
32
+ block: {
33
+ $type: 'pub.leaflet.blocks.text',
34
+ facets: [
35
+ {
36
+ index: { byteEnd: 9, byteStart: 0 },
37
+ features: [{ $type: 'pub.leaflet.richtext.facet#bold' }],
38
+ },
39
+ ],
40
+ plaintext: 'Bold text',
41
+ },
42
+ },
43
+ {
44
+ $type: 'pub.leaflet.pages.linearDocument#block',
45
+ block: {
46
+ $type: 'pub.leaflet.blocks.text',
47
+ facets: [
48
+ {
49
+ index: { byteEnd: 11, byteStart: 0 },
50
+ features: [{ $type: 'pub.leaflet.richtext.facet#italic' }],
51
+ },
52
+ ],
53
+ plaintext: 'Italic text',
54
+ },
55
+ },
56
+ {
57
+ $type: 'pub.leaflet.pages.linearDocument#block',
58
+ block: {
59
+ $type: 'pub.leaflet.blocks.text',
60
+ facets: [
61
+ {
62
+ index: { byteEnd: 16, byteStart: 0 },
63
+ features: [
64
+ { $type: 'pub.leaflet.richtext.facet#bold' },
65
+ { $type: 'pub.leaflet.richtext.facet#italic' },
66
+ ],
67
+ },
68
+ ],
69
+ plaintext: 'Bold italic text',
70
+ },
71
+ },
72
+ {
73
+ $type: 'pub.leaflet.pages.linearDocument#block',
74
+ block: { $type: 'pub.leaflet.blocks.text', facets: [], plaintext: '' },
75
+ },
76
+ ],
77
+ },
78
+ ],
79
+ };
80
+
81
+ is(PubLeafletDocument.mainSchema, document);
82
+ // -> true
83
+ ```
84
+
85
+ ### with `@atcute/client`
86
+
87
+ pick either one of these 3 options to register the ambient declarations
88
+
89
+ ```jsonc
90
+ // tsconfig.json
91
+ {
92
+ "compilerOptions": {
93
+ "types": ["@atcute/leaflet"],
94
+ },
95
+ }
96
+ ```
97
+
98
+ ```ts
99
+ // env.d.ts
100
+ /// <reference types="@atcute/leaflet" />
101
+ ```
102
+
103
+ ```ts
104
+ // index.ts
105
+ import type {} from '@atcute/leaflet';
106
+ ```
107
+
108
+ now all the XRPC operations should be visible in the client
@@ -0,0 +1 @@
1
+ export * from './lexicons/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lexicons/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
2
+ export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
3
+ export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
4
+ export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
5
+ export * as PubLeafletDocument from './types/pub/leaflet/document.js';
6
+ export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
7
+ export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
8
+ export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
@@ -0,0 +1,9 @@
1
+ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
2
+ export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
3
+ export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
4
+ export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
5
+ export * as PubLeafletDocument from './types/pub/leaflet/document.js';
6
+ export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
7
+ export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
8
+ export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,qBAAqB,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,oBAAoB,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC;AAC7F,OAAO,KAAK,kBAAkB,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC;AAC7F,OAAO,KAAK,qBAAqB,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,uBAAuB,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletRichtextFacet from '../richtext/facet.js';
3
+ declare const _mainSchema: v.ObjectSchema<{
4
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.header">, undefined>;
5
+ readonly facets: v.OptionalSchema<v.ArraySchema<PubLeafletRichtextFacet.mainSchema>, undefined>;
6
+ level: v.OptionalSchema<v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<1, 6>]>, undefined>;
7
+ plaintext: v.StringSchema<string>;
8
+ }>;
9
+ type main$schematype = typeof _mainSchema;
10
+ export interface mainSchema extends main$schematype {
11
+ }
12
+ export declare const mainSchema: mainSchema;
13
+ export interface Main extends v.InferInput<typeof mainSchema> {
14
+ }
15
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletRichtextFacet from '../richtext/facet.js';
3
+ const _mainSchema = /*#__PURE__*/ v.object({
4
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.header')),
5
+ get facets() {
6
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
7
+ },
8
+ level: /*#__PURE__*/ v.optional(
9
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 6)])),
10
+ plaintext: /*#__PURE__*/ v.string(),
11
+ });
12
+ export const mainSchema = _mainSchema;
13
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,uBAAuB,MAAM,sBAAsB,CAAC;AAEhE,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACrF,IAAI,MAAM;QACT,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5F,CAAC;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAC9B,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAC1F;IACD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE;CACnC,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _aspectRatioSchema: v.ObjectSchema<{
3
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.image#aspectRatio">, undefined>;
4
+ height: v.IntegerSchema;
5
+ width: v.IntegerSchema;
6
+ }>;
7
+ declare const _mainSchema: v.ObjectSchema<{
8
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.image">, undefined>;
9
+ alt: v.OptionalSchema<v.StringSchema<string>, undefined>;
10
+ readonly aspectRatio: aspectRatioSchema;
11
+ image: v.BlobSchema;
12
+ }>;
13
+ type aspectRatio$schematype = typeof _aspectRatioSchema;
14
+ type main$schematype = typeof _mainSchema;
15
+ export interface aspectRatioSchema extends aspectRatio$schematype {
16
+ }
17
+ export interface mainSchema extends main$schematype {
18
+ }
19
+ export declare const aspectRatioSchema: aspectRatioSchema;
20
+ export declare const mainSchema: mainSchema;
21
+ export interface AspectRatio extends v.InferInput<typeof aspectRatioSchema> {
22
+ }
23
+ export interface Main extends v.InferInput<typeof mainSchema> {
24
+ }
25
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _aspectRatioSchema = /*#__PURE__*/ v.object({
3
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.image#aspectRatio')),
4
+ height: /*#__PURE__*/ v.integer(),
5
+ width: /*#__PURE__*/ v.integer(),
6
+ });
7
+ const _mainSchema = /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.image')),
9
+ alt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
10
+ get aspectRatio() {
11
+ return aspectRatioSchema;
12
+ },
13
+ image: /*#__PURE__*/ v.blob(),
14
+ });
15
+ export const aspectRatioSchema = _aspectRatioSchema;
16
+ export const mainSchema = _mainSchema;
17
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/image.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,MAAM,kBAAkB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;IAChG,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE;IACjC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE;CAChC,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACpF,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvD,IAAI,WAAW;QACd,OAAO,iBAAiB,CAAC;IAC1B,CAAC;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAuC,CAAC;AACzE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletRichtextFacet from '../richtext/facet.js';
3
+ declare const _mainSchema: v.ObjectSchema<{
4
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.text">, undefined>;
5
+ readonly facets: v.OptionalSchema<v.ArraySchema<PubLeafletRichtextFacet.mainSchema>, undefined>;
6
+ plaintext: v.StringSchema<string>;
7
+ }>;
8
+ type main$schematype = typeof _mainSchema;
9
+ export interface mainSchema extends main$schematype {
10
+ }
11
+ export declare const mainSchema: mainSchema;
12
+ export interface Main extends v.InferInput<typeof mainSchema> {
13
+ }
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletRichtextFacet from '../richtext/facet.js';
3
+ const _mainSchema = /*#__PURE__*/ v.object({
4
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.text')),
5
+ get facets() {
6
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
7
+ },
8
+ plaintext: /*#__PURE__*/ v.string(),
9
+ });
10
+ export const mainSchema = _mainSchema;
11
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/text.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,uBAAuB,MAAM,sBAAsB,CAAC;AAEhE,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACnF,IAAI,MAAM;QACT,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5F,CAAC;IACD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE;CACnC,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletBlocksHeader from './header.js';
3
+ import * as PubLeafletBlocksImage from './image.js';
4
+ import * as PubLeafletBlocksText from './text.js';
5
+ declare const _listItemSchema: v.ObjectSchema<{
6
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.unorderedList#listItem">, undefined>;
7
+ readonly children: v.OptionalSchema<v.ArraySchema<listItemSchema>, undefined>;
8
+ readonly content: v.VariantSchema<readonly [PubLeafletBlocksHeader.mainSchema, PubLeafletBlocksImage.mainSchema, PubLeafletBlocksText.mainSchema], boolean>;
9
+ }>;
10
+ declare const _mainSchema: v.ObjectSchema<{
11
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.unorderedList">, undefined>;
12
+ readonly children: v.ArraySchema<listItemSchema>;
13
+ }>;
14
+ type listItem$schematype = typeof _listItemSchema;
15
+ type main$schematype = typeof _mainSchema;
16
+ export interface listItemSchema extends listItem$schematype {
17
+ }
18
+ export interface mainSchema extends main$schematype {
19
+ }
20
+ export declare const listItemSchema: listItemSchema;
21
+ export declare const mainSchema: mainSchema;
22
+ export interface ListItem extends v.InferInput<typeof listItemSchema> {
23
+ }
24
+ export interface Main extends v.InferInput<typeof mainSchema> {
25
+ }
26
+ export {};
@@ -0,0 +1,26 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletBlocksHeader from './header.js';
3
+ import * as PubLeafletBlocksImage from './image.js';
4
+ import * as PubLeafletBlocksText from './text.js';
5
+ const _listItemSchema = /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.unorderedList#listItem')),
7
+ get children() {
8
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(listItemSchema));
9
+ },
10
+ get content() {
11
+ return /*#__PURE__*/ v.variant([
12
+ PubLeafletBlocksHeader.mainSchema,
13
+ PubLeafletBlocksImage.mainSchema,
14
+ PubLeafletBlocksText.mainSchema,
15
+ ]);
16
+ },
17
+ });
18
+ const _mainSchema = /*#__PURE__*/ v.object({
19
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.unorderedList')),
20
+ get children() {
21
+ return /*#__PURE__*/ v.array(listItemSchema);
22
+ },
23
+ });
24
+ export const listItemSchema = _listItemSchema;
25
+ export const mainSchema = _mainSchema;
26
+ //# sourceMappingURL=unorderedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unorderedList.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/unorderedList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,sBAAsB,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,qBAAqB,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,oBAAoB,MAAM,WAAW,CAAC;AAElD,MAAM,eAAe,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;IACrG,IAAI,QAAQ;QACX,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,OAAO;QACV,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;YAC9B,sBAAsB,CAAC,UAAU;YACjC,qBAAqB,CAAC,UAAU;YAChC,oBAAoB,CAAC,UAAU;SAC/B,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAC5F,IAAI,QAAQ;QACX,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;CACD,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,cAAc,GAAG,eAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
3
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
4
+ $type: v.LiteralSchema<"pub.leaflet.document">;
5
+ author: v.FormattedStringSchema<"at-identifier">;
6
+ description: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 3000>, v.StringGraphemesConstraint<0, 300>]>, undefined>;
7
+ readonly pages: v.ArraySchema<v.VariantSchema<readonly [PubLeafletPagesLinearDocument.mainSchema], boolean>>;
8
+ publication: v.FormattedStringSchema<"at-uri">;
9
+ publishedAt: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
10
+ title: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 1280>, v.StringGraphemesConstraint<0, 128>]>;
11
+ }>, v.FormattedStringSchema<"tid">>;
12
+ type main$schematype = typeof _mainSchema;
13
+ export interface mainSchema extends main$schematype {
14
+ }
15
+ export declare const mainSchema: mainSchema;
16
+ export interface Main extends v.InferInput<typeof mainSchema> {
17
+ }
18
+ declare module '@atcute/lexicons/ambient' {
19
+ interface Records {
20
+ 'pub.leaflet.document': mainSchema;
21
+ }
22
+ }
23
+ export {};
@@ -0,0 +1,24 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
3
+ const _mainSchema = /*#__PURE__*/ v.record(
4
+ /*#__PURE__*/ v.tidString(),
5
+ /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.literal('pub.leaflet.document'),
7
+ author: /*#__PURE__*/ v.actorIdentifierString(),
8
+ description: /*#__PURE__*/ v.optional(
9
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
10
+ /*#__PURE__*/ v.stringLength(0, 3000),
11
+ /*#__PURE__*/ v.stringGraphemes(0, 300),
12
+ ])),
13
+ get pages() {
14
+ return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([PubLeafletPagesLinearDocument.mainSchema]));
15
+ },
16
+ publication: /*#__PURE__*/ v.resourceUriString(),
17
+ publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
18
+ title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
19
+ /*#__PURE__*/ v.stringLength(0, 1280),
20
+ /*#__PURE__*/ v.stringGraphemes(0, 128),
21
+ ]),
22
+ }));
23
+ export const mainSchema = _mainSchema;
24
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../../lib/lexicons/types/pub/leaflet/document.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,6BAA6B,MAAM,2BAA2B,CAAC;AAE3E,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM;AACzC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE;AAC3B,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC;IACtD,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,qBAAqB,EAAE;IAC/C,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IACpC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE;QACnD,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC;QACrC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC;KACvC,CAAC,CACF;IACD,IAAI,KAAK;QACR,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;IACD,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;IAChD,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;IACvE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1D,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC;QACrC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC;KACvC,CAAC;CACF,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletBlocksHeader from '../blocks/header.js';
3
+ import * as PubLeafletBlocksImage from '../blocks/image.js';
4
+ import * as PubLeafletBlocksText from '../blocks/text.js';
5
+ import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
6
+ declare const _blockSchema: v.ObjectSchema<{
7
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument#block">, undefined>;
8
+ alignment: v.OptionalSchema<v.StringSchema<(string & {}) | "#textAlignCenter" | "#textAlignLeft" | "#textAlignRight">, undefined>;
9
+ readonly block: v.VariantSchema<readonly [PubLeafletBlocksHeader.mainSchema, PubLeafletBlocksImage.mainSchema, PubLeafletBlocksText.mainSchema, PubLeafletBlocksUnorderedList.mainSchema], boolean>;
10
+ }>;
11
+ declare const _mainSchema: v.ObjectSchema<{
12
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument">, undefined>;
13
+ readonly blocks: v.OptionalSchema<v.ArraySchema<blockSchema>, undefined>;
14
+ }>;
15
+ declare const _textAlignCenterSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignCenter">;
16
+ declare const _textAlignLeftSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignLeft">;
17
+ declare const _textAlignRightSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignRight">;
18
+ type block$schematype = typeof _blockSchema;
19
+ type main$schematype = typeof _mainSchema;
20
+ type textAlignCenter$schematype = typeof _textAlignCenterSchema;
21
+ type textAlignLeft$schematype = typeof _textAlignLeftSchema;
22
+ type textAlignRight$schematype = typeof _textAlignRightSchema;
23
+ export interface blockSchema extends block$schematype {
24
+ }
25
+ export interface mainSchema extends main$schematype {
26
+ }
27
+ export interface textAlignCenterSchema extends textAlignCenter$schematype {
28
+ }
29
+ export interface textAlignLeftSchema extends textAlignLeft$schematype {
30
+ }
31
+ export interface textAlignRightSchema extends textAlignRight$schematype {
32
+ }
33
+ export declare const blockSchema: blockSchema;
34
+ export declare const mainSchema: mainSchema;
35
+ export declare const textAlignCenterSchema: textAlignCenterSchema;
36
+ export declare const textAlignLeftSchema: textAlignLeftSchema;
37
+ export declare const textAlignRightSchema: textAlignRightSchema;
38
+ export interface Block extends v.InferInput<typeof blockSchema> {
39
+ }
40
+ export interface Main extends v.InferInput<typeof mainSchema> {
41
+ }
42
+ export type TextAlignCenter = v.InferInput<typeof textAlignCenterSchema>;
43
+ export type TextAlignLeft = v.InferInput<typeof textAlignLeftSchema>;
44
+ export type TextAlignRight = v.InferInput<typeof textAlignRightSchema>;
45
+ export {};
@@ -0,0 +1,33 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletBlocksHeader from '../blocks/header.js';
3
+ import * as PubLeafletBlocksImage from '../blocks/image.js';
4
+ import * as PubLeafletBlocksText from '../blocks/text.js';
5
+ import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
6
+ const _blockSchema = /*#__PURE__*/ v.object({
7
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#block')),
8
+ alignment: /*#__PURE__*/ v.optional(
9
+ /*#__PURE__*/ v.string()),
10
+ get block() {
11
+ return /*#__PURE__*/ v.variant([
12
+ PubLeafletBlocksHeader.mainSchema,
13
+ PubLeafletBlocksImage.mainSchema,
14
+ PubLeafletBlocksText.mainSchema,
15
+ PubLeafletBlocksUnorderedList.mainSchema,
16
+ ]);
17
+ },
18
+ });
19
+ const _mainSchema = /*#__PURE__*/ v.object({
20
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument')),
21
+ get blocks() {
22
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(blockSchema));
23
+ },
24
+ });
25
+ const _textAlignCenterSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignCenter');
26
+ const _textAlignLeftSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignLeft');
27
+ const _textAlignRightSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignRight');
28
+ export const blockSchema = _blockSchema;
29
+ export const mainSchema = _mainSchema;
30
+ export const textAlignCenterSchema = _textAlignCenterSchema;
31
+ export const textAlignLeftSchema = _textAlignLeftSchema;
32
+ export const textAlignRightSchema = _textAlignRightSchema;
33
+ //# sourceMappingURL=linearDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linearDocument.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/pages/linearDocument.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,sBAAsB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,qBAAqB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,6BAA6B,MAAM,4BAA4B,CAAC;AAE5E,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;IAClG,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAClC,aAAa,CAAC,CAAC,CAAC,MAAM,EAA6E,CACnG;IACD,IAAI,KAAK;QACR,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;YAC9B,sBAAsB,CAAC,UAAU;YACjC,qBAAqB,CAAC,UAAU;YAChC,oBAAoB,CAAC,UAAU;YAC/B,6BAA6B,CAAC,UAAU;SACxC,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAC5F,IAAI,MAAM;QACT,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IACrE,CAAC;CACD,CAAC,CAAC;AACH,MAAM,sBAAsB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,kDAAkD,CAAC,CAAC;AAC3G,MAAM,oBAAoB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,gDAAgD,CAAC,CAAC;AACvG,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC;AAczG,MAAM,CAAC,MAAM,WAAW,GAAG,YAA2B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAA+C,CAAC;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAA2C,CAAC;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAA6C,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
3
+ $type: v.LiteralSchema<"pub.leaflet.publication">;
4
+ base_path: v.OptionalSchema<v.FormattedStringSchema<"uri">, undefined>;
5
+ description: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 2000>]>, undefined>;
6
+ icon: v.OptionalSchema<v.BlobSchema, undefined>;
7
+ name: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 2000>]>;
8
+ }>, v.FormattedStringSchema<"tid">>;
9
+ type main$schematype = typeof _mainSchema;
10
+ export interface mainSchema extends main$schematype {
11
+ }
12
+ export declare const mainSchema: mainSchema;
13
+ export interface Main extends v.InferInput<typeof mainSchema> {
14
+ }
15
+ declare module '@atcute/lexicons/ambient' {
16
+ interface Records {
17
+ 'pub.leaflet.publication': mainSchema;
18
+ }
19
+ }
20
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _mainSchema = /*#__PURE__*/ v.record(
3
+ /*#__PURE__*/ v.tidString(),
4
+ /*#__PURE__*/ v.object({
5
+ $type: /*#__PURE__*/ v.literal('pub.leaflet.publication'),
6
+ base_path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()),
7
+ description: /*#__PURE__*/ v.optional(
8
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 2000)])),
9
+ icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
10
+ name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 2000)]),
11
+ }));
12
+ export const mainSchema = _mainSchema;
13
+ //# sourceMappingURL=publication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publication.js","sourceRoot":"","sources":["../../../../../lib/lexicons/types/pub/leaflet/publication.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM;AACzC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE;AAC3B,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC;IACzD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACvE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IACpC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAC5F;IACD,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;CAClG,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,79 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _boldSchema: v.ObjectSchema<{
3
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#bold">, undefined>;
4
+ }>;
5
+ declare const _byteSliceSchema: v.ObjectSchema<{
6
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#byteSlice">, undefined>;
7
+ byteEnd: v.IntegerSchema;
8
+ byteStart: v.IntegerSchema;
9
+ }>;
10
+ declare const _highlightSchema: v.ObjectSchema<{
11
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#highlight">, undefined>;
12
+ }>;
13
+ declare const _italicSchema: v.ObjectSchema<{
14
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#italic">, undefined>;
15
+ }>;
16
+ declare const _linkSchema: v.ObjectSchema<{
17
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#link">, undefined>;
18
+ uri: v.FormattedStringSchema<"uri">;
19
+ }>;
20
+ declare const _mainSchema: v.ObjectSchema<{
21
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet">, undefined>;
22
+ readonly features: v.ArraySchema<v.VariantSchema<readonly [boldSchema, highlightSchema, italicSchema, linkSchema, strikethroughSchema, underlineSchema], boolean>>;
23
+ readonly index: byteSliceSchema;
24
+ }>;
25
+ declare const _strikethroughSchema: v.ObjectSchema<{
26
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#strikethrough">, undefined>;
27
+ }>;
28
+ declare const _underlineSchema: v.ObjectSchema<{
29
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.richtext.facet#underline">, undefined>;
30
+ }>;
31
+ type bold$schematype = typeof _boldSchema;
32
+ type byteSlice$schematype = typeof _byteSliceSchema;
33
+ type highlight$schematype = typeof _highlightSchema;
34
+ type italic$schematype = typeof _italicSchema;
35
+ type link$schematype = typeof _linkSchema;
36
+ type main$schematype = typeof _mainSchema;
37
+ type strikethrough$schematype = typeof _strikethroughSchema;
38
+ type underline$schematype = typeof _underlineSchema;
39
+ export interface boldSchema extends bold$schematype {
40
+ }
41
+ export interface byteSliceSchema extends byteSlice$schematype {
42
+ }
43
+ export interface highlightSchema extends highlight$schematype {
44
+ }
45
+ export interface italicSchema extends italic$schematype {
46
+ }
47
+ export interface linkSchema extends link$schematype {
48
+ }
49
+ export interface mainSchema extends main$schematype {
50
+ }
51
+ export interface strikethroughSchema extends strikethrough$schematype {
52
+ }
53
+ export interface underlineSchema extends underline$schematype {
54
+ }
55
+ export declare const boldSchema: boldSchema;
56
+ export declare const byteSliceSchema: byteSliceSchema;
57
+ export declare const highlightSchema: highlightSchema;
58
+ export declare const italicSchema: italicSchema;
59
+ export declare const linkSchema: linkSchema;
60
+ export declare const mainSchema: mainSchema;
61
+ export declare const strikethroughSchema: strikethroughSchema;
62
+ export declare const underlineSchema: underlineSchema;
63
+ export interface Bold extends v.InferInput<typeof boldSchema> {
64
+ }
65
+ export interface ByteSlice extends v.InferInput<typeof byteSliceSchema> {
66
+ }
67
+ export interface Highlight extends v.InferInput<typeof highlightSchema> {
68
+ }
69
+ export interface Italic extends v.InferInput<typeof italicSchema> {
70
+ }
71
+ export interface Link extends v.InferInput<typeof linkSchema> {
72
+ }
73
+ export interface Main extends v.InferInput<typeof mainSchema> {
74
+ }
75
+ export interface Strikethrough extends v.InferInput<typeof strikethroughSchema> {
76
+ }
77
+ export interface Underline extends v.InferInput<typeof underlineSchema> {
78
+ }
79
+ export {};
@@ -0,0 +1,51 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _boldSchema = /*#__PURE__*/ v.object({
3
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#bold')),
4
+ });
5
+ const _byteSliceSchema = /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#byteSlice')),
7
+ byteEnd: /*#__PURE__*/ v.integer(),
8
+ byteStart: /*#__PURE__*/ v.integer(),
9
+ });
10
+ const _highlightSchema = /*#__PURE__*/ v.object({
11
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#highlight')),
12
+ });
13
+ const _italicSchema = /*#__PURE__*/ v.object({
14
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#italic')),
15
+ });
16
+ const _linkSchema = /*#__PURE__*/ v.object({
17
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#link')),
18
+ uri: /*#__PURE__*/ v.genericUriString(),
19
+ });
20
+ const _mainSchema = /*#__PURE__*/ v.object({
21
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet')),
22
+ get features() {
23
+ return /*#__PURE__*/ v.array(
24
+ /*#__PURE__*/ v.variant([
25
+ boldSchema,
26
+ highlightSchema,
27
+ italicSchema,
28
+ linkSchema,
29
+ strikethroughSchema,
30
+ underlineSchema,
31
+ ]));
32
+ },
33
+ get index() {
34
+ return byteSliceSchema;
35
+ },
36
+ });
37
+ const _strikethroughSchema = /*#__PURE__*/ v.object({
38
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#strikethrough')),
39
+ });
40
+ const _underlineSchema = /*#__PURE__*/ v.object({
41
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#underline')),
42
+ });
43
+ export const boldSchema = _boldSchema;
44
+ export const byteSliceSchema = _byteSliceSchema;
45
+ export const highlightSchema = _highlightSchema;
46
+ export const italicSchema = _italicSchema;
47
+ export const linkSchema = _linkSchema;
48
+ export const mainSchema = _mainSchema;
49
+ export const strikethroughSchema = _strikethroughSchema;
50
+ export const underlineSchema = _underlineSchema;
51
+ //# sourceMappingURL=facet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facet.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/richtext/facet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;CAC3F,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;IAChG,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE;IAClC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE;CACpC,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;CAChG,CAAC,CAAC;AACH,MAAM,aAAa,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;CAC7F,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;IAC3F,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;CACvC,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACtF,IAAI,QAAQ;QACX,OAAO,aAAa,CAAC,CAAC,CAAC,KAAK;QAC3B,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;YACvB,UAAU;YACV,eAAe;YACf,YAAY;YACZ,UAAU;YACV,mBAAmB;YACnB,eAAe;SACf,CAAC,CACF,CAAC;IACH,CAAC;IACD,IAAI,KAAK;QACR,OAAO,eAAe,CAAC;IACxB,CAAC;CACD,CAAC,CAAC;AACH,MAAM,oBAAoB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;CACpG,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;CAChG,CAAC,CAAC;AAoBH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAmC,CAAC;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAmC,CAAC;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,aAA6B,CAAC;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAA2C,CAAC;AAC/E,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAmC,CAAC"}
package/lib/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lexicons/index.js';
@@ -0,0 +1,8 @@
1
+ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
2
+ export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
3
+ export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
4
+ export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
5
+ export * as PubLeafletDocument from './types/pub/leaflet/document.js';
6
+ export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
7
+ export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
8
+ export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
@@ -0,0 +1,22 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.blocks.header')),
7
+ get facets() {
8
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
9
+ },
10
+ level: /*#__PURE__*/ v.optional(
11
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 6)]),
12
+ ),
13
+ plaintext: /*#__PURE__*/ v.string(),
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> {}
@@ -0,0 +1,28 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.blocks.image#aspectRatio')),
6
+ height: /*#__PURE__*/ v.integer(),
7
+ width: /*#__PURE__*/ v.integer(),
8
+ });
9
+ const _mainSchema = /*#__PURE__*/ v.object({
10
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.image')),
11
+ alt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
12
+ get aspectRatio() {
13
+ return aspectRatioSchema;
14
+ },
15
+ image: /*#__PURE__*/ v.blob(),
16
+ });
17
+
18
+ type aspectRatio$schematype = typeof _aspectRatioSchema;
19
+ type main$schematype = typeof _mainSchema;
20
+
21
+ export interface aspectRatioSchema extends aspectRatio$schematype {}
22
+ export interface mainSchema extends main$schematype {}
23
+
24
+ export const aspectRatioSchema = _aspectRatioSchema as aspectRatioSchema;
25
+ export const mainSchema = _mainSchema as mainSchema;
26
+
27
+ export interface AspectRatio extends v.InferInput<typeof aspectRatioSchema> {}
28
+ export interface Main extends v.InferInput<typeof mainSchema> {}
@@ -0,0 +1,19 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.blocks.text')),
7
+ get facets() {
8
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
9
+ },
10
+ plaintext: /*#__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> {}
@@ -0,0 +1,37 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.blocks.unorderedList#listItem')),
9
+ get children() {
10
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(listItemSchema));
11
+ },
12
+ get content() {
13
+ return /*#__PURE__*/ v.variant([
14
+ PubLeafletBlocksHeader.mainSchema,
15
+ PubLeafletBlocksImage.mainSchema,
16
+ PubLeafletBlocksText.mainSchema,
17
+ ]);
18
+ },
19
+ });
20
+ const _mainSchema = /*#__PURE__*/ v.object({
21
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.unorderedList')),
22
+ get children() {
23
+ return /*#__PURE__*/ v.array(listItemSchema);
24
+ },
25
+ });
26
+
27
+ type listItem$schematype = typeof _listItemSchema;
28
+ type main$schematype = typeof _mainSchema;
29
+
30
+ export interface listItemSchema extends listItem$schematype {}
31
+ export interface mainSchema extends main$schematype {}
32
+
33
+ export const listItemSchema = _listItemSchema as listItemSchema;
34
+ export const mainSchema = _mainSchema as mainSchema;
35
+
36
+ export interface ListItem extends v.InferInput<typeof listItemSchema> {}
37
+ export interface Main extends v.InferInput<typeof mainSchema> {}
@@ -0,0 +1,41 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
5
+
6
+ const _mainSchema = /*#__PURE__*/ v.record(
7
+ /*#__PURE__*/ v.tidString(),
8
+ /*#__PURE__*/ v.object({
9
+ $type: /*#__PURE__*/ v.literal('pub.leaflet.document'),
10
+ author: /*#__PURE__*/ v.actorIdentifierString(),
11
+ description: /*#__PURE__*/ v.optional(
12
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
13
+ /*#__PURE__*/ v.stringLength(0, 3000),
14
+ /*#__PURE__*/ v.stringGraphemes(0, 300),
15
+ ]),
16
+ ),
17
+ get pages() {
18
+ return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([PubLeafletPagesLinearDocument.mainSchema]));
19
+ },
20
+ publication: /*#__PURE__*/ v.resourceUriString(),
21
+ publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
22
+ title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
23
+ /*#__PURE__*/ v.stringLength(0, 1280),
24
+ /*#__PURE__*/ v.stringGraphemes(0, 128),
25
+ ]),
26
+ }),
27
+ );
28
+
29
+ type main$schematype = typeof _mainSchema;
30
+
31
+ export interface mainSchema extends main$schematype {}
32
+
33
+ export const mainSchema = _mainSchema as mainSchema;
34
+
35
+ export interface Main extends v.InferInput<typeof mainSchema> {}
36
+
37
+ declare module '@atcute/lexicons/ambient' {
38
+ interface Records {
39
+ 'pub.leaflet.document': mainSchema;
40
+ }
41
+ }
@@ -0,0 +1,54 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import * as PubLeafletBlocksHeader from '../blocks/header.js';
4
+ import * as PubLeafletBlocksImage from '../blocks/image.js';
5
+ import * as PubLeafletBlocksText from '../blocks/text.js';
6
+ import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
7
+
8
+ const _blockSchema = /*#__PURE__*/ v.object({
9
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#block')),
10
+ alignment: /*#__PURE__*/ v.optional(
11
+ /*#__PURE__*/ v.string<'#textAlignCenter' | '#textAlignLeft' | '#textAlignRight' | (string & {})>(),
12
+ ),
13
+ get block() {
14
+ return /*#__PURE__*/ v.variant([
15
+ PubLeafletBlocksHeader.mainSchema,
16
+ PubLeafletBlocksImage.mainSchema,
17
+ PubLeafletBlocksText.mainSchema,
18
+ PubLeafletBlocksUnorderedList.mainSchema,
19
+ ]);
20
+ },
21
+ });
22
+ const _mainSchema = /*#__PURE__*/ v.object({
23
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument')),
24
+ get blocks() {
25
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(blockSchema));
26
+ },
27
+ });
28
+ const _textAlignCenterSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignCenter');
29
+ const _textAlignLeftSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignLeft');
30
+ const _textAlignRightSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignRight');
31
+
32
+ type block$schematype = typeof _blockSchema;
33
+ type main$schematype = typeof _mainSchema;
34
+ type textAlignCenter$schematype = typeof _textAlignCenterSchema;
35
+ type textAlignLeft$schematype = typeof _textAlignLeftSchema;
36
+ type textAlignRight$schematype = typeof _textAlignRightSchema;
37
+
38
+ export interface blockSchema extends block$schematype {}
39
+ export interface mainSchema extends main$schematype {}
40
+ export interface textAlignCenterSchema extends textAlignCenter$schematype {}
41
+ export interface textAlignLeftSchema extends textAlignLeft$schematype {}
42
+ export interface textAlignRightSchema extends textAlignRight$schematype {}
43
+
44
+ export const blockSchema = _blockSchema as blockSchema;
45
+ export const mainSchema = _mainSchema as mainSchema;
46
+ export const textAlignCenterSchema = _textAlignCenterSchema as textAlignCenterSchema;
47
+ export const textAlignLeftSchema = _textAlignLeftSchema as textAlignLeftSchema;
48
+ export const textAlignRightSchema = _textAlignRightSchema as textAlignRightSchema;
49
+
50
+ export interface Block extends v.InferInput<typeof blockSchema> {}
51
+ export interface Main extends v.InferInput<typeof mainSchema> {}
52
+ export type TextAlignCenter = v.InferInput<typeof textAlignCenterSchema>;
53
+ export type TextAlignLeft = v.InferInput<typeof textAlignLeftSchema>;
54
+ export type TextAlignRight = v.InferInput<typeof textAlignRightSchema>;
@@ -0,0 +1,30 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+
5
+ const _mainSchema = /*#__PURE__*/ v.record(
6
+ /*#__PURE__*/ v.tidString(),
7
+ /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.literal('pub.leaflet.publication'),
9
+ base_path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()),
10
+ description: /*#__PURE__*/ v.optional(
11
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 2000)]),
12
+ ),
13
+ icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
14
+ name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 2000)]),
15
+ }),
16
+ );
17
+
18
+ type main$schematype = typeof _mainSchema;
19
+
20
+ export interface mainSchema extends main$schematype {}
21
+
22
+ export const mainSchema = _mainSchema as mainSchema;
23
+
24
+ export interface Main extends v.InferInput<typeof mainSchema> {}
25
+
26
+ declare module '@atcute/lexicons/ambient' {
27
+ interface Records {
28
+ 'pub.leaflet.publication': mainSchema;
29
+ }
30
+ }
@@ -0,0 +1,81 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#bold')),
6
+ });
7
+ const _byteSliceSchema = /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#byteSlice')),
9
+ byteEnd: /*#__PURE__*/ v.integer(),
10
+ byteStart: /*#__PURE__*/ v.integer(),
11
+ });
12
+ const _highlightSchema = /*#__PURE__*/ v.object({
13
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#highlight')),
14
+ });
15
+ const _italicSchema = /*#__PURE__*/ v.object({
16
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#italic')),
17
+ });
18
+ const _linkSchema = /*#__PURE__*/ v.object({
19
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#link')),
20
+ uri: /*#__PURE__*/ v.genericUriString(),
21
+ });
22
+ const _mainSchema = /*#__PURE__*/ v.object({
23
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet')),
24
+ get features() {
25
+ return /*#__PURE__*/ v.array(
26
+ /*#__PURE__*/ v.variant([
27
+ boldSchema,
28
+ highlightSchema,
29
+ italicSchema,
30
+ linkSchema,
31
+ strikethroughSchema,
32
+ underlineSchema,
33
+ ]),
34
+ );
35
+ },
36
+ get index() {
37
+ return byteSliceSchema;
38
+ },
39
+ });
40
+ const _strikethroughSchema = /*#__PURE__*/ v.object({
41
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#strikethrough')),
42
+ });
43
+ const _underlineSchema = /*#__PURE__*/ v.object({
44
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.richtext.facet#underline')),
45
+ });
46
+
47
+ type bold$schematype = typeof _boldSchema;
48
+ type byteSlice$schematype = typeof _byteSliceSchema;
49
+ type highlight$schematype = typeof _highlightSchema;
50
+ type italic$schematype = typeof _italicSchema;
51
+ type link$schematype = typeof _linkSchema;
52
+ type main$schematype = typeof _mainSchema;
53
+ type strikethrough$schematype = typeof _strikethroughSchema;
54
+ type underline$schematype = typeof _underlineSchema;
55
+
56
+ export interface boldSchema extends bold$schematype {}
57
+ export interface byteSliceSchema extends byteSlice$schematype {}
58
+ export interface highlightSchema extends highlight$schematype {}
59
+ export interface italicSchema extends italic$schematype {}
60
+ export interface linkSchema extends link$schematype {}
61
+ export interface mainSchema extends main$schematype {}
62
+ export interface strikethroughSchema extends strikethrough$schematype {}
63
+ export interface underlineSchema extends underline$schematype {}
64
+
65
+ export const boldSchema = _boldSchema as boldSchema;
66
+ export const byteSliceSchema = _byteSliceSchema as byteSliceSchema;
67
+ export const highlightSchema = _highlightSchema as highlightSchema;
68
+ export const italicSchema = _italicSchema as italicSchema;
69
+ export const linkSchema = _linkSchema as linkSchema;
70
+ export const mainSchema = _mainSchema as mainSchema;
71
+ export const strikethroughSchema = _strikethroughSchema as strikethroughSchema;
72
+ export const underlineSchema = _underlineSchema as underlineSchema;
73
+
74
+ export interface Bold extends v.InferInput<typeof boldSchema> {}
75
+ export interface ByteSlice extends v.InferInput<typeof byteSliceSchema> {}
76
+ export interface Highlight extends v.InferInput<typeof highlightSchema> {}
77
+ export interface Italic extends v.InferInput<typeof italicSchema> {}
78
+ export interface Link extends v.InferInput<typeof linkSchema> {}
79
+ export interface Main extends v.InferInput<typeof mainSchema> {}
80
+ export interface Strikethrough extends v.InferInput<typeof strikethroughSchema> {}
81
+ export interface Underline extends v.InferInput<typeof underlineSchema> {}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "type": "module",
3
+ "name": "@atcute/leaflet",
4
+ "version": "1.0.0",
5
+ "description": "Leaflet (pub.leaflet.*) schema definitions",
6
+ "keywords": [
7
+ "atcute",
8
+ "atproto",
9
+ "leaflet"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "url": "https://github.com/mary-ext/atcute",
14
+ "directory": "packages/definitions/leaflet"
15
+ },
16
+ "files": [
17
+ "dist/",
18
+ "lib/",
19
+ "!lib/**/*.bench.ts",
20
+ "!lib/**/*.test.ts"
21
+ ],
22
+ "exports": {
23
+ ".": "./dist/index.js",
24
+ "./types/*": "./dist/lexicons/types/pub/leaflet/*.js"
25
+ },
26
+ "dependencies": {
27
+ "@atcute/lexicons": "^1.0.3"
28
+ },
29
+ "devDependencies": {
30
+ "@atcute/leaflet": "file:",
31
+ "vitest": "^3.1.3",
32
+ "@atcute/lex-cli": "^2.0.2"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc",
36
+ "test": "vitest",
37
+ "generate": "rm -r ./lib/lexicons/; lex-cli generate -c ./lex.config.js",
38
+ "prepublish": "rm -rf dist; pnpm run build"
39
+ }
40
+ }