@atcute/leaflet 1.0.5 → 1.0.7

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.
@@ -3,6 +3,7 @@ export * as PubLeafletBlocksBskyPost from './types/pub/leaflet/blocks/bskyPost.j
3
3
  export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js';
4
4
  export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
5
5
  export * as PubLeafletBlocksHorizontalRule from './types/pub/leaflet/blocks/horizontalRule.js';
6
+ export * as PubLeafletBlocksIframe from './types/pub/leaflet/blocks/iframe.js';
6
7
  export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
7
8
  export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js';
8
9
  export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
@@ -3,6 +3,7 @@ export * as PubLeafletBlocksBskyPost from './types/pub/leaflet/blocks/bskyPost.j
3
3
  export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js';
4
4
  export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
5
5
  export * as PubLeafletBlocksHorizontalRule from './types/pub/leaflet/blocks/horizontalRule.js';
6
+ export * as PubLeafletBlocksIframe from './types/pub/leaflet/blocks/iframe.js';
6
7
  export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
7
8
  export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js';
8
9
  export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,0BAA0B,MAAM,0CAA0C,CAAC;AACvF,OAAO,KAAK,wBAAwB,MAAM,wCAAwC,CAAC;AACnF,OAAO,KAAK,oBAAoB,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,sBAAsB,MAAM,sCA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7F,OAAO,KAAK,uBAAuB,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,iBAAiB,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,kBAAkB,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,2BAA2B,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC;AAC7F,OAAO,KAAK,qBAAqB,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,uBAAuB,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,8BAA8B,MAAM,8CAA8C,CAAC;AAC/F,OAAO,KAAK,oBAAoB,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.ObjectSchema<{
3
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.iframe">, undefined>;
4
+ height: v.OptionalSchema<v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<16, 1600>]>, undefined>;
5
+ url: v.FormattedStringSchema<"uri">;
6
+ }>;
7
+ type main$schematype = typeof _mainSchema;
8
+ export interface mainSchema extends main$schematype {
9
+ }
10
+ export declare const mainSchema: mainSchema;
11
+ export interface Main extends v.InferInput<typeof mainSchema> {
12
+ }
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _mainSchema = /*#__PURE__*/ v.object({
3
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.blocks.iframe')),
4
+ height: /*#__PURE__*/ v.optional(
5
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(16, 1600)])),
6
+ url: /*#__PURE__*/ v.genericUriString(),
7
+ });
8
+ export const mainSchema = _mainSchema;
9
+ //# sourceMappingURL=iframe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iframe.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/iframe.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,2BAA2B,CAAC,CAAC;IACrF,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAC/B,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAC9F;IACD,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;CACvC,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -1,7 +1,14 @@
1
1
  import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
2
3
  import * as PubLeafletRichtextFacet from './richtext/facet.js';
4
+ declare const _linearDocumentQuoteSchema: v.ObjectSchema<{
5
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.comment#linearDocumentQuote">, undefined>;
6
+ document: v.FormattedStringSchema<"at-uri">;
7
+ readonly quote: PubLeafletPagesLinearDocument.quoteSchema;
8
+ }>;
3
9
  declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
4
10
  $type: v.LiteralSchema<"pub.leaflet.comment">;
11
+ readonly attachment: v.OptionalSchema<v.VariantSchema<readonly [linearDocumentQuoteSchema], boolean>, undefined>;
5
12
  createdAt: v.FormattedStringSchema<"datetime">;
6
13
  readonly facets: v.OptionalSchema<v.ArraySchema<PubLeafletRichtextFacet.mainSchema>, undefined>;
7
14
  plaintext: v.StringSchema<string>;
@@ -12,14 +19,20 @@ declare const _replyRefSchema: v.ObjectSchema<{
12
19
  $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.comment#replyRef">, undefined>;
13
20
  parent: v.FormattedStringSchema<"at-uri">;
14
21
  }>;
22
+ type linearDocumentQuote$schematype = typeof _linearDocumentQuoteSchema;
15
23
  type main$schematype = typeof _mainSchema;
16
24
  type replyRef$schematype = typeof _replyRefSchema;
25
+ export interface linearDocumentQuoteSchema extends linearDocumentQuote$schematype {
26
+ }
17
27
  export interface mainSchema extends main$schematype {
18
28
  }
19
29
  export interface replyRefSchema extends replyRef$schematype {
20
30
  }
31
+ export declare const linearDocumentQuoteSchema: linearDocumentQuoteSchema;
21
32
  export declare const mainSchema: mainSchema;
22
33
  export declare const replyRefSchema: replyRefSchema;
34
+ export interface LinearDocumentQuote extends v.InferInput<typeof linearDocumentQuoteSchema> {
35
+ }
23
36
  export interface Main extends v.InferInput<typeof mainSchema> {
24
37
  }
25
38
  export interface ReplyRef extends v.InferInput<typeof replyRefSchema> {
@@ -1,9 +1,20 @@
1
1
  import * as v from '@atcute/lexicons/validations';
2
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
2
3
  import * as PubLeafletRichtextFacet from './richtext/facet.js';
4
+ const _linearDocumentQuoteSchema = /*#__PURE__*/ v.object({
5
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.comment#linearDocumentQuote')),
6
+ document: /*#__PURE__*/ v.resourceUriString(),
7
+ get quote() {
8
+ return PubLeafletPagesLinearDocument.quoteSchema;
9
+ },
10
+ });
3
11
  const _mainSchema = /*#__PURE__*/ v.record(
4
12
  /*#__PURE__*/ v.tidString(),
5
13
  /*#__PURE__*/ v.object({
6
14
  $type: /*#__PURE__*/ v.literal('pub.leaflet.comment'),
15
+ get attachment() {
16
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([linearDocumentQuoteSchema]));
17
+ },
7
18
  createdAt: /*#__PURE__*/ v.datetimeString(),
8
19
  get facets() {
9
20
  return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
@@ -18,6 +29,7 @@ const _replyRefSchema = /*#__PURE__*/ v.object({
18
29
  $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.comment#replyRef')),
19
30
  parent: /*#__PURE__*/ v.resourceUriString(),
20
31
  });
32
+ export const linearDocumentQuoteSchema = _linearDocumentQuoteSchema;
21
33
  export const mainSchema = _mainSchema;
22
34
  export const replyRefSchema = _replyRefSchema;
23
35
  //# sourceMappingURL=comment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../../lib/lexicons/types/pub/leaflet/comment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,uBAAuB,MAAM,qBAAqB,CAAC;AAE/D,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,qBAAqB,CAAC;IACrD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE;IAC3C,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;IACnC,IAAI,KAAK;QACR,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAC5C,CAAC,CACF,CAAC;AACF,MAAM,eAAe,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AAC;IACD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE;IAC3C,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;IACnC,IAAI,KAAK;QACR,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAC5C,CAAC,CACF,CAAC;AACF,MAAM,eAAe,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxF,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAC3C,CAAC,CAAC;AAUH,MAAM,CAAC,MAAM,yBAAyB,GAAG,0BAAuD,CAAC;AACjG,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,eAAiC,CAAC"}
@@ -4,6 +4,7 @@ import * as PubLeafletBlocksBskyPost from '../blocks/bskyPost.js';
4
4
  import * as PubLeafletBlocksCode from '../blocks/code.js';
5
5
  import * as PubLeafletBlocksHeader from '../blocks/header.js';
6
6
  import * as PubLeafletBlocksHorizontalRule from '../blocks/horizontalRule.js';
7
+ import * as PubLeafletBlocksIframe from '../blocks/iframe.js';
7
8
  import * as PubLeafletBlocksImage from '../blocks/image.js';
8
9
  import * as PubLeafletBlocksMath from '../blocks/math.js';
9
10
  import * as PubLeafletBlocksText from '../blocks/text.js';
@@ -12,17 +13,29 @@ import * as PubLeafletBlocksWebsite from '../blocks/website.js';
12
13
  declare const _blockSchema: v.ObjectSchema<{
13
14
  $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument#block">, undefined>;
14
15
  alignment: v.OptionalSchema<v.StringSchema<(string & {}) | "#textAlignCenter" | "#textAlignLeft" | "#textAlignRight">, undefined>;
15
- readonly block: v.VariantSchema<readonly [PubLeafletBlocksBlockquote.mainSchema, PubLeafletBlocksBskyPost.mainSchema, PubLeafletBlocksCode.mainSchema, PubLeafletBlocksHeader.mainSchema, PubLeafletBlocksHorizontalRule.mainSchema, PubLeafletBlocksImage.mainSchema, PubLeafletBlocksMath.mainSchema, PubLeafletBlocksText.mainSchema, PubLeafletBlocksUnorderedList.mainSchema, PubLeafletBlocksWebsite.mainSchema], boolean>;
16
+ readonly block: v.VariantSchema<readonly [PubLeafletBlocksBlockquote.mainSchema, PubLeafletBlocksBskyPost.mainSchema, PubLeafletBlocksCode.mainSchema, PubLeafletBlocksHeader.mainSchema, PubLeafletBlocksHorizontalRule.mainSchema, PubLeafletBlocksIframe.mainSchema, PubLeafletBlocksImage.mainSchema, PubLeafletBlocksMath.mainSchema, PubLeafletBlocksText.mainSchema, PubLeafletBlocksUnorderedList.mainSchema, PubLeafletBlocksWebsite.mainSchema], boolean>;
16
17
  }>;
17
18
  declare const _mainSchema: v.ObjectSchema<{
18
19
  $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument">, undefined>;
19
20
  readonly blocks: v.OptionalSchema<v.ArraySchema<blockSchema>, undefined>;
20
21
  }>;
22
+ declare const _positionSchema: v.ObjectSchema<{
23
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument#position">, undefined>;
24
+ block: v.ArraySchema<v.IntegerSchema>;
25
+ offset: v.IntegerSchema;
26
+ }>;
27
+ declare const _quoteSchema: v.ObjectSchema<{
28
+ $type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument#quote">, undefined>;
29
+ readonly end: positionSchema;
30
+ readonly start: positionSchema;
31
+ }>;
21
32
  declare const _textAlignCenterSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignCenter">;
22
33
  declare const _textAlignLeftSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignLeft">;
23
34
  declare const _textAlignRightSchema: v.LiteralSchema<"pub.leaflet.pages.linearDocument#textAlignRight">;
24
35
  type block$schematype = typeof _blockSchema;
25
36
  type main$schematype = typeof _mainSchema;
37
+ type position$schematype = typeof _positionSchema;
38
+ type quote$schematype = typeof _quoteSchema;
26
39
  type textAlignCenter$schematype = typeof _textAlignCenterSchema;
27
40
  type textAlignLeft$schematype = typeof _textAlignLeftSchema;
28
41
  type textAlignRight$schematype = typeof _textAlignRightSchema;
@@ -30,6 +43,10 @@ export interface blockSchema extends block$schematype {
30
43
  }
31
44
  export interface mainSchema extends main$schematype {
32
45
  }
46
+ export interface positionSchema extends position$schematype {
47
+ }
48
+ export interface quoteSchema extends quote$schematype {
49
+ }
33
50
  export interface textAlignCenterSchema extends textAlignCenter$schematype {
34
51
  }
35
52
  export interface textAlignLeftSchema extends textAlignLeft$schematype {
@@ -38,6 +55,8 @@ export interface textAlignRightSchema extends textAlignRight$schematype {
38
55
  }
39
56
  export declare const blockSchema: blockSchema;
40
57
  export declare const mainSchema: mainSchema;
58
+ export declare const positionSchema: positionSchema;
59
+ export declare const quoteSchema: quoteSchema;
41
60
  export declare const textAlignCenterSchema: textAlignCenterSchema;
42
61
  export declare const textAlignLeftSchema: textAlignLeftSchema;
43
62
  export declare const textAlignRightSchema: textAlignRightSchema;
@@ -45,6 +64,10 @@ export interface Block extends v.InferInput<typeof blockSchema> {
45
64
  }
46
65
  export interface Main extends v.InferInput<typeof mainSchema> {
47
66
  }
67
+ export interface Position extends v.InferInput<typeof positionSchema> {
68
+ }
69
+ export interface Quote extends v.InferInput<typeof quoteSchema> {
70
+ }
48
71
  export type TextAlignCenter = v.InferInput<typeof textAlignCenterSchema>;
49
72
  export type TextAlignLeft = v.InferInput<typeof textAlignLeftSchema>;
50
73
  export type TextAlignRight = v.InferInput<typeof textAlignRightSchema>;
@@ -4,6 +4,7 @@ import * as PubLeafletBlocksBskyPost from '../blocks/bskyPost.js';
4
4
  import * as PubLeafletBlocksCode from '../blocks/code.js';
5
5
  import * as PubLeafletBlocksHeader from '../blocks/header.js';
6
6
  import * as PubLeafletBlocksHorizontalRule from '../blocks/horizontalRule.js';
7
+ import * as PubLeafletBlocksIframe from '../blocks/iframe.js';
7
8
  import * as PubLeafletBlocksImage from '../blocks/image.js';
8
9
  import * as PubLeafletBlocksMath from '../blocks/math.js';
9
10
  import * as PubLeafletBlocksText from '../blocks/text.js';
@@ -20,6 +21,7 @@ const _blockSchema = /*#__PURE__*/ v.object({
20
21
  PubLeafletBlocksCode.mainSchema,
21
22
  PubLeafletBlocksHeader.mainSchema,
22
23
  PubLeafletBlocksHorizontalRule.mainSchema,
24
+ PubLeafletBlocksIframe.mainSchema,
23
25
  PubLeafletBlocksImage.mainSchema,
24
26
  PubLeafletBlocksMath.mainSchema,
25
27
  PubLeafletBlocksText.mainSchema,
@@ -34,11 +36,27 @@ const _mainSchema = /*#__PURE__*/ v.object({
34
36
  return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(blockSchema));
35
37
  },
36
38
  });
39
+ const _positionSchema = /*#__PURE__*/ v.object({
40
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#position')),
41
+ block: /*#__PURE__*/ v.array(/*#__PURE__*/ v.integer()),
42
+ offset: /*#__PURE__*/ v.integer(),
43
+ });
44
+ const _quoteSchema = /*#__PURE__*/ v.object({
45
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#quote')),
46
+ get end() {
47
+ return positionSchema;
48
+ },
49
+ get start() {
50
+ return positionSchema;
51
+ },
52
+ });
37
53
  const _textAlignCenterSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignCenter');
38
54
  const _textAlignLeftSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignLeft');
39
55
  const _textAlignRightSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignRight');
40
56
  export const blockSchema = _blockSchema;
41
57
  export const mainSchema = _mainSchema;
58
+ export const positionSchema = _positionSchema;
59
+ export const quoteSchema = _quoteSchema;
42
60
  export const textAlignCenterSchema = _textAlignCenterSchema;
43
61
  export const textAlignLeftSchema = _textAlignLeftSchema;
44
62
  export const textAlignRightSchema = _textAlignRightSchema;
@@ -1 +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,0BAA0B,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,wBAAwB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,sBAAsB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,8BAA8B,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,qBAAqB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,oBAAoB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,6BAA6B,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,uBAAuB,MAAM,sBAAsB,CAAC;AAEhE,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,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AAC,CAAC,OAAO,CAAC,gDAAgD,CAAC,CAAC;AACvG,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC;AAkBzG,MAAM,CAAC,MAAM,WAAW,GAAG,YAA2B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,eAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,YAA2B,CAAC;AACvD,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"}
@@ -3,6 +3,7 @@ export * as PubLeafletBlocksBskyPost from './types/pub/leaflet/blocks/bskyPost.j
3
3
  export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js';
4
4
  export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
5
5
  export * as PubLeafletBlocksHorizontalRule from './types/pub/leaflet/blocks/horizontalRule.js';
6
+ export * as PubLeafletBlocksIframe from './types/pub/leaflet/blocks/iframe.js';
6
7
  export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
7
8
  export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js';
8
9
  export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
@@ -0,0 +1,18 @@
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(/*#__PURE__*/ v.literal('pub.leaflet.blocks.iframe')),
6
+ height: /*#__PURE__*/ v.optional(
7
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(16, 1600)]),
8
+ ),
9
+ url: /*#__PURE__*/ v.genericUriString(),
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> {}
@@ -1,12 +1,23 @@
1
1
  import type {} from '@atcute/lexicons';
2
2
  import * as v from '@atcute/lexicons/validations';
3
3
  import type {} from '@atcute/lexicons/ambient';
4
+ import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
4
5
  import * as PubLeafletRichtextFacet from './richtext/facet.js';
5
6
 
7
+ const _linearDocumentQuoteSchema = /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.comment#linearDocumentQuote')),
9
+ document: /*#__PURE__*/ v.resourceUriString(),
10
+ get quote() {
11
+ return PubLeafletPagesLinearDocument.quoteSchema;
12
+ },
13
+ });
6
14
  const _mainSchema = /*#__PURE__*/ v.record(
7
15
  /*#__PURE__*/ v.tidString(),
8
16
  /*#__PURE__*/ v.object({
9
17
  $type: /*#__PURE__*/ v.literal('pub.leaflet.comment'),
18
+ get attachment() {
19
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([linearDocumentQuoteSchema]));
20
+ },
10
21
  createdAt: /*#__PURE__*/ v.datetimeString(),
11
22
  get facets() {
12
23
  return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(PubLeafletRichtextFacet.mainSchema));
@@ -23,15 +34,19 @@ const _replyRefSchema = /*#__PURE__*/ v.object({
23
34
  parent: /*#__PURE__*/ v.resourceUriString(),
24
35
  });
25
36
 
37
+ type linearDocumentQuote$schematype = typeof _linearDocumentQuoteSchema;
26
38
  type main$schematype = typeof _mainSchema;
27
39
  type replyRef$schematype = typeof _replyRefSchema;
28
40
 
41
+ export interface linearDocumentQuoteSchema extends linearDocumentQuote$schematype {}
29
42
  export interface mainSchema extends main$schematype {}
30
43
  export interface replyRefSchema extends replyRef$schematype {}
31
44
 
45
+ export const linearDocumentQuoteSchema = _linearDocumentQuoteSchema as linearDocumentQuoteSchema;
32
46
  export const mainSchema = _mainSchema as mainSchema;
33
47
  export const replyRefSchema = _replyRefSchema as replyRefSchema;
34
48
 
49
+ export interface LinearDocumentQuote extends v.InferInput<typeof linearDocumentQuoteSchema> {}
35
50
  export interface Main extends v.InferInput<typeof mainSchema> {}
36
51
  export interface ReplyRef extends v.InferInput<typeof replyRefSchema> {}
37
52
 
@@ -5,6 +5,7 @@ import * as PubLeafletBlocksBskyPost from '../blocks/bskyPost.js';
5
5
  import * as PubLeafletBlocksCode from '../blocks/code.js';
6
6
  import * as PubLeafletBlocksHeader from '../blocks/header.js';
7
7
  import * as PubLeafletBlocksHorizontalRule from '../blocks/horizontalRule.js';
8
+ import * as PubLeafletBlocksIframe from '../blocks/iframe.js';
8
9
  import * as PubLeafletBlocksImage from '../blocks/image.js';
9
10
  import * as PubLeafletBlocksMath from '../blocks/math.js';
10
11
  import * as PubLeafletBlocksText from '../blocks/text.js';
@@ -23,6 +24,7 @@ const _blockSchema = /*#__PURE__*/ v.object({
23
24
  PubLeafletBlocksCode.mainSchema,
24
25
  PubLeafletBlocksHeader.mainSchema,
25
26
  PubLeafletBlocksHorizontalRule.mainSchema,
27
+ PubLeafletBlocksIframe.mainSchema,
26
28
  PubLeafletBlocksImage.mainSchema,
27
29
  PubLeafletBlocksMath.mainSchema,
28
30
  PubLeafletBlocksText.mainSchema,
@@ -37,30 +39,52 @@ const _mainSchema = /*#__PURE__*/ v.object({
37
39
  return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(blockSchema));
38
40
  },
39
41
  });
42
+ const _positionSchema = /*#__PURE__*/ v.object({
43
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#position')),
44
+ block: /*#__PURE__*/ v.array(/*#__PURE__*/ v.integer()),
45
+ offset: /*#__PURE__*/ v.integer(),
46
+ });
47
+ const _quoteSchema = /*#__PURE__*/ v.object({
48
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#quote')),
49
+ get end() {
50
+ return positionSchema;
51
+ },
52
+ get start() {
53
+ return positionSchema;
54
+ },
55
+ });
40
56
  const _textAlignCenterSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignCenter');
41
57
  const _textAlignLeftSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignLeft');
42
58
  const _textAlignRightSchema = /*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#textAlignRight');
43
59
 
44
60
  type block$schematype = typeof _blockSchema;
45
61
  type main$schematype = typeof _mainSchema;
62
+ type position$schematype = typeof _positionSchema;
63
+ type quote$schematype = typeof _quoteSchema;
46
64
  type textAlignCenter$schematype = typeof _textAlignCenterSchema;
47
65
  type textAlignLeft$schematype = typeof _textAlignLeftSchema;
48
66
  type textAlignRight$schematype = typeof _textAlignRightSchema;
49
67
 
50
68
  export interface blockSchema extends block$schematype {}
51
69
  export interface mainSchema extends main$schematype {}
70
+ export interface positionSchema extends position$schematype {}
71
+ export interface quoteSchema extends quote$schematype {}
52
72
  export interface textAlignCenterSchema extends textAlignCenter$schematype {}
53
73
  export interface textAlignLeftSchema extends textAlignLeft$schematype {}
54
74
  export interface textAlignRightSchema extends textAlignRight$schematype {}
55
75
 
56
76
  export const blockSchema = _blockSchema as blockSchema;
57
77
  export const mainSchema = _mainSchema as mainSchema;
78
+ export const positionSchema = _positionSchema as positionSchema;
79
+ export const quoteSchema = _quoteSchema as quoteSchema;
58
80
  export const textAlignCenterSchema = _textAlignCenterSchema as textAlignCenterSchema;
59
81
  export const textAlignLeftSchema = _textAlignLeftSchema as textAlignLeftSchema;
60
82
  export const textAlignRightSchema = _textAlignRightSchema as textAlignRightSchema;
61
83
 
62
84
  export interface Block extends v.InferInput<typeof blockSchema> {}
63
85
  export interface Main extends v.InferInput<typeof mainSchema> {}
86
+ export interface Position extends v.InferInput<typeof positionSchema> {}
87
+ export interface Quote extends v.InferInput<typeof quoteSchema> {}
64
88
  export type TextAlignCenter = v.InferInput<typeof textAlignCenterSchema>;
65
89
  export type TextAlignLeft = v.InferInput<typeof textAlignLeftSchema>;
66
90
  export type TextAlignRight = v.InferInput<typeof textAlignRightSchema>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@atcute/leaflet",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "description": "Leaflet (pub.leaflet.*) schema definitions",
6
6
  "keywords": [
7
7
  "atcute",
@@ -24,7 +24,7 @@
24
24
  "./types/*": "./dist/lexicons/types/pub/leaflet/*.js"
25
25
  },
26
26
  "dependencies": {
27
- "@atcute/atproto": "^3.1.2",
27
+ "@atcute/atproto": "^3.1.4",
28
28
  "@atcute/lexicons": "^1.1.1"
29
29
  },
30
30
  "devDependencies": {