@atcute/leaflet 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +12 -15
- package/dist/lexicons/index.d.ts +2 -0
- package/dist/lexicons/index.js +2 -0
- package/dist/lexicons/index.js.map +1 -1
- package/dist/lexicons/types/pub/leaflet/blocks/website.d.ts +15 -0
- package/dist/lexicons/types/pub/leaflet/blocks/website.js +10 -0
- package/dist/lexicons/types/pub/leaflet/blocks/website.js.map +1 -0
- package/dist/lexicons/types/pub/leaflet/document.d.ts +2 -0
- package/dist/lexicons/types/pub/leaflet/document.js +4 -0
- package/dist/lexicons/types/pub/leaflet/document.js.map +1 -1
- package/dist/lexicons/types/pub/leaflet/graph/subscription.d.ts +17 -0
- package/dist/lexicons/types/pub/leaflet/graph/subscription.js +9 -0
- package/dist/lexicons/types/pub/leaflet/graph/subscription.js.map +1 -0
- package/dist/lexicons/types/pub/leaflet/pages/linearDocument.d.ts +2 -1
- package/dist/lexicons/types/pub/leaflet/pages/linearDocument.js +2 -0
- package/dist/lexicons/types/pub/leaflet/pages/linearDocument.js.map +1 -1
- package/lib/lexicons/index.ts +2 -0
- package/lib/lexicons/types/pub/leaflet/blocks/website.ts +18 -0
- package/lib/lexicons/types/pub/leaflet/document.ts +4 -0
- package/lib/lexicons/types/pub/leaflet/graph/subscription.ts +25 -0
- package/lib/lexicons/types/pub/leaflet/pages/linearDocument.ts +2 -0
- package/package.json +6 -5
package/LICENSE
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
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:
|
|
1
|
+
BSD Zero Clause License
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
copies or substantial portions of the Software.
|
|
3
|
+
Copyright (c) 2025 Mary
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/dist/lexicons/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
|
|
|
2
2
|
export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
|
|
3
3
|
export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
|
|
4
4
|
export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
|
|
5
|
+
export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js';
|
|
5
6
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
7
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
8
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
9
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
10
|
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
|
package/dist/lexicons/index.js
CHANGED
|
@@ -2,7 +2,9 @@ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
|
|
|
2
2
|
export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
|
|
3
3
|
export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
|
|
4
4
|
export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
|
|
5
|
+
export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js';
|
|
5
6
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
7
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
8
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
9
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
10
|
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
|
|
@@ -1 +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"}
|
|
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,uBAAuB,MAAM,uCAAuC,CAAC;AACjF,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as v from '@atcute/lexicons/validations';
|
|
2
|
+
declare const _mainSchema: v.ObjectSchema<{
|
|
3
|
+
$type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.blocks.website">, undefined>;
|
|
4
|
+
description: v.OptionalSchema<v.StringSchema<string>, undefined>;
|
|
5
|
+
previewImage: v.OptionalSchema<v.BlobSchema, undefined>;
|
|
6
|
+
src: v.FormattedStringSchema<"uri">;
|
|
7
|
+
title: v.OptionalSchema<v.StringSchema<string>, undefined>;
|
|
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,10 @@
|
|
|
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.website')),
|
|
4
|
+
description: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
|
|
5
|
+
previewImage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
|
|
6
|
+
src: /*#__PURE__*/ v.genericUriString(),
|
|
7
|
+
title: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
|
|
8
|
+
});
|
|
9
|
+
export const mainSchema = _mainSchema;
|
|
10
|
+
//# sourceMappingURL=website.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/blocks/website.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,4BAA4B,CAAC,CAAC;IACtF,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/D,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;IACvC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACzD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as v from '@atcute/lexicons/validations';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
|
|
2
3
|
import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
|
|
3
4
|
declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
|
|
4
5
|
$type: v.LiteralSchema<"pub.leaflet.document">;
|
|
5
6
|
author: v.FormattedStringSchema<"at-identifier">;
|
|
6
7
|
description: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 3000>, v.StringGraphemesConstraint<0, 300>]>, undefined>;
|
|
7
8
|
readonly pages: v.ArraySchema<v.VariantSchema<readonly [PubLeafletPagesLinearDocument.mainSchema], boolean>>;
|
|
9
|
+
readonly postRef: v.OptionalSchema<ComAtprotoRepoStrongRef.mainSchema, undefined>;
|
|
8
10
|
publication: v.FormattedStringSchema<"at-uri">;
|
|
9
11
|
publishedAt: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
|
|
10
12
|
title: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 1280>, v.StringGraphemesConstraint<0, 128>]>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from '@atcute/lexicons/validations';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
|
|
2
3
|
import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
|
|
3
4
|
const _mainSchema = /*#__PURE__*/ v.record(
|
|
4
5
|
/*#__PURE__*/ v.tidString(),
|
|
@@ -13,6 +14,9 @@ const _mainSchema = /*#__PURE__*/ v.record(
|
|
|
13
14
|
get pages() {
|
|
14
15
|
return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([PubLeafletPagesLinearDocument.mainSchema]));
|
|
15
16
|
},
|
|
17
|
+
get postRef() {
|
|
18
|
+
return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema);
|
|
19
|
+
},
|
|
16
20
|
publication: /*#__PURE__*/ v.resourceUriString(),
|
|
17
21
|
publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
|
|
18
22
|
title: /*#__PURE__*/ v.constrain(/*#__PURE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E,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,17 @@
|
|
|
1
|
+
import * as v from '@atcute/lexicons/validations';
|
|
2
|
+
declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
|
|
3
|
+
$type: v.LiteralSchema<"pub.leaflet.graph.subscription">;
|
|
4
|
+
publication: v.FormattedStringSchema<"at-uri">;
|
|
5
|
+
}>, v.FormattedStringSchema<"tid">>;
|
|
6
|
+
type main$schematype = typeof _mainSchema;
|
|
7
|
+
export interface mainSchema extends main$schematype {
|
|
8
|
+
}
|
|
9
|
+
export declare const mainSchema: mainSchema;
|
|
10
|
+
export interface Main extends v.InferInput<typeof mainSchema> {
|
|
11
|
+
}
|
|
12
|
+
declare module '@atcute/lexicons/ambient' {
|
|
13
|
+
interface Records {
|
|
14
|
+
'pub.leaflet.graph.subscription': mainSchema;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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.graph.subscription'),
|
|
6
|
+
publication: /*#__PURE__*/ v.resourceUriString(),
|
|
7
|
+
}));
|
|
8
|
+
export const mainSchema = _mainSchema;
|
|
9
|
+
//# sourceMappingURL=subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/pub/leaflet/graph/subscription.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,gCAAgC,CAAC;IAChE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAChD,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
|
|
@@ -3,10 +3,11 @@ import * as PubLeafletBlocksHeader from '../blocks/header.js';
|
|
|
3
3
|
import * as PubLeafletBlocksImage from '../blocks/image.js';
|
|
4
4
|
import * as PubLeafletBlocksText from '../blocks/text.js';
|
|
5
5
|
import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
|
|
6
|
+
import * as PubLeafletBlocksWebsite from '../blocks/website.js';
|
|
6
7
|
declare const _blockSchema: v.ObjectSchema<{
|
|
7
8
|
$type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument#block">, undefined>;
|
|
8
9
|
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
|
+
readonly block: v.VariantSchema<readonly [PubLeafletBlocksHeader.mainSchema, PubLeafletBlocksImage.mainSchema, PubLeafletBlocksText.mainSchema, PubLeafletBlocksUnorderedList.mainSchema, PubLeafletBlocksWebsite.mainSchema], boolean>;
|
|
10
11
|
}>;
|
|
11
12
|
declare const _mainSchema: v.ObjectSchema<{
|
|
12
13
|
$type: v.OptionalSchema<v.LiteralSchema<"pub.leaflet.pages.linearDocument">, undefined>;
|
|
@@ -3,6 +3,7 @@ import * as PubLeafletBlocksHeader from '../blocks/header.js';
|
|
|
3
3
|
import * as PubLeafletBlocksImage from '../blocks/image.js';
|
|
4
4
|
import * as PubLeafletBlocksText from '../blocks/text.js';
|
|
5
5
|
import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
|
|
6
|
+
import * as PubLeafletBlocksWebsite from '../blocks/website.js';
|
|
6
7
|
const _blockSchema = /*#__PURE__*/ v.object({
|
|
7
8
|
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#block')),
|
|
8
9
|
alignment: /*#__PURE__*/ v.optional(
|
|
@@ -13,6 +14,7 @@ const _blockSchema = /*#__PURE__*/ v.object({
|
|
|
13
14
|
PubLeafletBlocksImage.mainSchema,
|
|
14
15
|
PubLeafletBlocksText.mainSchema,
|
|
15
16
|
PubLeafletBlocksUnorderedList.mainSchema,
|
|
17
|
+
PubLeafletBlocksWebsite.mainSchema,
|
|
16
18
|
]);
|
|
17
19
|
},
|
|
18
20
|
});
|
|
@@ -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,sBAAsB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,qBAAqB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM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AAC,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"}
|
package/lib/lexicons/index.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
|
|
|
2
2
|
export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
|
|
3
3
|
export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
|
|
4
4
|
export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
|
|
5
|
+
export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js';
|
|
5
6
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
7
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
8
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
9
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
10
|
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.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.website')),
|
|
6
|
+
description: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
|
|
7
|
+
previewImage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
|
|
8
|
+
src: /*#__PURE__*/ v.genericUriString(),
|
|
9
|
+
title: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
|
|
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,6 +1,7 @@
|
|
|
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 ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
|
|
4
5
|
import * as PubLeafletPagesLinearDocument from './pages/linearDocument.js';
|
|
5
6
|
|
|
6
7
|
const _mainSchema = /*#__PURE__*/ v.record(
|
|
@@ -17,6 +18,9 @@ const _mainSchema = /*#__PURE__*/ v.record(
|
|
|
17
18
|
get pages() {
|
|
18
19
|
return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([PubLeafletPagesLinearDocument.mainSchema]));
|
|
19
20
|
},
|
|
21
|
+
get postRef() {
|
|
22
|
+
return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema);
|
|
23
|
+
},
|
|
20
24
|
publication: /*#__PURE__*/ v.resourceUriString(),
|
|
21
25
|
publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
|
|
22
26
|
title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
@@ -0,0 +1,25 @@
|
|
|
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.graph.subscription'),
|
|
9
|
+
publication: /*#__PURE__*/ v.resourceUriString(),
|
|
10
|
+
}),
|
|
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> {}
|
|
20
|
+
|
|
21
|
+
declare module '@atcute/lexicons/ambient' {
|
|
22
|
+
interface Records {
|
|
23
|
+
'pub.leaflet.graph.subscription': mainSchema;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -4,6 +4,7 @@ import * as PubLeafletBlocksHeader from '../blocks/header.js';
|
|
|
4
4
|
import * as PubLeafletBlocksImage from '../blocks/image.js';
|
|
5
5
|
import * as PubLeafletBlocksText from '../blocks/text.js';
|
|
6
6
|
import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
|
|
7
|
+
import * as PubLeafletBlocksWebsite from '../blocks/website.js';
|
|
7
8
|
|
|
8
9
|
const _blockSchema = /*#__PURE__*/ v.object({
|
|
9
10
|
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.pages.linearDocument#block')),
|
|
@@ -16,6 +17,7 @@ const _blockSchema = /*#__PURE__*/ v.object({
|
|
|
16
17
|
PubLeafletBlocksImage.mainSchema,
|
|
17
18
|
PubLeafletBlocksText.mainSchema,
|
|
18
19
|
PubLeafletBlocksUnorderedList.mainSchema,
|
|
20
|
+
PubLeafletBlocksWebsite.mainSchema,
|
|
19
21
|
]);
|
|
20
22
|
},
|
|
21
23
|
});
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@atcute/leaflet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Leaflet (pub.leaflet.*) schema definitions",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"atcute",
|
|
8
8
|
"atproto",
|
|
9
9
|
"leaflet"
|
|
10
10
|
],
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "0BSD",
|
|
12
12
|
"repository": {
|
|
13
13
|
"url": "https://github.com/mary-ext/atcute",
|
|
14
14
|
"directory": "packages/definitions/leaflet"
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
"./types/*": "./dist/lexicons/types/pub/leaflet/*.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atcute/
|
|
27
|
+
"@atcute/atproto": "^3.1.0",
|
|
28
|
+
"@atcute/lexicons": "^1.1.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@atcute/leaflet": "file:",
|
|
31
|
-
"vitest": "^3.
|
|
32
|
-
"@atcute/lex-cli": "^2.
|
|
32
|
+
"vitest": "^3.2.4",
|
|
33
|
+
"@atcute/lex-cli": "^2.1.1"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsc",
|