@atcute/standard-site 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 (38) hide show
  1. package/LICENSE +14 -0
  2. package/README.md +62 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +2 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lexicons/index.d.ts +6 -0
  8. package/dist/lexicons/index.d.ts.map +1 -0
  9. package/dist/lexicons/index.js +6 -0
  10. package/dist/lexicons/index.js.map +1 -0
  11. package/dist/lexicons/types/site/standard/document.d.ts +69 -0
  12. package/dist/lexicons/types/site/standard/document.d.ts.map +1 -0
  13. package/dist/lexicons/types/site/standard/document.js +74 -0
  14. package/dist/lexicons/types/site/standard/document.js.map +1 -0
  15. package/dist/lexicons/types/site/standard/graph/subscription.d.ts +21 -0
  16. package/dist/lexicons/types/site/standard/graph/subscription.d.ts.map +1 -0
  17. package/dist/lexicons/types/site/standard/graph/subscription.js +12 -0
  18. package/dist/lexicons/types/site/standard/graph/subscription.js.map +1 -0
  19. package/dist/lexicons/types/site/standard/publication.d.ts +62 -0
  20. package/dist/lexicons/types/site/standard/publication.d.ts.map +1 -0
  21. package/dist/lexicons/types/site/standard/publication.js +59 -0
  22. package/dist/lexicons/types/site/standard/publication.js.map +1 -0
  23. package/dist/lexicons/types/site/standard/theme/basic.d.ts +29 -0
  24. package/dist/lexicons/types/site/standard/theme/basic.d.ts.map +1 -0
  25. package/dist/lexicons/types/site/standard/theme/basic.js +31 -0
  26. package/dist/lexicons/types/site/standard/theme/basic.js.map +1 -0
  27. package/dist/lexicons/types/site/standard/theme/color.d.ts +56 -0
  28. package/dist/lexicons/types/site/standard/theme/color.d.ts.map +1 -0
  29. package/dist/lexicons/types/site/standard/theme/color.js +45 -0
  30. package/dist/lexicons/types/site/standard/theme/color.js.map +1 -0
  31. package/lib/index.ts +1 -0
  32. package/lib/lexicons/index.ts +5 -0
  33. package/lib/lexicons/types/site/standard/document.ts +92 -0
  34. package/lib/lexicons/types/site/standard/graph/subscription.ts +28 -0
  35. package/lib/lexicons/types/site/standard/publication.ts +80 -0
  36. package/lib/lexicons/types/site/standard/theme/basic.ts +40 -0
  37. package/lib/lexicons/types/site/standard/theme/color.ts +56 -0
  38. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,14 @@
1
+ BSD Zero Clause License
2
+
3
+ Copyright (c) 2025 Mary
4
+
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/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @atcute/standard-site
2
+
3
+ [standard.site](https://standard.site) (site.standard.\*) schema definitions
4
+
5
+ ```sh
6
+ npm install @atcute/standard-site
7
+ ```
8
+
9
+ ## usage
10
+
11
+ ```ts
12
+ import { SiteStandardPublication } from '@atcute/standard-site';
13
+ import { is } from '@atcute/lexicons';
14
+
15
+ const publication: SiteStandardPublication.Main = {
16
+ $type: 'site.standard.publication',
17
+ name: 'my blog',
18
+ url: 'https://example.standard.site',
19
+ };
20
+
21
+ is(SiteStandardPublication.mainSchema, publication);
22
+ // -> true
23
+ ```
24
+
25
+ ### with `@atcute/client`
26
+
27
+ pick either one of these 3 options to register the ambient declarations
28
+
29
+ ```jsonc
30
+ // file: tsconfig.json
31
+ {
32
+ "compilerOptions": {
33
+ "types": ["@atcute/standard-site"],
34
+ },
35
+ }
36
+ ```
37
+
38
+ ```ts
39
+ // file: env.d.ts
40
+ /// <reference types="@atcute/standard-site" />
41
+ ```
42
+
43
+ ```ts
44
+ // file: index.ts
45
+ import type {} from '@atcute/standard-site';
46
+ ```
47
+
48
+ ### with `@atcute/lex-cli`
49
+
50
+ when building your own lexicons that reference standard.site types, configure lex-cli to import from
51
+ this package:
52
+
53
+ ```ts
54
+ // file: lex.config.js
55
+ import { defineLexiconConfig } from '@atcute/lex-cli';
56
+
57
+ export default defineLexiconConfig({
58
+ files: ['lexicons/**/*.json'],
59
+ outdir: 'src/lexicons/',
60
+ imports: ['@atcute/standard-site'],
61
+ });
62
+ ```
@@ -0,0 +1,2 @@
1
+ export * from './lexicons/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
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,6 @@
1
+ export * as SiteStandardDocument from './types/site/standard/document.js';
2
+ export * as SiteStandardGraphSubscription from './types/site/standard/graph/subscription.js';
3
+ export * as SiteStandardPublication from './types/site/standard/publication.js';
4
+ export * as SiteStandardThemeBasic from './types/site/standard/theme/basic.js';
5
+ export * as SiteStandardThemeColor from './types/site/standard/theme/color.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC;AAC7F,OAAO,KAAK,uBAAuB,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,sBAAsB,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,sBAAsB,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * as SiteStandardDocument from './types/site/standard/document.js';
2
+ export * as SiteStandardGraphSubscription from './types/site/standard/graph/subscription.js';
3
+ export * as SiteStandardPublication from './types/site/standard/publication.js';
4
+ export * as SiteStandardThemeBasic from './types/site/standard/theme/basic.js';
5
+ export * as SiteStandardThemeColor from './types/site/standard/theme/color.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,6BAA6B,MAAM,6CAA6C,CAAC;AAC7F,OAAO,KAAK,uBAAuB,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,sBAAsB,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,sBAAsB,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
4
+ $type: v.LiteralSchema<"site.standard.document">;
5
+ /**
6
+ * Strong reference to a Bluesky post. Useful to keep track of comments off-platform.
7
+ */
8
+ readonly bskyPostRef: v.OptionalSchema<ComAtprotoRepoStrongRef.mainSchema, undefined>;
9
+ /**
10
+ * Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.
11
+ */
12
+ readonly content: v.OptionalSchema<v.VariantSchema<readonly [], boolean>, undefined>;
13
+ /**
14
+ * Image to used for thumbnail or cover image. Less than 1MB is size.
15
+ * @accept image/*
16
+ * @maxSize 1000000
17
+ */
18
+ coverImage: v.OptionalSchema<v.BlobSchema, undefined>;
19
+ /**
20
+ * A brief description or excerpt from the document.
21
+ * @maxLength 30000
22
+ * @maxGraphemes 3000
23
+ */
24
+ description: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 30000>, v.StringGraphemesConstraint<0, 3000>]>, undefined>;
25
+ /**
26
+ * Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.
27
+ */
28
+ path: v.OptionalSchema<v.StringSchema<string>, undefined>;
29
+ /**
30
+ * Timestamp of the documents publish time.
31
+ */
32
+ publishedAt: v.FormattedStringSchema<"datetime">;
33
+ /**
34
+ * Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.
35
+ */
36
+ site: v.FormattedStringSchema<"uri">;
37
+ /**
38
+ * Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.
39
+ * @maxLength 1280
40
+ */
41
+ tags: v.OptionalSchema<v.SchemaWithConstraint<v.ArraySchema<v.StringSchema<string>>, readonly [v.ArrayLengthConstraint<0, 1280>]>, undefined>;
42
+ /**
43
+ * Plaintext representation of the documents contents. Should not contain markdown or other formatting.
44
+ */
45
+ textContent: v.OptionalSchema<v.StringSchema<string>, undefined>;
46
+ /**
47
+ * Title of the document.
48
+ * @maxLength 5000
49
+ * @maxGraphemes 500
50
+ */
51
+ title: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 5000>, v.StringGraphemesConstraint<0, 500>]>;
52
+ /**
53
+ * Timestamp of the documents last edit.
54
+ */
55
+ updatedAt: v.OptionalSchema<v.FormattedStringSchema<"datetime">, undefined>;
56
+ }>, v.FormattedStringSchema<"tid">>;
57
+ type main$schematype = typeof _mainSchema;
58
+ export interface mainSchema extends main$schematype {
59
+ }
60
+ export declare const mainSchema: mainSchema;
61
+ export interface Main extends v.InferInput<typeof mainSchema> {
62
+ }
63
+ declare module '@atcute/lexicons/ambient' {
64
+ interface Records {
65
+ 'site.standard.document': mainSchema;
66
+ }
67
+ }
68
+ export {};
69
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../../lib/lexicons/types/site/standard/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,sCAAsC,CAAC;AAGhF,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,QAAA,MAAM,WAAW;;IAIf;;OAEG;;IAIH;;OAEG;;IAIH;;;;OAIG;;IAEH;;;;OAIG;;IAOH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAMH;;OAEG;;IAEH;;;;OAIG;;IAKH;;OAEG;;mCAGJ,CAAC;AAEF,KAAK,eAAe,GAAG,OAAO,WAAW,CAAC;AAE1C,MAAM,WAAW,UAAW,SAAQ,eAAe;CAAG;AAEtD,eAAO,MAAM,UAAU,YAA4B,CAAC;AAEpD,MAAM,WAAW,IAAK,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC;CAAG;AAEhE,OAAO,QAAQ,0BAA0B,CAAC,CAAC;IAC1C,UAAU,OAAO;QAChB,wBAAwB,EAAE,UAAU,CAAC;KACrC;CACD"}
@@ -0,0 +1,74 @@
1
+ import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
2
+ import * as v from '@atcute/lexicons/validations';
3
+ const _mainSchema = /*#__PURE__*/ v.record(
4
+ /*#__PURE__*/ v.tidString(),
5
+ /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.literal('site.standard.document'),
7
+ /**
8
+ * Strong reference to a Bluesky post. Useful to keep track of comments off-platform.
9
+ */
10
+ get bskyPostRef() {
11
+ return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema);
12
+ },
13
+ /**
14
+ * Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.
15
+ */
16
+ get content() {
17
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([]));
18
+ },
19
+ /**
20
+ * Image to used for thumbnail or cover image. Less than 1MB is size.
21
+ * @accept image/*
22
+ * @maxSize 1000000
23
+ */
24
+ coverImage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
25
+ /**
26
+ * A brief description or excerpt from the document.
27
+ * @maxLength 30000
28
+ * @maxGraphemes 3000
29
+ */
30
+ description: /*#__PURE__*/ v.optional(
31
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
32
+ /*#__PURE__*/ v.stringLength(0, 30000),
33
+ /*#__PURE__*/ v.stringGraphemes(0, 3000),
34
+ ])),
35
+ /**
36
+ * Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.
37
+ */
38
+ path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
39
+ /**
40
+ * Timestamp of the documents publish time.
41
+ */
42
+ publishedAt: /*#__PURE__*/ v.datetimeString(),
43
+ /**
44
+ * Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.
45
+ */
46
+ site: /*#__PURE__*/ v.genericUriString(),
47
+ /**
48
+ * Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.
49
+ * @maxLength 1280
50
+ */
51
+ tags: /*#__PURE__*/ v.optional(
52
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), [
53
+ /*#__PURE__*/ v.arrayLength(0, 1280),
54
+ ])),
55
+ /**
56
+ * Plaintext representation of the documents contents. Should not contain markdown or other formatting.
57
+ */
58
+ textContent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
59
+ /**
60
+ * Title of the document.
61
+ * @maxLength 5000
62
+ * @maxGraphemes 500
63
+ */
64
+ title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
65
+ /*#__PURE__*/ v.stringLength(0, 5000),
66
+ /*#__PURE__*/ v.stringGraphemes(0, 500),
67
+ ]),
68
+ /**
69
+ * Timestamp of the documents last edit.
70
+ */
71
+ updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
72
+ }));
73
+ export const mainSchema = _mainSchema;
74
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../../lib/lexicons/types/site/standard/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,sCAAsC,CAAC;AAGhF,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,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,wBAAwB,CAAC;IACxD;;OAEG;IACH,IAAI,WAAW,GAAG;QACjB,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;IAAA,CACpE;IACD;;OAEG;IACH,IAAI,OAAO,GAAG;QACb,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAAA,CAC7D;IACD;;;;OAIG;IACH,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5D;;;;OAIG;IACH,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,KAAK,CAAC;QACtC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC;KACxC,CAAC,CACF;IACD;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACxD;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE;IAC7C;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;IACxC;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IAC7B,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAC1E,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC;KACpC,CAAC,CACF;IACD;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/D;;;;OAIG;IACH,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;IACF;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;CACrE,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
3
+ $type: v.LiteralSchema<"site.standard.graph.subscription">;
4
+ /**
5
+ * AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789).
6
+ */
7
+ publication: v.FormattedStringSchema<"at-uri">;
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
+ 'site.standard.graph.subscription': mainSchema;
18
+ }
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=subscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/graph/subscription.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,QAAA,MAAM,WAAW;;IAIf;;OAEG;;mCAGJ,CAAC;AAEF,KAAK,eAAe,GAAG,OAAO,WAAW,CAAC;AAE1C,MAAM,WAAW,UAAW,SAAQ,eAAe;CAAG;AAEtD,eAAO,MAAM,UAAU,YAA4B,CAAC;AAEpD,MAAM,WAAW,IAAK,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC;CAAG;AAEhE,OAAO,QAAQ,0BAA0B,CAAC,CAAC;IAC1C,UAAU,OAAO;QAChB,kCAAkC,EAAE,UAAU,CAAC;KAC/C;CACD"}
@@ -0,0 +1,12 @@
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('site.standard.graph.subscription'),
6
+ /**
7
+ * AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789).
8
+ */
9
+ publication: /*#__PURE__*/ v.resourceUriString(),
10
+ }));
11
+ export const mainSchema = _mainSchema;
12
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/graph/subscription.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,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,kCAAkC,CAAC;IAClE;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE;CAChD,CAAC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as SiteStandardThemeBasic from './theme/basic.js';
3
+ declare const _mainSchema: v.RecordSchema<v.ObjectSchema<{
4
+ $type: v.LiteralSchema<"site.standard.publication">;
5
+ /**
6
+ * Simplified publication theme for tools and apps to utilize when displaying content.
7
+ */
8
+ readonly basicTheme: v.OptionalSchema<SiteStandardThemeBasic.mainSchema, undefined>;
9
+ /**
10
+ * Brief description of the publication.
11
+ * @maxLength 30000
12
+ * @maxGraphemes 3000
13
+ */
14
+ description: v.OptionalSchema<v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 30000>, v.StringGraphemesConstraint<0, 3000>]>, undefined>;
15
+ /**
16
+ * Square image to identify the publication. Should be at least 256x256.
17
+ * @accept image/*
18
+ * @maxSize 1000000
19
+ */
20
+ icon: v.OptionalSchema<v.BlobSchema, undefined>;
21
+ /**
22
+ * Name of the publication.
23
+ * @maxLength 5000
24
+ * @maxGraphemes 500
25
+ */
26
+ name: v.SchemaWithConstraint<v.StringSchema<string>, readonly [v.StringLengthConstraint<0, 5000>, v.StringGraphemesConstraint<0, 500>]>;
27
+ /**
28
+ * Object containing platform specific preferences (with a few shared properties).
29
+ */
30
+ readonly preferences: v.OptionalSchema<preferencesSchema, undefined>;
31
+ /**
32
+ * Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path.
33
+ */
34
+ url: v.FormattedStringSchema<"uri">;
35
+ }>, v.FormattedStringSchema<"tid">>;
36
+ declare const _preferencesSchema: v.ObjectSchema<{
37
+ $type: v.OptionalSchema<v.LiteralSchema<"site.standard.publication#preferences">, undefined>;
38
+ /**
39
+ * Boolean which decides whether the publication should appear in discovery feeds.
40
+ * @default true
41
+ */
42
+ showInDiscover: v.OptionalSchema<v.BooleanSchema, true>;
43
+ }>;
44
+ type main$schematype = typeof _mainSchema;
45
+ type preferences$schematype = typeof _preferencesSchema;
46
+ export interface mainSchema extends main$schematype {
47
+ }
48
+ export interface preferencesSchema extends preferences$schematype {
49
+ }
50
+ export declare const mainSchema: mainSchema;
51
+ export declare const preferencesSchema: preferencesSchema;
52
+ export interface Main extends v.InferInput<typeof mainSchema> {
53
+ }
54
+ export interface Preferences extends v.InferInput<typeof preferencesSchema> {
55
+ }
56
+ declare module '@atcute/lexicons/ambient' {
57
+ interface Records {
58
+ 'site.standard.publication': mainSchema;
59
+ }
60
+ }
61
+ export {};
62
+ //# sourceMappingURL=publication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../../../../lib/lexicons/types/site/standard/publication.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,sBAAsB,MAAM,kBAAkB,CAAC;AAE3D,QAAA,MAAM,WAAW;;IAIf;;OAEG;;IAIH;;;;OAIG;;IAOH;;;;OAIG;;IAEH;;;;OAIG;;IAKH;;OAEG;;IAIH;;OAEG;;mCAGJ,CAAC;AACF,QAAA,MAAM,kBAAkB;;IAEvB;;;OAGG;;EAEF,CAAC;AAEH,KAAK,eAAe,GAAG,OAAO,WAAW,CAAC;AAC1C,KAAK,sBAAsB,GAAG,OAAO,kBAAkB,CAAC;AAExD,MAAM,WAAW,UAAW,SAAQ,eAAe;CAAG;AACtD,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;CAAG;AAEpE,eAAO,MAAM,UAAU,YAA4B,CAAC;AACpD,eAAO,MAAM,iBAAiB,mBAA0C,CAAC;AAEzE,MAAM,WAAW,IAAK,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC;CAAG;AAChE,MAAM,WAAW,WAAY,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC;CAAG;AAE9E,OAAO,QAAQ,0BAA0B,CAAC,CAAC;IAC1C,UAAU,OAAO;QAChB,2BAA2B,EAAE,UAAU,CAAC;KACxC;CACD"}
@@ -0,0 +1,59 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as SiteStandardThemeBasic from './theme/basic.js';
3
+ const _mainSchema = /*#__PURE__*/ v.record(
4
+ /*#__PURE__*/ v.tidString(),
5
+ /*#__PURE__*/ v.object({
6
+ $type: /*#__PURE__*/ v.literal('site.standard.publication'),
7
+ /**
8
+ * Simplified publication theme for tools and apps to utilize when displaying content.
9
+ */
10
+ get basicTheme() {
11
+ return /*#__PURE__*/ v.optional(SiteStandardThemeBasic.mainSchema);
12
+ },
13
+ /**
14
+ * Brief description of the publication.
15
+ * @maxLength 30000
16
+ * @maxGraphemes 3000
17
+ */
18
+ description: /*#__PURE__*/ v.optional(
19
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
20
+ /*#__PURE__*/ v.stringLength(0, 30000),
21
+ /*#__PURE__*/ v.stringGraphemes(0, 3000),
22
+ ])),
23
+ /**
24
+ * Square image to identify the publication. Should be at least 256x256.
25
+ * @accept image/*
26
+ * @maxSize 1000000
27
+ */
28
+ icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
29
+ /**
30
+ * Name of the publication.
31
+ * @maxLength 5000
32
+ * @maxGraphemes 500
33
+ */
34
+ name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
35
+ /*#__PURE__*/ v.stringLength(0, 5000),
36
+ /*#__PURE__*/ v.stringGraphemes(0, 500),
37
+ ]),
38
+ /**
39
+ * Object containing platform specific preferences (with a few shared properties).
40
+ */
41
+ get preferences() {
42
+ return /*#__PURE__*/ v.optional(preferencesSchema);
43
+ },
44
+ /**
45
+ * Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path.
46
+ */
47
+ url: /*#__PURE__*/ v.genericUriString(),
48
+ }));
49
+ const _preferencesSchema = /*#__PURE__*/ v.object({
50
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.publication#preferences')),
51
+ /**
52
+ * Boolean which decides whether the publication should appear in discovery feeds.
53
+ * @default true
54
+ */
55
+ showInDiscover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), true),
56
+ });
57
+ export const mainSchema = _mainSchema;
58
+ export const preferencesSchema = _preferencesSchema;
59
+ //# sourceMappingURL=publication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publication.js","sourceRoot":"","sources":["../../../../../lib/lexicons/types/site/standard/publication.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,sBAAsB,MAAM,kBAAkB,CAAC;AAE3D,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,2BAA2B,CAAC;IAC3D;;OAEG;IACH,IAAI,UAAU,GAAG;QAChB,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAAA,CACnE;IACD;;;;OAIG;IACH,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,KAAK,CAAC;QACtC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC;KACxC,CAAC,CACF;IACD;;;;OAIG;IACH,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD;;;;OAIG;IACH,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE;QACzD,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC;QACrC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC;KACvC,CAAC;IACF;;OAEG;IACH,IAAI,WAAW,GAAG;QACjB,OAAO,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAAA,CACnD;IACD;;OAEG;IACH,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,gBAAgB,EAAE;CACvC,CAAC,CACF,CAAC;AACF,MAAM,kBAAkB,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC;IACjG;;;OAGG;IACH,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC;CACzE,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC;AACpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAuC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as SiteStandardThemeColor from './color.js';
3
+ declare const _mainSchema: v.ObjectSchema<{
4
+ $type: v.OptionalSchema<v.LiteralSchema<"site.standard.theme.basic">, undefined>;
5
+ /**
6
+ * Color used for links and button backgrounds.
7
+ */
8
+ readonly accent: v.VariantSchema<readonly [SiteStandardThemeColor.rgbSchema], boolean>;
9
+ /**
10
+ * Color used for button text.
11
+ */
12
+ readonly accentForeground: v.VariantSchema<readonly [SiteStandardThemeColor.rgbSchema], boolean>;
13
+ /**
14
+ * Color used for content background.
15
+ */
16
+ readonly background: v.VariantSchema<readonly [SiteStandardThemeColor.rgbSchema], boolean>;
17
+ /**
18
+ * Color used for content text.
19
+ */
20
+ readonly foreground: v.VariantSchema<readonly [SiteStandardThemeColor.rgbSchema], boolean>;
21
+ }>;
22
+ type main$schematype = typeof _mainSchema;
23
+ export interface mainSchema extends main$schematype {
24
+ }
25
+ export declare const mainSchema: mainSchema;
26
+ export interface Main extends v.InferInput<typeof mainSchema> {
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=basic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/theme/basic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,sBAAsB,MAAM,YAAY,CAAC;AAErD,QAAA,MAAM,WAAW;;IAEhB;;OAEG;;IAIH;;OAEG;;IAIH;;OAEG;;IAIH;;OAEG;;EAIF,CAAC;AAEH,KAAK,eAAe,GAAG,OAAO,WAAW,CAAC;AAE1C,MAAM,WAAW,UAAW,SAAQ,eAAe;CAAG;AAEtD,eAAO,MAAM,UAAU,YAA4B,CAAC;AAEpD,MAAM,WAAW,IAAK,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC;CAAG"}
@@ -0,0 +1,31 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ import * as SiteStandardThemeColor from './color.js';
3
+ const _mainSchema = /*#__PURE__*/ v.object({
4
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.basic')),
5
+ /**
6
+ * Color used for links and button backgrounds.
7
+ */
8
+ get accent() {
9
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
10
+ },
11
+ /**
12
+ * Color used for button text.
13
+ */
14
+ get accentForeground() {
15
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
16
+ },
17
+ /**
18
+ * Color used for content background.
19
+ */
20
+ get background() {
21
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
22
+ },
23
+ /**
24
+ * Color used for content text.
25
+ */
26
+ get foreground() {
27
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
28
+ },
29
+ });
30
+ export const mainSchema = _mainSchema;
31
+ //# sourceMappingURL=basic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/theme/basic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,KAAK,sBAAsB,MAAM,YAAY,CAAC;AAErD,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;;OAEG;IACH,IAAI,MAAM,GAAG;QACZ,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;IAAA,CACnE;IACD;;OAEG;IACH,IAAI,gBAAgB,GAAG;QACtB,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;IAAA,CACnE;IACD;;OAEG;IACH,IAAI,UAAU,GAAG;QAChB,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;IAAA,CACnE;IACD;;OAEG;IACH,IAAI,UAAU,GAAG;QAChB,OAAO,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;IAAA,CACnE;CACD,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
@@ -0,0 +1,56 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ declare const _rgbSchema: v.ObjectSchema<{
3
+ $type: v.OptionalSchema<v.LiteralSchema<"site.standard.theme.color#rgb">, undefined>;
4
+ /**
5
+ * @minimum 0
6
+ * @maximum 255
7
+ */
8
+ b: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
9
+ /**
10
+ * @minimum 0
11
+ * @maximum 255
12
+ */
13
+ g: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
14
+ /**
15
+ * @minimum 0
16
+ * @maximum 255
17
+ */
18
+ r: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
19
+ }>;
20
+ declare const _rgbaSchema: v.ObjectSchema<{
21
+ $type: v.OptionalSchema<v.LiteralSchema<"site.standard.theme.color#rgba">, undefined>;
22
+ /**
23
+ * @minimum 0
24
+ * @maximum 100
25
+ */
26
+ a: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 100>]>;
27
+ /**
28
+ * @minimum 0
29
+ * @maximum 255
30
+ */
31
+ b: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
32
+ /**
33
+ * @minimum 0
34
+ * @maximum 255
35
+ */
36
+ g: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
37
+ /**
38
+ * @minimum 0
39
+ * @maximum 255
40
+ */
41
+ r: v.SchemaWithConstraint<v.IntegerSchema, readonly [v.IntegerRangeConstraint<0, 255>]>;
42
+ }>;
43
+ type rgb$schematype = typeof _rgbSchema;
44
+ type rgba$schematype = typeof _rgbaSchema;
45
+ export interface rgbSchema extends rgb$schematype {
46
+ }
47
+ export interface rgbaSchema extends rgba$schematype {
48
+ }
49
+ export declare const rgbSchema: rgbSchema;
50
+ export declare const rgbaSchema: rgbaSchema;
51
+ export interface Rgb extends v.InferInput<typeof rgbSchema> {
52
+ }
53
+ export interface Rgba extends v.InferInput<typeof rgbaSchema> {
54
+ }
55
+ export {};
56
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/theme/color.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,QAAA,MAAM,UAAU;;IAEf;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;EAEF,CAAC;AACH,QAAA,MAAM,WAAW;;IAEhB;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;EAEF,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,UAAU,CAAC;AACxC,KAAK,eAAe,GAAG,OAAO,WAAW,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,cAAc;CAAG;AACpD,MAAM,WAAW,UAAW,SAAQ,eAAe;CAAG;AAEtD,eAAO,MAAM,SAAS,WAA0B,CAAC;AACjD,eAAO,MAAM,UAAU,YAA4B,CAAC;AAEpD,MAAM,WAAW,GAAI,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC;CAAG;AAC9D,MAAM,WAAW,IAAK,SAAQ,CAAC,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC;CAAG"}
@@ -0,0 +1,45 @@
1
+ import * as v from '@atcute/lexicons/validations';
2
+ const _rgbSchema = /*#__PURE__*/ v.object({
3
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.color#rgb')),
4
+ /**
5
+ * @minimum 0
6
+ * @maximum 255
7
+ */
8
+ b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
9
+ /**
10
+ * @minimum 0
11
+ * @maximum 255
12
+ */
13
+ g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
14
+ /**
15
+ * @minimum 0
16
+ * @maximum 255
17
+ */
18
+ r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
19
+ });
20
+ const _rgbaSchema = /*#__PURE__*/ v.object({
21
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.color#rgba')),
22
+ /**
23
+ * @minimum 0
24
+ * @maximum 100
25
+ */
26
+ a: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 100)]),
27
+ /**
28
+ * @minimum 0
29
+ * @maximum 255
30
+ */
31
+ b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
32
+ /**
33
+ * @minimum 0
34
+ * @maximum 255
35
+ */
36
+ g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
37
+ /**
38
+ * @minimum 0
39
+ * @maximum 255
40
+ */
41
+ r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
42
+ });
43
+ export const rgbSchema = _rgbSchema;
44
+ export const rgbaSchema = _rgbaSchema;
45
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../../../lib/lexicons/types/site/standard/theme/color.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACzF;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;CAC/F,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,gCAAgC,CAAC,CAAC;IAC1F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/F;;;OAGG;IACH,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;CAC/F,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAuB,CAAC;AACjD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAyB,CAAC"}
package/lib/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lexicons/index.js';
@@ -0,0 +1,5 @@
1
+ export * as SiteStandardDocument from './types/site/standard/document.js';
2
+ export * as SiteStandardGraphSubscription from './types/site/standard/graph/subscription.js';
3
+ export * as SiteStandardPublication from './types/site/standard/publication.js';
4
+ export * as SiteStandardThemeBasic from './types/site/standard/theme/basic.js';
5
+ export * as SiteStandardThemeColor from './types/site/standard/theme/color.js';
@@ -0,0 +1,92 @@
1
+ import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
2
+ import type {} from '@atcute/lexicons';
3
+ import type {} from '@atcute/lexicons/ambient';
4
+ import * as v from '@atcute/lexicons/validations';
5
+
6
+ const _mainSchema = /*#__PURE__*/ v.record(
7
+ /*#__PURE__*/ v.tidString(),
8
+ /*#__PURE__*/ v.object({
9
+ $type: /*#__PURE__*/ v.literal('site.standard.document'),
10
+ /**
11
+ * Strong reference to a Bluesky post. Useful to keep track of comments off-platform.
12
+ */
13
+ get bskyPostRef() {
14
+ return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema);
15
+ },
16
+ /**
17
+ * Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.
18
+ */
19
+ get content() {
20
+ return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([]));
21
+ },
22
+ /**
23
+ * Image to used for thumbnail or cover image. Less than 1MB is size.
24
+ * @accept image/*
25
+ * @maxSize 1000000
26
+ */
27
+ coverImage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
28
+ /**
29
+ * A brief description or excerpt from the document.
30
+ * @maxLength 30000
31
+ * @maxGraphemes 3000
32
+ */
33
+ description: /*#__PURE__*/ v.optional(
34
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
35
+ /*#__PURE__*/ v.stringLength(0, 30000),
36
+ /*#__PURE__*/ v.stringGraphemes(0, 3000),
37
+ ]),
38
+ ),
39
+ /**
40
+ * Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.
41
+ */
42
+ path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
43
+ /**
44
+ * Timestamp of the documents publish time.
45
+ */
46
+ publishedAt: /*#__PURE__*/ v.datetimeString(),
47
+ /**
48
+ * Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.
49
+ */
50
+ site: /*#__PURE__*/ v.genericUriString(),
51
+ /**
52
+ * Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.
53
+ * @maxLength 1280
54
+ */
55
+ tags: /*#__PURE__*/ v.optional(
56
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), [
57
+ /*#__PURE__*/ v.arrayLength(0, 1280),
58
+ ]),
59
+ ),
60
+ /**
61
+ * Plaintext representation of the documents contents. Should not contain markdown or other formatting.
62
+ */
63
+ textContent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
64
+ /**
65
+ * Title of the document.
66
+ * @maxLength 5000
67
+ * @maxGraphemes 500
68
+ */
69
+ title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
70
+ /*#__PURE__*/ v.stringLength(0, 5000),
71
+ /*#__PURE__*/ v.stringGraphemes(0, 500),
72
+ ]),
73
+ /**
74
+ * Timestamp of the documents last edit.
75
+ */
76
+ updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
77
+ }),
78
+ );
79
+
80
+ type main$schematype = typeof _mainSchema;
81
+
82
+ export interface mainSchema extends main$schematype {}
83
+
84
+ export const mainSchema = _mainSchema as mainSchema;
85
+
86
+ export interface Main extends v.InferInput<typeof mainSchema> {}
87
+
88
+ declare module '@atcute/lexicons/ambient' {
89
+ interface Records {
90
+ 'site.standard.document': mainSchema;
91
+ }
92
+ }
@@ -0,0 +1,28 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import type {} from '@atcute/lexicons/ambient';
3
+ import * as v from '@atcute/lexicons/validations';
4
+
5
+ const _mainSchema = /*#__PURE__*/ v.record(
6
+ /*#__PURE__*/ v.tidString(),
7
+ /*#__PURE__*/ v.object({
8
+ $type: /*#__PURE__*/ v.literal('site.standard.graph.subscription'),
9
+ /**
10
+ * AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789).
11
+ */
12
+ publication: /*#__PURE__*/ v.resourceUriString(),
13
+ }),
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> {}
23
+
24
+ declare module '@atcute/lexicons/ambient' {
25
+ interface Records {
26
+ 'site.standard.graph.subscription': mainSchema;
27
+ }
28
+ }
@@ -0,0 +1,80 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import type {} from '@atcute/lexicons/ambient';
3
+ import * as v from '@atcute/lexicons/validations';
4
+
5
+ import * as SiteStandardThemeBasic from './theme/basic.js';
6
+
7
+ const _mainSchema = /*#__PURE__*/ v.record(
8
+ /*#__PURE__*/ v.tidString(),
9
+ /*#__PURE__*/ v.object({
10
+ $type: /*#__PURE__*/ v.literal('site.standard.publication'),
11
+ /**
12
+ * Simplified publication theme for tools and apps to utilize when displaying content.
13
+ */
14
+ get basicTheme() {
15
+ return /*#__PURE__*/ v.optional(SiteStandardThemeBasic.mainSchema);
16
+ },
17
+ /**
18
+ * Brief description of the publication.
19
+ * @maxLength 30000
20
+ * @maxGraphemes 3000
21
+ */
22
+ description: /*#__PURE__*/ v.optional(
23
+ /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
24
+ /*#__PURE__*/ v.stringLength(0, 30000),
25
+ /*#__PURE__*/ v.stringGraphemes(0, 3000),
26
+ ]),
27
+ ),
28
+ /**
29
+ * Square image to identify the publication. Should be at least 256x256.
30
+ * @accept image/*
31
+ * @maxSize 1000000
32
+ */
33
+ icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
34
+ /**
35
+ * Name of the publication.
36
+ * @maxLength 5000
37
+ * @maxGraphemes 500
38
+ */
39
+ name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
40
+ /*#__PURE__*/ v.stringLength(0, 5000),
41
+ /*#__PURE__*/ v.stringGraphemes(0, 500),
42
+ ]),
43
+ /**
44
+ * Object containing platform specific preferences (with a few shared properties).
45
+ */
46
+ get preferences() {
47
+ return /*#__PURE__*/ v.optional(preferencesSchema);
48
+ },
49
+ /**
50
+ * Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path.
51
+ */
52
+ url: /*#__PURE__*/ v.genericUriString(),
53
+ }),
54
+ );
55
+ const _preferencesSchema = /*#__PURE__*/ v.object({
56
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.publication#preferences')),
57
+ /**
58
+ * Boolean which decides whether the publication should appear in discovery feeds.
59
+ * @default true
60
+ */
61
+ showInDiscover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), true),
62
+ });
63
+
64
+ type main$schematype = typeof _mainSchema;
65
+ type preferences$schematype = typeof _preferencesSchema;
66
+
67
+ export interface mainSchema extends main$schematype {}
68
+ export interface preferencesSchema extends preferences$schematype {}
69
+
70
+ export const mainSchema = _mainSchema as mainSchema;
71
+ export const preferencesSchema = _preferencesSchema as preferencesSchema;
72
+
73
+ export interface Main extends v.InferInput<typeof mainSchema> {}
74
+ export interface Preferences extends v.InferInput<typeof preferencesSchema> {}
75
+
76
+ declare module '@atcute/lexicons/ambient' {
77
+ interface Records {
78
+ 'site.standard.publication': mainSchema;
79
+ }
80
+ }
@@ -0,0 +1,40 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+
4
+ import * as SiteStandardThemeColor from './color.js';
5
+
6
+ const _mainSchema = /*#__PURE__*/ v.object({
7
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.basic')),
8
+ /**
9
+ * Color used for links and button backgrounds.
10
+ */
11
+ get accent() {
12
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
13
+ },
14
+ /**
15
+ * Color used for button text.
16
+ */
17
+ get accentForeground() {
18
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
19
+ },
20
+ /**
21
+ * Color used for content background.
22
+ */
23
+ get background() {
24
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
25
+ },
26
+ /**
27
+ * Color used for content text.
28
+ */
29
+ get foreground() {
30
+ return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]);
31
+ },
32
+ });
33
+
34
+ type main$schematype = typeof _mainSchema;
35
+
36
+ export interface mainSchema extends main$schematype {}
37
+
38
+ export const mainSchema = _mainSchema as mainSchema;
39
+
40
+ export interface Main extends v.InferInput<typeof mainSchema> {}
@@ -0,0 +1,56 @@
1
+ import type {} from '@atcute/lexicons';
2
+ import * as v from '@atcute/lexicons/validations';
3
+
4
+ const _rgbSchema = /*#__PURE__*/ v.object({
5
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.color#rgb')),
6
+ /**
7
+ * @minimum 0
8
+ * @maximum 255
9
+ */
10
+ b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
11
+ /**
12
+ * @minimum 0
13
+ * @maximum 255
14
+ */
15
+ g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
16
+ /**
17
+ * @minimum 0
18
+ * @maximum 255
19
+ */
20
+ r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
21
+ });
22
+ const _rgbaSchema = /*#__PURE__*/ v.object({
23
+ $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.color#rgba')),
24
+ /**
25
+ * @minimum 0
26
+ * @maximum 100
27
+ */
28
+ a: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 100)]),
29
+ /**
30
+ * @minimum 0
31
+ * @maximum 255
32
+ */
33
+ b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
34
+ /**
35
+ * @minimum 0
36
+ * @maximum 255
37
+ */
38
+ g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
39
+ /**
40
+ * @minimum 0
41
+ * @maximum 255
42
+ */
43
+ r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
44
+ });
45
+
46
+ type rgb$schematype = typeof _rgbSchema;
47
+ type rgba$schematype = typeof _rgbaSchema;
48
+
49
+ export interface rgbSchema extends rgb$schematype {}
50
+ export interface rgbaSchema extends rgba$schematype {}
51
+
52
+ export const rgbSchema = _rgbSchema as rgbSchema;
53
+ export const rgbaSchema = _rgbaSchema as rgbaSchema;
54
+
55
+ export interface Rgb extends v.InferInput<typeof rgbSchema> {}
56
+ export interface Rgba extends v.InferInput<typeof rgbaSchema> {}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@atcute/standard-site",
3
+ "version": "1.0.0",
4
+ "description": "standard.site (site.standard.*) schema definitions",
5
+ "keywords": [
6
+ "atcute",
7
+ "atproto",
8
+ "standard.site"
9
+ ],
10
+ "license": "0BSD",
11
+ "repository": {
12
+ "url": "https://github.com/mary-ext/atcute",
13
+ "directory": "packages/definitions/standard-site"
14
+ },
15
+ "files": [
16
+ "dist/",
17
+ "lib/",
18
+ "!lib/**/*.bench.ts",
19
+ "!lib/**/*.test.ts"
20
+ ],
21
+ "type": "module",
22
+ "exports": {
23
+ ".": "./dist/index.js",
24
+ "./types/*": "./dist/lexicons/types/site/standard/*.js"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@atcute/atproto": "^3.1.10",
31
+ "@atcute/lexicons": "^1.2.7"
32
+ },
33
+ "devDependencies": {
34
+ "@atcute/lex-cli": "^2.5.3"
35
+ },
36
+ "atcute:lexicons": {
37
+ "mappings": {
38
+ "site.standard.*": {
39
+ "type": "namespace",
40
+ "path": "./types/{{nsid_remainder}}"
41
+ }
42
+ }
43
+ },
44
+ "scripts": {
45
+ "build": "tsgo",
46
+ "pull": "lex-cli pull",
47
+ "generate": "rm -r ./lib/lexicons/; lex-cli generate",
48
+ "prepublish": "rm -rf dist; pnpm run build"
49
+ }
50
+ }