@atcute/leaflet 1.0.0 → 1.0.1
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 +1 -0
- package/dist/lexicons/index.js +1 -0
- package/dist/lexicons/index.js.map +1 -1
- 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/lib/lexicons/index.ts +1 -0
- package/lib/lexicons/types/pub/leaflet/document.ts +4 -0
- package/lib/lexicons/types/pub/leaflet/graph/subscription.ts +25 -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
|
@@ -3,6 +3,7 @@ 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
5
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
6
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
7
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
8
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
9
|
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
|
package/dist/lexicons/index.js
CHANGED
|
@@ -3,6 +3,7 @@ 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
5
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
6
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
7
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
8
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
9
|
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,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"}
|
|
@@ -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__*/ v.string(), [
|
|
@@ -1 +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,EAA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C,uBAAuB,CAAC,UAAU,CAAC,CAAC;IACrE,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,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"}
|
package/lib/lexicons/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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
5
|
export * as PubLeafletDocument from './types/pub/leaflet/document.js';
|
|
6
|
+
export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription.js';
|
|
6
7
|
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
|
|
7
8
|
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
|
|
8
9
|
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
|
|
@@ -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
|
+
}
|
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.1",
|
|
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.0.4"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@atcute/leaflet": "file:",
|
|
31
|
-
"vitest": "^3.1.
|
|
32
|
-
"@atcute/lex-cli": "^2.
|
|
32
|
+
"vitest": "^3.1.4",
|
|
33
|
+
"@atcute/lex-cli": "^2.1.1"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsc",
|